lso test with an NVMe drive attached, just to see if
>>>> disk bandwidth is the issue.
>>>>
>>>> On Thu, Oct 12, 2017 at 11:58 AM Justin Smith
>>>> wrote:
>>>>
>>> a small thing here, if memory usage is important you should be bu
t;>>> to see if disk bandwidth is the issue.
>>>>
>>>> On Thu, Oct 12, 2017 at 11:58 AM Justin Smith
>>>> wrote:
>>>>
>>> a small thing here, if memory usage is important you should be building
>>>>> and runnin
isk bandwidth is the issue.
>>>
>>> On Thu, Oct 12, 2017 at 11:58 AM Justin Smith
>>> wrote:
>>>
>> a small thing here, if memory usage is important you should be building
>>>> and running an uberjar instead of using lein on the server (this
g that your project.clj jvm-opts are
>>> not used, you have to configure your java command line in aws instead
>>>
>>> On Wed, Oct 11, 2017 at 3:52 PM wrote:
>>>
>> I can't figure out if this is a Clojure question or an AWS question. And
&
is also has
>> other benefits), and if you are doing that your project.clj jvm-opts are
>> not used, you have to configure your java command line in aws instead
>>
>> On Wed, Oct 11, 2017 at 3:52 PM >
>> wrote:
>>
>>> I can't figure out if this is
3:52 PM >
> wrote:
>
>> I can't figure out if this is a Clojure question or an AWS question. And
>> if it is a Clojure question, I can't figure out if it is more of a general
>> JVM question, or if it is specific to some library such as durable-queue. I
&g
er benefits), and if you are doing that your project.clj jvm-opts are
> not used, you have to configure your java command line in aws instead
>
> On Wed, Oct 11, 2017 at 3:52 PM wrote:
>
>> I can't figure out if this is a Clojure question or an AWS question. And
>> if
, Oct 11, 2017 at 3:52 PM wrote:
> I can't figure out if this is a Clojure question or an AWS question. And
> if it is a Clojure question, I can't figure out if it is more of a general
> JVM question, or if it is specific to some library such as durable-queue. I
> can redirect
I can't figure out if this is a Clojure question or an AWS question. And if
it is a Clojure question, I can't figure out if it is more of a general JVM
question, or if it is specific to some library such as durable-queue. I can
redirect my question elsewhere, if people think this
Haha, right on Gary! I used the later version of the original function, but
the earlier call to the original function. Here is what it looked like in
the beginning. This was an example of how not to write a function that
looks up indices by value. The example code I posted above was the
suppos
Bridget and Guru are both right about the reason that \3 is found at
position 13 in the string. However, the code you typed isn't valid Clojure,
since the pos function expects pred to be a function of v. Thus, your pos
call would need to look like this:
(pos #(= % \3) ":a 4 :b 1 :c 3 :d 4") =>
Okay, both these answers make lots of sense. thank you for your help.
J
On Wednesday, May 14, 2014 11:47:51 AM UTC+9, Guru Devanla wrote:
>
> The call to (index) returns this vector
>
> ([0 \:] [1 \a] [2 \space] [3 \4] [4 \space] [5 \:] [6 \b] [7 \space] [8
> \1] [9 \space] [10 \:] [11 \c] [12
The call to (index) returns this vector
([0 \:] [1 \a] [2 \space] [3 \4] [4 \space] [5 \:] [6 \b] [7 \space] [8 \1]
[9 \space] [10 \:] [11 \c] [12 \space] [13 \3] [14 \space] [15 \:] [16 \d]
[17 \space] [18 \4])
And, 3 here is in the 13th position. Your (cond) in index function is
picking up the
\3 is a character literal, so you're looking up the character 3. You're
looking it up in a collection which is a string. Count from the first
position, 0, a colon, then 1, the letter a, and so on. 3 is at the 13th
position.
On Tuesday, May 13, 2014 9:44:38 PM UTC-4, gamma235 wrote:
>
> I am rea
I am reading The Joy of Clojure now and am finishing chapter 5 on sequence
abstractions. There is an example given that demonstrates how to locate the
index of an element in a sequence by value, but I don't understand why the
character lookup here is returning 13. Can somebody please explain thi
writes:
> Hello, I'm doing a school paper on Clojure but there are two questions that
> i just can't find answers to anywhere they are:
>
>
> Are data types bound to variables and parameters at compile-time? run-time? a
> combination?
>
> and also,
>
> How are parameters passed? (Pass by value?
> Are data types bound to variables and parameters at compile-time? run-time? a
> combination?
>
>
Clojure, like LISPs in general, is primarily a dynamically-typed language,
so variables/parameters don't have a type assigned to them. However, on JVM
Clojure there are optional type hints, which
Hello, I'm doing a school paper on Clojure but there are two questions that
i just can't find answers to anywhere they are:
Are data types bound to variables and parameters at compile-time? run-time? a
combination?
and also,
How are parameters passed? (Pass by value? Pass by reference? Pas
Hi,
with each call to counters you get new incrementers, decrementers and
accessors referecing different counters underneath. Capture the return
value of the counters call.
(def fns (counters))
((nth fns 0))
((nth fns 0))
((nth fns 2))
Hope this helps.
Sincerely
Meikel
--
You received this
I am new to Clojure and have been working through some of the examples
on the PCL -> Clojure blog. Currently I am working through Chapter 6
(variables).
The blog says "Nothing stops multiple functions from closing on the
same variables. Here is a function that returns an incrementer,
decrementer,
Thanks, Stuart.
> With Leiningen, you can add the :jvm-opts option in project.clj,
Cool, this is what I was looking for :)
> (def signals (vec ...))
>
> says that you want the entire result, as a vector, stored as the value of
> the Var `signals`. That means your entire result data must fi
Thanks, Ken.
> You'll need to avoid holding onto the head of your line-seq, which
> means you'll need to make multiple passes over the data, one for the
> as, one for the bs, and etc., with the output a lazy seq of lazy seqs.
Actually, it would be great to make separate, asynchronous passes for
t
Oh, and the standard JDK class java.util.zip.GZIPInputStream implements gzip
decompression.
-Stuart Sierra
clojure.com
--
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
Hi Avram,
Assuming you're using the Sun/Oracle JDK, you can increase the size of the
Java heap with the -Xmx command-line option. For example:
java -Xmx512mb -cp clojure.jar:your-source-dir clojure.main
Will run Java with a 512 MB heap. This increases the amount of memory
available to yo
On Tue, Mar 22, 2011 at 4:00 PM, Avram wrote:
> Hi,
>
> I (still) consider myself new to clojure. I am trying to read a 37Mb
> file that will grow 500k every 2 days. I don't consider this to be
> input large enough file to merit using Hadoop and I'd like to process
> it in Clojure in an efficient
Hi,
I (still) consider myself new to clojure. I am trying to read a 37Mb
file that will grow 500k every 2 days. I don't consider this to be
input large enough file to merit using Hadoop and I'd like to process
it in Clojure in an efficient, speedy, and idiomatic way.
I simply want something akin
Hello,
I've started dabbling into Swing & Clojure, and for fun decided to
translate one of the Sun examples (requires Java SE 1.6 though)
It's located here:
http://java.sun.com/docs/books/tutorial/uiswing/examples/learn/index.html#CelsiusConverter
and the java code here:
http://java.sun.
On Fri, Nov 7, 2008 at 12:25 AM, cwyang <[EMAIL PROTECTED]> wrote:
> My expectation is these:
> 1) For C10K problem (or C100K), application must not use
> native threads. Big stack size means low concurrency
Hi,
I assume you mean 'new native thread per request' is bad for CnK.
Clojure's thread-
On Nov 7, 2008, at 7:13, Mark H. wrote:
> Does the JNI require copy-in / copy-out for arrays of floating-point
> numbers?
The JNI requires the C code to call JNI routines for converting the
Java array to a native array and back. Whether or not a copy is made
depends on the JNI implementation
On Nov 6, 11:58 am, Konrad Hinsen <[EMAIL PROTECTED]> wrote:
> On 05.11.2008, at 17:16, Mark H. wrote:
> For the immediate future, yes. But with changing computer
> architectures, the existing algorithms and routines may lose much of
> their interest in the future.
Haha, yes, we're working on
Thanks everyone.
I've read all the replies, and I might understand something.
(Though it seems that discussion goes to beyond my current
understanding in the middle of this discussion threads)
To explore further, I become another owner of 'Programming
Clojure' :-)
For my second question, I'll ke
On 05.11.2008, at 17:16, Mark H. wrote:
> and replace copies with destructive writes. I haven't seen a purely
> functional formulation of LU factorization but it could be done
> without too much trouble. Of course there's no reason to go through
> that effort because people spend so much time o
On Nov 4, 11:46 pm, Konrad Hinsen <[EMAIL PROTECTED]> wrote:
> > Long answer: SISAL is an example of a functional parallel language
>
> Ah, right, there was SISAL... unfortunately long forgotten.
I saw a retrospective presentation on it at SIAM PP this spring by one
of the Livermore folks who pr
Hi,
On 5 Nov., 15:40, Konrad Hinsen <[EMAIL PROTECTED]> wrote:
> But does gen-class have to look the way it does? Couldn't the same
> functionality be provided in a way that looks more like a proper part
> of the language?
I'm not sure about the form itself. I had look at a CLOS tutorial
and
On Nov 5, 2008, at 11:12, mb wrote:
> I don't think that there are first-class and second-class citizens.
> They just have a different aspect.
Right, one can't say one is superior to the other. There are just two
separate worlds, each having its own characteristics.
> Having pure Clojure "cla
Hi,
On 5 Nov., 08:31, Konrad Hinsen <[EMAIL PROTECTED]> wrote:
> That's exactly my point. Multimethods may well be sufficient or even
> superior for implementing OO concepts useful in Clojure. We will see
> when someone actually uses them this way (or has it already
> happened?). But as lon
On 04.11.2008, at 20:07, Mark H. wrote:
> Long answer: SISAL is an example of a functional parallel language
Ah, right, there was SISAL... unfortunately long forgotten.
> One could express solving linear systems (which is what I presume you
> mean by "matrix inversion," unless you really want
On 04.11.2008, at 19:08, Meikel Brandmeyer wrote:
> Suppose get, contains?, etc. were multimethods. I would not have
> needed
> gen-class. I just would register my own implementations for the
> lazy-map.
> But the problem is: Clojure's map interface is not implemented with
> multimethods. The
On Nov 4, 10:01 am, Konrad Hinsen <[EMAIL PROTECTED]> wrote:
> On the other hand, I am not sure that all important algorithms
> already have purely functional equivalents that are sufficiently
> efficient for real life. Is there an efficient purely functional
> algorithm for matrix inversion
Hi,
Am 04.11.2008 um 16:06 schrieb Konrad Hinsen:
An example of where Clojure lacks OO features, in my opinion, is your
lazy-map library. It provides an additional implementation for an
existing interface, which is a typical OO approach, and a very useful
one. But although all your code is writt
On Nov 4, 2008, at 17:26, Mark H. wrote:
> Of course sometimes you need side effects in order to accomplish
> useful work, and a good FP language will provide abstractions that
> help you limit side effects and reason about them. Clojure does this
> by means of refs, agents, and transactional up
> OOP doesn't have to do this, but a lot of OOP code does this.
i think that is a good point. there is not a single succinct
definition of OO when one looks at the various ways it has been
actually implemented in languages: Smalltalk is not the same thing as
Java. I think the ways in which they d
On Nov 3, 6:44 pm, cwyang <[EMAIL PROTECTED]> wrote:
> So, I understand as follows:
> - OOP: keeping objects, which has states and methods.
> methods are encapuslated to the corresponding object.
> - FP: keeping objects(or structs or variables, whatever it is called)
> and functions o
On Nov 4, 2008, at 15:20, mb wrote:
> And as an effect of not forcing the sorting logic into some class,
> one can easily sort the same data in different ways in the FP style.
> While implementing an interface Comparable defines *one* way
> of sorting, the FP style separates the functions from th
On Tuesday 04 November 2008 06:03, Konrad Hinsen wrote:
> ...
>
> As an illustration of the two approaches, consider a program to sort
> data. In OOP, one would define an abstract class "comparable" with a
> method "sort" that works by calling methods such as "greater" and
> "equal" implemented in
Hi,
On 4 Nov., 15:03, Konrad Hinsen <[EMAIL PROTECTED]> wrote:
> As an illustration of the two approaches, consider a program to sort
> data. In OOP, one would define an abstract class "comparable" with a
> method "sort" that works by calling methods such as "greater" and
> "equal" implemen
On Nov 4, 2008, at 3:44, cwyang wrote:
> So, I understand as follows:
> - OOP: keeping objects, which has states and methods.
>methods are encapuslated to the corresponding object.
> - FP: keeping objects(or structs or variables, whatever it is called)
> and functions on the objects
Hi Peter,
don't know, but maybe you want to add additional classpaths for slime.
in emacs:
M-x customize-option RET swank-clojure-extra-classpaths RET
hth,
stephan
On Nov 3, 9:00 pm, Peter Hart <[EMAIL PROTECTED]> wrote:
> I've been trying to get clojure working with slime (on windows). I can
cw,
I have been converting the examples from "Practical Common Lisp" into
Clojure. A big part of this is switching from imperative to functional
mindset. You might want to look at Chapters 3, 16, and 17.
http://blog.thinkrelevance.com/2008/9/16/pcl-clojure
Cheers,
Stuart
>
> Hi all.
>
> F
Hi all.
First of all, thanks for the joyful language, Clojure.
I am having struggle in understanding functional programming,
which Clojure dictates.
Though I'm not a big fan of object oriented programming,
I totally agree with the model of objects - objects and methods,
entities and functions i
I've been trying to get clojure working with slime (on windows). I can
run ants.clj from the command line fine. I can run simple expressions
under slime (e.g. (+ 2 3)). However, when I try to run ants.clj from
within slime, I get the following warning in the inferior lisp buffer,
and nothing happe
51 matches
Mail list logo