pouët.net

Random line of code thread

category: code [glöplog]
Quote:

10 Print Was?
20 Goto 10
run
added on the 2008-07-23 00:31:46 by stijn stijn
here, i wrote a blitz basic port:
Quote:
.a
Print "Was?"
Goto a
added on the 2008-07-23 11:16:14 by 52 52
@stijntje

5 Print"Hallo"
10 Print "Was?"
20 Goto 5
run

Your Code doesn't run, quote the strings! ;)
added on the 2008-07-23 11:22:27 by vscd vscd
Years ago, when he was coding in BBC Basic (with some Arm assembly inside), and just to make fun of another friend who was a "pure" C addict my friend ArmOric started one program with:

10 GOTO 20
20 blabla...

:)
added on the 2008-07-23 15:24:23 by baah baah
well i start all my c functions that way.
added on the 2008-07-23 15:25:30 by skrebbel skrebbel
Quote:
[15:54] helli: TQSuizidClient *emoKid;
added on the 2008-07-23 15:58:23 by mueslee mueslee
h311o W0rLd! 7His n45tY 5OURCecode 1S Wri7Ten in L33T, a L4NgUaG3 By st3PheN (MAC) gr3aL WI7h aLec2 (moLe). 7His 1ANGuAge tak3S iN5PIrAtIOn Fr0m 7hE 7URInG compL3T3 LANguAgE 8raInFuCK, bY urb4N mu113r. A 1OT (of) P3opL3 C0dEd (fOR) 7hE L4t1ER LAngUaG3, 5O a 5IMPL3 iD34 w42 t0 CR341e a tRanSL4tOR be7Ween bRAINfuck (aND) l33T. Th1S w4S 3A2Y T0 Ach1Eve bY u5ING A s3arCH (And) R3P14Ce TO0l. 4f1eR COnvERSi0n On3 n33D 0nLY 7O wR1Te loAd5 0f 8ULlshiT aR0unD Th3 Pro6rAM' s V4LU3s. TH1s wA5 d0ne (ON) (An) Or161NAl By danI3L CrI5stoFaN1, c0MPuTInG 7he suCCESS1veS pOweR5 0F (tWo). wR17InG MeANINgfUlL T3xT 15 N0T 7HaT s1mple, E5pECiaLLY wheN 1rY1N6 t0 MinimiZ3 uS3l3sS W0RdS, 8etweeN pAREn7HeSIS (iN) thI5 1oUsY t3xT. 4fTerw4rD 0nE c4N C4pItaliZ3 1N wHAt3v3R WAY, 8ut N0t n3cEssarIlY (randOmLY), (tHe) remAiniN6 LETTeRs. i7 1s 5Ad t0 U53 sUcH m31hods (tO) Cre4Te 1e3t pROgR4Ms, 4nD rE4l PRo6RammerS WILl c3rtAiNLy DE5pISe it, bU7 ThAt 15 thE 14m3 metH0D (UsEd) 4 7hiS 0nE. (iT) i5 t1me 4 LEAVIn6, 1 (thinK)! Al4iN.
added on the 2008-07-26 21:14:04 by baah baah
.count_set_bits ; in R0
MOV R3,#&33
ORR R3,R3,R3,LSL #8
ORR R3,R3,R3,LSL #16 ; 0x33333333
EOR R5,R3,R3,LSL #1 ; 0x55555555
AND R1,R5,R0,LSR #1
SUB R0,R0,R1 ; x = x - ((x >> 1) & 0x55555555);
AND R1,R3,R0,LSR #2 ; t = ((x >> 2) & 0x33333333);
AND R0,R0,R3
ADD R0,R0,R1 ; x = (x & 0x33333333) + t;
ADD R0,R0,R0,LSR #4
MOV R1,#&0F
ORR R1,R1,R1,LSL #8
ORR R1,R1,R1,LSL #16 ; 0x0F0F0F0F
AND R0,R0,R1 ; x = (x + (x >> 4)) & 0x0F0F0F0F;
ADD R0,R0,R0,LSL #8
ADD R0,R0,R0,LSL #16
MOV R0,R0,LSR #24 ; return x >> 24;
added on the 2008-07-27 04:02:35 by mrhill mrhill
.. / -.-. .- -. / .... .- ... / .- / -.-. .- .-. .-. --- - ..--..
char* why = "Why?"

