Re: Clojure beginner: IF statement error!

2016-03-04 Thread Joseph Smith
Those strings are in the if form. --- Joe R. Smith j...@uwcreations.com @solussd > On Mar 4, 2016, at 6:48 PM, Renata Akhm wrote: > > Hi! I've just strated coding on Clojure and tried to move some of my Lisp > code to Clojure: > (defn mpow > [N M] > (if (= M 0) 1 "in case pow is

Re: clojure, not the go to for data science

2015-03-29 Thread Joseph Smith
Batsov, CIDER is the best Clojure IDE. ;) -- @solussd > On Mar 29, 2015, at 9:14 AM, Bozhidar Batsov wrote: > > And CIDER isn't, right? I find this pretty insulting... > >> On 29 March 2015 at 13:47, Colin Yates wrote: >> Cursive Clojure, LightTable and CounterClockwise are all good Clojur

Re: Kwargs vs explicit parameter map for APIs?

2015-03-23 Thread Joseph Smith
I believe the current behavior with apply is the correct behavior as a map can be treated as a sequence of "MapEntry"s. -- > On Mar 23, 2015, at 19:15, Mark Engelberg wrote: > > Yes, I thought that technique worked, but I just conducted the same > experiment as you did and confirmed that it

Re: When to use metadata

2015-01-29 Thread Joseph Smith
Yes- when the data you want to add shouldn't affect the value of the map. --- Joe R. Smith @solussd > On Jan 29, 2015, at 9:10 AM, Jonathon McKitrick wrote: > > Is there a rule of thumb or set of use cases when metadata is a more elegant > solution than simply adding more entries to a map or

Re: An Averaging function

2014-07-10 Thread Joseph Smith
When you're done with "On Lisp" check out "Let Over Lambda". :) --- @solussd > On Jul 10, 2014, at 5:38 PM, Marcus Blankenship wrote: > > Ok, I'm sure this is heresy, but I'm getting a great deal from Paul Graham's > "On Lisp", even though the examples are in Common Lisp. Really amazing > st

Re: alternative syntax for Clojure? Haskell?

2014-04-05 Thread Joseph Smith
hink ahead about whether or not I need/will need delimiters (e.g. parentheses) depending on how I'm composing code. --- Joseph Smith @solussd > On Apr 5, 2014, at 12:57 PM, Timothy Baldridge wrote: > > I find Haskell syntax completely unreadable. Just saying > >>

Re: [beginner] How do I make a button that could interact with indicator?

2014-01-11 Thread Joseph Smith
A Clojure Swing wrapper (and more!): https://github.com/daveray/seesaw > On Jan 11, 2014, at 4:45, Mark Johns wrote: > > HI everyone, I am new to Clojure in terms of practice. I like the philosophy > of Clojure and I want to start using it. > > I need to build a simple model: button and indic

Re: ANNOUNCE: Cognitect is sponsoring "CinC" contrib libraries

2013-12-06 Thread Joseph Smith
That's awesome! --- Joseph Smith j...@uwcreations.com @solussd > On Dec 6, 2013, at 8:44 AM, David Nolen wrote: > > This is great news! :) > > >> On Thu, Dec 5, 2013 at 3:42 PM, Nicola Mometto wrote: >> >> I'm happy to announce that after Ambros

