Re: Curious behaviour when requiring clojure.tools.cli

2021-06-14 Thread Thomas Heller
clojure.string/starts-with? was added in Clojure 1.8.0, I see 1.7.0 in the project.clj? See https://github.com/clojure/clojure/blob/b1b88dd25373a86e41310a525a21b497799dbbf2/src/clj/clojure/string.clj#L362 What exactly else is going on I don't know but it all starts from the wrong Clojure

Re: Classpath bug re Clojure 1.10.1.645 when using Figwheel.Main

2020-08-12 Thread Thomas Heller
> > None of these libraries are broken. They just include resources. Also, I > don't think it is realistic to tell library authors to please move certain > files out of the way because my build tool randomizes my classpath. That is > not going to happen. People will keep including things like

Re: Classpath bug re Clojure 1.10.1.645 when using Figwheel.Main

2020-08-11 Thread Thomas Heller
This might be a good incentive for people to keep their published .jar files clean. Unfortunately many published CLJS libs contain the rather common "public" folder with "public/index.html" and often compiled .js artifacts which aren't actually ever used. I do however think that it is useful

[JOB] Clojure Developer | Presien | Sydney

2019-10-17 Thread Thomas Sesselmann
Hi Everyone, We're hiring a Clojure developer for our AI startup based in Sydney. We're using object detection and machine learning to improve worker safety on construction sites and we need a hand building out our Dashboard and Analytics platform which is forked from Metabase

Re: Custom test assertions in ClojureScript

2019-09-29 Thread Thomas Heller
Self-hosted should work the same way but it does require compiling the macro namespace in an extra step (ie. the $macros ns is created separately). I don't know how this is done for regular self-hosted. shadow-cljs has an extra build step for this that should take care of creating everything.

Re: Custom test assertions in ClojureScript

2019-09-28 Thread Thomas Heller
Hey, cljs.test/assert-expr is part of the CLJ macro side so it can't be extended from a CLJS REPL. You can write it in a .clj file and use (require-macros 'that.ns) from the CLJS REPL or use :require-macros in the ns form that uses the new assert-expr. HTH, Thomas On Thursday, September 26

Re: [ANN] seancorfield/next.jdbc 1.0.0

2019-06-13 Thread Thomas
Thank you for all the hard work you put into this Sean!!! Great to see new libraries being written for Clojure!!! Thomas On Thursday, 13 June 2019 07:51:56 UTC+2, Sean Corfield wrote: > > The first “gold” release of the next generation of clojure.java.jdbc – a > new low-level Clojur

Re: Blocking behavior of >!! ?

2019-05-20 Thread Thomas Heller
://www.youtube.com/watch?v=enwIIGzhahw - https://www.youtube.com/watch?v=096pIlA3GDo On Monday, May 20, 2019 at 3:18:17 PM UTC+2, Brian Beckman wrote: > > Thanks, Thomas. I shouldn't have included the quoted code about ( my question because it distracts from what I really want to know, and what &g

Re: Blocking behavior of >!! ?

2019-05-19 Thread Thomas Heller
( > The documentation for >!! reads: > > - > clojure.core.async/>!! > ([port val]) > puts a val into port. nil values are not allowed. Will block if no > buffer space is available. Returns true unless port is already closed. > > > I have a case where I believe that the

Re: [Q] Deploying two artefacts/jars with same group/artefactid via Leiningen

2019-03-28 Thread Thomas Heller
I'm doing this in shadow-cljs deploying a normal jar and one with aot. I'm not exactly sure how you'd do that for an uberjar though. https://github.com/thheller/shadow-cljs/blob/master/project.clj#L96-L103 On Thursday, March 28, 2019 at 7:05:39 PM UTC+1, henrik42 wrote: > > Hi, > > I have an

Re: Invalid-token when dereferencing namespaced keywords.

2019-01-30 Thread Thomas Heller
This is invalid because user2 does not have an alias to user1, instead it is an actual full namespace. :user1/foo would be fine in this case (and identical to ::foo in user1). Or (ns user2 (:require [user1 :as u1])) ::u1/foo Hope that makes things clearer. Cheers, Thomas -- You received

Re: [ANN] Clojure 1.10 has been released!

2018-12-18 Thread Thomas
Thank you for this release and all the hard work everyone has put into this!!! Thomas On Monday, 17 December 2018 18:30:01 UTC+1, Alex Miller wrote: > > Clojure 1.10 focuses on two major areas: improved error reporting and Java > compatibility. > > > Error reporting at the RE

Re: downloading of files from Dropbox using cli-http

2018-06-26 Thread Thomas
I have no idea what could be wrong here... sorry. Thomas On Monday, 25 June 2018 14:38:12 UTC+2, Johannes wrote: > > Hi, > > I am trying to download a file from Dropbox which I can get with the Http > request: > > POST /2/files/download Host: https://content.dropboxapi.c

Re: downloading of files from Dropbox using cli-http

2018-06-25 Thread Thomas
try and do a curl -v and see what it really does under the covers as there might be a redirect Good luck, Thomas On Monday, 25 June 2018 14:38:12 UTC+2, Johannes wrote: > > Hi, > > I am trying to download a file from Dropbox which I can get with the Http > request: > > P

Re: try catch leaking exception

2018-02-14 Thread Thomas Heller
rse ym-fmt to (into []) (catch Exception _ nil))) This forces the seq inside the try/catch. HTH, Thomas On Wednesday, February 14, 2018 at 11:46:58 AM UTC+1, icamts wrote: > > Hi all, > I found an unexpected behavior of (try ... (catch ...)) special form. Can &g

