Let's start doing our own code golf?

edited May 2017 in Programming
In case you don't know what this is- essentially it is challenging one another to write a program that performs the exact same functions and follows any specified guidelines with as few lines/characters as possible. The shorter it is written the better hence "golf". We can maybe just insert a [golf] tag in the subject whenever creating a new challenge. Though I think we should also specify the language that is allowed/to be used for that challenge. We should have a poll started but we should nominate some languages (2-3 per person) first so we can have a few relevant ones to vote from.

Since majority of this community is kind of more focused with win 95/98/2000 (I don't know about the win 3.x and others), we should focus on a language that empowers or makes the best usage of our system which may be outdated in today's technology.

I don't really see a lot of people posting on this side of the forums so maybe now is a good time for inexperienced programmers like myself to try to participate here and make it more lively. It can be fun and we can help each other out. And with all those ebooks out there I don't see how we can't make anything out of this. Any interests? We can maintain a list of active users and keep score of how active they are. 1 significant contribution/sign of effort per week would suffice to keep this interesting.
It's not that hard. I don't care if you need IRC to stay interested. What you say?? :D

Comments

  • casual x86 assembly/C here
  • I'm certainly interested, but we should specify what OS (from this site) we're targeting. That way, anyone can participate and the judges only need to set up one VM per contest. For added challenge, choose OSes that most people have not used before (like AT&T System V Unix or OS/2).
  • First off I love the idea, I would actually be very interested in this if it used with modern compilers. Like if it didn't have to be with the over all theme of the entire site, which I think was the purpose in mind when this sub form was created.

    2nd off, doing it on an ancient OS just sound fucking painful. As a C++ hobbyist programmer I would come to the believe that coding for an ancient OS will be very difficult as well as painful. Who will provide us the compilers for these Outated systems? I know OS/2 you can get away with, but Unix SVRV your out of your mind. I rather call Solaris a developing environment or dos for that matter than deal with the sicken package management of a UNIX SVRV. I don't mean to bomb your idea, but I will not participate in programing for an OS that old.
  • Windows 3.1 is blissfully simple to program for, no bells and whistles and very WYSIWYG.
  • This sounds like a nice challenge, but the oldest I'd be willing to go would have to be Windows 2000 - Don't get me wrong, I love Windows 95 and 98SE, but writing programs for them is just a pain in the neck at this point, since the only real compiler I've ever found to work (even a little) was Visual Studio 6.0 Enterprise.

    I personally only know Batch, C++, and a little bit of Java and Python 2.4. I can program in G-code and HTML as well, despite them not quite being "Real" programming languages.

    I'm up for learning other languages, but not up for oldschool memory management and exception handling.

    This sounds like a fun challenge to me despite the above nitpicking, where do I sign up?

    P.S. Can't log in from home, so it'll all have to be done on an old netbook at a local library... This ought to be fun.
  • birdy wrote:
    First off I love the idea, I would actually be very interested in this if it used with modern compilers. Like if it didn't have to be with the over all theme of the entire site, which I think was the purpose in mind when this sub form was created.

    2nd off, doing it on an ancient OS just sound fucking painful. As a C++ hobbyist programmer I would come to the believe that coding for an ancient OS will be very difficult as well as painful. Who will provide us the compilers for these Outated systems? I know OS/2 you can get away with, but Unix SVRV your out of your mind. I rather call Solaris a developing environment or dos for that matter than deal with the sicken package management of a UNIX SVRV. I don't mean to bomb your idea, but I will not participate in programing for an OS that old.
    I know what you mean... I've coded a little bit using c++ on 98SE like a year ago and my experience for it was.. You had to refer to old materials due to various methods for using functions and such being superseded over time. Personally I thought it wasn't that bad but depending on what you're trying to accomplish it can be a headache? Like someone from your background would have a little more trouble navigating the obsolete methods when you are more familiar with modern ones. Mainly what I'm concerned with is how can we accommodate everybody's needs such as yours but still able to bear fruit i.e. anyone can use that code/program on their own system. I suppose we can always just refer to the source code that is being posted and if desired the person who has a different OS/language could always try to port it themselves. One idea I have is posting in this sort of format:
    • Language
    • Compiler used (i.e. name and version)
    • Source code with number of characters commented on top
    • OS
    • URL to video clip unless it can be posted here that shows the code on screen, you compiling it, and it doing exactly as the challenge specifies. That can be the "proof".

    With each challenge we can simply allow people to post in whatever language/compiler/os they wish as a way to appreciate everyone. Just like you, I am sure there are plenty of people who don't want to use a certain OS or language which is really fine (I only want to stick to 98SE right now myself). Don't you think so? The challenge instead isn't necessarily:
    directed at us towards each other
    but instead:
    at us towards ourselves
    and what we can do to improve. Those of us that are happening to be using the same or similar configuration can learn from each other while with the rest of it can be more of a reference to finding a better solution for yourself.
    PCAT wrote:
    This sounds like a nice challenge, but the oldest I'd be willing to go would have to be Windows 2000 - Don't get me wrong, I love Windows 95 and 98SE, but writing programs for them is just a pain in the neck at this point, since the only real compiler I've ever found to work (even a little) was Visual Studio 6.0 Enterprise.

    I personally only know Batch, C++, and a little bit of Java and Python 2.4. I can program in G-code and HTML as well, despite them not quite being "Real" programming languages.

    I'm up for learning other languages, but not up for oldschool memory management and exception handling.

    This sounds like a fun challenge to me despite the above nitpicking, where do I sign up?

    P.S. Can't log in from home, so it'll all have to be done on an old netbook at a local library... This ought to be fun.
    Like I mentioned in the previous quote I think we can all try to just post together regardless of language/OS/whatever (kinda sounds like race lol).

    Let's get more input. What do you guys (and any others) think so far? Can we make this work i.e. not having to stick to one specific thing other than on the goal of the instructions given?
    Looking ahead, if this turns out to be a fun little getaway that has frequent participation, I would love to brainstorm into more automated/simpler methods of sharing our work together. Also let me here any suggestions/improvements on anything mentioned so far especially with how to format submissions if you think there's a better or more preferred way :cheese:
  • The only reason why I commented in this way was because of the libraries. Some libraries are not available in older compilers. I will bite my own words and say that it will be interesting to learn an older language for an older machine, such as Fortran or assembly. You can do what ever you want, I will not stop you. I will actually love to be apart of it. As well as the interesting experience that follows to the discussion of new and better ways to make/create programs.
  • birdy wrote:
    The only reason why I commented in this way was because of the libraries. Some libraries are not available in older compilers. I will bite my own words and say that it will be interesting to learn an older language for an older machine, such as Fortran or assembly. You can do what ever you want, I will not stop you. I will actually love to be apart of it. As well as the interesting experience that follows to the discussion of new and better ways to make/create programs.
    I see your point.. so I was wondering about these limitations with older compilers and what we can maybe do to "extend their life" if that makes any sense or making later compilers compatible with our selected OS which I am not saying would be easy but to consider in the future. I should post back in a day or 2 because I will be playing with some javascript that would make collecting/organizing information for this thread more fun.

    In the meantime why not list your preferences? I am going to focus on visual BASIC mainly due to having materials available to me for it already. Assembly probably would be second or third. Python if the compilers are good enough also with some materials.
  • Older compilers sometimes don't have certain libraries that current or more modern compilers have access to now. For example when I was trying to compile my water.cpp program on an older version of windows using Borderland C++ 5.02 it didn't have unistd.h library. Which included the functions sleep() and usleep(). I had to go and look up an equivalent which led me to windows.h, which had an exact copy of sleep in unistd.h but spelled: Sleep().

    Some of the programing languages that I would be interested in is:
    C/C++ or C# (might be fun learning the differences of C++ vs M$ C#)
    Python

    I'm open to any others, this is your show. So lets see how this goes :D
  • birdy wrote:
    Older compilers sometimes don't have certain libraries that current or more modern compilers have access to now. For example when I was trying to compile my water.cpp program on an older version of windows using Borderland C++ 5.02 it didn't have unistd.h library. Which included the functions sleep() and usleep(). I had to go and look up an equivalent which led me to windows.h, which had an exact copy of sleep in unistd.h but spelled: Sleep().

    Some of the programing languages that I would be interested in is:
    C/C++ or C# (might be fun learning the differences of C++ vs M$ C#)
    Python

    I'm open to any others, this is your show. So lets see how this goes :D
    I just went through what felt like hell getting Cygwin for 98! My god this needs more archiving. Anywho I'm currently DLing the entire setup and I'm going to see if I can compile an open source program I got that was recently made. What other compilers do you currently have/want other than Borland c++ 5.02?
  • Wow... am I the only one coming here for "classic" operating systems, development tools, and utilities? I'd love to participate in something like this - and I'd love it even more if it involved using old-school environments... limitations and all... Consider it part of the challenge - having to write your own containers and algorithms - rather than relying on something like STL, etc. DOS and Turbo C / Borland C++ / Microsoft C/C++ ... I say bring it on...

    Regards ~ jp
  • I only used Borderland C++ 5.02 so 02k-guy can compile it on his/hers Windows 98 VM. All I use it GNU g++...
  • Alright small update.. I was going to use canvas a while back to have a list on here but for simplicity's sake I'm going to stick with the spreadsheet provided by Google.
    Here is the URL: https://docs.google.com/spreadsheets/d/1yynRIiN2-zm29YwRTOPzgGOLe-AUcL0vDqElyG9dpvw/edit?usp=sharing

    I'm not really putting anything specific on it at the moment but it exists to create a list of resources that show people various tools/compilers/whatnot related to programming and their last known supported version for the OSes listed. As far as including download links goes... let's hold out on that for now due to security, abandonware-criteria, etc. I'm not sure if comments are enabled on there but we can keep conversations pertaining to that there.

    Anybody with the link can make edits so let's try to fill some stuff in our spare time.
    While that is on the side.. Let's discuss what sort of program/challenges we can get started with.. Any random ideas brewing? :alien:
  • PerryCodes, you're not alone. I'd love to hack something for DOS in assembler, BASIC, PASCAL, C, …! That sounds like more fun than coding something for later Windows releases which most likely isn't that different than coding for current operating systems.

Sign In or Register to comment.