2011/10/20 GaryCrab <furas...@gmail.com>:
> --
> Job Board: http://jobs.nodejs.org/
> Posting guidelines:
> https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
> You received this message because you are subscribed to the Google
> Groups "nodejs" group.
> To post to this group, send email to nod...@googlegroups.com
> To unsubscribe from this group, send email to
> nodejs+un...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/nodejs?hl=en?hl=en
>
When people say server-side they should say "not browser-side".
Server/desktop
is the same thing, it's a computer. Apart from the Java classes (for
now), Node
can also function as a desktop scripting tool, reading files, etc..
---
Diogo R.
When people say server-side they should say "not browser-side".
Server/desktop
is the same thing, it's a computer. Apart from the Java classes (for
now), Node
can also function as a desktop scripting tool, reading files, etc..---
Diogo R.
We have great bindings to GTK ;) (under heavy development)
https://github.com/zcbenz/node-gui
IMHO its often proofs to be less the "better" principle approach, but
which one is better catered for. And that also answers the OP, node.js
caters very well for webservers. Many new things are approaching and
they are all awesome, but they are still even younger than node.js.
For Oracle/MS-SQL, or for that matter most RDBMS data sources, simply using
the node-odbc adapter is probably the best bet. I do with that JS supported a
multi-line string though.
ex: C#: @"...";
VB.Net (via XML cheat): <![CDATA[ ... ]>.Value
It's nicer to have SQL code not broken up by \"\r\n\t+ \" Of course if the
google guys would allow E4X in V8, or the node trunk would support
spidermonkey(spidernode) then it would be much nicer in terms of supporting
certain things.
--
Michael J. Ryan - http://tracker1.info/
I usually do this:
[ "line1",
"line2",
"line3" ].join("\n")
It's not as lightweight as a multi-line string literals would be, but it helps.
--Josh
> --
> Job Board: http://jobs.nodejs.org/
> Posting guidelines:
> https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
> You received this message because you are subscribed to the Google
> Groups "nodejs" group.
> To post to this group, send email to nod...@googlegroups.com
> To unsubscribe from this group, send email to
> nodejs+un...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/nodejs?hl=en?hl=en
>
--
Joshua Holbrook
Engineer
Nodejitsu Inc.
jo...@nodejitsu.com
I have done the same... however, would be nice to just have multi-line
literals and/or e4x to support that behavior.. makes copy/paste in/out of the
utility for the dbms that much more prone to error.
I know very well the feelings on e4x.. which would be far more useful in node,
than in the browser. Just the same, the quasi-literals thing seems pretty cool.
"In Javascript \
this is a multi \
line string"
What's so unreadable about that? Or am I missing something?
Scott
"In Javascript \this is a multi \
line string"
That's not a multi-line string. That's a string with some escaped line breaks.
> "asdffoo" === "asdf\
foo"
true
What you want is something like python's triple-", where:
"""
asdf
foo
""" === "asdf\nfoo"
--
> "I guess we could \n\
> write multi-line \n\
> strings like this? \n\
> \n\
> --Josh"
I guess we could if we were a n00b.
What's so important about multi line strings?
And what's wrong with something like:
[
'This is a multi'
,'line string that doesn\'t'
,'look particularly scary or'
,'hurt kittens. YMMV.'
].join('\n');
--Josh
Here's a 3rd option:
"This is a multi\n" +
"line string that doesn't\n" +
"look particularly scary or" +
"hurt kittens. YMMV."
Get a job! :P
---
Diogo R.
you can always do multiline strings in coffeescript ;) http://jashkenas.github.com/coffee-script/#strings
--
actually, javascript already has a syntax for multiline strings!