Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

A sandbox to run examples of clj?

1 view
Skip to first unread message

optimistx

unread,
Sep 26, 2009, 1:47:44 AM9/26/09
to
If you study and test the code snippets in this newsgroup, which kind of
environment do you use? Full javascript ide like Netbeans ide or Eclipse and
you provide the necessary html and other necessary/useful code every time
from scratch?

Or have you a simpler 'sandbox', e.g. a textarea, where you can
paste/modify/execute code
with few clicks? Possibly with some helper code like object inspector?

The simplest examples here seem to have so much in common that one could try
to define a sandbox page where anyone could demonstrate their questions with
code, and others could study/modify the code.

If such a page were useful, the examples could be gathered like the
questions in FAQ, and newcomers like me could learn running them, an archive
with executable code.

Or are there already a collection of pages like that in existence?


Stefan Weiss

unread,
Sep 26, 2009, 3:23:09 AM9/26/09
to
On 26/09/09 07:47, optimistx wrote:
> If you study and test the code snippets in this newsgroup, which kind of
> environment do you use? Full javascript ide like Netbeans ide or Eclipse and
> you provide the necessary html and other necessary/useful code every time
> from scratch?

I use Vim, a plain text editor. I don't see a reason for JavaScript IDEs
at the moment, not until there is a set of standard libraries which
could be integrated with the IDE. On the other hand, there is probably
at least one JQuery plugin for NetBeans, so if you use JQuery a lot, an
IDE might make sense.

> Or have you a simpler 'sandbox', e.g. a textarea, where you can
> paste/modify/execute code
> with few clicks? Possibly with some helper code like object inspector?

Firebug can handle most the one-off tests I need, and I've got a small
collection of useful HTML templates (HTML/XHTML, strict/quirks mode,
empty/full, Latin1/UTF-8).

> The simplest examples here seem to have so much in common that one could try
> to define a sandbox page where anyone could demonstrate their questions with
> code, and others could study/modify the code.
>
> If such a page were useful, the examples could be gathered like the
> questions in FAQ, and newcomers like me could learn running them, an archive
> with executable code.
>
> Or are there already a collection of pages like that in existence?

Such a collection might be a repository of runnable code, but if anybody
could add pages, and posters were encouraged to upload their code to it,
the quality of the code would be unpredictable. The way we have it now,
people post their code here, and it will be discussed (or ignored) in
the group. Which is as it should be (I think).

I don't think a "cljs sandbox" is necessary, given that all you have to
do is take the 10-20 lines from a post and paste them into an empty HTML
page. A cljs wiki might work. It could replace the dead "code worth
recommending" project, and provide a place for some "consensus"
solutions, if they exist. Imagine how much bandwidth could be saved in
this group if, for example, all the "JQuery-is-evil" arguments were
collected on one page, and wouldn't have to be reiterated every few
weeks. It might also alleviate the "check the archives" problem until
Google get their act together and provide a decent Usenet search again.
The FAQ could handle some of that, but a wiki would be much more
web-two-zero-y ;-)


cheers,
stefan

John G Harris

unread,
Sep 26, 2009, 12:05:55 PM9/26/09
to
On Sat, 26 Sep 2009 at 08:47:44, in comp.lang.javascript, optimistx
wrote:

IE already provides such a thing in its address field if the code isn't
too long :
javascript: <your javascript here>

John
--
John Harris

Thomas 'PointedEars' Lahn

unread,
Sep 26, 2009, 2:28:34 PM9/26/09
to
Stefan Weiss wrote:
> On 26/09/09 07:47, optimistx wrote:
>> If you study and test the code snippets in this newsgroup, which kind of
>> environment do you use? Full javascript ide like Netbeans ide or Eclipse and
>> you provide the necessary html and other necessary/useful code every time
>> from scratch?
>
> I use Vim, a plain text editor. I don't see a reason for JavaScript IDEs
> at the moment,

I use Vim a lot for direct server-side editing, like Apache VirtualHost
files, BIND zone files aso, and prefer it there. However, AFAICS, with
regard to scripting, Eclipse's JSDT (from WST) scores over Vim in several
respects. To name just a few:

