Call for Participation: Study on Visual and Interactive-Syntax in Clojure(Script)

2022-01-11 Thread Leif Andersen
The Programing Research Laboratory at Northeastern University is conducting a study on the usability of visual and interactive syntax for ClojureScript. Participation involves filling out a questionnaire and is expected to take about 30 minutes. The questionnaire consists of multiple choice an

Re: Tour of our 250k line Clojure codebase

2021-06-09 Thread Leif
se by the end-users of your language? I have a lot of questions about your language, actually, but I'll just wait for your demo. It *is* an ambitious project, and I hope it succeeds. (Since most software nowadays becomes part of "distributed systems" and they are, frankly, a PITA.)

Re: ANN: Parallel let macro!

2017-11-30 Thread Leif
tionality of the libraries you mentioned. Muse and Urania give off a Haskell-y vibe (no surprise) and Graph feels more Clojure-y to me, but they are all interesting projects. Thanks for the post, Leif On Tuesday, November 28, 2017 at 6:58:09 AM UTC-7, Eunmin Kim wrote: Hi, folks > >

Re: [ANN] Specter 1.0.5

2017-11-16 Thread Leif
Nice, thanks. You made it sound like regex-nav only navigates to simple substring matches, which I was confused by, but I was pleased to find that it navigates to full regex matches as returned by re-seq: (transform #"(\d{1,2})/(\d{1,2})/(\d{4})" (fn [[date d m y]] (str m "/" d "/" y))

Re: [ANN] Automatic Clojure Type Annotations

2016-08-17 Thread Leif
boilerplate)! This is the future we've been waiting for. Keep up the good work, Leif On Sunday, August 14, 2016 at 10:33:59 AM UTC-4, Ambrose Bonnaire-Sergeant wrote: > > Hi, > > Happy to announce a new open-source Clojure tool > to generate core.typed type annotat

Specs for clojure.core (very unofficial)

2016-06-16 Thread Leif
data. Functions in clojure are technically data, but an opaque, uncommunicative form of data. Me: “What’s your arity, fn?” Fn: *hostile silence* - In conclusion, what’s your take on the proper relationship between specification and type checking? —Leif ​ --

Re: [ANN] Clojure 1.9.0-alpha1

2016-05-25 Thread Leif
I guess I'm confused why the Clojure philosophy of "data > fns > macros" is being ignored in this particular case, when the other schema libraries show that there is an army of end-users that want to do unexpected things with specifications, and to do that, it would be easiest if they had data I

Re: [ANN] Clojure 1.9.0-alpha1

2016-05-25 Thread Leif
On Wednesday, May 25, 2016 at 4:46:57 PM UTC-4, kovasb wrote: > > > On Wed, May 25, 2016 at 3:01 PM, Mike Rodriguez > wrote: >> >> I always really liked that Prismatic Schema had a "data representation" >> and that seems to be the Clojure-way anyways. I haven't dug into this too >> much yet, bu

Re: [ANN] Clojure 1.9.0-alpha1

2016-05-24 Thread Leif
mentation hiding dooms clojure/core to write *all* the translators. This just seems weird given how most other Clojure features are open and user-extensible. --Leif -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, se

Re: [ANN] Clojure 1.9.0-alpha1

2016-05-24 Thread Leif
7; in introduced, might take away the surprise and replace it with luxurious comfort. Is there a recommended way to introspect specs for our own purposes (coercion, code generation)? An interpreter on the output of 'describe' might work (although it's a little complicated for fn

Re: clojure.spec

2016-05-23 Thread Leif
to namespace all my damn map keywords, though perhaps you'll lead me down the virtuous path.) All that said, it looks good and I think I'll have fun trying it out. --Leif On Monday, May 23, 2016 at 10:12:29 AM UTC-4, Rich Hickey wrote: > > Introducing clojure.spec > > I'm hap

Re: Clojure Newbie questions

2016-05-04 Thread Leif
everyone: JVM/host interactions more specific to deployment, like setting up the JVM to do SSL/other networking correctly, JMX, much more I probably don't know about. As I said, I don't know much Java, so I'd be interested in what more seasoned devs think is important that I've le

Re: New Matrix Multiplication benchmarks - Neanderthal up to 60 times faster than core.matrix with Vectorz

2016-03-13 Thread Leif
short, having two libraries that do the same thing is not a problem, and if it becomes a problem, I think we as a community can deal with it fairly quickly. --Leif On Sunday, March 13, 2016 at 8:19:25 PM UTC-4, Dragan Djuric wrote: > > On Monday, March 14, 2016 at 12:28:24 AM UTC+

Re: Luminus in Techempower benchmarks

2016-02-28 Thread Leif
The Pedestal app is also strangely underperforming in some cases. A Pedestal expert may want to take a look at its configuration. On Saturday, February 27, 2016 at 9:40:28 PM UTC-5, g vim wrote: > > In the latest round of Techempower benchmarks: > > https://www.techempower.com/benchmarks/#secti

Re: Partial question

2016-02-23 Thread Leif
bug-com "message" :id "REMOTE") REMOTE: DEBUG -> message <- COM nil If it really needs to be an anonymous function, `fn` works with the same syntax. Happy hacking, Leif On Tuesday, February 23, 2016 at 3:14:58 PM UTC-5, Fernando Abrao wrote: > > Hello, it w

