Re: Custom vectors/maps and sequence functions

2019-01-16 Thread Herwig Hochleitner
Am Do., 17. Jan. 2019 um 00:52 Uhr schrieb Herwig Hochleitner < hhochleit...@gmail.com>: > 5. I could attach table like descriptions to each Record object (be it in >> its metadata or else), but then enforcing that all Records share the same >> Table data could get

Re: Custom vectors/maps and sequence functions

2019-01-16 Thread Herwig Hochleitner
Am Di., 15. Jan. 2019 um 14:58 Uhr schrieb : > > Imagine I try on the one side to represent something like a database table > in memory, while on the other to make it pluggable into all meaningful > sequence and vector/map functions in Clojure. In the most naive > implementation a table is a

Re: Await on agent triggers watch functions

2019-01-08 Thread Herwig Hochleitner
Am Mo., 7. Jan. 2019 um 17:40 Uhr schrieb Oleksandr Shulgin < oleksandr.shul...@zalando.de>: > > I also see that the add-watch documentation says that the watch functions > are called "whenever the reference's state *might* have been changed", but > I just wonder if this is worth documenting. >

Re: Await on agent triggers watch functions

2019-01-07 Thread Herwig Hochleitner
Am Mo., 7. Jan. 2019 um 11:20 Uhr schrieb Oleksandr Shulgin < oleksandr.shul...@zalando.de>: > > Is it intended that calling `await` on an agent triggers the watch > functions? > > From the implementation side I can see why this is the case, but cannot > find if this is documented as intended

[ANN] data.xml 0.2.0-alpha6

2018-11-24 Thread Herwig Hochleitner
data.xml is a Clojure contrib library that parses and emits XML. Github: https://github.com/clojure/data.xml Changelog: https://github.com/clojure/data.xml/blob/master/CHANGES.md Information on updating the dependency is here . 0.2.0-alpha6

Re: [ANN] Clojure 1.10.0-beta2

2018-10-10 Thread Herwig Hochleitner
What's datafy and why is it first appearing in a "feature complete" -beta2 release? -- 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

Re: clojure automation

2018-09-25 Thread Herwig Hochleitner
Your question leaves me unsure of what exactly you are trying to achieve, but this article might help: https://github.com/jonase/mlx/wiki/Reading-csv-files-with-data.csv -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send

Re: If Clojure is to blame for the majority of the startup time, why doesn't ClojureScript proportionally slow down the JavaScript startup time also?

2018-02-01 Thread Herwig Hochleitner
2018-02-01 3:24 GMT+01:00 scott stackelhouse : > CRIU seems like it could actually help in this case. In particular, > paired with Docker, I can just restart from a known good checkpoint with > editor loaded, repl up and connected, etc. That would be very nice. >

Re: If Clojure is to blame for the majority of the startup time, why doesn't ClojureScript proportionally slow down the JavaScript startup time also?

2018-01-28 Thread Herwig Hochleitner
With the help of criu [1], I can get clojure's startup time on jdk 1.8 down to around 300 - 350 ms [2] This could be considered cheating, because it only works on linux with `CONFIG_CHECKPOINT_RESTORE=y`, but it also demonstrates, what can be achieved with kernel support. [1] https://criu.org/

Re: [ANN] data.xml 0.2.0-alpha5

2017-11-14 Thread Herwig Hochleitner
2017-11-14 15:33 GMT+01:00 Alex Miller : > Although it looks like that call is intentionally reflective to cover > several possible types. Probably need to solve that with a cond to check > for and hint the actual type at the point of the call. > Yep, see the corresponding

Re: [ANN] data.xml 0.2.0-alpha5

2017-11-14 Thread Herwig Hochleitner
2017-11-14 4:03 GMT+01:00 Alan Thompson : > I seem to still be getting the JDK 1.9 reflection warning: > > > ~/tupelo > grep data.xml project.clj > [org.clojure/data.xml "0.2.0-alpha5"] > > > lein test > lein test tst.tupelo._bootstrap > >

[ANN] data.xml 0.2.0-alpha5

2017-11-13 Thread Herwig Hochleitner
data.xml is a Clojure contrib library that parses and emits XML. Github: https://github.com/clojure/data.xml Changelog: https://github.com/clojure/data.xml/blob/master/CHANGES.md Information on updating the dependency is here . 0.2.0-alpha5

[ANN] data.xml 0.2.0-alpha3

