Re: tetris in D in webassembly

2020-08-11 Thread Adam D. Ruppe via Digitalmars-d-announce

On Tuesday, 11 August 2020 at 04:10:10 UTC, starcanopy wrote:

This is really cool. This idea, especially, titillates me:


That's actually easy enough to do I just went ahead and made it.

so behold:
http://webassembly.arsdnet.net/

and the source is pushed up to github, with just a little bit of 
effort you can prolly run it at home.


I don't have write access publicly to my server here to play 
with... but I might even add a little form for that so you can 
goof around with this dead-simple by copy/pasting some source 
code into the browser form.


But still with this I can add more demos easily and you can see 
the source in the browser so it is something to play with.


Re: tetris in D in webassembly

2020-08-11 Thread Adam D. Ruppe via Digitalmars-d-announce

On Tuesday, 11 August 2020 at 13:22:02 UTC, jmh530 wrote:

The blog post says it is space bar. Tripped me up too.


Yeah, I learned yesterday that there's a whole other PC tetris 
world I had no clue about.


I only ever played the Nintendo/ELORG version on the NES. On 
that, dpad is left, down, speed, and then the A button is rotate. 
So for my clone I based it on that, arrows move, space bar, on 
the opposite side of the controller, does the rotation.


The specifics of piece movement etc. are kinda based on that NES 
game too and the newer PC games have all kinds of other rules 
that I just never knew.


But oh well, the game was at first something to just kill time on 
a boring flight, so I wrote it from memory on my laptop. Then it 
posted as a simpledisplay.d demo basically. And now I used it for 
webassembly because I thought it was super cool to have the very 
same source code we used on desktop last week in the browser this 
week (even though like I said there, I cut a LOT of corners to 
finish it in my limited time).


Now I kinda want to expand the library a bit more. It occurs to 
me if I did draw text too and a little bit more input events, 
then my terminal emulator could run in the browser. Then my 
terminal client code can go there since it can embed the 
emulator. And a little more work, minigui.d's custom widgets can 
too...


It wouldn't be a good experience tbh but it might be cool online 
demos of future programs and can also load up some of these 
little games etc on mobile too though the browser.


Re: tetris in D in webassembly

2020-08-11 Thread jmh530 via Digitalmars-d-announce

On Tuesday, 11 August 2020 at 12:46:51 UTC, Atwork wrote:

[snip]

Just needs a rotation feature (unless I am just unaware of how 
to do that.)


But pretty cool project


The blog post says it is space bar. Tripped me up too.


Re: MetaCall Polyglot is now available form D

2020-08-11 Thread Atwork via Digitalmars-d-announce
On Tuesday, 4 August 2020 at 22:25:19 UTC, Vicente Eduardo Ferrer 
Garcia wrote:
Hey guys I am working on an open source polyglot called 
MetaCall which allows calling functions between languages. 
Recently a contributor has implemented support for DLang 
(Port), which means you can use MetaCall from D to call 
functions in C#, NodeJS, JavaScript, TypeScript, Ruby, Python, 
Cobol..


I would like to know what do you think about that, and if you 
see it useful for embedding other languages in D, for example 
to allow scripting to extend a project. Any feedback will be 
highly appreciated.


I leave here the link of the repository: 
https://github.com/metacall/core


If someone is interested in the D port you can find the source 
here: https://github.com/metacall/dlang-port


This is actually useful to me.

Thanks


Re: tetris in D in webassembly

2020-08-11 Thread Atwork via Digitalmars-d-announce

On Monday, 10 August 2020 at 15:08:59 UTC, Adam D. Ruppe wrote:

http://webassembly.arsdnet.net/

tetris.d source here: 
http://dpldocs.info/this-week-in-d/Blog.Posted_2020_08_03.html#tetris-in-d


web assembly source and explanation here:

http://dpldocs.info/this-week-in-d/Blog.Posted_2020_08_10.html


Short version: BARE MINIMUM druntime port to webassembly 
together with a bare minimum source port of simpledisplay.d to 
it as well made that little game playable.


In theory we could make a lot more work by building up one 
function at a time. In practice I gotta get back to real work 
so don't hold your breath :)


Just needs a rotation feature (unless I am just unaware of how to 
do that.)


But pretty cool project


Beta 2.093.1

2020-08-11 Thread Martin Nowak via Digitalmars-d-announce
Glad to announce the first beta for the 2.093.1 point release, ♥ 
to the 11 contributors.


http://dlang.org/download.html#dmd_beta
http://dlang.org/changelog/2.093.1.html

As usual please report any bugs at
https://issues.dlang.org

-Martin