Re: is this macro right?

2015-12-28 Thread Leif
I tried to answer this on your other thread. If it was unclear, please tell me (on that thread) what points need to be clarified, and I'll try my best. I am unsure why you started a new thread asking the same question, with even less context. --Leif On Monday, December 28, 2015 at 3:

Re: is it function print has bug?

2015-12-26 Thread Leif
function interface, and the call above is equivalent to (get 1 'print '(2 3)) => '(2 3) ; Tries to look up 'print in the data structure 1, fails, uses default value '(2 3). Hope that helps, Leif On Thursday, December 24, 2015 at 8:38:44 AM UTC-5, Mian Pao wrote: >

Re: is it function print has bug?

2015-12-26 Thread Leif
function interface, and the call above is equivalent to (get 1 'print '(2 3)) => '(2 3) ; Tries to look up 'print in the data structure 1, fails, uses default value '(2 3). Hope that helps, Leif On Thursday, December 24, 2015 at 8:38:44 AM UTC-5, Mian Pao wrote: >

Re: [ANN] 2015 State of Clojure Community survey

2015-12-05 Thread Leif
I took it to mean "How many people are *using* your Clojure app?" On Friday, December 4, 2015 at 3:33:10 PM UTC-5, puzzler wrote: > > I took it to mean "How many people are working on your Clojure project?" > > On Fri, Dec 4, 2015 at 8:44 AM, James Reeves > wrote: > >> What does this question mea

Re: Clojure Truck Factor

2015-08-08 Thread Leif
your project is interesting: I think lots of companies / open source orgs would like to know which portions of their codebase need the most cross-training. Good luck on your research, Leif On Friday, August 7, 2015 at 12:21:40 PM UTC-4, Guilherme Avelino wrote: > > As part of my PhD researc

Re: My first Clojure program (and blog post about it)

2015-07-30 Thread Leif
as a whole will be more verbose, but it will be a verbosity that has evident meaning. Happy Clojuring, Leif On Thursday, July 30, 2015 at 7:59:27 PM UTC-4, kirby urner wrote: > > > Thanks to excellent feedback, I now realize my code was overly verbose, a > common phenomenon among

Re: [ANN] Clojure 1.7.0-RC1 now available

2015-05-26 Thread Leif
oling, it's probably advisable to test against 1.7-RC. --Leif On Tuesday, May 26, 2015 at 9:19:00 PM UTC-4, Alex Miller wrote: > > That's not what I see with 1.7.0-RC1 (or any of the betas). I tried with > both Java 1.7.0_25 and 1.8.0-b132. > > user=> *cloju

Re: [ANN] Clojure 1.7.0-RC1 now available

2015-05-26 Thread Leif
java.util.concurrent.TimeUnit) (range)) (into {}) (java.util.EnumMap.) (.entrySet) (map str) (into [])) ["DAYS=6" "DAYS=6" "DAYS=6" "DAYS=6" "DAYS=6" "DAYS=6" "DAYS=6"] --Leif On Tuesday, May 26, 2015 at 8:39:14 PM UTC-4, Dani

Re: Why does the following Clojure code take 10x the time the C# version does? How to improve the Clojure version?

2015-05-20 Thread Leif
"Elapsed time: 1155.723592 msecs" I implemented the changes Amith and Steven suggested on my multithreaded version. I think we can safely say that, with a modest effort, Clojure can compare favorably to C#. :) https://gist.github.com/leifp/a864bca941ecdacb5840 Cheers, Leif On Tuesd

