Re: Python dataclass equivalent

2022-01-20 Thread James Reeves
e.com/group/clojure?hl=en > --- > You received this message because you are subscribed to the Google Groups > "Clojure" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to clojure+unsubscr...@googlegroups.com. > To view this di

Re: Rationale of behavior when invoking composite data type as 0-arity function

2021-11-21 Thread James Reeves
ap a very common operation, treating a map as a function makes intuitive sense. A function is a mapping between two sets; a map is also a mapping between two sets. It's logical that they might share an interface. -- James Reeves booleanknot.com -- You received this message because yo

Re: clojure is supposed to be 'code is data' yet I can't add to the end of a list?

2021-07-19 Thread James Reeves
On Mon, 19 Jul 2021, at 2:00 PM, SideStep wrote: > Thanks James, will for something like it I think. Still, would be nice if > code was manipulatable with ease - clojure style. Code-is-data such a > powerful idea. > > On Sunday, July 18, 2021 at 7:43:20 PM UTC+2 James Reev

Re: Strange Vector failure

2021-07-18 Thread James Reeves
Google Groups >> "Clojure" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to clojure+unsubscr...@googlegroups.com. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/clojure/CAMZDCY3B

Re: Strange Vector failure

2021-07-18 Thread James Reeves
visit > https://groups.google.com/d/msgid/clojure/f67cfcd0-8e1e-4780-bc00-f6993979e7afn%40googlegroups.com > > <https://groups.google.com/d/msgid/clojure/f67cfcd0-8e1e-4780-bc00-f6993979e7afn%40googlegroups.com?utm_medium=email&utm_source=footer>. -- James Reeves booleanknot.co

Re: clojure is supposed to be 'code is data' yet I can't add to the end of a list?

2021-07-18 Thread James Reeves
group. > To post to this group, send email to clojure@googlegroups.com > Note that posts from new members are moderated - please be patient with your > first post. > To unsubscribe from this group, send email to > clojure+unsubscr...@googlegroups.com > For more options, visit this

Re: [ANN] Important upcoming changes to Clojars

2021-03-01 Thread James Reeves
ved this message because you are subscribed to the Google > Groups "Clojure" group. > To post to this group, send email to clojure@googlegroups.com > Note that posts from new members are moderated - please be patient with your > first post. > To unsubscribe from this group

Re: clojure.edn/read isn't spec compliant

2020-10-20 Thread James Reeves
On Wednesday, 21 October 2020 at 00:42:32 UTC+1 EuAndreh wrote: > But that doesn't apply to clojure.edn: it is code for a format with an > specification, and it goes against the specification. > Where in the specification does it say that the edn reader should throw exceptions on errors? -- Y

Re: Building klipse demands too much

2020-06-27 Thread James Reeves
Z327ANPOyG%3DrM4L%2Bs6du-hY3RSvD3rbA%40mail.gmail.com > <https://groups.google.com/d/msgid/clojure/CAEtmmez6_488LoQzw%2BZ327ANPOyG%3DrM4L%2Bs6du-hY3RSvD3rbA%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > -- James Reeves booleanknot.com -- You received this message be

Re: first time without state - and I'm lost

2020-05-13 Thread James Reeves
On Wed, 13 May 2020 at 12:16, Matthew Downey wrote: > The most similar thing you could do to your Java code would be keeping > the token in an atom inside of a connection record. > As a quick note, if you don't need polymorphism, maps should be favoured over records. --

Re: COVID-19 related layoffs

2020-03-18 Thread James Reeves
msgid/clojure/ff7de3a8-744a-4ac8-8ca7-697522fe2ecd%40googlegroups.com > <https://groups.google.com/d/msgid/clojure/ff7de3a8-744a-4ac8-8ca7-697522fe2ecd%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- James Reeves booleanknot.com -- You received this message bec

Re: Bit rot and leiningen?

2020-02-04 Thread James Reeves
ns, visit this group at > http://groups.google.com/group/clojure?hl=en > --- > You received this message because you are subscribed to the Google Groups > "Clojure" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to clojure+unsu

