Re: tetris in D in webassembly

2020-08-10 Thread starcanopy 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 :)


This is really cool. This idea, especially, titillates me:
"I'm pretty tempted to make serve.d automatically compile modules 
on demand to make a generic little server that can run a variety 
of programs without even thinking about it. Just drop a D file in 
the directory and surf to it in your browser! I might do that 
later."


Re: tetris in D in webassembly

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

On Monday, 10 August 2020 at 21:30:53 UTC, matheus wrote:
By the way you should post on reddit (/r/programming) if you 
haven't already.


I don't really do reddit. I sometimes troll in the comments but 
it isn't a site I care for.


That said if you or someone else wanted to and post the link, 
I'll answer questions that come up there.


Re: tetris in D in webassembly

2020-08-10 Thread matheus 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 :)


Awesome!

By the way you should post on reddit (/r/programming) if you 
haven't already.


Matheus.


Re: tetris in D in webassembly

2020-08-10 Thread Adam D. Ruppe via Digitalmars-d-announce
On Monday, 10 August 2020 at 16:24:02 UTC, Steven Schveighoffer 
wrote:
Bug report: the score doesn't increase for me when I complete a 
line ;)


The reason for that is actually explained in the article; has to 
do with webassembly not blocking on eventLoop and the program was 
written with the assumption that it would.


Re: tetris in D in webassembly

2020-08-10 Thread Steven Schveighoffer via Digitalmars-d-announce

On 8/10/20 11:08 AM, 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 :)


Very cool!

Bug report: the score doesn't increase for me when I complete a line ;)

-Steve


tetris in D in webassembly

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

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 :)