Re: Tiny web app illustrating WebSocket duplex communication.

2021-06-05 Thread Daniel Craig
Sounds cool! I’ll check it out > On Jun 5, 2021, at 5:53 AM, Deyan Yotsov wrote: > > Hello! > > I've been trying to understand WebSockets, and created a tiny web app in > Clojure+ClojureScript that uses them. It was more of a journey of discovery, > and I tried to keep the code as minimal a

Re: core.async buffered channel behavior

2018-06-26 Thread craig worrall
I guess the interrupt doesn't really obliterate the fourth put attempt, and that put proceeds in background when you first take. On Wednesday, June 27, 2018 at 5:12:45 AM UTC+10, jonah wrote: > > Hi folks, > > It's been a while since I've used core.async. Documentation suggests that > > (chan n)

Re: off-topic: stackof developer survey

2017-03-25 Thread craig worrall
Yes, if you have a 'product' perspective, but others will have a service provider perspective and would like to see employers committed to Clojure and looking to engage with practitioners.+ On Sunday, March 26, 2017 at 4:49:45 AM UTC+11, Dragan Djuric wrote: > > > Isn't it advantageous in some

Re: Reader macro not ignoring form?

2016-09-19 Thread craig worrall
Many thanks Alex. Craig -- 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 unsubs

Reader macro not ignoring form?

2016-09-17 Thread craig worrall
-0ubuntu4~14.04-b14 Docs: (doc function-name-here) (find-doc "part-of-name-here") Source: (source function-name-here) Javadoc: (javadoc java-object-or-class-here) Exit: Control+D or (exit) or (quit) Results: Stored in vars *1, *2, *3, an exception in *e user=> #_

Re: clj-time/do-at not workin as expected

2016-05-19 Thread craig worrall
Chime? -- 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 group, send email t

Re: Decomplecting Clojure

2015-08-15 Thread Craig Brozefsky
After working for several years in a large clojure code-base, and having been bitten by laziness a few times, I think I am still a fan of "lazy by default". I have not been bitten by issues related to agents and laziness. Mostly it's resources going out of scope because I was using a dynamic bin

Re: 2 way transform in single definition ? unification ?

2015-07-12 Thread craig worrall
You may have already discounted Java versions, but just in case ... http://www.javacodegeeks.com/2013/10/java-object-to-object-mapper.html Craig On Monday, July 13, 2015 at 3:53:19 AM UTC+10, Jules wrote: > > Guys, > > I have an external and an internal data representation. &

ThreatGRID/Cisco Looking for Clojure Hackers

2015-03-18 Thread Craig Brozefsky
[ Full disclosure: I am the technical lead on this product and the hiring manager in this case. Feel free to contact me with questions, and to pass this around. We are also looking for Go hackers on another team, if you are of that persuasion. ] Clojure Developer for Malware Analysis Product The

Re: [ANN] Clojure 1.7.0-alpha3 now available

2014-11-02 Thread craig worrall
I hit this error when moving to a new box that had an encrypted FS. Might be related to your case as well. Good luck. On Wednesday, October 29, 2014 1:34:28 AM UTC+11, Stefan Kamphausen wrote: > > Hi, > > have there been any changes how fns with a name and recursion are > compiled? One of my pr

Re: Testing and infrastructure management for large Clojure app - how are you doing it?

2014-10-27 Thread Craig Brozefsky
On our non-trivial application, we have broken our testing into the following sets: * Unit Tests -- written by devs, run as part of our integration builder and when doing dev * Integration Tests -- automated, hitting our external APIs, written in clojure, maintained by the devs mostly, run as part

Re: [ANN] Silk, an isomorphic routing library for Clojure and ClojureScript

2014-08-06 Thread Craig
Hi Dom, Thanks! The comparison is much appreciated, as is the contribution to the community. regards, Craig On Wednesday, August 6, 2014 6:27:44 PM UTC+10, DomKM wrote: > > Hi Craig, > > Great question! Bidi <https://github.com/juxt/bidi> is a fantastic > library and wa

Re: [ANN] Silk, an isomorphic routing library for Clojure and ClojureScript

2014-08-04 Thread Craig
How would you position Silk in relation to Bidi? Thanks for any insights. -- 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 patien

