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

2010-03-23 Thread Frank Siebenlist
, 2010, at 10:24 AM, Frank Siebenlist wrote: 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

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 compared on

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)) #MultiFn clojure.lang.mult...@41e3a0ec user (mm a) string nil user (type (.getBytes a)) [B

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

2010-03-24 Thread Frank Siebenlist
Baker's egal Paper, and yields the cleanest equality semantics that I know of. On 23 mar, 14:24, Frank Siebenlist frank.siebenl...@gmail.com wrote: My REPL shows: ... user (= (bytes (.getBytes a))(bytes (.getBytes a))) false user (= (seq (bytes (.getBytes a))) (seq (bytes (.getBytes

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

2010-03-24 Thread Frank Siebenlist
with is (Class/forName [B). On Mar 24, 11:02 am, Frank Siebenlist frank.siebenl...@gmail.com wrote: 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

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

2010-03-24 Thread Frank Siebenlist
a literal byte array class in java, I'd imagine there's some way to implement this with bytecode magic, rather than going through java.lang.reflect.Array. On Mar 24, 3:39 pm, Frank Siebenlist frank.siebenl...@gmail.com wrote: Right - not very different from the (class (byte-array 1)) that I

, 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 ... big gotcha

Re: , is REAL whitespace...

2010-04-02 Thread Frank Siebenlist
On Fri, Apr 2, 2010 at 12:37 PM, Frank Siebenlist frank.siebenl...@gmail.com wrote: 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

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 instead

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. On

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

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 andy.finger...@gmail.com 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

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

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 :dependencies, and

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

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 dave...@gmail.com wrote: As i'm responsible for

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 t...@gnu.org wrote: Frank Siebenlist frank.siebenl...@gmail.com 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
on that 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 March 2013 00:01, Frank Siebenlist frank.siebenl

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 of code

Re: how to get SHA1 of a string?

2013-03-04 Thread Frank Siebenlist
(java.security.MessageDigest/getInstance sha1) .reset (.update nonce-bytes) (.update created-bytes) (.update secret-bytes))) On Mon, Mar 4, 2013 at 2:25 PM, Frank Siebenlist frank.siebenl...@gmail.com wrote: digest

Re: how to get SHA1 of a string?

2013-03-04 Thread Frank Siebenlist
... -FS. On Mar 4, 2013, at 12:15 PM, Aaron Cohen aa...@assonance.org wrote: I'm not familiar with the class, but it seems that MessageDigest/getInstance might retrieve some shared instance that could theoretically need to be reset, no? On Mon, Mar 4, 2013 at 2:43 PM, Frank Siebenlist

Re: how to get SHA1 of a string?

