
TIO: Try it online - blacksqr
https://tio.run/#
======
jonahx
Some clarifications are in order:

This site is _not_ a competitor to codepen, jsfiddle, etc. It's main purpose
is to allow play with programming languages you'd otherwise have to install
locally -- specifically, it's extremely helpful when browsing
[https://codegolf.stackexchange.com/](https://codegolf.stackexchange.com/) \--
the author is a prolific and impressive contributor to that site.

It's sad to see a simple, well-designed, free, open-source project embracing
the values of the HN crowd ("The TIO web app is free of charge, ad-free, and
doesn't use tracking cookies or third-party analytic scripts.") -- and the top
comment, as well as many others, are essentially a nitpick about a bug that
can be trivially fixed.

~~~
ouid
>It's sad to see

No it's not. The top comment is a bug report because people are using the app.
It also _got fixed_ , which, for a comment chain, is about as much value as
possible.

------
TryItOnline
Looks like getting mentioned on Hacker News is an excellent way to get your
servers overloaded. :) I've added a couple of additional servers.

I'll work on the issues that were brought up here asap. TIO only has two
developers at this point (and only one of us works on the web app), so "asap"
might take a little while.

~~~
fatmotherpucker
Good job for the website though! It'll be very helpful to many people.

------
olalonde
Really cool. Would be great if each language had an "hello world" example
which would populate the fields.

~~~
gluczywo
For Go:
[https://tio.run/##S8//X5CYnJ2YnqqQm5iZx5WZW5BfVKKglJZbovQ/rT...](https://tio.run/##S8//X5CYnJ2YnqqQm5iZx5WZW5BfVKKglJZbovQ/rTQvGSysoalQzcUJFNMLKMrMK8nJ01DySM3JyVcIzy/KSVHS5Kr9/x8A)

BTW Do we really need ~540 bits (~90 chars of base62) to identify permanent
link?

~~~
DiThi
Looks like it encodes the whole code instead of storing it somewhere, so yes.

------
zepolen

      cat /etc/passwd
    
      root:x:0:0:root:/root:/bin/bash
      bin:x:1:1:bin:/bin:/sbin/nologin
      daemon:x:2:2:daemon:/sbin:/sbin/nologin
      adm:x:3:4:adm:/var/adm:/sbin/nologin
      lp:x:4:7:lp:/var/spool/lpd:/sbin/nologin
      sync:x:5:0:sync:/sbin:/bin/sync
      shutdown:x:6:0:shutdown:/sbin:/sbin/shutdown
      halt:x:7:0:halt:/sbin:/sbin/halt
      mail:x:8:12:mail:/var/spool/mail:/sbin/nologin
      operator:x:11:0:operator:/root:/sbin/nologin
      games:x:12:100:games:/usr/games:/sbin/nologin
      ftp:x:14:50:FTP User:/var/ftp:/sbin/nologin
      nobody:x:99:99:Nobody:/:/sbin/nologin
      systemd-timesync:x:999:998:systemd Time Synchronization:/:/sbin/nologin
      systemd-network:x:192:192:systemd Network Management:/:/sbin/nologin
      systemd-resolve:x:193:193:systemd Resolver:/:/sbin/nologin
      dbus:x:81:81:System message bus:/:/sbin/nologin
      polkitd:x:998:997:User for polkitd:/:/sbin/nologin
      rpc:x:32:32:Rpcbind Daemon:/var/lib/rpcbind:/sbin/nologin
      abrt:x:173:173::/etc/abrt:/sbin/nologin
      sshd:x:74:74:Privilege-separated SSH:/var/empty/sshd:/sbin/nologin
      cockpit-ws:x:997:995:User for cockpit-ws:/:/sbin/nologin
      rpcuser:x:29:29:RPC Service User:/var/lib/nfs:/sbin/nologin
      nfsnobody:x:65534:65534:Anonymous NFS User:/var/lib/nfs:/sbin/nologin
      tss:x:59:59:Account used by the trousers package to sandbox the tcsd daemon:/dev/null:/sbin/nologin
      chrony:x:996:994::/var/lib/chrony:/sbin/nologin
      tcpdump:x:72:72::/:/sbin/nologin
      systemd-coredump:x:993:993:systemd Core Dumper:/:/sbin/nologin
      apache:x:48:48:Apache:/usr/share/httpd:/sbin/nologin
      epmd:x:992:991:Erlang Port Mapper Daemon:/dev/null:/sbin/nologin
      runner:x:1000:1000::/home/runner:/bin/bash
      tio:x:1001:1001::/home/tio:/bin/bash

~~~
gluczywo
This was my first thought: sandboxing is gonna be tricky for such project.

~~~
minxomat
Not really, with SELinux, which is what TIO uses. TIO can be deployed pretty
much anywhere SEL is supported. Instructions here:
[https://github.com/TryItOnline/tiosetup](https://github.com/TryItOnline/tiosetup)

------
keganunderwood
Not a comment about tio but I didn't realize it isn't possible to write a
simple hello world in C# dot net core.

What a shitty situation.

What can we do to make it better? Provide a default csproj file on load? Any
better ideas?

Microsoft (R) Build Engine version 15.3.117.23532 Copyright (C) Microsoft
Corporation. All rights reserved.

code.cs(1,22): error CS1022: Type or namespace definition, or end-of-file
expected [/home/runner/project/project.csproj] code.cs(1,22): error CS1026: )
expected [/home/runner/project/project.csproj]

Build FAILED.

code.cs(1,22): error CS1022: Type or namespace definition, or end-of-file
expected [/home/runner/project/project.csproj] code.cs(1,22): error CS1026: )
expected [/home/runner/project/project.csproj] 0 Warning(s) 2 Error(s)

Time Elapsed 00:00:04.92 No executable found matching command "dotnet-
project/bin/Debug/netcoreapp*/project.dll"

Real time: 6.033 s User time: 2.973 s Sys. time: 0.442 s CPU share: 56.61 %
Exit code: 1

~~~
eterm
Just filling in some default fields in the tio editor would do. For example
pre-fill the header as:

    
    
       using System;
       using System.IO;
    

and pre-filling Code with

    
    
       namespace example
       {
          public class Example
          {
             static void Main(){
             }
          }
       }
    

(But better names, my naming sucks!)

That would go a long way, then you could just add "Console.WriteLine("Hello
World"); for hello world.

~~~
milesdyson_phd
You don't even need the namespace or the usings if you just want to print
hello world either.

~~~
solidsnack9000
What does the minimal program actually look like?

~~~
driekwartappel
This looks like the minimal:

    
    
      class HelloWorld
      {
        static void Main()
        {
           System.Console.Write("Hello world!");
        }
      }
    

Try it online:
[https://tio.run/##Sy7WTc4vSv3/PzknsbhYwSM1Jyc/PL8oJ4WrmktBob...](https://tio.run/##Sy7WTc4vSv3/PzknsbhYwSM1Jyc/PL8oJ4WrmktBobgksSQzWaEsPzNFwTcxM09DEygIkgCC4MriktRcPef8vOL8nFS98KLMklQNJbABCuUgExSVNK2BSmu5av//BwA)

------
sbierwagen
Looks like [http://repl.it/](http://repl.it/) but with more languages.

~~~
lucb1e
Repl.it sounded really epic... except it's not REPL, at least not for the
first language that I wanted to repl: C
([https://repl.it/languages/c](https://repl.it/languages/c)).

Still, I like the website better than TIO. At TIO I picked PHP to test and it
gives me options like headers, options (without a list of options/settings to
modify, just an "Add" button)... I just want to type code in an editor and run
it. Repl.it also has syntax highlighting.

(For those who don't know, REPL is read-evaluate-print-loop, so it takes an
input (e.g. "int i = 0;"), evaluates it (runs it), prints any output, and
loops back to the start.)

~~~
amasad
For languages like C that don't ship with a repl we don't currently implement
one -- although we probably should, since a lot of them have third-party repl
libraries.

Check our most of our other languages. They're proper repls I promise ;)

I wrote about the distinction you're talking about when we released swift
support:

[https://repl.it/site/blog/swift](https://repl.it/site/blog/swift)

~~~
TeMPOraL
No love for Common Lisp? Please add Common Lisp :).

Anyway, pretty nice collection of languages you have there; a lot of which I
want to play with but don't feel like installing a proper toolchain yet. So
I'll definitely use the service :).

------
wink
A description would be nice. I tried clojure and it successfully printed when
my code was (+ 1 3) but I didn't grasp the input/arguments/etc...

~~~
pavelbr
Input is StdIn. Arguments are command line arguments. Header and Footer are
glued to code by newlines. Output is StdOut, Debug is StdErr and timing
information.

------
_kst_
I was pleasantly surprised to see my own joke language 99 in the list.

[https://github.com/Keith-S-Thompson/99](https://github.com/Keith-S-
Thompson/99)

I would have been even more pleasantly surprised if it worked.

~~~
pavelbr
Please contact @Dennis, the maintainer of TIO in talk.tryitonline.net, and
tell him what isn't working. Fixes and language requests tend to be resolved
within a day, because Dennis is awesome.

------
winstonsmith
I really look forward to using this. It would be a great help to mobile users
if uneeded options, e.g., 'header', could be made to disappear to save screen
real estate.

------
jhgjklj
The site is usable but can be made a lot better simply by changing the
priorities.

Hide all those compiler flags etc in the first page. The idea is if any one
needs such advanced settings surely the source code will be multi page source
code, even for the special use case it would be in the 1 % users.

Include some template code which is readily compilable. THis is will be useful

The sharable link should be integrated with reddit, google +, etc to be more
resistance free sharing.

~~~
ConorOBrien
Except for in C, when you want to use the math library, you'd need the `-lm`
option, which comes up fairly commonly.

------
arikrak
Nice, looks pretty useful!

I think the default execution time should probably be less than 60 seconds.
Most simple programs that people run on this kind of site should have an
execution time of less than a second, so ~10 seconds should certainly be
enough by default. This would free up some resources on your end and would
inform people more quickly that they may have an infinite loop in their code.

~~~
potatoasdsadsad
On codegolf.stackexchange.com we have answers that need all 60 seconds. This
would not be viable

------
jamestimmins
This is extremely cool. I'm impressed that they were able to get it up and
running with so many different languages.

------
cecicasa
This is my code for Hello world in c++
[https://tio.run/##HckxCoUwDADQPaeIuigoOGtx9hqSBinEVGqKg/yz96...](https://tio.run/##HckxCoUwDADQPaeIuigoOGtx9hqSBinEVGqKg/yz96Pre3Sew05UShOUJHtGF@JlibdjAYCghscWtO3ggcv8NFHMhs5hvbJI7PGOSXxVv/Q9q5cZEltOiuMMv1L@)

------
limeblack
The play button turning into a gear that spins is pretty cool. First time I
have seen that.

~~~
pavelbr
The reason it's the first time you've seen might be because it's stupidly
difficult to get that effect to work on IE/Edge. You might notice that there's
a different effect on the run button for those browsers.

------
pepijndevos
Would be nice to support Piet.

~~~
danellis
Pony, too.

------
prodikl
am i not getting this? i typed echo "hello"; for PHP and the output says "echo
'hello';"

it just repeated back what i typed instead of processing the code hmm

~~~
robbles
it works exactly like the real PHP interpreter:

    
    
       <?php echo "hello"; ?>

------
pmarreck
Needs Elixir support.

For the record, hello world in elixir is

IO.puts "Hello World"

~~~
pavelbr
You can ping the site's maintainer, @Dennis, in talk.tryitonline.net. Bug
reports and language requests tend to be resolved withing the same day of them
being submitted, because Dennis is awesome.

~~~
TryItOnline
talk.tryitonline.net requires an SE account and 20 rep.

There's also
[https://gitter.im/tryitonline/Requests](https://gitter.im/tryitonline/Requests)
(requires a Gitter account),
[https://github.com/TryItOnline/tryitonline/issues](https://github.com/TryItOnline/tryitonline/issues)
(requires a GitHUb account), and email (feedback@tryitonline.net).

------
danieldrehmer
This is pretty great!

It would be nice to add swift and elixir on the list.

------
a-b
Code samples for each language would be appreciated

------
eridius
Looks neat, but the code editor really needs syntax highlighting and
intelligent indentation.

~~~
KeyboardFire
It's not meant to be an editor. That sounds like unnecessary feature creep -
the point is to run snippets of code in different languages through your web
browser, not to be an IDE.

~~~
skinnymuch
I think syntax highlighting makes sense. People do write code right into
things like this. In that case, syntax highlighting helps if that's what
you're used to. Also it is helpful even if copy pasting for readability if
you're normally used to syntax highlighting.

------
ramgorur
no c++/g++ ??

~~~
potato44
It is there. [https://tio.run/#cpp-gcc](https://tio.run/#cpp-gcc)

------
meggar
no swift?

~~~
pavelbr
TIO is powered by Fedora Linux, and unfortunatly the site's maintainer was
unable to get the Linux port of Swift to work. This may change in the near
future, however.

------
netcyrax
Site is down.

------
lai
This looks cool, but can you guys fix your push state code, I can't hit back
to come back to HN.

~~~
dookahku
confirmed. Chrome 59.0.3071.115 on Mac back button is broken.

cool site, tho

~~~
likelynew
Long press back button and select HN.

~~~
venning
Doesn't help you on mobile.

~~~
riquito
It works on Firefox, give it a try

------
razorunreal
Breaks the back button.

~~~
sbierwagen
Yeah, hijacks left-swipe on mobile safari, too. Annoying!

------
behnood85
I don't like it. I still prefer Codepen and jsfiddle.

~~~
ygra
What do they do for languages other than JavaScript?

~~~
behnood85
Ok, then Codeanywhere would be a better choice. Don't you think? ;)

~~~
TryItOnline
Saying that Codeanywhere is a better choice than TIO is like saying that GMail
is a better choice than Netflix.

In both cases, both services were built for different purposes, and neither
one can or intends to replace the other.

