Re: dmt: Python-like indentation in D programming language

2021-11-16 Thread Imperatorn via Digitalmars-d-announce
On Tuesday, 16 November 2021 at 21:58:24 UTC, Witold Baryluk 
wrote:

Hi,

`dmt` is an old project of mine from around year 2006. I ported 
it recently from D1 to D2, and added some extra features and 
support for extra keywords, and fixed few bugs here and there.


[...]


Nice, remember to put it on dub


dmt: Python-like indentation in D programming language

2021-11-16 Thread Witold Baryluk via Digitalmars-d-announce

Hi,

`dmt` is an old project of mine from around year 2006. I ported 
it recently from D1 to D2, and added some extra features and 
support for extra keywords, and fixed few bugs here and there.


`dmt` is a converter (offline or auto-invoking compiler after 
conversion) from Python-like indention style to curly braces for 
D programming language.


https://github.com/baryluk/dmt

It is fun and easy to use, and maybe it would be of interested to 
you.


`example.dt`:

```d
def int f(int b):
int y = 0
foreach (i; 0..5):
  y += i * (i+b)
return y

struct A:
private:
int a
public:
int b_ = 5
def auto b() @property:
return b_

def void main():
import std
writefln!"%s %s"(f(5), A())
```

```shell
$ DMD=ldc2 dmt -run example.dt
ldc2 -run example.d
80 A(0, 5)
$
```

All D programming language features are supported (including 
exception handling, if/else, switch/case/break, inline asm, 
attribute sections, goto). Converted code is human readable.


You can check more examples in the README.md and in `tests/` 
directory.


`dmt` is not yet self hosting, but that is probably the next 
step. :)


Enjoy.



Re: [Semi-OT] Cross-Platform GitHub Action 0.3.0 - NetBSD

2021-11-16 Thread Sebastiaan Koppe via Digitalmars-d-announce
On Tuesday, 16 November 2021 at 13:34:49 UTC, Jacob Carlborg 
wrote:

# Cross-Platform GitHub Action 0.3.0

I would like to announce a new release of [Cross-Platform 
GitHub 
Action](https://github.com/marketplace/actions/cross-platform-action), [0.3.0](https://github.com/cross-platform-actions/action/releases/tag/v0.3.0).


I was reading 
https://github.com/marketplace/actions/cross-platform-action#under-the-hood and have to say I am impressed. Looks like a very well done library.


Re: [Semi-OT] Cross-Platform GitHub Action 0.3.0 - NetBSD

2021-11-16 Thread Imperatorn via Digitalmars-d-announce
On Tuesday, 16 November 2021 at 13:34:49 UTC, Jacob Carlborg 
wrote:

# Cross-Platform GitHub Action 0.3.0

I would like to announce a new release of [Cross-Platform 
GitHub 
Action](https://github.com/marketplace/actions/cross-platform-action), [0.3.0](https://github.com/cross-platform-actions/action/releases/tag/v0.3.0).


[...]


Oh, nice to see support for FreeBSD. I just added a version for 
it in druntime 4 days ago. Now maybe we can test it lol


[Semi-OT] Cross-Platform GitHub Action 0.3.0 - NetBSD

2021-11-16 Thread Jacob Carlborg via Digitalmars-d-announce

# Cross-Platform GitHub Action 0.3.0

I would like to announce a new release of [Cross-Platform GitHub 
Action](https://github.com/marketplace/actions/cross-platform-action), [0.3.0](https://github.com/cross-platform-actions/action/releases/tag/v0.3.0).


For those not familiar with this project, it provides a GitHub 
action for running GitHub Action workflows on multiple platforms. 
This includes platforms that GitHub Actions don't natively 
support (for more information see the original announcement of 
the project [1]).


The major new feature in this release is the support for a new 
platform: NetBSD. The only supported version so far is 9.2. Other 
minor features since the last announcement are support for 
FreeBSD 13 and OpenBSD 6.9.


## Under the Hood

For those interested in what's going on under the hood. This 
release contains some major refactoring to add support for the 
QEMU hypervisor. Up until now the xhyve hypervisor has been used 
for the FreeBSD and OpenBSD platforms. Unfortunately NetBSD 
doesn't run on the xhyve hypervisor, therefore support for QEMU 
was added. In this release it's only possible to run NetBSD on 
Linux hosts. The GitHub Linux runners doesn't support hardware 
accelerated nested virtualization. This unfortunately means that 
the QEMU hypervisor will be a bit slower than the xhyve 
hypervisor.


[1] 
https://forum.dlang.org/post/jhasyhuvcxoqhldlb...@forum.dlang.org