+1 to Bastien's comment.
Your tutorials are by far the best introduction to web programming in
Clojure and Clojurescript on the web. Thank you so much for keeping these
up to date so that we can all benefit from them.
~Gary
--
--
You received this message because you are subscribed to the
This looks incredible! Just bought a copy. Congratulations, Shantanu!
--
--
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
Just to inject another sample into the population:
As another hacker who lives in Emacs, I found the nrepl - cider transition
to be quite painless. It took me maybe an hour of reading the website docs,
installing/uninstalling packages with package.el, and updating the relevant
sections of my
Wait a minute...
#js data literal support added
Holy $#%^!!! Where is this documented?! MUST...USE...NOW!
--
--
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
Thanks, Tim. I somehow missed Brandon's exposition earlier in the thread. These
features look great. Fantastic job, ClojureScript devs!
--
--
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
defqueries for the win!
Excellent minimal syntax choice, Kris. I'm using yesql in my current work
project, and it's been a real delight to work with thus far. Being able to
put multiple queries in one file just makes it that much sweeter.
~Gary
On Tuesday, January 7, 2014 10:57:55 AM UTC-5,
Great job, David. Looking very sharp!
~Gary
--
--
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.
Awesome! Thanks for sharing the link, Tim.
--
--
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
Great job on such a tricky chapter. I particularly enjoyed the hilarious
examples in the spirit of Learn You a Haskell for Great Good.
~Gary
On Wednesday, March 26, 2014 9:45:38 AM UTC-4, Daniel Higginbotham wrote:
I've added a new chapter to Clojure for the Brave and True, Concurrency,
Fantastic job! I wish something like this had been available when I built
my first website with Friend. I ended up rolling my own workflows after
giving up on tracking all the internals of interactive-form.
~Gary
On Tuesday, January 29, 2013 3:55:13 PM UTC-5, Nelson Morris wrote:
I've
Huzzah! The uphill climb continues apace!
On Tuesday, January 29, 2013 10:07:54 PM UTC-5, Tim King wrote:
I am pleased to announce that nrepl.el v0.1.6 has been released, and is
now available on marmalade.
Preview versions of the next release are available on Melpa.
See the Readme on
+1 for org-babel. I put together an example project solving the Potter Kata
on github several months ago, so if someone is looking for some examples of
how you might do LP with org-babel, take a look at it here:
https://github.com/lambdatronic/org-babel-example
Happy hacking,
~Gary
On
+1 for some- and some-.
I use this all the time in my coding. They used to be -? and -? in
clojure.core.incubator, so I'm extremely happy that they finally made their
way into core proper.
On Saturday, March 23, 2013 7:25:00 PM UTC-4, Evan Gamble wrote:
The let? macro addresses such
I just put together a simple example repo on GitHub, containing a literate
programming solution to the Potter Kata
(http://codingdojo.org/cgi-bin/wiki.pl?KataPotter) using Emacs' org-babel
mode. You can check it out here:
https://github.com/lambdatronic/org-babel-example
Also be sure to
Yep. Thanks for the patch, Ben. I had set
org-babel-default-header-args:clojure to '((:noweb . tangle)) in my
.emacs, so I was getting the benefit of automatic noweb expansion when
tangling (but not weaving). It's all fun and games until you break someone
else's setup! ;)
~Gary
On
I'm getting the same multiple JVM starting behavior on Arch Linux using
lein 2.0.0-preview10 and drip 0.1.7. Hmm...
On Monday, September 17, 2012 2:57:00 AM UTC-4, Tassilo Horn wrote:
Denis Labaye denis@gmail.com javascript: writes:
I am still seeing a new JVM being started every drip
A lot of scribble's features are geared towards providing tooling for
Literate Programming, and currently I'm way more than satisfied with
org-babel. This has been built into Emacs by defaut since IIRC version 23.2
or so. Opening any file in org-mode (`M-x org-mode') immediately provides
you
Barzilay wrote:
Gary Johnson gwjohnso at uvm.edu writes:
A lot of scribble's features are geared towards providing tooling for
Literate Programming,
No, this is wrong. The LP that we have is based on Scribble, but it was
done mainly as a demonstration of the benefits you get from having
You have made my dissertation not only bearable but an absolute blast,
Rich. Thank you for your pioneering spirit, endless calls for incorporating
higher principles in programming, and just being that awesome, humble guy
with the crazy hair.
~Gary
On Tuesday, October 16, 2012 9:53:55 PM
Alright, Eli. You've piqued my interest. I'll have to take a closer look
sometime soon.
~Gary
On Wednesday, October 17, 2012 10:22:54 AM UTC-4, Eli Barzilay wrote:
Gary Johnson gwjohnso at uvm.edu writes:
I see. After taking a closer look, I can see that you could do LP in
Scribble
Lee,
My reading of this thread is not quite as pessimistic as yours. Here is
my synthesis for the practical application developer in Clojure from
reading and re-reading all of the posts above. Marshall and Cameron, please
feel free to correct me if I screw anything up here royally. ;-)
When
Thanks for releasing this library. I've written quite a few large
command-line driven applications in Clojure thus far, and each one has used
a slightly different homegrown approach as different core functionality
became available (and the contrib libs kept mutating). Your state monad
inspired
Hey Leonardo,
There's a critical bug in 0.2.2-RC1 in the bouncers.core/wrap function.
An IllegalArgumentException is triggered whenever a validator is not passed
an explicit :message field. It looks like this was introduced in the
process of trying to allow validators to take an arbitrary
Right, I was testing against 1.5.0-RC1 and 1.5.0-RC2. Same problem occurred
both times. I should have reported that in my initial bug report. Sorry
about that. Also, thanks for the quick turnaround. I'll pull it and test it
out.
~Gary
On Monday, January 14, 2013 7:16:29 PM UTC-5, Leonardo
Worked like a charm. Thanks.
On Tuesday, January 15, 2013 12:33:26 PM UTC-5, Gary Johnson wrote:
Right, I was testing against 1.5.0-RC1 and 1.5.0-RC2. Same problem
occurred both times. I should have reported that in my initial bug report.
Sorry about that. Also, thanks for the quick
There's a MELPA package (use `M-x package-list-packages') called
sr-speedbar that displays the speedbar in the same frame you are already
working in. I just stick sr-speedbar-toggle on F11 and call it a day. YMMV.
On Wednesday, January 16, 2013 1:45:35 PM UTC-5, Sean Corfield wrote:
On Wed,
Hi there,
I have an IMO fairly straightforward method for doing this that I wrote
for use in my own flow modelling code. The idea is that you create a matrix
(vector of vectors in my case) containing refs all initialized to some base
value (e.g., 0). Then I wrap my with-animation macro
The condp form is very nice and concise if you have multiple match clauses.
If you are more generally just looking to perform a single
match/assign/branch task, I'd recommend this little nugget of clojure
wisdom: Forget ye not the hidden might of if-let.
(if-let [[_ from to message] (re-find
Ugh. What a pointless thread. Someone could have just said:
---
It's already in clojure 1.5. The form you are looking for is called as-.
Your original example would be written like this:
(as- 3 x (+ 1 x 4) (prn answer: x))
---
Done. Yeesh.
On Sunday, July 14, 2013 12:34:02 PM UTC-4,
Here's the code analogue of your find-assoc-in function for the approach
Cedric is proposing. I actually came to the same solution before reading
the responses to your post, so it's good to see that others also think this
is a more memory efficient approach (obviously for larger vectors than
Tim,
I'm with you 100% on the mind-blowing greatness of literate programming,
but I do have to correct you on org-babel. It is actually a very nicely
done LP development system. You write your content as you would a book or
article, using sections and subsections, paragraphs, ordered and
Again. I'm with you on this one, Tim. Fear not. You aren't the only crazy
Clojure programmer putting the LP bug in people's ears. I must say, your
work on creating a literate version of the Clojure source was really
amazing. Any plans for maintaining it in the future as new Clojure releases
I'm concerned that the ability to freely order comments and code will not
interact well with Clojure's namespaces. With Clojure's namespaces, you
can have things with the same name in two different namespaces. Functions
local to a namespace are referred to in one way, whereas you need
Looks pretty solid. Great work so far.
Also +1 for the Emacs coverage. Despite the fact that our surveys still
show the majority of Clojure users develop in Emacs, this mailing list
frequently exhibits an anything-but-Emacs tone. By all means add links to
other editors for folks who are
Hi Kris,
I really like your approach, but I've also been feeling the burn a bit
with having to store each SQL query in its own file (especially since my
data exploration frequently leaves me cataloging hundreds of them). Take a
look at the approach used in sql-phrasebook:
Reduce is indeed a swiss-army knife for functional programming over
sequences.
Of course, in this particular case (i.e., apply a sequence of functions in
order to an initial value), Clojure's threading operators are the idiomatic
way to go.
(- 6 (+ 12) (* -1))
Cheers,
~Gary
--
You
puzzler and Tim,
Well said, gentlemen. As someone who has been using LP heavily for the
past two years, I have certainly reaped many if not most of the benefits
regularly argued in its favor (and of course, I've wrestled with all the
usual tooling issues as well). While I agree with puzzler
Emacs org-mode provides a markdown-like language, which can be organized
into a foldable outline (e.g., chapters, sections, subsections,
subsubsections). Syntax is provided for headers, ordered/unordered lists,
tables, inline images/figures, hyperlinks, footnotes, and (most importantly
for LP)
Bridget and Guru are both right about the reason that \3 is found at
position 13 in the string. However, the code you typed isn't valid Clojure,
since the pos function expects pred to be a function of v. Thus, your pos
call would need to look like this:
(pos #(= % \3) :a 4 :b 1 :c 3 :d 4) =
Hi folks,
I suspect I'm the Gary that Tim thought he was referring to since I've
posted on several of his other LP-related threads (though not this one
until now). I'm reading along and enjoying the back and forth as usual, but
I'm sorry to say that I don't have much to add to this
On Thursday, May 22, 2014 6:20:39 PM UTC-4, Mars0i wrote:
On Thursday, May 22, 2014 4:05:58 PM UTC-5, Gary Johnson wrote:
Hi folks,
I suspect I'm the Gary that Tim thought he was referring to since I've
posted on several of his other LP-related threads (though not this one
until now
Check out Tim Baldridge's Hermod library:
https://github.com/halgari/com.tbaldridge.hermod
It's a very lightweight system that lets you create mailboxes (which listen
on ports) on each of your independent JVMs. Then you can pass messages
between them using core.async. This should give you most
Hey Lee,
I would second Jozef's suggestion that you look into using the reducers
library when you need non-lazy sequence operations. Although a major
motivation of Rich's work was clearly to enable easy parallel folding via
fork/join, the fold function is only one of many in this library.
What new features does this syntax provide over the existing infinite
sequence generators?
- lazy-seq
- iterate
- repeat
- repeatedly
- range
I realize you provided a simple example for clarity, but perhaps you could
illustrate something more complex that couldn't be done with the above
Hey Lee,
(vec ...) is NOT the same as (into [] ...) in this case.
Whenever you use a reducing function, like r/map, r/filter, r/mapcat, and
so on, you are not, in fact, performing any computations on the collection
to which you apply it. These functions simply wrap the collection with a
Hey Lee, answers below. Also make sure to read my other post at 12:59pm
today regarding the behavior of vec vs. into for reducible collections.
On Wednesday, June 4, 2014 12:51:45 PM UTC-4, Lee wrote:
Some quick notes and a question from my first look into this:
- I watched a Rich Hickey
Fair enough. Fortunately, Clojure provides so many different tools to
select from in creating you perfect recipe. ;-)
I'm glad to hear that reducers ultimately provided you with some benefits
over your previous concurrency approach.
The one thing that seems rather odd to me though is that your
Gotcha. By all means then, hack away. ;-)
--
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
Looking at this code without further knowledge of the strategy function, my
first guess is simply that your strategy function may not be returning a
result which satisfies the valid-move? and legal-move? predicates thus
throwing you into an infinite loop. Possibly the printf is being suppressed
Hi Yu,
This is a pretty dense (and IMHO non-idiomatic) piece of Clojure code.
Without reading the paste you provided, I can at least tell you what
appears to be happening here, given Clojure's evaluation semantics:
1. The [move ...] expression creates a vector of three functions.
2. The [(if
I've been using the following patch for quite some time now, and it works
reasonably well. The table generation is pretty suboptimal though, so if
anyone has an better version, I'd love to see it.
(defun org-babel-execute:clojure (body params)
Execute a block of Clojure code with Babel.
Sometimes, all you need is the proper reduce formulation:
(reduce (fn [m [k v]] (assoc m k (+ (m k 0) v))) {} keyvals)
--
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
I actually prefer yesql for most of my Clojure-SQL interaction.
Since a significant portion of my job involves me writing and optimizing
SQL queries, I like being able to seamlessly switch between psql,
org-babel's sql mode, and yesql with a simple cut and paste operation. For
extra emacs
I've been using PostGIS extensively at work for the past year or so and
used it intermittently before then. To really get the most out of the
system, I would strongly recommend grabbing a copy of PostGIS in Action,
2nd Edition by Regina O. Obe. I feel like I went from a casual user to a
power
Absolutely awesome! Finally, an easy-to-use renderer for PostGIS queries.
Well done!
--
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
Please stop.
The amount of misinformation you are spreading about Emacs on this mailing
list is deeply irresponsible and belies a very clear lack of understanding
about how this software works. All of your concerns about
internationalization (supported), accessibility to text readers
A shell script written in a procedural style (e.g. with Bash or equivalent
shell language) will frequently start out by declaring some global
variables, then perform some conditional checks (if then else), throw in a
few loops (for, while), and ultimately end up with some new values in those
Almost right. The iterate function is an infinite sequence generator, so
(count (iterate f x)) will never return.
If you want the iteration to terminate when cond is false (as in your
original example), you're looking for this:
(count (take-while cond (iterate (fn [[a b]] ... [new-a new-b])
Hi Christian,
You are looking for "into", which is already part of the Clojure standard
library.
Appending:
(into '(1 2) '(3)) ;=> (1 2 3)
(into [1 2] [3]) ;=> [1 2 3]
(into {:a 1 :b 2} {:c 3}) ;=> {:a 1, :b 2, :c 3}
(into #{:a :b} #{:c}) ;=> #{:c :b :a}
Thanks for the link!
--
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 this
Thanks, Gary and Justin, for spotting my code mistakes. Serves me right for
not double-checking the outputs at my REPL. :-P
Anyway, my examples with vectors, maps, and sets were all correct using
into. I goofed on lists, because the new elements are naturally always
applied to the front of the
Thanks, Chad.
I have built quite a few toy and production full-stack Clojure web apps
over the past 6 years or so using leiningen and boot. While both of these
are great tools with a lot of programmer hours invested in them, I realized
recently that neither of them are particularly easy to
Hi again, folks. Just to make it easier for everyone to use this template
right away, I put all these files into a public git repository on Gitlab.
Here's the URL:
https://gitlab.com/lambdatronic/clojure-webapp-template
Happy hacking!
~Gary
--
You received this message because you are
For those of you playing along at home, you may have noticed that there
were two bugs in the code I presented above. I have since fixed those
issues in the Gitlab repository that I linked to in my previous post. If
you didn't just grab the repository, here are the fixes for you to add
manually
Howdy Clojurians,
I recently started developing a new Clojure+Clojurescript web application,
and I wanted to see if I could set up my development environment using just
the Clojure CLI tools. After a good deal of digging around through
tutorials on a number of different websites and a fair
If you haven't given it a try yet, Clojurescript is really the goto for a
lot of Clojure programmers when it comes to cover the CLI and Android use
cases.
Lumo and Planck are awesome Clojurescript runtimes that start up virtually
instantaneously and make great choices for writing scripts.
Hi Will,
Welcome to the wide world of functional programming, where data flows, and
functions transmute without destroying their inputs.
As some others in this thread have already suggested, a general approach to
viewing any problem space from a functional perspective is to imagine your
As Daniel pointed out, this could probably be done more idiomatically (and
functionally) using sequence functions. Here is a quick shot at a rewrite
without any atoms or mutable state in the same number of lines of code (18)
as your original example. If some of the intermediate lazy sequences
You have several options for this in Clojure. However, rebinding the same
toplevel var that holds the original function is probably not the right way
to do this if you want to be able to retrieve the old function value later.
Consider the following approaches:
1. Define a single multi-arity
Hi folks,
While it's not directly to your point, here is a pretty complete (IMHO)
repository that I put together for getting you going with a new
Clojure+Clojurescript website:
https://gitlab.com/lambdatronic/clojure-webapp-template
Just clone it and check out the README.md file for a
Hi Scaramaccai,
Several posters in this thread have given you example code for how
to solve your OAuth token problem in Clojure. Perhaps I can add to
this discussion by pointing out the fundamentals of functional
programming that can help you decide how to solve problems like
this.
*Loops ->
Howdy Clojurians,
Spatial Informatics Group (SIG) is seeking a new Full Stack Web
Developer to build Clojure/Clojurescript web applications in the realm
of environmental mapping and modeling.
The position is fully remote, but applicants with work hours that
correlate well with North American
ru writes:
> I moved a working project from one Linux-machine to other.
> And that's what I got:
>
> ru@ru-sitrol:~$ cd clojure/pro-figweel/
> ru@ru-sitrol:~/clojure/pro-figweel$ clojure -m figweel.main -b dev -r
8<-->8
Downloading from clojars
Daniel Szmulewicz writes:
> Greetings fellow Clojurians,
>
> I am excited to announce the publication of my latest in-depth blog
> post on the topic of HTTP and web application development. Since I am
> currently looking for work, I had the opportunity to dedicate my
> mornings - when I’m at
74 matches
Mail list logo