Re: Clojure 1.11 is now available!

2022-03-22 Thread Mark Engelberg
Exciting! Thanks for the new release. Where can I find more information about the new iteration function? The docstring alone isn't sufficient for me to understand how to use it effectively. On Tue, Mar 22, 2022 at 9:22 AM Alex Miller wrote: > You can find an overview here: >

[ANN] rolling-stones 1.0.2

2021-11-14 Thread Mark Engelberg
https://github.com/Engelberg/rolling-stones rolling-stones is a satisfaction solver, a Clojure wrapper for the SAT4J Java solver. Version 1.0.2 updates the dependency to a newer version of SAT4J, implements a workaround for a memory leak in SAT4J, and introduces a new option to express timeout

Re: Accessing Record fields with keywords in ClojureScript not working as in Clojure

2020-08-04 Thread Mark Engelberg
You misspelled default in your defrecord. On Tue, Aug 4, 2020 at 7:42 AM 'clartaq' via Clojure < clojure@googlegroups.com> wrote: > I originally posted > > this on

[ANN] ubergraph 0.8.0 - new features and speed improvements

2019-08-20 Thread Mark Engelberg
https://github.com/Engelberg/ubergraph Ubergraph is a batteries-loaded, immutable graph data structure for Clojure. One of the most useful aspects of ubergraph has always been its super-charged shortest-path function, which encompasses least-distance, least-cost, and A* searches; targeted

Re: Ubergraph - request for volunteers to benchmark alternative implementation

2019-08-17 Thread Mark Engelberg
Thanks. On Sat, Aug 17, 2019 at 2:41 PM Colin Taylor wrote: > I didn't strip it down for a true benchmarking test and my use case is > large but fairly sparsely connected graphs, but I get about 10% improvement. > > -- > You received this message because you are subscribed to the Google >

Re: Ubergraph - request for volunteers to benchmark alternative implementation

2019-08-17 Thread Mark Engelberg
That's great news. Thanks for the report. On Sat, Aug 17, 2019 at 7:59 AM Matthias Nehlsen wrote: > Just tried it out and the improvements were substantial. I tried to add > 94K nodes (journal entries) to a graph, most of which have multiple edges, > and with 0.7.2 it took 137 seconds, whereas

Ubergraph - request for volunteers to benchmark alternative implementation

2019-08-14 Thread Mark Engelberg
I have created a "specter" branch of ubergraph which uses the specter library for all nested map access and transformations. I believe this will speed up ubergraph, especially for adding and removing edges, but I would like it if some users of ubergraph would compare the performance of the specter

[ANN] ubergraph 0.7.0

2019-08-14 Thread Mark Engelberg
https://github.com/Engelberg/ubergraph https://github.com/Engelberg/ubergraph/blob/master/CHANGES.md Ubergraph is a batteries-loaded, immutable graph data structure for Clojure. Version 0.7.0's main addition is two new convenience functions for viewing nodes and edges with attributes attached.

Re: [ANN] tarantella 1.1.1

2019-07-30 Thread Mark Engelberg
Thanks for writing the n-queens code and the blog post. It's great to see tarantella performing well. There's a certain amount of overhead associated with setting up the dancing links data structure, so I would conjecture that as your problem gets more complicated (e.g., increasing n), you'd see

[ANN] tarantella 1.1.1

2019-07-29 Thread Mark Engelberg
"You won't believe this one weird trick for solving Sudokus and other puzzles." Tarantella is an implementation of Knuth's Dancing Links algorithm. I demonstrated in my 2017 Clojure Conj talk how it can be used to solve an assortment of puzzles (https://youtu.be/TA9DBG8x-ys) and some of you may

[ANN] clojure.math.combinatorics 0.1.6

2019-07-24 Thread Mark Engelberg
https://github.com/clojure/math.combinatorics clojure.math.combinatorics is a Clojure contrib library for generating permutations, combinations, subsets, selections, and partitions of collections. The new release provides a workaround for longstanding issues in Clojure that cause (apply concat

[ANN] better-cond 2.1.0

2019-07-24 Thread Mark Engelberg
https://github.com/engelberg/better-cond better-cond allows for :let bindings inside of cond, as well as a handful of other goodies that provide for clearer, more readable code by minimizing "rightward drift". 2.1.0 fixes a bug in the handling of pre/post-maps in the defnc macro. -- You

