Re: Grateful Appreciation

2017-11-01 Thread Wei Hsu
I want to say the same. I've been using Clojure for nearly a decade and it 
remains my favorite language to work in, largely thanks to the ecosystem 
and wonderful community. Keep up the good work!

-- 
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 to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Parinfer on iOS

2016-08-22 Thread Wei Hsu
On the topic of Parinfer, what's the best Parinfer mode for Emacs right now?

On Monday, August 22, 2016 at 3:52:33 PM UTC-7, Wes Morgan wrote:
>
> If anyone else would like to edit Clojure on iOS with parinfer (or is just 
> interested in expanding the number of places where Clojure can comfortably 
> occur), please vote for my feature request on Textastic (an otherwise very 
> nice iOS text editor with Clojure syntax highlighting): 
> http://feedback.textasticapp.com/topics/2008-parinfer-support-for-lisps/ 
>
> The author is waiting to see how many votes it gets to decide if it's 
> worth implementing or not.

-- 
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 to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ANN] Reagent + Sente (+ Heroku) = Rente

2015-01-22 Thread Wei Hsu
How are you running Datomic on Heroku?

On Thursday, January 22, 2015 at 8:53:29 AM UTC-8, Henrik Mohr wrote:

 (still) a moderate load. Around 10-50 users online at the same time. Not 
 an extreme load on the Datomic Peer library since not a whole lot of data 
 is stored per user (well, not for all users at least). But the server does 
 a lot of real time calculations all the time based on user actions.

 And yes, you can easily fit a Rente app into a Heroku 1X dyno setup. I 
 have 2 Rente-apps running with that configuration without any issues. 
 Unfortunately they are both closed systems I've made for a customer, so 
 can't show them to you (1 in production use, 1 being evaluated as as Proof 
 of Concept).

 The running 2X app is here: https://app.meewee.com

 It's based on a hybrid of Rente and older tech.

 Best,
 Henrik


 On Thursday, January 22, 2015 at 4:06:40 PM UTC+1, g vim wrote:

 On 22/01/2015 07:01, Henrik Mohr wrote: 
  
  OT: I'm supporting a production app with 
  Clojure/ClojureScript/Datomic/Ring/Sente etc. on a Heroku 2X dyno 
 having 
  1 GB of RAM. 
  It works like a charm! 
  
  Best, 
  Henrik 
  

 What kind of load? Is a basic web app even do-able on a 1X dyno, ie. 
 512Mb RAM? It's just that the no-cost lead-in is such an attractive 
 proposition for more conservative clients. 

 gvim 



-- 
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 to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
Clojure group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ANN] silc - a tiny entity database for clojure (games)

2014-12-02 Thread Wei Hsu
A pure entity database would have been useful for a game I was working on 
last month. I'll try it out for the next one. Thanks for publishing it!

On Tuesday, December 2, 2014 2:37:06 PM UTC-8, dan.sto...@gmail.com wrote:

 I have put together a quick library http://github.com/danstone/silc that 
 allows you to manage many entities and their attributes in a pure way with 
 indexing for performance, include composite indexes.

 The intention of the library is certainly as the basis for an entity 
 component system for games, that is how I am using it. However I'd be very 
 interested to hear if there are any other compelling use cases for this.

 Pull requests welcome!

 Thanks,

 Dan


-- 
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 to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
Clojure group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


trouble using local jars in project

2014-06-04 Thread Wei Hsu
I'm having trouble using local jars in my project. I've built the jars and 
installed them with localrepo.

wei:clj-opencv wei$ lein localrepo install opencv-249.jar opencv/opencv 
2.4.9
wei:clj-opencv wei$ lein localrepo install opencv-native-249.jar 
opencv/opencv-native 2.4.9

The jars show up in the local repo list.

wei:pv wei$ lein localrepo list | grep opencv
opencv/opencv-native (2.4.9)
opencv (2.4.9)

I then included opencv in my project.clj with [opencv/opencv 2.4.9]. But 
leiningen can't find the jar when I run the project:

