[HN Gopher] Replit now supports every programming language in Nix
___________________________________________________________________
Replit now supports every programming language in Nix
Author : bobrenjc93
Score : 80 points
Date : 2021-05-24 20:26 UTC (2 hours ago)
(HTM) web link (blog.replit.com)
(TXT) w3m dump (blog.replit.com)
| saagarjha wrote:
| This wouldn't be Hacker News without pedantic corrections, but
| the title should really say "every programming language in Nix".
| dang wrote:
| Ok, we've Nix'd the title above. Thanks!
| [deleted]
| jchw wrote:
| Yeah. Somewhat notably, GNU Ada/gnat has been broken in Nix
| forever, and generally the difficulties of making things work
| correctly under Nix is great enough that some stuff is pretty
| hard to keep up to date or available at all. Of course it works
| well for almost everything, but there are limitations; it
| definitely is a complex thing.
|
| edit: It looks like my information might be out of date as it
| appears gnat is back in Nixpkgs. That's great news, although I
| think the point regarding complexity still stands, since I
| believe it was broken for quite a while at some point, and
| broke a few times since too.
| Kinrany wrote:
| Opening code in the example repls shows the contents of the
| .replit file, but the file itself is not visible in the list of
| files.
| cbrewster wrote:
| Hi, one of the authors here. The Nix environment on Replit is
| under development right now, we hid the configuration files to
| clean up the filetree as most users shouldn't need to know
| about the config files unless they are customizing the repl
| environment.
|
| However, we are reverting that change for now since we don't
| offer a good way to access those files yet. I'll reply here
| once they are visible again.
| Bostonian wrote:
| No, you don't. Fortran is still an important language in
| scientific computing, and you don't support it. The gfortran
| compiler is part of gcc, so I think you should be able to. I also
| don't see Cobol, Ada, and Pascal. If you don't think these
| languages are worth supporting, so be it, but asserting that they
| don't exist may irk people using those languages.
| cbrewster wrote:
| We don't have templates for every language, but if it's
| available in Nix, you can set this up in a repl.
| https://replit.com/@ConnorBrewster/fortran
|
| We will be expanding our collection of templates over time, but
| Nix allows us to make language setup be a user-space concern
| instead of us internally maintaining a collection of languages
| configurations and docker images.
| Bostonian wrote:
| Thanks, it works for me. Gfortran is a traditional compiler,
| but LFortran is "is a modern open-source (BSD licensed)
| interactive Fortran compiler built on top of LLVM. It can
| execute user's code interactively to allow exploratory work
| (much like Python, MATLAB or Julia) as well as compile to
| binaries with the goal to run user's code on modern
| architectures such as multi-core CPUs and GPUs."
|
| When LFortran is ready, it would be nice if you supported it
| too, since it is a Fortran REPL.
| cbrewster wrote:
| Neat, if it gets added to nixpkgs it will be available on
| Replit!
|
| https://github.com/NixOS/nixpkgs
| whelming_wave wrote:
| I was just able to set this up by looking at their Nix example
| and swapping out pkgs.nix
|
| for pkgs.gfortran
|
| then changing the `.replit` file to compile and run a hello
| world example I found online. Worked great!
| jeppesen-io wrote:
| It's really exciting to see the Nix ecosystem start to gain
| traction here and there. I expect and look forward to greater
| adoption over the next half decade or so
| cercatrova wrote:
| Every? Even Shakespeare? Whitespace? Piet?
| cbrewster wrote:
| If they are in Nixpkgs they will likely work in a repl. Nixpkgs
| search: https://search.nixos.org/packages
|
| Piet:
| https://search.nixos.org/packages?channel=unstable&show=hask...
| WayToDoor wrote:
| Does that mean I can finally use PHP+sqlite in a REPL ?
| Jtsummers wrote:
| I've been using Replit to make demos for some lunch & learn
| events at work. It's easier when we don't all have the same
| development stack, various combinations of languages + IDEs +
| OSes. I've done most of the demonstrations with Java. However,
| there were some demos in other languages I was wanting to do that
| weren't feasible within Replit that now will be (at least
| theoretically). I'm looking forward to trying this out later this
| week.
| azhenley wrote:
| Can't wait to finally try out COBOL!
| itsarnavb wrote:
| Here ya go!
|
| https://replit.com/@ArnavBansal/nixed-cobol
___________________________________________________________________
(page generated 2021-05-24 23:01 UTC)