Re: Is Korma still a good current choice for DB backend?

2014-07-22 Thread Craig
+1 On Tuesday, July 22, 2014 11:08:21 PM UTC+10, tbc++ wrote: > > Also, read the rationale behint yesql: > https://github.com/krisajenkins/yesql IMO, it hits the nail on the head. > ORMs are both crappy object systems and crappy DB DSLs. With a library like > yesql you write your queries in pur

Re: Error using core.async version of into

2014-05-20 Thread Craig
Juan, I saw your reply and then noticed the clear warning ("...being replaced by: #'clojure.core.async/into") as well. Many thanks for the quick response. -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@

Error using core.async version of into

2014-05-19 Thread Craig
port 60959 on host 127.0.0.1 REPL-y 0.2.1 Clojure 1.6.0 Docs: (doc function-name-here) (find-doc "part-of-name-here") Source: (source function-name-here) Javadoc: (javadoc java-object-or-class-here) Exit: Control+D or (exit) or (quit) p1.core=> (into [:a] (list :b :c)

Re: Web App structure on server?

2014-01-24 Thread Craig
My current approach accords with Mikera's suggestion, and using a single package allows me to easily leverage other components (management, database etc). I have an open mind on the future use of isolated scripts (in python or whatever), but at the moment I am enjoying the simplicity of develo

Re: [ANN] manners 0.2.0 released

2013-11-27 Thread Craig
Looks interesting. I've come to Clojure from Java, and validation of arbitrary data is important for my applications. Thanks for the contribution. On Wednesday, November 27, 2013 7:15:43 PM UTC+11, Ryan McGowan wrote: > > A validation library built on using predicates properly. > > I just relea

Re: CloudFormation template generation with Clojure

2013-11-26 Thread Craig
) rgds Craig On Tuesday, November 26, 2013 7:11:42 PM UTC+11, Kevin Bell wrote: > > Hey Craig, > > Thanks for the input. Forgive my naiveté, but I gather you're implying > that the DSL-ishness is desirable? That makes sense, and it seems to be > inline with what I'm lea

Re: CloudFormation template generation with Clojure

2013-11-25 Thread Craig
ndition (= (-> my-mapping :first-level-key-one :second-level-key-one) my-parameter)) (resource my-instance aws.ec2/instance :image-id "ami-79fd7eee") (output my-first-output (:instance-type my-instance)) (output my-second-output my-parameter)) Craig On Tuesday, Novem

Re: [ANN] overload-middleware 0.1.1

2013-11-16 Thread Craig
Very interesting. I have a similar requirement, but not in serving web requests. I haven't looked under the covers of your module, but wonder if it could be decoupled from web/ring? Craig -- -- You received this message because you are subscribed to the Google Groups "Clojure&

Re: road map for clojure?

2013-10-31 Thread Craig
As Alan Kay said: "Lisp isn't a language, it's a building material." So we might ask: What other properties do we builders require from this material? -- -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@

Re: Translating simple path finding problem from prolog to core.logic

2013-06-30 Thread Craig Ching
Thanks Norman! Not sure how I didn't realize that was happening, but it's working exactly as you describe. Thanks much for your help! Cheers, Craig On Sunday, June 30, 2013 2:40:48 PM UTC-5, Norman Richards wrote: > > Just like the prolog, you are generating an infinite num

Translating simple path finding problem from prolog to core.logic

2013-06-30 Thread Craig Ching
th2 ;-) What happens, though, is that both of these end up in an infinite loop. Any hints about what I'm doing wrong? I'm sure I'm missing something fundamental here. Is there some sort of debugging I can do to figure this out? Or some way to trace execution? Thanks for any help!

Re: David Nolen's logic programming readling list

2013-06-08 Thread Craig Ching
Thanks David! -- -- 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 group, s

David Nolen's logic programming readling list

2013-06-08 Thread Craig Ching
I was looking for David Nolen's old blog at posterous where he had posted a reading list for logic programming, but that blog is no longer available. Does anyone have that list? Or, David, if you could repost it on your new blog, I'm sure others would appreciate it too! Che

java.jdbc delta update examples