2013-03-04 Thread Frank Siebenlist
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 frank.siebenl...@gmail.com wrote: digest (- (java.security.MessageDigest/getInstance sha1) .reset (.update nonce

Re: how to get SHA1 of a string?

2013-03-04 Thread Frank Siebenlist
is still incorrect. I also tried this with the PasswordDigest base64 encoded, and that did not work either. On Mar 4, 2:43 pm, Frank Siebenlist frank.siebenl...@gmail.com wrote: That should work. No need for .reset though as the initially constructed MessageDigest is already

Re: how to get SHA1 of a string?

2013-03-04 Thread Frank Siebenlist
about calling .digest()? On Mar 4, 2:43 pm, Frank Siebenlist frank.siebenl...@gmail.com wrote: That should work. No need for .reset though as the initially constructed MessageDigest is already in its initial state. Be careful with .digest as it implicitly resets the MessageDigest

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

Re: how to get SHA1 of a string?

2013-03-04 Thread Frank Siebenlist
. Freeze snapshots to dated versions or set the LEIN_SNAPSHOTS_IN_RELEASE environment variable to override. On Mar 4, 4:55 pm, Frank Siebenlist frank.siebenl...@gmail.com wrote: Glad Larry has working code now... As I mentioned before in this thread, I'm working on this functional

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 frank.siebenl...@gmail.com wrote: If your code

Re: how to get SHA1 of a string?

2013-03-04 Thread Frank Siebenlist
, 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 frank.si...@gmail.com wrote: If your code is for production… do not use my code

Re: how to get SHA1 of a string?

2013-03-05 Thread Frank Siebenlist
!!! -Frank. On Mar 4, 2013, at 10:52 PM, Frank Siebenlist frank.siebenl...@gmail.com 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 digestverify functions - it will avoid

cljsc-vector to js-array conversion issue (?)

2011-10-15 Thread Frank Siebenlist
I'm trying to translate some js-code into cljsc, and the following is a snippet that does it almost verbatim to see if I can make things work: code (def MyApp (Ext.Application. (make-js-map {name NotesApp useLoadMask true launch (fn []

Re: cljsc-vector to js-array conversion issue (?)

2011-10-15 Thread Frank Siebenlist
. Given how often JS frameworks want to be fed nested objects like this, a patch for http://dev.clojure.org/jira/browse/CLJS-37 would be nice. David On Sat, Oct 15, 2011 at 8:33 PM, Frank Siebenlist frank.siebenl...@gmail.com wrote: I'm trying to translate some js-code into cljsc

Re: cljsc-vector to js-array conversion issue (?)

2011-10-15 Thread Frank Siebenlist
, not JavaScript objects. David On Sat, Oct 15, 2011 at 9:02 PM, Frank Siebenlist frank.siebenl...@gmail.com wrote: Thanks for the quick reply, and yes that works! Still a bit puzzled why sometimes cljsc-vectors seem to be converted into arrays as in the (def abc [jaja nee]) example

ClojureScript Mobile BOF at the Clojure/conj?

2011-10-16 Thread Frank Siebenlist
Is there any interest to organize some form of ClojureScript Mobile BOF at the Clojure/conj? (some informal, ad hoc get-together where developers can share experiences and show-off some of their work related to making ClojureScript work on the mobile devices) The only thing we would need is

Re: ClojureScript Mobile BOF at the Clojure/conj?

2011-10-17 Thread Frank Siebenlist
The hotel bar may be a good backup venue ;-) On Oct 17, 2011, at 9:17 AM, Federico Brubacher wrote: This seems interesting, if there's not a BOF let's meet informally anyway ! On Mon, Oct 17, 2011 at 1:40 AM, Frank Siebenlist frank.siebenl...@gmail.com wrote: Is there any interest

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,

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

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

2012-08-24 Thread Frank Siebenlist
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 frank.siebenl...@gmail.com wrote: Just became aware of this effort: http://erlangonxen.org/; which shows off some impressive properties

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

2012-09-14 Thread Frank Siebenlist
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 Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please

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

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

2012-09-19 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

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

2012-09-19 Thread Frank Siebenlist
. On Sep 18, 2012, at 11:51 PM, Frank Siebenlist frank.siebenl...@gmail.com 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, compiles it, sends it to the browser

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

2012-09-22 Thread Frank Siebenlist
neo...@kungfoo.pl 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… nothing is eval'ed of the result - just

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: *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,

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! my-var MAYBE)

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 rajubit...@googlemail.com wrote: Identifiers in JavaScript cannot contain a hyphen/minus character:

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 the.stuart.sie...@gmail.com wrote: Some of this information exists in the CLJS compiler, although it's not documented. For example, the

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

2012-10-05 Thread Frank Siebenlist
on 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, Frank

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

2012-10-05 Thread Frank Siebenlist
'file],{\uFDD0'method-params:[[]],\uFDD0'name:example.hello/say-hello,\uFDD0'doc: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 Siebenlist frank.siebenl

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

2012-10-05 Thread Frank Siebenlist
, 2012, at 9:13 PM, Frank Siebenlist frank.siebenl...@gmail.com wrote: …bumb… Is this maybe related to the use of lein-cljsbuild and having a separate server from which the js is downloaded? In other words, the reflect handler seems to be listening on the repl server on port 9000

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