Re: Keys in EDN maps: keywords or symbols

2019-10-25 Thread James Reeves
t; "Clojure" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to clojure+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/clojure/68a3fce8-b63a-420b-9fbd-904f911a746b%40googlegro

Re: Keys in EDN maps: keywords or symbols

2019-10-24 Thread James Reeves
ond itself, then it should be a keyword. Contrast that to a symbol like: clojure.core/conj We know that symbol identifies a clojure function. Even outside of a map, it has an external identity. -- James Reeves booleanknot.com -- You received this message because you are subscribed to t

Re: Keys in EDN maps: keywords or symbols

2019-10-24 Thread James Reeves
le.com/d/msgid/clojure/b4c1d021-a624-482b-9e75-fa5c08057a42%40googlegroups.com > <https://groups.google.com/d/msgid/clojure/b4c1d021-a624-482b-9e75-fa5c08057a42%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- James Reeves booleanknot.com -- You received this mes

Re: The magic of Lisps

2019-04-28 Thread James Reeves
s.google.com/group/clojure?hl=en > --- > You received this message because you are subscribed to the Google Groups > "Clojure" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to clojure+unsubscr...@googlegroups.com. >

Re: Noob question on the --> macro implementation

2019-01-26 Thread James Reeves
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 > --- > You received this message because you are subscribed

Re: undocumented one-argument call of reducer

2019-01-25 Thread James Reeves
ribed to the Google Groups > "Clojure" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to clojure+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- James Reeves booleanknot.com --

Re: transducer parallelism

2019-01-25 Thread James Reeves
re+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- James Reeves booleanknot.com -- 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

Re: How should I debug a poorly performing small web app, using Jetty?

2019-01-19 Thread James Reeves
t > http://groups.google.com/group/clojure?hl=en > --- > You received this message because you are subscribed to the Google Groups > "Clojure" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to clojure+unsubscr...@goog

Re: Any way to replace function body?

2019-01-19 Thread James Reeves
gle.com/group/clojure?hl=en > --- > You received this message because you are subscribed to the Google Groups > "Clojure" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to clojure+unsubscr...@googlegroups.com. > For more optio

Re: Custom vectors/maps and sequence functions

2019-01-15 Thread James Reeves
on of IPersistentCollection and where xform is your transducer. So for example: (into (empty table) (comp (filter process?) (map process)) table) -- James Reeves booleanknot.com -- You received this message because you are subscribed to the Google Groups "Clojure" group. To

Re: What do Clojure developers use for recurring functions, other than at-at

2018-12-17 Thread James Reeves
group/clojure?hl=en > --- > You received this message because you are subscribed to the Google Groups > "Clojure" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to clojure+unsubscr...@googlegroups.com. > For more options, visi

Re: [ANN] Clojure 1.10 has been released!

2018-12-17 Thread James Reeves
e.com/group/clojure?hl=en > --- > You received this message because you are subscribed to the Google Groups > "Clojure" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to clojure+unsubscr...@googlegroups.com. > For more options,

Re: What's the end goal for tools.deps?

2018-11-04 Thread James Reeves
7;s a case of Leiningen not being "official", but that it's design isn't quite in the direction the core devs want to head toward. -- James Reeves booleanknot.com -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to thi

Re: Mail queue thread

2018-10-27 Thread James Reeves
t; are interested in the status (no use case yet), it would be easy to just > add more return channels to the email. Does this also seem over-enginereed > compared to just returning the future from the worker and letting it bubble > up to however is interested? > > Thanks

Re: Mail queue thread

2018-10-26 Thread James Reeves
, and what's your reasoning for not handling it in your "send-email!" function? -- James Reeves booleanknot.com -- 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

Re: Mail queue thread

2018-10-25 Thread James Reeves
pool 0)(send-email unimportant-mail))] (prn @result1) (prn @result2)) Which is probably easier than messing around with the executor classes directly. -- James Reeves booleanknot.com -- You received this message because you are subscribed to the Google Groups "Clojure" group. T

Re: Mail queue thread

