Who can tell me what this program does?

Video Game Discussions and general topics.

Moderators: AArdvark, Ice Cream Jonsey

bruce
Posts: 2544
Joined: Tue Jun 04, 2002 10:43 pm

Who can tell me what this program does?

Post by bruce »

First: what language is this?

Second: what does it do?

Code: Select all

+++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++
+++++++++>+++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++
++++++++++++++++>++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++
+++++>+++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++
++>++++++++++++++++++++++++++++++++>+
+++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++>++
+++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++
++++++++>++++++++++++++++++++++++++++
++++>++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++>+++++++
+++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++
++++++++++++++++>++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++
++++++++++++++>++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++
++++++++++++>++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++
+++++++++++++++++>+++++++++++++++++++
+++++++++++++++++++++++++++>+++++++++
<<<<<<<<<<<<<<<&#91;.>&#93;
And now this one:

Code: Select all

PLEASE DO ,1 <- #15
       DO ,1 SUB #1  <-  #54
       DO ,1 SUB #2  <-  #28
       DO ,1 SUB #3  <- #232
       DO ,1 SUB #4  <- #240
       DO ,1 SUB #5  <- #210
       DO ,1 SUB #6  <-  #78
       DO ,1 SUB #7  <-  #24
       DO ,1 SUB #8  <- #154
       DO ,1 SUB #9  <- #190
       DO ,1 SUB #10 <- #192
       DO ,1 SUB #11 <-  #80
       DO ,1 SUB #12 <-   #0
       DO ,1 SUB #13 <- #104
       DO ,1 SUB #14 <-  #90
PLEASE DO ,1 SUB #15 <-  #36

PLEASE READ OUT ,1
PLEASE GIVE UP
Bruce

Vitriola

Post by Vitriola »

There's a joke here, but is it about Pac-Man? Math? Pot? (I'm not good at these things; sometimes, there are too many choices.

Guest

Post by Guest »

mov ax,cs
mov ds,ax
mov ah,9
mov dx, offset Hello
int 21h
xor ax,ax
int 21h

Hello:
db "Hello World!",13,10,"$"

bruce
Posts: 2544
Joined: Tue Jun 04, 2002 10:43 pm

Post by bruce »

Anonymous wrote:mov ax,cs
mov ds,ax
mov ah,9
mov dx, offset Hello
int 21h
xor ax,ax
int 21h

Hello:
db "Hello World!",13,10,"$"
That does something different than my programs.

Bruce

Johnny
Posts: 36
Joined: Sat Oct 15, 2005 4:30 pm
Location: Humble, Texas

Post by Johnny »

The first example is Brainfuck. The second example is INTERCAL. And I don't know what either one does.

User avatar
Ice Cream Jonsey
Posts: 30248
Joined: Sat Apr 27, 2002 2:44 pm
Location: Colorado
Contact:

Post by Ice Cream Jonsey »

bruce wrote:
Anonymous wrote:mov ax,cs
mov ds,ax
mov ah,9
mov dx, offset Hello
int 21h
xor ax,ax
int 21h

Hello:
db "Hello World!",13,10,"$"
That does something different than my programs.

Bruce
And seeing how I have now seemingly lost the ability to read this in MY MIND, it's clear I need to revisit Assembly, because I was quite good at it at one time. DAYUM, another thing to add to the endless list of things to do. I'll place this one towards the end.
the dark and gritty...Ice Cream Jonsey!

Lysander
Posts: 1693
Joined: Tue Jul 08, 2003 12:39 pm
Location: East Bay, California.

Post by Lysander »

I would assume that it prints "Hello world!" to the screen? What am I missing?
paidforbythegivedrewbetterblowjobsfundandthelibertyconventionforastupidfreeamerica

Draal

Post by Draal »

Jonsey; graphics, database, driver, programming?

ICJ

Post by ICJ »

Draal wrote:Jonsey; graphics, database, driver, programming?
In terms of what I used to do in Assembly, or what I think the program does?

draaal

Post by draaal »

From nine to five, what do you work on? And ya, usually languages are what is constantly reinforced; does the effort with a commercial project allow/encourage optimization, especially with taking the time to fine tune asm code?

bruce
Posts: 2544
Joined: Tue Jun 04, 2002 10:43 pm

Post by bruce »

Johnny wrote:The first example is Brainfuck. The second example is INTERCAL. And I don't know what either one does.
Well, they're both pretty much like "Hello, world!" except they print something else. Go grab an interpreter or compiler, as appropriate, and find out!

