Page 1 of 3

Posted: 2006-06-19 03:17pm
by Praxis
Sounds kinda fun.

I know Java and C, personally.

Posted: 2006-06-19 04:19pm
by Beowulf
I'd need some more direction than just something interesting, I think. I'll think about it.

Posted: 2006-06-19 04:48pm
by Dooey Jo
I'll see what I can come up with :twisted:

Posted: 2006-06-19 04:51pm
by Pezzoni
Sounds cool (I would personally be using PHP), and currently have some suitible code. Of course, it needs to be finished first.

Posted: 2006-06-19 05:08pm
by Miles Teg
How about Lisp, or perhaps Prolog? It's hard for me to do anything "wierd" in C++ or Java, but Prolog...it's just fucking wierd to begin with =)

More seriously, I'd be up for that.

Posted: 2006-06-19 05:52pm
by Arrow
Miles Teg wrote:How about Lisp, or perhaps Prolog?
May you be buried in flaming cow shit. I HATE Lisp with a passion. If I was stuck in elevator with a Lisp programmer and the guy that tossed shitty underwear on my head in high school, and I had a gun with one bullet, I'd shoot the Lisp programmer.

On topic, like Beowulf I need some direction. I might think of something on my own, but I'm a bit too use to these things called requirements.

Posted: 2006-06-19 05:54pm
by phongn
Arrow wrote:May you be buried in flaming cow shit. I HATE Lisp with a passion. If I was stuck in elevator with a Lisp programmer and the guy that tossed shitty underwear on my head in high school, and I had a gun with one bullet, I'd shoot the Lisp programmer.
You are weak!

Posted: 2006-06-19 06:02pm
by Arrow
phongn wrote:You are weak!
Bah, you try counting parenthesis by hand for a semster! Cheap ass dev environment...

Posted: 2006-06-19 06:04pm
by Beowulf
Arrow wrote:
phongn wrote:You are weak!
Bah, you try counting parenthesis by hand for a semster! Cheap ass dev environment...
Isn't that what indentation is for? :P

Posted: 2006-06-19 06:13pm
by phongn
Arrow wrote:
phongn wrote:You are weak!
Bah, you try counting parenthesis by hand for a semster! Cheap ass dev environment...
I used jEdit for writing code and then imported it into the Lisp interpreter. But I suppose we could use something like Haskall, ML or F# instead :P

Posted: 2006-06-19 06:19pm
by Arrow
phongn wrote:I used jEdit for writing code and then imported it into the Lisp interpreter. But I suppose we could use something like Haskall, ML or F# instead :P
Ok, my first semster our professor had us use Dr. Scheme, and that worked pretty well. Then a couple of semsters later, we had a new (and incomponent) professor that made us do the projects in class, without any kind of editor (that was beyond her understanding). That, in combination with other bad memories of gross stupidity from that class has turned me off to Lisp.

If we had a shudder emoticon, I'd be using it right now.

Posted: 2006-06-19 06:38pm
by Prozac the Robert
Since I have no apreciable skill with programing, I'll simply point at this little masterpiece of computer language creation by some more talented people: The Shakespeare Programming Language