void main() {
_asm {
mov eax, offset why
push eax
call printf
};
}

:--)
added on the 2008-07-27 05:25:17 by Snowbell Snowbell
Code: IDENTIFICATION DIVISION. PROGRAM-ID. C-ORD. ENVIRONMENT DIVISION. INPUT-OUTPUT SECTION. FILE-CONTROL. SELECT CUSTOMER ASSIGN TO "i:\exemples\cobol\CUSTOMER.DAT" ORGANIZATION IS INDEXED ACCESS MODE IS DYNAMIC RECORD KEY IS CUS-CODE. SELECT ORDERS ASSIGN TO "i:\exemples\cobol\ORDERS.DAT" ORGANIZATION IS INDEXED ACCESS MODE IS DYNAMIC RECORD KEY IS ORD-CODE ALTERNATE RECORD KEY IS ORD-CUSTOMER WITH DUPLICATES ALTERNATE RECORD KEY IS ORD-DATE WITH DUPLICATES. SELECT STOCK ASSIGN TO "i:\exemples\cobol\STOCK.DAT" ORGANIZATION IS INDEXED ACCESS MODE IS DYNAMIC RECORD KEY IS STK-CODE.
added on the 2008-07-27 05:30:03 by moT moT
\o/ cobol
added on the 2008-07-27 12:07:19 by skrebbel skrebbel
Bah, somebody bring forth Forth. ;) And how about:

Quote:
HAI
CAN HAS STDIO?
VISIBLE "HAI WORLD!"
KTHXBYE


LOLCODE
added on the 2008-07-27 14:56:16 by tomaes tomaes
Sponge<Sponge<Sponge<bool>>> Bob ;

(while prototyping a static menger sponge)
added on the 2008-08-18 18:41:15 by rmeht rmeht
Some years ago I discovered the coolest way for german C coders to print out a percent sign:
Code:printf("%c",'H'+'a'-'l'+'l'-'o'-' '+'W'-'e'+'l'-'t'+'!');
added on the 2008-08-18 21:25:10 by Joghurt Joghurt
you're easily fascinated
added on the 2008-08-18 21:30:30 by skrebbel skrebbel
Nice one, Mr. Hill.


:-)

added on the 2008-08-18 21:49:38 by torus torus
// booze
added on the 2008-08-18 21:54:29 by maw maw
move.w #$0200+(5<<12), $100
added on the 2008-08-18 22:39:24 by EviL EviL
tas $b00b,y ;hardcore illegal 6502 opcode which is supposed to work like S=A&X {adr}=S&(H+1) except the &(H+1) drops off when the VIC does DMA on C64.
added on the 2008-08-18 22:50:24 by cruzer cruzer
wouldn't it be more like:

char* was(char* hallo) {
if (!strcmp(hallo, "Hallo.")) return "Was?";
else return null;
}

int main() {
char* answer;
answer = was("Hallo.");
return 0;
}
added on the 2008-08-18 23:30:25 by visy visy
ah yes, the code tag.
added on the 2008-08-18 23:30:42 by visy visy
// check if the monitor applies to the given object
if ((monitor=block->monitors[i%MONITOR_BLOCK_SIZE])->object==object)
return monitor;
added on the 2008-08-19 04:27:32 by Inopia Inopia
CALL -1184
added on the 2008-08-19 07:07:00 by CrzyClst CrzyClst
Code:!ifdef SATANIC { bne + ldx noteamt + dex } else { inx cpx noteamt bne + ldx #0 + }
added on the 2008-08-19 13:32:31 by kekimmo kekimmo

login