2017-09-26 Thread Herwig Hochleitner
data.xml is a Clojure contrib library that parses and emits XML. Github: https://github.com/clojure/data.xml Changelog: https://github.com/clojure/data.xml/blob/master/CHANGES.md Information on updating the dependency is here . 0.2.0-alpha3

Re: Migrating nREPL out of Clojure Contrib

2017-07-21 Thread Herwig Hochleitner
2017-07-18 14:48 GMT+02:00 Chas Emerick : > I would like to hear here (no more private mails, please! :-) from any nREPL users, contributors, etc. As much as possible, I would like not to debate/re-litigate the merits of contrib and its process here; let's focus on what steps

Re: The soul of case

2017-06-18 Thread Herwig Hochleitner
I was pretty horrified, when this crossed my timeline. Thanks, Phil, for starting this thread, because I'd already forgotten about it. First thing that seems strange, is, that the blog post is from 2015. Nevertheless, I just tried it on a nashorn repl: cljs.user> *clojurescript-version*

Re: slackpocalypse?

2017-05-23 Thread Herwig Hochleitner
2017-05-23 23:04 GMT+02:00 Colin Fleming <colin.mailingl...@gmail.com>: > On 24 May 2017 at 00:13, Herwig Hochleitner <hhochleit...@gmail.com> > wrote: > >> I doubt the whole community would want to move anywhere from Slack. >> > > Perhaps this will have t

Re: slackpocalypse?

2017-05-23 Thread Herwig Hochleitner
2017-05-23 12:19 GMT+02:00 Colin Fleming : > I doubt the whole community would want to move there from Slack > I doubt the whole community would want to move anywhere from Slack. my main requirements are that a) people can find me easily, b) everything > works with

Re: slackpocalypse?

2017-05-23 Thread Herwig Hochleitner
2017-05-22 15:50 GMT+02:00 Gregg Reynolds : > > Took a closer look - now I remember where I saw matrix before, they > participate in tadhacks . It's not really an > app, much more ambitious than that. Definitely deserves a closer look. > Yes, it's

Re: slackpocalypse?

2017-05-22 Thread Herwig Hochleitner
2017-05-22 0:28 GMT+02:00 Gregg Reynolds : > > Took a quick look. I must say the UI is not particularly impressive. So > far, I find discord much more intuitive. > If discord was decentralized _and_ open source, then I'd say we could have this comparison. As it is, I'd

Re: slackpocalypse?

2017-05-19 Thread Herwig Hochleitner
As I said in the other thread, let's migrate to matrix.org: https://riot.im/app/#/room/#clojure:matrix.org There, if the official servers ever get overloaded/dropped/monetized, we can just start hosting our own server without loosing any history. Also it has no message limit and full

Re: slackpocalypse? (Alternatives to Slack like Matrix.org)

2017-05-19 Thread Herwig Hochleitner
In any such discussion, I'll heavily favor matrix.org. To me, decentralization seems inevitable and I hope that it will already carry, what marketers will be calling web 3.0. Current matrix.org infrastructure is only semi-decentralized (similar to xmpp), but the data model is already built with

Re: with-open pattern

2017-05-05 Thread Herwig Hochleitner
2017-05-04 19:35 GMT+02:00 Brian Craft : > > If there's only one with-open it can be reasonably simple to pass the > consumer into that context (though from ring it's pretty convoluted, due to > needing to pass control to ring first). > Creating streamed ring responses can

Re: Rust intro for Clojurists

2017-04-30 Thread Herwig Hochleitner
2017-04-30 2:24 GMT+02:00 Alan Thompson : > https://gist.github.com/oakes/4af1023b6c5162c6f8f0 > ,,Many people try to compare Rust to Go, but this is flawed. Go is an ancient board game that emphasizes strategy.'' This made me actually LOL. Instant classic! Please write

Re: Dependency issue? "No such namespace: clojure.edn"

2017-03-18 Thread Herwig Hochleitner
2017-03-18 16:15 GMT+01:00 Jennifer Parsons : > No such namespace: clojure.edn, could not locate clojure/edn.cljs, > clojure/edn.cljc, or Closure namespace “ The error message indicates, that a ClojureScript file tries to load clojure.edn, when that namespace is

ensure causes more contention than ref-set [Was: Ensure more concurrency]

