Re: core.logic: Help with insertion sort

2015-08-02 Thread Tassilo Horn
Nicolás Berger writes: Hi Nicolás, >> I've simplified the code a bit so that I don't need the `cconso` > >> relation. > > That's great. It's easier to understand this way. To simplify a tiny > bit more, the `nf` lvar can also be removed: it's unified with `f`, so > f can be used instead of nf in

Re: range no longer returns a LazySeq; how to check whether realized?

2015-08-02 Thread Mars0i
On Sunday, August 2, 2015 at 4:05:02 PM UTC-5, Matching Socks wrote: > > By the way, -- When is it useful to know whether a lazy sequence has been > realized? > I don't know what people do with it in production code, but one reason you might want to know would be that you have a lazy sequence th

Re: Complete lack of helpful compilation errors with :gen-class

2015-08-02 Thread Mars0i
I don't have anything helpful to say, but: I've often gotten a useful stacktrace from compile-time errors using 'lein compile' with :gen-class. Not always. Sometimes I have to use the guess-and-comment-out method. So I think that whatever's happening is not just an issue with compilation of

Re: Using a dynamic var for my database connection for implicit connections+transactions

2015-08-02 Thread James Gatannah
On Thursday, July 30, 2015 at 7:44:31 PM UTC-5, J. Pablo Fernández wrote: > > Hello Clojurians, > > I found passing around the database connection to each function that uses > it very error prone when you are using transactions as passing the wrong > one could mean a query runs outside the tran

Re: Reality check: EC2 + Ubuntu + Atom (from GitHub) + Clojure?

2015-08-02 Thread Jason Lewis
IntelliJ CE (the free version) has served me well for Java and (playing with) Cursive for Clojure. I can't speak to Python. For Clojure nothing beats emacs + CIDER, and emacs is a fine choice for Python. I generally stick to IntelliJ for Java, but I do know a few people who use emacs for Java and

Re: Reality check: EC2 + Ubuntu + Atom (from GitHub) + Clojure?

