Re: help with my inefficient instaparse grammar

2014-12-03 Thread Zack Maril
Use :optimize :memory maybe? Section 10 here seems like your use case: https://github.com/Engelberg/instaparse/blob/master/docs/Performance.md Watch htop and see if you have a process that is hitting swap without the optimization. -Zack On Wednesday, December 3, 2014 1:29:23 AM UTC-5, Sunil Nand

pack200 unknown attributes

2014-12-03 Thread Brian Craft
Experimenting with pack200, I get very many warnings like so: Dec 04, 2014 5:11:31 AM com.sun.java.util.jar.pack.Utils$Pack200Logger warning WARNING: Passing class file uncompressed due to unrecognized attribute: clojure/core$long.class Without having any real understanding of what it's doing,

Re: Getting sick and tired of "[trace missing]"

2014-12-03 Thread Fluid Dynamics
On Wednesday, December 3, 2014 4:20:00 PM UTC-5, Niels van Klaveren wrote: > > This isn't a CCW exclusive issue, but the Oracle JVM 'optimizing away' > stacktraces. > > It can be remedied by adding the '-XX:-OmitStackTraceInFastThrow' flag to > the JVM startup parameters of the process you're s

Re: more colloquial "do x n times"

2014-12-03 Thread Sam Raker
EDIT On Wednesday, December 3, 2014 10:45:33 PM UTC-5, Sam Raker wrote: > > I've got a decent-sized corpus of tweets, organized by hashtag, in a > CouchDB db. I'm doing some initial explorations of my data, and was curious > about which hashtags show up together in tweets. I want to do a NSA-sty

more colloquial "do x n times"

2014-12-03 Thread Sam Raker
I've got a decent-sized corpus of tweets, organized by hashtag, in a CouchDB db. I'm doing some initial explorations of my data, and was curious about which hashtags show up together in tweets. I want to do a NSA-style "hops" kind of algorithm--get all the hashtags that show up in the same twee

Re: [ANN] encors: CORS middleware for Ring apps

2014-12-03 Thread David Dossot
Just to let everyone know that we've just released version 2.0 of encors, with these suggested changes in place. The middleware should now feel more Clojure-ish and Ring-ish :) Thanks James for the great feedback. On Wednesday, November 26, 2014 4:31:37 PM UTC-8, Román González wrote: > > Good

Re: Getting sick and tired of "[trace missing]"

2014-12-03 Thread Laurent PETIT
2014-12-03 22:20 GMT+01:00 Niels van Klaveren : > This isn't a CCW exclusive issue, but the Oracle JVM 'optimizing away' > stacktraces. > > It can be remedied by adding the '-XX:-OmitStackTraceInFastThrow' flag to > the JVM startup parameters of the process you're starting. > If Leiningen is used

Re: Getting sick and tired of "[trace missing]"

2014-12-03 Thread Niels van Klaveren
I'm sure first thing in the morning there'll be someone at Larry Ellison's door clamoring for removal of hotspot optimization from the JVM.. On Wednesday, December 3, 2014 10:41:34 PM UTC+1, Sam Ritchie wrote: > > The first result of googling > > jvm "[trace missing]" > > is really helpful here.

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