2012-10-06 Thread Frank Siebenlist
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 the javascript from the repl-server instead of the separate webserver

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

Re: Cljs-repl server as ring middleware?

2012-10-08 Thread Frank Siebenlist
, websockets/aleph, etc. Just wanting to here the proscons. -FrankS. On Oct 8, 2012, at 9:57 AM, David Nolen dnolen.li...@gmail.com wrote: On Mon, Oct 8, 2012 at 12:51 PM, Frank Siebenlist frank.siebenl...@gmail.com wrote: I've been digging through the clojurescript code lately, and making

Re: Cljs-repl server as ring middleware?

2012-10-08 Thread Frank Siebenlist
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 frank.siebenl...@gmail.com wrote: I've been digging

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 dnolen.li...@gmail.com wrote: On Mon, Oct 8, 2012 at 2:38 PM, Frank Siebenlist

Re: Cljs-repl server as ring middleware?

2012-10-08 Thread Frank Siebenlist
:45 PM, Frank Siebenlist frank.siebenl...@gmail.com wrote: Understood that was the initial reason, but how about the reflection interface? Should that be rerendered to use the same CrossPageChannel connection? -FrankS. Yes, that is what I was suggesting earlier :) David -- You

Re: Cljs-repl server as ring middleware?

2012-10-08 Thread Frank Siebenlist
PM, Frank Siebenlist frank.siebenl...@gmail.com wrote: 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. http://dev.clojure.org/jira/browse

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

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

ClojureScript: how to call a js method when you have the method-string?

2012-10-16 Thread Frank Siebenlist
I understand that you can call js-methods and get properties thru: (.a-method some-js-object param) and (.-a-prop some-js-object) respectively, but how do you invoke either when you have the method/property as a string? The following doesn't seem to work: (let [m a-method

Re: ClojureScript: how to call a js method when you have the method-string?

2012-10-16 Thread Frank Siebenlist
Thanks - that works - that was too easy ;-) I looked at the docstring before of aget because I remembered vaguely that that was how it used to work before .- : cljs.core/aget - Function ([array i] [array i idxs]) Returns the value at the index. Dismissed it for object-access after

Re: ClojureScript: how to call a js method when you have the method-string?

2012-10-16 Thread Frank Siebenlist
Looking at the source of cljs.core/js-clj, I see that aget is also used to access the object properties by name-string… So please tell /me not to worry ;-) -FS. On Oct 16, 2012, at 8:30 PM, Evan Mezeske emeze...@gmail.com wrote: Hmm after reading that docstring, /me hopes he didn't just

Re: ClojureScript: how to call a js method when you have the method-string?

2012-10-17 Thread Frank Siebenlist
It seems you're refering to CLJS-353 - besides supporting a possible Lua backend, it also feels semantically cleaner not to overload array and object access - I'd vote for an additional oget/oset or obj-get/set. Also, the aget and aset interface have this multi-dimensional support thru the

ANN: cljs-info 1.0.0 Help and reflection facilities for ClojureScript

2012-10-18 Thread Frank Siebenlist
cljs-info is a collection of Clojure-functions to provide basic help and reflection facilities for ClojureScript. Some of the functions provided are: cljs-doc, cljs-doc*, cljs-find-doc, cljs-apropos, cljs-source cljs-ns-map, cljs-ns-publics, cljs-ns-refers, cljs-ns-aliases,

Re: ANN: cljs-info 1.0.0 Help and reflection facilities for ClojureScript

2012-10-18 Thread Frank Siebenlist
: https://github.com/franks42/cljs-info/raw/master/docs/cljs-info-clojure%20meetup-20121018.pdf Enjoy, FrankS. On Oct 18, 2012, at 12:28 AM, Frank Siebenlist frank.siebenl...@gmail.com wrote: cljs-info is a collection of Clojure-functions to provide basic help and reflection facilities