Re: Why is this count example not working: (count % '(1 2 3))

2013-11-03 Thread Joseph Smith
% is used as the implicit arg in the #() (syntactic sugar) anonymous function form. Maybe you want (count '(1 2 3)). --- Joseph Smith j...@uwcreations.com @solussd > On Nov 3, 2013, at 3:39 PM, Angus wrote: > > (count % '(1 2 3)) > > I am getting error: clojure.l

Re: How to go about 'proving' why dynamically typed languages are better.

2013-10-08 Thread Joseph Smith
This is Clojure- we can have both, at the same time! clojure.core.typed --- Joseph Smith j...@uwcreations.com @solussd > On Oct 8, 2013, at 5:36 PM, Kendall Shaw wrote: > > Some things that I see most of the time when I read debates about dynamic vs > static are: > > 1.

Re: How to go about 'proving' why dynamically typed languages are better.

2013-10-08 Thread Joseph Smith
Just bc it's dynamically typed doesn't mean you can't leverage types for dispatch. Remember, you can single dispatch on type (using protocols), or multi-dispatch using a function applied to the arguments (multimethods). --- Joseph Smith j...@uwcreations.com @solussd > On

Re: as-> macro enhancement request?

2013-08-20 Thread Joseph Smith
Second- that would be a nice, and intuitive, enhancement. --- Joseph Smith j...@uwcreations.com @solussd > On Aug 20, 2013, at 8:52 PM, Ken Restivo wrote: > > I like the as-> macro, mostly because it'd theoretically obviate the need to > include the Swiss Ar

Re: [ANN] bouncer 0.2.4-alpha1 [breaking changes]

2013-08-15 Thread Joseph Smith
I like releasing it as 0.3.0. --- Joseph Smith j...@uwcreations.com @solussd On Aug 15, 2013, at 9:20 AM, Leonardo Borges wrote: > Hi Moritz, > > Thanks for the suggestion. You're right and I missed this. > > I'll make sure I take this into account for t

Re: core.async

2013-06-29 Thread Joseph Smith
"Oh! Clojure has..." --- Joseph Smith @solussd On Jun 29, 2013, at 6:07 AM, Peter Taoussanis wrote: > Oh man, how is everyone _not_ running around screaming about this right now? > > It seems to me that the Clojure space suffers from an unusual malady: it's >

Re: In what OS do you code?

2013-06-14 Thread Joseph Smith
I write code in OSX. --- Joseph Smith @solussd On Jun 14, 2013, at 8:46 AM, Erlis Vidal wrote: > Hi, > > I'm a bit curious to know in what OS do you code. Do you prefer iOS, Linux, > Windows? Why is that? Because the tools? The environment? > > Thanks! > --

Re: Clojure in production

2013-06-10 Thread Joseph Smith
I work for Nanonation Inc (Nanonation.net) and we have a couple internal tools as well as a new product, Viewpoint, where the backend and web portal are both 100% Clojure. --- Joseph Smith j...@uwcreations.com @solussd On Jun 10, 2013, at 6:48 PM, Ignacio Thayer wrote: > ReadyForZero.

Re: Sweet-expressions

2013-03-25 Thread Joseph Smith
I never have understood the obsession with moving the parens in Lisp to the same place they are in C-like languages. I'm not typing any less, and it certainly undermines the code = data (i.e. lisp lists / function calls) homoiconic representation. Is it "clearer"? Maybe to someone unaccustomed t

clojure.core/protocol?

2013-03-08 Thread Joseph Smith
It appears that, as of Clojure 1.5, clojure.core/protocol? is private. Does anyone know the reason for this? What's the proper way to tell if something is a protocol? --- Joseph Smith j...@uwcreations.com @solussd -- -- You received this message because you are subscribed to the G

Re: Best practice - (:keyword map) versus (map :keyword)

2013-01-28 Thread Joseph Smith
The problem with this approach is if your map is a record (e.g. made with defrecord) it will not work. --- Joseph Smith j...@uwcreations.com @solussd On Jan 28, 2013, at 8:31 PM, AtKaaZ wrote: > I would use (map :keyword) myself, for that exact reason(because I'm into > fail

Re: Best practice - (:keyword map) versus (map :keyword)

2013-01-28 Thread Joseph Smith
Also, :keyword is a function, whereas the object you're passing to it may not be a array-map or hash-map (both functions), but a record or other type implementing the map interface. --- Joseph Smith j...@uwcreations.com @solussd On Jan 28, 2013, at 8:09 PM, James Xu wrote: > (:Key

Re: Call for volunteers to help moderate a ClojureScript Google group

2013-01-23 Thread Joseph Smith
I'll help! --- Joseph Smith j...@uwcreations.com @solussd On Jan 23, 2013, at 8:16 PM, Brandon Bloom wrote: > /me steps forward > > On Wednesday, January 23, 2013 10:53:34 AM UTC-8, Andy Fingerhut wrote: >> >> An interest was expressed by a few in having a separate

Re: Clojure 1.5.0 RC 1

2012-12-22 Thread Joseph Smith
Awesome stuff. I'm using those threading macros already. :) --- Joseph Smith j...@uwcreations.com @solussd On Dec 22, 2012, at 1:16 PM, Denis Labaye wrote: > Is the release note here: > https://github.com/clojure/clojure/blob/master/changes.md ? > > Anyway it looks

Re: defrecord and overriding "empty"

2012-12-15 Thread Joseph Smith
Well here I am over a year later with the same problem. I'm curious, what was your solution for the time being? On Tuesday, September 27, 2011 1:06:37 PM UTC-5, David Nolen wrote: > > On Tue, Sep 27, 2011 at 1:54 PM, Nathan Sorenson > > wrote: > >> Should IPersistentCollection even be defining '

Re: Clojure turns 5

2012-10-16 Thread Joseph Smith
Whoo hoo!! Party!!! Thanks to everyone, especially Rich, for creating and contributing to Clojure. :) --- Joseph Smith j...@uwcreations.com @solussd On Oct 16, 2012, at 8:54 PM, Rich Hickey wrote: > I released Clojure 5 years ago today. It's been a terrific ride so far. >

Re: File endings proposal for easier cross-compiling

2012-10-07 Thread Joseph Smith
I like the idea of a scheme like this. On Oct 8, 2012, at 1:44 AM, Jonathan Fischer Friberg wrote: > Hi, > > In my opinion, cross-compiler projects is way too complicated to pull off. > When they really shouldn't be. > Therefore, I'm proposing the following file ending scheme: > > .clj - d

Re: Central screwup

2012-08-16 Thread Joseph Smith
I'm surprised this still hasn't been fixed. I noticed it and raised the issue (well, told people about it on IRC) about 2 weeks ago. I've been pointed at an alternate repo as a workaround. :/ --- Joseph Smith j...@uwcreations.com On Aug 16, 2012, at 5:27 AM, Paul Lam wrote:

Re: Clojure Sticker

2012-06-14 Thread Joseph Smith
Excellent. I'd like a sticker for my notebook. :) --- Joseph Smith j...@uwcreations.com @solussd On Jun 14, 2012, at 11:52 AM, Rich Hickey wrote: > No, you are not allowed to reproduce the Clojure logo and put it up for sale. > > I'd be happy to set up an official way to

Re: Clojure Sticker

2012-06-11 Thread Joseph Smith
Me too! --- Joseph Smith j...@uwcreations.com @solussd On Jun 11, 2012, at 2:08 PM, Christian Guimaraes wrote: > I'm interested also... > > On Sun, Jun 10, 2012 at 2:03 AM, aboy021 wrote: > Is there anywhere that I can get a Clojure sticker? > -- > You received t

Re: Converting project.clj to maven's pom.xml

2012-06-07 Thread Joseph Smith
Doesn't "lein pom" do it? --- Joseph Smith j...@uwcreations.com (402)601-5443 On Jun 6, 2012, at 11:20 PM, Mark Derricutt wrote: > Maybe I should write a lein plugin that generates a pom for my maven plugin - > but that feels a little rude :) > > Mark > &g

Re: Emacs / Emacs Live autocompletion and slime-edit-definition

2012-05-28 Thread Joseph Smith
Oops, mistake in my email, yeah I'm using "meta-dot", M-. Looks like it's able to 'see into' anything I've "required" in the repl. I was hoping it was crawling the project somehow. :D --- Joseph Smith j...@uwcreations.com @solussd On May 2

Emacs / Emacs Live autocompletion and slime-edit-definition

2012-05-28 Thread Joseph Smith
e functions, but not anything in my namespaces. Is there a way to get emacs/slime/whatever to index these so I can M-x . my way around and see docstrings/arg lists? Thanks! --- Joseph Smith j...@uwcreations.com (402)601-5443 -- You received this message because you are subscribed to the Goo

Re: Let over Lambda

2012-05-18 Thread Joseph Smith
I've read it and highly recommend it. It won't necessarily help you program in Clojure, but it will open your eyes to the seemingly limitless potential of macros. You'll find yourself smiling with intrique just about every page- quite thought-provoking. --- Joseph Smith j...@

Re: Where to post job ad

2012-03-30 Thread Joseph Smith
This seems like a good place. Where's the job? :) On Mar 30, 2012, at 7:35 AM, David Jagoe wrote: > G'day everyone > > I am increasingly relying on clojure and plan to use clojureclr and > clojurescript in production too. I will soon need to hire a clojure developer > and was hoping that s

Re: Best IDE

2012-01-20 Thread Joseph Smith
emacs. :D Seriously though, start with viper-mode. --- Joseph Smith j...@uwcreations.com (402)601-5443 On Jan 18, 2012, at 1:35 PM, Jeb Beich wrote: > Any suggestions for a vim man? > > On Wed, Jan 18, 2012 at 1:29 PM, Cedric Greevey wrote: > On Wed, Jan 18, 2012 at 11:18 AM

Re: i am so bored

2012-01-14 Thread Joseph Smith
clojure without calling the stat command from a shell. :/ --- Joseph Smith j...@uwcreations.com (402)601-5443 On Jan 14, 2012, at 6:12 AM, Dennis Haupt wrote: > hi there, > > i am looking for something to do, preferably something that makes me > rich, but that is not a must have

Re: join in clojure

2011-03-05 Thread Joseph Smith
Welcome! --- Joseph Smith j...@uwcreations.com (402)601-5443 On Mar 5, 2011, at 3:52 AM, jaya kala wrote: > hai! how are you I join in clojure > today . > thanking you > > -- > You received this message because you are subscribed to the Google > Groups "Clojure

Re: Regarding lexical scoping and usage of 'let' in a recursive function call

2010-11-12 Thread Joseph Smith
In this case 'memoize' returns a memoized version of the function 'f', which closes over 'mem'. Each time 'memoize' is called a new atom is created, not each time the function it returns is called. --- Joseph Smith j...@uwcreations.com On Nov 11,

Re: Clojure Conference Poll

2010-01-26 Thread Joseph Smith
+1 Lincoln/Omaha Nebraska. :) --- Joseph Smith j...@uwcreations.com (402)601-5443 On Jan 26, 2010, at 2:29 PM, Michel Vollebregt wrote: +1 for Europe On Jan 26, 12:22 am, mudphone wrote: +1 Paris On Jan 22, 11:54 pm, Konrad Hinsen wrote:> On 22 Jan 2010, at 22:15, Wil