2017-03-09 Thread Herwig Hochleitner
2017-03-09 12:34 GMT+01:00 'bertschi' via Clojure : > Thanks for your comments. As suggested I ran a small benchmark of both > versions. Turns out that the difference between (ref-set ref @ref) and > ensure is huge ... > I'm running clojure 1.8.0 by the way. According to

Re: clj-bigml

2017-03-08 Thread Herwig Hochleitner
2017-03-08 3:30 GMT+01:00 Myriam Abramson : > > Is this project still maintained? Does anyone want to fork it to bring > it up-to-date? Do you have a reason to believe it's unmaintained? Doesn't it work against the latest BigML API? A good way to learn about questions like

Re: Ensure more concurrency

2017-03-08 Thread Herwig Hochleitner
2017-03-06 12:06 GMT+01:00 'bertschi' via Clojure : > From the docs it says "Allows for more concurrency than (ref-set ref @ref)". > I would read that as "runs at least as fast as (ref-set ref @ref)", but > using (ref-set dogs @dogs) instead of (ensure dogs) and the same

Re: Application silently shuts down by itself after running for some hours

2017-03-08 Thread Herwig Hochleitner
2017-03-08 9:00 GMT+01:00 JokkeB : > Now tracking down if I'm simply too low on memory or if the app has a > memory leak, but that's a different topic. > Your app may well be fine. The OOM killer removes processes in descending order of memory usage, when RAM runs out. As

Re: Contribute Specter to Clojure core?

2017-03-04 Thread Herwig Hochleitner
2017-03-05 0:25 GMT+01:00 Didier : > I'm not too sure what the contribs are. Are they simply packages maintained > by the Clojure team itself, or are they actually part of the standard > library? As I understand it, they aren't any more sanctioned than any third-party library,

Re: Contribute Specter to Clojure core?

2017-02-14 Thread Herwig Hochleitner
How about making specter into a contrib library?​ -- 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.

Re: User input validations, design doubt

2017-02-08 Thread Herwig Hochleitner
Of course, for performance you can optimize that apply+hash-map+interleave (or even your reduce) into reduce+transients, e.g. by using map-vals .​ -- You received this message because you are

Re: User input validations, design doubt

