ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Distribution: Ubuntu n' Flavors, ReactOS, MINIX3, FreeDOS, Arch
Posts: 339
Rep:
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)
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.
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
Great Binary file io;
Define "Great".
Quote:
Originally Posted by Zssfssz
fast (optional)
Define "fast".
Quote:
Originally Posted by Zssfssz
an has a variable for storing this kind of stuff
Define "kind of stuff".
Quote:
Originally Posted by Zssfssz
Fast Data processing;
Define "data processing". As far as I know ALL programs process data.
Quote:
Originally Posted by Zssfssz
Can get user imput easy (theres a reason I said 'compiled')
Define "easy".
Quote:
Originally Posted by Zssfssz
Has conditional statements (^)
Any language.
Quote:
Originally Posted by Zssfssz
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
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
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.
Distribution: Ubuntu n' Flavors, ReactOS, MINIX3, FreeDOS, Arch
Posts: 339
Original Poster
Rep:
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.
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.
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.
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.
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?
Distribution: Ubuntu n' Flavors, ReactOS, MINIX3, FreeDOS, Arch
Posts: 339
Original Poster
Rep:
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.
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.
Distribution: Ubuntu n' Flavors, ReactOS, MINIX3, FreeDOS, Arch
Posts: 339
Original Poster
Rep:
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.