LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 11-03-2011, 11:27 PM   #1
Zssfssz
Member
 
Registered: Sep 2011
Location: Las Vegas!
Distribution: Ubuntu n' Flavors, ReactOS, MINIX3, FreeDOS, Arch
Posts: 339

Rep: Reputation: Disabled
Post Best Compiled Languige For File IO


I am in need of a programing language that has these characteristics:
Great text file io; Can read whole lines easy or you can speciphy which line to read from
Great Binary file io; fast (optional) an has a variable for storing this kind of stuff
Fast Data processing; Mainly in the basic Logic Gates
Doesn't need to be portable (I hate java)
Can get user imput easy (theres a reason I said 'compiled')
Has conditional statements (^)
Not assembly (it's a pain
Does not compile into a intermediate language (eg javas bytecode or a scripting language)
NOT JAVA
Not Made by Sun
Not bought by oracle
Not C#
Not a rip off of java made by microsoft
C and C++ arnt one of these (as in they don't have one of the needed charicrteristics)
Well I need this soon so... Thanks (answer the question or else that means nothing to you)

Last edited by Zssfssz; 11-03-2011 at 11:29 PM.
 
Old 11-04-2011, 04:42 AM   #2
pgpython
Member
 
Registered: Dec 2005
Location: Sheffield, UK
Distribution: Gentoo
Posts: 142

Rep: Reputation: 32
I find your requirements somewhat strange. First of all I can't think of any language which doesn't have any conditional statements. It would be pretty useless if it didn't. Even SQL has conditional statements and that has a restricted domain.

Secondly you are severely under estimated the power of scripted languages. In terms of ease of use and development time. Scripted languages are the best at doing that. You have all the power of a compiled language expressed in a few lines. If you want to develop something quick and easy ditch the compiled language go for scripted.

The are only 3 areas I can think of where a scripted language would most likely short. The first is speed. Scripted languages allow you to express more at the expense of added overhead (consume more memory, slower). However that is a relative decision because they are fast enough to do 99% of problems and memory isn't really a concern with modern computers I would say. second compiled languages tend to do multi threaded applications better. If that is your concern then stick to a compiled language. Third is embedded systems due to point 1.

Java is not one of my favourite languages I have to admit but it could be argued it is a good compromise between a compiled and scripted language. For that reason don't throw it out because of some petty dislike. If you don't want to use sun java. well there are plenty of other people who produce java including the GCC java.


C is the fastest language. The only thing that beats C in speed is well designed and optimised assembly and I wouldn't recommend assembly but again it is relative because a language which is slower would be better if it allowed you to express more in fewer languages because its fast enough that you wouldn't notice the difference between them. On that basis either C or C++ might be valid or not valid.

If having considered all of the above you still feel none of them above are suitable for whatever reason which you haven't ruled out yet is Objective C.
 
2 members found this post helpful.
Old 11-04-2011, 06:35 AM   #3
RockDoctor
Senior Member
 
Registered: Nov 2003
Location: Minnesota, US
Distribution: Fedora, Ubuntu, Manjaro
Posts: 1,791

Rep: Reputation: 427Reputation: 427Reputation: 427Reputation: 427Reputation: 427
I recommend APL
 
Old 11-04-2011, 08:31 AM   #4
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 11,225

Rep: Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320
Quote:
Can get user imput easy (theres a reason I said 'compiled')
Wow. That makes no sense at all.

Anyway, almost all languages can do the following:
Quote:
Can read whole lines easy or you can speciphy which line to read from
Reading whole lines is part of the standard library; reading specific lines is done by reading the whole file and ignoring the lines you don't need.

Last edited by dugan; 11-04-2011 at 08:43 AM.
 
Old 11-04-2011, 08:53 AM   #5
SigTerm
Member
 
Registered: Dec 2009
Distribution: Slackware 12.2
Posts: 379

Rep: Reputation: 234Reputation: 234Reputation: 234
Thumbs down

Quote:
Originally Posted by Zssfssz View Post
Great text file io;
Define "great".

Quote:
Originally Posted by Zssfssz View Post
Can read whole lines easy
Any language.

Quote:
Originally Posted by Zssfssz View Post
or you can speciphy which line to read from
Text file is stream of data. It has no line number information. However, you can load entire file into memory and get line you want. And this can be done in any language.

Quote:
Originally Posted by Zssfssz View Post
Great Binary file io;
Define "Great".

Quote:
Originally Posted by Zssfssz View Post
fast (optional)
Define "fast".

Quote:
Originally Posted by Zssfssz View Post
an has a variable for storing this kind of stuff
Define "kind of stuff".

Quote:
Originally Posted by Zssfssz View Post
Fast Data processing;
Define "data processing". As far as I know ALL programs process data.

Quote:
Originally Posted by Zssfssz View Post
Can get user imput easy (theres a reason I said 'compiled')
Define "easy".

Quote:
Originally Posted by Zssfssz View Post
Has conditional statements (^)
Any language.

Quote:
Originally Posted by Zssfssz View Post
C and C++ arnt one of these (as in they don't have one of the needed charicrteristics)
Really? Guess you didn't even try to do some research.

Quote:
Originally Posted by Zssfssz View Post
Well I need this soon so... Thanks (answer the question or else that means nothing to you)
You're wasting your time and approach problem incorrectly. Grab any language you know and do the task you need to do. Searching for "the best language" is a bad idea. "The best is the enemy of the good". Which means you'll either have to waste next 5 months trying to find "the best language" (with no success) or you could finish the task tomorrow using any available language you already know.

Quote:
Originally Posted by pgpython View Post
C is the fastest language.
As far as I know, if programmer is an idiot, any language will be slow. Language alone does not make your program faster.

Last edited by SigTerm; 11-04-2011 at 08:57 AM.
 
Old 11-04-2011, 09:12 AM   #6
Zssfssz
Member
 
Registered: Sep 2011
Location: Las Vegas!
Distribution: Ubuntu n' Flavors, ReactOS, MINIX3, FreeDOS, Arch
Posts: 339

Original Poster
Rep: Reputation: Disabled
For all the defines thats Usualy what's right after it in the semicolon( there's a level of mild sucurity I need with the program it's self and scripting languages can't do thet. My 'native' (in my terms as current) language is C and C++ with a sprikle of D, I do know assembly but as I said it's a pain. What C and C++ didn't meet was a cretin 'new' factor. The point of this was for me to learn something new, I do have mild experience with other languages than these but those are my favs. Fortran mAY be good for this but I hold it as a bit difficult to work with. I can't tell you how many times I've been pointed to Java, I know it and it's 'Creamy' syntax is rather annoying. I love python and perl if python can't do it but this needs to be compiled. This is mainly for me to expand into the reason I learned programing: File IO (My first language was JavaScript and I got ver annoyed that itcouldnt save a file). I just wanted to know if there was a language geared tworeds this, like perl is made tO have a workaround to every problem (but compiling it). If not I will stay in the kingdom of C and C++ for now.

Last edited by Zssfssz; 11-04-2011 at 09:21 AM.
 
0 members found this post helpful.
Old 11-04-2011, 03:21 PM   #7
Sergei Steshenko
Senior Member
 
Registered: May 2005
Posts: 4,481

Rep: Reputation: 454Reputation: 454Reputation: 454Reputation: 454Reputation: 454
Quote:
Originally Posted by Zssfssz View Post
For all the defines thats Usualy what's right after it in the semicolon( there's a level of mild sucurity I need with the program it's self and scripting languages can't do thet. My 'native' (in my terms as current) language is C and C++ with a sprikle of D, I do know assembly but as I said it's a pain. What C and C++ didn't meet was a cretin 'new' factor. The point of this was for me to learn something new, I do have mild experience with other languages than these but those are my favs. Fortran mAY be good for this but I hold it as a bit difficult to work with. I can't tell you how many times I've been pointed to Java, I know it and it's 'Creamy' syntax is rather annoying. I love python and perl if python can't do it but this needs to be compiled. This is mainly for me to expand into the reason I learned programing: File IO (My first language was JavaScript and I got ver annoyed that itcouldnt save a file). I just wanted to know if there was a language geared tworeds this, like perl is made tO have a workaround to every problem (but compiling it). If not I will stay in the kingdom of C and C++ for now.
So, what's wrong with Perl then ? I.e. what's wrong with security, for example ? I still don't get why the language needs to be compiled. FWIW, even a standard dynamically linked Linux executable undergoes some interpretation by ld.so prior to really being executed.
 
Old 11-04-2011, 03:53 PM   #8
SigTerm
Member
 
Registered: Dec 2009
Distribution: Slackware 12.2
Posts: 379

Rep: Reputation: 234Reputation: 234Reputation: 234
Quote:
Originally Posted by Zssfssz View Post
there's a level of mild sucurity I need with the program it's self and scripting languages can't do thet.
Do you honestly think that compiled language provide security? Switching to compiled language won't automatically improve anything. Any program can be disassembled, and its algorithm restored. It is especially easy to do if your program uses a lot of system calls.
 
Old 11-04-2011, 06:09 PM   #9
Zssfssz
Member
 
Registered: Sep 2011
Location: Las Vegas!
Distribution: Ubuntu n' Flavors, ReactOS, MINIX3, FreeDOS, Arch
Posts: 339

Original Poster
Rep: Reputation: Disabled
I said 'mild'. Someone could just use a text editor on a scripted one while on a compiled one they would need to download something first.
 
Old 11-04-2011, 07:07 PM   #10
Sergei Steshenko
Senior Member
 
Registered: May 2005
Posts: 4,481

Rep: Reputation: 454Reputation: 454Reputation: 454Reputation: 454Reputation: 454
Quote:
Originally Posted by Zssfssz View Post
I said 'mild'. Someone could just use a text editor on a scripted one ...
So what ? What security are you talking about ? E.g. I was lead integrator of a project involving about 25 engineers, and they could see all the code I wrote (and I could see their code), and a lot of code was in Perl, and they simply did not have write permission to my code.

But if necessary they could copy the whole project tree and make local changes - it wasn't forbidden.
 
1 members found this post helpful.
Old 11-04-2011, 07:15 PM   #11
SigTerm
Member
 
Registered: Dec 2009
Distribution: Slackware 12.2
Posts: 379

Rep: Reputation: 234Reputation: 234Reputation: 234
Quote:
Originally Posted by Zssfssz View Post
I said 'mild'. Someone could just use a text editor on a scripted one while on a compiled one they would need to download something first.
Or somebody could use disassembler on your compiled program, and time required to get disassembler wouldn't make much of a difference (we aren't in dial-up era anymore, you know). If user has read access to the program binary, he/she can reverse-engineer it, and there's nothing you can do about it.

Would you "kindly" explain what kind of security you're talking about?
 
Old 11-04-2011, 09:07 PM   #12
Zssfssz
Member
 
Registered: Sep 2011
Location: Las Vegas!
Distribution: Ubuntu n' Flavors, ReactOS, MINIX3, FreeDOS, Arch
Posts: 339

Original Poster
Rep: Reputation: Disabled
If my grandma could find the souce with command prompt, it's not good enough. Useing edit on a scripting language is much more likely than her ever downloading anything. And yes she uses windows.
 
0 members found this post helpful.
Old 11-04-2011, 09:58 PM   #13
SigTerm
Member
 
Registered: Dec 2009
Distribution: Slackware 12.2
Posts: 379

Rep: Reputation: 234Reputation: 234Reputation: 234
Thumbs down

Quote:
Originally Posted by Zssfssz View Post
If my grandma could find the souce with command prompt, it's not good enough. Useing edit on a scripting language is much more likely than her ever downloading anything. And yes she uses windows.
Okay, I get it. You're afraid that somebody will reverse-engineer the program, and don't understand that when software is somewhat big and complicated, it doesn't matter whether it is script or compiled - you'll need to spend some time to actually understand it.

Solution #1:
Put software onto web server, communicate with it via HTML/PHP frontend and never install it anywhere. As long as server is secure, nobody will be able to read the source, since it is not available. I do not know any other way to protect your program from being reverse-engineered. Any other protection can be bypassed.

Solution #2:
Forget about that idea, and concentrate on making good bug-free program instead.


If you're actually afraid that user will break your program accidentally, then install it in read-only mode for normal users, and allow only system administrator (root) to modify the script. Of course, it won't help you if user works under admin account, but you can't do anything about it - administrator's account (root) is in "god mode" by definition and can do anything.

Last edited by SigTerm; 11-04-2011 at 09:59 PM.
 
Old 11-04-2011, 10:58 PM   #14
Zssfssz
Member
 
Registered: Sep 2011
Location: Las Vegas!
Distribution: Ubuntu n' Flavors, ReactOS, MINIX3, FreeDOS, Arch
Posts: 339

Original Poster
Rep: Reputation: Disabled
Ok..,.... Now ignoring the 'compiled' part of the question what is your answer?
BTW: My grandma is horrible at the computer, I dought she could even gat to command prompt, let alone get to edit.

Last edited by Zssfssz; 11-04-2011 at 11:01 PM.
 
Old 11-05-2011, 06:27 AM   #15
Sergei Steshenko
Senior Member
 
Registered: May 2005
Posts: 4,481

Rep: Reputation: 454Reputation: 454Reputation: 454Reputation: 454Reputation: 454
Quote:
Originally Posted by Zssfssz View Post
Ok..,.... Now ignoring the 'compiled' part of the question what is your answer?
BTW: My grandma is horrible at the computer, I dought she could even gat to command prompt, let alone get to edit.
I still don't understand how security in the context of computer software is related to source availability.
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Looking for file that holds the modules to be compiled with mkinitrd blittrell SUSE / openSUSE 3 07-13-2010 04:32 PM
kernel not mounting file system when compiled kamalsivadas Linux - Kernel 2 11-23-2009 10:42 AM
Compiled HTML Help file simasimon Linux - Software 2 12-06-2007 01:43 AM
Seeking compiled RTL8139.O file Moosey Linux - Networking 2 12-31-2006 11:02 AM
how to run compiled C file. cdmn Linux - Newbie 2 09-05-2004 07:24 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 01:04 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration