NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
17.49k stars 13.68k forks source link

Bosatsu #66281

Open matthew-piziak opened 5 years ago

matthew-piziak commented 5 years ago

Project description

Bosatsu is a simple, non-turing complete language designed for configuration, queries and scripting.

Here is a working Bosatsu program to solve the first Project Euler problem:

package Euler/One

# see:
# https://projecteuler.net/problem=1
# Find the sum of all the multiples of 3 or 5 below 1000.

operator == = eq_Int
operator % = mod_Int

def operator ||(x, y):
  True if x else y

def keep(i):
  (i % 3 == 0) || (i % 5 == 0)

def sum(as): as.foldLeft(0, add)

# >>> sum(i for i in xrange(1000) if keep_fn(i))
# 233168
computed = [i for i in range(1000) if keep(i)].sum

test = Assertion(computed == 233168, "expected 233168")

Metadata

stale[bot] commented 4 years ago

Thank you for your contributions.

This has been automatically marked as stale because it has had no activity for 180 days.

If this is still important to you, we ask that you leave a comment below. Your comment can be as simple as "still important to me". This lets people see that at least one person still cares about this. Someone will have to do this at most twice a year if there is no other activity.

Here are suggestions that might help resolve this more quickly:

  1. Search for maintainers and people that previously touched the related code and @ mention them in a comment.
  2. Ask on the NixOS Discourse.
  3. Ask on the #nixos channel on irc.freenode.net.
AndersonTorres commented 3 years ago

Do we have a stable programming environment for Scala packages?

AndersonTorres commented 3 years ago

I have no idea how to build it in Nixpkgs. I tried to open a simple shell, but the command sbt cli/assembly does a huge download of Maven libraries.

AndersonTorres commented 3 years ago

Chatting about it on Discord, there are two projects about building via SBT:

https://github.com/zaninime/sbt-derivation

https://github.com/gvolpe/sbt-nix.g8

stale[bot] commented 3 years ago

I marked this as stale due to inactivity. → More info