Bruce

ICJ

Post by ICJ »

draaal wrote:From nine to five, what do you work on?
I work on Oracle Portal these days. At the old job (the Assembly job) we'd get word that a particular CPU failed by doing such and such. We then had to write assembly, in as few lines as possible, that showed the error. They then sent the code and the chip off elsewhere for further investigation. It was really cool work, I wish I had a chance to do it longer.
And ya, usually languages are what is constantly reinforced; does the effort with a commercial project allow/encourage optimization, especially with taking the time to fine tune asm code?
You know what, in most places I've seen the VP of the project just wants stuff to "work" as quickly as possible, like for a demo or something, and then you optimize stuff later.

There's a story a guy told me (not at a company I worked for) of a developer who wrote a shell script to handle database records. Worked pretty good. Worked too well. He puts a for loop (or equivalent) to pause the thing for several minutes throughout the program. He says to his boss, "Well, it works... but I think I can make it run faster!" And for the next four months he does nothing but the variable he himself put in for the pause. That's software "engineering" for you.

MONKEY MONKEY

Post by MONKEY MONKEY »

"BRUEC IS A FAG"?

bruce
Posts: 2544
Joined: Tue Jun 04, 2002 10:43 pm

Post by bruce »

MONKEY MONKEY wrote:"BRUEC IS A FAG"?
Surprisingly close, actually.

Bruce

User avatar
pinback
Posts: 17967
Joined: Sat Apr 27, 2002 3:00 pm
Contact:

Post by pinback »

Suck my balls.
When you need my help because I'm ruining everything, don't look at me.

bruce
Posts: 2544
Joined: Tue Jun 04, 2002 10:43 pm

Post by bruce »

pinback wrote:Suck my balls.
Bravo.

Bruce

User avatar
Ice Cream Jonsey
Posts: 30248
Joined: Sat Apr 27, 2002 2:44 pm
Location: Colorado
Contact:

Post by Ice Cream Jonsey »

Did we ever get confirmation on this? Was Johnny right? Johnny's right about a lot of things, so this does not surprise me.
the dark and gritty...Ice Cream Jonsey!

Guest

Post by Guest »

Brainfuck:
http://www.muppetlabs.com/~breadbox/bf/

++++++[>++++++++++++++++<-]>
++.--
>+++[<++++++>-]<.>[-]+++[<------>-]<
+.-
+++++++++.---------
++++++++++++++.--------------
++++++.------
>+++[<+++++++>-]<.>[-]+++[<------->-]<
+++.---
+++++++++++.-----------

C-Intercal:

PLEASE DO ,1 <- #13
DO ,1 SUB #1 <- #584
DO ,1 SUB #2 <- #837
DO ,1 SUB #3 <- #1100
DO ,1 SUB #4 <- #1356
DO ,1 SUB #5 <- #1615
DO ,1 SUB #6 <- #1824
DO ,1 SUB #7 <- #2135
DO ,1 SUB #8 <- #2383
DO ,1 SUB #9 <- #2642
DO ,1 SUB #10 <- #2892
DO ,1 SUB #11 <- #3140
DO ,1 SUB #12 <- #3361
DO ,1 SUB #13 <- #266

PLEASE DO ,2 <- #1
PLEASE DO .5 <- #0
PLEASE DO .4 <- #1

PLEASE COME FROM (1)
DO .6 <- ",1 SUB .4"~#255
DO .6 <- !6~#15'$!6~#240'
DO .6 <- !6~#15'$!6~#240'
DO .6 <- !6~#15'$!6~#240'

DO .1 <- .5
DO .2 <- .6
PLEASE DO (1010) NEXT
DO .3 <- .3~#255
DO .5 <- .6

DO ,2 SUB #1 <- .3
PLEASE READ OUT ,2

(1) PLEASE DO .4 <- ",1 SUB .4"~#3840
PLEASE GIVE UP

Guest

Post by Guest »


bruce
Posts: 2544
Joined: Tue Jun 04, 2002 10:43 pm

Post by bruce »

The Brainfuck example works (although you shoulda put a linefeed on there, I think), but the INTERCAL version gives me

Code: Select all

ICL778I UNEXPLAINED COMPILER BUG
        ON THE WAY TO 326
        CORRECT SOURCE AND RESUBNIT

Bruce

Post Reply