[ANN] ubergraph 0.6.0

2019-07-23 Thread Mark Engelberg
https://github.com/Engelberg/ubergraph https://github.com/Engelberg/ubergraph/blob/master/CHANGES.md Ubergraph is a batteries-loaded, immutable graph data structure for Clojure. Version 0.6.0 includes several pull requests from the community: a bugfix, performance improvement, documentation

pprint

2019-03-27 Thread Mark Engelberg
Is there any way to make Clojure's pprint print the record tags for records? It seems odd to me that Clojure's main printer has evolved improved support for records over the years, but pprint still prints records as a plain, untagged map. -- You received this message because you are subscribed

Re: Inside Clojure Journal

2019-01-30 Thread Mark Engelberg
+1. I can't seem to subscribe my email to Alex's blog using the form at the bottom of the blog. Clicking the button does nothing. Anyone else having that problem? On Tue, Jan 29, 2019 at 9:03 PM Shaun Parker wrote: > I just wanted to say thanks to Alex for taking the time to journal all the >

Understanding tap

2018-12-19 Thread Mark Engelberg
At first glance, tap seems like it doesn't compose well; two Clojure libraries that use tap for different purposes can't be combined. What is the reasoning behind having one global tap, rather than some sort of pub/sub model? -- You received this message because you are subscribed to the Google

Re: Clojure 1.10 issue: thrown? no longer works on macros

2018-12-18 Thread Mark Engelberg
And the macro which that test case exercises can be found here: https://github.com/Engelberg/instaparse/blob/dcfffad5b065e750f0f5835f017cdd8188b8ca2e/src/instaparse/core.cljc#L274 -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group,

Re: Clojure 1.10 issue: thrown? no longer works on macros

2018-12-18 Thread Mark Engelberg
to report it. Again, I apologize for not realizing the eval/quote was an important aspect and leading you down a rabbit hole. On Tue, Dec 18, 2018 at 12:21 PM Mark Engelberg wrote: > Sorry, I tried to "shrink the error case" and I appear to have gone too > far. The actual problem wo

Re: Clojure 1.10 issue: thrown? no longer works on macros

