Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

design a new web protocol

Name: Anonymous 2015-02-16 14:21

using UDP
field description [size] {example}

Requests:
Request ID [2] {1234}
Request string [] {prog+bbs}


Response:
Request ID [2] {1234}
Data type [1] {0 = plain text}
Data [max 1440] {hello world!}


it lacks a way to prevent spoofed source IPs and allow larger data sizes

Name: ok !Iy8llHQG2g 2015-02-16 22:01

lmao

UDP for web

epic

Name: ok !Iy8llHQG2g 2015-02-17 0:11

also i suck cocks lmao

Name: moot !Ep8pui8Vw2 2015-02-17 0:47

>>2
Trolling is against the rules.
You're lucky I don't ban you

Name: Anonymous 2015-02-17 0:54

Name: /jewtube/ 2015-02-17 1:24

/jewtube/

Name: Anonymous 2015-02-17 1:41

>>6
Would you respond that way if it wasn't posted on youtube?

Name: Anonymous 2015-02-17 2:05

>>7
Of course not.

Name: /jewimeo/ 2015-02-17 2:22

>>7
/jewimeo/

Name: Anonymous 2015-02-17 4:25

user datagram protocol more like used dickagram protocock lmfao

Name: Anonymous 2015-02-17 5:16

dubs

Name: Anonymous 2015-02-17 6:15

>>10
Most insightful, thought provoking post on /prog/.

Name: L. A. Calculus !jYCj6s4P.g 2015-02-18 0:50

Format:
[ Message Type ] [ Message Data ... ]

MESSAGE TYPE IS EIDER 1 OR 2 N IT CORRESPONDS TO DA FOLLOWING MESSAGE TYPES.

Type 1:
Octet [ 0 ][ 1 ][ 2 ][ 3 ]
0 [ Page Identifier ]
4 [ Block Count ]
8 [ URI ... ]

DIS MESSAGE IS SENT BY DA FUKIN CLIENT. PAGE IDENTIFIER N BLOCK COUNT CAN SET
TO ANYTHING. DA SERVER WILL SEND DIS MESSAGE BACK TO DA CLIENT WITH URI
UNMODIFIED N PAGE ID + BLOCK COUNT FILLED IN.

PAGES R (PREFERABLY) ENUMERATED BY DA SERVER FROM 1 TO <NUMBER OF PAGES HANDLED
BY DA SERVER>. PAGE IDENTIFIER 0 INDICATES DAT DA URI SENT BY DA CLIENT DOESN'T
REFER 2 A VALID PAGE.

BLOCK COUNT IS DA NUMBER OF MESSAGES U NEED TO RECEIVE TO GET DA WHOLE PAGE. DIS
BRINGS US TO DA SECOND MESSAGE TYPE.

Type 2:
Octet [ 0 ][ 1 ][ 2 ][ 3 ]
0 [ Page Identifier ]
4 [ Block Identifier ]
8 [ Block Data ... ]

SAME AS B4. CLIENT SENDS DIS PACKET FIRST, WITH PAGE IDENTIFIER AND BLOCK
IDENTIFIER FILLED IN. BLOCK DATA IS OMITTED BY DA CLIENT.

SERVER SENDS DA SAME SHIT BACK, EXCEPT WITH DA BLOCK DATA APPENDED TO DA PACKET.

DA SIZE OF EACH BLOCK IS BASED ON UR MAXIMUM UDP DATA SIZE. IF DAT'S 512, UR
BLOCKS R 512 - 1 - 4 - 4. THEREFORE U COMPUTE DA BLOCK COUNT FOR A PAGE BY

page_size / block_size + (page_size % block_size != 0)

N DER'S UR FUCKIN GET REQUESTS. ALL DA SERVER HAS TO DO IS RESPOND TO TWO KINDS
OF PACKETS, NO STATE NEEDED. HERES A SAMPLE COMMUNICATION:

client: "\1\0\0\0\0\0\0\0\0/non-existent.html"
server: "\1\0\0\0\0\0\0\0\0/non-existent.html"
client: "\1\0\0\0\0\0\0\0\0/index.html"
server: "\1\0\0\0\1\0\0\0\3/index.html"
client: "\2\0\0\0\1\0\0\0\0"
server: "\2\0\0\0\1\0\0\0\0<html>\n <head>\n ..."
client: "\2\0\0\0\1\0\0\0\1"
server: "\2\0\0\0\1\0\0\0\1 id='blahblah'>\n ..."
client: "\2\0\0\0\1\0\0\0\2"
server: "\2\0\0\0\1\0\0\0\2</body>\n</html>"

SO BASICALLY DA CLIENT SENDS A TYPE 1 PACKET. IT WAITS 2 SECONDS, IF IT HASNT
RECEIVED A RESPONSE IT TRIES A FEW MORE TIMES THEN QUITS SAYIN IT CANT REACH DA
SERVER. IF DA SERVER RESPONDS N PAGE ID IS 0, IT QUITS SAYIN DA PAGE DONT EXIST.
IF DA SERVER RESPONDS WITH PAGE ID > 0, IT DOWNLOADS DA PARTS IN ORDER (1 BY 1),
N WRITES EACH PART 2 ITS OUTPUT.

NOW DATS A DECENT PROTOCOL. NO UNNECESSARY BULLSHIT. IF U WANT TO SUPPORT MIME
TYPES, JUST PREPEND DEM TO DA PAGE DATA, SO U GET "text/plain\nblahblah ...".

Name: L. A. Calculus !jYCj6s4P.g 2015-02-18 1:01

N YEA, URI CAN BE A FULL URI: www.whatever.com/index.html

BETTER THAN HAVIN DAT STUPID "Host: " SHIT IN DA FUCKIN PROTOCOL. JUST DUMP IT ALL TOGETHER IN 1 STRING N HANDLE DAT.

Name: Anonymous 2015-02-18 18:49

>>13,14
Pissing on the tripfag, pss-pss, I'm just pissing on the trip-fag and making him gulp my liquid diarrheic feces.

Get the fuck out of our pseudonimous thread, trip-retoid.

Name: Anonymous 2015-02-18 22:34

>>15
SHUT DA FUCK UP. I'M WAITIN FOR >>1 TO IMPLEMENT MY FUCKIN PROTOCOL. GET ON IT ALREADY YA FUCKIN RETOID.

Name: L. A. Calculus 2015-02-18 22:35

N U CAN TELL DAT FUCKIN CUDDER RETOID TO IMPLEMENT IT IN HIS SHITTY WEB BROWSER TOO.

Name: L. A. Calculus !jYCj6s4P.g 2015-02-18 22:41

N HOW COME ALL U FUCKIN PROGRAMMERS R EITHER TWIGS OR BINARY BLOBS ANYWAY? ITS LIKE U GOT TWO EXTREMES. IF ONE OF DESE RETOIDS IS PISSIN U OFF, HERE'S WAT U DO:

FIRST, TAKE DER FUCKIN COMPUTERS AWAY FROM DEM
DEN, FOR DA FUCKIN TWIG, PICK HIM UP N PUT HIM SOMEWHERE WHERE HE WONT FUCKIN BUG U
N FOR DA BINARY BLOB, JUST START RUNNIN. DAT FATASS HASNT RUN IN HIS WHOLE FUCKIN LIFE. DA FAT FUK'LL TRIP OVER HIS ASS N CRIPPLE HIMSELF.

>>15'S A FUCKIN TWIG. I CAN TELL YA DAT NOW. WAT'S MORE HE'S A FUCKIN FECALPHILIAC. WHEN IT GETS RAINY DA SCRAWNY FUK SOMETIMES GETS WASHED DOWN INTO SEWERS N DATS LIKE GOIN TO DISNEY LAND FOR DA SICK FUCK.

Name: L. A. Calculus !jYCj6s4P.g 2015-02-18 22:43