Re: Why does the following Clojure code take 10x the time the C# version does? How to improve the Clojure version?

2015-05-18 Thread Leif
ting to you. Questions / comments welcome. Leif P.S. I apologize for the messy, repetitive, stream-of-consciousness code. On Thursday, May 14, 2015 at 4:02:42 AM UTC-4, Amith George wrote: > > I wrote the following code to solve this challenge - > https://www.reddit.com/r

Best way to test multiple implementations of a protocol?

2015-03-24 Thread Leif
;t well-trodden ground, given the amount of people using Components to organize their apps, but I can't find any examples. Perhaps I am just failing to use the internet properly. Thanks, Leif -- You received this message because you are subscribed to the Google Groups "Clojure" grou

Re: can binary arithmetic guru help improve these "bitmasking" ops?

2015-02-23 Thread Leif
d moff7 (bit-shift-right num off7)) (throw IAE Or just write the unrolled version by hand. I think you would get a fair speedup if you did that for ldb and dpb. Hoping that's clearer, Leif On Monday, February 23, 2015 at 9:20:12 PM UTC-5, Leif wrote: > > > If you

Re: can binary arithmetic guru help improve these "bitmasking" ops?

2015-02-23 Thread Leif
-time. So you could partially evaluate (i.e. unroll, i.e. ~make lookup table for) 'ldb' and 'dpb' for the 8 or 9 different first arguments you actually call it with. I unrolled your 'mask' fn into a 8-way case statement, and got about 6% speedup. --Leif On Monda

Re: [ANN] Introducing 'Phoenix' - a new library for declarative configuration and wiring of Component-based systems

2015-01-25 Thread Leif
components That means only code in your blessed ns can read the file, or things break. Also, the edn spec disallows keywords beginning with "::". So, I'd suggest either following the edn spec or using the ".clj" ending for the config files. --Leif On Saturday, January 2

Re: what do you think about this code?

2014-12-08 Thread Leif
use once, I usually just inline it. Unless of course I believe deep in my heart I'll have need of it somewhere else soon :). This is somewhat a matter of taste, and again, the requirements history usually determines what gets abstracted into functions, and history can be messy. :)

Re: Looking for help with a Stack Overflow error

2014-05-18 Thread Leif
undreds or thousands of variables. Maybe I'm just not experienced enough with core.logic, experts chime in if so. --Leif On Friday, May 16, 2014 3:31:26 PM UTC-4, Brad Kurtz wrote: > > I'm pretty new to Clojure so I'm trying out simple examples to see if I > can get my

Re: "recursive" hierarchies and derive

2014-05-12 Thread Leif
//clojure.github.io/clojure/clojure.core-api.html#clojure.core/isa?>on their corresponding elements: (isa? [::square ::rect] [::shape ::shape])" --Leif On Monday, May 12, 2014 8:41:35 PM UTC-4, r wrote: > > Why is something like > > (derive [::matrix ::ring-element] ::ring-ele

Re: Achieving structural sharing when composing data

2014-05-04 Thread Leif
ed to be shared, you'll have to make your own version of assoc, dissoc, maybe conj & into, etc etc, and remember to always use them. It could get complicated. --Leif On Saturday, May 3, 2014 10:27:29 PM UTC-4, Mike Fikes wrote: > > Are there common techniques or idioms for achie

Re: Parameter order for APIs

2014-04-30 Thread Leif
reduction, I'll put the collection at the end; This adds an element, I'll put the collection at the beginning."). --Leif On Wednesday, April 30, 2014 11:22:55 PM UTC-4, Colin Fleming wrote: > > Hi everyone, > > After the very interesting keyword argument debate, I h

Re: Sliding Windows

2014-04-30 Thread Leif
Since you already like clojurewerkz EEP, why not just add a time-sliding window to it? --Leif On Wednesday, April 30, 2014 5:13:42 PM UTC-4, Paulo Suzart wrote: > > Humm. Actually narretor flushes all messages. Still not what I'm looking > for somethiing like this: > http://d

Re: require and jtransforms

2014-04-30 Thread Leif
e Maven coordinates and the Java package names are not necessarily the same or even similar. --Leif On Wednesday, April 30, 2014 11:40:31 AM UTC-4, Alan Forrester wrote: > > I would like to try the JTransforms Java FFT library from Clojure: > > https://sites.google.com/site/piotrwendykier/s

Re: Clojure Office Hours

2014-04-24 Thread Leif
q=https%3A%2F%2Fucb.youcanbook.me%2F&sa=D&sntz=1&usg=AFQjCNGoo6exDmYGhdu-4qu3L9tL2v8AkQ> Best wishes, Leif On Thursday, April 10, 2014 8:53:26 AM UTC-4, Leif wrote: > > Hi, everybody. Inspired by the SF Bay Area clojure group, ClojureBridge, > and the great talks on community e

Clojure Office Hours - Experience Report and Future Plans

2014-04-24 Thread Leif
ers" picking up clojure for a specific reason or library can have a more productive session. E.g. some descriptions could read: Leif Poorman Location: Eastern USA Languages: en Tags: beginners, absolute beginners, web, data analysis, machine learning Rich Hickey (obviousl

Re: Style question (predicates)

2014-04-17 Thread Leif
e the code calling the predicate, only the getter fn (if that), --Leif On Thursday, April 17, 2014 12:33:42 PM UTC-4, Sean Corfield wrote: > > The library coding standards[1] say: > > * Use '?' suffix for predicates. > - N.B. - predicates return booleans > > a

Re: Clojure Office Hours

2014-04-17 Thread Leif
probably just silent because the time difference is so large; So, I definitely think some European / African / Asian / Australian clojure devs' office hours would be popular. It's fun, and you might find some people to hire, if that's your thing! --Leif On Thursday, April 17, 2

Re: Clojure Office Hours

2014-04-15 Thread Leif
@Everyone: To clarify / reiterate: You do *not* need a plan, a project, or a specific problem. If you want to work through Project Euler, 4clojure, clojure-koans, the ClojureBridge materials, some other clojure tutorial, or just play it by ear, I am happy to try it out. --Leif On Tuesday, A

Re: Helping newcomers get involved in Clojure projects

2014-04-15 Thread Leif
ing they do this even for non-"code blows up" errors, they must make a list of common mistakes and the output generated by those mistakes (which to do correctly would require lots of user testing). --Leif On Saturday, January 25, 2014 1:54:10 PM UTC-5, Bridget wrote: > > Ope

Re: Helping newcomers get involved in Clojure projects

2014-04-14 Thread Leif
uot;; #{"documentation"}] ["https://github.com/michaelklishin/neocons"; #{"usability" "documentation"}] ["https://github.com/michaelklishin/quartzite"; #{"documentation"}] ["https://github.com/cfpb/qu"; #{"docs"}] [&

Re: Clojure Office Hours

2014-04-10 Thread Leif
ood! Of course, now I'll have to take some time this weekend and try to actually understand Om. :) (or maybe ?o_0? ) --Leif On Thursday, April 10, 2014 9:56:37 AM UTC-4, frye wrote: > > Sounds great. I just sent a request. > > Tim Washington > Interruptsoftware.com &l

Re: Advice for building backend REST services from scratch using clojure

2014-04-10 Thread Leif
work queues and distributed caches and such, you might want to use Immutant as a platform to prototype, as it wraps all that up with a nice bow for you. And again, if you narrow the design space somewhat, many people way more informed than me will probably chime in. Hope that helps, Leif On Thu

Clojure Office Hours

2014-04-10 Thread Leif
s://leifpoorman.youcanbook.me/ Note: all the times are evening, US Eastern. That pretty much limits it to the western hemisphere and any east asian friends that want to do some morning hacking. Eastern hemisphere friends, make noise on this thread, and maybe some brave European/Asian cloju

Re: How do I update a record in a vector, matching certain criteria?

2014-04-08 Thread Leif
idate your feeling that this shouldn't be a one-liner; you can generalize 'set-item-name', and then if you do want to change the data structure later, you only have to change the general function. --Leif On Tuesday, April 8, 2014 7:10:13 PM UTC-4, Ivan Schuetz wrote: > >

Re: [ANN] dag-runner -- automatically aggregate and execute functions that depend upon each other

2014-04-07 Thread Leif
, one good design decision that you may want to borrow is separating the graph construction, compilation, and execution phases. Cheers, Leif On Monday, April 7, 2014 7:03:48 PM UTC-4, Hesen Peng wrote: > > > Hi everybody, > > You might have experienced writing up multiple functio

Re: [ANN] Taoensso library updates / Apr 2014

2014-04-07 Thread Leif
Very nice. Thanks for all your hard work, Peter! On Monday, April 7, 2014 11:52:31 AM UTC-4, Peter Taoussanis wrote: > > Hi all, quick batched update on some libs that I put out. Hope someone > finds these useful. As usual, API docs are available on each GitHub page. > > Have fun, cheers :-) > >

