Re: Clojurescript question

2012-11-17 Thread Paul Gearon
Since HelloWorld worked for me, I tried to output the command line arguments as a string. Consequently, the program now looks like: (ns cljshello.core (:require [cljs.nodejs :as nj])) (defn -main [& argv] (println (str "Hello, World!" (.-argv nj/process) "\n"))) (set! *main-cli-fn* -main)

Re: Clojurescript question

2012-11-17 Thread Paul Gearon
On Saturday, 17 November 2012 19:52:39 UTC-5, David Nolen wrote: > > What is the error under simple optimizations? Errors under advanced > optimizations are not particularly informative :) Good point, sorry. Every minor change, is leading to significant differences, so I'm trying to strip it

Re: Clojure to Haskell Compiler

2012-11-17 Thread James Rothering
I'm sorry, I never heard of this. How would you compile Clojure to Haskell? On Sat, Nov 17, 2012 at 10:31 AM, Ahmed Shafeeq Bin Mohd Shariff < sepultura.tri...@gmail.com> wrote: > Hi guys, > > I've been frustrated with Clojure's slow speed on the JVM. I've been > thinking of how it can be compile

Re: Clojurescript question

2012-11-17 Thread David Nolen
What is the error under simple optimizations? Errors under advanced optimizations are not particularly informative :) Thanks On Saturday, November 17, 2012, Paul Gearon wrote: > Looking at the Clojurescript page on Github I can't find the appropriate > place to ask about potential bugs unles

Re: Request for a hint