2015-08-02 Thread Mikera
If you want a free / open source alternative, then Eclipse also offers a great environment for developing Java, Clojure and Python. The Counterclockwise plugin for Eclipse is great - certainly has provided everything I want in a Clojure dev environment (integrated REPL, paredit mode, good synta

Re: Reality check: EC2 + Ubuntu + Atom (from GitHub) + Clojure?

2015-08-02 Thread Mark Engelberg
Intellij might be your best option for a unified development platform for Java, Clojure, and Python. It won't be free though. -- 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 post

Re: core.async: implementing pi.go

2015-08-02 Thread Mark Engelberg
I agree that there's value to making math expressions look like the way they are written in actual math -- it is much easier to tell at a glance that you've entered the correct formula. I think your maya library is a nice contribution. (I think Incanter has a similar macro, but it is nice to have

Re: [ANN] Initial release of Glow, a tiny library for syntax highlighting Clojure source code

2015-08-02 Thread Reid McKenzie
On the contrary, I would argue that there is some interesting stuff like locals highlighting that existing highlighting solutions don't or can't offer. However as you say pygments fulfills my requirements. Reid -- You received this message because you are subscribed to the Google Groups "Clojure

Re: [ClojureScript] ClojureScript Self-hosting Demo

2015-08-02 Thread Marc Fawzi
Some basic and potentially naive questions: I realize you need a bunch of things loaded in the browser to convert CLJS code to JS and eval it. I'm wondering about the below: 1. Does this means that i can run CLJS in the browser without the Google Closure library or is the compiler dependent on

Complete lack of helpful compilation errors with :gen-class

2015-08-02 Thread James Elliott
I don't know if this is an issue with the compiler in general, with Leiningen more specifically, or something I am doing wrong in trying to use them, but I have wasted many hours over the last couple weeks while working on afterglow-max

Re: Reality check: EC2 + Ubuntu + Atom (from GitHub) + Clojure?

2015-08-02 Thread kirby urner
Having done some more research, I see Atom 1.0 is still very new which likely accounts for the a paucity of replies, an no Youtubes on the topic (that I could find). Anyway, it's not a set in stone requirement -- in the virtual school of my dreams [1] -- that every course should use the same IDE

Re: range no longer returns a LazySeq; how to check whether realized?

2015-08-02 Thread Matching Socks
By the way, -- When is it useful to know whether a lazy sequence has been realized? -- 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

Re: range no longer returns a LazySeq; how to check whether realized?

2015-08-02 Thread Fluid Dynamics
On Sunday, August 2, 2015 at 2:40:55 PM UTC-4, Alex Miller wrote: > > realized? throws when passed something that's not IPending. Lazy seqs (but > not all seqs) implement IPending, thus the vast majority of realized? users > already have an if check prior to making the call. Any code of that form

Re: range no longer returns a LazySeq; how to check whether realized?

2015-08-02 Thread Alex Miller
realized? throws when passed something that's not IPending. Lazy seqs (but not all seqs) implement IPending, thus the vast majority of realized? users already have an if check prior to making the call. Any code of that form continues to work. I think it would be a better idea if realized? did th

Re: range no longer returns a LazySeq; how to check whether realized?

2015-08-02 Thread Fluid Dynamics
On Friday, July 31, 2015 at 9:04:45 AM UTC-4, Alex Miller wrote: > > We're focusing on defects right now for 1.8 but eventually we'll roll back > around to enhancements too. > > On Fri, Jul 31, 2015 at 5:04 AM, Marc O'Morain > wrote: > >> This caught us out at Circle when preparing the code-base

Re: core.async: implementing pi.go

2015-08-02 Thread Divyansh Prakash
Makes sense. By the way - I've refactored my code to not use a go block inside 'term', and made it much more readable (IMO) than before using my maya library . I'm telling you this because I'm

Re: core.async: implementing pi.go

2015-08-02 Thread Mark Engelberg
On Sun, Aug 2, 2015 at 4:38 AM, Divyansh Prakash < divyanshprakas...@gmail.com> wrote: > I have one more question, though: how does one work in ClojureScript > without > This use case is a little weird because the http://groups.google.com/group/clojure?hl=en --- You received this message becaus

Re: core.async: implementing pi.go

2015-08-02 Thread Divyansh Prakash
Hey, puzzler! Thanks for the detailed response. Just changing (chan) to (chan n) actually worked! I get your displeasure with how 'term' is implemented. That's not how I generally code. I'm very new to core.async and was aiming for a direct translation of the Go code. I do get a little carrie

Re: core.async: implementing pi.go

2015-08-02 Thread Mark Engelberg
Clojure's async is built around the opinion that you, the programmer, should be required to think about what sort of buffer you want to have on your channel, and think about what should happen if that buffer overflows. Your code spins off 5000 little go blocks that are each trying to write to a ch

Re: [ANN] Initial release of Glow, a tiny library for syntax highlighting Clojure source code

2015-08-02 Thread W. David Jarvis
I thought about it early on but considered that a space that's largely already addressed by highlight.js et al. If there's another use case you had in mind for it that highlight et al. don't satisfy I'd be happy to look into it :) On Sun, Aug 2, 2015 at 7:55 AM, Reid McKenzie wrote: > Very nice!

Re: [ANN] Clojure 1.8.0-alpha3

2015-08-02 Thread Dragan Djuric
Is there any introduction/example/short intro on direct linking? On Thursday, July 30, 2015 at 12:51:18 AM UTC+2, Alex Miller wrote: > > Clojure 1.8.0-alpha3 is now available. > > Try it via > - Download: > https://repo1.maven.org/maven2/org/clojure/clojure/1.8.0-alpha3 > - Leiningen: [org.clojur

core.async: implementing pi.go

2015-08-02 Thread Divyansh Prakash
I came across pi.go in the examples for go-lang. I've been trying to replicate it with core.async, and this is what I have till now: (defn term [ch k] > (go (>! ch (-> 4.0 > (* (Math/pow -1 k)) > (/ (-> k (* 2) (+ 1))