Re: Clojure/West 2014 Videos

2014-03-25 Thread Leif
Wow! Great job! Of course, with the bar set so high, this means that every clojure conference will have to be live-streamed from now on ;) On Tuesday, March 25, 2014 8:46:50 AM UTC-4, Ustun Ozgur wrote: > > Looks like most of the videos at Clojure/West 2014 which started yesterday > have been

Re: XOR two arrays into a third on Clojure

2014-03-13 Thread Leif
meone else with a byte-munging specific library, if that exists) has done. --Leif On Thursday, March 13, 2014 7:42:35 AM UTC-4, Leif wrote: > > Hi, Ignacio. > > Performance tuning in clojure being somewhat complicated, I would look for > prior art here. For instance, the suggestions

Re: XOR two arrays into a third on Clojure

2014-03-13 Thread Leif
dling. I would look/ask around. If you're interested, the main slowdown in the above suggestions is probably the extra work from safe typecasts clojure does. The hiphip library uses the unsafe equivalents from clojure.lang.RT. Cheers, Leif On Thursday, March 13, 2014 1:26:33 AM UTC-4, I

Re: Working with big datasets, merging two ordered lists by key

2014-03-10 Thread Leif
You may want to try the naive approach: 400k records sounds like it could very well fit into memory, as long as each record doesn't have a huge amount of data. 4. A library that has tools to deal with big files: https://github.com/kyleburton/clj-etl-utils --Leif On Monday, March 10, 20