2012-11-17 Thread Russell Whitaker
On Sat, Nov 17, 2012 at 3:11 PM, Charlie Griefer wrote: > For the record, I point out that its not a "bug" specifically because > you will see this many many many many times throughout the book. In > fact, pretty much any time a new function or form is introduced. > > (function-name argument-1 arg

Re: Request for a hint

2012-11-17 Thread Charlie Griefer
For the record, I point out that its not a "bug" specifically because you will see this many many many many times throughout the book. In fact, pretty much any time a new function or form is introduced. (function-name argument-1 argument-2 ... argument-n) This is not real code meant to be pasted

Re: Request for a hint

2012-11-17 Thread Charlie Griefer
On Sat, Nov 17, 2012 at 5:32 PM, Milen Ivanov wrote: > Dear Mr. Chose, > > Thank you for your help! > > So, the "bug" is then in the book. Fine. There's no "bug" in the book. You copied sample code that's meant to show the syntax of using conj directly into the repo, using undeclared values. (c

Re: Request for a hint

2012-11-17 Thread Milen Ivanov
Dear Mr. Chose, Thank you for your help! So, the "bug" is then in the book. Fine. Best Regards, Milen On Saturday, November 17, 2012 7:05:12 PM UTC+2, Baishampayan Ghose wrote: > > Hi Milen, > > The function `conj` "conjoins" an item into a Clojure collection. In your > case, you need to defi

Re: Clojure to Haskell Compiler

2012-11-17 Thread Dennis Haupt
why not just use haskell instead? i doubt you can just convert the code Am 17.11.2012 19:31, schrieb Ahmed Shafeeq Bin Mohd Shariff: > Hi guys, > > I've been frustrated with Clojure's slow speed on the JVM. I've been > thinking of how it can be compiled to native and I feel that compiling > C

Re: CLJS-418: Unspecified dependency on google-closure-library-third-party

2012-11-17 Thread Stuart Sierra
The real question I'm hoping somebody can answer is: what changed to cause this? The G.Closure library or ClojureScript? -S -- 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

Re: Clojure to Haskell Compiler

2012-11-17 Thread Brandon Bickford
Hey, By slow speed, do you mean startup/compilation time or execution time of running programs? I have noticed that the execution time is actually pretty good and can be close to Java execution time (if you think Java execution time is good). The startup/compilation time really bugs me. I obser

Re: Clojurescript question

2012-11-17 Thread Mimmo Cosenza
I just submitted the first one few hours ago: here is the page where I found the link to jira http://clojure.org/contributing and here is the jira url http://dev.clojure.org/jira/secure/Dashboard.jspa mimmo On Nov 17, 2012, at 8:36 PM, Paul Gearon wrote: > Looking at the Clojurescript page

Clojurescript question

2012-11-17 Thread Paul Gearon
Looking at the Clojurescript page on Github I can't find the appropriate place to ask about potential bugs unless it's here. Can anyone help please? (David?) Meanwhile, in case it's the correct place, I've tried the following as a simple test to run on Node.js: --- (ns jpp.core) (defn -mai

Re: Clojure to Haskell Compiler

2012-11-17 Thread Baishampayan Ghose
Ahmed, You're grossly underestimating the effort needed to accomplish something like that. Why don't you look at your Clojure code and figure out ways of optimizing that instead? -BG On Sat, Nov 17, 2012 at 1:31 PM, Ahmed Shafeeq Bin Mohd Shariff < sepultura.tri...@gmail.com> wrote: > Hi guys

Re: Clojure to Haskell Compiler

2012-11-17 Thread Andy Fingerhut
There have been several projects where people have begun developing Clojure to C or C++ translations, but I don't know how fleshed out those are. ClojureC - https://github.com/schani/clojurec Ferret - http://nakkaya.com/2011/06/29/ferret-an-experimental-clojure-compiler/ These do not have the a

Clojure to Haskell Compiler

2012-11-17 Thread Ahmed Shafeeq Bin Mohd Shariff
Hi guys, I've been frustrated with Clojure's slow speed on the JVM. I've been thinking of how it can be compiled to native and I feel that compiling Clojure to Haskell and then using ghc to convert this to native would be a good idea since Haskell has a large set of good libraries. What do you

Re: Converting large OOP codebase to clojure

2012-11-17 Thread abp
Use abstractions, forget inheritance. Try modeling what the program does in terms of data conversion. Then you will only need functions and data. On Saturday, November 17, 2012 2:40:05 PM UTC+1, Jonathon McKitrick wrote: > > One project I've considered porting is highly OO, with a large number of

syntax for defrecord literals and tagged literals

2012-11-17 Thread Brent Millare
The syntax for defrecord literals and tagged literals is very similar. user> (defrecord x [y]) user.x user> #user.x[3] #user.x{:y 3} user> #user.x [3] RuntimeException Unreadable constructor form starting with "#user.x " clojure.lang.Util.runtimeException (Util.java:170) [3] Basically the diff

Re: Request for a hint

2012-11-17 Thread Baishampayan Ghose
Hi Milen, The function `conj` "conjoins" an item into a Clojure collection. In your case, you need to define both `coll` and `item` for the example to work. Consider these examples - (conj [1 2 3] 4) (conj '(1 2 3) 4) (conj #{1 2 3} 4) (def coll [1 2 3 4 5]) (def item 6) (conj coll item) etc.

Request for a hint

2012-11-17 Thread Milen Ivanov
Dear All, I am trying to make sense of Closure by reading the book Programming Closure, 2nd Eddition. I persistently get booed at one of the very first lines of code in the book: (conj coll item) The listing (rather short) is below. May I please ask you for some hint because beginner's luck s

Re: Are agents suitable for c10k concurrency?

2012-11-17 Thread László Török
Hi I would only add, that with Clojure 1.5 you can supply your own Executor using (send-via ), the default threadpools are not hard-wired anymore. See https://github.com/clojure/clojure/commit/f5f4faf95051f794c9bfa0315e4457b600c84cef#src/jvm/clojure/lang/Agent.javafor further details. Las On No

ANN: Clojure/West - Portland, OR - Mar 18-20, 2013

2012-11-17 Thread Alex Miller
If you somehow missed the Conj, fear not! You can still attend a Clojure conference soon! Clojure/West will take place March 18-20th in the wonderful town of Portland, Oregon. We will be using the Gerding Theater at the Armory as our venue. Some portions of the conference will be single track like

Designing for Simplicity

2012-11-17 Thread Oskar Kvist
Hi! I have listened to Rich's presentation Simple Made Easy, and he has convinced me of the virtures of simplicity. However, I am not so good at designing simple stuff myself. Writing things down makes me think more clearly, and I was also hoping that you can help me by giving some input and c

Re: Are agents suitable for c10k concurrency?

2012-11-17 Thread Philip Potter
send-off works by submitting a Runnable to a newCachedThreadPool. http://stackoverflow.com/questions/11316737/managing-agent-thread-pools-in-clojure A Runnable sent to a thread pool will have exclusive use of that thread until it completes; therefore, greater concurrency can only be achieved by m

ClojureCLR: with-open in .NET 3.5 is unable to find .Dispose method on IDisposable

2012-11-17 Thread FC
Hi DavidM and ClojureCLR users, In ClojureCLR built using .NET 3.5 framework, with-open needs some help finding the .Dispose method on IDisposable objects: It occurs when calling with-open on RegistryKey and System.IO.BinaryWriter instances. Here's the code snippet demonstrating this: http://

Converting large OOP codebase to clojure

2012-11-17 Thread Jonathon McKitrick
One project I've considered porting is highly OO, with a large number of classes and several levels of inheritance. In Common Lisp, I'd just use CLOS. What methodology would be good to translate such a project to clojure, while maintaining heavy reuse of inherited behavior and abstraction? -

Are agents suitable for c10k concurrency?

2012-11-17 Thread Elliot
Hi all, I'm writing a c10k-style service, i.e. suppose 10,000 concurrent connections, mostly IO-bound. Clojure agents with `send-off` are fantastically close to what I want conceptually, but I'm curious about the implementation details--can anyone confirm, this would end up forking 10,000 t

Re: Coding Standard - ns usage

2012-11-17 Thread Denis Labaye
On Mon, Nov 12, 2012 at 6:37 PM, Sean Corfield wrote: > On Sun, Nov 11, 2012 at 10:31 PM, Denis Labaye > wrote: > > Most of my Clojure usage is as a scripting language (where other would > use > > Python or Ruby). > > I usually don't plan in advance how my program will be splitted in > > namespac