Re: [ANN] Truss, an assertions lib for Clojure/Script

2016-01-12 Thread Peter Taoussanis
BTW have had some folks comment on the length of the video. This wasn't clear, so will point it out now: if you're looking for a quick overview I'd start with the Quickstart (https://github.com/ptaoussanis/truss#quickstart) and examples (https://github.com/ptaoussanis/truss#detailed-usage) rath

Re: [ANN] Truss, an assertions lib for Clojure/Script

2016-01-12 Thread Peter Taoussanis
> Thanks Peter, I like it a lot, I mean a lot… > Heh heh, thanks mimmo - appreciate 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 moderat

Re: Anyone help me to add "clojure-china.org" to "Clojure User Groups" page please?

2016-01-12 Thread Alex Miller
Added! On Tuesday, January 12, 2016 at 9:20:18 PM UTC-6, Jiyin Yiyong wrote: > > Forgot to add url http://clojure-china.org/ > We also got a weibo account http://weibo.com/clojurechina > > On Wednesday, January 13, 2016 at 11:19:17 AM UTC+8, Jiyin Yiyong wrote: >> >> http://dev.clojure.org/display

Re: Why do map/get and similar return nil if not found?

2016-01-12 Thread Alex Miller
On Tuesday, January 12, 2016 at 7:54:21 PM UTC-6, Matching Socks wrote: > > > To add to the ideas above -- > > When you want to avoid misspelling the keys of record-like maps, you can > define and use constant vars for the keys (so the compiler will verify > references). > imo, this is an anti

Re: Anyone help me to add "clojure-china.org" to "Clojure User Groups" page please?

2016-01-12 Thread Jiyin Yiyong
Forgot to add url http://clojure-china.org/ We also got a weibo account http://weibo.com/clojurechina On Wednesday, January 13, 2016 at 11:19:17 AM UTC+8, Jiyin Yiyong wrote: > > http://dev.clojure.org/display/community/Clojure+User+Groups > > We already have some visits every day: > > > >

Anyone help me to add "clojure-china.org" to "Clojure User Groups" page please?

2016-01-12 Thread Jiyin Yiyong
http://dev.clojure.org/display/community/Clojure+User+Groups We already have some visits every day: -- You received this message because you are subscr

Re: Why do map/get and similar return nil if not found?

2016-01-12 Thread Matching Socks
To add to the ideas above -- When you want to avoid misspelling the keys of record-like maps, you can define and use constant vars for the keys (so the compiler will verify references). The 'persistency' of data structures in Clojure really puts the shoe on the other foot. Consumers of a m

Re: Why do map/get and similar return nil if not found?

2016-01-12 Thread Elliot Bulmer
I agree with the stance that nil is a value and it is the responsibility of the caller to throw if nil indicates an error in the calling context. On Wednesday, January 13, 2016 at 4:25:56 AM UTC+8, mattias w wrote: > > Clojure and Erlang are very similar, except for the syntax, macros and > that

Re: Why do map/get and similar return nil if not found?

2016-01-12 Thread Sean Corfield
Timothy Baldridge wrote on Tuesday, January 12, 2016 at 1:56 PM: Since most functions in core also support nil, it isn't as big of an issue as some make it out to be. So things like this work as expected, even if a nil exists somewhere Indeed. This is just idiomatic Clojure but it does take some

Re: Why do map/get and similar return nil if not found?

2016-01-12 Thread Dennis Haupt
i agree with the fast fail camp if a value is nil but is not supposed to be, i want the program to immediately tell me about that instead of telling me later and force me to trace it back. in scala, this is solved by providing 2 methods. one that gives you a result or crashes, one that maybe gives

Re: Why do map/get and similar return nil if not found?

2016-01-12 Thread Gregg Reynolds
On Jan 12, 2016 2:25 PM, "mattias w" wrote: > > Clojure and Erlang are very similar, except for the syntax, macros and that you can use Java libraries. > > There is one big difference: In Erlang, fail as early as possible is the norm. In Clojure it is almost the opposite. > > Many errors in Clojur

Re: Why do map/get and similar return nil if not found?

2016-01-12 Thread Timothy Baldridge
Since most functions in core also support nil, it isn't as big of an issue as some make it out to be. So things like this work as expected, even if a nil exists somewhere (-> coll (map first) (filter even?) count) Since all these functions support nil it really isn't a problem.

Re: Why do map/get and similar return nil if not found?

2016-01-12 Thread Alan Thompson
If the assumptions of a function call aren't satisfied, I find the "silent failure" of returning nil to be extremely problematic. After all, you can't fix a problem if you don't know you have a problem (or where it is). As a result, I am definitely in the camp of the "fail-fast" philosophy. Liber

San Diego Functional Programming Meetup

2016-01-12 Thread Alan Thompson
Hi - If anybody is in the San Diego area, we are having our monthly Clojure/FP meetup tomorrow evening. All are welcome! Alan San Diego Functional Programming Meetup San Diego Clojure Users Group Wednesday, January 13, 2016 at 7:30 PM Ansir Innovation Center 4685 Convoy St Suite 210 (upstairs)

Why do map/get and similar return nil if not found?

2016-01-12 Thread mattias w
Clojure and Erlang are very similar, except for the syntax, macros and that you can use Java libraries. There is one big difference: In Erlang, fail as early as possible is the norm. In Clojure it is almost the opposite. Many errors in Clojure code will result in nil, and most operations acce

[ANN] io.aviso/pretty 0.1.21 -- pretty printing of Clojure exceptions

2016-01-12 Thread Howard Lewis Ship
Library for helping print things prettily, in Clojure - ANSI fonts, formatted exceptions This release adds improved docstrings for the ANSI font constants and functions. It understands Clojure's invokePrim() stack frames, and that .cljc sources (from 1.7) are also Clojure. It is now possible to

Re: [ANN] Truss, an assertions lib for Clojure/Script

2016-01-12 Thread Mimmo Cosenza
Thanks Peter, I like it a lot, I mean a lot… mimmo > On Jan 12, 2016, at 9:06 AM, Peter Taoussanis wrote: > > Hi all, > > Quick update: have published a new assertions lib today for Clojure and > ClojureScript called Truss. > > tl;dr - can help you improve Clojure/Script error messages in hig

[ANN] Truss, an assertions lib for Clojure/Script

2016-01-12 Thread Peter Taoussanis
Hi all, Quick update: have published a new assertions lib today for Clojure and ClojureScript called Truss. tl;dr - can help you improve Clojure/Script error messages in high-value locations. Docs and info at: https://github.com/ptaoussanis/truss Introductory talk at: https://youtu.be/gMB4Y-EI