2018-10-25 Thread James Reeves
r under, and then make it configurable from an environment variable or system property. That way you can tune the service without changing the code. (def mail-pool-size (Integer/parseInt (or (System/getenv "MAIL_POOL_SIZE") "32"))) -- James Reeves booleanknot.com -- You rec

Re: Mail queue thread

2018-10-25 Thread James Reeves
; to guard against that. > > Thanks, > Brjánn > > On Thu, 25 Oct 2018 at 18:57, James Reeves wrote: > >> Hi Brjánn, >> >> Executing queued jobs in a background thread is a common task, and as it >> happens there's a set of Java classes to do just that.

Re: Mail queue thread

2018-10-25 Thread James Reeves
to clojure@googlegroups.com > Note that posts from new members are moderated - please be patient with > your first post. > To unsubscribe from this group, send email to > clojure+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/cloj

Re: Keyword namespacing best practices

2018-10-01 Thread James Reeves
ou are subscribed to the Google Groups > "Clojure" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to clojure+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- James Reeves booleankn

Re: Clojure(Script) web apps in 2018

2018-09-24 Thread James Reeves
ps.google.com/d/optout. >>> >> -- >> - sent from my mobile >> >> -- >> 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 >> No

Re: How to escape a space in a keyword?

2018-08-09 Thread James Reeves
If Clojure lacks a type that exactly matches ION's symbol type, why not add your own type with a record, then add a data reader for it. For example: #ion/symbol "foo" On Thu, 9 Aug 2018, 05:48 Didier, wrote: > Thanks Andy, ya I actually realized this, I'm using a custom reader > literal now ins

Re: Using dynamically loaded namespaces like plug-ins

2018-07-29 Thread James Reeves
d this message because you are subscribed to the Google > Groups "Clojure" group. > To post to this group, send email to clojure@googlegroups.com > Note that posts from new members are moderated - please be patient with > your first post. > To unsubscribe from this group, send

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

2018-07-22 Thread James Reeves
why there are lists and vectors when they behave in the same way. Then you'd have the same problem, except worse, as you'd also need to explain that "comb" is just a crutch that shouldn't be used outside of the classroom. -- James Reeves booleanknot.com -- You

Re: How define alias for .indexOf? (def somealias .indexOf) does not work.

2018-07-19 Thread James Reeves
bscribe from this group and stop receiving emails from it, send an > email to clojure+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- James Reeves booleanknot.com -- You received this message because you are subscribed to the Google Groups

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

2018-07-18 Thread James Reeves
nition of "literal", no? James talked about > evaluation, not printed form. Value != Print representation? > In practical terms there's no real distinction. All data literals in Clojure can be printed. -- James Reeves booleanknot.com -- You received this message because you are

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

2018-07-18 Thread James Reeves
On Wed, 18 Jul 2018 at 20:19, Gregg Reynolds wrote: > > On Wed, Jul 18, 2018, 1:55 PM James Reeves wrote: > >> >> Function expressions don't evaluate to themselves. >> > > To me that means either the definition is wrong or your literal? is > rigged. P

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

2018-07-18 Thread James Reeves
On Wed, 18 Jul 2018 at 19:38, Gregg Reynolds wrote: > > On Tue, Jul 17, 2018, 4:11 PM James Reeves wrote: > >> >> A data literal evaluates to itself. So for example, `2` is a literal, >> because we only need to read it to know its value, whereas `(+ 1 1)` >>

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

2018-07-17 Thread James Reeves
e a set. A set happens to also be efficient at checking whether an item is contained within it, but this efficiency follows from how the data is intended to be used. -- James Reeves booleanknot.com -- You received this message because you are subscribed to the Google Groups "Clojure" group

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

2018-07-17 Thread James Reeves
ticularly useful for students, as the teacher should be encouraging them to think *more* about the data structures they're using, not less. -- James Reeves booleanknot.com -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this g

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

2018-07-17 Thread James Reeves
ls. For data that isn't a standard collection type, there are tagged literals. Clojure syntax starts from a representation of data, and in order to really understand it, I think it needs to be taught from this principle as well. -- James Reeves booleanknot.com -- You received this messa

