Re: Beta 2.082.0

2018-10-17 Thread Jesse Phillips via Digitalmars-d-announce
On Wednesday, 17 October 2018 at 16:14:14 UTC, Neia Neutuladh 
wrote:
On Wednesday, 17 October 2018 at 14:02:20 UTC, Jesse Phillips 
wrote:
Wait, why does each get a special bailout? Doesn't until full 
that role?


`until` is lazy. We could have `doUntil` instead, which would 
be eager and would return a boolean indicating whether to 
continue. We could all write 
`someRange.until!condition.each!func`. That's going to be 
clearer sometimes and less clear other times. So now we have 
options.


auto arr = [10, 20, 30];
arr.until!(x=>n==20).each!(n => arr ~= n);

Ok, I can see why that doesn't work.


Re: Spasm - webassembly libary for single page applications

2018-10-17 Thread aberba via Digitalmars-d-announce
On Sunday, 14 October 2018 at 19:04:51 UTC, Sebastiaan Koppe 
wrote:

On Sunday, 14 October 2018 at 06:03:10 UTC, Bogdan wrote:
Awesome work! I remember that, at some point the 
https://glimmerjs.com/ authors wanted to write their vm in 
rust for better performance. It looks like D is a new option 
for such projects.


Bogdan


Thanks, a lot of credits go to LDC for supporting the 
webassembly backend of LLVM.


I thought about doing a VM as well, specifically because I was 
afraid of the performance penalty of switching a lot between js 
and wasm. The idea was to emit all dom operations into one 
bytebuffer (possibly at compile-time) and then instruct js to 
execute that.


It turns out jumping between wasm and js isn't really a big 
deal (at least not anymore), so I ditched that idea to keep 
things simple.


I saw a recent announcement by the Firefox devs on some massive 
improvements they've made in the js-wasm switching speed. Its 
negligible for most cases...unless probably something crazy. Its 
was very fast...especially for a benchmark of 100 million calls 
with Math.random()


https://hacks.mozilla.org/2018/10/calls-between-javascript-and-webassembly-are-finally-fast-%F0%9F%8E%89/



Plus, there is a good chance that in the near future wasm will 
be able to call the browsers' api directly.
Have you seen this? 
https://developer.mozilla.org/en-US/docs/WebAssembly/Using_the_JavaScript_API


I'm not sure how limited it is though.




Re: Spasm - webassembly libary for single page applications

2018-10-17 Thread aberba via Digitalmars-d-announce
On Tuesday, 16 October 2018 at 07:57:12 UTC, Sebastiaan Koppe 
wrote:
On Tuesday, 16 October 2018 at 03:23:21 UTC, Jesse Phillips 
wrote:
It would be cool if D provided the easiest way to develop 
webasm first to see if it could claim that market.


If you have some minutes to spare it would be great if you 
could try it out. It should only take 10min to render your 
first divs, otherwise something is wrong.


The major hurdle with any wasm dom framework is that there are 
no standard components to build on (like dropdowns, 
drag-n-drop, input validations, notifications, etc.), nor any 
css frameworks (like material ui, bootstrap). So'll need to 
build everything from scratch, and no sane person is likely to 
do that.


What might be an option is to try to integrate with other wasm 
libraries out there, so at least we can use their components. 
But everyone does his own thing, so integrating is going to be 
hard as well.


A common use case for wasm is to port C++ native apps to web. 
e.g. is the recent autoCAD web app which does almost everything 
the desktop app can. That's the only reason to IMO do stuff in 
wasm. Games, productivity software, etc...performance. Spasm 
might just be perfect for that kind of stuff


Re: Beta 2.082.0

2018-10-17 Thread Nicholas Wilson via Digitalmars-d-announce
On Wednesday, 17 October 2018 at 15:18:43 UTC, Vladimir Panteleev 
wrote:
On Wednesday, 17 October 2018 at 12:14:55 UTC, Martin Nowak 
wrote:
Glad to announce the first beta for the 2.083.0 release, ♥ to 
the 48 contributors for this release.