wei:pv wei$ lein run
Could not find artifact opencv:opencv:jar:2.4.9 in central 
(http://repo1.maven.org/maven2/)
Could not find artifact opencv:opencv:jar:2.4.9 in clojars 
(https://clojars.org/repo/)
Could not find artifact opencv:opencv:jar:2.4.9 in project (file:repo)
This could be due to a typo in :dependencies or network issues.
If you are behind a proxy, try setting the 'http_proxy' environment 
variable.

I wonder if the problem is specific to opencv since I've used localrepo 
successfully for other jars. Any pointers would be appreciated.

-- 
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 to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
Clojure group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Functional programming and security

2014-05-04 Thread Wei Hsu
Perhaps Cecil is referring to this article, Clojure web security is worse 
than you 
thinkhttps://hackworth.be/2014/03/26/clojure-web-security-is-worse-than-you-think/,
 describing 
the immature state of Clojure's web security libraries. I don't think the 
language itself has much to do with this, except that until functional 
programming goes mainstream, we have a smaller community writing and 
testing these libraries. Also, maybe the language does not lend itself to a 
one-size-fits-all framework, but rather encourages rolling your own 
solutions. This is fine for folks well versed in web security, but it is a 
problem for non-experts who still want to write secure web apps.

On Monday, May 5, 2014 6:13:16 AM UTC+8, Evan Rowley wrote:

 The most serious security vulnerabilities I've heard about for 2014 are 
 Apple's SSL/TLS/HTTPS vulnerability, the OpenSSL Heartbleed vulnerability, 
 FreeBSD's TCP bug, and of course the Mt. Gox bug that resulted in the 
 company's bankruptcy.

 The Mt. Gox bug was caused by a flaw in the way they designed the 
 software. It did not have anything to do with the programming language used 
 to create it.

 If you look at Apple's recent SSL/TLS/HTTPS vulnerability, the entire 
 problem was caused by a misplaced goto statement in their C code. 
 Interestingly, the LLVM compiler, which Apple evangelized in their 
 development toolchain, was even capable of detecting and removing the 
 error. Unfortunately, the advanced compiler feature wasn't used, and the 
 vulnerability persisted for a long time in their OS X 10.9 code, breaking 
 all SSL/TLS/HTTPS.

 The OpenSSL Heartbleed vulnerability that allowed encrypted SSL/TLS/HTTPS 
 sessions to be snooped upon was caused by a lack of bounds checking in the 
 connections heartbeat / keep-alive C code, not in any of the actual 
 validated crypto code.

 FreeBSD's recent TCP bug that allowed privileged arbitrary code execution 
 on servers was caused by C mishandling of memory references.

 The question we have to ask is: Would use of a (specific?) functional 
 language prevented these? My opinion:

 Probably not in the case of Mt. Gox because their problems had more to do 
 with their application design.

 As for Apple, I think the 'goto' feature is missing from at least Clojure. 
 Both Haskell and Erlang have 'goto', but it's use isn't encouraged. I'm 
 thinking that because these languages are functional, the goto feature 
 works in a safer manner that wouldn't have allowed Apple's code to work 
 with the failed certificate check. But that's just a guess. 

 For OpenSSL's Heartbleed, I'm going to say that this wouldn't have been 
 prevented even with functional programming. The problem lies in the design 
 of the heartbeat code. One thing I do have to wonder about is whether or 
 not this heartbeat code would have been designed differently if it were 
 done in a functional programming language. It's worth keeping in mind that 
 the higher level of abstraction most functional programming languages have 
 would have contributed to a different design.

 FreeBSD's TCP bug *might* have been prevented if the functional 
 programming language's runtime did effective memory management. I'm going 
 to assume that everyone here agrees that functional programming languages 
 have well-designed memory management.


 On Sun, May 4, 2014 at 5:40 PM, Magnus Therning 
 mag...@therning.orgjavascript:
  wrote:

 On Sun, May 04, 2014 at 09:24:08AM +0200, Cecil Westerhof wrote:
  I heard the stand that functional programming made it difficult to
  write secure programs. I do not know enough of functional
  programming yet to determine the value of a statement like this.
  What is the take here about it?

 It would be interesting to hear WHY functional programming would yield
 less secure programs.  What would then be the paradigm that results in
 most security?  Imperative, logical?

 Here is my take on it:

 It's widely acknowledged that writing secure programs is difficult.
 I'd even go as far as saying that it's an inherently complex problem
 in real-life applications.  And as Brooke tells us, if we reduce
 incidental complexity we can concentrate on the inherent complexity.
 That would point us in the direction of high-level languages that
 dispenses with distractions like memory management.[^1]

 Many programs worth writing becomes large, size is in itself a
 contributor to complexity.  So expressive languages will arguably aid
 reducing the size of the code.

 Security and correctness are related, and arguing about correctness in
 the face of shared state is tough, so even though Strachey tells us we
 can get referential transparency in imperative languages it is my
 experience that very few developers write imperative code with shared
 state that is easy to argue about.  That means we want immutability as
 deeply rooted in the language as possible.

 I think this all adds up to pure functional languages being an
 excellent choice if you want 

problem catching exceptions in webapp

2014-02-27 Thread Wei Hsu
I'm having trouble catching exceptions in my Compojure web app. Made a 
small test case to illustrate the 
issue: https://github.com/yayitswei/exceptiontest

Could you take a look and spot what I'm doing wrong?

Thanks,
Wei

-- 
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 to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
Clojure group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: ANN 2 years of ClojureWerkz

2013-11-20 Thread Wei Hsu
Huge fan of ClojureWerkz libraries. Thanks for the great code and 
documentation!

On Wednesday, November 20, 2013 4:26:23 PM UTC+8, Las wrote:

 Hi Michael, 

 outstanding work, thanks for taking the lead on this effort and many 
 thanks to all the contributors. 

 Las

 Sent from my phone
 On Nov 20, 2013 12:13 AM, Bruce Durling b...@otfrom.com javascript: 
 wrote:

 Michael,

 Congrats and keep on going. I love using your libraries.

 cheers,
 Bruce

 On Tue, Nov 19, 2013 at 11:05 PM, Michael Klishin
 michael@gmail.com javascript: wrote:
  A couple of weeks ago ClojureWerkz [1] turned two years old.
  We are at 29 projects (not including failed experiments) and kicking.
 
  There have been dozens of contributors, entire major releases
  brilliantly managed by people outside of our tiny core team,
  and a pretty high bar in project quality sustained [2] [3]. I think it's
  fair to say that there have been positive changes in the overall
  Clojure library ecosystem, hopefully in part due to how vocal we've
  been (102 blog posts on blog.clojurewerkz.org this year alone).
 
  These days many world famous institutions
  and companies we respect use various ClojureWerkz projects
  to power their products and internal tools. Needless to say,
  we did not plan for it in 2011.
 
  So thank you, both users and contributors. There are some new
  projects in the pipeline and our values do not change: documentation, 
 sane
  release practices,
  ease of contributing and backwards compatibility. We love all that 
 boring
  stuff.
 
  Here's to another few years!
 
  1. http://clojurewerkz.org
  2.
  
 http://blog.clojurewerkz.org/blog/2013/04/20/how-to-make-your-open-source-project-really-awesome/
  3. http://www.slideshare.net/michaelklishin/open-source-responsibly
  --
  MK
 
  http://github.com/michaelklishin
  http://twitter.com/michaelklishin
 
  --
  --
  You received this message because you are subscribed to the Google
  Groups Clojure group.
  To post to this group, send email to clo...@googlegroups.comjavascript:
  Note that posts from new members are moderated - please be patient with 
 your
  first post.
  To unsubscribe from this group, send email to
  clojure+u...@googlegroups.com javascript:
  For more options, visit this group at
  http://groups.google.com/group/clojure?hl=en
  ---
  You received this message because you are subscribed to the Google 
 Groups
  Clojure group.
  To unsubscribe from this group and stop receiving emails from it, send 
 an
  email to clojure+u...@googlegroups.com javascript:.
  For more options, visit https://groups.google.com/groups/opt_out.



 --
 @otfrom | CTO  co-founder @MastodonC | mastodonc.com
 See recent coverage of us in the Economist http://econ.st/WeTd2i and
 the Financial Times http://on.ft.com/T154BA

 --
 --
 You received this message because you are subscribed to the Google
 Groups Clojure group.
 To post to this group, send email to clo...@googlegroups.comjavascript:
 Note that posts from new members are moderated - please be patient with 
 your first post.
 To unsubscribe from this group, send email to
 clojure+u...@googlegroups.com javascript:
 For more options, visit this group at
 http://groups.google.com/group/clojure?hl=en
 ---
 You received this message because you are subscribed to the Google Groups 
 Clojure group.
 To unsubscribe from this group and stop receiving emails from it, send an 
 email to clojure+u...@googlegroups.com javascript:.
 For more options, visit https://groups.google.com/groups/opt_out.



-- 
-- 
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 to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
Clojure group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Two Way DOM binding in clojurescript

2013-08-21 Thread Wei Hsu
Maybe try out cljs-binding https://github.com/fluentsoftware/cljs-binding, 
or angular extensions like clang https://github.com/pangloss/clang or 
purnam https://github.com/zcaudate/purnam.

On Thursday, June 14, 2012 2:47:15 PM UTC+8, Murtaza Husain wrote:

 Hi,

 I would like to data in atoms to DOM elements in clojurescript. Are there 
 any examples out there that demonstrate this ? 

 Something like what knockout.js or angular.js provide. 

 Thanks,
 Murtaza


-- 
-- 
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 to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
Clojure group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Clojure in production

2013-06-19 Thread Wei Hsu

Hi Plinio, I used Clojure at Airtime last year to do load testing and 
deploy infrastructure. More recently, I'm using Clojure to build 
Bitcoin-related projects backed by bitcoinj, including this bitcoin 
scratcher game http://bitcoinscratch.com for fun.

On Monday, June 10, 2013 2:47:25 PM UTC-7, Plinio Balduino wrote:

 Hi there 

 I'm writing a talk about Clojure in the real world and I would like to 
 know, if possible, which companies are using Clojure for production or 
 to make internal tools. 

 Thank you 

 Plínio Balduino 


-- 
-- 
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 to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
Clojure group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




http-kit on heroku?

2013-04-13 Thread Wei Hsu
Does anyone have an example of deploying http-kit on Heroku? The official 
example https://devcenter.heroku.com/articles/clojure uses Jetty.

-- 
-- 
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 to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
Clojure group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Best way to include a passwords file in a project?

2012-12-19 Thread Wei Hsu
I second Manuel's environment variable approach. On 
herokuhttps://devcenter.heroku.com/articles/config-varsthis is easy to set 
with

heroku config:add PASSWORD_FILE=/etc/passwords

For more complex deployments, you can use automation systems like Pallet or 
Chef to manage environment variables.

On Wednesday, December 19, 2012 1:40:18 PM UTC-8, Alex Baranosky wrote:

 I don't like the environment variable approach because of the dependency 
 on global state makes deploying harder.

 I'd usually have a config file like config.clj whose contents were just a 
 Clojure map.  When loading the application I'd pass in the location of the 
 config file as a parameter, and read-string the file at run-time.  That 
 said, it can sometimes be convenient for development to have some default 
 config file location, so you don't always need to pass the config location 
 in.

 Alex

 On Wed, Dec 19, 2012 at 12:13 PM, Manuel Paccagnella 
 manuel.pa...@gmail.com javascript: wrote:

 I'm not sure that a password file is an optimal solution for this 
 problem. Maybe the 12 factors http://www.12factor.net/, and in 
 particular the config http://www.12factor.net/config one, could give 
 you some ideas.

 Personally I think that credentials are environment-specific, not 
 application-specific. So I'd place them in an external storage service 
 (like a DB). Or, to make things simple, put them in a file somewhere in the 
 system and load it through an environment variable (see 12 factors, III).

 This is as simple as writing:

 (load-passwords-from-file (System/getenv PASSWORD_FILE))

 Hope it helps :)

 Il giorno martedì 18 dicembre 2012 03:21:31 UTC+1, Marco Munizaga ha 
 scritto:

 I'm currently doing something like src/project/passwords.clj and git 
 ignoring that, does anyone have a better solution? maybe a way to place the 
 passwords.clj alongside project.clj in the root directory? Would this be 
 possible through leiningen profiles?


 Thanks

  -- 
 You received this message because you are subscribed to the Google
 Groups Clojure group.
 To post to this group, send email to clo...@googlegroups.comjavascript:
 Note that posts from new members are moderated - please be patient with 
 your first post.
 To unsubscribe from this group, send email to
 clojure+u...@googlegroups.com javascript:
 For more options, visit this group at
 http://groups.google.com/group/clojure?hl=en




-- 
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 to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: STM - a request for war stories

2012-12-13 Thread Wei Hsu
To add to the conversation, I wrote an agent-based website load tester
earlier this year for work. Happy to share my thoughts with Paul
offline if he thinks it's useful, although I wouldn't be able to share
the code itself.

On Dec 11, 2:25 am, Marko Topolnik marko.topol...@gmail.com wrote:
 To give the full story, I should add that atoms are very natural to use and
 many concurrent use cases are covered by them alone. The combination of
 atom and immutable vector/map goes a long way and they are also useful even
 with mutable data, such as lazy-initialized singletons, resources that need
 to be re-acquired after failure, and other similar cases.

 In general I can say that STM transactions of very fine granularity are
 easy to work with because they effortlessly intertwine with mutable data
 and side effects.







 On Monday, December 10, 2012 11:39:02 AM UTC+1, Marko Topolnik wrote:

  The very fact that there has been no reply to this for five days may mean
  something. I can personally attest to STM being very difficult to put to
  real-life use because there is always that one thing you absolutely need
  for your problem, that is mutable and not transactional. Most of the time
  it will have to do with an existing Java library, JDK not excluded. The
  property of STM that it is an all-or-nothing commitment has been a
  show-stopper for me every time I tried to use it.

  My guess is, if your task is something purely computational and amenable
  to massive parallelization, you may have a go with STM; if it's just about
  business logic accessible concurrently by many clients, you won't find it
  workable.

-- 
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 to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


problem with extern file using cljsbuild

2012-10-14 Thread Wei Hsu
I'm using the Google Maps API in my Clojurescript project, which worked 
fine until I compiled in advanced mode. The compiler doesn't seem to pick 
up the extern 
filehttp://closure-compiler.googlecode.com/svn/trunk/contrib/externs/maps/google_maps_api_v3.jsthat
 I specified. Could someone point out what I'm doing wrong?

Compile output and project.clj snippet herehttps://gist.github.com/3887952
.

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
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: problem with extern file using cljsbuild

2012-10-14 Thread Wei Hsu
Thanks Pierre, your comment helped me track down and remove the line 
(:require [google.maps :as maps]) which compiled to 
goog.require('google.maps'). I forgot that you couldn't require externs.

So do I always have to reference external symbols by their fully qualified 
names? e.g. google.maps.LatLng rather than maps/LatLng

On Sunday, October 14, 2012 4:36:14 AM UTC-7, Pierre Henry wrote:

 Following the link  to the extern file 
 it seems the *google.map *lib is not found when the VM loader try to load 
 your code...

 Le dimanche 14 octobre 2012 13:14:33 UTC+2, Wei Hsu a écrit :

 I'm using the Google Maps API in my Clojurescript project, which worked 
 fine until I compiled in advanced mode. The compiler doesn't seem to pick 
 up the extern 
 filehttp://closure-compiler.googlecode.com/svn/trunk/contrib/externs/maps/google_maps_api_v3.jsthat
  I specified. Could someone point out what I'm doing wrong?

 Compile output and project.clj snippet herehttps://gist.github.com/3887952
 .

 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
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: {:new ClojureScript One TodoMVC }

2012-10-05 Thread Wei Hsu
Thanks for sharing! I found it quite helpful.

On Tuesday, October 2, 2012 1:34:56 AM UTC-7, Pierre-Henry Perret wrote:

 The best way to learn is to practice !

 So I have choosed to make the *TodoMVC* template  (see [0]) application 
 with *ClojureScript One* and *Enfocus*. ( see [1] for running app )

 What I could say now, is that CjOne is a little hard to embrace, but when 
 it's done , this is a real pleasure to work with.

 (I havent used the api functionalities in the sample, *todos* are saved 
 on local repo)

 The hard part was to integrate *Enfocus*. 
 The whole view is done with Enfocus which rocks !

 For those interested in code, see [2].
 ___
 [0] http://todomvc.com
 [1] http://todomvc.herokuapp.com
 [2] https://github.com/phperret/cjone-todomvc.git


-- 
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 to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

inheritance when extending goog library

2012-10-01 Thread Wei Hsu
I want to add a callback for goog.ui.Popup to call when it's closed.
The latest version of the closure library supports adding callbacks
(http://closure-library.googlecode.com/svn/docs/
closure_goog_disposable_disposable.js.source.html#line209), but the
version that Clojurescript uses doesn't.

Therefore, I'm extending goog.ui.Disposable using Brian Taylor's macro
(http://www.50ply.com/blog/2012/07/08/extending-closure-from-
clojurescript). The problem is, how do I make goog.ui.Popup use my
version of Disposable?

Thanks,
Wei

-- 
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 to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


clojurescript repl in vim -- java.lang.OutOfMemoryError

2011-12-19 Thread Wei Hsu
Hi! Could someone share a good Clojurescript workflow using vim?

I currently use nailgun/vimclojure, and would like to use the same
setup for Clojurescript.

I tried to follow Brenton Ashworth's video (http://vimeo.com/couchmode/
user8648776/videos/sort:newest/29535884), getting as far as opening a
repl in vim, through nailgun, with the correct clojurescript
classpath. However, when I evaluate these lines to start a repl

  (do (require '[cljs.repl :as repl])
  (require '[cljs.repl.browser :as browser])
  (def env (browser/repl-env))
  (repl/repl env))

I get the following error:

E605: Exception not caught: Error executing Nail!
(131)^@java.lang.OutOfMemoryError: Java heap space^@^Iat
java.lang.StringCoding$String
Decoder.decode(StringCoding.java:133)^@^Iat
java.lang.StringCoding.decode(StringCoding.java:173)^@^Iat
java.lang.String.init(String.ja
va:443)^@^Iat
java.io.ByteArrayOutputStream.toString(ByteArrayOutputStream.java:
187)^@^Iat vimclojure.nails$nail_driver.invoke(nails.clj
:97)^@^Iat vimclojure.nails$Repl.invoke(nails.clj:235)^@^Iat
clojure.lang.Var.invoke(Var.java:401)^@^Iat
vimclojure.Nail.nailMain(Nail.j
ava:61)^@^Iat sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)^@^Iat sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethod
AccessorImpl.java:39)^@^Iat
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
25)^@^Iat java.lang.reflec
t.Method.invoke(Method.java:597)^@^Iat
vimclojure.nailgun.NGSession.run(NGSession.java:294)^@
Error detected while processing function 22:
line   23:
E171: Missing :endif