Re: Spaces between brackets?

2018-06-22 Thread James Reeves
?hl=en > --- > You received this message because you are subscribed to the Google Groups > "Clojure" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to clojure+unsubscr...@googlegroups.com. > For more options, visit https://gro

Re: Clojure Group

2018-04-16 Thread James Reeves
On 16 April 2018 at 17:36, Bijay Paudel wrote: > I post lots of questions but I did not get any response > Are you sure they're getting through? I just did a search for your email address in the Clojure group and got this thread as the only result. -- James Reeves booleanknot.c

Re: Clojure Games

2018-04-16 Thread James Reeves
d to the Google Groups > "Clojure" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to clojure+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- James Reeves booleanknot.com -- You r

Re: Writing a text adventure in Clojure

2018-03-29 Thread James Reeves
roup. > To post to this group, send email to clojure@googlegroups.com > Note that posts from new members are moderated - please be patient with > your first post. > To unsubscribe from this group, send email to > clojure+unsubscr...@googlegroups.com > For more options, visit this g

Re: lein-codox custom writer

2018-03-05 Thread James Reeves
n > email to clojure+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- James Reeves booleanknot.com -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to

Re: [?] Adding my own function to clojure.core namespace

2018-02-25 Thread James Reeves
you load in the dev namespace, and in production the prod namespace will contain the -main function that starts your application. You can omit the development namespace and anything it requires from the production classpath when you compile the jar. -- James Reeves booleanknot.com -- You rec

Re: Help please: New to clojure development

2018-02-05 Thread James Reeves
lt" "default" "default") > > -- > 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 patie

Re: what does future do after fn finish ?

2018-01-31 Thread James Reeves
future I suppose that the memory (data are > kept as #{} set) is not released. The task returns only integer so I do not > think that might cause the problem. > Can you provide more detail? You keep alluding to things that you don't provide code for, such as the sets of data. -- Jame

Re: Is str's behavior changed?

2018-01-14 Thread James Reeves
http://groups.google.com/group/clojure?hl=en > --- > You received this message because you are subscribed to the Google Groups > "Clojure" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to clojure+unsubscr...@googlegroups.com. >

Re: What's up with IMeta?

2017-11-05 Thread James Reeves
Thus the implementation takes the second approach. > Why can't it just memoize the thunk when creating a new instance? -- James Reeves booleanknot.com -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send

Re: What's up with IMeta?

2017-11-04 Thread James Reeves
can only create a new IObj with new metadata. And then I'm confused as to why that would cause lazy-seq to realize their > head? Can't two lazy-seq share the same head? > This I'm not too certain about. It may just be an implementation detail. -- James Reeves booleanknot.c

Re: What's up with IMeta?

2017-11-04 Thread James Reeves
- an > object with different metadata is a different object. One consequence of > this is that applying metadata to a lazy sequence will realize the head of > the sequence so that both objects can share the same sequence. > What confuses you about it? Is it the "realize the head of

Re: What's up with IMeta?

2017-11-02 Thread James Reeves
ey will be considered to be equal: user=> (def m1 {:a 1}) #'user/m1 user=> (def m2 (with-meta m1 {:x 2})) #'user/m2 user=> (= m1 m2) true user=> (identical? m1 m2) false -- James Reeves booleanknot.com -- You received this message because you are subscribed to

Re: What's up with IMeta?

2017-11-01 Thread James Reeves
ge because you are subscribed to the Google Groups > "Clojure" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to clojure+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- James

Re: Using ring, jetty plugin: No reader function for tag object

2017-10-22 Thread James Reeves
> 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 > --- > You received this message because you are subscribed to the Google Groups > "Clojure&qu

Re: An idea to improve foundations of documentation in clojure

2017-10-17 Thread James Reeves
mbers 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 > --- > You received this message because yo

Re: hello world question !!!

2017-10-13 Thread James Reeves
> user=> ^C[mattei@moita ~]$ > > [mattei@moita ~]$ cat clojure/examples/hello.clj > (ns clojure.examples.hello > (:gen-class)) > > (defn -main > [greetee] > (println (str "Hello " greetee "!"))) > > On Friday, October 13, 2017 at 4:48:40

Re: hello world question !!!

2017-10-13 Thread James Reeves
oogle.com/group/clojure?hl=en > --- > You received this message because you are subscribed to the Google Groups > "Clojure" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to clojure+unsubscr...@googlegroups.com. > For more opti

Re: CLJS: experiencing "callback envy" re closures as DOM event handlers

2017-10-11 Thread James Reeves
st. > 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 > --- > You received this message because you are subscribed to the Google Groups > "Clojure&qu

Re: Ring, redirect with flash

2017-09-13 Thread James Reeves
tp://groups.google.com/group/clojure?hl=en > --- > You received this message because you are subscribed to the Google Groups > "Clojure" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to clojure+unsubscr...@googlegroups.com. > For more opti

Re: Question about Clojure parallelization

2017-09-12 Thread James Reeves
ated - 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 > --- > You received this message because you are subscr

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

2017-09-02 Thread James Reeves
;, and Clojure is telling you, "False, it's a function". Then you ask "Is identity the boolean value false?", and clojure replies, "Also false, it's still a function.". Then finally you ask, "Is false equal to false?" and Clojure says, "True."

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

2017-08-22 Thread James Reeves
patible with "into" like functions: (def latest-values (async/into {} ch)) I don't see how you can say {k v} is somehow fine, but a stream of [k v] pairs over time is somehow bad. -- James Reeves booleanknot.com -- You received this message because you are subscribed to the Go

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

2017-08-22 Thread James Reeves
On 23 August 2017 at 04:27, Timothy Baldridge wrote: > But Datomic has E in [e a v] which links multiple [a v] pairs into an > entity...which is basically a map. So I don't think that applies here. > Except that [e a v t] facts in Datomic are ordered and not necessarily unique, and that's my par

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

2017-08-22 Thread James Reeves
und "Bob" > :data/key "444-434-3323" > :server/ip } > > Now not only do I know what data I got, but where it came from, the key I > originally used, etc. > Which is useful only if you plan on using that additional data. If you are only ever interested in th

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