CLJS: println stopped working (r1514) ?

2012-10-19 Thread Frank Siebenlist
Not sure if its my cljs-config somehow (working off head r1514), but println doesn't seem to be working anymore: ClojureScript:cljs.user (println JAJA) Error evaluating: (println JAJA) :as cljs.core.println.call(null,\JAJA\);\n #Error: No *print-fn* fn set for evaluation environment

Re: CLJS: println stopped working (r1514) ?

2012-10-19 Thread Frank Siebenlist
, 2012, at 7:56 PM, Frank Siebenlist frank.siebenl...@gmail.com wrote: Not sure if its my cljs-config somehow (working off head r1514), but println doesn't seem to be working anymore: ClojureScript:cljs.user (println JAJA) Error evaluating: (println JAJA) :as cljs.core.println.call(null

CLJS: How can you find the version of clojurescript that you're running?

2012-10-20 Thread Frank Siebenlist
When you have different versions of clojurescript in the dependencies of your main project, how do you ask the repl what version it is running with… is there any easy function/var that I overlooked? Thanks, FrankS. -- You received this message because you are subscribed to the Google Groups

CLJS-402: Re: CLJS: How can you find the version of clojurescript that you're running?

2012-10-21 Thread Frank Siebenlist
dnolen.li...@gmail.com wrote: There is not. That would be useful. On Saturday, October 20, 2012, Frank Siebenlist wrote: When you have different versions of clojurescript in the dependencies of your main project, how do you ask the repl what version it is running with… is there any easy

Re: CLJS: println stopped working (r1514) ?

2012-10-23 Thread Frank Siebenlist
Bump. Could someone please confirm that printing from the repl doesn't work anymore? Thanks, Frank. On Oct 19, 2012, at 8:18 PM, Frank Siebenlist frank.siebenl...@gmail.com wrote: When I eval in the cljs-repl: (set! *print-fn* clojure.browser.repl/repl-print) all works again

Re: CLJS: println stopped working (r1514) ?

2012-10-23 Thread Frank Siebenlist
Sorry - browser-repl- any browser. On Oct 23, 2012, at 1:25 PM, David Nolen dnolen.li...@gmail.com wrote: On Tue, Oct 23, 2012 at 4:18 PM, Frank Siebenlist frank.siebenl...@gmail.com wrote: Bump. Could someone please confirm that printing from the repl doesn't work anymore? Thanks

Re: CLJS: println stopped working (r1514) ?

2012-10-23 Thread Frank Siebenlist
Thanks Paul. Just wanted a confirmation first that this printing from the browser repl doesn't work before opening a new issue. (too many versions and uncommitted changes on my mac - it's a pain trying to create a clean slate - may require a leinm2 hard-reboot… a simple confirmation would

Re: CLJS: println stopped working (r1514) ?

2012-10-23 Thread Frank Siebenlist
Yes - automated testing of cljs in the browser would definitely be Grand with a capital G. Not sure exactly what it would take, but it may be helpful to use this cljs-info.repl/cljs-repl function as it allows you to send cljs-forms for eval to the browser and get the result back from your clj

CLJS: Working with js-lib calls (?)

2012-10-26 Thread Frank Siebenlist
When you're calling functions of js-libs in clojurescript, you will face a lot of boilerplate transformations to native js-objects and/or arrays. The calls that I make start to look like: (js-lib-fn (jayq.util/clj-js param1) (jayq.util/clj-js param2) (jayq.util/clj-js param3)) where the

Re: CLJS: println stopped working (r1514) ?

2012-10-30 Thread Frank Siebenlist
dnolen.li...@gmail.com wrote: On Tue, Oct 23, 2012 at 4:18 PM, Frank Siebenlist frank.siebenl...@gmail.com wrote: Bump. Could someone please confirm that printing from the repl doesn't work anymore? Thanks, Frank. I just checked browser REPL on CLJS master - it works fine for me. David

Re: ClojureScript: catching all javascript exceptions

