473,327 Members | 2,081 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,327 software developers and data experts.

Open Source Challenge: Compile It or Shut Up


I have created the world's greatest
OSS program. Here it is.

I defy you to compile and run it.

This will separate the trolls from the zealots.

HHAHAHAHAHHAAHAHHAH!!!!!

/////// yoU.c
#include <gtk/gtk.h>

static gint delete_event_cb(GtkWidget* w, GdkEventAny* e, gpointer data);
static void button_click_cb(GtkWidget* w, gpointer data);

int
main(int argc, char* argv[])
{
GtkWidget* window;
GtkWidget* button;
GtkWidget* label;

gtk_init(&argc, &argv);

window = gtk_window_new(GTK_WINDOW_TOPLEVEL);

button = gtk_button_new();

label = gtk_label_new("!tihsmud olleH");

gtk_container_add(GTK_CONTAINER(button), label);
gtk_container_add(GTK_CONTAINER(window), button);

gtk_window_set_title(GTK_WINDOW(window), "tihsmud");
gtk_container_set_border_width(GTK_CONTAINER(butto n), 10);

gtk_signal_connect(GTK_OBJECT(window),
"delete_event",
GTK_SIGNAL_FUNC(delete_event_cb),
NULL);

gtk_signal_connect(GTK_OBJECT(button),
"clicked",
GTK_SIGNAL_FUNC(button_click_cb),
label);

gtk_widget_show_all(window);

gtk_main();

return 0;
}

static gint
delete_event_cb(GtkWidget* window, GdkEventAny* e, gpointer data)
{
gtk_main_quit();
return FALSE;
}

static void
button_click_cb(GtkWidget* w, gpointer data)
{
GtkWidget* label;
gchar* text;
gchar* tmp;

label = GTK_WIDGET(data);

gtk_label_get(GTK_LABEL(label), &text);

tmp = g_strdup(text);

g_strreverse(tmp);

gtk_label_set_text(GTK_LABEL(label), tmp);

g_free(tmp);
}
Jul 21 '05 #1
6 1443
Hi O.O.N. ( Oliab Oinotna Nhoj ) ,
You say : " Compile It or Shut Up . "

That's an easy choice .
Jul 21 '05 #2
On Wed, 22 Oct 2003 22:33:06 -0700, Jeff Relf wrote:
Hi O.O.N. ( Oliab Oinotna Nhoj ) ,
You say : " Compile It or Shut Up . "

That's an easy choice .


Then make the choice,

or do your masters,

Skeeze noBallsMa

and Bile Grate$

controll your every move,

such that you can't.
You can't --- can ya?
well

can ya ?????

HAHAHAHAHAHAHAHHAHAHHAHA
Jul 21 '05 #3
Wow, did you come up with that all by yourself.. I guess
I underestimated you :p

You must have a fairly low opinion of people around here
if you really expect them to run this...

Or mayby you are just a "!tihsmud"???

-----Original Message-----

I have created the world's greatest
OSS program. Here it is.

I defy you to compile and run it.

This will separate the trolls from the zealots.

HHAHAHAHAHHAAHAHHAH!!!!!

/////// yoU.c
#include <gtk/gtk.h>

static gint delete_event_cb(GtkWidget* w, GdkEventAny* e, gpointer data);static void button_click_cb(GtkWidget* w, gpointer data);

int
main(int argc, char* argv[])
{
GtkWidget* window;
GtkWidget* button;
GtkWidget* label;

gtk_init(&argc, &argv);

window = gtk_window_new(GTK_WINDOW_TOPLEVEL);

button = gtk_button_new();

label = gtk_label_new("!tihsmud olleH");

gtk_container_add(GTK_CONTAINER(button), label);
gtk_container_add(GTK_CONTAINER(window), button);

gtk_window_set_title(GTK_WINDOW(window), "tihsmud");
gtk_container_set_border_width(GTK_CONTAINER(butto n), 10);
gtk_signal_connect(GTK_OBJECT(window),
"delete_event",
GTK_SIGNAL_FUNC(delete_event_cb),
NULL);

gtk_signal_connect(GTK_OBJECT(button),
"clicked",
GTK_SIGNAL_FUNC(button_click_cb),
label);

gtk_widget_show_all(window);

gtk_main();

return 0;
}

static gint
delete_event_cb(GtkWidget* window, GdkEventAny* e, gpointer data){
gtk_main_quit();
return FALSE;
}

static void
button_click_cb(GtkWidget* w, gpointer data)
{
GtkWidget* label;
gchar* text;
gchar* tmp;

label = GTK_WIDGET(data);

gtk_label_get(GTK_LABEL(label), &text);

tmp = g_strdup(text);

g_strreverse(tmp);

gtk_label_set_text(GTK_LABEL(label), tmp);

g_free(tmp);
}
.

Jul 21 '05 #4
Actually, it should be "!tihsbmud", but bailo can't spell forward, why
should we expect him to be able to spell backwards.

