I like the sequential let too. For one thing, it allows for the
breaking apart of complex expressions into more comprehensible parts,
with well named intermediate variables resulting in self documenting
code. For another, if a calculated value is used more than once, then
using an intermediate v
be the best way to overcome this
> limitation?
>
> Regards,
> Tim.
>
> On Mar 17, 2:44 pm, Keith Bennett wrote:
>
> > All -
>
> > I am a relative newcomer to Clojure, but have been really enjoying
> > learning and using it.
>
> > I've publis
discussed a
JRuby port of it). It's kind of intended for newcomers to Clojure from
the more conventional languages.
If any of you could check it for accuracy I would appreciate it. Of
course, feel free to comment on it too.
Thanks,
Keith Bennett
--~--~-~--~~~-
Is it a good idea or a bad idea to provide a main() function as the
program's entry point?
As an example, I have a program at http://is.gd/ndTV. If you look at
the bottom you'll see (unless and until I change it) the specification
of a main function, and then a call to it. I'm aware that I coul
This message is a response to the GUIs in Clojure thread from last
October (2008). There were "Reply to Author" links, but no "Reply"
links. Is that because of its age? The thread I'm referring to is:
http://groups.google.com/group/clojure/browse_thread/thread/22e4696550b6c4fa/fbccbe56dd45c80c
Tzach -
Cool!
I had to do some things to get it to work.
* Reversed the order of parse-digit and abs functions.
* Added call to -main at the end. By the way, what is the
significance of the hyphen in the function name?
* The call to msg-box in the About action had an extra parameter,
nil. I
Samppi -
On Jan 28, 12:53 pm, samppi wrote:
> Thanks for the replies, everyone. I read in an article that one of the
> most common Swing mistakes is putting non-GUI work into the event
> dispatch thread, but it seems like oftentimes the cost of creating a
> new thread outweighs the benefit of s
Samppi -
On Jan 28, 12:53 pm, samppi wrote:
> Thanks for the replies, everyone. I read in an article that one of the
> most common Swing mistakes is putting non-GUI work into the event
> dispatch thread, but it seems like oftentimes the cost of creating a
> new thread outweighs the benefit of s
Mark -
Not a problem. I didn't take it that way at all.
- Keith
>
> Hope I didn't offend with my rather sharp reply -- I meant to be clear
> but I realized later that it could be taken as sounding annoyed! The
> other folks did a great job of explaining the situation with a more
> friendly to
Luc -
It is I (Keith) who posed the original question.
I am just now learning Clojure, and for me, understanding what's going
on underneath the surface helps me understand how to use the language
properly. As I said previously, the amount of memory consumed by a
list will very rarely be an issu
y usage. In your map
> example, the memory usage is 52 * 100,000 bytes, so that's about 5MB. How
> much memory is used by the equivalent Java code?
>
> List l = new ArrayList();
> for(int i = 0; i < 10; i++) {
> l.add("x");
>
> }
>
> On Mon,
List l = new ArrayList();
> for(int i = 0; i < 10; i++) {
> l.add("x");
>
> }
>
> On Mon, Feb 2, 2009 at 1:06 PM, Keith Bennett wrote:
>
>
>
> > All -
>
> > I'm curious to know how to minimize memory consumption in Clojure for
&
All -
I'm curious to know how to minimize memory consumption in Clojure for
large lists. I did the following test in repl:
(def d ())
(dotimes [_ 10] (def d (cons "x" d)))
Then, I used VisualVM, an awesome free profiling tool (https://
visualvm.dev.java.net/) to examine the results. It in
Where did you find build version 8.1, #9678? I'm looking at their web
site, and all I see is version 8.01, build 9164.
Also, when I tried following the instructions for the plugin, startup
of Idea never gets past the splash screen. I have a message into
JetBrains support about it.
- Keith
On
samppi -
Typical Swing programs create a window with all its components and
event handlers in the main thread, and then launch the event handling
thread implicitly by calling setVisible(true) on the window (usually a
JFrame). I've always done it this way, and have never had a problem.
However, t
mpler-
gui" thread, but I assume you mean the entire Swing app...if so, then
no, you can start a Swing GUI from the main thread, and it will
automatically start and use the UI thread. Usually that consists of
calling the frame's setVisible method, which starts everything going.
- Keith Be
y modify
values from multiple threads, and hopefully print out some helpful
information?
Thanks,
Keith Bennett
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To post to this group, send email
that both took so long?
Thanks for any enlightenment.
- Keith Bennett
--~--~-~--~~~---~--~~
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
To unsubs
18 matches
Mail list logo