Re: Mecca available on macOS

2019-08-07 Thread Ali Çehreli via Digitalmars-d-announce

On 08/07/2019 10:45 AM, Ron Tarrant wrote:

On Wednesday, 7 August 2019 at 11:01:55 UTC, Jacob Carlborg wrote:

I would like to announce that I've ported Mecca [1] to macOS.



[1] https://github.com/weka-io/mecca


I'm not familiar with Mecca. What is a Container/reactor library?



DConf 2018 presentation says

Weka.io is a small start-up company producing a hyper-scalable high 
performance software only (BYOH) storage system written in D. During our 
work we've created a rather rich set of run time support tools for our 
system that are not, on their own, related to our specific product, or 
even storage at large. Mecca is a stand-alone library providing those 
tools. This lecture goes over the highlights of what Mecca contains, and 
some cool uses for it.


  http://dconf.org/2018/talks/shemesh.html

Ali


Re: Mecca available on macOS

2019-08-07 Thread Ron Tarrant via Digitalmars-d-announce

On Wednesday, 7 August 2019 at 11:01:55 UTC, Jacob Carlborg wrote:

I would like to announce that I've ported Mecca [1] to macOS.



[1] https://github.com/weka-io/mecca


I'm not familiar with Mecca. What is a Container/reactor library?



Mecca available on macOS

2019-08-07 Thread Jacob Carlborg via Digitalmars-d-announce
I would like to announce that I've ported Mecca [1] to macOS. It was 
merged in May but I never bothered to announce it until now. Everything 
except the file watcher has been ported and is working. Unfortunately 
the unit tests fail in Travis CI, but they pass locally and in Circle 
CI. Something related to a timer that is failing.


When it comes to the implementation, it's structured so that the new 
code will work on any Darwin platform (it's only tested on macOS). In 
this process I also moved some platform specific code for Linux to the 
`mecca.platform` and `mecca.reactor.platform` packages. This means that 
all platform specific code lives in these two packages and there are no 
version blocks outside of these packages (as far as I could find). The 
version blocks that exist are very few, due the the platform specific 
code lives in their own files. They're just needed to import the correct 
platform specific file. I think this turned out really nice compared to 
the mess that's in druntime, where most files are littered with version 
blocks.


The Darwin implementation uses kqueue, which is available on other 
platforms as well, like the various BSD flavors. The kqueue specific 
code is guarded with its own version block to make it possible to reuse 
on other platforms, if someone wants to port Mecca to a new platform. 
Some timer related code is implemented using libdispatch on Darwin, but 
I think this could be implemented using kqueue as well. I think 
libdispatch is available on *BSD as well, but might not be installed by 
default.


[1] https://github.com/weka-io/mecca

--
/Jacob Carlborg


Re: Spasm - webassembly libary for single page applications

2019-08-07 Thread Dukc via Digitalmars-d-announce

On Tuesday, 6 August 2019 at 22:57:52 UTC, a11e99z wrote:
On Tuesday, 6 August 2019 at 20:20:13 UTC, Sebastiaan Koppe 
wrote:

On Tuesday, 6 August 2019 at 19:02:09 UTC, a11e99z wrote:

hi. can not compile for Windows
LDC ver 1.16.0.


Currently ldc 1.16.0 isn't supported. You can downgrade to ldc 
1.15.0


spasm 0.1.13: target for configuration "library" is up to 
date.

test_spasm ~master: building configuration "application"...
Error: unrecognized file extension lib   
 ??
ldc2 failed with exit code 1.


Have you tried the github issues? I remember dukc having the 
same issue on windows as well.


tried. --combined => got error about time.d. could not fix, idk 
how to fix.


Read further down the github issue. You have to hack some 
included DUB libraries, unless you can come up with a cleaner 
solution than I did.



LDC 1.16.0 is working (it compiles manually)


ldc2 1.16.0 will compile the code, but not link it. And if you 
want to run ldc2 manually, you will want to dry-run dub with 
verbose and copy the invocation from it. A `--combined` build is 
too complicated to get working otherwise.


Don't mind DUB trying to build an executable. In fact, it has to 
be. If it builds a "library", it will silently generate some code 
that's not WASM, or at least can't be used as WASM. The file 
extension will be incorrect, but you can change it. Sebastiaan 
just recently opened a LDC2 issue for that.





Re: Spasm - webassembly libary for single page applications

2019-08-07 Thread Sebastiaan Koppe via Digitalmars-d-announce

On Tuesday, 6 August 2019 at 22:57:52 UTC, a11e99z wrote:
tried. --combined => got error about time.d. could not fix, idk 
how to fix.


If calling ldc2 manually you need to use the -betterC flag, see 
https://wiki.dlang.org/Generating_WebAssembly_with_LDC for the 
minimal working example.


so, I think need to fix dub/sdl/json generating for wasm/spasm 
for Windows

- -of=..WASM not EXE
- libs as last with prefix -L="". probably all file names 
better put in quotes. probably with Unix-slashes


I have opened a dub issue for the .lib .exe issue. 
https://github.com/dlang/dub/issues/1749