« first day (555 days earlier)      last day (1939 days later) » 

01:24
@Dennis Q# can't define an entry point by the way. You have to call it from C# (or F#/VB/Dyalog APL, but probably C#), so getting multiple files would be great.
Q# Hello World:
// Driver.cs
using System;
using System.Threading.Tasks;
using Microsoft.Quantum.Simulation.Simulators;

namespace Quantum.QSharpApplication1
{
    public class Driver
    {
        public static async Task Main(string[] args) {
            await Operation.Run(new QuantumSimulator());
        }
    }
}
// Operation.qs
namespace Quantum.QSharpApplication1
{
    open Microsoft.Quantum.Primitive;
    open Microsoft.Quantum.Canon;

    operation Operation () : ()
    {
        body
        {
            Message("Hello, World!");
        }
    }
}
@Pavel Won't the driver always be the same?
It could be, but Q# by itself is really limited.
There's Message for print-statment debugging, but no input reading.
@Dennis Also because operation Operation isn't always of type () : () (or void->void). It can take parameters and return a value by changing the signature, and the driver would have to be adjusted to pass in parameters or do something with the returned value.
Alright, looks like I'll have to defer Q# until I implement additional files.
Well, for the time being, having just that driver is ok. It's just that Q# would benefit the most from multiple files.
For the sake of example: gist.github.com/pavelbraginskiy/…
I see.
 
4 hours later…
05:25
@Dennis Could you pull Dirty please?
05:45
@Dennis is there a way to download/build a tryitoffline docker container with only a few selected languages? I don't need all of them, just python, ruby, cpp, and java
@HyperNeutrino Why even use TIO at that point
@Pavel because I can't figure out how to make my own docker container work with support for stuff like javac and gpp and ruby (BTW I'm making a contest grader)
Have you considered making calls to the TIO API?
Rather than hosting your own
considered it but a) can't get it to work, b) too slow
though actually running my own isn't ideal either. preferably i could just build my own container and have it work
 
