Humor Random Comments Thread

Quick_Nick

Passed the Turing Test
Donator
Joined
Oct 20, 2007
Messages
4,088
Reaction score
204
Points
103
Location
Tucson, AZ
Code:
while (1)
{
     System.out.println("I know a song that gets on ");
     for (int i = 0; i < 3; i++)
         System.out.println("everybody's nerves, ");
     System.out.println("I know a song that gets on everybody's nerves, and this is how it goes... : ");
}
Does that even work?? while(1) shouldn't compile
 

orb

New member
News Reporter
Joined
Oct 30, 2009
Messages
14,020
Reaction score
4
Points
0
Does that even work?? while(1) shouldn't compile
It will compile. An alternative is while(true) which I sometimes use for making infinite loop for external debuggers (and 1 is "true").
 

Linguofreak

Well-known member
Joined
May 10, 2008
Messages
5,030
Reaction score
1,270
Points
188
Location
Dallas, TX
It will compile. An alternative is while(true) which I sometimes use for making infinite loop for external debuggers (and 1 is "true").

Actually it doesn't. I've been reading too much C recently, but I wrote that in Java. In Java you can't use an integer for a boolean.

Code:
test.java:5: incompatible types
found   : int
required: boolean
		while(1)
		        ^
1 error
 

Quick_Nick

Passed the Turing Test
Donator
Joined
Oct 20, 2007
Messages
4,088
Reaction score
204
Points
103
Location
Tucson, AZ
Actually it doesn't. I've been reading too much C recently, but I wrote that in Java. In Java you can't use an integer for a boolean.

Code:
test.java:5: incompatible types
found   : int
required: boolean
		while(1)
		        ^
1 error
Wewt, I win. ;)
Yep, gotta use var == 1 if you want a boolean from integer.
 

Linguofreak

Well-known member
Joined
May 10, 2008
Messages
5,030
Reaction score
1,270
Points
188
Location
Dallas, TX
Wewt, I win. ;)
Yep, gotta use var == 1 if you want a boolean from integer.

Even that wouldn't work here, as I didn't have any boolean variable declared. I was just trying to do "while(true)", but forgot which language I was programming in.
 

Quick_Nick

Passed the Turing Test
Donator
Joined
Oct 20, 2007
Messages
4,088
Reaction score
204
Points
103
Location
Tucson, AZ
Even that wouldn't work here, as I didn't have any boolean variable declared. I was just trying to do "while(true)", but forgot which language I was programming in.
I know that. But you can maybe say 1 == 1.
 

orb

New member
News Reporter
Joined
Oct 30, 2009
Messages
14,020
Reaction score
4
Points
0
Actually it doesn't. I've been reading too much C recently, but I wrote that in Java. In Java you can't use an integer for a boolean.
Java? I thought you are talking about a "real" language. :p
In this case, my external debugger wouldn't even work with the compiled program.
 
Last edited:

Linguofreak

Well-known member
Joined
May 10, 2008
Messages
5,030
Reaction score
1,270
Points
188
Location
Dallas, TX
Java? I thought you are talking about a "real" language. :p
In this case, my external debugger wouldn't even work with the compiled program.

I'm not altogether happy with Java myself, but it's the first programming language I learned, so I have tons of entrenched Java habits, and it tends to be my go-to language whenever I want to write a quick project up from scratch (as I don't have to google as much stuff to write a valid program).

And it has just enough syntactic sugar to make C and C++ feel tedious enough in comparison that I'm only have motivated to learn them...
 

Quick_Nick

Passed the Turing Test
Donator
Joined
Oct 20, 2007
Messages
4,088
Reaction score
204
Points
103
Location
Tucson, AZ
I'm not altogether happy with Java myself, but it's the first programming language I learned, so I have tons of entrenched Java habits, and it tends to be my go-to language whenever I want to write a quick project up from scratch (as I don't have to google as much stuff to write a valid program).

And it has just enough syntactic sugar to make C and C++ feel tedious enough in comparison that I'm only have motivated to learn them...
So far, I dwell almost exclusively in the world of Java. :p
And, about that code, there's probably other problems too. :) Infinite loops using while tend to try to keep the thread working as long as possible, probably causing freezes. Besides that, there will be so many output strings backed up that it would probably freeze from that too, whether it ever prints anything at all or not. (println takes insane amounts of time)
 

Wishbone

Clueless developer
Addon Developer
Joined
Sep 12, 2010
Messages
2,421
Reaction score
1
Points
0
Location
Moscow
Breaking backward compatibility is One Microsoft Way.
 

Linguofreak

Well-known member
Joined
May 10, 2008
Messages
5,030
Reaction score
1,270
Points
188
Location
Dallas, TX
So far, I dwell almost exclusively in the world of Java. :p
And, about that code, there's probably other problems too. :)

I've got it running in the background as I write, and there's no evidence of problems yet. Aside from the "while(1)" deal it compiled without problem.

Infinite loops using while tend to try to keep the thread working as long as possible, probably causing freezes.

Probably an implementation-specific issue. On my setup it's not even maxing out one CPU, and gnome-terminal is taking up more CPU time than the Java process.

Besides that, there will be so many output strings backed up that it would probably freeze from that too, whether it ever prints anything at all or not. (println takes insane amounts of time)

Nothing froze in several minutes of run time. The only reason the program ever stopped was that I got bored and hit Ctrl-C.

I/O in general takes insane amounts of time. And even that proceeds at lightning speeds compared to the reactions of the meatbag sitting at the keyboard.
 

DanM

&#1055;&#1086;&#1077;&#1093;&#1072;&#1083;&#1080;!
Joined
May 23, 2010
Messages
1,131
Reaction score
1
Points
38
Location
Chicago
I just had a weird flashback to when I was struggling with math homework in sixth grade. I had such a hard time that I wanted to give up, so my dad was trying to motivate me and said "What woud Werner Von Braun do?"

I said "He'd stop doing his homework and just strap a bunch of rockets to his wagon and go into town."
 

Artlav

Aperiodic traveller
Addon Developer
Beta Tester
Joined
Jan 7, 2008
Messages
5,790
Reaction score
780
Points
203
Location
Earth
Website
orbides.org
Preferred Pronouns
she/her
Random thought - would showing controls on screen benefit Orbiter's newbie-friendliness?
Something like that:
sw-110307-5.jpg

sw-110307-6.jpg
 

Wishbone

Clueless developer
Addon Developer
Joined
Sep 12, 2010
Messages
2,421
Reaction score
1
Points
0
Location
Moscow
Random response: It sure would. The font does look annoying though, bringing back the memories of bitmap fonts in my first Linux installation...
 

Artlav

Aperiodic traveller
Addon Developer
Beta Tester
Joined
Jan 7, 2008
Messages
5,790
Reaction score
780
Points
203
Location
Earth
Website
orbides.org
Preferred Pronouns
she/her
The font does look annoying though
I envy people who could tell fonts apart...
For me they're all the same, and arial is as readable as comic sans.
This post is written in one font as far as i'm concerned.

They're letters. What could their shape change?
 
Top