Best unix programming language or tool for dealing with plaintext DBs?
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Unix and Linux reviews > Free Unix support > Unix Programming > Best unix programming language or tool for dealing with plaintext DBs?




Pages (3): [1] 2 3 »   Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    Best unix programming language or tool for dealing with plaintext DBs?  
casioculture@gmail.com


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
11-04-05 01:49 AM


What's the best unix programming language or tool for dealing with
simple plaintext databases.

It should be simple and easy, and should provide convenient handling of
fields and records.

So far I know that Awk does.






[ Post a follow-up to this message ]



    Re: Best unix programming language or tool for dealing with plaintext DBs?  
Pascal Bourguignon


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
11-04-05 01:49 AM

casioculture@gmail.com writes:
> What's the best unix programming language or tool for dealing with
> simple plaintext databases.
>
> It should be simple and easy, and should provide convenient handling of
> fields and records.
>
> So far I know that Awk does.

For my value of "best", it is Common Lisp.


--
__Pascal Bourguignon__                     http://www.informatimago.com/
The mighty hunter
Returns with gifts of plump birds,
Your foot just squashed one.





[ Post a follow-up to this message ]



    Re: Best unix programming language or tool for dealing with plaintext DBs?  
casioculture@gmail.com


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
11-04-05 07:49 AM


Pascal Bourguignon wrote:
> casioculture@gmail.com writes: 
>
> For my value of "best", it is Common Lisp.
>

Why lisp?

>
> --
> __Pascal Bourguignon__                     http://www.informatimago.com/
> The mighty hunter
> Returns with gifts of plump birds,
> Your foot just squashed one.






[ Post a follow-up to this message ]



    Re: Best unix programming language or tool for dealing with plaintext DBs?  
Pascal Bourguignon


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
11-04-05 07:49 AM

casioculture@gmail.com writes:

> Pascal Bourguignon wrote: 
>
> Why lisp?

Because it's a true programming language.
You don't have any limitation or any artificial quirk.

For example, dealing with one file in a filter mode with awk is all
raight.  But try to deal with two files with awk (eg. merge them), and
see what I mean.


(You might also consider scsh if you prefer scheme over Common Lisp).

--
__Pascal Bourguignon__                     http://www.informatimago.com/
The mighty hunter
Returns with gifts of plump birds,
Your foot just squashed one.





[ Post a follow-up to this message ]



    Re: Best unix programming language or tool for dealing with plaintext DBs?  
icub3d


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
11-04-05 10:57 PM

In the end, It all depends on what programs or languages you are
familiar with.  For me, If this was a program I would be using on a
regular basis for a long duration, I would write a small C program to
deal with it.

If on the otherhand, this was a small problem that I would only use
once or twice, then PERL or php would probably be ok.

Factor in your time (both programming and times you will run the
program) as well as the computers time and make a decision.






[ Post a follow-up to this message ]



    Re: Best unix programming language or tool for dealing with plaintext DBs?  
casioculture@gmail.com


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
11-04-05 10:57 PM


M=E5ns Rullg=E5rd wrote:
> Pascal Bourguignon <spam@mouse-potato.com> writes:
> 
g of[vbcol=seagreen] 
>
> PERL might be a reasonable choice, too.
>
> --
> M=E5ns Rullg=E5rd
> mru@inprovide.com

Would you guys suggest I learn PERL before lisp, or lisp before perl?






[ Post a follow-up to this message ]



    Re: Best unix programming language or tool for dealing with plaintext DBs?  
casioculture@gmail.com


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
11-04-05 10:57 PM


M=E5ns Rullg=E5rd wrote:
> 
>
> "LISP is worth learning for the profound enlightenment experience you
> will have when you finally get it; that experience will make you a
> better programmer for the rest of your days."  -- Eric S. Raymond
>
> You'll probably find it easier coming to terms with Perl.
>

I'm so sorry, I'm a little thick today, does this mean that learning
perl first would be easier, or that learning lisp first would make it
easier for me to come to terms with PERL when i later learn it?






[ Post a follow-up to this message ]



    Re: Best unix programming language or tool for dealing with plaintext DBs?  
joe@invalid.address


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
11-04-05 10:57 PM

casioculture@gmail.com writes:

> Måns Rullgård wrote: 
>
> I'm so sorry, I'm a little thick today, does this mean that learning
> PERL first would be easier, or that learning lisp first would make
> it easier for me to come to terms with PERL when i later learn it?

Forget about lisp for something like this. This kind of thing is what
perl was made for.

Joe
--
Gort, klatu barada nikto





[ Post a follow-up to this message ]



    Re: Best unix programming language or tool for dealing with plaintext DBs?  
Pascal Bourguignon


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
11-04-05 10:57 PM

joe@invalid.address writes:

> casioculture@gmail.com writes:
> 
>
> Forget about lisp for something like this. This kind of thing is what
> PERL was made for.

perl is unreadable and unwritable.  At least, with APL it was
unreadable, but you could write it...

Lisp is readable and writable.

YMMV.

--
__Pascal Bourguignon__                     http://www.informatimago.com/
You're always typing.
Well, let's see you ignore my
sitting on your hands.





[ Post a follow-up to this message ]



    Re: Best unix programming language or tool for dealing with plaintext DBs?  
casioculture@gmail.com


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
11-04-05 10:57 PM


Pascal Bourguignon wrote:
> joe@invalid.address writes:
> 
>
> PERL is unreadable and unwritable.  At least, with APL it was
> unreadable, but you could write it...
>
> Lisp is readable and writable.
>
> YMMV.
>
> --
> __Pascal Bourguignon__                     http://www.informatimago.com/
> You're always typing.
> Well, let's see you ignore my
> sitting on your hands.

I plan to learn both perl, php, and ruby, and also lisp, scheme, guile
and python, just in time; my current self-taught computing curriculum
is for a decade. You see, I'm really impressed with awk's simplicity at
handling textual databases.

For example

Looking at this page
http://stud.wsi.edu.pl/~robert/awk/tutorial_4a.html

BEGINQUOTE

For example, if we have list of second-hand car prices like this...

ford	 mondeo	 1990	5800
ford	 fiesta	 1991	4575
honda	 accord	 1991	6000
toyota	 tercel	 1992	6500
vaxhaull astra	 1990	5950
vaxhaull carlton 1991   6450

=2E..we might want to select all the cars which were made after or
during 1991 (column 3) and cost less than 6,250 pounds (column 4). We
can do this with the following awk code:

awk '$3 >=3D1991 && $4 < 6250' cars

ENDQUOTE

How would PERL and lisp deal with this same textfile containing this
same list of second-hand car prices to do the same exact query as the
above? How would other languages do it that would be best for this
purpose?






[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 03:07 PM.      Post New Thread    Post A Reply      
Pages (3): [1] 2 3 »   Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register