Thanks!


CppRuntime_* version identifiers -
https://dlang.org/changelog/2.083.0.html#cppVersions


When is this different from the corresponding CRuntime version?


CppRuntime is per compiler, CRuntime is per system.

An example: on linux linking with Clang's C++ lib, the CppRuntime 
is CppRuntime_Clang and the CRuntime is CRuntime_Glibc.


Re: Beta 2.082.0

2018-10-17 Thread Neia Neutuladh via Digitalmars-d-announce
On Wednesday, 17 October 2018 at 14:02:20 UTC, Jesse Phillips 
wrote:
Wait, why does each get a special bailout? Doesn't until full 
that role?


`until` is lazy. We could have `doUntil` instead, which would be 
eager and would return a boolean indicating whether to continue. 
We could all write `someRange.until!condition.each!func`. That's 
going to be clearer sometimes and less clear other times. So now 
we have options.


Re: Interfacing D with C: Arrays Part 1

2018-10-17 Thread David Gileadi via Digitalmars-d-announce

On 10/17/18 8:20 AM, Mike Parker wrote:
I had intended to publish the next GC series post early this month, but 
after many revisions and discussions with a couple of reviewers, I've 
decided to put it on hold until something gets worked out about the 
conflation of destruction and finalization in D (something I'll be 
pushing for soon).


Instead, I've gone back to an article I started writing months ago and 
put aside in favor of other things: my next post in the 'D and C' series.


This post is the first of what will likely be three dealing with arrays 
(four if you count strings). It focuses primarily on declaration and 
initialization and is intended to be beginner friendly, assuming little 
or no knowledge of either C or D.


The blog:
https://dlang.org/blog/2018/10/17/interfacing-d-with-c-arrays-part-1/

Reddit:
https://www.reddit.com/r/programming/comments/9ozhyh/interfacing_d_with_c_arrays_part_1/ 



Really great, thanks!


Re: Beta 2.082.0

2018-10-17 Thread JN via Digitalmars-d-announce

On Wednesday, 17 October 2018 at 12:14:55 UTC, Martin Nowak wrote:

Glad to announce the first beta for the 2.083.0 release, ♥ to


BTW, title says Beta 2.082.0 :)




Re: Beta 2.082.0

2018-10-17 Thread Andre Pany via Digitalmars-d-announce
On Wednesday, 17 October 2018 at 15:18:43 UTC, Vladimir Panteleev 
wrote:
On Wednesday, 17 October 2018 at 12:14:55 UTC, Martin Nowak 
wrote:
Glad to announce the first beta for the 2.083.0 release, ♥ to 
the 48 contributors for this release.


Thanks!


CppRuntime_* version identifiers -
https://dlang.org/changelog/2.083.0.html#cppVersions


When is this different from the corresponding CRuntime version?


DUB_PACKAGE_VERSION environment variable -
https://dlang.org/changelog/2.083.0.html#env_var_package_version


The documentation for this one seems rather sparse.

- Is the environment variable set or read by Dub?
- What is the exact syntax for its contents?
- How does it affect the build process?
- What are some potential use cases?


The new variable does not affect the build process. It is set by 
dub and has the content you also see by dub describe command.
In a pre command you can have a script which writes the content 
of the variable to a constant within D module. Therefore it 
becomes very easy to compile the version of your application into 
your application.


Kind regards
Andre


Interfacing D with C: Arrays Part 1

