Do you know of a reason why (deftype [foo & more]) isn't read in as
having two fields where the second is a seq?
Barring that, would it be reasonable to disallow & as a valid field
name, thus preventing this class of error?
On Nov 4, 11:54 pm, Christophe Grand wrote:
> On Fri, Nov 5, 2010 at 1:
Hi,
On 5 Nov., 03:17, ka wrote:
> Yes Meikel that is exactly what I have right now. Just trying to learn
> and stir up a discussion here :)
And it's a good discussion. I think many in the community - myself
included! - don't grok protocols, yet. So any discussion on how they
are intended to be
2010/11/5 ka :
> static public ISeq seq(Object coll){
> if(coll instanceof ASeq)
> return (ASeq) coll;
> else if(coll instanceof LazySeq)
> return ((LazySeq) coll).seq();
> else
> return seqFrom(coll);
> }
>
> @Laurent,
>> * first, when I see calls to (instance?) (satisifies?), it rings
On Fri, Nov 5, 2010 at 8:23 AM, ataggart wrote:
> Do you know of a reason why (deftype [foo & more]) isn't read in as
> having two fields where the second is a seq?
>
deftype is low level and exposes limitations of the host and constructors
should not be exposed directly (add a new field, change
2010/11/4 Ken Wesson :
> The ns macro seems to be poorly documented as yet. The Namespaces page
> at the main Clojure site does not go into detail about its syntax;
Yes. The docs related to the ns form are indeed insufficient and need attention.
However, have you seen the http://clojure.org/libs
I think there should be a link from the Namespaces page to the Libs
page. Hopefully, this will make it easier for people to find examples
on how to use the ns form.
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to c
Hi,
I'm trying to define an interface for our automated import system
written in Clojure so that we can use parsers implemented in Java. So
far everything works great, but I'm wondering if there is any way to
get types into the method signatures in the interface. For starters I
created a simple
On Nov 3, 2010, at 11:43 AM, Sean Corfield wrote:
> Why are folks so insistent on monolingual systems?
Business reasons. Two languages means staffing expertise in both languages,
either people who know both and cost more, or two people who cost less. In
compsci terms, it's another dependency,
Hi...
my first post here, so hello everyone!
I just started to learn Clojure and I currently try to use int arrays
and bit manipulation.
All the bit manipulation works great, but if the highest bit is set, I
cannot write back the result into the array using e.g.
(aset-int (make-array Integer/TY
On Thu, Nov 4, 2010 at 11:36 PM, Sunil S Nandihalli <
sunil.nandiha...@gmail.com> wrote:
> Hello everybody,
> I know that mini-kanren does not have "nonvar" I was trying to emulate its
> effect by using
>
> (cond-u
> ((& x :unassigned)
>fail)
> (succeed))
>
> The idea is if x is not assigne
Hi,
On 5 Nov., 13:04, Jochen wrote:
> (aset-int (make-array Integer/TYPE 1) 0 0x8000)
>
> I found that 0x8000 is propagated to a long (other than java which
> on 8 character hex literals keeps an int) so I try to cast using (int
> 0x8000) as possible in Java but still the error occur
On Fri, Nov 5, 2010 at 5:51 AM, Rasmus Svensson wrote:
> 2010/11/4 Ken Wesson :
>> The ns macro seems to be poorly documented as yet. The Namespaces page
>> at the main Clojure site does not go into detail about its syntax;
>
> Yes. The docs related to the ns form are indeed insufficient and need
(inc)
On Thu, Nov 4, 2010 at 2:41 PM, Ken Wesson wrote:
> The ns macro seems to be poorly documented as yet. The Namespaces page
> at the main Clojure site does not go into detail about its syntax;
> "doc ns" comes closer, with:
>
> (ns foo.bar
>(:refer-clojure :exclude [ancestors printf])
Dear all,
Currently swank-clojure SNAPSHOT does not show the stack, nor the
exception, on some uncaught exception.
Is it something I can do to inspect the errors?
Best,
Nicolas.
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group
I don't know how to check the GC activity on my project, but I did run
Mian on Jython. It performs much like my initial Clojure version. It
consumes absurd amounts of memory and never finishes.
So I think we can safely say that Java's GC or the way it stores data
is less efficient on this type of
Hi Mikel...
Thanks for your quick reply!
I use 1.2.0. aset does not work. It seems that aset is only useable
for arrays of Reference types, but I need to use primitive types, so
aset-int is the only option. To me it looks that there should be
unchecked-xxx versions of the coerce functions (e.g. un
Can you recommend any? I tied a few of the GC options, but that didn't
help much.
On Nov 4, 10:52 pm, Andrew Gwozdziewycz wrote:
> On Thu, Nov 4, 2010 at 5:43 PM, Mike Meyer
>
>
>
>
>
>
>
>
>
> wrote:
> > On Thu, 4 Nov 2010 22:28:12 +0100
> > Pepijn de Vos wrote:
>
> >> Hi all,
>
> >> I have wr
Hi,
On 5 Nov., 15:42, Jochen wrote:
> Thanks for your quick reply!
> I use 1.2.0. aset does not work. It seems that aset is only useable
> for arrays of Reference types, but I need to use primitive types, so
> aset-int is the only option. To me it looks that there should be
> unchecked-xxx versi
Hi again,
On 5 Nov., 16:09, Meikel Brandmeyer wrote:
> user=> (aset (make-array Integer/TYPE 1) 0 (int (- 0x8000)))
> -2147483648
Of course only a special case. But this works:
user=> (aset (make-array Integer/TYPE 1) 0 (.intValue 0x8000))
-2147483648
user=> (aset (make-array Integer/T
On Fri, Nov 5, 2010 at 10:41 AM, pepijn (aka fliebel) wrote:
> I don't know how to check the GC activity on my project, but I did run
> Mian on Jython. It performs much like my initial Clojure version. It
> consumes absurd amounts of memory and never finishes.
>
> So I think we can safely say tha
Hi...
> user=> (aset (make-array Integer/TYPE 1) 0 (int (- 0x8000)))
> -2147483648
>user=> (aset (make-array Integer/TYPE 1) 0 (.intValue 0x8000))
>-2147483648
cool, that (both) works! I often forget that in clojure I can drop
back to Java any time.
Thanks a lot!
Ciao
...Jochen
--
Yo
Hi,
On 5 Nov., 16:33, Jochen wrote:
> > user=> (aset (make-array Integer/TYPE 1) 0 (int (- 0x8000)))
> > -2147483648
> >user=> (aset (make-array Integer/TYPE 1) 0 (.intValue 0x8000))
> >-2147483648
>
> cool, that (both) works! I often forget that in clojure I can drop
> back to Java any
On Thu, Nov 4, 2010 at 2:41 PM, Ken Wesson wrote:
>
> clojure.core/use
> ([& args])
> Like 'require, but also refers to each lib's namespace using
...
>
> Yeah, that's a real help if you're trying to remember the syntax. "&
> args". How specific. :)
>
You stopped one indirection short, try (doc
On Fri, Nov 5, 2010 at 11:51 AM, Aaron Cohen wrote:
> On Thu, Nov 4, 2010 at 2:41 PM, Ken Wesson wrote:
>>
>> clojure.core/use
>> ([& args])
>> Like 'require, but also refers to each lib's namespace using
> ...
>>
>> Yeah, that's a real help if you're trying to remember the syntax. "&
>> args".
System/loadLibrary uses the paths set in the System property
java.library.path to look for dynamic libraries so you need to make
sure it contains the directory where your .so is. I think it also gets
cached at first read or something stupid like that so it's very
important to get java.library.path
for defining an interface you should use definterface
On Fri, Nov 5, 2010 at 4:18 AM, Jeff Rose wrote:
> Hi,
> I'm trying to define an interface for our automated import system
> written in Clojure so that we can use parsers implemented in Java. So
> far everything works great, but I'm wonderin
Steven Arnold wrote ..
> On Nov 3, 2010, at 11:43 AM, Sean Corfield wrote:
>
> > Why are folks so insistent on monolingual systems?
>
> Business reasons. Two languages means staffing expertise in both languages,
either
> people who know both and cost more, or two people who cost less. In comps
I will have a look around.
I listed the map I used in my first email, It's on my Dropbox:
http://dl.dropbox.com/u/10094764/World2.zip
Meanwhile I wrote a function that is already twice as fast as I had,
no memory problems, no threads. One tinny problem: it doesn't produce
the same result.
It's t
I thought there was some minor magic to get types in there though, wasn't
that one of the interesting things Rich pointed out at a recent NYC Clojure
meetup (Sept, maybe)?
Dave
On Nov 5, 2010 10:59 AM, "Kevin Downey" wrote:
> for defining an interface you should use definterface
>
> On Fri, Nov 5
On Nov 5, 2010, at 10:20 AM, lprefonta...@softaddicts.ca wrote:
> Having expert people mastering several tools in any project increases the like
> hood of being on time and within budget.
I agree partially. Given unlimited resources, it would be great for all the
people on the project to have
On Fri, Nov 5, 2010 at 17:38, pepijn (aka fliebel)
wrote:
> I will have a look around.
>
> I listed the map I used in my first email, It's on my Dropbox:
> http://dl.dropbox.com/u/10094764/World2.zip
>
> Meanwhile I wrote a function that is already twice as fast as I had,
> no memory problems, no
I'm very curios about this situation, please let us know if you manage to write
a version that's faster than the python one (as David claims is possible). I
would attempt it myself but I've only just recently had the time to dive back
into Clojure. :-\
- Greg
On Nov 5, 2010, at 9:38 AM, pepijn
On Fri, Nov 5, 2010 at 2:31 PM, Greg wrote:
> I'm very curios about this situation, please let us know if you manage to
> write a version that's faster than the python one (as David claims is
> possible). I would attempt it myself but I've only just recently had the
> time to dive back into Cloju
Steven Arnold wrote ..
>
> On Nov 5, 2010, at 10:20 AM, lprefonta...@softaddicts.ca wrote:
>
> > Having expert people mastering several tools in any project increases the
> > like
> > hood of being on time and within budget.
>
> I agree partially. Given unlimited resources, it would be great
update! is of my own making, based on assoc! and update-in
On Nov 5, 7:30 pm, B Smith-Mannschott wrote:
> On Fri, Nov 5, 2010 at 17:38, pepijn (aka fliebel)
>
>
>
>
>
>
>
>
>
> wrote:
> > I will have a look around.
>
> > I listed the map I used in my first email, It's on my Dropbox:
> >http://dl
On Fri, Nov 5, 2010 at 2:42 PM, wrote:
> Customers are not getting usable components delivered in the near future.
> They just get vague promises that something will be delivered in x years.
> Nothing tangible there just vapor ware.
That's more than Half-Life fans are getting from Valve -- they
Ken Wesson wrote ..
> On Fri, Nov 5, 2010 at 2:42 PM, wrote:
> > Customers are not getting usable components delivered in the near future.
> > They just get vague promises that something will be delivered in x years.
> > Nothing tangible there just vapor ware.
>
> That's more than Half-Life fan
On Wed, Nov 3, 2010 at 20:51, Mike Meyer <
mwm-keyword-googlegroups.620...@mired.org> wrote:
>
> Finding good people is hard enough that wanting them to be good in
> three or four languages is enough to break the camels back. If you've
> got time to cross-train them - then you don't need
>
>
I've
Could you refer me to some of those relevant to my problem? I tried
searching for them, and most stuff I found is about killing
reflection, using buffered IO and other basics I've already covered.
On Nov 5, 7:37 pm, David Nolen wrote:
> On Fri, Nov 5, 2010 at 2:31 PM, Greg wrote:
> > I'm very cu
On Oct 25, 2010, at 3:44 PM, Stuart Halloway wrote:
> * code path for using vars is now *much* faster for the common case,
> and you must explicitly ask for :dynamic bindability
This has been bouncing around in my head for the last week or so, occasionally
colliding with the memory of Rich
On Nov 5, 2010, at 12:42 PM, lprefonta...@softaddicts.ca wrote:
> That's why the large consulting organizations typically fail...
I agree with most of your points. So let me address the one point which was
the original subject of the thread...
>> The primary point I was making was that each n
On Fri, Nov 5, 2010 at 12:41 PM, Michael Ossareh wrote:
> I've regularly found that the multi-disciplinarian programmer is far more
> adept at solving issues in a creative manner than the "I've a skilled hammer
> and I'll wield it in the direction of any nail"-mono-linguistic programmer.
> Perhaps
Hello Lee,
2010/11/5 Lee Spector :
>
> On Oct 25, 2010, at 3:44 PM, Stuart Halloway wrote:
>> * code path for using vars is now *much* faster for the common case,
>> and you must explicitly ask for :dynamic bindability
>
> This has been bouncing around in my head for the last week or so,
>
You can use Visual VM (https://visualvm.dev.java.net/) to see how the
VM is using memory. I don't think it specifically show a log of GC
activity, but it is pretty clear from the graphs.
mch
On Nov 5, 8:41 am, "pepijn (aka fliebel)"
wrote:
> I don't know how to check the GC activity on my proje
I have installed twice, restarted my machine to make sure all is
well. However, the Emacs Client window shows: "Waiting for Emacs
server to start" and yet the SLIME REPL buffer appears to be
functional and various messages like: "Connected Your hacking starts
now!" show up in the status. Eventua
On Nov 5, 2010, at 4:43 PM, Laurent PETIT wrote:
>
> If I understand well, you are re-def'ing the var. If so, then no
> problem, because you have mistaken "redefinition of a var" for
> "dynamic rebinding of a var".
>
> redefinition of a var will still be possible for non dynamically
> rebindable
On Fri, 5 Nov 2010 13:42:44 -0700
Sean Corfield wrote:
> On Fri, Nov 5, 2010 at 12:41 PM, Michael Ossareh wrote:
> > I've regularly found that the multi-disciplinarian programmer is far more
> > adept at solving issues in a creative manner than the "I've a skilled hammer
> > and I'll wield it in
On Fri, Nov 5, 2010 at 3:20 PM, wrote:
> Ken Wesson wrote ..
>> On Fri, Nov 5, 2010 at 2:42 PM, wrote:
>> > Customers are not getting usable components delivered in the near future.
>> > They just get vague promises that something will be delivered in x years.
>> > Nothing tangible there just
I think you missed his point. (assoc! m k v) is *allowed* to modify m,
not *guaranteed*. It returns a pointer to a transient map, which may
be m, or may be a totally distinct map, or may be a new map that
shares some pointers with m. So your (do (update! blah foo
bar) ...more stuff) is potentially
I may need a ref world that could get bigger than main memory can
easily cope with. I was wondering if something like this would work
well:
(defvar- node-cache (ConcurrentHashMap. 128 0.75 128))
(defn- dead-entries-keys []
(doall
(filter identity
(for [entry node-cache]
(let [
On Fri, Nov 5, 2010 at 2:33 PM, Mike Meyer
wrote:
> This affect only works if the languages are sufficiently different to
> have different "obvious" solutions for a large number of problems.
> This is why people recommend learning a LISP even if you'll never use
> it - it will expand the way you l
Here's what I have so far. The code splits blocks into 128 smaller
sub-arrays, each representing a level, then calls a modified version
of frequencies (using areduce instead of reduce) on each level. On my
machine, with server mode on, it takes about 20 seconds to compute the
frequencies for an a
On Mon, Nov 1, 2010 at 21:09, Sean Corfield wrote:
> This Q came up on the Leiningen list but I wanted to share my answer
> on the larger Clojure group to get feedback from a bigger pool...
>
> On Mon, Nov 1, 2010 at 8:40 PM, Shantanu Kumar
> wrote:
> > There are some resource files (e.g. dbconf
Oops, sorry, got my terminology wrong. The sub-arrays represent
*layers*, not levels. So the code should actually read as follows:
(def num-layers 128)
(defn get-layer [layer-num ^bytes blocks]
(let [size (/ (count blocks) num-layers)
output (byte-array size)]
(doseq [output-idx (
Clojure 1.3 Alpha 2 is now available at
http://clojure.org/downloads
0 Changes from 1.3 Alpha 2 to 1.3 Alpha 3
1 Changes from 1.3 Alpha 1 to 1.3 Alpha 2
2 Changes from 1.2 to 1.3 Alpha 1
3 About Alpha Releases
= 0 Changes from 1.3 Alpha 2 to 1.3 Alpha 3
* fixed filter performanc
On Fri, Nov 5, 2010 at 5:53 PM, Stuart Halloway
wrote:
> Clojure 1.3 Alpha 2 is now available at
>
> http://clojure.org/downloads
Thanx.
Will contrib get a 1.3.0-alpha3 build?
--
Sean A Corfield -- (904) 302-SEAN
Railo Technologies, Inc. -- http://getrailo.com/
An Architect's View -- http://cor
This sounds like a problem with emacs server/client that might be unrelated
to Clojure or Slime. Some configurations of emacs will start a server mode
so that you can run emacsclient and have a new frame pop up instantaneously.
If you don't need emacsclient then you might look in the clojure box co
Do you thin that JRebel for Clojure would be an interesting option to
have?
I had the impression that REPL solves this problem for Clojure
developers, but probably I'm wrong.
Definitely, if there's a demand, Clojure support could be added to
JRebel. The same way as for Scala..
BR,
On Nov 4, 4:31
Maybe because Clojure has a vector, and conj conjoins new elements to
the end of the vector, so there's mere little use of fold-right. But,
fold-right is an abstraction tool, missing it in the core is kind of
pity.
--
You received this message because you are subscribed to the Google
Groups "Cloj
Hi David,
I get (20) whether "(& x 10)" is commented out or not.. I was expecting it
to return '() when"(& x 10)" is commented out and (20) when it is not
commented out..
I might have understood the meaning cond-u not correctly..
Sunil.
On Fri, Nov 5, 2010 at 7:16 PM, David Nolen wrote:
> On
Just had a look-over of the code and spotted a subtle bug I'd missed
before: the undertaker is potentially going to remove live keys from
the map if the node is loaded again in between (dead-keys-entries) and
(remove ...).
This oughta fix it:
(defn- dead-entries-keys []
(doall
(filter ident
61 matches
Mail list logo