Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Computing > NZ Computing > At last Linux has a decent text editor

Reply
Thread Tools

At last Linux has a decent text editor

 
 
Carnations
Guest
Posts: n/a
 
      11-18-2009
On Wed, 18 Nov 2009 09:25:04 +1300, Allistar wrote:

>>> Yes (although I use Quanta, which uses Kate as an editor).

>>
>> I thought Quanta was a markup editor.

>
> You can edit any text you like in quanta. I use it for javascript, PHP,
> xml, HTML, json...


Ah yes - you can edit any code you like. I suppose Quanta is configurable in that respect altho' I haven't
willingly used it to edit code, or markup for that matter.


--
"Filtering the Internet is like trying to boil the ocean"
 
Reply With Quote
 
 
 
 
Carnations
Guest
Posts: n/a
 
      11-18-2009
On Wed, 18 Nov 2009 22:43:52 +1300, Allistar wrote:

> reserved words in PHP are different to those in javascript.


OMG - tell me you're kidding!!!
</sarcasm>


--
"Filtering the Internet is like trying to boil the ocean"
 
Reply With Quote
 
 
 
 
Lawrence D'Oliveiro
Guest
Posts: n/a
 
      11-18-2009
In message <(E-Mail Removed)>, Carnations wrote:

> Plain text (such as the ASCII standard) is about easily-usable
> human-readable information.


Not necessarily. It’s also good to use for computer-readable data formats as
well.
 
Reply With Quote
 
Lawrence D'Oliveiro
Guest
Posts: n/a
 
      11-18-2009
In message <(E-Mail Removed)>, Allistar wrote:

> Lawrence D'Oliveiro wrote:
>
>> In message <(E-Mail Removed)>, Allistar
>> wrote:
>>
>>> [snip irrelevancy]

>>
>> How would your syntax colouring work in that example, hey?

>
> As I said before - reserved words would be one colour, literals would be
> another etc.


How would that help with this example, in Python this time:

sql.cursor.execute \
(
"update items set "
+
", ".join
(
tuple
(
"%(name)s = %(value)s"
%
{
"name" : field[0],
"value" : SQLString(Params.getvalue
(
"%s[%s]" % (field[1], urllib.quote(modify_id))
))
}
for field in
(
("make", "modify_make"),
("model", "modify_model"),
("details", "modify_details"),
("serial_nr", "modify_serial"),
... you get the idea ...
)
)
+
(
"last_modified = %d" % int(time.time()),
)
)
+
" where inventory_nr = %s" % SQLString(modify_id)
)

Feel free to explain how you would collapse things onto the same line, as it
seems you prefer to do, and then use syntax colouring to make the structure
clear again.
 
Reply With Quote
 
Lawrence D'Oliveiro
Guest
Posts: n/a
 
      11-18-2009
In message <(E-Mail Removed)>, Allistar wrote:

> Lawrence D'Oliveiro wrote:
>
>> In message <(E-Mail Removed)>, Allistar
>> wrote:
>>
>>> Lawrence D'Oliveiro wrote:
>>>
>>>> In message <(E-Mail Removed)>, Allistar
>>>> wrote:
>>>>
>>>>> Lawrence D'Oliveiro wrote:
>>>>>
>>>>>> In message <(E-Mail Removed)>, Allistar
>>>>>> wrote:
>>>>>>
>>>>>>> Lawrence D'Oliveiro wrote:
>>>>>>>
>>>>>>>> if
>>>>>>>> (
>>>>>>>> ThisCh >= 'a' && ThisCh <= 'z'
>>>>>>>> ||
>>>>>>>> ThisCh >= 'A' && ThisCh <= 'Z'
>>>>>>>> ||
>>>>>>>> ThisCh >= '0' && ThisCh <= '9'
>>>>>>>> ||
>>>>>>>> ThisCh == '_'
>>>>>>>> ||
>>>>>>>> ThisCh == '-'
>>>>>>>> ||
>>>>>>>> ThisCh == '.'
>>>>>>>> )
>>>>>>>> {
>>>>>>>> Out.put(ThisCh);
>>>>>>>> }
>>>>>>>
>>>>>>> Ick.
>>>>>>
>>>>>> Many have said that, but none have come up with a better arrangement.
>>>>>
>>>>> bool isPrintable(int character) {
>>>>> return (isBetween(character, 'a', 'z') ||
>>>>> isBetween(character, 'A', 'Z') ||
>>>>> isBetween(character, '0', '9') ||
>>>>> (character == '_') ||
>>>>> (character == '-') ||
>>>>> (character == '.'));
>>>>> }
>>>>
>>>> And not only have you totally obscured the structure,
>>>
>>> On the contrary - I think it's much easier to follow, and also more
>>> reusable too.