2012-10-31 Thread Frank Siebenlist
Very useful example - thanks. This should be explained in the official clojurescript doc pages in the exceptions section. -FS. On Oct 31, 2012, at 3:24 AM, Alexander Solovyov alexan...@solovyov.net wrote: On Wed, Oct 31, 2012 at 11:22 AM, AtKaaZ atk...@gmail.com wrote: seems to be working

Re: ClojureScript: catching all javascript exceptions

2012-11-01 Thread Frank Siebenlist
Hi Steve, That sounds very intriguing, but with my limited javascriptgoog knowledge it's difficult to see how you would go about it. Could you please elaborate on what you did and how you get those js-errors reported back to a web server as some form of logging-service (?). Thanks, FrankS.

Re: ClojureScript: catching all javascript exceptions

2012-11-01 Thread Frank Siebenlist
Thanks Steve - exactly what I needed - cool stuff. On Nov 1, 2012, at 3:06 AM, Steve Buikhuizen steve.buikhui...@gmail.com wrote: No problem. On the client (cljs) you should: • require [goog.debug.ErrorReporter :as reporter] • (reporter/install /er) On the server (I'm using Noir

How to call javascript's call/apply to set context/scope with this from clojurescript?

2012-11-06 Thread Frank Siebenlist
In Javascript you seem to be able to set the context for this to any fn-object by specifying your desired context's this in the call/apply call. (never knew about this option - feels like an aweful hack to define invocation-scope but some libraries use it… see

Re: How to call javascript's call/apply to set context/scope with this from clojurescript?

2012-11-06 Thread Frank Siebenlist
Too easy ;-) Thanks, FrankS. On Nov 6, 2012, at 2:38 PM, David Nolen dnolen.li...@gmail.com wrote: You could do: (.call f context ...) On Tue, Nov 6, 2012 at 5:33 PM, Frank Siebenlist frank.siebenl...@gmail.com wrote: In Javascript you seem to be able to set the context

Re: ClojureScript; How to set a field in an external JS library?

2012-11-15 Thread Frank Siebenlist
Try: (set! (.-destinationName msg) test-topic) http://himera.herokuapp.com/index.html -FS. On Nov 15, 2012, at 11:26 AM, Thomas th.vanderv...@gmail.com wrote: Hi, I have an external JS library I want to use and I can call methods on objects from the external library successful, but

Subsequent deliver to promise doesn't seem to throw exception ?

2012-11-24 Thread Frank Siebenlist
I'm confused by the promised behaviour of the documentation of deliver: --- user= (doc deliver) - clojure.core/deliver ([promise val]) Alpha - subject to change. Delivers the supplied value to the promise, releasing any pending derefs. A subsequent call to deliver

Re: Subsequent deliver to promise doesn't seem to throw exception ?

2012-11-24 Thread Frank Siebenlist
://dev.clojure.org/jira/browse/CLJ-1038 Andy On Nov 24, 2012, at 3:21 PM, Frank Siebenlist wrote: I'm confused by the promised behaviour of the documentation of deliver: --- user= (doc deliver) - clojure.core/deliver ([promise val]) Alpha - subject to change

Re: seq? vs sequential? vs coll?

2012-11-26 Thread Frank Siebenlist
Guess we need a test for seq'able ;-) -FS. On Nov 26, 2012, at 1:47 PM, Herwig Hochleitner hhochleit...@gmail.com wrote: 2012/11/26 Philip Potter philip.g.pot...@gmail.com Since ISeq already is a seq and IPersistentCollection derives from Sequable, both will succeed in a seq call. A

Promise for ClojureScript?

2012-11-26 Thread Frank Siebenlist
All this call-back stuff drives me crazy in ClojureScriptJS… Unfortunately we do not have a real cljs promise yet. There seem to be javascript constructs that promise (pun intended) to do similar things - jQuery has some deferred and promise things. I have no experience with any of those

Re: Promise for ClojureScript?

