2022 Developer Survey is open! Take survey.
118 votes
Accepted

Debunking Stroustrup's debunking of the myth “C++ is for large, complicated, programs only”

Wolfram This feels like complete cheating Import["http://www.stroustrup.com/C++.html", "Hyperlinks"] So just add some honest parsing on top ...
user avatar
  • 7,654
115 votes

Debunking Stroustrup's debunking of the myth “C++ is for large, complicated, programs only”

C++ ...
user avatar
  • 1,259
115 votes
Accepted

Build a Faulty XKCD Browser

Python 2.7 + xkcd, 55 bytes xkcd is a third-party Python package. In Python, there is a package for everything! ...
user avatar
  • 41.4k
88 votes

Debunking Stroustrup's debunking of the myth “C++ is for large, complicated, programs only”

Pure Bash on Linux/OS X (no external utilities) HTTP client software is notoriously bloated. We don't want those kinds of dependencies. Instead we can push the appropriate headers down a TCP stream ...
user avatar
67 votes

Debunking Stroustrup's debunking of the myth “C++ is for large, complicated, programs only”

Python 2 ...
user avatar
  • 751
66 votes

The World's Smallest Web Browser

Pure Bash (no utilities), 200 bytes - 40 bonus = 160 ...
user avatar
57 votes

A simple TCP server

Bash + netcat + ss + …, 65 60 characters nc -lp$1 -c'ss src :'$1'|awk \$0=\$5|tr .: +#|bc' exec $0 $1 Not a serious solution, was just curious about this ...
user avatar
  • 19.4k
54 votes

Debunking Stroustrup's debunking of the myth “C++ is for large, complicated, programs only”

C# ...
user avatar
  • 2,333
53 votes

Debunking Stroustrup's debunking of the myth “C++ is for large, complicated, programs only”

"No third-party" is a fallacy I think the "no third-party" assumption is a fallacy. And is a specific fallacy that afflicts C++ developers, since it's so hard to make reusable code in C++. When you ...
user avatar
47 votes

Debunking Stroustrup's debunking of the myth “C++ is for large, complicated, programs only”

UNIX shell lynx -dump http://www.stroustrup.com/C++.html | grep -o '\w*://.*' Also finds an ftp:// link :) Another way, without ...
user avatar
  • 1,293
47 votes

Open the browser to http://codegolf.stackexchange.com

Oration, 41 bytes Not winning, but sure was fun. As of right now, I'm only 1 bytee behind python! I need webbrowser Now open "http:ppcg.ga" Explanation: ...
user avatar
  • 7,674
46 votes

Stack Exchange Vote Counter

jQuery + JavaScript, 85 bytes $.get("//api.stackexchange.com/posts/82610?site=codegolf",d=>alert(d.items[0].score)) ...
user avatar
  • 2,104
43 votes

418: I'm a teapot

GNU Awk: 69 characters A server itself (endlessly serves one request at a time), no library used. Send 418 to everybody who connects (82 69 characters): ...
user avatar
  • 19.4k
43 votes

Debunking Stroustrup's debunking of the myth “C++ is for large, complicated, programs only”

CSS 3 ...
user avatar
  • 2,333
42 votes

Open the browser to http://codegolf.stackexchange.com

Batch, 17 bytes Saved 3 bytes thanks to Mego. start www.ppcg.ga This will open in your default browser if you run it from the windows command line. I think it'll ...
user avatar
37 votes

Debunking Stroustrup's debunking of the myth “C++ is for large, complicated, programs only”

Clojure (->> (slurp "http://www.stroustrup.com") (re-seq #"(?:http://)?www(?:[./#\+-]\w*)+"))
user avatar
  • 371
36 votes
Accepted

Open the browser to http://codegolf.stackexchange.com

GNU Emacs, 29 27 14 bytes (eww"ppcg.ga") EWW is a browser inside Emacs. The browse-web function is an alias for ...
user avatar
  • 6,520
35 votes

Write a program that downloads itself

Bash + coreutils + Lynx browser, 61 bytes Thanks to @FDinoff for the tips: lynx -dump codegolf.stackexchange.com/posts/28164/body|grep 2
user avatar
33 votes

418: I'm a teapot

Bash (33) nc -lp80 -q1<<<"HTTP/1.1 418 ";$0
user avatar
  • 31.1k
33 votes

Debunking Stroustrup's debunking of the myth “C++ is for large, complicated, programs only”

Emacs Lisp ...
user avatar
32 votes

418: I'm a teapot

PHP - 85 bytes <?for($s=socket_create_listen(80);socket_write(socket_accept($s),"HTTP/1.1 418 ");); Saved with Windows-Style (CR-LF) line endings, requires <...
user avatar
  • 32.6k
31 votes
Accepted

Check if computer is connected to the internet

Bash (with dnsutils), 3 bytes Sends a DNS request for "." (DNS root), exit code is 0 for success and >0 otherwise. Golfed dig Test ...
user avatar
  • 8,386
30 votes

What's my PPCG ID?

Stack Exchange Data Explorer, 56 54 53 51 46 bytes -1 byte thanks to Hyper Neutrino. -5 bytes thanks to Giacomo Garabello. ...
user avatar
29 votes

Debunking Stroustrup's debunking of the myth “C++ is for large, complicated, programs only”

Scala """\"(https?://.*?)\"""".r.findAllIn(scala.io.Source.fromURL("http://www.stroustrup.com/C++.html").mkString).foreach(println)
user avatar
  • 907
25 votes

Debunking Stroustrup's debunking of the myth “C++ is for large, complicated, programs only”

PHP 5 <?php preg_match_all('/"(https?:\/\/.*?)"/',file_get_contents('http://www.stroustrup.com/C++.html'),$m); print_r($m[1]);
user avatar
  • 907
25 votes

Open the browser to http://codegolf.stackexchange.com

PowerShell, 17 16 Bytes saps www.ppcg.lol Using an even shorter domain provided by Milo. saps www.ppcg.ga While ...
user avatar
  • 1,095
24 votes

A simple TCP server

Linux ELF/x86, 146 bytes ...
user avatar
  • 3,096
24 votes

Stack Exchange Vote Counter

JavaScript ES6, 107 bytes fetch`//api.stackexchange.com/posts/82672?site=codegolf`.then(r=>r.json()).then(b=>alert(b.items[0].score)) Real ...
user avatar
24 votes

Was it Really Canada Day?

Bash, 43 42 40 bytes curl -L enwp.org/$@|grep -o Canada|wc -l Uses curl, grep, and ...
user avatar
  • 341
23 votes

Write a program that downloads itself

Ruby, 155 186 195 148 138 110 97 characters require'open-uri';puts open('http://codegolf.stackexchange.com/posts/28159/body').read[/req.+;/]; I had to make it ...
user avatar
  • 70.5k

Only top scored, non community-wiki answers of a minimum length are eligible