I'd like to use vim, and the ability to evaluate forms from the text
editor (a la vimclojure) is a way better experience than entering in
forms from the command line. If anyone can help me set up the
workflow, it would be hugely appreciated!

Wei

-- 
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 to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: clojurescript repl in vim -- java.lang.OutOfMemoryError

2011-12-19 Thread Wei Hsu
Thanks Meikel, sounds like the vimclojure group is a good forum and
I'll ask there.

On Dec 19, 1:20 am, Meikel Brandmeyer m...@kotka.de wrote:
 Hi,

 this likely a more involved topic. Repls from stock Vim are difficult. That's 
 the reason VimClojure currently rolls its own. I doubt that the ClojureScript 
 repl will work out of the box.

 Since I'm not especially bought into ClojureScript at the moment, I can't 
 help much here. If someone with more ClojureScript experience is willing to 
 work on this with me, please drop by on the vimclojure google group.

 Sincerely
 Meikel

-- 
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 to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: leiningen 1.6.1 not compatible with lein-nailgun 1.1.0

2011-07-19 Thread Wei Hsu
Thanks for the tips, Phil! This may be somewhat of a newbie question,
but what's the best way to modify lein-nailgun and include that local
fork in my project using leiningen?

On Jul 17, 9:49 pm, Phil Hagelberg p...@hagelb.org wrote:
 On Sun, Jul 17, 2011 at 8:37 AM, Phil Hagelberg p...@hagelb.org wrote:
  * It starts a background thread without blocking the main thread.
  (interferes with Leiningen's workaround to this Clojure bug:
 http://dev.clojure.org/jira/browse/CLJ-124)

 I've documented the issue with threading in Leiningen's plugin documentation:

 https://github.com/technomancy/leiningen/blob/master/doc/PLUGINS.md

 Anyone writing a plugin that uses threads would do well to read the
 Threads section of that document.

 -Phil

-- 
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 to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: shell process hangs in REPL

2011-05-16 Thread Wei Hsu
Just to close out this thread, my workaround was to use Clojure to
generate a shell script which I then ran manually from the command
line.

On May 15, 8:40 am, Wei Hsu yayits...@gmail.com wrote:
 Thanks Meikel, I am using leiningen and that works beautifully!

 So, I'm pretty sure it's a memory issue since the wkhtmltopdf process
 works for short pages but not for long pages (though, even the long
 pages complete in bash). What would be a good way to verify that, and
 how would I increase the memory for the process-- is it in the
 leiningen config?

 On May 15, 3:43 am, Meikel Brandmeyer m...@kotka.de wrote:







  Hi,

  Am 15.05.2011 um 09:31 schrieb Wei Hsu:

   Meikel, what are the commands to start an external repl and tie it
   with nailgun?

  Start the external repl via eg. java -cp 
  your-classpath-here-including-the-vimclojure-jar clojure.main -r. Or via 
  lein repl, if you use leiningen. Then enter the following commands:

  (require 'vimclojure.nails)
  (vimclojure.nails/start-server-thread)

   Can I interact with nailgun with both the external repl
   and the vim repl?

  Yes. That's perfectly possible. There is no such thing as separation of 
  repls. If you do a change in a namespace, you will see it in both repls.

  I can't tell though, whether that fixes your original problem.

  Sincerely
  Meikel

-- 
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 to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: shell process hangs in REPL

2011-05-15 Thread Wei Hsu
Thanks for the tips. Alan, I'm now using clojure.java.shell (still
hanging, though). Could you explain the difference between the two?

Meikel, what are the commands to start an external repl and tie it
with nailgun? Can I interact with nailgun with both the external repl
and the vim repl?

On May 15, 12:19 am, Meikel Brandmeyer m...@kotka.de wrote:
 Hi,

 Am 15.05.2011 um 07:12 schrieb Wei Hsu:

  I'm using vimclojure and nailgun.

 A general note:

 The vimclojure shell blocks until the whole command is completed accumulating 
 all output on the way. This is for technical reasons, I can't anything about. 
 Please use it only for short interactions in the repl, not for long running 
 commands. If you intend to do so, start an external repl, start the nailgun 
 thread there and work with the external repl. Then you can still work with 
 your vim, because it not blocked. And everything else (doc lookup, sending 
 code, etc.) just works as before.

 Sincerely
 Meikel

-- 
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 to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


shell process hangs in REPL

2011-05-14 Thread Wei Hsu
I have a process which runs fine in my bash terminal, but hangs when I
run it using clojure.contrib.shell-out/sh in the REPL.

Any tips on how to debug this? Would it be a memory issue, or
something else?

in bash:
./wkhtmltopdf --footer-html footer.html --encoding UTF-8 http://[really
long web page] content.pdf