Re: :npm-deps and transitive dependencies

2018-01-16 Thread Thomas Heller
You can create a deps.cljs in the root of your classpath for Y and declare :npm-deps there ;; src/deps.cljs {:npm-deps {"the-thing" "version"}} This way the compiler can pick up your npm dependency and install it. On Monday, January 15, 2018 at 9:01:55 AM UTC+1, Lucas Wiener wrote: > > Hi, > >

Re: [Violation] Parser was blocked due to document.write(

2017-11-05 Thread Thomas Heller
This is only an issue in unoptimized code, ie. :none. Without optimizations all code is in separate files which are loaded in dependency order. The default debug loader will load them by appending a script tag to the document. This has pretty terrible performance characteristics but is OK

Re: Entity–component–system and Clojure

2017-08-16 Thread Thomas
If I am not mistaken Lightable uses it as well. There is also a plug in for it which helps with the ECS. Hope that helps. Thomas On Wednesday, 16 August 2017 02:52:38 UTC+2, Didier wrote: > > I recently stumbled upon the entity-component-system design pattern which > is popular in ga

Re: Prgram uses a lot of swap

2017-02-27 Thread Thomas Heller
> > ​What is the best way to determine the right value for this? I remember > that in the past I had a lot of little Java​ > > ​programs running and got a much better performance by limiting memory > usage. > That is not an easy question to answer. If you make it too small your process may

Re: Prgram uses a lot of swap

2017-02-27 Thread Thomas Heller
Last thing I can come up with is your environment variables or something in your ~/.lein/* folder. Beyond that I'm out of ideas. On Monday, February 27, 2017 at 2:15:18 PM UTC+1, Cecil Westerhof wrote: > > 2017-02-27 13:57 GMT+01:00 Cecil Westerhof >: > >> Maybe you have

Re: Prgram uses a lot of swap

2017-02-26 Thread Thomas Heller
Maybe you are running an old version of leiningen? This might work although JVM_OPTS works fine for me as well :jvm-opts ^:replace ["-Xmx512m"] Maybe you have some other conflicting configuration somewhere that sets it explicitly to 4G? Usually no maximum is set and the JVM will automatically

Re: Prgram uses a lot of swap

2017-02-26 Thread Thomas Heller
:jvm-opts ["-Xmx512m"] to your project.clj. It will set the max memory of the JVM to 512mb which should be enough for your program. HTH, Thomas On Saturday, February 25, 2017 at 11:41:03 AM UTC+1, Cecil Westerhof wrote: > > 2017-02-24 15:07 GMT+01:00 Timothy Baldridge <tbald

Socket server and PuTTY

2016-11-22 Thread 'Thomas Meyer' via Clojure
Hi, I think the problem is that clojure server reply sends LF only but RFC 854 wants a CR LF for a newline. PuTTY has an option to convert LF into CR LF. Bug or feature? Kind regards Thomas -- You received this message because you are subscribed to the Google Groups "Clojure" grou

Socket server and PuTTY

2016-11-21 Thread 'Thomas Meyer' via Clojure
nd regards Thomas -- 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 th

Re: defrecord in cljc

2016-11-12 Thread Thomas Heller
You may overwrite the default IPrintWriter by doing calling extend-type after the defrecord. But CLJS should probably allow the protocol in defrecord itself instead of forcing the default. Not sure if there is an open issue for it. On Friday, November 11, 2016 at 9:29:25 PM UTC+1, William la

Re: need help on `pprint/write` code with better readability

2016-10-24 Thread Thomas Heller
Try https://github.com/weavejester/cljfmt It is specifically written for clj code and not general pprinter. /thomas On Sunday, October 23, 2016 at 1:28:23 PM UTC+2, Jiyin Yiyong wrote: > > I'm using `write` function to generate code very heavily. But small part > of the code are har

Re: Possible ClojureScript compiler issue...

2016-10-18 Thread Thomas Heller
core. The sentinel is the "safest" solution but impacts the performance of *everyone*, so we should be doing more benchmarks on more platforms before deciding anything. Benchmarks and Votes on the Jira Issue would help to push this along. Cheers, /thomas On Tuesday, October 18, 2016 at 10:21:

Re: Possible ClojureScript compiler issue...

2016-10-18 Thread Thomas Heller
owing best practices. As David suggested using a custom js->clj here would prevent the issue and is probably the best course of action regardless. /thomas On Tuesday, October 18, 2016 at 3:12:40 AM UTC+2, Antonin Hildebrand wrote: > > I think one reason why these issues are reported infr

Re: Possible ClojureScript compiler issue...

2016-10-16 Thread Thomas Heller
FWIW I investigated the check with "true" and a sentinel value and found them to both have a small performance impact over just checking for a true-ish property. http://dev.clojure.org/jira/browse/CLJS-1658 The impact is really small so it might be worth the trade-off. /thomas

Re: should edn/read call close() on the PushbackReader?

2016-09-02 Thread Thomas Heller
alled in a finally block. HTH, Thomas On Friday, September 2, 2016 at 2:24:31 PM UTC+2, John Valente wrote: > > Running on Windows, I found that I could not delete an edn file that I had > read from. I've looked at a few examples of reading edn, and none of them > seem to suggest

Re: Running a certain function of your project

2016-07-14 Thread Thomas Mulvaney
For one-off scripts I typically have a `scripts/` directory in my projects. I also have a scripts profile in my project.clj which includes "src/clj" and "scripts", that way my scripts can call functions from my project. I then have a bash script called `bin/script` which just contains "lein run

Re: How to compile with optimizations none when using web workers

2016-05-30 Thread Thomas Heller
be where. If that is not possible for some reason you need to list them all yes. /thomas On Monday, May 30, 2016 at 1:04:08 PM UTC+2, Asher Coren wrote: > > Thomas, > I as well think modules is the right approach when using web workers. > > What can I do if my app code is build from

Re: Removing duplicates from a series

2016-05-17 Thread Thomas Mulvaney
Rather than writing a new function you could always use something like (map first (partition-by :value events)). partition-by will create lists of events where consecutive values have not changed. You could also assemble a transducer pipeline using the transducer arities of the functions: `(into

Re: Clojure IoT?

2016-04-11 Thread Thomas
I have made the Eclipse Paho JS client available for CLJS: https://github.com/cljsjs/packages/tree/master/paho And there is also machine head http://clojuremqtt.info/ Thomas On Saturday, 9 April 2016 23:39:05 UTC+1, Gregg Reynolds wrote: > > A very general question : is anybody other t

Re: cljs build goog/base.js is not getting generated properly..

2016-03-06 Thread Thomas Heller
6, 2016 at 7:03 PM, Sunil S Nandihalli <sunil.na...@gmail.com > > wrote: > >> Thanks Thomas for the response >> >> when I did >> >> lein deps :tree | egrep google >> >> I got >> >>[com.google.javascript/closure-compiler "

Re: cljs build goog/base.js is not getting generated properly..

2016-03-06 Thread Thomas Heller
That was an issue with old closure library releases but was fixed a while ago. Try lein clean and make sure there are no conflicting versions being used (via lein deps :tree). -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group,

Re: [GSoC idea] Pluggable back-ends architecture for ClojureScript compiler

2016-02-22 Thread Thomas Heller
to continue in this way. I'm not sure who was involved but authors are still around I think. Cheers, /thomas On Sunday, February 21, 2016 at 9:20:18 AM UTC+1, Edward Knyshov wrote: > > > > *Pluggable back-ends architecture for ClojureScript compilerBrief > explanation:*

Re: How to compile with optimizations none when using web workers

2016-02-20 Thread Thomas Heller
output that should not have been there. Just pushed a cleaner version that actually only contains stuff used by this version of the project. Anyways ... Modules for the win! ;) Cheers, /thomas [1] https://github.com/thheller/worker-example/tree/master/demo/js [2] https://github.com/thheller/worker

Re: How to compile with optimizations none when using web workers

2016-02-19 Thread Thomas Heller
the point that web workers should *ALWAYS* be used via closure modules, it is just the most efficient way to organise the code and output. Just my 2 cents, /thomas On Friday, February 19, 2016 at 4:54:59 PM UTC+1, William la Forge wrote: > > Compiling with optimizations none is no d

Re: [ClojureScript] Re: ANN replikativ 0.1.0 - strong eventual consistent P2P replication for clj and cljs

2016-01-22 Thread Thomas
nd Braid came to mind: https://github.com/braidchat/braid Maybe that is something we can show off some Clojure and ClojureScript. Haven't had time yet to look at this myself yet. Thomas -- You received this message because you are subscribed to the Google Groups "Clojure" group. To

Re: ANN replikativ 0.1.0 - strong eventual consistent P2P replication for clj and cljs

2016-01-20 Thread Thomas
Looks very interesting and I suspect there were some pretty hard problems to solve!!! Thank you for open sourcing this. Thomas -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroup

Re: [ANN] Clojure 1.8.0 is now available

2016-01-20 Thread Thomas
An extra big thank you for all involved!!! Thomas On Wednesday, 20 January 2016 13:22:28 UTC, Alex Miller wrote: > > The docs just haven't been regenerated yet - that's coming. > > -- You received this message because you are subscribed to the Google Groups "Clojur

Re: Compare between clojure and Java

2016-01-05 Thread Thomas
with more functionality. There are a few more examples around on the web I think. Thomas On Tuesday, 5 January 2016 13:27:10 UTC, Thomas Saillard wrote: > > Dear, > > In order to good understand the powerful of Clojure, > I have heard that compare to a code in java you need only few line

Compare between clojure and Java

2016-01-05 Thread Thomas Saillard
Dear, In order to good understand the powerful of Clojure, I have heard that compare to a code in java you need only few lines in clojure. Is that true ? If it is the case, have you a sample of the 2 codes ? I appreciate your help. My Kind regards, Thomas -- You received this message because

Re: If a Java function seems to never return, how do I test?

2015-10-31 Thread Thomas Heller
ou can also use a debugger and step through the java code step by step. Also, consider coding against interfaces in java (eg. java.util.List and java.util.Map instead of java.util.Collection), it will save you tons of conversion calls. HTH /thomas [1] https://visualvm.java.net/ -- You received this

Re: How do I return the data I need from this Exception?

2015-10-08 Thread Thomas Heller
that line things should work as expected? Cheers, /thomas On Thursday, October 8, 2015 at 8:35:18 AM UTC+2, Lawrence Krubner wrote: > > I'm thinking that I've misunderstood something about how to catch an > Exception. I have these 2 functions: > > (defn catch-exceptions [e this-use

Re: Trying to understand Clojure/Java concurrency performance?

2015-10-07 Thread Thomas Heller
to be much much harder and more prone to error. You can also use Erlang to handle all the connection stuff and interface it to a Clojure app that does the DB work, you do not have to write everything in Erlang. Just my 2 cents, /thomas PS: I have not written such a system in either language, so

Re: Trying to understand Clojure/Java concurrency performance?

2015-10-07 Thread Thomas Heller
, pretty much all of it is till going to apply to an app of that scale. Are you sure you are going to need that scale? 1mil connections is a pretty ambitious goal. /thomas On Wednesday, October 7, 2015 at 8:50:47 PM UTC+2, Thomas Heller wrote: > > FWIW getting 1mil+ connections will re

Re: macro help

2015-10-02 Thread Thomas Heller
, I would not recommend using the binding but doesn't mean you can't. I can't quite imagine what your future plans look like but you probably won't need a macro. ;) cheers, /thomas On Friday, October 2, 2015 at 3:34:48 PM UTC+2, Colin Yates wrote: > > Hi Thomas - yes, you are right. The exa

Re: macro help

2015-10-02 Thread Thomas Heller
?] :as form} & children] (into [:div.form.horizontal {:class (if editing? "editing" "editable")}] children)) Use macros very sparingly, most of the time data and functions are just better. Just my 2 cents, /thomas On Wednesday, September 30, 2015 at

Re: macro help

2015-10-02 Thread Thomas Heller
ur initial macro does not need to exist. ;) cheer, /thomas On Friday, October 2, 2015 at 4:15:47 PM UTC+2, Colin Yates wrote: > > Hi Thomas, binding - really? :-). Apart from the general negative reaction > they seem to have, I don’t want the individual elements (e.g. text and >

Re: scheduling with core.async?

2015-09-23 Thread Thomas Heller
point, but beyond that it is pretty simple. HTH, /thomas On Wednesday, September 23, 2015 at 1:00:32 PM UTC+2, bahadir cambel wrote: > > > Hi Leon, > > you may check http://www.clojure-toolbox.com/ and see the schedule > section. Here are the suggestions; > > https://githu

Re: Clojure/Pedestal vs Go

2015-09-14 Thread Thomas Heller
should not make decisions based on them. Look at the whole stack. The initial response time for a "hello world" request will never properly reflect your production app. In the end all that matters is your code, it won't be fast just because it is Go and not a JVM. Just my 2 cents,

Re: Just found out about Elixirs function argument pattern matching...

2015-09-08 Thread Thomas Heller
. YMMV, do what feels right. Keep it simple. /thomas On Tue, Sep 8, 2015 at 4:42 AM, Amith George <strider...@gmail.com> wrote: > >> I probably wouldn't use protocols since I doubt there is a function > signature that is exactly identical for all branches. Each branch proba

Re: Just found out about Elixirs function argument pattern matching...

2015-09-08 Thread Thomas Heller
:cache/expire, :payload ...} Note that this is ONLY the representation on-the-wire which you generally want to be compact as possible, so I'd choose the vector variant since it is more compact and doesn't encode the keys. What I get when I "read" this data is not tied to the data format use

Re: Just found out about Elixirs function argument pattern matching...

2015-09-07 Thread Thomas Heller
g [contact-id :- ContactId]) (s/defrecord OneOff [name :- s/Str email :- s/Str]) (def Recipient (s/either PlaceHolder Existing OneOff)) Just my 2 cents, /thomas [1] https://github.com/Prismatic/schema > > Possible F# (might not compipe!!) >

Re: Just found out about Elixirs function argument pattern matching...

2015-09-07 Thread Thomas Heller
hing recipient))) That greatly reduces the cognitive load when looking at each separate implementation and also keeps the actual internal structure of the Recipient out of the dispatch. The conpd does not need to know how many fields are in OneOff, the tuple/vector/variant match versions must kno

Re: when the body of the request is HttpInputOverHTTP, how do I get the string representation?

2015-08-19 Thread Thomas Heller
No idea what HttpInputOverHTTP is but I'd guess that it is an InputStream implementation. Try (slurp (:body request)) HTH, /thomas On Wednesday, August 19, 2015 at 9:57:57 PM UTC+2, Lawrence Krubner wrote: I know this has been asked before, but Google is interpreting HttpInputOverHTTP

Is this resource only loaded once?

2015-08-14 Thread Thomas Goossens
When a java class uses the compiled Test (gen-class) from test namespace. Everytime the static function -run is called, will parser be slurped again or only once ? (ns test (:gen-class :name Test :methods [ ^:static [run [] String])) (def parser (slurp

Re: Is this resource only loaded once?

2015-08-14 Thread Thomas Goossens
, there are alternatives that will not keep on paying the atom update cost.) On 14 August 2015 at 10:59, Thomas Goossens con...@thomasgoossens.be javascript: wrote: When a java class uses the compiled Test (gen-class) from test namespace. Everytime the static function -run is called, will parser

Re: Using go/! like C#'s async/await

2015-07-30 Thread Thomas Heller
not very useful, you are basically just measuring the frameworks overhead which is tiny to what it provides. In actual programs most of the time will not be spent in core.async internals, at least not from what I have observed so far. go blocks are actually pretty cheap. YMMV, /thomas [1] http

Re: [ANN] Introducing Yo-yo, a protocol-less, function composition-based alternative to Component

2015-07-03 Thread Thomas Heller
That article makes it sound like an OOP beast, it is really much simpler than that. -- 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: [ANN] Introducing Yo-yo, a protocol-less, function composition-based alternative to Component

2015-07-03 Thread Thomas Heller
example I can refer to. Cheers, /thomas On Friday, July 3, 2015 at 9:39:24 AM UTC+2, James Henderson wrote: Hey Thomas, thanks for your e-mail :) On Monday, 29 June 2015 11:25:44 UTC+1, Thomas Heller wrote: Hey, interesting approach but I don't like the nesting and manual wiring

Re: [ANN] Introducing Yo-yo, a protocol-less, function composition-based alternative to Component

2015-06-29 Thread Thomas Heller
I said it basically does the same stuff as Component, just a little less invasive since I think a component should not know about the container it runs in. Hope that was somewhat useful as feedback to Yo-Yo. Cheers, /thomas On Sunday, June 28, 2015 at 4:03:34 PM UTC+2, James Henderson

Re: ring - setting no-cache for everything?

2015-06-19 Thread Thomas Heller
-not modified round trip). Disabling cache is usually the least desirable option and if you care about performance at all you should think twice before doing so (yes, even for intranet sites). /thomas -- You received this message because you are subscribed to the Google Groups Clojure group

Re: Making Java serializables transparently printable and readable

2015-06-17 Thread Thomas Heller
On Wed, Jun 17, 2015 at 9:50 PM, James Reeves ja...@booleanknot.com wrote: On 17 June 2015 at 09:51, Thomas Heller th.hel...@gmail.com wrote: On another note: Sessions in cookies should be VERY VERY small. java.io.Serializable usually isn't small and especially if you go java object - binary

[ANN] piton - SQL-targeting migrations and seeding

2015-06-17 Thread Thomas Meier
Just put up a little library for sql migrations and seeding. I wanted something really simple; naturally at the cost of generality. Thus this is a weaker take on migrations and seeding that focuses specifically on SQL databases. Comes with a plugin to help with managing things--specifically

Re: Making Java serializables transparently printable and readable

2015-06-17 Thread Thomas Heller
apps with cookies above 4kb. One even had Apache configured to reject requests (well, default config) that had too large cookies and no one even noticed except for the users that left confused and never came back. Just as a warning. :) Cheers, /thomas On Wednesday, June 17, 2015 at 3:47:39

Re: Making Java serializables transparently printable and readable

2015-06-17 Thread Thomas Heller
but YMMV. /thomas On Wednesday, June 17, 2015 at 3:27:44 PM UTC+2, Surgo wrote: Let's not get into the motivation behind this too much -- the exact same serialization problems exist if you write out the session to a database. Ring also encrypts the cookies so the above issue is not a problem

Re: [ANN] Instaparse 1.4.0

2015-05-07 Thread thomas van der veen
Thank you for this release of this fantastic library. I haven't had time yet to update my project that uses it but one day I will ;) Thank you again, Thomas On Wednesday, 6 May 2015 09:56:47 UTC+1, Mark Engelberg wrote: Instaparse 1.4.0 is now deployed to clojars and available to use

Re: Clojure web server capacity

2015-04-22 Thread Thomas Heller
much overhead they would introduce. I'm happy to help if you have any Clojure related questions for your benchmark. If all you really want to test is the web server performance it probably doesn't make much sense to include Clojure since there are no Clojure web servers (AFAIK). HTH, /thomas

Re: Clojure web server capacity

2015-04-22 Thread Thomas Heller
You should check your sources. http-kit is not written in Clojure and does not use netty. On Wednesday, April 22, 2015 at 11:40:21 PM UTC+2, François Rey wrote: On 22/04/15 20:22, Thomas Heller wrote: As far as I know there is not a single Web Server actually written in Clojure

Re: Support for IBM JVM?

2015-03-19 Thread Thomas
FYI: At IBM we are suppose to only the IBM JVM and not other version due to legal reason. Thomas -- 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

Re: Any Lispers in South Devon, UK?

2015-03-05 Thread Thomas
There are also a few of us in the Southampton/Winchester area Get in touch if you are interested. Thomas On Tuesday, 3 March 2015 21:53:57 UTC, Stephen Wakely wrote: Hi, Are there any other Lispers in South Devon who would be interested in meeting up and talking code? Clojure, Common

Re: Looking for an equivalent of reductions for reduce for -

2015-03-03 Thread Thomas Meier
Just wanted to double check. This? ((f 1)(g (f 1) (h (g (f 1 Or this? ((f 1)(g (f 1))(h (g (f 1 -- 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

Re: Looking for an equivalent of reductions for reduce for -

2015-03-01 Thread Thomas Hicks
I'm not quite sure what you want to do here in the general case but.a few thoughts: - is implemented as a macro, whereas reduce and reductions are functions. Depending on what you really want you may need a macro over a function. Note that reduce is picky about the reducing function it

Re: Reducers question

2015-02-09 Thread Thomas Heller
of 1 (eg, [[1] [2] [3]]) and then handed off to reducers, the default of n=512 is larger than your input so you'll just use regular reduce. /thomas On Monday, February 9, 2015 at 10:38:59 AM UTC+1, Aaron Cohen wrote: I'm not sure if the 4-arity fold function is working as expected. My

Re: Clojurescript :advanced compilation extern only partly working.

2015-01-30 Thread Thomas Heller
. Crispin On Wednesday, January 28, 2015 at 6:23:29 PM UTC+8, Thomas Heller wrote: I just have a guess for you. AudioContext.decodeAudioData parameters are declared as ArrayBuffer, Function, Function but you are passing data which is a String not an ArrayBuffer. Maybe the type inference

Re: Clojurescript :advanced compilation extern only partly working.

2015-01-28 Thread Thomas Heller
if you pass an ArrayBuffer? Other than that I see no reason why it would munge the name. /thomas On Wednesday, January 28, 2015 at 2:14:31 AM UTC+1, Crispin Wellington wrote: Hi there, I have been trying to compile some audio code in clojurescript in advanced mode. I have setup

Re: Properly parse clojure source code?

2015-01-15 Thread Thomas Heller
https://github.com/clojure/tools.reader is probably your best bet. On Friday, January 16, 2015 at 12:13:22 AM UTC+1, zirkonit wrote: I'm thoroughly confused. If I want to parse clojure code from string without evaluating or caring a lot about its context, I'm out of luck. EDN tools choke on

Re: camelize-dasherize - reinventing the wheel?

2015-01-06 Thread Thomas Heller
, no matter what else you use to convert maps. https://gist.github.com/thheller/7ddc0371561deaf13e11 Elapsed time: 35.488 msecs clojure.walk has keywordize-keys and stringify-keys, maybe a suitable starting point for your implementation. HTH, /thomas On Tuesday, January 6, 2015 8:25:57 PM UTC

Re: Please critique my code (barber problem with core.async)

2015-01-05 Thread Thomas
Thank you all for you valuable feedback. I really appreciate it and the suggestions are really good. Thomas -- 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

Re: A (foolish) plan to re-invent IO on top of core.async

2015-01-05 Thread Thomas Heller
. Re-inventing the wheel is probably a huge waste of time. Stuff like Netty already works pretty well and can be used from Clojure quite easily. Just my 2 cents, /thomas On Monday, January 5, 2015 11:18:42 PM UTC+1, Robin Heggelund Hansen wrote: I guess this post is mostly going

Re: Creating Hiccup From Code Keeping Formatting and Comments

2015-01-04 Thread Thomas Heller
it find one that ends in ;; END. All lines are then joined and tada you got your function body with all indentation. If you want to do more advanced parsing you leave the ;; END bit out but I just wanted to test the concept. ;) Maybe this works for you. Cheers, /thomas On Sunday, January 4

Re: Creating Hiccup From Code Keeping Formatting and Comments

2015-01-04 Thread Thomas Heller
Oops, simplified a little. We already have access to the title. ;) On Monday, January 5, 2015 1:09:24 AM UTC+1, Thomas Heller wrote: Here is a crazy idea I had. https://gist.github.com/thheller/ad7dc6234f205cf4a53f Basically it slurps the .clj file of the current namespace, then looks

Please critique my code (barber problem with core.async)

2015-01-02 Thread Thomas
that I use the two atoms as counters. I also wonder if there is a better way to time the ten seconds, something instead of the atom. So please critique the code below, any comments, improvements, obfuscations etc. are welcome!! Thomas (ns barber.core (:require [clojure.core.async :as async

Re: Using dev/user.clj breaks java compilation

2015-01-02 Thread Thomas Heller
)) This will basically load everything on-demand (eg. when you call the start function) instead of always. HTH, /thomas On Friday, January 2, 2015 9:03:22 PM UTC+1, David James wrote: I noticed this issue which I'm currently facing: https://github.com/technomancy/leiningen/issues/1477

Re: Please critique my code (barber problem with core.async)

2015-01-02 Thread Thomas
On Friday, 2 January 2015 16:45:14 UTC, Erik Price wrote: ;(async/timeout (* 10 1000)) ;; not sure why this doesn’t work here, would make it portable to clojureScript I think Did you forget to use ! on that line? e .. :) thank you!!! Thomas -- You received

Re: Handling increasingly-intensive processes

2014-12-15 Thread Thomas Heller
in short. Without exact knowledge of what your app/business needs look like it is impossible to make the correct recommendation. HTH, /thomas On Monday, December 15, 2014 4:54:04 AM UTC+1, Sam Raker wrote: I'm (still) pulling tweets from twitter, processing them, and storing them in CouchDB

Re: Ring and Compojure with Node.js via Clojurescript

2014-12-09 Thread Thomas Heller
Clojure Ring Handler and plug it into ClojureScript/Node, at least not likely as soon as you do something with IO. Just my 2 cents, /thomas On Monday, December 8, 2014 3:50:48 PM UTC+1, Matthew Molloy wrote: Dear Community, I love making Clojure web apps, however their startup time is a serious

Re: clojure + voltdb

2014-12-07 Thread Thomas Steffes
Hey Todd, any chance you still have this kicking around somewhere? On Friday, July 9, 2010 2:03:05 AM UTC-4, Todd wrote: I've created a basic project to show how to create a voltdb database, and then to create java and clojure clients for this database:

Re: ring-transit issue

2014-12-02 Thread Thomas
/wrap-transit-params) (trans/wrap-transit-response))) The change that made the difference seems to the the ring-response/response call in the get-data function. I hope that this helps other people and a big thank you to Ahmad for a hint in the right direction. Thomas -- You received

ring-transit issue

2014-11-28 Thread Thomas
by postman. I am sure the error is between my ears ;) but I have no idea what!! Any ideas? TIA, Thomas -- 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

Re: If code is data why do we use text editors?

2014-11-17 Thread Thomas Huber
I've fixed it. You can still save your programm as a data structure even if its wrong. Or am I missing your point? Thomas Am Freitag, 14. November 2014 18:05:47 UTC+1 schrieb Phillip Lord: I can think of several reasons. First and most important, code is data, but source files

Re: If code is data why do we use text editors?

2014-11-17 Thread Thomas Huber
/Datomic/codeq are tools that somehow keep your code in a database instead of plain text. On Friday, 14 November 2014 12:42:57 UTC, Thomas Huber wrote: Hi, here is an idea that has been in my mind for a while. I wonder what you think about it. In Clojure code is data, right? But when we

If code is data why do we use text editors?

2014-11-14 Thread Thomas Huber
Hi, here is an idea that has been in my mind for a while. I wonder what you think about it. In Clojure code is data, right? But when we program we manipulate flat text files, not the data directly. Imagine your source code where a data structure (in memory). And programming is done by

Re: Idiomatic way to return a single value from an async function

2014-11-11 Thread Thomas Heller
of coordination required between the different parts. There is no universally correct way. Just my 2 cents, /thomas On Monday, November 10, 2014 5:30:41 PM UTC+1, Alexander Kiel wrote: Hi, what is the most idiomatic way to return a single value from an async function in Clojure? A: return a channel

Re: Mutable local variables

2014-11-10 Thread Thomas Heller
-friendly since you don't have to repeat everything all the time. HTH, /thomas On Monday, November 10, 2014 8:21:57 AM UTC+1, Jacob Goodson wrote: Sometimes, when writing code that loops with a good bit of branching, it can be quite annoying to stay immutable. (loop [way 1

Re: io/writer + map/recur

2014-11-01 Thread Thomas Heller
that, never use something lazy with IO unless you remember to doall. HTH, /thomas http://grimoire.arrdem.com/1.6.0/clojure.core/spit/ On Friday, October 31, 2014 9:08:01 PM UTC+1, Sam Raker wrote: I'm writing some stuff to interact with the Twitter API. I want to be able to write tweets

Re: [ANN] shadow-pgsql: PostgreSQL without JDBC

2014-10-17 Thread Thomas Heller
executed successfully and no major issues have come up. There are still some features missing but if you only need basic SQL features it should all work out. Happy to talk about it if anyone is interested. Hope to find some time next month to write some docs and cut a proper release. Cheers, /thomas

  1   2   3   4   >