Re: [ANN] durable-queue: an in-process disk-backed queue

2014-03-09 Thread Leif
st if data is actually being synced to disk at my specified interval? Please forgive my suspicious nature, Leif On Friday, March 7, 2014 4:21:44 PM UTC-5, Zach Tellman wrote: > > I added the above-described features a few weeks back, but only got around > to marking 0.1.1 today. Fsy

Re: How to replace code inside a macro

2014-03-05 Thread Leif
up `(macrolet [~defpop-decl] (defn execute [~x] ~body Hope that helps, Leif On Wednesday, March 5, 2014 12:37:24 PM UTC-5, milinda wrote: > > Thanks Konrad. Your unquoting trick worked. But I am not exactly sure how > to reason about these types of situations. Can you please

Re: Grouping a list by 'sublists'..

2014-02-17 Thread Leif
re you want directly. Happy coding, Leif On Monday, February 17, 2014 5:50:13 PM UTC-5, Joerg wrote: > > Hi, > > From a for-function over some xml-input (filtered and mapped), I get this > list: > > ("ITEM2" ["ITEM1"] ["B"] "A" "ITEM1

Re: stch.schema a Prismatic Schema fork

2014-02-06 Thread Leif
n't expand special form > (macroexpand '(stch.schema/fn* simple-fn :- Int [x :- Int] (inc x))) ; => (let* [ufv__ stch.schema.util/use-fn-validation ...) ; works --Leif On Thursday, February 6, 2014 2:18:58 PM UTC-5, da...@dsargeant.com wrote: > > Please check out the repo README page

Re: Why do I get stackoverflow error?

2014-02-03 Thread Leif
As Mars0i says below, this is due to concat; more specifically, since map, partition, and concat all return lazy sequences, with recursion you are constructing a large chain of nested lazy sequences, as explained here: http://stackoverflow.com/questions/5294055/why-am-i-getting-a-stackoverflow

Re: Question on Sequences

2013-11-17 Thread Leif
b.com/ztellman?tab=repositories (potemkin, clj-tuple, immutable-bitset, et al) Hope that helps, Leif On Saturday, November 16, 2013 7:01:14 PM UTC-5, Alexandru Nedelcu wrote: > > Hi, > > I'm trying to understand the design of Clojure's collections and one > thing th

Re: Name of graphing library

2013-11-11 Thread Leif
Maybe vijual? https://github.com/drcode/vijual Development seems to have stopped, but one of the forks might be up-to-date enough for you. On Monday, November 11, 2013 9:51:19 AM UTC-5, Tim Visher wrote: > > This smacks of something that I saw in a Stu Halloway talk once. I > also can't rememb

Re: Fast path to having fun with ClojureScript

2013-10-28 Thread Leif
. Is there a list somewhere of "Javascript gotchas that you still have to worry about in Clojurescript"? Thanks to all the clojurescript devs, Leif On Monday, October 28, 2013 12:25:31 AM UTC-4, David Nolen wrote: > > Given the source map improvements to ClojureScript, now is a good

Re: How to generalize these functions

2013-10-02 Thread Leif
[x y] y) a b)) ;; bonus: also useful for fns that don't return a map (defn max-depth [m] (->> m flatten (map (comp count first)) (apply max 0))) I think these fns are the same as yours. I have not tested them in any significant way, though. I am also not think

Re: Best way to pass through named arguments (destructured map)?

2013-09-09 Thread Leif
;(:in [1 2 3]). This appears within Alex's solution. I would personally go with Meikel's solution, though. It seems the nicest. --Leif On Monday, September 9, 2013 7:02:43 PM UTC-4, Mark Mandel wrote: > > The solution I've actually gone with is: > > (apply esd/sear

Re: Seeking advice on a safe way to mock/stub fns

2013-03-26 Thread Leif
's (f x logger emailer metric-logger ...) 4. I'm not really familiar with the methods you describe, so any elaboration on your comments would be welcome. Or even better, a link to a project that uses the designs you mentioned. Thanks, Leif On Monday, March 25, 2013 5:57:34 AM UTC-4,

Re: Seeking advice on a safe way to mock/stub fns

2013-03-26 Thread Leif
Hi, Allen. My own version of with-redefs? That *sounds* kind of hard. Could you keep an atom with the "original" bound value (the first one my-with-redefs sees, anyway) and then always roll back to that value? Something like that? Thanks, Leif On Monday, March 25, 2013 1:58:5

Re: (load "hello") can't see hello.clj in the current directory.

2013-03-26 Thread Leif
quot;." in this case probably means "look in the root of all directories on the classpath." (I'm guessing; Java experts speak up.) --Leif On Tuesday, March 26, 2013 12:25:43 PM UTC-4, MC Andre wrote: > > I tried setting *compile-path* to ".", but Clojure st

Re: Which is the most idiomatic way to go

2013-03-24 Thread Leif
trust your instincts on this one. :) --Leif On Sunday, March 24, 2013 8:24:53 AM UTC-4, Ryan wrote: > > Hello all, > > I am trying to figure out which is the most idiomatic way to go in a > project I am doing. I've noticed the following pattern in my code and I > sta

Seeking advice on a safe way to mock/stub fns

2013-03-24 Thread Leif
integration tests that ran permanently rewrote some fns. I would imagine that this could even happen in unit tests, though, if your test runner executed tests in parallel. Has anyone run into a similar problem, and come up with a safer way of stubbing / mocking non-dynamic vars? Thanks, Leif

Re: Clojure Performance For Expensive Algorithms

2013-02-23 Thread Leif
This may be slightly off topic, but your "longest contiguous common subsequence" problem sounds like the "longest common substring" problem. Your code uses the dynamic programming solution, which is O(M*N), but there are O(M+N) algorithms that might be faster depending on the length and "alpha

Re: another n00b defrecord combination question

2012-12-16 Thread Leif
uot;, :id "P-678", :iid 3, :product "P-678", :quantity 1, :purchased true, :iname "Shirt"} ...} It might look even nicer if you just used regular maps with namespaced keys instead of records: (clojure.set/join items products {:item/product :product

Re: is this a problem for clojure.contrib.dataflow? Or something else?

2012-08-20 Thread Leif
+1. I know of a couple tools in python for this purpose that are called "workflow management systems." It would be good to know if there is a robust one in clojure. On Monday, August 20, 2012 12:18:54 AM UTC-4, matt hoffman wrote: > > I have a problem that I'm trying to figure out how to tack

Re: Implemented isa? as a protocol, makes multimethods more open

2012-07-17 Thread Leif
- Slow. If you're dispatching to a fn that runs for > 10ms, it's not a huge problem. But, yeah, it's a lot slower than any other kind of dispatch. But if you're doing dispatch this complicated, the speedy alternative is giant nested cond and case statements. A

Re: Implemented isa? as a protocol, makes multimethods more open

2012-07-14 Thread Leif
od example of testing code that modifies global state? Right now I'm adding multimethods and derive-ing things, extending protocols, etc.. I'd like to make sure tests don't interfere with each other. This might all be off topic. Should I start a new thread (or two)? --Leif On Sa

Re: Implemented isa? as a protocol, makes multimethods more open

2012-07-10 Thread Leif
of subtyping between maps in Typed Clojure, where > > {:a 1, :b 2} <: {:a Number} > > Thanks, > Ambrose > > On Wed, Jul 11, 2012 at 2:16 PM, Leif wrote: > >> Hi, everybody. I reimplemented the function isa? in terms of a protocol >> Is-A. >> >

Implemented isa? as a protocol, makes multimethods more open

2012-07-10 Thread Leif
omes, to a certain extent, open. See the README. Comments, critique, code, and questions welcome. Cheers, Leif P.S. As an aside to people that like weird, obscure programming languages, the rough idea of how is-a? should work for maps was inspired by (but very much simpler than) the functi

Re: Jade / Jade4J

2012-07-05 Thread Leif
I know this doesn't answer your question, but why are you contemplating using Jade in Clojure, instead of Hiccup or Enlive, which seem like better markup solutions (for different reasons)? Is it just for the sake of uniformity throughout your codebase? On Wednesday, July 4, 2012 10:32:17 PM UT

Re: Reducers

2012-06-27 Thread Leif
is will start some discussion. I really think that single elements are the place to bottom out the recursion. On Sunday, May 20, 2012 3:24:57 PM UTC-4, Leif wrote: > > From the article: "The combining fn must supply an identity value when > called with no arguments" This

Re: Buggy FP behavior with Clojure 1.3

2012-06-25 Thread Leif
23 and also equal to Double.longBitsToDouble(0x7fefL). " To explain the decimal exponent, user> (/ (Math/log 10) (Math/log 2)) 3.3219280948873626 user> (/ 1024 3.3219280948873626) 308.2547155599167 --Leif On Tuesday, June 26, 2012 12:19:49 AM UTC-4, Cedric Greevey w

Re: Reducers

2012-05-20 Thread Leif
on []) ;==> throws ArityException It might fix things to special-case empty collections and make the "leaves" of the recursion single elements, but maybe functions with these weird non-computable identity elements, like set intersection, are too rare to bother. I can't think of ano

Re: == is not always transitive

2012-04-11 Thread Leif
I'd also like to make sure people are aware of this oddity. I discovered this after reading an article about the bad design of PHP. I read that in PHP, "== is not transitive." I thought "Ha ha ha, that ridiculous PHP!" Then I checked c.c/== ; Imagine my reaction when I learned that Clojure

Re: Problems with map of empty collections

2012-04-05 Thread Leif
ast property that causes the weird behavior for maps and sets. --Leif On Tuesday, April 3, 2012 12:11:50 AM UTC-7, JuanManuel Gimeno Illa wrote: > > Playing with some problems of 4clojure, I wanted to make a map which, for > each empty collection, returns a keyword. But it seems that it

Re: into applied to transient vectors undocumented?

2012-03-22 Thread Leif
Huh. That raises the question "Why doesn't clojure.lang.ITransientCollection extend clojure.lang.IEditableCollection, so the .asTransient method is idempotent?" Would that make a circular reference? --Leif On Tuesday, March 20, 2012 3:32:28 PM UTC-7, Andy Fingerhut wrote: &g

Re: How to escape a space in a keyword?

2012-03-07 Thread Leif
Unfortunately, the reader does not actually follow this spec, e.g. it will happily accept :div#id.cla$$ as a valid keyword. Some web programming clojure[script] libraries use this pseudo-CSS syntax in keywords, so if the reader was changed to strictly follow these rules, a lot of web code woul

Re: Python is way faster than Clojure on this task

2010-11-10 Thread Leif Walsh
t;> > Sent from my iPod Shufflehttp://pepijndevos.nl > > -- > 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 moderat

Re: Macro help

2010-11-08 Thread Leif Walsh
members are moderated - please be patient with >>> your first post. >>> To unsubscribe from this group, send email to >>> clojure+unsubscr...@googlegroups.com >>> For more options, visit this group at >>> http://groups.google.com/group/clojure?hl=en > &g

Re: Resources on optimizing Clojure code

2010-11-03 Thread Leif Walsh
to > clojure+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/clojure?hl=en -- Cheers, Leif -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to

Re: Constructing Nested Trees and Memory Consumption

2010-11-03 Thread Leif Walsh
l > > -- > 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