2014-12-03 Thread James Reeves
Coincidentally, I put together a similar library a few months ago ( https://github.com/weavejester/ittyon), but I didn't think anyone else would find it useful. It looks like there are more people experimenting with games in Clojure than I thought. - James On 3 December 2014 at 21:30, wrote: >

Re: Getting sick and tired of "[trace missing]"

2014-12-03 Thread Sam Ritchie
The first result of googling jvm "[trace missing]" is really helpful here. Fluid Dynamics December 3, 2014 at 10:29 AM It's a giant pain to debug exceptions without stack traces. This seems to be a problem specific to CCW, as I don't encounter it using other devel

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

2014-12-03 Thread dan . stone16321
I have released an update to the lib with a new index the `attribute-entity` index, and improved the readme (I hope). Check it out! Regards, Dan -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegrou

Facebook Graph API via CLS

2014-12-03 Thread Sam Ritchie
Hey all, I'm working on a Clojurescript wrapper of Facebook's JS SDK, using Prismatic's schema for documentation / types. Here's the code: https://gist.github.com/sritchie/b517d67f9507aca36399 If anyone here's interested I'd be happy to put a little library up on github with this and the res

Re: Getting sick and tired of "[trace missing]"

2014-12-03 Thread Niels van Klaveren
This isn't a CCW exclusive issue, but the Oracle JVM 'optimizing away' stacktraces. It can be remedied by adding the '-XX:-OmitStackTraceInFastThrow' flag to the JVM startup parameters of the process you're starting. If Leiningen is used to start the JVM, add the following setting to your lein

Re: Need advice on algorithm performance

2014-12-03 Thread Jony Hudson
If I understand right, I think you might be able to use the existing replace functions in clojure.walk. I find that this is about twice as fast: (time (dotimes [_ 10] (walk/postwalk-replace {"exp_1" 100 "exp_2" 20 "exp_3" 5} [:DIV [:ADD [:ID "P1" "exp_1"] [:ID "P2" "exp_2"] "

Re: perform action after events stop for some period

2014-12-03 Thread Erik Price
Thank you for calling my attention to this possibility! e On Wed, Dec 3, 2014 at 2:49 PM, Dylan Butman wrote: > Erik that's pretty! But be careful about go-loops and closed channels. > This will recur infinitely if events-ch is closed (it will continuously > return nil) > > (defn invoke-after-u

Re: perform action after events stop for some period

2014-12-03 Thread Dylan Butman
Erik that's pretty! But be careful about go-loops and closed channels. This will recur infinitely if events-ch is closed (it will continuously return nil) (defn invoke-after-uninterrupted-delay ([period events-ch f] (invoke-after-uninterrupted-delay period events-ch f [])) ([period

Re: perform action after events stop for some period

2014-12-03 Thread Dylan Butman
Erik that's pretty! But be careful about go-loops and closed channels. This will recur infinitely if events-ch is closed (it will continuously return nil) (defn invoke-after-uninterrupted-delay ([period events-ch f] (invoke-after-uninterrupted-delay period events-ch f [])) ([period ev

Need advice on algorithm performance

2014-12-03 Thread Dmitriy Morozov
Hi, guys! I have an issue with my function where I use zippers to modify data structure. The function modifies a tree (parsed grammar tree) to replace expressions with values from a given map. Sadly, the algorithm I came up with is pretty slow. I would appreciate if anyone can give me a hint on

Re: Getting sick and tired of "[trace missing]"

2014-12-03 Thread Paul L. Snyder
On Wed, 03 Dec 2014, Fluid Dynamics wrote: > It's a giant pain to debug exceptions without stack traces. This seems to > be a problem specific to CCW, as I don't encounter it using other > development environments. > > Is this going to be fixed anytime soon? Pseudonymous obnoxious person: You

Looking for a job

2014-12-03 Thread Dajana Štiberová
I am looking for a Clojure job, preferably working remotely. I have no problem working with command line tools in UNIX environment. My preferred editor is EMACS. I just started with Clojure just six months ago, but I really enjoy it and I am learning quickly. My previous programming experiences

Getting sick and tired of "[trace missing]"

2014-12-03 Thread Fluid Dynamics
It's a giant pain to debug exceptions without stack traces. This seems to be a problem specific to CCW, as I don't encounter it using other development environments. Is this going to be fixed anytime soon? -- You received this message because you are subscribed to the Google Groups "Clojure" g

Re: Sharable custom reader macros in Clojurescript?

2014-12-03 Thread Gary Verhaegen
There seems to be register-tag-parser! If you really want to do it from your lib. https://github.com/clojure/clojurescript/blob/master/src/cljs/cljs/reader.cljs Please carefully consider whether it is the right thing to do from within a library, however, as opposed to provide the functions and le

Sharable custom reader macros in Clojurescript?

2014-12-03 Thread Hoang Minh Thang
Hi all, how do I add custom reader macros in Clojurescript (like data_readers.clj in Clojure)? I want to deliver them in libraries. -- 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 tha

a library for writing and loading database fixtures - would love feedback

2014-12-03 Thread Daniel Higginbotham
I wrote a little (52 lines) library for writing and loading database fixtures: https://github.com/flyingmachine/vern I'd love any feedback. Could the code be more succinct? Is there a name for this kind of pattern? Do the names make sense? Thanks! Daniel -- You received this message because y

Re: Is there a tool to display all the references to a symbol in a project?

2014-12-03 Thread Alex Hammel
If you're OK with using an editor that's not emacs, most of them have some kind of ctags plugin these days. There's a decent looking ctags config for clojure here (haven't tried it myself). On Wed, Dec 3, 2014 at 7:40 AM, Ashton Kemerling wrote: > I would

Re: Dynamic args in delayed function calls

2014-12-03 Thread Fluid Dynamics
The last group of examples reminds me of spreadsheet formula cells. -- 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 y

Re: Is there a tool to display all the references to a symbol in a project?

2014-12-03 Thread Francis Avila
Cursive Clojure can do this: alt-f7 the symbol. (But it's not a lightweight tool if that's what you mean by "not emacs".) On Wednesday, December 3, 2014 9:16:52 AM UTC-6, Yehonathan Sharvit wrote: > > Is there a tool to display all the references to a symbol in a project? > > Preferably without u

Re: Is there a tool to display all the references to a symbol in a project?

2014-12-03 Thread Ashton Kemerling
I would recommend the silver searcher (ag) if the project is large, as it is much faster. --Ashton Sent from my iPhone > On Dec 3, 2014, at 8:34 AM, Gary Trakhman wrote: > > I use grep or ack. It's not exact, but it works. > >> On Wednesday, December 3, 2014, Yehonathan Sharvit wrote: >> I

Re: Is there a tool to display all the references to a symbol in a project?

2014-12-03 Thread Gary Trakhman
I use grep or ack. It's not exact, but it works. On Wednesday, December 3, 2014, Yehonathan Sharvit wrote: > Is there a tool to display all the references to a symbol in a project? > > Preferably without using emacs. > > Thanks. > > -- > You received this message because you are subscribed to th

Is there a tool to display all the references to a symbol in a project?

2014-12-03 Thread Yehonathan Sharvit
Is there a tool to display all the references to a symbol in a project? Preferably without using emacs. 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 me

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

2014-12-03 Thread dan . stone16321
> > Is it possible to retrieve all entities with a set of attributes, > regardless of the attribute values? Not yet, I haven't indexed for it. You could approximate it using the ave index if you just concat any set of entities under any value. However it would require the attributes you are

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

2014-12-03 Thread dan . stone16321
Yes I should probably not be using BigDecimals :) I'll fix this as soon as I can. On Wednesday, December 3, 2014 2:10:53 AM UTC, Atamert Ölçgen wrote: > > Why are you using BigDecimal's for indices? If you want to go big, isn't > BigInt a better choice? > > Actually, I would just use Long's. (MA

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

2014-12-03 Thread Daniel Kersten
Is it possible to retrieve all entities with a set of attributes, regardless of the attribute values? On Wed, 3 Dec 2014 06:19 Atamert Ölçgen wrote: > I don't feed trolls. > > On Wed, Dec 3, 2014 at 10:10 AM, Atamert Ölçgen wrote: > >> Why are you using BigDecimal's for indices? If you want to