Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 7 years ago.
Improve this question
I've been developing a highly modified version of Lua (including a rewrite of the sources to keep a better maintainability). Right now i'm at a point where I would consider forking Lua, and possibly re-release it under a different name (so people don't mistake it as the original Lua interpreter).
Of course the resulting Interpreter and compiler will be Opensource (MIT License, just as Lua5.0). but I wonder if that would be just fine with the Lua license? Can I use the Lua sources to continue my own work? do I have to keep the copyright notes?
My first suggestion would be to send an email to the Lua folks. I'm 99,9% sure you won't have any problem.
Now that I think about it, another guy create a language called "Idle" which, if I remember well, is heavily based on Lua.
As long as you properly show the due credits and fairly represent the differences with Lua, I'm sure you'll be fine.
The 'polite' thing to do is to use a different name and clearly credit on your documentation; stating that it's based on Lua but not 'official' Lua. AFAIK, the licence doesn't legally require even that; but it's what you're expected to do.
Remo.D mentioned the Idle case; personally, i don't like the attitude of "this fixes the problems with Lua" that i kinda read on Idle's webpage and his messages to the Lua list; but it's widely recognized that he's doing the right thing: a different name and openly showing credits.
If you want to be really popular in the Lua community; you could try to release your code not as a fork of Lua; but as a set of patches to the core. It's more work, I'm sure; but it has a much higher chance of being used by more people; and maybe (big maybe) some ideas could eventually be integrated in the core.
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I'm a student learning C programming (at the moment).
In the subject I was given, I have to create some kind of Wolfenstein3d clone (hence the name of the project, "wolf3d"). To do this project, I'm allowed to use either the graphic library created by my school, or the SDL. I chose the SDL, because it is more complex to use and therefore more interesting.
Unfortunately, I was not able to find any tutorial for SDL2 in C. Even the SDL wiki links were all oriented C++.
I'd be grateful if you could help me finding good tutorials for the SDL2 in C (even though I know the policy of the website is "use a search engine, which I did, but as I said, I did not find any so far).
I think I might need to explain a few things about my school, in order to not give you the impression I'm asking you for help in order to cheat:
Why don't you look in your class notes?
Because I'm not given any. I'm given projects to do and sometimes few hints as how I should do them. I'm supposed to use Google or any means as long as I understand what I did.
And that's pretty much it. I'm also not looking for a tutorial on "how to create a wolfenstein3d clone using SDL2.0", but only a tutorial on how to use the SDL2 itself, from creating a window to drawing points.
If I were you I would use the tutorials available on SDL's page here:
http://wiki.libsdl.org/Tutorials
In conjunction with the API documentation here:
http://wiki.libsdl.org/APIByCategory
The API is written in C so despite the fact that the tutorials may be in C++ you should be able to follow the tutorial by referencing the API docs and understanding the functional structure of the example programs.
As an aspiring developer you should be able to understand enough of the C++ syntax to understand the conceptual way you need to develop an analogous application in C. The API calls will be need to made in the same way.
Consider this page from one of the linked tutorials (which is stated as being for C++):
http://lazyfoo.net/tutorials/SDL/01_hello_SDL/index2.php
Are any of those code blocks really foreign to you? They shouldn't be, they're written in C. If you come across some expressions you are unfamiliar with as you go through the tutorial, reference the API. If you're still stumped, then maybe it would be time to post on StackOverflow. That particular tutorial may be written completely in C, I'm not sure I only went through the first few pages.
Also note that the function documentation in the SDL API docs gives C and C++ example code:
http://wiki.libsdl.org/SDL_Init
Here you can cross reference two identical programs in C and C++ and begin to learn how the same operations are performed in the two languages. From there you can start to interpret C++ tutorials for high level functional operations and translate that to C as opposed to just copying code samples. You will learn much more going through this process.
To your own admission you decided to go the complex route. You should be prepared to invest some effort in the process!
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I have been developing for Windows for a long time, mainly WinApi (and .Net).
I'v started learning basic Linux, and I have some questions regarding the differences:
In Windows I have barely used the C Standard library.
If I needed an API, I would search MSDN and find the appropriate library\function.
From what it seems like, in Linux the C Standard library is EVERYTHING.
All the code samples I have seen used the standard library (Instead of using some Linux internal functions, like a Linux "CreateFile").
Is this really how writing "proper" linux code is done ? Using the C standard library ?
If I wish to read a file, or allocate memory are fopen\malloc the way to go ?
If the answer to my first question is yes (And I guess it will be)
The C standard library is POWERLESS compared to the powerful WinApi.
Lets say I wish to get a list of running process (CreateToolhelp32Snapshot) or create a thread or a process (CreateThread\CreateProcess), How should I do that in Linux ?
Documentation.
In Windows, all I need can be found in MSDN.
If I have a "how do I do" question (Like the questions above) where should I go ?
Where is my main source of documentation.
Thanks a lot,
Michael.
Perhaps you've forgotten that the Standard C Library isn't environment-specific, it specifies least-common-denominator functionality among all systems that can run C programs, and C runs on systems that don't even have processes.
If you want an API that provides consistent common GUI/multithread/etc. APIs, pick a likely-looking GUI/multithread/etc. API. You might start with Qt, it's quite comprehensive and produces good-looking, near-native UIs on a host of systems.
It's not generally considered polite to point this out, but most questions that get asked publicly are asked by people who lack the discipline to do even simple research. Once people can do that, they don't need to ask very many, and that's why what you see is so ... trivial. You're past that. For more options, you could start here.
For more general-purpose tools, the top hit on a search for important linux tools might be helpful.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
I am searching for a month for blog posts about "how C program works". Most of them go like
Compilers do these things
Linkers do these things
Program is put into memory; and stacks, heaps, etc.
I thought I would first read about how compiler works to understand the flow of the program into the machine. Dragon Book seems to be universally preferred. But truthfully, it's too intensive. I am not good enough now to go through it all.
So I began to read about hardware. But There too, they explain about buses, I/O signals, structure of memory, writing cache-friendly code etc. But with no proper examples.
But still I could not find myself satisfied or being able to completely visualize the process.
2 hours ago I decided to ask this question.(Since I am scared of It might be not useful to SO community, or off-topic question or other down-votable categories) and I did not find out any post relating to this exactly. There was one about "how compiler does the compilation", but the answers showed that it's too broad a question.
My question is this:
I would like to know how, in depth, a C program works. If you cannot tell me explicitly, please redirect me to a book or another post on another website that can give me the answer to this.
I am here until I get a response. If you have any suggestions regarding this post, tell me. And It is not my first language, so please take all my sentences as being soft and polite.
Thanks.
UPDATE:
Along with the accepted answer, there are some very nice links as well as suggestions which give partial answers or the way to proceed further to understanding what I am trying to understand.
The best answer to this question by far comes from the book "The Elements of Computing Systems," by Noam Nisan and Shimon Schocken. This book starts from the simplest possible electronic components, assembles them into a working processor, invents a simple assembly language for it, writes an assembler for that, and ultimately shows you how high-level languages can be compiled onto it. Reading the book, and working all the examples (which use a simulator for the hardware, so no workshop required!), will forever change the way you look at computers; he will literally understand everything from the lowest to the highest levels, and see how they work together. See the book's website for more info.
It's too broad a question (as you have observed).
If you really want to understand from bottom up - buy an OLD computer from the 80's off ebay. Sinclair Spectrum/BBC it really doesn't matter but make sure you get plenty of books and manuals that go with it.
You will learn plenty because these machines were well documented and what wasn't documented was discovered and then documented :)
They are also sooooo much simpler than a modern quad core multi-gigabyte memory job. It will all fit inside your head easily
or for a modern start, Arduino or Raspberry pie maybe.
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 11 years ago.
Improve this question
I recently updated my rusty C skills, and I've been trying to find a project to try them out on, so I picked kernel development (after all, C is a systems language). So, I was wondering which would be easier to start out with, Linux or one of the BSDs? Linux has a larger userbase (so I would probably have more support), but it also has a humongous codebase (9 million lines last time I checked), would the BSDs be easier to start out with because they combine the userbase and kernel into one large codebase? Also, is it best to just start reading the kernel source code? And, are they trying to implement new features aside from SMP and new drivers?
Unfortunately, I can only speak of Linux kernel hacking for myself. Currently I'm in an internship where I am working on a kernel, and I never did this before. But I was able to learn a lot of stuff in a quite short time, due to several reasons (again, I want to point out that I don't know how much of this is covered withint he BSD community):
Tutorials. The Linux Community is quite big and therefore you will find a lot of beginners information on kernel hacking. I feel like the standard to begin with was this guide. If you read it you will see, that even kernel hacking starts with hello world ;)
Linux Cross Reference. A great tool. It covers the complete Vanilla source code and shows you where each function/struct/define/whatever was defined and implemented, so no long searching for some stuff
The modular build of linux (I assume the same goes for BSD) Clearly you won't be able to look through 9 mio lines of code. But you can start easy with a little loadable kernel module and then go deeper. Maybe look at other modules first, hack them, and finally dig into the directly compiled stuff
The sheer community size. Not only kernel mailing lists, but also a huge number of forums or Q&A sites like this one where you can be sure to get help if you don't know what to do ;)
Just my 2 cents ;)
I am using and developing for Linux for many years, but am lacking any real experience with BSD to recommend either way.
You sound lacking experience for kernel hacking. Just reading kernel source might be insightful, but won't really teach you much. There is a lot going on in Linux kernel besides drivers. For example, latest 2.6.38 was focused on desktop responsiveness. DRM stack is ever changing and could use more man power.
I'd suggest start easy, small fixes for beta drivers, etc.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
What small open source projects in C are interesting for learning good design?
The project should be:
Not too large (like the linux kernel)
Well documented
Perhaps still under active development
I've just started learning C, and while the language itself is not too difficult, i'm struggling how to design larger applications, so i thought checking out other open source projects would be a good starting point.
Thanks!
Redis (nosql db) is:
under active development
a manageable size
portable and robust
has no external dependancies
very well written, understandable code
In my opinion, good examples of moderately sized projects written in C are:
GNU Scientific Library (besides the source code, don't miss their design document)
Kazlib
Git
Posix threads are a perfect example of good C design
I like gnucash: http://www.gnucash.org/
No too large like Linux kernel, but still big I think.
You can start learning from small and well structured applications like http://abygaelle.guillaume-fr.net/trac/gemmes
It all depends what kind of projects you are interested in. And what aspect of it (specific algorithms, UI, networking, etc, etc...)
Head over to freshmeat, sourceforge or ohloh and browse the projects for your area of interest.
Alternatively if you want to look at projects that were chosen for a particular reason google summer of code might be interesting for you - even though these rarely include full projects.
EDIT:
Also alternatively, you might take something like linux kernel, but instead of trying to understand everything try to
get the big picture
then concentrate on one tiny piece of it and inspect how the code changed over time (and for what reasons - it should be quite well documented)