in REPL:
(sh ./wkhtmltopdf --footer-html footer.html --encoding UTF-8
http://[really long web page] content.pdf)

If it is a memory issue, how would I increase the amount of memory to
Clojure? I'm using vimclojure and nailgun.

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
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Cyber Dungeon Quest Alpha 1

2011-04-15 Thread Wei Hsu
Very cool! I really enjoyed playing it.

On Apr 14, 12:20 pm, Alan a...@malloys.org wrote:
 Similar error for me, on Ubuntu. Exception and wrapped exception
 follow. Looks like you may need permissions set better? 403 is
 Forbidden.

 com.sun.deploy.net.FailedDownloadException: Unable to load 
 resource:http://sappler.ls4.allbytes.de/resatori/webstart/cdq.jnlp
         at
 com.sun.deploy.net.DownloadEngine.actionDownload(DownloadEngine.java:
 1372)
         at
 com.sun.deploy.net.DownloadEngine.getCacheEntry(DownloadEngine.java:
 1525)
         at
 com.sun.deploy.net.DownloadEngine.getCacheEntry(DownloadEngine.java:
 1503)
         at
 com.sun.deploy.net.DownloadEngine.getResourceCacheEntry(DownloadEngine.java :
 1609)
         at
 com.sun.deploy.net.DownloadEngine.getResourceCacheEntry(DownloadEngine.java :
 1534)
         at com.sun.deploy.net.DownloadEngine.getResource(DownloadEngine.java:
 217)
         at com.sun.deploy.net.DownloadEngine.getResource(DownloadEngine.java:
 201)
         at com.sun.javaws.Launcher.updateFinalLaunchDesc(Launcher.java:469)
         at com.sun.javaws.Launcher.prepareToLaunch(Launcher.java:248)
         at com.sun.javaws.Launcher.prepareToLaunch(Launcher.java:199)
         at com.sun.javaws.Launcher.launch(Launcher.java:116)
         at com.sun.javaws.Main.launchApp(Main.java:416)
         at com.sun.javaws.Main.continueInSecureThread(Main.java:248)
         at com.sun.javaws.Main$1.run(Main.java:110)
         at java.lang.Thread.run(Thread.java:662)

 java.io.IOException: Server returned HTTP response code: 403 for 
 URL:http://sappler.ls4.allbytes.de/resatori/webstart/cdq.jnlp
         at sun.reflect.GeneratedConstructorAccessor1.newInstance(Unknown
 Source)
         at
 sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstru 
 ctorAccessorImpl.java:
 27)
         at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
         at sun.net.www.protocol.http.HttpURLConnection
 $6.run(HttpURLConnection.java:1491)
         at java.security.AccessController.doPrivileged(Native Method)
         at
 sun.net.www.protocol.http.HttpURLConnection.getChainedException(HttpURLConnec...
 1485)
         at
 sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection
 1139)
         at
 com.sun.deploy.net.BasicHttpRequest.doRequest(BasicHttpRequest.java:
 229)
         at
 com.sun.deploy.net.BasicHttpRequest.doRequest(BasicHttpRequest.java:
 113)
         at
 com.sun.deploy.net.BasicHttpRequest.doGetRequest(BasicHttpRequest.java:
 78)
         at
 com.sun.deploy.net.DownloadEngine.actionDownload(DownloadEngine.java:
 1182)
         at
 com.sun.deploy.net.DownloadEngine.getCacheEntry(DownloadEngine.java:
 1525)
         at
 com.sun.deploy.net.DownloadEngine.getCacheEntry(DownloadEngine.java:
 1503)
         at
 com.sun.deploy.net.DownloadEngine.getResourceCacheEntry(DownloadEngine.java :
 1609)
         at
 com.sun.deploy.net.DownloadEngine.getResourceCacheEntry(DownloadEngine.java :
 1534)
         at com.sun.deploy.net.DownloadEngine.getResource(DownloadEngine.java:
 217)
         at com.sun.deploy.net.DownloadEngine.getResource(DownloadEngine.java:
 201)
         at com.sun.javaws.Launcher.updateFinalLaunchDesc(Launcher.java:469)
         at com.sun.javaws.Launcher.prepareToLaunch(Launcher.java:248)
         at com.sun.javaws.Launcher.prepareToLaunch(Launcher.java:199)
         at com.sun.javaws.Launcher.launch(Launcher.java:116)
         at com.sun.javaws.Main.launchApp(Main.java:416)
         at com.sun.javaws.Main.continueInSecureThread(Main.java:248)
         at com.sun.javaws.Main$1.run(Main.java:110)
         at java.lang.Thread.run(Thread.java:662)
 Caused by: java.io.IOException: Server returned HTTP response code:
 403 for URL:http://sappler.ls4.allbytes.de/resatori/webstart/cdq.jnlp
         at
 sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection
 1436)
         at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:
 379)
         at
 com.sun.deploy.net.BasicHttpRequest.doRequest(BasicHttpRequest.java:
 190)
         ... 17 more

 On Apr 14, 12:03 pm, mark skilbeck markskilb...@googlemail.com
 wrote:







  Still doesn't work for me. Same error as Alfredo.

  On Thu, Apr 14, 2011 at 1:26 PM, msappler msapp...@web.de wrote:
   Hmm I updated the natives-mac.jar.
   But dont know this error I dont have a mac..

   On 14 Apr., 14:16, Walter Chang weih...@gmail.com wrote:
   failed to run on mbp osx 10.6.7 (java version 1.6.0_24).  here is the
   stack trace:

   java.lang.NullPointerException
   at
   org.lwjgl.opengl.MacOSXContextImplementation.setSwapInterval(MacOSXContextI
mplementation.java:121)
   at org.lwjgl.opengl.Context.setSwapInterval(Context.java:231)
   at org.lwjgl.opengl.Display.setSwapInterval(Display.java:993)
   at org.lwjgl.opengl.Display.setVSyncEnabled(Display.java:1005)
   at org.newdawn.slick.GameContainer.setVSync(GameContainer.java:805)
   at 

newbie question: where are my log messages going to?

2010-08-28 Thread Wei Hsu
Hello,

I'm using the clojure.contrib.logging library (logging/spy seems very
useful!) but I don't know which file it's writing to. Can you please
advise?

Thanks,
Wei

-- 
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 to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en