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
...
115
votes
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!
...
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 ...
67
votes
66
votes
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 ...
54
votes
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 ...
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 ...
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:
...
46
votes
Stack Exchange Vote Counter
jQuery + JavaScript, 85 bytes
$.get("//api.stackexchange.com/posts/82610?site=codegolf",d=>alert(d.items[0].score))
...
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):
...
43
votes
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 ...
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*)+"))
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 ...
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
33
votes
33
votes
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 <...
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
...
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.
...
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)
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]);
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 ...
24
votes
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 ...
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 ...
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 ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
internet × 117code-golf × 105
stack-exchange-api × 21
parsing × 12
string × 7
random × 4
quine × 4
code-challenge × 3
decision-problem × 3
sequence × 2
kolmogorov-complexity × 2
graphical-output × 2
self-referential × 2
search × 2
browser × 2
number × 1
array × 1
popularity-contest × 1
tips × 1
date × 1
graph-theory × 1
image-processing × 1
regular-expression × 1
bitwise × 1
classification × 1