- Project-related resolution of identifiers
- Supports JSDoc (e.g., on hover over an identifier)
- Filesystem tree view with built-in inspection of identifiers in supported
files
- Outline view loosely or strictly connected with the editor view
- Easily customizable syntax highlighting and validation
- Integration of debugger with installed layout engines (ATF only, IIRC).
(- There's even a Vim plugin for Eclipse :))

As you might have guessed, JSDT is part of the IDE that I am using, among
other Eclipse editor plugins.

<http://eclipse.org/webtools/>

> not until there is a set of standard libraries which
> could be integrated with the IDE.

Apparently you don't know the ATF (AJAX Tools Framework) project. See above.

> On the other hand, there is probably at least one JQuery plugin
> for NetBeans, so if you use JQuery a lot, an IDE might make sense.

IMNSHO, if you use jQuery a lot, a bullet in one's head might make sense.

>> Or have you a simpler 'sandbox', e.g. a textarea, where you can
>> paste/modify/execute code
>> with few clicks? Possibly with some helper code like object inspector?
>
> Firebug can handle most the one-off tests I need, and I've got a small
> collection of useful HTML templates (HTML/XHTML, strict/quirks mode,
> empty/full, Latin1/UTF-8).

Yes, Firebug is a great tool. BTW, has anyone considered to make a private
donation or tried to let his company consider a donation to it? I am asking
because I am considering it.


PointedEars
--
Prototype.js was written by people who don't know javascript for people
who don't know javascript. People who don't know javascript are not
the best source of advice on designing systems that use javascript.
-- Richard Cornford, cljs, <f806at$ail$1$8300...@news.demon.co.uk>

Dr J R Stockton

unread,
Sep 26, 2009, 4:10:04 PM9/26/09
to
On Sep 26, 6:47 am, "optimistx" <optimi...@hotmail.com> wrote:
> If you study and test the code snippets in this newsgroup, which kind of
> environment do you use? Full javascript ide like Netbeans ide or Eclipse and
> you provide the necessary html and other necessary/useful code every time
> from scratch?
>
> Or have you a simpler 'sandbox', e.g. a textarea, where you can
> paste/modify/execute code
> with few clicks? Possibly with some helper code like object inspector?


For all sorts of things, incliding that and evaluating arithmetic
expressions and testing HTML, I use a LOCAL COPY of <http://
www.merlyn.demon.co.uk/js-quick.htm> - a LOCAL COPY (to be strict, the
local original).

MY NEWS SERVICE SEEMS SICK. Many posts are not being transmitted,
few are being received. Therefore this use of Google.

Apologies if you DON'T see any articles marked REPOST or if you've
already seen their content.

FOR CONTEMPLATION : would abozhilov's basic algorithm be better for
the FAQ than the present one? Tests in <http://www.merlyn.demon.co.uk/
js-rndg2.htm>, near end.


--
(c) John Stockton, near London, UK. Using Google, no spell-check.
Mail: J.R.""""""""@physics.org or (better) via Home Page at
Web: <URL:http://www.merlyn.demon.co.uk/>
FAQish topics, acronyms, links, etc.; Date, Delphi, JavaScript, ....|

Jorge

unread,
Sep 26, 2009, 6:23:34 PM9/26/09
to
On Sep 26, 7:47 am, "optimistx" <optimi...@hotmail.com> wrote:
> If you study and test the code snippets in this newsgroup, which kind of
> environment do you use? Full javascript ide like Netbeans ide or Eclipse and
> you provide the necessary html and other necessary/useful code every time
> from scratch?

The best debugger is no longer FireBug, imho, now it's -by a long
shot- Safari's WebInspector:

See the video "Session 418 - Debugging Websites Using Safari's
Integrated Developer Tools" here:

https://deimos.apple.com/WebObjects/Core.woa/BrowsePrivately/adc.apple.com.2132338856
(or click in "Safari Web Development Videos" @ http://developer.apple.com/safari/)

--
Jorge.

Lasse Reichstein Nielsen

unread,
Sep 26, 2009, 8:19:27 PM9/26/09
to
"optimistx" <opti...@hotmail.com> writes:

> If you study and test the code snippets in this newsgroup, which kind
> of environment do you use? Full javascript ide like Netbeans ide or
> Eclipse and you provide the necessary html and other necessary/useful
> code every time from scratch?
>
> Or have you a simpler 'sandbox', e.g. a textarea, where you can
> paste/modify/execute code
> with few clicks? Possibly with some helper code like object inspector?

The latter: http://www.infimum.dk/HTML/javascript/jstest6.html
It's not perfect (doesn't look right in IE, uses a direct call to eval
to evaluate the input), but it usually gets the job done.

/L
--
Lasse Reichstein Holst Nielsen
'Javascript frameworks is a disruptive technology'

0 new messages