2017-08-22 Thread James Reeves
[:request/protocol "HTTP/1.1"] [:request/header ["host" "www.example.com"]] I'm not saying that variants should be favoured over maps in all situations; just that there are situations where you're certain that you need key/value pairings. -- James Reeves bool

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

2017-08-22 Thread James Reeves
isn't the only way of representing data like this, but it is probably the most concise. -- James Reeves booleanknot.com -- 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

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

2017-08-22 Thread James Reeves
But if you just have a key/value pairing, the value alone doesn't tell you much: "Tim" Using a vector to represent a key/value seems to fit in well with how Clojure currently works: (find m :person/name) => [:person/name "Tim"] But there's no "s/variant&q

Re: Entity–component–system and Clojure

2017-08-15 Thread James Reeves
email to clojure+unsubscr...@googlegroups.com. > > For more options, visit https://groups.google.com/d/optout. > > -- > You received this message because you are subscribed to the Google > Groups "Clojure" group. > To post to this group, send email to clojure@googlegroups.

Re: Why is Clojure slow? (fibonacci)

2017-08-13 Thread James Reeves
You received this message because you are subscribed to the Google Groups > "Clojure" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to clojure+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. &

Re: Bizzarre cond-> behavior

2017-07-21 Thread James Reeves
ot; group. > To post to this group, send email to clojure@googlegroups.com > Note that posts from new members are moderated - please be patient with > your first post. > To unsubscribe from this group, send email to > clojure+unsubscr...@googlegroups.com > For more options, visit t

Re: Control Break in Report

2017-07-15 Thread James Reeves
ure+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/clojure?hl=en > --- > You received this message because you are subscribed to the Google Groups > "Clojure" group. > To unsubscribe from this group and stop receiving

Re: [ANN] antizer 0.2.0

2017-06-30 Thread James Reeves
o unsubscribe from this group and stop receiving emails from it, send an > email to clojure+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- James Reeves booleanknot.com -- You received this message because you are subscribed to the Google Groups &q