Re: gui repl

2010-01-07 Thread Joseph Smith
This is very interesting, but I cannot seem to get Clojure code to execute in it. I have it installed and field thinks it is installed. Do I need to somehow switch modes? --- Joseph Smith j...@uwcreations.com On Jan 4, 2010, at 3:42 PM, Marc Downie wrote: > > Well, if people are

Re: Parenthesis Inference

2009-12-19 Thread Joseph Smith
Oops.. left two parentheses out in my Java code. Guess that just furthers my point. :) > List newObjects = ArrayList(); On Dec 19, 2009, at 12:04 PM, Joseph Smith wrote: > Very abstract java example (as concise as possible): > > List processList(List oldObjects) > { >

Re: Parenthesis Inference

2009-12-19 Thread Joseph Smith
is made harder by blocks of code that frequently extend beyond the height of your screen. IDEs/editors can match parentheses as well. :) - The parentheses make the code sleek and aerodynamic --- Joseph Smith j...@uwcreations.com (402)601-5443 On Dec 19, 2009, at 11:21 AM, David Nolen

Re: Trying to rewrite a loop as map/reduce

2009-12-17 Thread Joseph Smith
What are you using to generate the pretty rainbow perens on your website? --- Joseph Smith j...@uwcreations.com (402)601-5443 On Dec 17, 2009, at 5:25 PM, Meikel Brandmeyer wrote: > Hi, > > Am 16.12.2009 um 17:26 schrieb Meikel Brandmeyer: > >> Well. It was claimed it

