How to get an error message from Elastisch?

2017-10-03 Thread lawrence . krubner
This is probably a stupid question, but is there an obvious way to get an error message out of Elastisch? I had an app that was working with MongoDB and I was then told I had to use ElasticSearch instead (something about only using AWS for everything) so now I'm trying to get an error message,

Re: ANN: ClojureScript 1.9.946

2017-10-03 Thread Nathan Fisher
Hi David! I'm seeing an issue in one of my larger projects. Will try to isolate tomorrow and get back to you. The simple project in lein-cljsbuild works fine for me with beta1 and this release. Saludos! Nathan On Tue, 3 Oct 2017 at 22:52 David Nolen wrote: >

Re: [core.spec] Stricter map validations?

2017-10-03 Thread Alan Thompson
While it doesn't use spec, you can do this using the validate-map-keys helper function in the Tupelo library . It verify that a map does not contain any keys other than those you specify. The unit test shows it in action: (ns tst.demo.core (:use demo.core

Re: How to send a string to default system printer in Clojure

2017-10-03 Thread Matching Socks
Java says drawString while Clojure says drawstring. The compiler may be using introspection to find that method, and thus will not give you a compile-time message about the mismatch. I think you could avoid the introspection by using the "graphics" method argument instead of the "g2" variable,

ANN: ClojureScript 1.9.946

2017-10-03 Thread David Nolen
ClojureScript, the Clojure compiler that emits JavaScript source code. README and source code: https://github.com/clojure/clojurescript Leiningen dependency information: [org.clojure/clojurescript "1.9.946"] This release contains many bug fixes and addresses feedback from the 1.9.908 release.

Re: [core.spec] Stricter map validations?

2017-10-03 Thread Didier
I'm loving Spec as an FYI, and I'll use it even if it stays as is, even in its alpha state it is a great tool. I also highly value the Clojure core value to avoid breakage, as the cost to enterprise of every migration is very high. I'm just wanting to give more data points to the Core team

Re: [core.spec] Stricter map validations?

2017-10-03 Thread Tommi Reiman
Open Specs seem like a good idea. In real life, we need to close our Data at system borders. With Java, there is Jackson, which fails by default on extra keys. The Schema, the models are closed by default. JSON Schemas can be closed. Saying "use normal clojure" on top of Spec mean

Re: Help ship Clojure 1.9!

2017-10-03 Thread Beau Fabry
We've been using 1.9 in a small app for a while with no issues. After upgrading schema to the latest version (with the PR above) I've also successfully run our larger codebase with 1.9. On Tuesday, October 3, 2017 at 4:41:14 AM UTC-7, stuart@gmail.com wrote: > > Hi Mark, > > I think this

Re: [core.spec] Stricter map validations?

2017-10-03 Thread Alex Miller
On Tuesday, October 3, 2017 at 12:25:40 PM UTC-5, Didier wrote: > > | Spec-tools (https://github.com/metosin/spec-tools) has some tools for > this: the spec visitor (walking over all core specs, e.g. to collect all > registered specs) and map-conformers: fail-on-extra-keys and >

Re: [core.spec] Stricter map validations?

2017-10-03 Thread Alex Miller
On Tuesday, October 3, 2017 at 11:48:04 AM UTC-5, Yuri Govorushchenko wrote: > > 3) I agree that my argumentation was vague but the sentiment still holds > true: I'd like to easily validate keyword args with the same level of > confidence as I can validate positional args. > Nothing is

Re: [core.spec] Stricter map validations?

2017-10-03 Thread Gary Trakhman
I don't disagree that there might be a security use-case, and regardless of how realistic it is businesses need people to tick boxes (that doesn't seem like something core should worry about?), but what is the actual security risk of an unspec'd map value, or things being referenced and unused?

Re: [core.spec] Stricter map validations?

2017-10-03 Thread Didier
| Spec-tools (https://github.com/metosin/spec-tools) has some tools for this: the spec visitor (walking over all core specs, e.g. to collect all registered specs) and map-conformers: fail-on-extra-keys and strip-extra-keys. I understand the core team wanting to take a minimal approach to spec,

Re: [core.spec] Stricter map validations?

2017-10-03 Thread Didier
| I would have had to re-spec all the intermediate functions I'm not able to follow how that is? You would have only needed this if you are somewhere validating or have setup test.check to run. In both cases, if you wanted to validate, why don't you also want to validate this new field? Or

Re: Clojurecademy: Learning Clojure Made Easy

2017-10-03 Thread Ertuğrul Çetin
Thank you, Christopher! I removed terms and user agreements, also changed every project's license under Clojurecademy to MIT, I hope it's all good now, if not I'll make it right until people have no concerns. About CLJS UI, I'm also considering that thing because it might be really useful,

Re: Code Review -- Testing truthiness twice

2017-10-03 Thread hiskennyness
On Sunday, October 1, 2017 at 5:11:55 PM UTC-4, Scott Barrett wrote: > > Clojure noob, here. I'm very excited to be learning about this language > and becoming a part of this community :) I'm writing a function that works > well, but seems just a bit wrong to me, stylistically speaking. I was

Re: Clojurecademy: Learning Clojure Made Easy

2017-10-03 Thread Christopher Small
Concerns over licensing and user agreements and logins aside... REALLY COOL WORK! I haven't dug deeply yet, but it seems you've built a framework for building Clojure based courses here, not just a fixed set of curriculum. And to this effort, bravo! I hope to see this become a very useful

Re: [core.spec] Stricter map validations?

2017-10-03 Thread Yuri Govorushchenko
3) I agree that my argumentation was vague but the sentiment still holds true: I'd like to easily validate keyword args with the same level of confidence as I can validate positional args. 1,2) > Because all map keys are independent and don't rely on each other for ordering. > You can add