2012-11-26 Thread Frank Siebenlist
Thanks for the pointers! The only issue is that all code refers to node and not the browser's js… :-( Your blocking-deref seems to rely on node/process.nextTick to essentially poll in every event-loop-cycle. Is there any node/process.nextTick equivalent that can be used in the browser? (that

Re: Promise for ClojureScript?

2012-11-26 Thread Frank Siebenlist
I've been following the separate discussion-thread about your enhanced Promise effort, and it looks really cool and very useful. Having that also available (next week ;-) ) in clojurescript would be fantastic! -FS. On Nov 26, 2012, at 5:32 PM, Stuart Sierra the.stuart.sie...@gmail.com wrote:

Re: Promise for ClojureScript?

2012-11-27 Thread Frank Siebenlist
Thanks Max - I can see you have been busy with jayq lately… I'll check it out. -FS. On Nov 27, 2012, at 12:05 AM, Max Penet m...@qbits.cc wrote: jayq [1] now supports jQuery deferred API , there are 2 examples of its use with these 2 macros: let-ajax and let-deferred (see the readme).

Re: [cljs] Implement transport for a REPL

2012-11-27 Thread Frank Siebenlist
Pls take a look at Bodil's recent project: https://github.com/bodil/cljs-noderepl -FS. On Nov 27, 2012, at 1:32 PM, David Nolen dnolen.li...@gmail.com wrote: It's definitely possible. I've been to meaning to merge some experimental work I've done creating a Node.js ClojureScript REPL in

CLJS: UUID generator for ClojureScript

2012-11-28 Thread Frank Siebenlist
I need UUIDs in my CLJS code… cljs.core does include a UUID type, but no generator. I found a couple of efforts and example code at https://github.com/davesann/cljs-uuid and http://catamorphic.wordpress.com/2012/03/02/generating-a-random-uuid-in-clojurescript, but they didn't work with

Re: CLJS: UUID generator for ClojureScript

2012-11-29 Thread Frank Siebenlist
dnolen.li...@gmail.com wrote: Oh though before you lift them out by hand - I would double check that :simple optimizations doesn't already do this for you :) On Thu, Nov 29, 2012 at 1:25 AM, Frank Siebenlist frank.siebenl...@gmail.com wrote: I need UUIDs in my CLJS code… cljs.core does

CLJS: extending types like keyword, symbol and string?

2012-11-30 Thread Frank Siebenlist
When I ask for the type of a keyword, symbol or string, cljs gives me the same answer: --- ClojureScript:cljs.user (type jaja) #function String() { [native code] } ClojureScript:cljs.user (type 'jaja) #function String() { [native code] } ClojureScript:cljs.user (type :jaja) #function String() {

Re: CLJS: extending types like keyword, symbol and string?

2012-11-30 Thread Frank Siebenlist
Sorry - just noticed the Re: cljs: extend-protocol to Keyword discussion of a few days ago. Maybe we should start maintaining an FAQ-like wiki-page with summaries of those issues/features… -FS. On Nov 30, 2012, at 5:17 PM, Frank Siebenlist frank.siebenl...@gmail.com wrote: When I ask

Ann: cljs-uuid-utils (Re: CLJS: UUID generator for ClojureScript)

2012-12-02 Thread Frank Siebenlist
absolutely need to test your code against the modern JS engines - V8, JavaScriptCore, or SpiderMonkey (with JIT turned on). For code like this they are often 100X faster if not far greater than that. On Thu, Nov 29, 2012 at 1:07 PM, Frank Siebenlist frank.siebenl...@gmail.com wrote: Thanks

CLJS: Q about the js-code downloaded by the browser REPL connection...

2012-12-03 Thread Frank Siebenlist
David mentioned in another thread that … the file that's meant to be loaded into the cross page iframe… I noticed that before, but it always puzzled me - time to ask the Q. Could someone please explain why the REPL downloads essentially the same js-code when it connects as the js-code that

  1   2   >