Re: Clojure analysis

2009-12-12 Thread Joseph Smith
I think referring to clojure as a multiparadigm languge is incorrect. --- Joseph Smith j...@uwcreations.com (402)601-5443 On Dec 11, 2009, at 3:04 PM, kusi wrote: > http://kusimari.blogspot.com/2009/12/analysing-clojure-programming-language.html > > -- > You received this mes

Re: reduce with-precision using BigDecimal

2009-11-30 Thread Joseph Smith
I see- Sounds like we're on the same page. :) --- Joseph Smith j...@uwcreations.com (402)601-5443 On Nov 30, 2009, at 11:14 AM, John Harrop wrote: > On Mon, Nov 30, 2009 at 7:07 AM, Joseph Smith > wrote: > setScale returns a new BigDecimal with a given scale, it does not

Re: reduce with-precision using BigDecimal

2009-11-30 Thread Joseph Smith
setScale returns a new BigDecimal with a given scale, it does not change the original value. e.g.) user=> (def mybd (BigDecimal. 40)) #'user/mybd user=> (.setScale mybd 4) 40.M user=> mybd 40M --- Joseph Smith j...@uwcreations.com (402)601-5443 On Nov 30, 2009, at

Re: reduce with-precision using BigDecimal

2009-11-29 Thread Joseph Smith
What you want is to set the 'scale' of the BigDecimal. There doesn't seem to be a nice clojure macro for it, but this works: user=> (.setScale (reduce + [15.00M 15.01M 3.00M 3.01M]) 3) 36.020M --- Joseph Smith j...@uwcreations.com (402)601-5443 On Nov 29, 2009,

