You are not logged in.

#1 2018-10-17 07:37:42

/dev/zero
Member
From: Melbourne, Australia
Registered: 2011-10-20
Posts: 1,247

dice

I've been working on a fast interpreter and shell for standard dice notation.

https://notabug.org/cryptarch/dice

It doesn't have an AUR package because you just clone it, compile it, and put it somewhere in your path.

It is different to other similar software in these ways:

  • Written in pure C to be performant and limit dependencies

  • Multiple modes of operation are supported: interactive shell, script interpreter, stdin

  • Multithreaded (no special libraries required if you use recent GCC)

  • GPL licence

  • Already trialled in practice for actual table-top RPGing

Let me know if you spot bugs or ways to make it more performant.

If you have exotic platform requirements such as Windows, I will consider careful pull requests.

Offline

#2 2018-10-17 11:02:25

ayekat
Member
Registered: 2011-01-17
Posts: 1,589

Re: dice

That looks indeed nice, I'm gonna try that the next time I play MtG with this card smile

/dev/zero wrote:

It doesn't have an AUR package because you just clone it, compile it, and put it somewhere in your path.

Well, as it is so trivial, let's package it!

# Maintainer: {your name could be here}

pkgname=dice-git
pkgver=r100.3861cb8
pkgrel=1
arch=(x86_64)

pkgdesc='Interpreter and shell for standard dice notation'
license=(GPL2)

depends=(readline)
makedepends=(git)
checkdepends=(datamash)

source=('git+https://notabug.org/cryptarch/dice')
md5sums=(SKIP)

pkgver() {
  cd dice
  printf 'r%s.%s' "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

build() {
  cd dice
  make
}

check() {
  cd dice
  make check
}

package() {
  cd dice
  install -Dm0755 dice "$pkgdir"/usr/bin/dice
}

EDIT: Add missing git makedepends

Last edited by ayekat (2018-10-17 11:09:32)


pkgshackscfgblag

Offline

#3 2018-10-17 11:52:57

/dev/zero
Member
From: Melbourne, Australia
Registered: 2011-10-20
Posts: 1,247

Re: dice

ayekat wrote:

That looks indeed nice, I'm gonna try that the next time I play MtG with this card smile

Hey, that's a pretty novel use, thanks for the heads up. I'll keep it in mind when I'm trying to play MtG against my brother smile

ayekat wrote:
/dev/zero wrote:

It doesn't have an AUR package because you just clone it, compile it, and put it somewhere in your path.

Well, as it is so trivial, let's package it!

Well ... it's currently getting close to v1.0. I have ideas on what it would take to push it over the line to a real version 1.0. It's just a matter of finding time and/or motivation to push ahead with those ideas.

Eg, I have ideas for new extensions to the syntax, such as a Shadowrun-style "number of rolls that beat target number" system.

Or, maybe I could split it so there is a library part plus a CLI wrapper to the library. Splitting it like this would allow better modularity, eg someone else who wanted to parse dice notation could just use the library part, even if they wanted to skip or reimplement the way I've done the CLI.

Either way, it's not set in stone the way it is. It is currently short of its first real v1.0.

I'd rather endorse particular releases as either, "okay, here's some new features" or "okay, here's some bug fixes for those new features".

So with all the possible near-future chaos, I hesitate to push ahead with an AUR package right now.

I mean, I don't object to the existence of an aur package, if that's what you want to do. If you want to have an AUR package like "dice-git" that brings in my latest changes from notabug, that's your prerogative. But it's not something I want to do myself.

When it comes to putting particular releases on AUR, I can do that if you like, or you or someone else can do it, it doesn't matter to me who does it.

Thanks for your interest and encouragement, I appreciate it smile

Offline

Board footer

Powered by FluxBB