2013-04-08 Thread Craig
I am looking for example(s) of using clojure java.jdbc to perform delta update eg SALARY = SALARY + 1000. Links appreciated. Thanks. -- -- 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 No

Re: core.logic: Dividing the knowledge base

2013-03-14 Thread Craig Brozefsky
ogic, but I'm wondering if maybe some >implementation changes lead to this? You could use the Issues system in github for reporting this to pldb's maintainers. Details of what "not works at all" looks like would help them too. -- Craig Brozefsky Premature reifica

Re: Newbie requesting review

2013-03-11 Thread Craig Ching
On Monday, March 11, 2013 6:35:09 AM UTC-5, Marko Topolnik wrote: > > > This kind if formatting hurts readability for people used to the style > that most Clojure code adopts, which would look something like this: > > (defn- make-student [teacher-name student-name age] > {:id (str teacher-name

Re: Newbie requesting review

2013-03-11 Thread Craig Ching
Hi Gary, On Monday, March 11, 2013 6:02:12 AM UTC-5, Gary Verhaegen wrote: > > For the sake of nitpicking, you are still using camelCase instead of > hyphenation in make-student. > > This part? {:id (str teacher-name "!" student-name) :TeacherName teacher-name :StudentName

Re: Newbie requesting review

2013-03-10 Thread Craig Ching
son") (gen-items-json (make-students teacher-name n (defn gen [num-teachers num-students] (doseq [teacher-name (map make-teacher-name (range num-teachers))] (spit-json teacher-name num-students))) Thanks a ton for your time, this list is really a great place and I appreciate

Newbie requesting review

2013-03-09 Thread Craig Ching
[teacherName n] (let [fac (make-student-factory teacherName)] (map fac (range n (defn- spit-json [teacherName n] (println "Creating " n " students for teacher: " teacherName) (spit (str teacherName ".json") (gen-items-json (make-student

Re: how to get SHA1 of a string?

2013-03-04 Thread Craig Brozefsky
Craig Brozefsky writes: .. Sorry, didn't reaze you wanted the output to be base64 encoded, in which case, add these funcs: (defn base64-encode [^bytes v] (javax.xml.bind.DatatypeConverter/printBase64Binary v)) (defn sha1-base64 [^String v] (-> (.getBytes v)

Re: how to get SHA1 of a string?

2013-03-04 Thread Craig Brozefsky
larry google groups writes: > Hmm, interesting. I had assumed that I wanted a string run through > SHA1, so I created the string, then called getBytes on it to feed it > to SHA1: > > digest-as-string (apply str nonce created secret) > digest (.digest (java.security.MessageDigest/getInstance "sh

Re: [ANN] Dire, Erlang-style error handling

2012-12-28 Thread Craig Brozefsky
Without this, I have almost no hope of translating them to dire. -- Craig Brozefsky Premature reification is the root of all evil -- 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

Re: best practices for small RAM usage

2012-10-03 Thread Craig Brozefsky
a structure Enlive used. JSoup provides a sufficient API on it's java objects for use to do our work in this case. -- Craig Brozefsky Premature reification is the root of all evil -- You received this message because you are subscribed to the Google Groups "Clojure" group

Re: Rich's "The Value of Values" and REST

2012-08-24 Thread Craig Brozefsky
ain. That was mentioned in the talk actually, as part of the bookkeeping that comes with such histories. -- Craig Brozefsky Premature reification is the root of all evil -- You received this message because you are subscribed to the Google Groups "Clojure" group. To pos

Re: record constructor

2012-08-06 Thread Craig Brozefsky
a line of logic that only exists as a strawman, an expansion to the absurd -- changing the argument from one of sufficient flexibility to one of abstractly greater, and therefor cumulative, flexibility. -- Craig Brozefsky Premature reification is the root of all evil -- You received this message becau

Re: record constructor

2012-08-05 Thread Craig Brozefsky
Warren Lynn writes: >If it does not do any harm to anybody but have benefits for some people >(of course not just me), I reason it is a good feature. You should check out Perl. 8^) -- Craig Brozefsky Premature reification is the root of all evil -- You received this message b

Re: Much longer build time for Clojure on HDD vs. SSD (4 min vs 30s)

2012-07-16 Thread Craig
I'm happy to now be aware of this issue. In amongst other (software, hardware) changes, I migrated a reasonably sized clojure application from 1.2 and 1.3 and compile times ballooned. It took me a while to realise it was a clojure issue. On Jul 17, 6:26 am, Andy Fingerhut wrote: > There are link

Re: Much longer build time for Clojure on HDD vs. SSD (4 min vs 30s)

2012-07-16 Thread Craig Brozefsky
g else in general. Current dev machine is a mid-2012 Macbook Air with 8g RAM, dual core i7 @2ghz, and of course the sata3 SSD. It's running Arch Linux (latest installer worked damn near flawlessly) and is blazing fast. My x100e Thinkpad was not bad either for it's size/price/weight ra

a simple Processing.js wrapper in clojurescript

2012-07-15 Thread Craig Brozefsky
y, and plan on using it to learn a bit more about clojurescript. I like to make purty pictures too. I have not done any work to make this a standalone project either. -- Craig Brozefsky Premature reification is the root of all evil -- You received this message because you are subscribed

Re: Why cannot "last" be fast on vector?

2012-06-30 Thread Craig Brozefsky
out digging into the code and understanding how things work, followed by asking for others to be do the coding and be and advocate for your rather vague feeling of unease, strikes me as passive-aggressive attention seeking. To do such while top posting, well, it's just too much for me. 8

Re: Why cannot "last" be fast on vector?

2012-06-30 Thread Craig Brozefsky
last is defined as part of the very base of core, before protocols get loaded, and even before defn is available. Using a protocol to optimize at that level is gonna get dirty dirty. See my reply to Warren my proposed change to core. Those defs can be dropped into clojurescript too, btw. -

Re: Why cannot "last" be fast on vector?

2012-06-30 Thread Craig Brozefsky
seq ret)) These changes don't really bring any new entanglement between clojure.core and the clojure.lang java objects -- because the language defines explicitely how vector conj/peek. However, going thru clojure.core and optimizing it based on knowledge of implementation in clojure.lang would

Problems resolving dependencies due to maven central repo fail

2012-06-11 Thread Craig Brozefsky
1.2.0 1.2.0 20100914121821 -- Craig Brozefsky Premature reification is the root of all evil -- 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

Re: code as data vs. code injection vulnerability

2012-05-09 Thread Craig Brozefsky
s a better > proplem indicator than just a simple true/false I think adding a note to read and friends is sufficient. There could be other dispatch macros to be considered, not just EvalReader. Having *read-eval* default to false may also be a good idea. -- Craig Brozefsky Premature reifica

Re: why can i not shut-down my pc from Java?

2012-05-07 Thread Craig Brozefsky
a shell process you call from your Java program. Also, you will need to invoke sudo with the -S argument so it reads from stdin, and not from a pty. -- Craig Brozefsky Premature reification is the root of all evil -- You received this message because you are subscribed to the Google Groups &quo

Re: why can i not shut-down my pc from Java?

2012-05-07 Thread Craig Brozefsky
- You should checkout proces output to make sure, but I'm betting that sudo is opening a tty to read the password and not getting it from stdout. The properly solution here, here, may be to define shutdown as a sudo action for you

Re: Newbie question about rebinding local variables

2012-04-20 Thread Craig Ching
On Friday, April 20, 2012 1:15:11 PM UTC-5, kurtharriger wrote: > > > Game state does not have to be a map, it could be any datastructure > you want, perhaps a protocol that is implemented by a concrete class > in another JVM language. However, I avoid encapsulation unless there > is a compel

Re: Newbie question about rebinding local variables

2012-04-20 Thread Craig Ching
Thanks for your input, I appreciate it. On Friday, April 20, 2012 10:16:51 AM UTC-5, kurtharriger wrote: > > And you just need to keep the resulting state, no need to reapply the > moves. > Your main method might use a reduce or loop recur. > > (loop [game (new-game)] > (if-not (complete? gam

Re: Newbie question about rebinding local variables

2012-04-20 Thread Craig Ching
On Friday, April 20, 2012 9:07:49 AM UTC-5, Walter van der Laan wrote: > > You could start with pure functions to handle the game logic, e.g.: > > (defn new-game [] > [[\- \- \-] >[\- \- \-] >[\- \- \-]]) > > (defn print-game [game] > (doseq [row game] > (println (apply str row)))

Re: Newbie question about rebinding local variables

2012-04-20 Thread Craig Ching
forced to fit your logic into a loop of some re-binding that > > simulates mutation. > > > > > > On Thursday, April 19, 2012 3:21:56 PM UTC-7, Craig Ching wrote: > >> > >> Ok, I've read that what I want to do is a no no. But this is the sort >

Newbie question about rebinding local variables

2012-04-19 Thread Craig Ching
Ok, I've read that what I want to do is a no no. But this is the sort of thing I did in Scheme about 20 years ago (and because of that I'm probably misremembering ;-)). Basically I'm learning clojure and thought I'd write a tic tac toe game. But not any tic tac toe, I want to write one where

Clojure Software Dev wanted, remote work

2012-04-02 Thread Craig Brozefsky
on, contact me at cr...@threatgrid.com The job is also posted here: http://www.threatgrid.com/jobs/ -- Craig Brozefsky Premature reification is the root of all evil -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send ema

Re: What is wrong with ClojureQL?

2012-03-24 Thread Craig Brozefsky
data tables, no notion of object identity for the most part either. We have these soft "entities" which conventiently map into sql data types, so work as key values themselves. I don't wanna diss on Korma tho, just that the data model it is aiming at is not the one I want. -- Craig

Re: Can Clojure be as readable as Python or Ruby ?

2012-03-10 Thread Craig Brozefsky
explicit :else nil, in a situation where the negation of the logical operation is implicitely nil, just stinks in my nose. Seriously though, don't let my aesthetic griping stop you from rocking out whatever kinda clojure code tickles your brain. -- Craig Brozefsky Premature reification is the

Re: Can Clojure be as readable as Python or Ruby ?

2012-03-09 Thread Craig Brozefsky
Tassilo Horn writes: > Craig Brozefsky writes: > > Hi Craig, > >> Also, people have been writing lisp for a real long time, and they >> haven't invented a chucklehead macro like let? yet, so prolly not >> really needed to improve the readability... > &

Re: Can Clojure be as readable as Python or Ruby ?

2012-03-09 Thread Craig Brozefsky
been writing lisp for a real long time, and they haven't invented a chucklehead macro like let? yet, so prolly not really needed to improve the readability... -- Craig Brozefsky Premature reification is the root of all evil -- You received this message because you are subscribed to the Go

Re: Bret Victor - Inventing on Principle

2012-02-25 Thread Craig Brozefsky
Phil Hagelberg writes: > Yes, what a great object lesson in the usefulness of being able to > disable locals clearing. Gave me a lot to think about regarding what > kind of feedback tools should provide. I don't understand what "disable locals clearing" means. -- Cr

Re: New Version of ClojureScript One

2012-01-31 Thread Craig Andera
> This is a problem with the current version of Leiningen. There are a > couple of ways to work around the problem. Here is one: > > Create a new Leiningen project. > > lein new delete-me > cd delete-me > > Open project.clj and change > > :dependencies [[org.clojure/clojure "1.3.0"]] > > to > > :de

Re: ClojureScript One - Getting Started with ClojureScript

2012-01-12 Thread Craig Andera
For anyone that wants to hear a bit more about Brenton's thinking around ClojureScript One, we just published a podcast interview with him on the Relevance blog. Have a listen if you feel so inclined! http://thinkrelevance.com/blog/2012/01/12/podcast-episode-003.html On Thu, Jan 12, 2012 at 2:35

Re: LCUG: 17th January 2012, Malcolm Sparks - Reflections on a real-world Clojure application

2012-01-05 Thread Craig
On Jan 5, 11:56 am, Kevin Lynagh wrote: > Any chance the talk will be filmed and posted online? +1. Or slides posted? -- 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 fro

Re: thank you, clojure hackers

2011-12-07 Thread Craig Brozefsky
Ambrose Bonnaire-Sergeant writes: > What are you making? Malware behavior analysis tool. I'll be able to release most of the non-malware specific portions once this gets out of the proof of concept phase. -- Craig Brozefsky Premature reification is the root of all evil -- You

thank you, clojure hackers

2011-12-06 Thread Craig Brozefsky
, data.json, clojure-csv, core.logic, ring, compojure, lein, and swank. You make this old Common Lisp hacker happy. -- Craig Brozefsky Premature reification is the root of all evil -- You received this message because you are subscribed to the Google Groups "Clojure" group. To pos

Re: "Simple" evaluation and environments

2011-11-29 Thread Craig Brozefsky
r Programming (Van Roy and Haridi). It's a great tour of many "paradigms" of programming. If you are enjoying this topic, you might want to check it out. It is less Lisp specific, obviously. -- Craig Brozefsky Premature reification is the root of all evil -- You received this

Re: Another oldie question

2011-11-07 Thread Craig Brozefsky
l/language was often the reason we were able to make those projects work, you know, so that there was someone getting paid to work on it later, who could curse us. -- Craig Brozefsky Premature reification is the root of all evil -- You received this message because you are subscribed to the

Which autodoc dep for clojure 1.3 (and advice on how to solve such questions generally)

2011-11-03 Thread Craig Brozefsky
ssues. Is there some Maven black magick I should familiarize myself with in order to list packages and their deps? -- Craig Brozefsky Premature reification is the root of all evil -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to th

Re: Homoiconicity in clojure (macro power)

2011-11-03 Thread Craig Brozefsky
Alex Baranosky writes: > Julian, > > I saw no flames fired from Craig - and I am particularly intrigued by non-Lisp > languages such as Ioke that are homoiconic and have macros. I meant my comment as a pre-emptive joke to derail a replaying of the old tale of Dylan, the lisp with

Re: ANN: Korma - a SQL DSL for Clojure

2011-11-02 Thread Craig
Hi Chris, Nice website :-) The HN thread mentions ClojureQL. Does it have limitations that made it unsuitable for you? Or were you keen to roll your own? -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@g

Re: Homoiconicity in clojure (macro power)

2011-11-01 Thread Craig Brozefsky
Julian writes: > I wonder what would be required for a modification to the clojure reader in > order to do this... No intention of picking on Julian, but do we really have to re-live all of the flamewars and jawflapping of comp.lang.lisp on the clojure group again? You're giving me flashbacks 8

Re: Creating a Clojure Record from a string

2011-08-23 Thread Craig Andera
> (Class/forName "java.lang.String") Oh, does that work in 1.3? Because (new (Class/forName "user.Foo")) was the first thing I tried (under 1.2) and it doesn't work. Perhaps unsurprisingly given that new is a special form. -- You received this message because you are subscribed to the Google Gro

Re: Creating a Clojure Record from a string

2011-08-23 Thread Craig Andera
> Given: > > test=>(defrecord Foo [A B]) > test=>(class (Foo. 1 2)) > test.Foo > > How do I: > > test=>(new "test.Foo" 1 2) > #:test.Foo{:A 1, :B 2} > > Currently I get " Unable to resolve classname: test/Foo". Check out http://stackoverflow.com/questions/3748559/clojure-creating-new-instance-fro

Re: Generating new exception classes in clojure

2011-08-22 Thread Craig Andera
> How can I catch a proxied Throwable class without catching everything?  I > suppose I could grab the class and go at it with reflection... I wrestled with this problem for a while, and got to "you can't do it". At least, not without AOT compilation of some sort. I did come up with a horrible, ho

Re: The Last Programming Language

2011-07-19 Thread craig worrall
Maybe. Or maybe Martin's talk should be entitled "The Last Programming Language To Get Any Mind-Share". On Jul 19, 3:42 am, Steven Tomcavage wrote: > I double we'll ever see The Last Programming Language, because we're > all hackers and we all have a notion that things could be done better > if

Re: Declarative Data Models

2011-05-02 Thread craig worrall
o see a much simpler way of achieving my core > objective (reduce all of the duplication)? If so, you and me both. Regards, Craig -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegr

Re: Miscellaneous noob questions

2010-06-18 Thread Craig Andera
> I'm a little confused over when to use a var vs. a ref vs. an agent > vs. an atom. For writing small (<200 lines) single-threaded programs > when do I want to use each one? In addition to the great answers you got here, you could have a look at my screencast series on vars, refs, agents, and ato

Re: Leiningen documentation review?

2010-06-17 Thread Craig Andera
> Mostly I'd like feedback on the tutorial: > http://github.com/technomancy/leiningen/blob/master/TUTORIAL.md This sentence: "Libraries for the JVM are packaged up as .jar files, which are basically just .zip files with a little extra JVM-specific metadata that contain either .class files (byteco

Re: Leiningen documentation review?

2010-06-17 Thread Craig Andera
> But if you've got some time to look over the readme, that would be > great too: http://github.com/technomancy/leiningen/blob/master/README.md Unnecessary (and ironic! :)) repetition of the word "around" in this sentence: If you use Ant, you end up copying around a lot of the same tasks around b

Re: ICFP 2009 / ICFP 2010

2010-06-12 Thread Craig Andera
> There's one question that came up when I implemented this. Is there a > way to get the name of a clojure function, when all I have is the > function object? Is it stored alongside the function? I didn't see any > metadata or anything. Would I really have to reverse lookup the name > in some names

Re: let's all link to the "getting started" pages!

2010-06-02 Thread Craig Andera
Someone wrote an installer [1] that I've used successfully. [1] http://github.com/paulbatum/clojure-clr/downloads On Wed, Apr 7, 2010 at 4:37 PM, Sean Devlin wrote: > Anyone have instructions for CLR? > > On Apr 7, 2:50 pm, Meikel Brandmeyer wrote: >> Hi, >> >> On Wed, Apr 07, 2010 at 01:53:47P

Re: Function Size

2010-05-30 Thread Craig Andera
You can bind functions inside a let, which can help if you're just trying to make code less nested. The thread-first and thread-last macros help here too. But if you're looking for the equivalent of the "private" keyword (sort of) check out defn-. Note the dash at the end. On Sunday, May 30, 2010

Re: Announcing Clojure/core

2010-05-25 Thread Craig Andera
> I'm happy to announce Clojure/core, a joint endeavor between myself > and Relevance, Inc. Congratulations to everyone involved! Very exciting! -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups

Re: Is group-by lazy?

2010-05-25 Thread Craig Andera
> I've noticed that there is group-by in clojure 1.2. However it uses > reduce and conj. > Doesn't it consume all sequence at once? Yes. But then, it would have to: - clojure.contrib.seq/group-by ([f coll]) Returns a sorted map of the elements of coll keyed by the result

Re: code review:replace-first

2010-05-08 Thread Craig Andera
> Hi,there! > > I need a function that replaces a first found element of list. > like that, > >>(replace-first :a :b [:c :c :a :c :a] > [:c :c :b :c :a] >       ~~ > ;replace first :a to :b An interesting problem for a Sunday morning when I ought to be cleaning the house. :) Here are my (admittedl

Re: labrepl updated

2010-05-08 Thread Craig Andera
> Changed my mind and fixed this on the Clojure side [1]. Now you should be > able to bind *err* to any old Writer you like. > > Stu > > [1] > http://github.com/richhickey/clojure/tree/c4eb5719b0f30ea4c113e6e98a1c171c43a01abe Just checked this out. Working fine now. Thanks! I'll let you know if I

Re: labrepl updated

2010-05-06 Thread Craig Andera
So if someone produces a fork of incanter that doesn't have the warning (or David fixes up Incanter), then the problem goes away? Because the other place I see the warnings coming out of is swank itself. On Thu, May 6, 2010 at 9:33 AM, Stuart Halloway wrote: > This is another variant of the "Swan

Re: labrepl updated

2010-05-06 Thread Craig Andera
Update: Using the latest labrepl commit (fa89411ae "use private compojure snapshot"), I'm now able to pull in incanter and use it (albeit with tons of warnings about group-by and flatten from both incanter and swank)...but only if I use script/repl via inferior-lisp. I still can't get swank to work

Re: labrepl updated

2010-05-05 Thread Craig Andera
> I have updated the labrepl [1] to use the latest clojure 1.2 and contrib 1.2 > snapshots. Also, most of the dependencies are now frozen to specific > snapshot timestamps (the project.clj file may be of interest to people living > on the development edge). > > After a "lein clean;  lein deps" ever

Re: Clojure Concurrency Screencast Available

2010-04-20 Thread Craig Andera
> > I enjoyed you presentations, but I have a bit of a tangent question. > > I'm still new to slime, so it's not a comfortable environment for me > > yet.  What I am wondering is how exactly, when operating with the > > split code and repl buffers, you are getting code buffer expressions > > to eva

Re: Clojure Concurrency Screencast Available

2010-04-16 Thread Craig Andera
One final update: all six parts are now available, including the "mobile" downloads for offline viewing. http://link.pluralsight.com/clojure On Tue, Apr 13, 2010 at 9:40 AM, Craig Andera wrote: > Glad you've enjoyed them! > > 2010/4/13 Pelayo Ramón > > I have seen

Re: Clojure Concurrency Screencast Available

2010-04-13 Thread Craig Andera
Glad you've enjoyed them! 2010/4/13 Pelayo Ramón > I have seen the first 2, and as a clojure noobie I have to say that > they are great. Thanks a lot. > > On Tue, Apr 13, 2010 at 3:10 PM, Craig Andera > wrote: > > If you mean "downloading and viewing on

Re: Clojure Concurrency Screencast Available

2010-04-13 Thread Craig Andera
contact me off-list and I'll hook you up with the right people for that conversation. On Tue, Apr 13, 2010 at 4:30 AM, Hasan Hasan wrote: > Hi, > > Is downloading and copying the videos free? > > > On Tue, Apr 13, 2010 at 1:10 AM, Craig Andera wrote: > >> That&#x

Re: Clojure Concurrency Screencast Available

2010-04-12 Thread Craig Andera
That's typing-speed-mode. I wrote it. :) Available here [1]. You'll probably also want this [2] in your .emacs. [1] http://www.pluralsight-training.net/community/blogs/craig/archive/2008/10/07/typing-speed-mode-emacs-minor-mode.aspx <http://www.pluralsight-training.net/communit

Re: Clojure Concurrency Screencast Available

2010-04-10 Thread Craig Andera
Mobile downloads are available now. Sorry about the delay. The refs module is also up, so that's five of six. Part six by mid next week. On Sat, Apr 10, 2010 at 9:26 AM, Craig Andera wrote: > Right, good point: I should have seen that coming given the target > audience. :) > > W

Re: Clojure Concurrency Screencast Available

2010-04-10 Thread Craig Andera
Right, good point: I should have seen that coming given the target audience. :) Within a few hours, a "mobile download" link will appear with wmvs and mp4s in a variety of resolutions so you can watch these offline on the device of your choosing. The conversion lags the rest of the process a littl

Clojure Concurrency Screencast Available

2010-04-09 Thread Craig Andera
I've recorded a screencast on Clojure concurrency primitives. It's available at http://link.pluralsight.com/clojure. Thought some here might find it useful. It's in six parts, the first four of which are up now. The last two will be up by the middle of next week. Feedback welcome! -- You received

Re: What's the function that checks if an object is "sequence-able"?

2009-06-03 Thread craig mcmillan
oops, sorry, that's not what u meant On 3 Jun 2009, at 17:56, craig mcmillan wrote: > user=> (seq? (seq [1])) > true > > On 3 Jun 2009, at 17:53, CuppoJava wrote: > >> >> Hi, >> Is there a function that will return true iff calling seq on it's >

Re: What's the function that checks if an object is "sequence-able"?

2009-06-03 Thread craig mcmillan
user=> (seq? (seq [1])) true On 3 Jun 2009, at 17:53, CuppoJava wrote: > > Hi, > Is there a function that will return true iff calling seq on it's > argument will not throw an error? I thought it was seq?, but (seq? [1 > 2 3]) returns false. > > -Patrick > > --~--~-~--~~--

Re: Best practices for Slime with Clojure

2009-05-17 Thread Craig McDaniel
swank-clojure- init) t)) (defun run-slime (dir) (interactive "DProject directory: ") (cd dir) (when (not (file-directory-p "classes")) (make-directory "classes")) (setq swank-clojure-extra-classpaths '("src"

  1   2   >