Re: Confused about "=", native java arrays and seqs...

2010-03-23 Thread Frank Siebenlist
nge the example, it may add to the confusion ;-) -FS/ On Mar 23, 2010, at 10:24 AM, Frank Siebenlist wrote: > My REPL shows: > ... > user> (= (bytes (.getBytes "a"))(bytes (.getBytes "a"))) > false > user> (= (seq (bytes (.getBytes "a"

Confused about "=", native java arrays and seqs...

2010-03-23 Thread Frank Siebenlist
My REPL shows: ... user> (= (bytes (.getBytes "a"))(bytes (.getBytes "a"))) false user> (= (seq (bytes (.getBytes "a"))) (seq (bytes (.getBytes "a" true ... in other words, "equality" for java byte arrays is defined differently than their seq'ed version. It seems that the native arrays are c

How to "name" a byte array class/type for multi-method dispatch?

2010-03-24 Thread Frank Siebenlist
The following repl session shows my attempt to dispatch a multimethod on "type": ... user> (defmulti mm type) #'user/mm user> (type "a") java.lang.String user> (defmethod mm java.lang.String [s] (println "string")) # user> (mm "a") string nil user> (type (.getBytes "a")) [B user> (defmethod mm [B

Re: Confused about "=", native java arrays and seqs...

2010-03-24 Thread Frank Siebenlist
the very > interisting Henry Baker's egal Paper, and yields the cleanest equality > semantics that I know of. > > On 23 mar, 14:24, Frank Siebenlist wrote: >> My REPL shows: >> ... >> user> (= (bytes (.getBytes "a"))(bytes (.getBytes "a"

Re: How to "name" a byte array class/type for multi-method dispatch?

2010-03-24 Thread Frank Siebenlist
can come up with is (Class/forName "[B"). > > > > On Mar 24, 11:02 am, Frank Siebenlist > wrote: >> The following repl session shows my attempt to dispatch a multimethod on >> "type": >> >> ... >> user> (defmulti

Re: How to "name" a byte array class/type for multi-method dispatch?

2010-03-24 Thread Frank Siebenlist
ent type c" >> [#^Class c] >> (when c (class (java.lang.reflect.Array/newInstance c 0 >> user=> (array-class String) >> [Ljava.lang.String; >> which appears faster than using Class/forName with a created string. >> But since one *can* type a literal

"," is REAL whitespace...

2010-04-01 Thread Frank Siebenlist
Even though the specs clearly say that commas are whitespace, the following repl session doesn't feel "intuitively" right: ... user> (list 1 2 3) (1 2 3) user> (list 1, 2, 3) (1 2 3) user> (list 1, 2, , 3) (1 2 3) user> (list 1, 2, nil , 3) (1 2 nil 3) ... "," is same as ", ," is same as " "...

Re: "," is REAL whitespace...

2010-04-02 Thread Frank Siebenlist
se - syntactically >> no different from comma, but stylistically helpful. >> >> On Fri, Apr 2, 2010 at 1:52 AM, Per Vognsen wrote: >>> >>> It doesn't feel right only if you still think you are programming in >>> an Algol-style language where

Re: "," is REAL whitespace...

2010-04-02 Thread Frank Siebenlist
On Apr 2, 2010, at 7:14 PM, Armando Blancas wrote: >> So, it's all some form of RTFM... but one could argue that this novel use of >> commas in the syntax results in adding a little "incidental complexity" to >> the language ;-) > My wrong assumption was: "whitespace and commas are separators

Re: build.clojure.org update: clojure-contrib 1.2 repo path no longer includes "-master"

2010-05-06 Thread Frank Siebenlist
I just built the netbean+labrepl from start according the getting-started webpage, and the build barfed because labrepl's pom.xml included the "1.2.0-master-SNAPSHOT" instead of "1.2.0-SNAPSHOT" for clojure-contrib. After correction, all build without errors and seems to work fine. -Frank.

Re: Is contributing to clojurescript is intentionally made hard ?

2013-01-18 Thread Frank Siebenlist
One process that could be made a little easier is the contribution of code documentation and suggested improvements of doc-strings. New or improved doc-strings do not change any functionality, impact any tests, require peer review… If we could simply suggest new doc-strings for example in the J

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

2013-01-23 Thread Frank Siebenlist
Happy to help - FrankS. On Jan 23, 2013, at 10:53 AM, Andy Fingerhut wrote: > An interest was expressed by a few in having a separate ClojureScript mailing > list. > > If it is a Google group, that requires moderating messages sent to the group, > via manual approval. I suspect early on ther

Re: ANN: Tawny-OWL 0.9

2013-02-06 Thread Frank Siebenlist
There is one more important difference between EPL and GPL/LGPL that we should be aware off: You cannot copy snippets out of Philip's LGPL'ed code and use them in your own EPL'ed code. For me, one of the great benefits of all the EPL'ed clojure libraries out there is, that I've freely borrowed

Re: Wrong clojure version depending on lein dependencies (was: ANN: Clojure 1.5)

2013-03-02 Thread Frank Siebenlist
> ... > The chain causing problems for you is: > > [clj-ns-browser "1.3.0"] -> [seesaw "1.4.2"] -> [j18n "1.0.1"] -> > [org.clojure/clojure "[1.2,1.5)"] > > The last one there allows clojure below 1.5, which includes -RC17. As > soon as you bump to to 1.5 it ignores the "soft" version in your >

Re: byte-array woes

2013-03-02 Thread Frank Siebenlist
I just ran into that issue while I was constructing byte-arrays for secure-hash test cases. Ended-up using (byte-array (vector-of :byte 1 2 3 4)) to avoid writing the (byte-array [(byte 1)(byte 2)(byte 3)(byte 4)]). Transparently adding valid byte-number values to a byte-array makes sense and

ANN: Clojure Namespace Browser: clj-ns-browser 1.3.1 release

2013-03-03 Thread Frank Siebenlist
Small maintenance release that upgrades project's dependencies to Clojure 1.5 and Seesaw 1.4.3, but works fine with Clojure 1.4 also. As Seesaw's Dave Ray stated it: "The one good reason to upgrade is if you're planning on using Clojure 1.5 and don't feel like being confused by the horrors of M

Re: Wrong clojure version depending on lein dependencies (was: ANN: Clojure 1.5)

2013-03-03 Thread Frank Siebenlist
clj-ns-browser 1.3.1 is released and addresses this issue by upgrading the project's dependencies to seesaw 1.4.3. For docs and code, please see "https://github.com/franks42/clj-ns-browser";. Enjoy, Frank. On Mar 2, 2013, at 10:57 PM, Dave Ray wrote: >>> As i'm responsible for the clj-ns-br

Re: Wrong clojure version depending on lein dependencies

2013-03-04 Thread Frank Siebenlist
Excellent - thanks for letting me know - Frank. On Mar 3, 2013, at 11:37 PM, Tassilo Horn wrote: > Frank Siebenlist writes: > > Hi Frank, > >> clj-ns-browser 1.3.1 is released and addresses this issue by upgrading >> the project's dependencies to seesaw 1.4.3. &

Re: how to get SHA1 of a string?

2013-03-04 Thread Frank Siebenlist
Not sure if it's helpful in this context, but I've been playing with a more functional message-digest/secure-hashing interface recently. Please take a look at: https://github.com/franks42/clj.security.message-digest It's still a little raw, and probably more "educational" than practical right

Re: byte-array woes

2013-03-04 Thread Frank Siebenlist
> issue to help increase its visibility... > > Add your 2 cents here (provided you've a CA): > http://dev.clojure.org/jira/browse/CLJ-766 > > Best, K. > -- > Karsten Schmidt > http://postspectacular.com | http://toxiclibs.org | http://toxi.co.uk > > > On 3

Re: how to get SHA1 of a string?

2013-03-04 Thread Frank Siebenlist
> digest (-> (java.security.MessageDigest/getInstance "sha1") > .reset > (.update nonce-bytes) > (.update create-bytes) > (.update secret-bytes) > .digest) There may be an issue with this snippet o

Re: how to get SHA1 of a string?

2013-03-04 Thread Frank Siebenlist
>(doto (java.security.MessageDigest/getInstance "sha1") > .reset > (.update nonce-bytes) > (.update created-bytes) > (.update secret-bytes))) > > > On Mon, Mar 4,

Re: how to get SHA1 of a string?

2013-03-04 Thread Frank Siebenlist
e digest of "bc"'s bytes and .digest that. Ough… hope that's clear... -FS. On Mar 4, 2013, at 12:15 PM, Aaron Cohen wrote: > I'm not familiar with the class, but it seems that MessageDigest/getInstance > might retrieve some shared instance that could theoretic

Re: how to get SHA1 of a string?

2013-03-04 Thread Frank Siebenlist
t; > and then print this to the terminal, I can see it really is just a > string made of these 3 items. Just a plain string, exactly what I > assumed. > > > On Mar 4, 2:25 pm, Frank Siebenlist > wrote: >>> digest (-> (java.security.MessageDigest/

Re: how to get SHA1 of a string?

2013-03-04 Thread Frank Siebenlist
t;\" Created=\"" created "\"")] >header) > > > I end up with, in part: > > PasswordDigest="[B@26f7b2f4" > Nonce="Y2MwN2JiYzA5MDlmZjE2ZjExMGYzMjRhODA2Yjc5ODc=" > Created="2013-03-04T15:57:52" &g

Re: how to get SHA1 of a string?

2013-03-04 Thread Frank Siebenlist
ain, I am > creating a new instance MessageDigest, and so I don't have to worry > about calling .digest()? > > > > On Mar 4, 2:43 pm, Frank Siebenlist > wrote: >> That should work. >> >> No need for .reset though as the initially constructed Messa

Re: how to get SHA1 of a string?

2013-03-04 Thread Frank Siebenlist
Glad Larry has working code now... As I mentioned before in this thread, I'm working on this functional interface for the message-digesting/secure-hashing, and this whole discussion reads like a use case for the "why?" ;-) It "proofs" to me that there may be real value in a more user-friendly a

Re: how to get SHA1 of a string?

2013-03-04 Thread Frank Siebenlist
rce files to /Users/lkrubner/projects/multi-platform- > data-visualization/mpdv-clojure/target/classes > Release versions may not depend upon snapshots. > Freeze snapshots to dated versions or set the > LEIN_SNAPSHOTS_IN_RELEASE environment variable to override. > > > > &g

Re: how to get SHA1 of a string?

2013-03-04 Thread Frank Siebenlist
Larry, What I can advise though, is to look at my library code and it may give you different perspectives. Furthermore, copy, borrow, and steal what you like and make it your own. -FS. On Mar 4, 2013, at 3:17 PM, Frank Siebenlist wrote: > If your code is for production… do not use my c

Re: how to get SHA1 of a string?

2013-03-04 Thread Frank Siebenlist
h 4, 2013 6:46:07 PM UTC-5, FrankS wrote: > Larry, > > What I can advise though, is to look at my library code and it may give you > different perspectives. > > Furthermore, copy, borrow, and steal what you like and make it your own. > > -FS. > >

Re: how to get SHA1 of a string?

2013-03-05 Thread Frank Siebenlist
words!!! -Frank. On Mar 4, 2013, at 10:52 PM, Frank Siebenlist wrote: > Hi Mark, > > Thanks for sharing! > > I like the approach of hiding all the interaction with the > java.security.MessageDigest library, > and returning the pair of matching digest&verify functions -

Re: confused about getting started with compojure on google app engine

2010-05-31 Thread Frank Siebenlist
Now that would be a fantastic topic for one of Sean Devlin's Full Disclojure videocasts!!! (just a subtle hint from a Full Disclojure fan...;-) ) -Frank. On May 31, 2010, at 12:33 PM, Zitterbewegung wrote: > I was wondering which tutorial I should use to get started with > compojure on google

[ANN]: cljsh & repls 1.9.5

2012-02-17 Thread Frank Siebenlist
CLJSH & REPLS: "cljsh" is a lightweight client that sends clojure statements/files to a persistent repl-server "repls" for evaluation. Release notes Cljsh (>= 1.9.5) and repls (>= 1.9.5) have the following new features: • cljsh automatically finds the repls-server that is started for the projec

bug in clojure.repl/doc to print namespace docs (?)

2012-02-20 Thread Frank Siebenlist
When I request the doc for a namespace, an exception gets thrown (clojure 1.3): user=> (doc clojure.core) ClassNotFoundException clojure.core java.net.URLClassLoader$1.run (URLClassLoader.java:202) I was looking at the source code, and noticed that in the (cond... first the symbol re

Re: bug in clojure.repl/doc to print namespace docs (?)

2012-02-20 Thread Frank Siebenlist
Excellent - Thanks for the confirmation & pointer - FrankS. On Feb 20, 2012, at 4:18 PM, Andy Fingerhut wrote: > Yep, and there is a patch ready to go in JIRA: > > http://dev.clojure.org/jira/browse/CLJ-902 > > Andy > > On Feb 20, 2012, at 3:17 PM, Frank Siebenlist wr

use & require of repl-created namespace throws exception (?)

2012-02-24 Thread Frank Siebenlist
If you create a namespace with associated vars interactively in the repl, and subsequently try to use that functionality in other namspaces with clojure.core/use, an exception is thrown: FileNotFoundException Could not locate cljsh/docs__init.class or cljsh/docs.clj on classpath: clojure.

Strings, Symbols, Keywords, Vars, NS, Type/Class…

2012-03-01 Thread Frank Siebenlist
It is my experience that the way how these fundamental Clojure entities, like Strings, Symbols, Keywords, Vars, NS, and Type/Class, are related, is not so easy to figure out. This is not so much about programming Clojure, but more about getting a better feel how the language is held together one

Re: Strings, Symbols, Keywords, Vars, NS, Type/Class…

2012-03-01 Thread Frank Siebenlist
back to it and am in the process of building out the 1.3 > ontology and reworking the visualization itself a fair bit. > > I hope you find this useful / interesting. > > Cheers, > > - Chas > > On Mar 1, 2012, at 7:14 PM, Frank Siebenlist wrote: > >> It i

inconsistency in (keyword…) constructor

2012-03-01 Thread Frank Siebenlist
The keyword constructor has two signatures: [name] and [ns name] The keyword doc reads: "Returns a Keyword with the given namespace and name. Do not use : in the keyword strings, it will be added automatically." Looking at the implementation and testing in the repl, for [name] the following

Re: inconsistency in (keyword…) constructor

2012-03-02 Thread Frank Siebenlist
Just found your CLJ-891 and added a comment there that keyword has similar issues with a link to this thread. See that you tried to solve it in java… while I tried to stay up in clj … but any protocol-based solution seems to be up in the air still (?). Hopefully both interfaces can be enhanced

How to escape a space in a keyword?

2012-03-06 Thread Frank Siebenlist
I kind of accidently discovered that you can create keywords with an embedded space… not sure if that's a good idea, but you can: user=> (def k (keyword "jaja nee")) #'user/k user=> (str k) ":jaja nee" user=> (name k) "jaja nee" user=> (keyword? k) true user=> (keyword? :jaja nee) CompilerExcepti

Re: How to escape a space in a keyword?

2012-03-06 Thread Frank Siebenlist
One other option I should have tried before: user=> (pr-str k) ":jaja nee" user=> (read-string (pr-str k)) :jaja user=> but unfortunately that doesn't help either. -FrankS On Mar 6, 2012, at 10:44 AM, Frank Siebenlist wrote: > I kind of accidently discovered that y

Re: How to escape a space in a keyword?

2012-03-06 Thread Frank Siebenlist
Those are convincing arguments/examples that spaces should be allowed in keywords. Your solution to enhance "pr": (pr-str k) ; as in your example "(keyword "jaja nee")" should work. Btw., symbols seem to have the exact same issue: user=> (def s (symbol "with space")) #'user/s user=> s with sp

Re: How to escape a space in a keyword?

2012-03-06 Thread Frank Siebenlist
So… spaces are not allowed in symbol and keyword identifiers according to the "spec"… although Stu doesn't quote the phrase following the allowed chars, which reads: (other characters will be allowed eventually…) which seems to keep the door open for allowing spaces in the future (?). If space

Re: How to escape a space in a keyword?

2012-03-06 Thread Frank Siebenlist
hat depends on those, like the json examples. On Mar 6, 2012, at 3:23 PM, Meikel Brandmeyer wrote: > Hi, > > Am 06.03.2012 um 21:28 schrieb Frank Siebenlist: > >> So… spaces are not allowed in symbol and keyword identifiers according to >> the "spec"… >

Re: How to escape a space in a keyword?

2012-03-07 Thread Frank Siebenlist
Clojure is a young language, and I believe there is little argument that some of the interfaces/implementations and associated docs could be improved. You can find plenty of examples where functions would throw exceptions for invalid input, others return nil in that case, and a number return gar

Re: How to escape a space in a keyword?

2012-03-12 Thread Frank Siebenlist
This is my last reply for this thread as the support for "improved" doc strings for symbol and keyword has been kind of underwhelming - which is fine - time to move on. (besides, now I personally know more than enough about the implementation of those functions to use them conformantly ;-) ) >

why do we need a (require…)?

2012-03-23 Thread Frank Siebenlist
I can see the need for refer and alias, but why can the compiler not infer from the use of a fully qualified name that a namespace (or class) that is not loaded yet, has to be "required"? Or did I miss anything? -FrankS. -- You received this message because you are subscribed to the Google

Re: New(er) Clojure cheatsheet hot off the presses

2012-03-27 Thread Frank Siebenlist
> (3) tooltips using a modified TipTip jQuery plugin tool, for people like me > who like its look & feel better than (2). > > http://homepage.mac.com/jafingerhut/files/cheatsheet-clj-1.3.0-v1.4-tooltips/cheatsheet-full.html I like that one - looks cool - very helpful!! Thanks, Frank. On

Re: New(er) Clojure cheatsheet hot off the presses

2012-03-27 Thread Frank Siebenlist
Forgot to add that we only need one cheatsheet, and I vote for (3). On Mar 27, 2012, at 7:55 AM, Frank Siebenlist wrote: >> (3) tooltips using a modified TipTip jQuery plugin tool, for people like me >> who like its look & feel better than (2). >> >> http://

Forgetting (require…) => nasty bug

2012-03-28 Thread Frank Siebenlist
I've been bitten a couple of times now by the following scenario: - Use fully qualified names in the code - Forget to add (require…) for the associated namspace - But one other file already require'ed the same namespace, and the compiler&runtime is happy - all works fine. - Then you include th

Re: Forgetting (require…) => nasty bug

2012-03-28 Thread Frank Siebenlist
On Mar 28, 2012, at 3:15 PM, Phil Hagelberg wrote: > ... > In general though I recommend simply using :require :as for > everything; if your code won't compile without the :as alias in place > then you'll be safe. I realize that's a pragmatic way to force compilation errors. However, I thought

Re: Forgetting (require…) => nasty bug

2012-03-28 Thread Frank Siebenlist
Not sure if that would work for all cases… For example, if you have a lein plugin that require's clojure.set, and you use any fqn in that ns without require'ing it in your file, then your fresh repl will not catch that (… if I understand your setup). However, if you then run it outside of the d

Re: Forgetting (require…) => nasty bug

2012-03-28 Thread Frank Siebenlist
r 28, 2012, at 8:20 PM, Phil Hagelberg wrote: > On Wed, Mar 28, 2012 at 8:03 PM, Frank Siebenlist > wrote: >> For example, if you have a lein plugin that require's clojure.set, and you >> use any fqn in that ns without require'ing it in your file, then your fres

Re: Forgetting (require…) => nasty bug

2012-03-28 Thread Frank Siebenlist
leiningen v3.0 ? ;-) On Mar 28, 2012, at 8:48 PM, Phil Hagelberg wrote: > On Wed, Mar 28, 2012 at 8:30 PM, Frank Siebenlist > wrote: >> Or is it possible to create a sandbox in an existing jvm that would give you >> similar isolation? (which would be far less slow) > &g

[ANN] Clojure Namespace Browser (clj-ns-browser "1.0.0")

2012-04-04 Thread Frank Siebenlist
I still remember the first time I was introduced to Smalltalk, when my colleague demonstrated the class-browser - it was one of those jaw-dropping moments: all that information at your finger-tips of a live- and living system… Guess nowadays it's more nostalgia than anything else, but in many wa

Re: [ANN] Clojure Namespace Browser (clj-ns-browser "1.0.0")

2012-04-05 Thread Frank Siebenlist
Correct - thanks for catching that - should have c&p'ed ;-) -FrankS. On Apr 5, 2012, at 4:06 PM, Changa Damany Imara wrote: > I believe there's a typo in your announcement: > > :dev-development [[clj-ns-browser "1.0.0"]] > > should be > > :dev-dependencies [[clj-ns-browser "1.0.0"] > >

Re: [ANN] Clojure Namespace Browser (clj-ns-browser "1.0.0")

2012-04-06 Thread Frank Siebenlist
on your windows machine and try again? (I don't have any windows box available for testing) -FrankS. On Apr 6, 2012, at 9:01 AM, Lars Nilsson wrote: > On Thu, Apr 5, 2012 at 1:56 AM, Frank Siebenlist > wrote: >> Caveat… it all works well on my MacOSX, but I have seen some iss

Re: [ANN] Clojure Namespace Browser (clj-ns-browser "1.0.0")

2012-04-06 Thread Frank Siebenlist
consolata results in sdoc displaying the text > correctly. > > Thanks for a very nifty tool. :) > > Lars Nilsson > > On Fri, Apr 6, 2012 at 12:29 PM, Frank Siebenlist > wrote: >> Interesting "feature" on windoze… ;-) >> >> One thing that may cause

where do you put the docstring in a deftype declaration?

2012-04-12 Thread Frank Siebenlist
Confusingly yours, FrankS. -- 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

Re: where do you put the docstring in a deftype declaration?

2012-04-12 Thread Frank Siebenlist
a java class, not a clojure var. Classes have no > slots to store a docstring. Just put a comment somewhere. > > On Apr 12, 9:52 pm, Frank Siebenlist > wrote: >> Confusingly yours, FrankS. > > -- > You received this message because you are subscribed to the Google >

weird pprint behaviour ?

2012-05-03 Thread Frank Siebenlist
I'm using the following function to have pprint write into a string and limit the output: (defn pprint-str "Return string with pprint of v, and limit output to prevent blowup." [v] (with-out-str (binding [*print-length* 32 *print-level* 6] (pprint v Everything seems to work as expect

Re: weird pprint behaviour ?

2012-05-03 Thread Frank Siebenlist
Thanks for catching that - I didn't even notice that I was printing the binding var itself… need coffee… -FS. On May 3, 2012, at 9:59 AM, Meikel Brandmeyer wrote: > Hi, > > Am 03.05.2012 um 18:43 schrieb Frank Siebenlist: > >> user=> (pprint #'clojure.c

[ANN] The "It starts to look like a real App", 1.2.0 release of the Clojure Namespace Browser (clj-ns-browser)

2012-05-03 Thread Frank Siebenlist
wser";. Feedback, suggestions, and pull requests with yet more cool features, are very much appreciated! Enjoy, Frank Siebenlist Andy Fingerhut -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to

Re: [ANN] The "It starts to look like a real App", 1.2.0 release of the Clojure Namespace Browser (clj-ns-browser)

2012-05-06 Thread Frank Siebenlist
Can you please share your project.clj when you ask a Q like this? Thanks, FrankS. On May 5, 2012, at 5:01 PM, Rostislav Svoboda wrote: > I put > :dev-dependencies [[clj-ns-browser "1.2.0"]] > > to my project.clj and did: > > $ lein deps > Copying 46 files to /home/bost/dev/webcli/lib > [WARN

Re: [ANN] Exploding Fish: A URI Library for Clojure

2012-05-06 Thread Frank Siebenlist
… but dolphins are no fish… On May 6, 2012, at 5:25 PM, Sean Neilan wrote: > Perhaps a reference to PHP's explode function which is the java equivalent of > String.split? > http://php.net/manual/en/function.explode.php > And then URI is the fish. > > Or it could be a reference to an unwritten s

Re: Getting a Custom JFrame up and Running

2012-05-11 Thread Frank Siebenlist
You may want to check-out Dave Ray's seesaw . "Seesaw turns the Horror of Swing into a friendly, well-documented, Clojure library" https://github.com/daveray/seesaw -FS. On May 10, 2012, at 3:03 PM, JvJ wrote: > Hi, > > I'm new to Clojure, but a longtime Java programmer. I'm trying to get >

Re: defstruct defrecord metadata

2012-05-17 Thread Frank Siebenlist
Is this thread related to http://dev.clojure.org/jira/browse/CLJ-304 ? Would be nice to address that issue. -FrankS. On May 16, 2012, at 6:54 AM, Tim Visher wrote: > On Tue, May 15, 2012 at 12:11 PM, JDuPreez wrote: >> Maybe I should post my solution to this problem here? > > Sounds like a p

Re: docstrings of if-let and when-let incorrect

2012-05-17 Thread Frank Siebenlist
Christophe Grand was "experimenting" with some extensions to if-let and when-let that had implicit ANDs for the let-forms: https://github.com/cgrand/parsley/blob/master/src/net/cgrand/parsley/util.clj It feels intuitive to me to allow multiple if-let-forms like cgrand implements, and I can cert

Re: Explaining the thrush -> operator.

2012-06-11 Thread Frank Siebenlist
Just nitpicking, but for me those thread-first/last operators beg for "proper" formatting with newlines and indentation to emphasize the "threading", like not: (-> 2 (* 5) (+ 3)) but: (-> 2 (* 5) (+ 3)) also as mentioned before, using thread-first and thread-last to name those mac

Re: [ANN] Nippy, a fast Clojure serializer and drop-in reader replacement

2012-07-09 Thread Frank Siebenlist
Just trying to understand the issues/solutions for the (de-)serializing of clojure data structures… With the tag literal support of 1.4+, is that kind of the idiomatic way of the future to structure protocols for serialized clojure data/code? When you say that Nippy is much faster than the read

Re: [ANN] Nippy, a fast Clojure serializer and drop-in reader replacement

2012-07-11 Thread Frank Siebenlist
On Jul 10, 2012, at 1:51 AM, Peter Taoussanis wrote: > With the tag literal support of 1.4+, is that kind of the idiomatic way of > the future to structure protocols for serialized clojure data/code? > > Sorry, could you clarify what you're asking here - I'm not sure if I follow > what you mea

Clojure on an Erlang-vm-os on Xen?

2012-07-13 Thread Frank Siebenlist
Just became aware of this effort: "http://erlangonxen.org/"; which shows off some impressive properties: * Startup time of a new instance is 100ms * Instances are provisioned after the request arrival - all requests get handled * No instances are running waiting for requests - the cloud footprint

Re: seesaw's beautiful docstrings

2012-07-25 Thread Frank Siebenlist
We have an smalltalk-like clojure namespace/var/type-browser for docstrings/clojuredocs/source at "https://github.com/franks42/clj-ns-browser"; that may be of use… which happens to be built on top of seesaw. -FrankS. On Jul 25, 2012, at 7:25 PM, Mark Derricutt wrote: > On 25/07/12 9:17 PM, L

Re: [viewing clojure datastructures] Is there something better than clojure.inspector?

2012-08-22 Thread Frank Siebenlist
Check out clj-ns-browser ("https://github.com/franks42/clj-ns-browser";). When a var is defined, you can look at it's value, which is presented with pprint, which means that most data structures are nicely displayed. When the value is a list/tree-like data structure, you can bring up Rich's ori

Joxa (Re: Clojure on an Erlang-vm-os on Xen?)

2012-08-24 Thread Frank Siebenlist
nder if that implementation as an example would make it easier to have a clojure-on-erlang-vm implementation. Enjoy, Frank. On Jul 13, 2012, at 10:15 AM, Frank Siebenlist wrote: > Just became aware of this effort: "http://erlangonxen.org/"; > > which shows off some im

[ANN] clj-ns-browser 1.3.0 - the "cool button-row widget" release

2012-09-14 Thread Frank Siebenlist
er • many invisible improvements... There are too many other great features to mention here - please take a look at: "https://github.com/franks42/clj-ns-browser"; Enjoy, Frank Siebenlist Andy Fingerhut -- You received this message because you are subscribed to the Google Groups "Clojur

Re: Calling Clojurescript code from Clojure

2012-09-18 Thread Frank Siebenlist
I have the same requirement to have a clojurescript-form in my clojure-environment that I want to evaluate in the browser… To make the following code-snippet work, you're supposed to have a browser-repl session running, and start a new repl-session on that same JVM from where you invoke the fol

Q about eval-and-print function in clojurescript's cljs.repl (repl.clj)

2012-09-18 Thread Frank Siebenlist
I'm trying to understand the clojurescript-code of the repl functionality, and I'm confused… The following cljs.repl/eval-and-print function takes a cljs-form, compiles it, sends it to the browser as javascript, and then receives the result, and the… try's to use "read-string" on that return va

Re: Q about eval-and-print function in clojurescript's cljs.repl (repl.clj)

2012-09-19 Thread Frank Siebenlist
1 2) (- 3 2)") (+ 1 2) Still confused... -FS. On Sep 18, 2012, at 11:51 PM, Frank Siebenlist wrote: > I'm trying to understand the clojurescript-code of the repl functionality, > and I'm confused… > > The following cljs.repl/eval-and-print function takes a cljs-form

Re: Q about eval-and-print function in clojurescript's cljs.repl (repl.clj)

2012-09-22 Thread Frank Siebenlist
Hubert Iwaniuk wrote: > If you look at cljs counterpart of it you'll see that maps are send as > responses, that is why read-string is used. > > HTH > > Frank Siebenlist wrote: >> >> Sorry - I've answered part of my own Q by reading the read-string doc

Redirect *out* of the cljs-repl?

2012-09-22 Thread Frank Siebenlist
To be more precise, if you do a (print "something") in a cljs-script, that gets compiled and evaluated in the browser's js-vm, then the result is sent back thru a separate http-post and dispatched to the multimethod "handle-post" implementation for :print in clojurescript's cljs.repl.browser: -

clojurescript: how to use clojure.reflect/doc in the cljs-repl?

2012-09-23 Thread Frank Siebenlist
Trying to use the clojure.reflect/doc function in the cljs-repl, but I only errors" --- ClojureScript:cljs.user> (clojure.reflect/doc "clojure.reflect/doc") nil Reflection query failed. ClojureScript:cljs.user> (clojure.reflect/doc clojure.reflect.doc) nil Reflection query failed. ClojureScript

clojurescript: *ns*, all-ns, ns-map, ns-publics, ns-* ?

2012-09-23 Thread Frank Siebenlist
Understand that there are no implementations (yet) of *ns*, all-ns, ns-map, ns-publics, ns-* for cljs, but was wondering how some of that associated info could be found at the repl or in your cljs-code… Could I introspect the java object hierarchy to find some of that information? Thanks, Frank

clojurescript: var names with "-" and "_" are rendered to the same internal name (?)

2012-09-23 Thread Frank Siebenlist
The following cljs-repl session shows the issue: ClojureScript:cljs.user> (def my-var "YES") "YES" ClojureScript:cljs.user> my-var "YES" ClojureScript:cljs.user> (def my_var "NO") "NO" ClojureScript:cljs.user> my_var "NO" ClojureScript:cljs.user> my-var "NO" ClojureScript:cljs.user> (set

Re: clojurescript: var names with "-" and "_" are rendered to the same internal name (?)

2012-09-24 Thread Frank Siebenlist
That CLJS-336 feels like a different issue that doesn't map to what I'm seeing... On Sep 24, 2012, at 1:45 AM, Raju Bitter wrote: > Identifiers in JavaScript cannot contain a hyphen/minus character: > https://developer.mozilla.org/en-US/docs/JavaScript/Guide/Values,_variables,_and_literals >> A

Re: clojurescript: var names with "-" and "_" are rendered to the same internal name (?)

2012-09-24 Thread Frank Siebenlist
Thanks for digging. The mapping of "-" to "_" comes indeed from clojure.lang.Compile/munge which is called by cljsh.compiler/munge: user=> (#'cljs.compiler/munge "-") "_" user => (clojure.lang.Compiler/munge "-") "_" user => (clojure.lang.Compiler/munge "_") "_" user => ---

Re: clojurescript: *ns*, all-ns, ns-map, ns-publics, ns-* ?

2012-09-27 Thread Frank Siebenlist
Thanks Stuart - especially @namespaces is very helpful for understanding more about the resolution process. On Sep 26, 2012, at 12:00 PM, Stuart Sierra wrote: > Some of this information exists in the CLJS compiler, although it's not > documented. > > For example, the cljs.analyzer namespace

Re: clojurescript: how to use clojure.reflect/doc in the cljs-repl?

2012-10-05 Thread Frank Siebenlist
port 3000. The cljs-reflect code seems to get a conn from (net/xhr-connection), but I can not see any port number specified… I've reached the end of my javascript and goog knowledge… please. Did anyone get this to work with the lein-cljsbuild setup? -FrankS. On Sep 23, 2012, at 2:10 PM,

Re: clojurescript: how to use clojure.reflect/doc in the cljs-repl?

2012-10-05 Thread Frank Siebenlist
7;line":10,"\uFDD0'file":"/Users/franks/Development/ClojureScript/swimtimer/src-cljs/example/hello.cljs"}); which is what one expects. -FS. On Oct 5, 2012, at 9:13 PM, Frank Siebenlist wrote: > …bumb… > > Is this maybe related to the use of lein-cljsbuil

Re: clojurescript: how to use clojure.reflect/doc in the cljs-repl?

2012-10-05 Thread Frank Siebenlist
t;say-hello > > doc","\uFDD0'line":10,"\uFDD0'file":"/Users/franks/Development/ClojureScript/swimtimer/src-cljs/example/hello.cljs"}); > > which is what one expects. > > -FS. > > > On Oct 5, 2012, at 9:13 PM, Frank Siebe

Re: clojurescript: how to use clojure.reflect/doc in the cljs-repl?

2012-10-06 Thread Frank Siebenlist
te: > Sorry about the reflect stuff is quite new and in need of work. The reflect > support should work through whatever port browser REPL was setup on. > > On Saturday, October 6, 2012, Frank Siebenlist wrote: > Ok - I managed to get clojure.reflect/doc to work if the browser loads

Cljs-repl server as ring middleware?

2012-10-08 Thread Frank Siebenlist
I've been digging through the clojurescript code lately, and making some changes to the repl-related code. This is quite difficult as clojurescript seems to have its own "proprietary" implementation of a webserver that serves the repl-communication as well as other possible handlers, like the r

Re: Cljs-repl server as ring middleware?

2012-10-08 Thread Frank Siebenlist
les to provide ssl, authN&authZ, websockets/aleph, etc. Just wanting to here the pros&cons. -FrankS. On Oct 8, 2012, at 9:57 AM, David Nolen wrote: > On Mon, Oct 8, 2012 at 12:51 PM, Frank Siebenlist > wrote: >> I've been digging through the clojurescript code latel

Re: Cljs-repl server as ring middleware?

2012-10-08 Thread Frank Siebenlist
idge-cljs is an nrepl http client > for clojurescript > > https://github.com/hiredman/nrepl-cljs-middleware is an example of a > nrepl middleware, which exposes clojurescript compilation as an nrepl > command > > On Mon, Oct 8, 2012 at 9:51 AM, Frank Siebenlist > wrote: &

Re: Cljs-repl server as ring middleware?

2012-10-08 Thread Frank Siebenlist
Understood that was the initial reason, but how about the reflection interface? Should that be rerendered to use the same CrossPageChannel connection? -FrankS. On Oct 8, 2012, at 12:03 PM, David Nolen wrote: > On Mon, Oct 8, 2012 at 2:38 PM, Frank Siebenlist > wrote: >> However

Re: Cljs-repl server as ring middleware?

2012-10-08 Thread Frank Siebenlist
Ok - thanks - slowly start to see the path ;-) I cannot find an explicit JIRA entry for that "reflection interface over CrossPageChannel" - should I add one for this, or did I miss the issue#? -FS. On Oct 8, 2012, at 12:47 PM, David Nolen wrote: > On Mon, Oct 8, 2012 at 3

Re: Cljs-repl server as ring middleware?

2012-10-08 Thread Frank Siebenlist
uot; issue, as the help/reflection facilities when you use lein-cljsbuild are… non-existing, which raises the barrier to entry for new clojurescript coders and having a repl without any online doc&friends doesn't feel very lispy. -FS. On Oct 8, 2012, at 1:15 PM, David Nolen wro

Re: ANN: polyfn

2012-10-08 Thread Frank Siebenlist
Interesting project, although I'm still a little unclear about the "convincing" use cases where you would choose polyfn over protocols... Also, how does the polyfn implementation compare to the clojurescript protocol implementation? -FrankS. On Oct 8, 2012, at 7:17 PM, Paul Stadig wrote: >

Re: ANN: Clojure 1.3 and 1.4 Cheat Sheet v7

2012-10-14 Thread Frank Siebenlist
Hi Andy, Really believe you should replace the current http://clojure.org/cheatsheet with http://jafingerhut.github.com/cheatsheet-clj-1.3/cheatsheet-tiptip-no-cdocs-summary.html as the tooltips will help people to navigate the clojure ecosystem, and that's the version everyone, especially

  1   2   >