Variables are characters, defined like so:
Romeo, a young man of Verona.
Juliet, a young woman.
Hamlet, a temporary variable from Denmark.
The Ghost, a limiting factor (and by a remarkable coincidence also
Hamlet's father).
Operations on variables are carried out as part of a conversation between two characters. GOTOs are implemented by jumping between scenes. Eg:
Juliet:
Art thou more cunning than the Ghost?

Romeo:
If so, let us proceed to scene V.
Take a look at some of the complete example programs, some of them are pretty funny.

Posted: 2006-06-19 06:58pm
by Mad
I'd be interested. Though I'd prefer some kind of direction as well. Plus that makes things a bit easier to compare when thinking about which one is more interesting. (Interesting in what way? Code complexity? Performance? Coding style?)

Posted: 2006-06-19 07:19pm
by Miles Teg
phongn wrote:
Arrow wrote:
phongn wrote:You are weak!
Bah, you try counting parenthesis by hand for a semster! Cheap ass dev environment...
I used jEdit for writing code and then imported it into the Lisp interpreter. But I suppose we could use something like Haskall, ML or F# instead :P
Though jEdit is suitable, it lacks a lot of the integration that Emacs has with Lisp (emacs is written in Lisp). For instance, you can run just about any lisp interpreter directly in Emacs.

Posted: 2006-06-19 07:24pm
by Miles Teg
Arrow wrote:
Miles Teg wrote:How about Lisp, or perhaps Prolog?
May you be buried in flaming cow shit. I HATE Lisp with a passion. If I was stuck in elevator with a Lisp programmer and the guy that tossed shitty underwear on my head in high school, and I had a gun with one bullet, I'd shoot the Lisp programmer.

On topic, like Beowulf I need some direction. I might think of something on my own, but I'm a bit too use to these things called requirements.

hahahah.. I was about to say the similar things about the guy who suggested PHP... The only thing I can think of that is worse is Python....

Miles Teg

Posted: 2006-06-19 07:42pm
by Arrow
Miles Teg wrote:hahahah.. I was about to say the similar things about the guy who suggested PHP... The only thing I can think of that is worse is Python....

Miles Teg
Or a FORTRAN program written with job security in mind. Obtuse and excessive common block masking is next to impossible to figure out.

Posted: 2006-06-19 08:20pm
by The Aliens
I suppose Turing doesn't count? :P

Posted: 2006-06-19 08:43pm
by phongn
Miles Teg wrote:Though jEdit is suitable, it lacks a lot of the integration that Emacs has with Lisp (emacs is written in Lisp). For instance, you can run just about any lisp interpreter directly in Emacs.
I didn't feel like learning a wholly new operating system for a few weeks of Lisp :P
Miles Teg wrote:hahahah.. I was about to say the similar things about the guy who suggested PHP... The only thing I can think of that is worse is Python....
Hey now, what's with the Python hate? I can agree with PHP - I currently do some development in ASP.NET/C#.

Posted: 2006-06-20 05:38am
by Dooey Jo
What's wrong with PHP?

Posted: 2006-06-20 08:13am
by Dooey Jo
Well here's something... interesting I threw together.

Code: Select all

#include <cstdlib>
#include <iostream>
#include <sstream>
#include <string>
#include <vector>
#include <algorithm>

class CMystery {
    std::string m_likeStr;
    std::string m_vowels;
    std::string m_consonants;
    std::vector<std::string> m_mysteryWords;
    public:
        CMystery() {
            m_likeStr = "abcdefghijklmnopqrstuvwxyz";
            m_vowels = "aeiouy";
            m_consonants = "bdfghjklmnpqrstvwxyz";
            m_mysteryWords.push_back("ise");
            m_mysteryWords.push_back("er");
            m_mysteryWords.push_back("es");
            m_mysteryWords.push_back("ing");
            m_mysteryWords.push_back("able");
            m_mysteryWords.push_back("ard");
            m_mysteryWords.push_back("ate");
            m_mysteryWords.push_back("ery");
            m_mysteryWords.push_back("ian");
            m_mysteryWords.push_back("oid");
            m_mysteryWords.push_back("us");
            m_mysteryWords.push_back("ily");
            m_mysteryWords.push_back("ern");
            m_mysteryWords.push_back("ish");
        }
    
        std::string Babblise(const std::string &str) {
            if (str.size() == 0) return "I see what you did there.";
        
            std::string lStr = str;
            int (*pf)(int)=tolower; 
            std::transform(lStr.begin(),lStr.end(), lStr.begin(), pf); 
            std::vector<std::string> words;
            
            std::istringstream is(lStr);
            std::string tStr;
            while ((is >> tStr) && (tStr != "")) {
                std::string addStr;
                for (int i=0; i<tStr.size(); ++i) {
                    if (m_likeStr.find(tStr[i]) != std::string::npos)
                         addStr += tStr[i];
                }
                if (addStr != "")
                    words.push_back(addStr);
            }
            
            std::string writeStr;
            while (words.size() > 0) {
                unsigned int i = rand()%words.size();
                writeStr += words[i];
                
                unsigned int testes = m_mysteryWords.size()<<1;
                unsigned int index = rand() % testes;
                if (index < m_mysteryWords.size()) {
                    if (m_vowels.find(words[i].at(words[i].size()-1)) != std::string::npos)
                        writeStr += m_consonants[rand()%m_consonants.size()];
                    writeStr += m_mysteryWords[index];
                }
                
                if (words.size() != 1) writeStr += " ";
                else writeStr += ".";
                std::vector<std::string>::iterator it = words.begin() + i;
                words.erase(it);
            }
            
            if (writeStr.size() > 0)
                writeStr[0] = toupper(writeStr[0]);
            
            return writeStr;
        }
};

using namespace std;

int main(int argc, char *argv[])
{
    srand(time(0));
    cout << "Dooey's can o' worms!!\n\nWrite something fancy!\n\n";
    
    CMystery omfg;
    
    string inStr;
    while (getline(cin,inStr)) {
        if (inStr == "exit" || inStr == "no" || inStr == "I don't wanna!")
            break;
        cout << endl << "You wrote " << "\"" << inStr << "\"\n"
        << "I write: " << omfg.Babblise(inStr) << "\n"
        << "Write something more!\n\n";
    }
    
    return 0;
}

It weirdifies sentences that you type into it, turning them into gibberish.

Posted: 2006-06-20 08:29am
by Ace Pace
Is it reversable?

Posted: 2006-06-20 08:33am
by Prozac the Robert
Dooey Jo wrote: It weirdifies sentences that you type into it, turning them into gibberish.
I like. I quite like the way it stops if you type no in as well.

Posted: 2006-06-20 09:27am
by Bounty
I can't really code but I try :)

Code: Select all

++++++++++
[>+++++++>++++++++++>+++>+>++++++++<<<<<-]
>++.
>+.
+++++++.
.
+++.
>++.
>>+++.
<<<<----.
>>>>-----.
<<.
+.
>.
A cookie if you recognise it, two if you know what it says. Yes, you can compile it.

Posted: 2006-06-20 10:16am
by Dahak
Bounty wrote:I can't really code but I try :)

Code: Select all

++++++++++
[>+++++++>++++++++++>+++>+>++++++++<<<<<-]
>++.
>+.
+++++++.
.
+++.
>++.
>>+++.
<<<<----.
>>>>-----.
<<.
+.
>.
A cookie if you recognise it, two if you know what it says. Yes, you can compile it.
...Brainfuck?
Though I'd have to look into it to know what it means :)

Posted: 2006-06-20 10:20am
by Bounty
...Brainfuck?
We have a winner ! Now for the other cookie...