| Bytes | Lang | Time | Link |
|---|---|---|---|
| 050 | Common Lisp | 160404T160858Z | JPeroute |
| 029 | Factor | 160330T161849Z | cat |
| 016 | PowerShell | 160330T201005Z | Matt |
| 076 | Perl 5 | 160331T075906Z | Sake |
| 007 | Vyxal | 230109T185323Z | pacman25 |
| 151 | Java 7 | 160330T162628Z | hyperneu |
| 019 | Zsh on MacOS | 221231T054023Z | roblogic |
| nan | GNU Emacs | 160330T155400Z | coredump |
| 038 | SX | 160923T123132Z | Erik the |
| 011 | Pylongolf | 160330T180715Z | user4701 |
| 016 | 05AB1E | 160330T183500Z | Adnan |
| 040 | Red | 210602T172410Z | wasif |
| 084 | VBA | 210409T104917Z | wasif |
| 058 | URL | 190921T182656Z | eriandev |
| 037 | C gcc | 190921T155254Z | girobuz |
| 047 | VBScript | 190921T153603Z | Lewis |
| 041 | Oration | 160330T160943Z | Riker |
| 040 | Python | 170727T215340Z | NoOneIsH |
| 019 | Dyalog APL | 160330T192716Z | Adá |
| 089 | C# Full Class | 160403T040535Z | WVAviato |
| 047 | Nim | 160924T161413Z | Copper |
| 044 | Python | 160330T150410Z | Skyler |
| 057 | VBScript | 160331T083611Z | Ismael M |
| 040 | Python | 160330T175400Z | Zach Gat |
| 065 | Cheddar | 160726T202322Z | Downgoat |
| 019 | Ruby | 160330T221535Z | Riker |
| 030 | Lua | 160411T120732Z | Katenkyo |
| 015 | Rebol 2 | 160331T084105Z | sqlab |
| 044 | Python | 160402T154850Z | Erik the |
| 112 | Java 8 | 160330T171240Z | hyperneu |
| 028 | Mathematica | 160330T151333Z | Martin E |
| 022 | RFOBASIC | 160401T143038Z | TickTock |
| 045 | Perl 6 | 160403T064336Z | Ming-Tan |
| 016 | AutoHotKey | 160330T181916Z | Michelfr |
| 017 | Windows Batch | 160402T020732Z | Isaiah |
| 028 | Applescript | 160330T184159Z | Digital |
| 117 | Actionscript 3 | 160330T184108Z | Brian |
| 017 | Batch | 160330T150535Z | Morgan T |
| 017 | Terminal OSX | 160330T151104Z | Mwr247 |
| 061 | C++ | 160404T045342Z | HSchmale |
| 033 | PHP OSX | 160331T092855Z | Quill |
| 026 | Game Maker Studio | 160401T172457Z | Timtech |
| 030 | VB.NET | 160331T154304Z | Matt Wil |
| 028 | R | 160331T095534Z | mnel |
| 033 | C# | 160330T230300Z | Travis J |
| 022 | Bash | 160330T161257Z | Ogaday |
| 025 | MATLAB | 160330T151932Z | Suever |
| 026 | R | 160330T165132Z | syntonic |
| 034 | JavaScript | 160330T150217Z | Downgoat |
| 053 | NodeJS | 160330T151408Z | Mwr247 |
Common Lisp, 50 31 bytes
(ext:shell "open http:codegolf.stackexchange.com")
Note: This worked at the time of writing. The domain ppcg.ga has since expired, making this answer no longer valid.
Factor, 38 36 26 29 bytes
[ "http:t.ly/-E-J" open-url ]
I didn't know one could golf-off the // in the protocol.
PowerShell, 17 16 Bytes
saps www.ppcg.lol
Using an even shorter domain provided by Milo.
saps www.ppcg.ga
While start is a known alias for Start-Process there is another one for saps. You can see this from Get-Alias. It follows the convention for similar Start- and Stop- cmdlets.
As those URLs no longer exist the only way to make this work is to use the horribly inefficient 36 characters for
saps http:codegolf.stackexchange.com
At least we can drop the slashes no problem
Perl 5, 66 57 76 bytes
Should work everywhere, but needs that import :(
8 bytes saved with @msh210 comment.
use Browser::Open open_browser;open_browser"http:codegolf.stackexchange.com"
Also, for funsies :
Perl 5 (Windows), 34 48 bytes
system "start http://codegolf.stackexchange.com"
Perl 5 (Unix), 31 49 bytes
system "xdg-open http:codegolf.stackexchange.com"
Vyxal 7 bytes
`∨¤ β`E
The short dictionary is a neat hidden feature, compressing the codegolf link to β
Java 7, 151 bytes
class P{public static void main(String[]a)throws Exception{java.awt.Desktop.getDesktop().browse(new java.net.URI("http:codegolf.stackexchange.com"));}}
Java is not the best language for golfing... Here's the same program in a more readable format:
class P {
public static void main (String[] a) throws Exception {
java.awt.Desktop.getDesktop().browse(new java.net.URI("http:codegolf.stackexchange.com"));
}
}
Saved 2 bytes by removing // in the URI/L, and another byte by switching to .ga from .lol (indirectly thanks to @Milo)
GNU Emacs, 29 27 14 33 bytes
(eww"codegolf.stackexchange.com")
The previous answer with a URL shortener was:
(eww"ppcg.ga") ;; 14 bytes
However:
Much like ppcg.lol, ppcg.ga has been unregistered, invalidating this answer. But unlike last time, there is no replacement short url. (@lyxal)
EWW is a browser inside Emacs. The browse-web function is an alias for eww, and so that makes eww the default browser in Emacs:
Your job is to open a browser window of the default browser to http://codegolf.stackexchange.com.
Thanks to @CoolestVeto, @Jonathan Leech-Pepin and @zyabin101.
SX, 38 bytes
的 webbrowser im**;o&('http:ppcg.ga')
Save this shell script as SXexec.sh to your SX directory:
#!/bin/sh
N=$1.py;python Main.py $1;wine SXCompiler.exe $N;rm $N;python $N.py;rm $N.py
The script features tidying up after execution. To execute the above script, you need to have Wine and Python. Usage is like this:
SXexec.sh file
05AB1E, 16 bytes
The features used here postdate the challenge, but that's fine. Code:
’…Ò ™³.ÐÏg.´¢’.E
You can try the string online here. This basically evaluates to this batch answer.
Uses the CP1252 encoding.
Red, 40 bytes
browse http://codegolf.stackexchange.com
ppcg.ga no longer works, so needed to include the full domain name. But its funny that Red has its own URL data type!
VBA, 84 bytes
Sub Main()
ThisWorkbook.FollowHyperlink("http://codegolf.stackexchange.com")
End Sub
URL, 58 bytes
[InternetShortcut]
URL=https://codegolf.stackexchange.com
In Windows create a file "url.URL", with a code editor put the code.
C (gcc), 49 38 37 bytes
main(){system("start http:ppcg.ga");}
It's for Windows.
VBScript, 47 bytes
CreateObject("WScript.Shell").Run"http:ppcg.gq"
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:
I need compiles to import $1 with webbrowser being the module.
Now runs the following command from the module as module.command with the arguments of anything following.
So this compiles to:
#!/usr/bin/env python3
import webbrowser
webbrowser.open("http:ppcg.ga")
I do end up needing the http: part though, and it can't be shortened.
Python, 40 bytes
__import__('webbrowser').open('ppcg.ga')
Shorter version of everything else.
Dyalog APL, 20 19 bytes
-1 byte thanks to MD XF
]Open http://ppcg.ga
Uses the User Command ]Open, which is installed with Dyalog.
C# (Full Class) 89 bytes
class P{static void Main(string[]a){System.Diagnostics.Process.Start("http://ppcg.ga");}}
Not sure that it's possible to write a full class (with the System.Diagnostics reference) any shorter.
Inside main method only without references, 32 bytes:
Process.Start("http://ppcg.ga");
Nim, 47 bytes
import browsers
openDefaultBrowser"www.ppcg.ga"
Python, 52 48 47 45 44 bytes
Shamelessly borrowing that shortened link.
from webbrowser import*;open("http:ppcg.ga")
Thanks to CrazyPython for -4 bytes, and Sp3000 for a further one.
Edit: shaved 2 more off thanks to CoolestVeto
Edit: thanks to MD XF for registering ppcg.ga and saving another byte
VBScript, 57 bytes
I used to have lots of fun creating tiny programs in VBScript, back in 2010.
I've remembered this language and used the code on: https://stackoverflow.com/a/13401872/2729937
It still works on Windows 7, at least.
set S=CreateObject("WScript.Shell")
S.run("www.ppcg.ga")
This is a bit different from the usual start www.ppcg.lol, in the sense that it executes the www.ppcg.ga directly, with an implicit start.
An alternative way would be "cmd.exe /C start www.ppcg.ga".
Python, 43 41 40 bytes
import os
os.system("open http:ppcg.ga")
- -2 bytes thanks to @Quill.
- -1 byte thanks to @MDXF.
Cheddar, 65 bytes
cheddar.internal(cheddar.uid).require("open").c("http://ppcg.ga")
Accesses cheddar internals and then calls upon open package and calls it with string to PPCG. Make sure you have open npm package installed
Ruby, 22 20 19 bytes (on OS X)
`open http:ppcg.ga`
Simple.
Thanks to Daniel for 2 bytes off.
Lua, 30 Bytes
os.execute'start http:ppcg.ga'
Rebol 2, 16 15 bytes
browse"ppcg.ga"
if you accept an error before opening the page on Linux, no error on Windows
20 bytes without an error
browse http:ppcg.lol
Python, 44 bytes
from webbrowser import*;open('http:ppcg.ga')
URL from this comment
Edit: ppcg.ga seems to become more popular now (but it WAS available when I posted this answer).
Ungolfed:
from webbrowser import * # Loads everything in the webbrowser module
open("http://ppcg.ga/") # Opens default browser to http://ppcg.ga/
Python, 44 bytes
from webbrowser import*;open('http:gfa1.tk')
URL from this answer
Ungolfed:
from webbrowser import * # Loads everything in the webbrowser module
open("http://gfa1.tk/") # Opens default browser to http://gfa1.tk/
Python, 45 bytes
from webbrowser import*;open('http:ppcg.lol')
Ungolfed:
from webbrowser import * # Loads everything in the webbrowser module
open('http://ppcg.lol/') # Opens default browser to http://ppcg.lol/
Take that, ppcg.lol! (1 byte shorter)
Note: I added a separate answer leading to ppcg.lol, 'cause I've noticed the other sites doesn't work for me in Internet explorer 11, and I saw other users having this problem too.
Both are non-non-competing (read that right?)
Java 8, 115 112 bytes
interface P{static void main(String[]a)throws Exception{java.awt.Desktop.getDesktop().browse(new java.net.URI("http:ppcg.ga"));}}
Java is not the best language for golfing... Here's the same program in a more readable format:
interface P {
static void main (String[] a) throws Exception {
java.awt.Desktop.getDesktop().browse(new java.net.URI("http:ppcg.ga"));
}
}
Saved 2 bytes by removing // (thanks @CoolestVeto), and another byte by switching to .ga from .lol (indirect thanks to @Milo)
Mathematica, 28 bytes
SystemOpen@"http://ppcg.lol"
Perl 6, 45 bytes
Requires the Browser::Open module.
use Browser::Open;open_browser 'http:ppcg.ga'
AutoHotKey, 16 bytes
Run www.ppcg.lol
Windows Batch, 17 bytes
start www.gfa1.tk
Applescript, 28 bytes
- 3 bytes saved thanks to @CoolestVeto.
open location"http:ppcg.lol"
Actionscript 3, 117 bytes
package{import flash.display.Sprite;public class A extends Sprite{function A(){navigateToUrl("ppcg.lol","_blank")}}}
Like Java, this is not a great golfing language. Here's the code with formatting:
package
{
import flash.display.Sprite;
public class A extends Sprite
{
function A()
{
navigateToUrl("ppcg.lol", "_blank")
}
}
}
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 work in Powershell too, but I'm not sure.
Terminal (OSX), 20 18 17 bytes
open http:ppcg.ga
Saved 2 thanks to CoolestVeto
C++, 61 Bytes
#include <cstdlib>
main(){system("xdg-open http:ppcg.lol");}
Just a rip off of the bash solution using system, and it only works on systems using the freedesktop tools. Also shortened by using the short link some kindly provided, otherwise it would be much longer.
PHP (OSX), 33 bytes
<?php exec("open http:ppcg.lol");
PHP (Windows), 34 bytes
<?php exec("start http:ppcg.lol");
Game Maker Studio, 26 bytes
url_open('http://ppcg.ga')
VB.NET, 32 30 bytes
Process.Start("http:ppcg.lol")
R, 28 bytes
browseURL("http://ppcg.lol")
(in utils package)
C#, 33 bytes
Process.Start("http://ppcg.lol");
Opens the default browser to the web address
Bash, 24 22 bytes
xdg-open http:ppcg.lol
Not as short as some others. firefox ppcg.lol is shorter, but it doesn't meet question spec.
MATLAB, 28 25 bytes
web www.ppcg.lol -browser
wwwis shorter thanhttp://and ensures that the address is processed as a URL- This is shorter using the implicit function call (which casts inputs as strings) rather than the explicit version
web('www.ppcg.lol', '-browser'). - If you are on a OS X, this can be simplified to
web ppcg.lol -browseras MATLAB will automatically append anhttp://(21 bytes)
Alternatives:
On windows this can be shortened to (19 bytes)
!start www.ppcg.lolOn OS X (21 bytes)
!open http://ppcg.lolThe following would work in a deployed MATLAB application (16 bytes)
web www.ppcg.lolIf the built-in browser could be used this could be reduced even further as
httpis implied (12 bytes)web ppcg.lol
R, 26 bytes
shell.exec("www.ppcg.lol")
I don't know of any shorter way to do this in R.
JavaScript, 34 bytes
require('open')('http://ppcg.lol')
Uses Node.js
NodeJS, 53 bytes
require('child_process').exec('open http://ppcg.lol')
Works on mac.