Re: One benefit of having a REPL

2009-11-28 Thread Joseph Smith
a code too), etc. --- Joseph Smith j...@uwcreations.com (402)601-5443 On Nov 28, 2009, at 7:20 AM, John Harrop wrote: > One benefit of having a REPL: it makes regular expressions usable. > So easy to test and tweak your RE compared to the traditional > compile/test/debug cycle! I never

Re: A Clojure Highlife

2009-11-28 Thread Joseph Smith
idth)] ... No need for the nested doseqs. I'm thinking... clojuriffic? clojured? clojonic? :) --- Joseph Smith j...@uwcreations.com (402)601-5443 On Nov 26, 2009, at 3:37 AM, Chris Jenkins wrote: > Thanks for sharing this. Coincidentally, I just wrote my first > Clojure program

Re: A Clojure Highlife

2009-11-18 Thread Joseph Smith
Heh. I had wondered if you had withdrawn the post since I only saw it in my email box. No worries- I went back and examined my code to make sure it was doing what I thought it was. --- Joseph Smith j...@uwcreations.com (402)601-5443 On Nov 18, 2009, at 7:35 AM, Jeff Heon wrote: > Tha

Re: A Clojure Highlife

2009-11-18 Thread Joseph Smith
ut of memory- the simulation is very unlikely to hit a cycle :) Use the clojure libs I include in the bundle on my website: http://www.solussd.com/wp-content/uploads/2009/11/highlife.zip --- Joseph Smith j...@uwcreations.com (402)601-5443 On Nov 16, 2009, at 8:24 PM, Jeff Heon wrote: >