2018-12-18 Thread Mark Engelberg
Sorry, I tried to "shrink the error case" and I appear to have gone too far. The actual problem would be more like: => (is (thrown? AssertionError (eval (quote (f true On Tue, Dec 18, 2018 at 11:11 AM Alex Miller wrote: > Oh, if you're testing with thrown-with-msg?, that definitely can

Re: Clojure 1.10 issue: thrown? no longer works on macros

2018-12-18 Thread Mark Engelberg
Agreed. It is not a problem for functions which throw AssertionErrors, only macros. But this is a change in behavior which breaks test suites which passed previously. On Tue, Dec 18, 2018 at 1:48 AM alex wrote: > I'm not sure, but probably it behaves so because of throwing at > macroexpand

Clojure 1.10 issue: thrown? no longer works on macros

2018-12-18 Thread Mark Engelberg
Consider the following macro: (defmacro f [x] {:pre [(number? x)]} `(+ ~x 5)) => (f 3) 8 => (f true) Unexpected error (AssertionError) macroexpanding f at (test:localhost:62048(clj)*:265:28). Assert failed: (number? x) So, as expected it throws an AssertionError if passed a non-number. However,

[ANN] better-cond 2.0.2

2018-12-17 Thread Mark Engelberg
https://github.com/engelberg/better-cond better-cond allows for :let bindings inside of cond, as well as a handful of other goodies that provide for clearer, more readable code by minimizing "rightward drift". With the release of Clojure 1.10, I took this opportunity to bump the dependencies and

Re: [ANN] Clojure 1.10 has been released!

2018-12-17 Thread Mark Engelberg
I'm excited by the new improvements. Thanks! On Mon, Dec 17, 2018 at 12:29 PM Tom Connors wrote: > Thanks a bunch to everyone involved. Your work is greatly appreciated! > > On Monday, December 17, 2018 at 12:30:01 PM UTC-5, Alex Miller wrote: >> >> Clojure 1.10 focuses on two major areas:

Re: [ANN] com.walmartlabs/cond-let 1.0.0

2018-10-04 Thread Mark Engelberg
:do forms work? > Alan > > On Wed, Oct 3, 2018 at 7:22 PM Mark Engelberg > wrote: > >> This looks like a case of "convergent evolution". >> >> Having the ability to do a :let in the middle of a cond feels like one of >> those thin

Re: [ANN] com.walmartlabs/cond-let 1.0.0

2018-10-03 Thread Mark Engelberg
This looks like a case of "convergent evolution". Having the ability to do a :let in the middle of a cond feels like one of those things that *should* be in the core language, so if it's not in there, a bunch of people are naturally going to arrive at the same solution and make it happen in their

Re: Clojure(Script) web apps in 2018

2018-09-22 Thread Mark Engelberg
Pedestal isn't cross-platform -- doesn't support Windows. Yada's documentation is not complete (several chunks of the documentation have said "coming soon" for years). Luminus is a great choice, the only downside is that as luminus improves, there's no easy way to incorporate those improvements

Re: New developments in beginner-friendly editing/repl environments?

2018-08-31 Thread Mark Engelberg
As someone who has taught beginners, I agree 100% with Lee's wishlist. It is very important to have an easy install process that gets you to an editing environment that lets you leverage existing text editing skills with minimal or no paren magic, with a focus on making the indenting reflect what

Re: Calling proxy without reflection

2018-08-02 Thread Mark Engelberg
For those following along at home, it turned out not to be a problem with the lein-virgil plugin. It's apparently a bug in Clojure. Renzo and I distilled it down to the following steps: user=> (definterface Interface (test [])) user.Interface user=> (def p (proxy [Object Interface] [] (test []

Re: Calling proxy without reflection

2018-07-31 Thread Mark Engelberg
I am seeing the same behavior when I remove the lein-virgil plugin. On Tue, Jul 31, 2018 at 11:38 AM, Mark Engelberg wrote: > That's surprising, but good to know. Thanks. > > On Tue, Jul 31, 2018 at 9:56 AM, Renzo Borgatti > wrote: > >> Hey Mark, it's lein-virgil interferi

Re: Type hinting protocol functions

2018-07-31 Thread Mark Engelberg
I still haven't found any definitive info on this. Any pointers? Thanks. On Sun, Jul 29, 2018 at 6:15 PM, Mark Engelberg wrote: > I'm having trouble finding current documentation for type hinting protocol > functions. > > Things like: > Do you type hint the prot

Re: Calling proxy without reflection

2018-07-31 Thread Mark Engelberg
That's surprising, but good to know. Thanks. On Tue, Jul 31, 2018 at 9:56 AM, Renzo Borgatti wrote: > Hey Mark, it's lein-virgil interfering. As of why, better opening an issue > there. > > Renzo > > > On 30 Jul 2018, at 11:50, Mark Engelberg > wrote: > > > &

Re: Calling proxy without reflection

2018-07-30 Thread Mark Engelberg
t; I'm interested in taking a look but I simply cannot repro :/ > > On 30 Jul 2018, at 11:40, Mark Engelberg wrote: > > Yes, it is in a fresh environment. > > I find that the problematic example *does* work in the user namespace, > but it doesn't work in my segmented namespace

Re: Calling proxy without reflection

2018-07-30 Thread Mark Engelberg
9.0 and 1.8.0 and I get no reflection, as I'd > expect. > > Are you testing this in a fresh environment? > > > On 30 Jul 2018, at 11:31, Mark Engelberg wrote: > > I'm using 1.9.0. Is this a behavior that recently changed? > > On Mon, Jul 30, 2018 at 3:28 AM, Nicola Mom

Re: Calling proxy without reflection

2018-07-30 Thread Mark Engelberg
nterface Interface (test [])) > user.Interface > user=> (def p (proxy [Object Interface] [] (test [] 1))) > #'user/p > user=> (defn get-test [o] (.test ^Interface o)) > #'user/get-test > user=> (get-test p) > 1 > > > On 30 Jul 2018, at 11:26, Mark Engelberg wr

Re: Calling proxy without reflection

2018-07-30 Thread Mark Engelberg
rrors that might be fishy: a missing > arg vector to pass to the super ctor and an extra `this` parameter in the > method impl (proxy, unlike reify, is anaphoric and binds `this` for you) > > > On 30 Jul 2018, at 10:56, Mark Engelberg wrote: > > Let's say I have a proxy object:

Calling proxy without reflection

2018-07-30 Thread Mark Engelberg
Let's say I have a proxy object: (def p (proxy [MyClass MyInterface] (interfaceMethod [this] ...))) Now, I want to call (.interfaceMethod p). How do I do this without reflection? I would have thought that (.interfaceMethod ^MyInterface p) would work, but this results in an error message that

Type hinting protocol functions

2018-07-29 Thread Mark Engelberg
I'm having trouble finding current documentation for type hinting protocol functions. Things like: Do you type hint the protocol definition or the implementation? Does type hinting primitives work? What about for a return value? What is the behavior if you type hint some of the parameters but not

Re: Front-end with Clojure Backend

2018-07-27 Thread Mark Engelberg
Luminus is a good way to understand how to build a full stack application in Clojure: http://luminusweb.net/ On Fri, Jul 27, 2018 at 1:33 PM, Satyam Ramawat wrote: > I want to create front-end with Clojure backend, how should I approach. > Can anyone please provide me sample project with

Re: OK idea to replace conj and cons with "prepend" and "append" macros that have consistent behavior and return same types as args?

2018-07-23 Thread Mark Engelberg
The book "Simply Scheme" teaches Scheme via a library that lets students do things to either the left or right side of the list, even though the operations on the right side of the list are inefficient. That author found it to be more intuitive to his students. But Clojure is geared more towards

Re: concat and mapcat not sufficiently lazy

2018-07-18 Thread Mark Engelberg
uple of tickets about it : > > https://dev.clojure.org/jira/browse/CLJ-1583 > https://dev.clojure.org/jira/browse/CLJ-1218 > > On Wed, 18 Jul 2018, 08:28 Mark Engelberg, > wrote: > >> I'm kind of surprised I haven't run across this before, but tonight I was >> debugging

concat and mapcat not sufficiently lazy

2018-07-18 Thread Mark Engelberg
I'm kind of surprised I haven't run across this before, but tonight I was debugging a function that was doing an explosion of computation to return the first value of a lazy sequence, and I was able to reduce the problem down to this example: > (first (apply concat (map #(do (println %) [%])

[ANN] clojure.data.priority-map 0.0.10

2018-07-10 Thread Mark Engelberg
clojure.data.priority-map is a data structure that maintains a map that is sorted by its values, rather than its keys. This allows it to be used as a versatile priority queue. The latest version contains two changes: 1. Aligned the hash value of priority maps to match the way that the hash value

Re: Protocols considered harmful?

2018-05-22 Thread Mark Engelberg
There are two schools of thought: 1. Multimethods are the most versatile and work better at the REPL. Use protocols only where necessary for performance (and doing so early is premature optimization). 2. Protocols are the most performant and handle the most common polymorphism need - single

Re: Clojure Games

2018-04-27 Thread Mark Engelberg
On Thu, Apr 26, 2018 at 8:15 AM, Kris Leech wrote: > Puzzler, do you have source online? > Sorry, no. That project is closed source. -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to

Re: Clojure Games

2018-04-25 Thread Mark Engelberg
I created this game for last year's Hour of Code, using Clojurescript and Phaser: http://robot-repair.thinkfun.com/ On Wed, Apr 25, 2018 at 6:17 AM, Gerard Klijs wrote: > I worked on a snake game, where there is a function form one state to the > next. You can play other

Re: [ANN] clojure.data.priority-map 0.0.8

2018-04-10 Thread Mark Engelberg
I just deployed version 0.0.9, which adds a more efficient implementation of reduce-kv. -- 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 -

[ANN] Ubergraph 0.5.0

2018-04-09 Thread Mark Engelberg
https://github.com/Engelberg/ubergraph Ubergraph is a batteries-loaded, immutable graph data structure for Clojure. Version 0.5.0 updates ubergraph to match the latest protocol changes in Loom 1.0.0 and above. Ubergraph has now been in use for over three years, and has no open bug reports in

[ANN] clojure.data.priority-map 0.0.8

2018-04-09 Thread Mark Engelberg
-maps as well as Clojure's other sorted collections. I hope you enjoy the new functionality and find it useful! --Mark Engelberg -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroup

[ANN] Instaparse 1.4.9

2018-04-08 Thread Mark Engelberg
Instaparse is a library for generating parsers from context-free grammars. https://github.com/engelberg/instaparse This new release includes contributions from github users dundalek (bugfix for regexp flags in Clojurescript), HausnerR (improved handling of rhizome dependency which more

Re: numeric-tower versus clojure 1.9

2018-01-19 Thread Mark Engelberg
You seem to be requiring the numeric-tower functions into the foobar.core namespace, and then "use"ing the foobar.core namespace from the user namespace and expecting the numeric-tower functions to show up in the user namespace. However, namespaces aren't transitive like that. You need to

Re: numeric-tower versus clojure 1.9

2018-01-17 Thread Mark Engelberg
It does use the underscore naming convention: https://github.com/clojure/math.numeric-tower/tree/master/src/main/clojure/clojure/math So I suspect there's something strange about your classpath or the dependencies haven't been downloaded, or something along those lines. On Wed, Jan 17, 2018 at

Re: numeric-tower versus clojure 1.9

2018-01-17 Thread Mark Engelberg
Did you put [org.clojure/math.numeric-tower "0.0.4"] in your leiningen project.clj file? On Wed, Jan 17, 2018 at 2:26 PM, Andrew Dabrowski wrote: > Is clojure.math.numeric-tower incompatible with clojure 1.9? The numeric > tower is still at version 0.0.4, 4 years old.

Re: [ANN] Specter 1.0.5

2017-11-16 Thread Mark Engelberg
Thanks! -- 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, send email

Re: [ANN] Specter 1.0.4

2017-10-17 Thread Mark Engelberg
Thank you Nathan! On Tue, Oct 17, 2017 at 10:31 AM, Hari Krishnan wrote: > Thanks for the update. It is a great library. Thanks for sharing..I will > update my project. > > > On Tuesday, October 17, 2017 at 9:26:32 AM UTC-7, Nathan Marz wrote: >> >> Specter fills in

Re: [core.spec] Stricter map validations?

2017-10-03 Thread Mark Engelberg
On Tue, Oct 3, 2017 at 2:55 AM, Peter Hull wrote: > On puzzler's database example, I would have thought that restricting the > keys that go into the DB should not be the job of spec (since functions may > not be instrumented anyway), but the job of the 'core logic'. Maybe

Re: [core.spec] Stricter map validations?

2017-10-02 Thread Mark Engelberg
Yesterday, I was checking a map of info submitted via web before putting its contents into a database. To prevent people from spamming the database, it's necessary to make sure there aren't additional keys thrown into the map. It would be nice to have a *convenient *way to express this in spec,

Re: Help ship Clojure 1.9!

2017-10-02 Thread Mark Engelberg
On Mon, Oct 2, 2017 at 7:55 AM, Stuart Halloway wrote: > Hi David, > > Spec will be in alpha for a while. That is part of the point of it being a > separate library. Can you say more about what problems this is causing? > > Stu > > As a library maintainer, I am forced

Re: Help ship Clojure 1.9!

2017-09-28 Thread Mark Engelberg
into the javascript for its definition of the core hash function, which is nonsensical javascript. So all Clojurescript code is broken by running the new release. On Thu, Sep 28, 2017 at 11:34 AM, Mark Engelberg <mark.engelb...@gmail.com> wrote: > On Thu, Sep 28, 2017 at 11:02 AM, Jeaye <cont.

Re: Help ship Clojure 1.9!

2017-09-28 Thread Mark Engelberg
On Thu, Sep 28, 2017 at 11:02 AM, Jeaye wrote: > This has been the only issue we've run into with 1.9.0-beta1 ( ticket is > here https://dev.clojure.org/jira/browse/CLJS-2352 ). On our back-end, > all tests are good, but we can't currently use beta1 (or alpha20) on the >

[ANN] Instaparse 1.4.8

2017-09-22 Thread Mark Engelberg
Instaparse 1.4.8 has been updated to support a breaking change that was made in Clojurescript 1.9.854, relating to the reader. The change has been tested with Clojurescript versions 1.7.28 and up. No functionality changes, and this update should not matter for Clojure users. Instaparse supports

Re: Starting Clojure again

2017-09-06 Thread Mark Engelberg
You could do that by calling vec on it. But you'd want to move the whole let clause outside of the defn, so it is only evaluated once, not every time the function is called. But best, as I said earlier, is just to let chars be "0123456789ABCDEF". You can call nth on strings, so this is the most

Re: Starting Clojure again

2017-09-06 Thread Mark Engelberg
(let [chars "0123456789ABCDEF"] ...) Replace `reduce` with `apply` to get the performance benefit of using a string builder behind the scenes. On Wed, Sep 6, 2017 at 12:58 AM, Cecil Westerhof wrote: > I want to start using Clojure again. I made the following simple

Re: SRSLY? (= (true? identity) (false? identity)) => true

2017-09-01 Thread Mark Engelberg
(true? identity) -> false (false? identity) -> false (= false false) -> true On Fri, Sep 1, 2017 at 8:43 PM, Rostislav Svoboda < rostislav.svob...@gmail.com> wrote: > Hi, can anybody explain it please? > > $ java -cp clojure-1.8.0.jar clojure.main > Clojure 1.8.0 > user=> (= (true? identity)

Re: Sum types in Clojure? Better to represent as tagged records or as variant vectors?

2017-08-23 Thread Mark Engelberg
I usually model sum types as maps with either a :type or :tag key to specify the kind of map it is. Occasionally, I use vectors with the tag in the first position, especially when I need to favor concision, for example, when the data is serving as a DSL with which I will be manually entering a

Vote for Clojure support in Natural Docs

2017-08-14 Thread Mark Engelberg
Back in the day, I used to use Natural Docs to build great docs for my projects. There's a new version out, and the author of the project is asking people about what languages to support. I encourage you to upvote the Clojure suggestion:

[ANN] Ubergraph 0.4.0

2017-06-22 Thread Mark Engelberg
https://github.com/Engelberg/ubergraph Ubergraph is a batteries-loaded, immutable graph data structure for Clojure. Version 0.4.0 includes improved support for serialization/deserialization of ubergraphs. https://github.com/Engelberg/ubergraph#serialization Ubergraph has now been in use for

Re: Priority Map with efficient search on values?

2017-04-08 Thread Mark Engelberg
If you need to do subseq on the key space, you could do the following: (def pm-empty (PersistentPriorityMap. (sorted-map) (sorted-map) {} nil)) This sets up the priority map to use sorted maps for both associating keys to values and values to keys. Use this as your base priority map to pour new

Re: Priority Map with efficient search on values?

2017-04-08 Thread Mark Engelberg
On a priority map pm, (.priority->set-of-items pm) will return a sorted map from priorities (i.e., the values in the priority-map) to sets of items that have that priority (i.e., the keys in the priority-map). With that sorted map you can look up specific priorities, or do various subseq

Re: [ANN and RFC] Bifurcan: impure functional data strucures

2017-03-28 Thread Mark Engelberg
I do a lot of work with data structures, so this, I think, would be useful to me. For the immutable data structures, it seems like they could be done as a drop-in replacement for the Clojure built-ins. There are a couple new functions for splitting and concatenating. I'd recommend following

Re: Clojure resume tips?

2017-03-23 Thread Mark Engelberg
On Thu, Mar 23, 2017 at 11:24 AM, Luke Burton wrote: > > * So … if I was in your position, knowing what I know now, if I couldn't > find companies that had very progressive hiring practices, I would make my > resume stand out by leading in with an offer to spend a few hours

Re: Combinatorics partitions that preserves adjacency?

2017-03-15 Thread Mark Engelberg
Think in terms of numbering the possible split locations: a b c 1 2 So the possible partitions are represented by [1], [2], [1 2], i.e., all the non-empty subsets of [1 2]. So write a function that goes from this numbering scheme to partitions (e.g., using subvec) and use combinatorics'

Re: Navigators and lenses

2017-03-09 Thread Mark Engelberg
On Mar 9, 2017 9:52 AM, "Brandon Bloom" wrote: >> > > Since you're responding to me specifically, I'd like to be clear that I never made that claim. I only said we need more experimentation. This is a sufficiently big enough area of ideas to warrant exploration of

Re: Navigators and lenses

2017-03-09 Thread Mark Engelberg
Just finished reading through Racket's lens library to compare. Specter can do everything that Racket's lens library can do, but the converse is not true. Specter's navigators can do more than lenses. The lens-like navigators are the most obviously useful parts of Specter, and maybe for some

Re: Release date for 1.9

2017-03-06 Thread Mark Engelberg
However, it does mean that libraries depending on 1.9 may be waiting to release so as not to support a Clojure version that can make breaking changes to the new features at any time. On Mon, Mar 6, 2017 at 12:41 AM, Alexander Kiel wrote: > We also run Clojure 1.9-alpha

Re: Contribute Specter to Clojure core?

2017-03-04 Thread Mark Engelberg
The first time I watched Nathan talk about Specter, I had the exact same thoughts -- "My data structures aren't that complex, I can't relate to these examples, I don't need Specter, I'm fine with Clojure's get-in, update-in, assoc-in." But then, I challenged myself for one day to use Specter's

[ANN] Ubergraph 0.3.1

2017-02-23 Thread Mark Engelberg
https://github.com/Engelberg/ubergraph Ubergraph is a batteries-loaded, immutable graph data structure for Clojure. Version 0.3.1 includes a pull request from github user masztal that now allows `viz-graph`, which is an ubergraph visualization tool using graphviz, to pass along graph-level

Re: Contribute Specter to Clojure core?

2017-02-14 Thread Mark Engelberg
I like Specter and would love to have it readily available in any project, so that aspect is appealing. However, there are a handful of subtle ways that Specter doesn't feel like it was designed by the same people who wrote core. For example, Clojure's built-in transformation functions on data

Re: making a tree from map

2017-01-30 Thread Mark Engelberg
Depending on your needs, you may instead want to consider converting your data to a graph data structure, rather than a tree. The benefits are that it will deal properly with cycles, multiple components, or diverging and re-converging paths. Then in graph form you will be able to run a large

[ANN] cloure.math.combinatorics 0.1.4 (with clojurescript support)

2017-01-07 Thread Mark Engelberg
https://github.com/clojure/math.combinatorics clojure.math.combinatorics is a Clojure contrib library for generating permutations, combinations, subsets, selections, and partitions of collections. The new release uses cljc files to provide cross-platform support for Clojure 1.7 and up, and has

Re: Literal map keys are checked for duplication before evaluation?

2017-01-04 Thread Mark Engelberg
Another workaround: (array-map (java.util.UUID/randomUUID) 1 (java.util.UUID/randomUUID) 2) On Wed, Jan 4, 2017 at 9:16 PM, Timothy Baldridge wrote: > The check is made at read-time, by the time to form gets to the compiler > it's already a hash-map and one of your forms

Re: Cyclic namespace dependencies!

2016-12-30 Thread Mark Engelberg
On Fri, Dec 30, 2016 at 4:55 PM, Timothy Baldridge wrote: > I can see that, and even spec has this use case. In Spec it's solved by > having both A and B in one namespace and using declare to forward-declare > the constructors (or defns in this case). > > So I guess the way

Re: Cyclic namespace dependencies!

2016-12-30 Thread Mark Engelberg
On Fri, Dec 30, 2016 at 4:38 PM, Timothy Baldridge wrote: > > So the layout looks like this: > > Interfaces.clj > | > > | | > ImplementationA Implementation B > |

Re: Cyclic namespace dependencies!

2016-12-30 Thread Mark Engelberg
I feel your pain. I also run up against this time and time again and view it as a significant limitation -- one which often forces me to contort the structure of my Clojure programs into something less natural. And as the Clojure language grows, the problem becomes even more acute. For example,

[ANN] Instaparse 1.4.5

2016-12-30 Thread Mark Engelberg
Instaparse is a library for generating parsers from context-free grammars. https://github.com/engelberg/instaparse This new release fixes a regression reported in 1.4.4, released last week, involving the application of `insta/parser` to a URL. Also, 1.4.4's new macro `defparser` now properly

Re: Order preservation and duplicate removal policy in `distinct`

2016-12-29 Thread Mark Engelberg
On Thu, Dec 29, 2016 at 1:32 PM, Sean Corfield wrote: > > > I'm just guessing there the answer may just be "equal values are equal > and you should never care which one you get out". There are times to care > though, but then perhaps just don't use `distinct` or be sure to

[ANN] Instaparse 1.4.4

2016-12-23 Thread Mark Engelberg
Instaparse is a library for generating parsers from context-free grammars. https://github.com/engelberg/instaparse The big news for this release is that Alex Engelberg has combined the Clojure version with the Clojurescript version of instaparse (initiated by Lucas Bradstreet in 2014) so that

Re: recursive bindings not available in let form?

2016-12-02 Thread Mark Engelberg
Your "y" could also be "fib". You are permitted to use the same name inside the fn. On Fri, Dec 2, 2016 at 12:59 PM, Walter van der Laan < waltervanderl...@gmail.com> wrote: > AFAIK there are two options. > > You can add a symbol after fn: > > (let [fib (fn y [x] > (cond >

Re: comp and partial vs ->>

2016-10-27 Thread Mark Engelberg
On Thu, Oct 27, 2016 at 9:39 AM, Alan Thompson wrote: > I almost never use either the `comp` or the `partial` functions. I think > it is clearer to either compose the functions like Gary showed, or to use a > threading macro (my favorite is the `it->` macro from the Tupelo

Re: core.async top use cases

2016-10-13 Thread Mark Engelberg
og file, but I don't actually mutate it, so the mutability doesn't really matter for this purpose. On Thu, Oct 13, 2016 at 7:02 PM, Mark Engelberg <mark.engelb...@gmail.com> wrote: > My primary use case for agents has always been when I want to coordinate > multiple threads w

Re: core.async top use cases

2016-10-13 Thread Mark Engelberg
My primary use case for agents has always been when I want to coordinate multiple threads writing to a log file. The agent effectively serializes all the write requests with a minimum of fuss. -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post

Re: Just quick review - "idiomaticy" check (Selection sort)

2016-10-10 Thread Mark Engelberg
Doesn't seem fair to use a sort algorithm in the implementation of selection sort. Besides, sort is an n*logn operation, so you don't want to (first (sort-by second ...)) anyway. Instead, choose (apply min-key second ...). Only catch is you need to make sure you don't pass an empty list, or it

Re: [ANN] Clojure 1.9.0-alpha13

2016-09-29 Thread Mark Engelberg
This is the line that is broken by the recent alphas: https://github.com/laurentpetit/ccw.server/blob/master/src/ccw/debug/serverrepl.clj#L448 I remember reading somewhere the new alphas have a breaking change to the way :or destructuring works (but I don't remember the details), so I'm guessing

Re: [ANN] Clojure 1.9.0-alpha13

2016-09-29 Thread Mark Engelberg
It appears that the recent alphas are incompatible with the Counterclockwise REPL. When I create an empty project in Counterclockwise, using this alpha, then when I try to launch a REPL, clojure.main throws an error saying: Exception in thread "main" clojure.lang.ExceptionInfo: Call to

Re: Idiom question

2016-09-28 Thread Mark Engelberg
Right, and just to take this one step farther, imagine that instead of throwing an error, you wanted to actually return a value. And imagine that your call to MidiSystem/getMidiDeviceInfo might return nil as well, and this is something that needs to be protected against and a value returned

Re: Idiom question

2016-09-28 Thread Mark Engelberg
A common convention with as-> is to use the symbol $ because it is recognized as a Clojure identifier but looks distinctive, so it stands out as the placeholder of where to thread. Personally, when reading code, I don't really like to see long uses of the threading operator, and I'd argue that if

Re: [ANN] data-scope - tools for interactively inspecting and visualizing data

2016-09-25 Thread Mark Engelberg
This announcement and the github site list different leiningen injections. Which is correct? Thanks, this looks very useful. On Sat, Sep 24, 2016 at 9:52 PM, James Sofra wrote: > Hi all, > > I have written a little library inspired by Spyscope (which I use a lot) > to

Re: map/filter/remove etc. change underlying structure

2016-09-09 Thread Mark Engelberg
Scala behaves more like your intuition, generally assuming you want back the same kind of collection as what you passed in. It can be a bit of a pain, though, when that's *not* the behavior you want. Clojure's way puts you in control by always producing a sequence and letting you put it into the

Re: map/filter/remove etc. change underlying structure

2016-09-09 Thread Mark Engelberg
Everything from the Clojure cheatsheet's "Seq in Seq out" section processes the input as a sequence (ignoring its concrete type) and always returns a lazy sequence. When you pass in a vector v, the very first thing these functions typically do is call `seq` on it, and they process the input using

Re: Two suggestions re: core.spec, `ns`, and clojure 1.9alpha11

2016-08-23 Thread Mark Engelberg
On Tue, Aug 23, 2016 at 7:45 AM, Alex Miller wrote: > We expect Clojure users to become familiar with spec and its output as it > is (now) an essential part of the language. You will see specs in error > messages. > Is there any documentation to help users understand how to

Re: taking my clojure game to a higher level

2016-08-21 Thread Mark Engelberg
Sounds like you are ready for this book: https://www.amazon.com/Clojure-Applied-Practice-Practitioner-Vandgrift/dp/1680500740 -- 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

  1   2   3   4   5   6   7   8   9   10   >