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

Pages: 1-

/prog/ challenge

Name: Anonymous 2014-03-31 7:59

Let's write a good, small, compact, extensible, standards-compliant and feature-full web browser that doesn't send the user's private info to the Big Brother.

Name: Anonymous 2014-03-31 8:48

#include <stdio.h>
void
  main (void) {
char address[666];
printf("Give URL: ");
fflush(stdout);
scanf("%s", url);
printf("Loading...\n");
return 1;
}

Name: Anonymous 2014-03-31 13:55

>>2
return 1;
That's underfined (or implemetation specific, I am not sure) behavior you shitlord

Name: Anonymous 2014-03-31 20:30

Yea, if you for whatever reason insist on main being of type void, then don't have it try returning a damn thing. Also, you try to write a string to an address represented by the identifier url which wasn't declared in the first place (you probably meant the address array instead).

Name: Anonymous 2014-03-31 20:33

>>2 YE RETOID Y DONT U GO RED DA FUKIN STANDARD

Name: Anonymous 2014-03-31 20:46

>>3
no it isn't you fuckwit, it's just flat out wrong.

Name: Anonymous 2014-03-31 21:34

>>1
(ql:quickload "drakma")

(defun browse-web ()
  (let (input)
    (loop do
         (format t "> Input a URI: ")
         (handler-case (progn
                         (setf input (read-line))
                         (if (member (string-downcase input)
                                     '("quit" "exit" "leave" "fuck lisp")
                                     :test #'string-equal)
                             (loop-finish)
                             (format t "~a~%~%~%" (drakma:http-request (string input)))))
           (error () (format t "Some kind of error.~%"))))

    (when (string-equal (string-downcase input) "fuck lisp")
      (format t "fuck you too.~%"))))

Name: Anonymous 2014-03-31 21:35

sorry im a lisp expert not a bbcode expert

(ql:quickload "drakma")

(defun browse-web ()
  (let (input)
    (loop do
         (format t "> Input a URI: ")
         (handler-case (progn
                         (setf input (read-line))
                         (if (member (string-downcase input)
                                     '("quit" "exit" "leave" "fuck lisp")
                                     :test #'string-equal)
                             (loop-finish)
                             (format t "~a~%~%~%" (drakma:http-request (string input)))))
           (error () (format t "Some kind of error.~%"))))

    (when (string-equal (string-downcase input) "fuck lisp")
      (format t "fuck you too.~%"))))

Name: Anonymous 2014-03-31 21:41

>>3-6
He declared a variable he never used (address), never initialized it, used a variable he never declared (url), then passed it to scanf() with no protection against buffer overflows, and you're pointing out the return value as the primary problem here?

The obvious answer is that >>2 kohai is not writing C here. He's using a derivative language called PBS-PC, or Post Box Shit-Post C. Now play nice.

Name: Anonymous 2014-03-31 23:34

#include <stdlib.h>
int main(int x, char ** y)
{
        return rand();
}

Name: Anonymous 2014-04-01 0:06

>>6
READ DA FUGIN STANDARD YA FUGIN STACKBOY RETROID
THE ONLY PORTABLE VALUES THAT MAIN MAY RETURN ARE 0, EXIT_SUCCESS AND EXIT_FAILURE

Name: Anonymous 2014-04-01 0:13

>>11
It's a non-portable Linux pogrom.  Deal with it.

Name: Anonymous 2014-04-01 4:43

Lol c fags.
Op, type nc.
Done.

Name: Anonymous 2014-04-01 19:31

nc

Name: Anonymous 2014-04-01 19:31

It's not working

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