>>
>> But how can it be reused if you can’t easily see what the structure is?

>
> The structure is very easy to see. What's not hard to see about:
>
> if (isPrintable(character))
> output(character);
>
> ??


That fact that “printability” has nothing to do with it. You have introduced
a misleading name into the code.
 
Reply With Quote
 
Carnations
Guest
Posts: n/a
 
      11-19-2009
On Thu, 19 Nov 2009 11:56:41 +1300, Lawrence D'Oliveiro wrote:

> In message <(E-Mail Removed)>, Carnations wrote:
>
>> Plain text (such as the ASCII standard) is about easily-usable
>> human-readable information.

>
> Not necessarily. It’s also good to use for computer-readable data
> formats as well.


While you can use text for computer-readable data (ie config files) there are other more efficient means
of storing machine-readable data and you only need ASCII if you need to store that data in a standard
interchangeable human-readable format.


--
"Filtering the Internet is like trying to boil the ocean"
 
Reply With Quote
 
Lawrence D'Oliveiro
Guest
Posts: n/a
 
      11-19-2009
In message <(E-Mail Removed)>, Carnations wrote:

> On Thu, 19 Nov 2009 11:56:41 +1300, Lawrence D'Oliveiro wrote:
>
>> In message <(E-Mail Removed)>, Carnations wrote:
>>
>>> Plain text (such as the ASCII standard) is about easily-usable
>>> human-readable information.

>>
>> Not necessarily. It’s also good to use for computer-readable data
>> formats as well.

>
> While you can use text for computer-readable data (ie config files) there
> are other more efficient means of storing machine-readable data ...


Look in the /etc directory on your Linux system, where all your system
config files are stored. Notice that most of them are human-readable text?
Why do you think that is?
 
Reply With Quote
 
Carnations
Guest
Posts: n/a
 
      11-20-2009
On Fri, 20 Nov 2009 09:25:13 +1300, Lawrence D'Oliveiro wrote:

> Look in the /etc directory on your Linux system, where all your system
> config files are stored. Notice that most of them are human-readable
> text? Why do you think that is?


So that humans can read them - so that they are human-readable.


--
"Filtering the Internet is like trying to boil the ocean"
 
Reply With Quote
 
Lawrence D'Oliveiro
Guest
Posts: n/a
 
      11-20-2009
In message <(E-Mail Removed)>, Carnations wrote:

> On Fri, 20 Nov 2009 09:25:13 +1300, Lawrence D'Oliveiro wrote:
>
> In message <(E-Mail Removed)>, Carnations wrote:
>
>> While you can use text for computer-readable data (ie config files) there
>> are other more efficient means of storing machine-readable data ...

>
>> Look in the /etc directory on your Linux system, where all your system
>> config files are stored. Notice that most of them are human-readable
>> text? Why do you think that is?

>
> So that humans can read them - so that they are human-readable.


That’s not the most important reason.
 
Reply With Quote
 
Carnations
Guest
Posts: n/a
 
      11-21-2009
On Sat, 21 Nov 2009 10:15:28 +1300, Lawrence D'Oliveiro wrote:

>>> Look in the /etc directory on your Linux system, where all your system
>>> config files are stored. Notice that most of them are human-readable
>>> text? Why do you think that is?

>>
>> So that humans can read them - so that they are human-readable.

>
> That’s not the most important reason.


Actually it is.

They are human readable so that humans can edit them with a plain text editor.


--
"Filtering the Internet is like trying to boil the ocean"
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
...lookingfor a decent avi editor... CheechWizard Computer Support 5 12-15-2005 04:57 PM
For the Linux folks : Decent video editing software. Mutley NZ Computing 8 06-02-2005 09:33 PM
Recommended decent XML editor? I kind of desperately need one. Mike Kamermans XML 7 08-17-2004 01:09 AM
ANN: New low-cost XML Editor, XSLT Editor, XSLT Debugger, DTD/Schema Editor Stylus Studio Java 0 08-03-2004 03:53 PM



Advertisments