Re: error in nrepl

2017-06-23 Thread James Reeves
legroups.com > For more options, visit this group at > http://groups.google.com/group/clojure?hl=en > --- > You received this message because you are subscribed to the Google Groups > "Clojure" group. > To unsubscribe from this group and stop receiving emails from it, s

Re: Stubbornly eager results in clojure.java.jdbc

2017-06-19 Thread James Reeves
end email to clojure@googlegroups.com > Note that posts from new members are moderated - please be patient with > your first post. > To unsubscribe from this group, send email to > clojure+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/gr

Re: How to call Clojure from Java?

2017-06-01 Thread James Reeves
to clojure+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- James Reeves booleanknot.com -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@goog

Re: The simplest way to publish to Clojars?

2017-05-31 Thread James Reeves
ure?hl=en > --- > You received this message because you are subscribed to the Google Groups > "Clojure" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to clojure+unsubscr...@googlegroups.com. > For more options, visit h

Re: Parentheses and Proto-Repl

2017-05-21 Thread James Reeves
options, visit this group at > http://groups.google.com/group/clojure?hl=en > --- > You received this message because you are subscribed to the Google Groups > "Clojure" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to clojure+unsub

Re: Looking for help creating this function/macro

2017-05-18 Thread James Reeves
> Note that posts from new 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 > --- > You

Re: Seeking critique of "pattern" in clojure.spec (LONG)

2017-04-10 Thread James Reeves
Using the preset infinity constants is probably the best solution in this case. :) - James On 11 April 2017 at 01:50, Brian Beckman wrote: > James -- just the kind of simplification I was looking for! In fact, I > think the following will do everything I need --- generate numbers avoiding > onl

Re: Seeking critique of "pattern" in clojure.spec (LONG)