2017-02-08 Thread Herwig Hochleitner
2017-02-08 23:14 GMT+01:00 Rastko Soskic : > (let [fns [(fn ([] :empty) ([x] "x")) (fn ([] :format) ([y] "y"))] val > "field value"] > (reduce #(assoc % (%2) (%2 val)) {} fns)) The advantage in this approach is that you can get the keys from a set of validators, but you still

Re: A more mathematical kind of set object in clojure

2017-01-29 Thread Herwig Hochleitner
2017-01-29 21:15 GMT+01:00 Michael Lindon : > Not quite what I'm looking for. There is an assigment in the Functional > Programming in Scala coursera course called "funsets" - purely functional > sets. A set is defined by its characteristic functions (a predicate) and

Re: A more mathematical kind of set object in clojure

2017-01-28 Thread Herwig Hochleitner
core.logic's CLP(FD) extensions, for finite domains, might also suit your needs: https://github.com/clojure/core.logic/wiki/Features#clpfd​ -- 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

Re: A more mathematical kind of set object in clojure

2017-01-28 Thread Herwig Hochleitner
There is a talk by Alex Engelberg about constraint solvers and his clojure interface to one of them: https://github.com/aengelberg/loco https://www.youtube.com/watch?v=AEhULv4ruL4 I'm not quite familiar with it, but maybe it's relevant to your requirements. ​ -- You received this message because

Re: [ANN] data.xml 0.2.0-alpha1

2017-01-02 Thread Herwig Hochleitner
2017-01-02 15:29 GMT+01:00 Matching Socks : > Whereas RFC3986 presents a bunch of options, the W3C has chosen one for > use with XML: > > "Namespaces in XML 1.0 (Third Edition)", section 2.3 > https://www.w3.org/TR/REC-xml-names/#NSNameComparison > > 2.3 Comparing URI

Re: [ANN] data.xml 0.2.0-alpha1

2017-01-01 Thread Herwig Hochleitner
2017-01-01 17:16 GMT+01:00 Matching Socks : > I would expect keywordized namespaces and URIs to agree about equality. > But alpha2's keywordization makes significant the case of %xx hex notation, > which in URIs is not significant. > > user> (let [u1

Re: [ANN] data.xml 0.2.0-alpha1

2016-12-29 Thread Herwig Hochleitner
2016-12-29 15:42 GMT+01:00 Francis Hitchens : > ... to generate my flattened representation of the XML document that I am > putting into a text table to allow testers to easily set values int the > documents as part of their testing... > For that use case, just put the

Re: [ANN] data.xml 0.2.0-alpha1

2016-12-29 Thread Herwig Hochleitner
2016-12-29 15:42 GMT+01:00 Francis Hitchens : > Herwig, > > Thanks, I upgraded. The tip about the reader was very useful. So I can now > pass a string representation of my element tag like so and it works... > > (zx/xml1-> zipper >(zx/tag= (eval (read-string

[ANN] data.xml 0.2.0-alpha2

2016-12-24 Thread Herwig Hochleitner
data.xml is a Clojure contrib library that parses and emits XML. Github: https://github.com/clojure/data.xml Changelog: https://github.com/clojure/data.xml/blob/master/CHANGES.md Information on updating the dependency is here .

Re: [ANN] data.xml 0.2.0-alpha1

2016-12-24 Thread Herwig Hochleitner
Sorry for the late response, I had to finish 0.2.0-alpha2, in order to present you with the final API for constructing qnames. Please upgrade. ​::can/mqMessageHeader is a purely syntactic shorthand, which gets expanded by the reader to whatever 'can aliases to in the current namespace. Apparently

Re: [ANN] data.xml 0.2.0-alpha1

2016-12-21 Thread Herwig Hochleitner
2016-12-22 5:23 GMT+01:00 Francis Hitchens : > > Hi Herwig, > > Thanks for the quick response. So I upgraded to the latest version and now > I see my tags represented not as QName Java objects but as horribly long > keywords like so... > >

Re: [ANN] data.xml 0.2.0-alpha1

2016-12-20 Thread Herwig Hochleitner
Hi Francis, first off: if you can afford it, I'd recommend working with the 0.2.0 series, as the 0.1.0 namespace api is legacy. In the 0.2.0 series, the mapping of keyword prefix to xmlns is unique and fixed, so names are always parsed as keywords (though QName instances still are permitted for

[ANN] data.xml 0.2.0-alpha1

2016-12-13 Thread Herwig Hochleitner
data.xml is a Clojure contrib library that parses and emits XML. Github: https://github.com/clojure/data.xml Changelog: https://github.com/clojure/data.xml/blob/master/CHANGES.md Information on updating the dependency is here . The major

[ANN] data.xml 0.1.0-beta3

2016-12-05 Thread Herwig Hochleitner
data.xml is a Clojure contrib library that parses and emits XML. Github: https://github.com/clojure/data.xml Changelog: https://github.com/clojure/data.xml/blob/master/CHANGES.md Information on updating the dependency is here .

Re: [ANN] Clojure 1.9.0-alpha13

2016-09-29 Thread Herwig Hochleitner
https://github.com/laurentpetit/ccw.server/pull/1 2016-09-29 14:37 GMT+02:00 Alex Miller : > I think the problem is not on the :or but on the :keys which is being > passed a set rather than a sequential? > > -- > You received this message because you are subscribed to the

Re: Parsing namespaced XML with clojure.data.xml

2016-09-28 Thread Herwig Hochleitner
http://dev.clojure.org/jira/browse/CLJ-2030 ​ -- 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

Re: Parsing namespaced XML with clojure.data.xml

2016-09-28 Thread Herwig Hochleitner
So, your comment about using uri-encoding inspired me to just use that as an encoding to fit in a kw-ns. It seems to work out: https://github.com/bendlas/data.xml/commit/22cbe21181175d302c884b4ec9162bd5ebf336d7 There is a couple of open issues, that I commented on the commit. ​ I'll open a

Re: Parsing namespaced XML with clojure.data.xml

2016-09-24 Thread Herwig Hochleitner
What about skipping the alphabet translation and just doing uri encoding? {http://www.w3.org/1999/xhtml}pre => :http%3A%2F%2Fwww.w3.org %2F1999%2Fxhtml/pre doesn't seem so bad and this way we would get uniformity without weird corner cases. -- You received this message because you are

Re: Parsing namespaced XML with clojure.data.xml

2016-09-17 Thread Herwig Hochleitner
2016-09-17 15:10 GMT+02:00 Matching Socks : > To make a URI into a Clojure keyword namespace, we may simply replace > the 11 URI characters that are forbidden or problematic in keywords > with Unicode-alphabetic characters outside Latin-1. > Yep, I've been thinking along

Re: Parsing namespaced XML with clojure.data.xml

2016-08-28 Thread Herwig Hochleitner
2016-08-25 1:53 GMT+02:00 Matching Socks : > Namespaced XML is inherently value-comparable and unambiguous. It would > be shame to give up on that, and disperse the burden throughout every layer > of library and consumer. > That's a very good point. Disregarding concerns

Re: Parsing namespaced XML with clojure.data.xml

2016-08-22 Thread Herwig Hochleitner
I've been thinking this over. I'm starting feel that you are right in that the arbitrary, global mapping could cause more problems, than it would solve. Even if we could get by with a maintained registry, it would still be a burden to maintain and to use. Also, there is the open question of code

Re: Parsing namespaced XML with clojure.data.xml

2016-08-21 Thread Herwig Hochleitner
2016-08-20 21:43 GMT+02:00 Matching Socks : > > Could the same effect be obtained without the global state of namespace > mappings? Do all uses of clojure.data.xml in an app, even fully > encapsulated uses, have to agree about the keyword for any given well-known > XML

Re: Is this behavior of clojure.core/pr a bug?

2016-08-04 Thread Herwig Hochleitner
2016-08-04 13:56 GMT+02:00 Timothy Baldridge : > The problem is that many do not understand that Clojure data is a superset > of EDN. The two were never meant to be completely compatible. There are > many things, especially when dealing with keywords and symbols, where its >

Re: Is this behavior of clojure.core/pr a bug?

2016-08-04 Thread Herwig Hochleitner
2016-08-04 1:41 GMT+02:00 Timothy Baldridge : > I highly suggest using transit. It's much faster and formally specified. > https://github.com/cognitect/transit-format > > It's issues like this that caused the creation of transit in the first > place. > I thought transit

Re: [ANN] cljsee 0.1.0

2016-06-14 Thread Herwig Hochleitner
+1 thanks for releasing that. I've been thinking about doing this also as a maven plugin. That might help finally getting .cljc accepted in contrib projects. ​ -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to

Re: why is it so annoying to run clojure code

2016-06-09 Thread Herwig Hochleitner
Leiningen is a tool external to clojure, that has project automation in mind. The equivalent to `python script.py` would be `java -jar clojure.jar -i script.clj`. -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to

Re: [ANN] Clojure 1.9.0-alpha5

2016-06-09 Thread Herwig Hochleitner
2016-06-09 15:32 GMT+02:00 Alex Miller : > > "lein deps :tree" is a good place to start, but it doesn't tell you what's > actually inside the jars. There used to be a Maven plugin that would track > down multiple class definitions across the dependency classpath, can't >

Re: reader conditional not handling defmacro?

2016-05-22 Thread Herwig Hochleitner
This thread just came up, while I was in the process of composing a mail on this topic to clojure-dev: https://groups.google.com/d/msg/clojure-dev/f6ULUVokXrU/3uue5okSAgAJ 2016-05-20 23:22 GMT+02:00 Dan Burton : > What about something like > > (def obj #?(:clj Object

Re: Transducers improve performance more than expected

2016-05-08 Thread Herwig Hochleitner
My theory has been, that transducer stacks inline much better, hence allow for more optimizations by the jit. In particular I suspect that escape analysis works better on them, so the compiler can even move some of the remaining allocations to the stack. To verify this, try running with

Re: Gettext key extraction through macro

2016-03-04 Thread Herwig Hochleitner
Back whenI implemented a solution for finding translatable strings from macros, I emitted the table from a repl. Not an optimal solution, but the project was small enough. As you want to automate, I see two solutions: 1. Write the translatable strings out to a file, line-by-line, as you encounter

Re: No eval in ClojureScript!?

2016-02-13 Thread Herwig Hochleitner
ru, eval is there in clojurescript. It's just in a separate namespace. This is a good thing, because it leads to big space savings in the regular case. ​ -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to

Re: Scripting with Clojure / "slow" boot time

2016-02-10 Thread Herwig Hochleitner
2016-02-10 13:06 GMT+01:00 Gary Verhaegen : > Please excuse the very naive question, but if the main problem seems to be > compilation of loaded namespaces, what about aot? Does it help at all? If > not, why? As far as I understand the problem, it does help a little

Re: How is the emphasis of “data over code” different than the XML advocacy of the early 2000s?

2016-02-03 Thread Herwig Hochleitner
2016-02-03 0:36 GMT+01:00 kovas boguta : > > Out-of-band schemas/assumptions or automagic inference are incidental > complexity to deal with the fact that XML cannot directly represent the > concepts that algorithms want to deal in. This is the point I was making >

Re: How is the emphasis of “data over code” different than the XML advocacy of the early 2000s?

2016-02-02 Thread Herwig Hochleitner
2016-02-02 20:41 GMT+01:00 kovas boguta : > XML is data, but its data that thwarts easy manipulation from a > programming language. It doesn't cleanly map onto computational concepts. > How so? I mean, rolling key-value access and positional access into a single

Re: The empty string can become a symbol, but it can't be resolved

2016-02-02 Thread Herwig Hochleitner
While there is no reader syntax for the empty symbol, I agree that the StringIndexOutOfBoundsException is wonky and should be fixed. Though some might view it as a consequence of clojure's GIGO philosophy, I don't concur with such arguments, because the separation of read and eval is there for a

Re: How is the emphasis of “data over code” different than the XML advocacy of the early 2000s?

2016-02-02 Thread Herwig Hochleitner
2016-02-02 23:34 GMT+01:00 kovas boguta : > > In general yes, but there are endless specific ways to do this. Do you > represent a kv-pair as a single element? Do you have and as > elements? Or do you use the name of the key as the name of the element? And > then

Re: Heard about clojure today. is it one of the big tecnologies for the future? or is it becoming deprecated?

2016-01-21 Thread Herwig Hochleitner
2016-01-20 17:04 GMT+01:00 Miguel Domingos : > Just checked GIT Hub Pulse and it is very low. I just heard about this > technology today, so I don't know. > https://github.com/clojure/clojure/pulse > The fact that clojure's language core has very little churn

Re: syntax of ^:arglists ?

2015-12-21 Thread Herwig Hochleitner
I'd say, same as you would destructure them inline: [& {:keys [k1 k2]}] -- 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

Re: syntax of ^:arglists ?

2015-12-21 Thread Herwig Hochleitner
It does. When not passed, a key is nil, or you can provide an or binding: [& {:keys [k1 k2] :or {k1 :default1 k2 :default2}] -- 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

Re: syntax of ^:arglists ?

2015-12-21 Thread Herwig Hochleitner
err​ [& {:keys [k1 k2] :or {k1 :default1 k2 :default2}}] -- 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

Re: [ANN] Clojure 1.8.0-RC4 is now available

2015-12-18 Thread Herwig Hochleitner
Apologies for the incoming wall of text, as well as for co-opting the -RC4 thread TLDR: -RC4 LGTM, I enjoy the startup-speed boost - we need a benchmark before further evaluating the work on tuples 2015-12-18 13:02 GMT+01:00 Mikera : > > I don't actually recall

Re: recur does not work within some macros, how to deal with it?

2015-12-18 Thread Herwig Hochleitner
Use a function instead of the loop: (defn ws [req] (with-channel req channel ((fn loop-f [x] (timer/schedule-task 3000 (println x) (loop-f (+ x 1 0))) loop-recur is used to prevent unbounded stack growth, but the timer task acts as a sort of

Re: [ANN] Clojure 1.8.0-RC4 is now available

2015-12-17 Thread Herwig Hochleitner
Am 17.12.2015 02:35 schrieb "Mikera" : > What's the plan with Tuples more broadly? Speaking as a kibitzer to the process: Suppose somebody was to carry this along, I'd like to see these points addressed: IIRC, the breaking factor to the proposal were slow-downs in

Re: core.async channel /w transducer which thread?

2015-12-17 Thread Herwig Hochleitner
2015-12-16 16:22 GMT+01:00 Leon Grapenthin : > The blocking put is made on a separate thread (channel named res), then > later a blocking take from that same channel is made in the second go-loop. > > Or are you saying "if it takes too long, parallelize via pipeline"?

Re: Ultralight Components

2015-11-24 Thread Herwig Hochleitner
2015-11-24 4:31 GMT+01:00 William la Forge : > > For me, the winner is avoiding static structures. I am tired of doing > ongoing refactorings interrupted periodically by complete rewrites. Class > hierarchies are the worst--being the largest, they are the least stable. > I

Re: Poor parallelization performance across 18 cores (but not 4)

2015-11-19 Thread Herwig Hochleitner
This reminds me of another thread, where performance issues related to concurrent allocation were explored in depth: https://groups.google.com/d/topic/clojure/48W2eff3caU/discussion The main takeaway for me was, that Hotspot will slow down pretty dramatically, as soon as there are two threads

Re: best practice with forked libraries

2015-11-18 Thread Herwig Hochleitner
2015-11-18 15:48 GMT+01:00 Max Gonzih : > I think lein deps :tree should be enough to spot issues like that. > If you're into skimming pages of transitive dependencies (or know how to use grep ;), sure. But lein-collisions also helps you find unexpected collisions (i.e. not

Re: best practice with forked libraries

2015-11-18 Thread Herwig Hochleitner
2015-11-17 19:54 GMT+01:00 Ray Miller : > > There's a convention in Clojars of deploying a non-canonical fork by > renaming the project to org.clojars.USERNAME/PROJ_NAME and deploying that > to Clojars. > > That convention is pretty awkward in practice, because leiningen and

Re: Reflection warning on try/catch inside go block

2015-11-16 Thread Herwig Hochleitner
The method is called .printStackTrace: http://docs.oracle.com/javase/7/docs/api/java/lang/Throwable.html#printStackTrace() I can't speak to why the reflection warning disappears in some cases. Seems fishy, ​ -- You received this message because you are subscribed to the Google Groups "Clojure"

data.xml update

2015-09-22 Thread Herwig Hochleitner
Hello Everybody, it took me about a year and multiple failed rewrites, to admit, that keeping a compatibility mode for the current prefix-emitting hack in clojure.data.xml, is just to much of a hassle and complexity nightmare for it to be worth it. So now, non-namespaced names are represented as

Re: top-level lets or private globals

2015-08-26 Thread Herwig Hochleitner
I can't really speak to what's more idiomatic, but there is a slight difference between a top-level let and ^:const ^:private. ^:const makes the compiler directly inline the form, thus it works only on pr-dup - able values. This has gotten me by surprise some times. This also duplicates values,

Re: Function syntax

2015-08-13 Thread Herwig Hochleitner
2015-08-13 10:08 GMT+02:00 Eric Le Goff eleg...@gmail.com: I would be curious to know if there are difference (in terms of performance / elegance ) between those 2 ways of expressing functions E.g *(fn [ x] (- x sort last))* versus *#(last (sort %))* Both are supposedly equivalent,

Re: Function syntax

2015-08-13 Thread Herwig Hochleitner
2015-08-13 11:13 GMT+02:00 Amith George strider...@gmail.com: Could you please explain why is the `vec` needed? From what I understand, we are expected to treat the variadic args argument as a seq, nothing more. What Tassilo said. Also, it's not nessecary to use `vec`, but you need a

Re: Function syntax

2015-08-13 Thread Herwig Hochleitner
Yep, I meant the thing, `vector` is doing. Thanks! 2015-08-13 13:36 GMT+02:00 Amith George strider...@gmail.com: Maybe you meant to use `vector` instead of `vec`? `vec` doesn't accept variable args. Hence my original question. On Thursday, 13 August 2015 16:24:43 UTC+5:30, Herwig Hochleitner

Re: no set-car! in clojure

2015-08-06 Thread Herwig Hochleitner
You could define your own cons type, like Bodil Stokke did for her microkanren https://github.com/bodil/microkanrens/blob/77dbdc34cde580e26765138102cbdabbfad85b9d/mk.clj#L13 If you mark its fields with ^:volatile-mutable, you can call (set! (.-a lst) new-car) on a cons instance. cheers -- You

Re: [ANN] lein-collisions: a plugin to find classpath collisions

2015-07-14 Thread Herwig Hochleitner
2015-07-13 18:50 GMT+02:00 Tim Gilbert timgilb...@gmail.com: http://pastebin.com/js93Mrzw ...and in fact the only way I can get it to pass dependency checks is if I add a lot of :exclusions, up to and including org.slf4j/slf4j-api at which point it aborts with a runtime error

Re: [ANN] lein-collisions: a plugin to find classpath collisions

2015-07-13 Thread Herwig Hochleitner
2015-07-09 19:01 GMT+02:00 Andy Fingerhut andy.finger...@gmail.com: I think it would be helpful to include that text in your README on Github somewhere. Done. Good idea, thanks Andy! -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this

Re: [ANN] lein-collisions: a plugin to find classpath collisions

2015-07-09 Thread Herwig Hochleitner
​So long story short, you want both :pedantic and lein-collisions -- 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

Re: java method overloading and clojure interop

2015-07-09 Thread Herwig Hochleitner
05:20:51 UTC+2 schreef Herwig Hochleitner: The way I would do it: Define multiply as a function calling (.multiply amount ^Number x), for higher order usage, and then add an :inline function to its metadata, which returns `(.multiply ~amount ~x). That acts as a compiler macro, which inlines

Re: [ANN] lein-collisions: a plugin to find classpath collisions

2015-07-09 Thread Herwig Hochleitner
[lein-collisions 0.1.2] now working properly with resource directories​ -- 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

Re: [ANN] lein-collisions: a plugin to find classpath collisions

2015-07-09 Thread Herwig Hochleitner
2015-07-08 18:41 GMT+02:00 Kevin Corcoran kwcorco...@gmail.com: The projects on which I work already use lein's :pedantic? flag. Is there any reason we might want to use lein-collisions instead of :pedantic? Hi Kevin, if I understand :pedantic correctly, it catches cases, where transitive

[ANN] lein-collisions: a plugin to find classpath collisions

2015-07-08 Thread Herwig Hochleitner
Dear Community, I'm releasing https://github.com/webnf/lein-collisions Running it on your projects and libraries is highly recommended, because classpath collisions can be the source of some very confusing errors and inconsistencies. thanks -- You received this message because you are

Re: java method overloading and clojure interop

2015-07-07 Thread Herwig Hochleitner
2015-07-07 15:04 GMT+02:00 Jo Geraerts j...@umask.net: * multiply(long x) * multiply(double x) * multiply(Number x) In clojure i want to do something like (defn multiply[^MonetaryAmount amount multiplicant] (.multiply amount multiplicant)) Function parameters in Clojure, are generally

Re: transducer (+ closures) efficiency question

2015-06-24 Thread Herwig Hochleitner
2015-06-24 18:19 GMT+02:00 Ben Wolfson wolf...@gmail.com: I meant a difference in speed. A var-root fetch is a volatile read, which can have several adverse performance effects. Most importantly, it hinders inlining, since the JIT has to place a guard for every inlining site of a volatile

Re: transducer (+ closures) efficiency question

2015-06-24 Thread Herwig Hochleitner
2015-06-24 1:25 GMT+02:00 Ben Wolfson wolf...@gmail.com: On Tue, Jun 23, 2015 at 4:17 PM, Ghadi Shayban gshay...@gmail.com wrote: Tangentially: (remove even?) Will be faster than (remove (fn [i] (even? i))) because in the first case the dereference of the var 'even?' happens only once

Re: roundtripping using data.xml?

2015-06-23 Thread Herwig Hochleitner
Matching Socks, thanks for mentioning the design page I created. I haven't pushed anything recently, but I'm still working on the rewrite implementing the proposal: https://github.com/bendlas/data.xml I've also made a library, that uses a snapshot from my rewrite to implement a WebDAV server:

Re: Handling exceptions with Reader Conditionals

2015-06-03 Thread Herwig Hochleitner
2015-06-02 23:57 GMT+02:00 Daniel Compton daniel.compton.li...@gmail.com: On the Reader Conditionals http://dev.clojure.org/display/design/Reader+Conditionals dev discussion page at one part it talks about exception handling: Exception handling, catching all - see issue below on why this is

Re: Get anonymous function's(which is parameter to function) body in called function

2015-05-28 Thread Herwig Hochleitner
2015-05-28 19:22 GMT+02:00 Mohit Thatte mohit.tha...@gmail.com: Changing wait-until to a macro seems like the simplest way to tackle this. It gives you access to pred at compile time, does not force the caller to add meta-data to pred, and you can construct the error message as you like. I

Re: Get anonymous function's(which is parameter to function) body in called function

2015-05-28 Thread Herwig Hochleitner
2015-05-28 19:42 GMT+02:00 Mohit Thatte mohit.tha...@gmail.com: The interesting question here is what constitutes useful information! (let [pred #(exists? .foo)] (wait-until pred)) ;; - the fact that it's called 'pred is not interesting in most cases The trade-off is breaking an existing

  1   2   3   4   >