"Eddie de Bear" <an*******@discussions.microsoft.com> wrote in message
news:05****************************@phx.gbl...
Or mayby you are just a "!tihsmud"???

Jul 21 '05 #5
In comp.os.linux.advocacy, john a. bailo
<ja*****@earthlink.net>
wrote
on Thu, 23 Oct 2003 05:00:56 GMT
<45******************************@news.teranews.co m>:

I have created the world's greatest
OSS program. Here it is.

I defy you to compile and run it.

This will separate the trolls from the zealots.

HHAHAHAHAHHAAHAHHAH!!!!!


After a bit of fussing,

$ gcc `gtk-config --cflags` yoU.c `gtk-config --libs`
$ ./a.out

worked (fortunately, I've seen this before), displaying
a button labeled "!tihsmud olleH". Clicking on the button
reversed the text. Clicking on it again re-reversed
the text.

It's *so* nice to work remotely as well, on simple stuff like this;
I don't need to wait until I get home. :-)

(Note: this was on Debian. Other systems may vary slightly.)

ObCoffee: I think it's time for a third cup. With chocolate. :-)
(Yeah, I know. But it's institutional-grade stuff. :-) )

ObSeattle: Been there. Nice town but it's been quite awhile since I've
been up there. Not sure which I like better, Oregon or
Seattle. Of course I live in the SF Bay Area (aka Silicon
Valley); make of it what you will.

ObDotNet: It would be interesting to see how simple the actual compile
lines for C# are.
ObJava: I could write a simple Java program that does much the same
thing, but I'll admit Gtk isn't too bad, if one likes C/C++.
(Gtk-- might be useful for C++.)

[program snipped]

--
#191, ew****@earthlink.net
It's still legal to go .sigless.
Jul 21 '05 #6
["Followup-To:" header set to comp.os.linux.advocacy.]
On 2003-10-23, john a. bailo <ja*****@earthlink.net> wrote:

I have created the world's greatest
OSS program. Here it is.

I defy you to compile and run it.

This will separate the trolls from the zealots.

HHAHAHAHAHHAAHAHHAH!!!!!

How 'bout the cshap version...

using Gtk;
using GtkSharp;
using System;

class Bailo
{
public static int Main(string[] args)
{
Application.Init();

// create the button
Button btn = new Button("!dlroW ,olleH");
btn.Visible = true;
btn.Clicked += new EventHandler(ButtonClicked);

// create the window
Window window = new Window("!dlroW ,olleH");
window.BorderWidth = 10;
window.DeleteEvent += new DeleteEventHandler(DeleteEvent);
window.Add(btn);
window.Show();

Application.Run();
return 0;
}

private static void DeleteEvent(object sender, DeleteEventArgs e)
{
Application.Quit();
}

private static void ButtonClicked(object sender, EventArgs e)
{
Button btn = (Button) sender;
char[] text = btn.Label.ToCharArray();
Array.Reverse(text);
btn.Label = new string(text);
}
}

$ mcs /r:gtk-sharp bailo.cs
Compilation succeeded
$ ./bailo.exe

Tom Shelton
Jul 21 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

188
by: Ilias Lazaridis | last post by:
I'm a newcomer to python: - E01: The Java Failure - May Python Helps? http://groups-beta.google.com/group/comp.lang.python/msg/75f0c5c35374f553 - I've download (as suggested) the python...
0
by: lj | last post by:
Computer Associates (CA) issued a million dollar challenge to the open source community today, aimed at fostering the development of migration toolkits for its newly open-sourced Ingres r3...
115
by: TheAd | last post by:
At this moment I use MsAccess and i can build about every databound application i want. Who knows about a serious open source alternative? Because Windows will be a client platform for some time, i...
6
by: john a. bailo | last post by:
I have created the world's greatest OSS program. Here it is. I defy you to compile and run it. This will separate the trolls from the zealots. HHAHAHAHAHHAAHAHHAH!!!!!
14
by: nd02tsk | last post by:
Hello Why is it that PostgreSQL chooses to have features like replication, fulltext indexing and GIS maintained by others outside of the sourcetree? I appreciate any answers. Thank you. ...
10
by: Diomidis Spinellis | last post by:
A quick note to inform my fellow C programmers that my new book "Code Quality: The Open Source Perspective" (Addison-Wesley, 2006) has just been published. All 623 examples I use in the book are...
0
by: Richard Jones | last post by:
The fifth PyWeek is only a month away. Come along and join the fun: write a video game in a week! There's some really interesting new libraries that have popped up recently. Have a gander on the...
33
by: Adeel Hasan Akbari | last post by:
Hi! I'm new to this field. Actually i'm a new programmer. And i've never worked in C. It is my humble request to you to provide me with the source code for Spaceball (the game in which there's...
80
by: jacob navia | last post by:
Several people in this group argue that standard C is not portable since there are no compilers for it, etc. I propose this program in Standard C, that I have compiled in several OSes to test if...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.