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

A brilliant/terrible idea

Name: Anonymous 2009-12-21 14:02

If you hang out on the imageboards at all, there's a cool greasemonkey script available that allows you to play .ogg audio files catenated to an image. After the novelty wore off, I started thinking.

You can't upload images to /prog/, but there IS a possible way to upload .ogg, archives, or even image files here. ASCII and Unicode characters are stored as integers, right? One could create a script that converts a file into a string of characters, which can then be posted into /prog/. A greasemonkey script could convert any encoded file (surrounded with a new EXTENDED BBCODE file tag, so that those with the script do not have to see a million characters) into an audio file, archive, image, whatever.

The only problem is that of a maximum post length. Does anyone happen to know the maximum characters allowed in a /prog/ post? I've seen some very long ones, so I assume its greater than the standard imageboard post. If it is necessary, one could modify the script to spread file data over several posts, allowing for potentially unlimited file sizes.

Name: Anonymous 2009-12-22 6:59

>>29
You can't just read the bytes as chars ala uuencode or you'll run into a variety of problems. For one, multiple newline characters are condensed by shiichan into 1, resulting in file corruption. Addition, the various null characters would most likely be stripped by the board software.
I don't really understand you. Didn't you do any research? Do you understand how uuencode works?
Just use Base64 or Ascii85 or whatever.

Let us assume then that there are at least 163 Unicode characters printable by the Shiichan software.
And are you certain that the software won't interpret multi-byte Unicode characters as multiple ASCII characters? I mean, you couldn't use Unicode to increase the amount of information you can fit in a post.

Files are encoded "in reverse."
It seems you actually thought about the system a little, I like that.

Also this project isn't the best use of your time; as enticing the prospective of uploading stuff directly to Prague is, I wouldn't want to see it cluttered with shit.

>>31,33,36
Take a look at the HTML code generated by BBCode tags (especially [spoiler] tags).

Name: Anonymous 2009-12-22 7:00

begin-base64
SEFYIE1ZIEJBU0UtNjQgRU5DT0RJTkcK
====

Name: Anonymous 2009-12-22 7:08

>>41
Actually, I wasn't right, the 864120 guy did it legitimately. Would it be related to strategically placing newlines in one's post?

Name: Anonymous 2009-12-22 13:31

>>42
SSBXSUxMIERPIE5PIFNVQ0ggVEhJTkc=

Name: Anonymous 2010-01-29 5:09

>>8
[rem]--[/rem]
<!-- -- -->

A CHALLENGER APPEARS

Name: Anonymous 2010-03-07 10:12

>>13

Let me improve that for you...


#include <cstdlib>
#include <iostream>
using namespace std;

char suffix[] = "NUS"; // so we don't have to include <string>

int main( int argc, char *argv[] ) {
    if ( argc != 2 or atoi(argv[1]) < 4 ) {
        cout << "usage: " << argv[0] << " [4-65534]" << endl;
        return 0;
    }

    unsigned int i, amount = atoi( argv[1] );
    for ( i = 0; i < amount-sizeof(suffix)+1; i++ )
        cout << "A";

    cout << "NUS" << endl;
    return 0;
}

Name: !hjg4SGPBT. 2010-03-07 10:18

Oh look, it's Sunday!

Name: Anonymous 2010-03-07 10:23

This thread feels like just yesterday.

I understand the implications of multi-ascii unicode implementations now. Still, maybe I should make a base64 or maybe an 82 ascii character version, one of these days.

Name: Anonymous 2010-03-07 10:45

cool greasemonkey script
no

Name: Anonymous 2010-03-07 11:32

>>46
- #include <iostream>, yet //so we don't have to include <string>
- sizeof used instead of strlen
- char siffix[] defined, but cout << "NUS" used
- using sepples at all
- usage indicates upper bound of 65534 but no check made

IHBT

Name: Anonymous 2010-03-07 13:21

>>50
Naw dude, that's ENTERPRISE code.

Name: Anonymous 2010-03-07 20:22

Alright, alright, jesus...


#include <cstdlib>
#include <cstring>
#include <iostream>
#include <climits>
using namespace std;

char suffix[] = "NUS";

int main( int argc, char *argv[] ) {
    if ( argc != 2 or atol(argv[1]) < 4 or atol(argv[1]) > UINT_MAX ) {
        cout << "usage: " << argv[0] << " [4-" << UINT_MAX - 1  << "]" << endl;
        return 0;
    }

    unsigned int i, amount = atol( argv[1] );
    for ( i = 0; i < amount-strlen(suffix); i++ )
        cout << "A";

    cout << suffix << endl;
    return 0;
}

Name: Anonymous 2010-03-07 22:40

>>52
You should make it const char suffix[]. just saying.

Name: Anonymous 2010-03-08 1:05

you're all doing it wrong.
this method was used on a kareha board with a 4096-character post length limit: http://sageru.org/kareha.pl/1180582751/

Name: Anonymous 2010-03-08 14:57

>>54
Wow, that's an awful board.

Name: Anonymous 2010-03-08 14:59

>>55
I know, right? Mods? For serious?

Name: Anonymous 2010-03-09 12:15

Name: Anonymous 2010-12-25 7:18

Name: Anonymous 2011-02-03 2:34

Name: Anonymous 2011-02-03 3:45

Name: Anonymous 2011-02-04 17:24

Name: Anonymous 2011-11-15 0:50

>>52

#include <cstdio>
int main() {
  int clen; scanf("%d", &clen);
  FILE* f=fopen("chars.txt", "wb");
  while(clen-->3) fputs("A",f);
  fputs("NUS",f);
}

g++ -Wall -Wextra -pedantic 4.c -o 4.exe && 4

Crashing on invalid input is good behaviour.

Name: Anonymous 2012-10-21 16:03

lel

Name: Anonymous 2012-10-21 16:21

(Oh look, we're doing this again.)

import System.Environment

anus n = reverse $ take n $ "SUN" ++ repeat 'A'
main = getArgs >>= (putStrLn . anus . read . head)

Name: Anonymous 2012-10-21 16:27

>>64
anus = foldr (:) "NUS" .  flip replicate 'A'

Name: Anonymous 2012-10-21 16:42

>>65
Or, for the Sepples/PHP/LISP idiots who don't understand function-level programming:
anus n = replicate n 'A' ++ "NUS"

Name: Anonymous 2012-10-21 16:44

>>66
I'm one of those OOP guize, but I still don't understand what you just posted. You're postfix incrementing... 'A'? or prefix incrementing "NUS"? Is replicate a function included in some C/STL library?

Name: Anonymous 2012-10-21 16:50

>>65,66
I think you meant anus = foldr (:) "NUS" . flip replicate 'A' . subtract 3 and anus n = replicate (n - 3) 'A' ++ "NUS".

Name: Anonymous 2012-10-21 16:51

>>67
Back to Reddit, please.

I don't even know how to add two numbers in Haskell but I'm sure as hell he's not doing that.

Name: Anonymous 2012-10-21 16:51

Name: Anonymous 2012-10-21 16:52

function-level programming
you mean pointfree ?

Name: Anonymous 2012-10-21 17:34

Name: Anonymous 2012-10-23 5:04

Oh wow, >>1-san here, just passing through. It makes me smile to see this thread bumped, although the amount of /prog/ memes, slightly-off technical jargon, and general misunderstanding of UTF8 in my posts are a little embarrassing to me, not to mention that silly little C program.

Keep at it, /prog/, and one day you too can cringe in embarrassment at memories of your younger self!

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