2018-10-17 Thread Mike Parker via Digitalmars-d-announce
I had intended to publish the next GC series post early this 
month, but after many revisions and discussions with a couple of 
reviewers, I've decided to put it on hold until something gets 
worked out about the conflation of destruction and finalization 
in D (something I'll be pushing for soon).


Instead, I've gone back to an article I started writing months 
ago and put aside in favor of other things: my next post in the 
'D and C' series.


This post is the first of what will likely be three dealing with 
arrays (four if you count strings). It focuses primarily on 
declaration and initialization and is intended to be beginner 
friendly, assuming little or no knowledge of either C or D.


The blog:
https://dlang.org/blog/2018/10/17/interfacing-d-with-c-arrays-part-1/

Reddit:
https://www.reddit.com/r/programming/comments/9ozhyh/interfacing_d_with_c_arrays_part_1/


Re: Beta 2.082.0

2018-10-17 Thread Vladimir Panteleev via Digitalmars-d-announce

On Wednesday, 17 October 2018 at 12:14:55 UTC, Martin Nowak wrote:
Glad to announce the first beta for the 2.083.0 release, ♥ to 
the 48 contributors for this release.


Thanks!


CppRuntime_* version identifiers -
https://dlang.org/changelog/2.083.0.html#cppVersions


When is this different from the corresponding CRuntime version?


DUB_PACKAGE_VERSION environment variable -
https://dlang.org/changelog/2.083.0.html#env_var_package_version


The documentation for this one seems rather sparse.

- Is the environment variable set or read by Dub?
- What is the exact syntax for its contents?
- How does it affect the build process?
- What are some potential use cases?



Re: Beta 2.082.0

2018-10-17 Thread Jesse Phillips via Digitalmars-d-announce

On Wednesday, 17 October 2018 at 12:14:55 UTC, Martin Nowak wrote:
Glad to announce the first beta for the 2.083.0 release, ♥ to 
the 48 contributors for this release.


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


Wait, why does each get a special bailout? Doesn't until full 
that role?


Beta 2.082.0

2018-10-17 Thread Martin Nowak via Digitalmars-d-announce
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA512

Glad to announce the first beta for the 2.083.0 release, ♥ to the 48
contributors for this release.

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

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

- 

Highlights:

BetterC build option in dub -
https://dlang.org/changelog/2.083.0.html#betterC_build_option
CppRuntime_* version identifiers -
https://dlang.org/changelog/2.083.0.html#cppVersions
New isZeroInit trait - https://dlang.org/changelog/2.083.0.html#isZeroIn
it
DUB_PACKAGE_VERSION environment variable -
https://dlang.org/changelog/2.083.0.html#env_var_package_version

- -Martin
-BEGIN PGP SIGNATURE-

iQIzBAEBCgAdFiEEpzRNrTw0HqEtE8TmsnOBFhK7GTkFAlvHJ7oACgkQsnOBFhK7
GTndcg//dverePD9V8DIyVuemqho4Hrt2mKVfIr3p6W3osQuv2Ul9fr2yqdtzoif
3oecvjV7NFlW72v1v/Vli8aIItQ8ak60/aD2bSzrLPy9pnnjeC7NvctdA2snjQef
s1klZP/fLzr3QE39rLiFgQwhZIhkIgvFQai79lB2uMwIFE/lp1yn/34UMrxesEPS
ubcGufOYkUvmqwbdz0Pn71WqwNXjXf2zeZ5u8yOgF8+E/7HZNt3TFGmv6rL1VxFW
mch+SsrAul+iT3E6vs05MrRpZSNbL2bESOxcULflF+XYiRp8f6uf3FKeZ1YBqmSc
nvDDkVbkGHIfw4SZGJ7IPsno6MBSC588hrkHg1SV1LkalHqvCRk0g2HFcJ4B86nl
M5QeobeaJmb2rpugLichZ+MRQMbyzNkY41mc9jJ73hq4l2Q4KLCXDzb+JCYhcyIF
Yjvrq7mQPwkbfjQl0t5JwW1/cONTVKEEM+Kv5dgkzDUewuodMbkfV0zApkf+Z/tZ
0nxLx5rmNxCKqbMqjbd6G0SnsCmoqdZjgG57g5SM1Nqg3Xwvmi/mAr0Chgb3xgAU
A4WAtTxCu097gmXKNKAdLDAMXD2HD5DNqLei/NhSomYE16bumeTvUI6mBKxcVsKs
ISp3yThoLGY9d13AsqzrZNA60c1Hfqotuh2H9XUnJDxfSnPA8Uw=
=Pyed
-END PGP SIGNATURE-