where is the +1 button...
regards
Vivek
--
The hidden harmony is better than the obvious!!
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clo...@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+u...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
First critical reactions:
- I put a high premium on auto-indendentation, and clooj seems to get this right when hitting return after typing some code (or in the middle of code) -- this is great and missing in some other Clojure editing environments. A big plus. But if one screws up the indentation I don't see how to say "indent this properly again, in the context of what comes above it." Tab moves it to the right, shift-tab moves it to the left, but is there a way to say "move it to the correct place"? Actually, yes: one can do this by deleting the previous newline and hitting return again, but that's awkward, particularly if you want to go through a block of code and see if the structure is what you thought it was... you'd have to delete and re-enter each newline.
- I just created a new project and I get a user prompt in the REPL pane but I can't type anything into that... so I can't actually try it... I click in there but I don't get a cursor there, and typing does nothing. In case it matters I'm running Mac OS 10.6.8 and java -version says:
java version "1.6.0_26"
Java(TM) SE Runtime Environment (build 1.6.0_26-b03-384-10M3425)
Java HotSpot(TM) 64-Bit Server VM (build 20.1-b02-384, mixed mode)
- How is one supposed to create a new .clj file and add it to the project? I see that you say that some stuff is to be done with lein or cake at the command line... and I guess some stuff like creating new files could be done with other OS-specific tools, and all of this is fine with me, but it's not clear to me what should be done how. I'm not suggesting that any more needs to be done within clooj itself -- just that it should be more clear what should be done where. I think that a "hello world" example that walks one through the process of creating a new project, adding a new, empty src file, adding code to that file, and running the code, would clear this up. Maybe also a second simple example that also adds one library... or something like that.
- It would be nice if all of the basic editor functionality was discoverable via menu items. For example the indentation commands are mentioned in the instructions in the posting to the list, but since they're not in the menus a user may not realize they're there. (These in particular could be under the Source menu, but as a general rule it would be nice if all major features are *somewhere* in the interface.)
- Longer term I agree with Shantanu that things like syntax highlighting and autocompletion would be great, and actually I'd put my all-time favorite feature even before those: arglist-on-space. I'm a total arglist-on-space fanatic and evangelist -- I think it's the greatest idea ever for supporting/speeding code editing and that it should be in every Lisp editor. AFAIK it is currently available for Clojure only in emacs and MCLIDE. If I were going to add one editor feature beyond robust auto-indenting it would be arglist-on-space.
Again, I love this project! I hope that the comments above are taken as constructive criticism.
-Lee
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clo...@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+u...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
--
Lee Spector, Professor of Computer Science
Cognitive Science, Hampshire College
893 West Street, Amherst, MA 01002-3359
lspe...@hampshire.edu, http://hampshire.edu/lspector/
Phone: 413-559-5352, Fax: 413-559-5438
Ah yes -- now I see it and that works fine. Thanks also to Adam Burry for pointing this out. As Tamreen Khan noted it's a little confusing that there's a prompt in the upper pane while input can only be given in the lower pane... I agree with Tamreen that the ideal thing would be for both to be in the same pane, so it's a normal REPL that takes input and also gives output, but if that's very difficult for some reason then I agree that pane labels would help.
>> - How is one supposed to create a new .clj file and add it to the project?
>
> Use the File > New menu.
For some reason I was missing this and only seeing the menu item for a new project... but now I think this was just me, and that I jumped too quickly to the conclusion that new files were to be created outside of clooj. Now I see it and it works very nicely. I do think that a hello world walkthrough doc would prevent others from missing this and generally help to orient newcomers to the environment.
> Another excellent suggestion (added to issues). I think you're right
> -- arglist-on-space is very cool. Where do you think the arglist
> should appear? I think there's a tension between wanting to display it
> near where the user is typing and the need to not obscure nearby code.
In emacs and MCLIDE (and as far as I recall in other environments that I've used, mostly for Common Lisp) it appears in a mini buffer below the editing pane. I think that's a good solution, but anywhere else "within view but out of the way" would suffice. I wouldn't want to put this within the edit buffer itself, since it might then get in the way and there'd be a much higher premium on getting the information and the way that it's displayed exactly right. Part of the beauty of arglist-on-space is that it's often extremely helpful -- and I tend to rely on it rather than my memory if it's available -- but there are no bad consequences if it's not exactly perfect (e.g. because of complex argument lists or special cases that make it hard to display the right info).
-Lee
Great job!
Timothy
Not sure if I'm not misunderstanding the initial creating of a
project, but it seems to me that I am using a file dialog box for a
directory selection. As it wasn't entirely clear what it expected me
to do at that point, I just typed in some name without knowing for
sure if it was supposed to be a file name or a directory, and found
out afterward that it was in fact a name that represented a directory.
It will probably take quite a bit for me to give up Emacs, but I find
it a very interesting project, and like several others have said, it
worked right out of the box, which is a huge plus.
Regards,
Lars Nilsson
Yes, it does say that now that I'm checking again, I must have missed
it the first time around. I just confused it with a regular file
dialog box. My feeling about a different style dialog box stands, I
think, but it's really a very minor issue, and I'm much, much more
interested in a the automatic indent (first brought up by Lee in this
thread) that I couldn't live without in Emacs (for any programming
langauge..) Being able to hit tab wherever I happen to be in a line
and have it "do the right thing" rather than simply inserting a tab at
the cursor location is invaluable, along with reindenting a region or
a whole file. So +1 from me for that feature, if there's a tally going
on for the requests. ;)
Lars
I use TAB. Just about the only file type I edit for which it doesn't
do this are Makefiles. C/C++, Clojure/Lisp, O'Caml source files, etc,
I use TAB in Emacs and expect it do make the current line indented
appropriately, whether I'm at the beginning, end or in the middle of
the line. I can't remember the last time I really felt I needed an
actual tab character in a source file of mine. Obviously, this can be
a highly individual preference and I fully realize not everyone will
want to have an editor/IDE behave this way (of course, they're
misguided... ;) )
Lars
(println foo)
then do CTRL+E
I see the REPL spit out the lines I entered, then nothing...
Some sort of error feedback would be nice.
Timothy
Timothy
--
“One of the main causes of the fall of the Roman Empire was
that–lacking zero–they had no way to indicate successful termination
of their C programs.”
(Robert Firth)
This is an interesting thought. On the other hand, when lines are
merged or split, where does this status go? I'm thinking when a line
is split the second of the two resulting lines should start out
indented correctly relative to the first, and inherit the first's
status; when two lines are merged, the status of the first of the two
becomes the status of the merged line. This is consistent with the
status being an invisible metacharacter at the start of the line that
is deleted with the immediately preceding newline and cloned if enter
is hit in the middle of that line.
What about multi-line pastes? If the paste is of material cut or
copied from inside clooj, the status of each line that was cut or
copied would be stored OOB somewhere and used for the paste. (Actually
using funny extra characters inline in the copied material has
problems if material is copied from clooj and pasted into something
else, such as a post to this list.) From outside clooj? Some sensible
default, such as autoindent off (keep paste's formatting) or on
(auto-fix to context). Maybe let the user choose either in an options
screen.
Saving the state across sessions also seems to need to be OOB. Putting
it in the .clj file at the start of each line would gum up other
tools, and adding clooj-internal comments to source files isn't much
better. A clooj.dat file in the project root?
Alternatively, avoid the mess and just always maintain
structure-determined indent of all lines at all times. Does anyone
really want fully user-controlled indenting outside of comments
anyway? Spaces and tabs in the indent can just jump you to the start
of the forms on the line, and self-insert normally in string literals
and in ; comments, and single spaces normally anywhere (maybe turn
tabs into spaces and tab or space next to a space just moves you to
the right of the space).
Or, the traditional thing: full control, but tab or something will
reindent the current line, or all lines intersecting the selection if
any, to structurally-correct positions based on all of the code above,
if tab is hit outside a string literal or ; comment.
--
Protege: What is this seething mass of parentheses?!
Master: Your father's Lisp REPL. This is the language of a true
hacker. Not as clumsy or random as C++; a language for a more
civilized age.
Thanks.
I personally think that this provides the best combination of clarity, simplicity, and utility. My guess is that "smarter" solutions will indeed get messy/annoying in some of the situations that Ken mentioned (e.g. pasting multiple lines, possibly from another app), and very occasionally I have reason to use non-standart indentation for some small segment of code. I do think that it's also good for the system to indent correctly when the user types a newline, which clooj already does.
-Lee
- I wish that Swing was prettier on the eye. I love nice GUIs.Me too. I think in the long run the coolest thing will be an in-
browser clojure IDE for clojure-in-javascript, especially when multi-
threaded javascript becomes available in web browsers.
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clo...@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+u...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
FWIW I just double-clicked on the clooj jar and it launched like any other application -- I didn't have to know that it was a jar or even what a jar is. Assuming that this also works on other OSes (I'm using Mac OS X) then I think this is already beginner friendly. I *think* it also includes everything that a newbie needs for a complete workflow without any other tools or Terminal interactions...
-Lee
It is indeed difficult to build a console with Swing's text
components. Actually, I think it's difficult with the out-of-the-box
text components in just about any toolkit. They're not designed for it
and there are a ton of edge cases and gotchas to take care of.
Anyway, a couple other random thoughts:
* You might want to take a look at JSyntaxPane
(https://code.google.com/p/jsyntaxpane/) for the editor. In theory
adding Clojure syntax highlighting should be straightforward and they
already cover stuff like line numbers, etc.
* Consider using actions for your menu items so you can reuse them in
toolbars and elsewhere in the UI
* getCaretPosition (and almost all Swing methods) is not thread-safe
so calling it from an agent is asking for trouble :)
Good luck!
Dave
If I add an expression around existing code, I tend to use TAB if
small regions are used to reindent the affected line(s) that are
suddenly contained within a new expression and as a result should be
reindented as if I had originally typed the entire expression. If for
some reason larger blocks of code are affected, I would likely use the
region/file reindent functionality in Emacs. In other words, I usually
use TAB for lines that were written earlier, to align it better with
new code, not to affect indentation of the line I'm currently typing.
Lars Nilsson
Thanks, that's a very interesting idea. Perhaps, if Laurent doesn't
On Jul 18, 2:31 am, Shantanu Kumar <kumar.shant...@gmail.com> wrote:
> This is so cool. Any chance you can use Laurent Petit's Paredit?https://github.com/laurentpetit/paredit.clj
mind! :)
I'm adding Issues to the github project now.
> Any roadmap for features? Syntax highlight, autocomplete etc?
> Yep, this is great! How about syntax highlighting?Thanks, good suggestion! I'm not a huge fan of most syntax
highlighting -- what do you think would be helpful but unobtrusive?