7 hours later…
13:04
@HyperNeutrino I know as much about the Docker container as you do. Probably less.
@Οurous Done.
Anonymous
13:44
@Dennis Could you install Actually as a Python package via pip3 install seriously?
wanna make Python 3 +m: seriously code right now? I think Dennis adds modules like that on-demand or something
Anonymous
@EriktheOutgolfer I'm working on the single worst language idea I've ever had
oh and you need to call Actually within Python?
Anonymous
Yep
yeah, that's usually the case people install modules at all, but I don't see why Dennis should install it until he adds the language on TIO (which comes some time after adding it to "the list")
@Mego oh, and be sure to keep this up-to-date too
otherwise pip will not be able to find the updated version at all
Anonymous
13:55
@EriktheOutgolfer I already do via CI
but that's not the only place where it should be kept up-to-date
TIO should update it regularly too
Anonymous
Well that's Dennis's problem :P
Anonymous
Though he can just keep the package up-to-date, because it installs a console script runner (seriously), and so pulling can be replaced by updating through pip
I sincerely hope such a mechanism is already in place (yes, I'm referring to automatically updating through pip)
Anonymous
Also CI ensures that broken builds don't get uploaded to PyPI
13:57
yeah that's what a CI's job is after all
@Mego Does that generate an executable in the path? What is it called?
14:09
Nevermind, it's called seriously.
@Mego I'm not sure how, but that breaks 05AB1E.
Anonymous
Might be package collision
Oh, it creates .../site-packages/lib.
Anonymous
Turns out I messed up - yeah
Anonymous
I'll fix that this evening
Alright, I'll roll back for now.
14:31
yeah CI isn't the best thing ever :P
 
2 hours later…
16:05
Setting up Q# is actually quite simple: dotnet new -i "Microsoft.Quantum.ProjectTemplates::0.2-*" (Install Q#) cd /opt/microsoft/home && dotnet new console -lang Q# -o quantum (create project).
After that you can use it basically like the other .NET Core langs
 
4 hours later…
20:26
Why does the FRACTRAN "Hello, World!" take input and output 42 instead?
@Mr.Xcoder FFI can't output text yet.
Ah I see. Still 42 seems quite arbitrary.
It's the answer to life, the universe, and everything else.
Not arbitrary at all.
Would you mind me asking what it represents?
The answer to life, the universe, and everything else. Keep up.
(It's a reference to The Hitchhiker's Guide to the Galaxy)
21:12
@Mr.Xcoder This not possible to run a FRACTRAN program without input. The state has to be initialized to something.
I considered letting it default to 1, but that would restrict it to programs that run forever or not at all.
@Dennis why not 2? The smallest prime?
@Dennis do you have an automated test harness that tells you when the hello-world breaks or something?
Yes. I normally only test the language I've just pulled, but I test all 400+ of them after pip install and company.
@Dennis That’s good to know. Thank you!
@Οurous Right, [1] is the smallest non-zero state, so that makes sense. I think I'll do this.
21:42
@Dennis Can you add C# Script?
csharp .code.tio "$@" < .input.tio
Now that I know it exists, it's really convenient. Even when using the HW button to load a HW, there are a bunch of using directives that are automatically included in C# Script that I forget to include all the time using normally compiled C#.
And guess what? No semicolons needed
And implicit printing. I'm starting to think that this is just a wrapper for a REPL
@Pavel :P
@Pavel it is
It's totally usable as a scripting language though.
22:12
@Pavel Is that its name or just how you call it?
@Dennis I don't know if it has a proper name beyond "C# REPL"
Seems to call itself Mono C# Shell.
There's also a csi (C# Interactive) that functions in almost the same way
It doesn't have implicit printing for scripts and is more stringent about semicolons.
That would be the Roslyn variant.
It's worse for golfing but overall more practical. Hmm.
22:16
Well, if I add one of these, I might as well add both.
That works too
C# (Mono C# Shell) and C# (Visual C# Interactive Compiler). I do wonder why the Mono variant hasn't been renamed to Turbo...
man csharp says csharp - Interactive C# Shell and Scripting. csharp --help says Turbo. I'm not sure where you see Mono C# Shell, actually.
In the actual REPL.
Oh, dur
@Dennis If you add csharp, call it with csharp -s .code.tio, which allows for getting arguments.
22:20
Yes, or --.
Already read the man page.
Ok
csi doesn't have a manpage but it behaves like csharp -s by default.
I noticed the man page suggests #!/usr/bin/env csharp -s. This causes /usr/bin/env: ‘csharp -s’: No such file or directory both locally and on TIO. I noticed the Mathematica docs for wolframscript also say to use #!/usr/bin/env wolframscript -file, which has the same issue.
The manpage suggests /usr/bin/csharp -s, which is different. You cannot pass csharp -s to env.
@Dennis Try man csharp|grep env
Right. That's a bug.
I actually wrote to Wolfram Research asking them to fix the wolframscript docs. They wrote back and said that they see no problem :(
Thanks!
@Dennis Oh, for csi, HW can just be WriteLine("Hello, World!") without Console.
It also has the Perl thing where the only the last statement doesn't require a semicolon, and I noticed Perl's HW has the semicolon present.
mono-shell doesn't require them anywhere except in {block}s.
Changed.
^-^
We now have more C# than Befunge implementations. :P
Hah
Still, counting Befunge variants, there's not quite that much C#.
22:54
I was kidding anyway. We still need three C# compilers for a tie.
clearly Charcoal is superior in that it's three variants in one
Brain-flak has quite a few variants too, and Klein has too many
@Dennis I thought you were counting all the FBBIs, PyFunges, and MTFIs as one each.
Although I suppose if you did that, C# would be just 3 with mcs, csc, and dotnet

« first day (555 days earlier)      last day (1939 days later) »