2017-04-10 Thread James Reeves
I think what you have is overly complex for what you want to do. Consider this alternative spec: (s/def ::virtual-time (s/or :number number?, :limit #{::infinity- ::infinity+})) Then we write a comparator: (defn compare-times [a b] (cond (= a b) 0 (= a ::infinity+) +1

Re: Atom in macros ==> Can't embed object in code

2017-04-07 Thread James Reeves
Why don't you put the "let" that defines the atom counter inside the quoted form? - James On 7 April 2017 at 22:21, Max Muranov wrote: > I need to create logger for machine learning debugging. First, I wanted to > perform this string: > > (create-logger 10 "Epoch #" :epoch ", Error: " :error) >

Re: [ANN] irresponsible/codependence 0.1.0 (dependency resolution for apps - a twist on integrant)

2017-03-20 Thread James Reeves
Nice work. The use of keys is interesting. I'm not sure of this affects Codependence, but I released a new version of Integrant a few days ago that supports multiple components of the same type via composite keys. - James On 19 March 2017 at 09:17, James Laver wrote: > Hi all, > > The Irrespon

Re: Error in main using Stuart Sierra's Component when deploying to Heroku

2017-03-13 Thread James Reeves
Can you provide the full error message? So the cause as well as the Component ex-info wrapper? I don't think this is anything to do with :listener being nil. I think you're looking at the Component exception and not checking the "cause" exception with .getCause. My guess is that you're running in

Re: How can I re-order rows in a table (hiccup)?

2017-02-24 Thread James Reeves
Generally you'd approach the problem by using an intermediate structure. For example: (def data {:headers [:color :size] :rows[{:color "blue", :size 4} {:color "red", :size 2} {:color "green", :size 7}]) Then you could build a function that translat

Re: how to send SSL certificate in POST request?

2017-02-21 Thread James Reeves
There's an article here that might be useful to you: https://www.lvh.io/posts/https-requests-with-client-certificates-in-clojure.html With clj-http, you have to use a Java keystore. I wrote a library a few years ago for importing certificates into keystores in Clojure, though I'm not sure how wel

Re: A problem about position of function used by binding

2017-02-06 Thread James Reeves
When you define test4 in your first example, the compiler doesn't know that test1 is dynamic, so it'll optimise out the var for performance. To fix it, ensure that the var is declared as dynamic: (declare ^:dynamic test1) - James On 7 February 2017 at 03:26, guid wrote: > hello everyone > >

Re: newbie trying to mod a clojure based game

2017-01-29 Thread James Reeves
If you have Leiningen installed, then run: lein cljsbuild once The compiled Javascript will be in target/app.js Admittedly this isn't very obvious to beginners unless you happen to guess what the cljsbuild plugin does. - James On 29 January 2017 at 23:45, James Thorne wrote: > I'm trying

[ANN] Hiccup 2.0.0-alpha1

2017-01-14 Thread James Reeves
I'd like to tentatively announce the first alpha version of Hiccup 2.0.0. This release introduces automatically escaping of strings, which has been a frequently requested feature. Hiccup 1.0 had no way of distinguishing between a string of text and a fragment of HTML, so for version 2.0 a new type

[ANN] Ring 1.5.1 released to fix path traversal vulnerability

2017-01-10 Thread James Reeves
There is a path traversal vulnerability in Ring that affects applications that serve resources from the filesystem. It does not affect Ring sites deployed as uberjars. Versions affected: Every version prior to 1.5.1; 1.6.0-beta1 to 1.6.0-beta6 Fixed versions: 1.5.1, 1.6.0-beta7 Link: https://git

Re: The Expires field in cookies has failed pre-assert.

2017-01-08 Thread James Reeves
On 9 January 2017 at 03:43, 松舘剛志 wrote: > I hope to think so too, but I don't know what will happen when remove > cookie... > What's the purpose of your code? Your code takes a response from the Twitter API, and then attempts to proxy it. But why? If we knew what you are trying to accomplish,

Re: The Expires field in cookies has failed pre-assert.

2017-01-08 Thread James Reeves
On 9 January 2017 at 02:37, 松舘剛志 wrote: > Hi, James. > Thank you for response. > > I've understood clj-http response and ring response are not identical. > I hope to know way to respond cookies via Twitter as valid one. > Would you know way to respond it? > Why do you want cookies from Twitter's

Re: The Expires field in cookies has failed pre-assert.

2017-01-08 Thread James Reeves
To add some background to this: the author reported this as an issue on Ring. They appear to be trying to turn clj-http response into a Ring response, so this isn't anything directly to do with cookies. The problem is that clj-http responses are similar but not identical to Ring responses. Perhaps

Re: Kotlin null-safety in Clojure?

2016-12-30 Thread James Reeves
. - James On 30 Dec 2016 8:53 p.m., "gvim" wrote: On 30/12/2016 19:19, James Reeves wrote: > Well, Kotlin is statically typed, and Clojure is dynamically typed. Null > checking on dynamically typed languages is hard (impossible?) to achieve > without impacting performance. &g

Re: Kotlin null-safety in Clojure?

2016-12-30 Thread James Reeves
Well, Kotlin is statically typed, and Clojure is dynamically typed. Null checking on dynamically typed languages is hard (impossible?) to achieve without impacting performance. - James On 30 December 2016 at 17:59, gvim wrote: > What would it take to implement Kotlin's null-safety in Clojure? A

Re: Why does "clojure.core/run!" end in an exclamation mark?

2016-12-25 Thread James Reeves
On 25 December 2016 at 10:30, Paulus Esterhazy wrote: > The following fn names in clojure.core contain an exclamation mark: > > "vswap!" "vreset!" "set-error-mode!" "set-agent-send-executor!" > "disj!" "conj!" "pop!" "compare-and-set!" "reset-meta!" > "set-error-handler!" "set-agent-send-off-exec

Why does "clojure.core/run!" end in an exclamation mark?

2016-12-24 Thread James Reeves
My understanding is that the convention used in clojure.core is to put an exclamation mark onto the end of any function unsafe to run in a transaction. Does the reasoning differ for "run!" or is it assumed that the function passed to "run!" will not usually be idempotent? - James -- You receive

  1   2   3   4   5   6   7   8   9   10   >