Re: [core.spec] Stricter map validations?

2017-10-03 Thread Yuri Govorushchenko
Thank you, it looks handy! On Tuesday, October 3, 2017 at 6:59:27 PM UTC+3, Tommi Reiman wrote: > > Hi. > > Spec-tools (https://github.com/metosin/spec-tools) has some tools for > this: the spec visitor (walking over all core specs, e.g. to collect all > registered specs) and map-conformers:

Re: [core.spec] Stricter map validations?

2017-10-03 Thread Tommi Reiman
Hi. Spec-tools (https://github.com/metosin/spec-tools) has some tools for this: the spec visitor (walking over all core specs, e.g. to collect all registered specs) and map-conformers: fail-on-extra-keys and strip-extra-keys. Here's an example to strip away extra keys: (require

Re: [core.spec] Stricter map validations?

2017-10-03 Thread Alex Miller
On Tuesday, October 3, 2017 at 8:10:30 AM UTC-5, Yuri Govorushchenko wrote: > > 1) About `s/keys` silently ignoring missing value specs. My question was: > "Is there any way to ensure that the keys I used in `s/keys` have the > associated specs defined?." > > Specs can be defined or added

How to send a string to default system printer in Clojure

2017-10-03 Thread Darnaroth Darnarowth
Hello all I am trying to print a string to my printer. I know that if I want to do that from Clojure I need to use Java Interop, specifically the Printable interface and the classes Graphics/Graphics2D and PrinterJob, but I have trouble to convert the equivelant Java code to Clojure. The java

Re: Clojurecademy: Learning Clojure Made Easy

2017-10-03 Thread Ertuğrul Çetin
I removed Terms of Service from the site, also all Clojurecademy projects have MIT license(https://github.com/clojurecademy) and Clojurecademy Web App is going to be an open source project in near future. I hope everything is fine now, if not please let me know I'll do adjusments Thank you...

Re: [core.spec] Stricter map validations?

2017-10-03 Thread Yuri Govorushchenko
1) About `s/keys` silently ignoring missing value specs. My question was: "Is there any way to ensure that the keys I used in `s/keys` have the associated specs defined?." Specs can be defined or added later, so there is no valid way to do this. OK, so requiring that values are spec-ed can't

Re: Clojurecademy: Learning Clojure Made Easy

2017-10-03 Thread Ertuğrul Çetin
My goal is not earning money, this platform will remain free actually and be an open source project when I'm done with unit testing and documentation, my goal is making Clojure adoption as much easy as possible. I'll update Terms and consider your suggestion. On Tuesday, October 3, 2017 at

Re: Reading file to list as char array

2017-10-03 Thread Peter Hull
On Tuesday, 3 October 2017 12:39:47 UTC+1, Furkan Yıldız wrote: > > I am reading a txt file containing words. I need to add these words to the > list as char. For example > > > > I think you need to split into words first using a regex then seq each word (def words (clojure.string/split

Re: Help ship Clojure 1.9!

2017-10-03 Thread Stuart Halloway
Hi Mark, I think this approach totally makes sense, and the alpha naming exists to inform this kind of decision-making. For libraries where the use of spec does not have to be user-facing, I am putting specs in separate (Clojure) namespaces, and loading them in such a way that they can coexist

Reading file to list as char array

2017-10-03 Thread Furkan Yıldız
I am reading a txt file containing words. I need to add these words to the list as char. For example Example txt file: this is a simple test and the result should be the following: '((t h i s) (i s) (a) (s i m p l e) (t e s t) these are the codes I wrote, (def

Re: Clojurecademy: Learning Clojure Made Easy

2017-10-03 Thread Rostislav Svoboda
> Which part(s) is preventing you from contributing? Please the remove that sign-up wall, Terms-of-service nonse and alike. You know what we mean, don't you? If you think your users (= us) need some kind notifications, suspend-resume (i.e. save-load) functionality etc. then make it optional

Re: [core.spec] Stricter map validations?

2017-10-03 Thread Leon Grapenthin
My critique is not towards closed keysets but about being able to (s/keys :req [::some-kw]) without having defined the spec ::some-kw, but e.g. ::soem-kw instead. This can trip you up badly, and not at compile time. I'd be surprised if this never happened to you. Regarding open maps and

Giving away conference passes to Clojure/Conj

2017-10-03 Thread Srihari Sriraman
Hello folks! We have 3 conference passes to Clojure/Conj to give away! We’ll go by the same selection and eligibility criteria as in http://2017.clojure-conj.org/opportunity-grants/. Send an email to divers...@nilenso.com to apply now! Also, it'd be great if you could help spread the word:

Re: [core.spec] Stricter map validations?

2017-10-03 Thread Leon Grapenthin
My critique is not towards closed keysets but about being able to (s/keys :req [::some-kw]) without having defined the spec ::some-kw, but e.g. ::soem-kw instead. This can trip you up badly, and not at compile time. I'd be surprised if this never happened to you. Regarding open maps and

Re: [core.spec] Stricter map validations?

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

Re: Clojurecademy: Learning Clojure Made Easy

2017-10-03 Thread Ertuğrul Çetin
It's auto generated Terms of service, I should admit that I did not read all Terms. Which part(s) is preventing you from contributing? I can remove/change it, community's contribution is very important to platform. On Tuesday, October 3, 2017 at 5:03:12 AM UTC+2, Sam Griffith wrote: > > Terms

Re: [core.spec] Stricter map validations?

2017-10-03 Thread Peter Hull
I have found, as an application evolves, some extra data is required which comes from elsewhere. For example, I have an application where data is read from a network socket, transformed and stored. For auditing, I later decided it was useful to capture the remote address from the socket right