WATS FUNNIER IS DA POOR FUCK WOULDNT HAV EVEN REALISED DAT HIS DREAM WONDERLAND WAS OUTSIDE HIS FUCKIN COMPUTER. HED RATHER JERK OFF TO PICTURES OF PEOPLE DOIN DAT DISGUSTIN SHIT ON HIS FUCKIN MONITOR

Name: Anonymous 2015-02-19 5:04

>>18
I'm not fat, I'm big fucking boned, Christ you shithead. Every time you insult me, I'm going to declare main as void.

Name: Anonymous 2015-02-19 16:16

>>20
What wrong with declaring main as void? Cudder did it[1] so I don't see the problem.

[1] <http://bbs.progrider.org/prog/read/1423839854/34>

Name: Anonymous 2015-02-19 17:17

>>21
Because Void is the uninhabited type. What imperative idiots call "void" is actually the Unit type. Also check my dubs.

Imperative languages were designed by retards who can't tell 1 from 0, or an initial object from a final.

Name: Anonymous 2015-02-19 19:21

>>21
There are problems when startup routines that call main could be assuming that the return value will be pushed onto the stack. If main() does not do this, then this could lead to stack corruption in the program's exit sequence, and cause it to crash. Another problem is that you are likely to return a random value to the invokation environment. Any script or process that relies on a non-zero value to imply failure will be mistaken.

Name: Anonymous 2015-02-19 19:23

>>21
It's in DA STANDARD

Name: Anonymous 2015-02-19 20:10

>>22
00:58:38 <edwardk> in the case of products the unit for the product is the initial object
00:58:53 <edwardk> but there is no reason why all monoidal categories use the initial object as their unit
00:58:58 <johnw> makes sense
00:59:01 <edwardk> for instance we can take (Hask,Either,Void)
00:59:06 <edwardk> Void is terminal, not initial
00:59:11 <edwardk> er
00:59:11 --- quit: c74d (Read error: Connection reset by peer)
00:59:13 <edwardk> sorry backwards
00:59:25 <edwardk> ot ahead
00:59:27 <johnw> ((), a) =~ (a, ()) in the product case, Either a Void =~ Either Void a in the coproduct case
00:59:28 <merijn> edwardk: Wait, what?
00:59:39 <edwardk> (Hask,(,),()) and (Hask,Either,Void)
00:59:39 --- quit: jontmorehouse (Ping timeout: 265 seconds)
00:59:43 <edwardk> merijn: i said i screwed up

Name: >>22 2015-02-20 0:49

Just ignore me guys, I'm under 50 and think the world revolves around facebook and anything that is older than 2008 is bad.

Name: Anonymous 2015-02-20 1:59

>>23
There is a wrinkle here, unfortunately. DA STANDARD permits omitting a return statement from main. In such cases the implementation behaves as though 0 had been returned. The standard also requires that main return an int, however I would not be surprised if some compilers emit special code to set the return value even if main is declared as void.

Name: Anonymous 2015-02-20 11:11

>>22
Nope, void functioname is a C procedure.
Functions are returning values,b Main is s function that returns an error code.
void main is bad because it treats main as procedure, not a function(omitting the return value). To simplify programming there was decision to silently return 0 and have implicit int for main so this "main(){}" is a legal program translating to "int main(){return 0;}".
void main is an illogical way to handle it:at cost of saving few bytes(return) you can corrupt the stack or cause the C runtime to parse something as return value(depending on implementation and OS) if the runtime forces a return value from the stack.
GCC silently inserts return 0 anyway and treats void main as int main, so any argument that this could shave a few bytes of executable size are invalid(both have same size with GCC).

Microsofts C compiler is source of all kinds of intolerable cruft(incompatible extensions) and quirks which never will be standard, such as void main. With all half-broken C code only MSVC compiles it gives microsoft a "embrace,extend and extinguish" advantage which others have to handle:the message is "we control the desktop, we can do whatever we like and you have to adapt to us".
When Ballmer screams "Developers!Developers!Developers!" he really means "we accept any kind of developers and tolerate them for a numerical advantage in programmer base".
So thats why void main exists today and compiles.

Don't change these.
Name: Email:
Entire Thread Thread List