Re: D at 20: Hits and Misses, and what I learned along the way Oct 19

2019-09-23 Thread H. S. Teoh via Digitalmars-d-announce
On Mon, Sep 23, 2019 at 02:55:00PM -0700, Walter Bright via 
Digitalmars-d-announce wrote:
> On 9/23/2019 10:49 AM, H. S. Teoh wrote:
> > Will this talk be posted somewhere like Youtube afterwards?
> 
> Yes, though sometimes it doesn't due to various failure modes of the
> camera and operator :-)

There should be redundant, decoupled camera/operator crew to solve this
problem. ;-)


T

-- 
Chance favours the prepared mind. -- Louis Pasteur


Re: D at 20: Hits and Misses, and what I learned along the way Oct 19

2019-09-23 Thread Walter Bright via Digitalmars-d-announce

On 9/23/2019 12:38 AM, Peter Jacobs wrote:

On Sunday, 22 September 2019 at 19:40:48 UTC, Walter Bright wrote:

I'll be speaking at the Northwest C++ Users's Group on Oct 19.

https://nwcpp.org/


That page says "Oct 16th, 2019 at 7:00 PM".



Oops, you're right!


Re: D at 20: Hits and Misses, and what I learned along the way Oct 19

2019-09-23 Thread Walter Bright via Digitalmars-d-announce

On 9/23/2019 10:49 AM, H. S. Teoh wrote:

Will this talk be posted somewhere like Youtube afterwards?


Yes, though sometimes it doesn't due to various failure modes of the camera and 
operator :-)


Re: LDC 1.18.0-beta1

2019-09-23 Thread Ivan Butygin via Digitalmars-d-announce

On Monday, 23 September 2019 at 20:24:54 UTC, jmh530 wrote:
On Monday, 23 September 2019 at 19:40:13 UTC, Ivan Butygin 
wrote:
On Monday, 23 September 2019 at 12:22:47 UTC, Martin 
Tschierschke wrote:


Can you please give (again?) a link or a more detailed 
description of the JIT, explaining some use cases?


https://wiki.dlang.org/LDC-specific_language_changes#.40.28ldc.attributes.dynamicCompile.29

[snip]


I think the wiki has room for improvement...or, ideally, there 
would be a tutorial that goes through all the JIT functionality 
in LDC.


I don't really understand the difference between dynamicCompile 
and dynamicCompileEmit. Is it that with dynamicCompileEmit I 
can still call foo normally? Also, do I have to use either bind 
or a delegate to get the JIT functionality? What is the 
advantage or cost of f (the binded version) and d (the delegate 
version)? Does the indirection from the delegates outweigh the 
benefit from simplified computation in these cases? Is there 
any issue with aliasing f or d to be named foo (or just calling 
them foo from the start?)?


What am I doing wrong on run.dlang.org:
https://run.dlang.io/is/itIPQK


With @dynamicCompileEmit normal calls to function will go to 
static version but these functions can still be targets for bind.


Objects returned from bind are reference counted. You can get 
delegate from them to use is context where delegate is expected 
but you need to retain object somewhere. Delegate version will 
add additional call indirection I think but otherwise they are 
identical.


Also, something got broken with bools, I need to check :)
https://run.dlang.io/is/x3orGK





Re: LDC 1.18.0-beta1

2019-09-23 Thread jmh530 via Digitalmars-d-announce

On Monday, 23 September 2019 at 19:40:13 UTC, Ivan Butygin wrote:
On Monday, 23 September 2019 at 12:22:47 UTC, Martin 
Tschierschke wrote:


Can you please give (again?) a link or a more detailed 
description of the JIT, explaining some use cases?


https://wiki.dlang.org/LDC-specific_language_changes#.40.28ldc.attributes.dynamicCompile.29

[snip]


I think the wiki has room for improvement...or, ideally, there 
would be a tutorial that goes through all the JIT functionality 
in LDC.


I don't really understand the difference between dynamicCompile 
and dynamicCompileEmit. Is it that with dynamicCompileEmit I can 
still call foo normally? Also, do I have to use either bind or a 
delegate to get the JIT functionality? What is the advantage or 
cost of f (the binded version) and d (the delegate version)? Does 
the indirection from the delegates outweigh the benefit from 
simplified computation in these cases? Is there any issue with 
aliasing f or d to be named foo (or just calling them foo from 
the start?)?


What am I doing wrong on run.dlang.org:
https://run.dlang.io/is/itIPQK


Re: LDC 1.18.0-beta1

2019-09-23 Thread Ivan Butygin via Digitalmars-d-announce
On Monday, 23 September 2019 at 12:22:47 UTC, Martin Tschierschke 
wrote:


Can you please give (again?) a link or a more detailed 
description of the JIT, explaining some use cases?


https://wiki.dlang.org/LDC-specific_language_changes#.40.28ldc.attributes.dynamicCompile.29

@dynamicCompile attribute allow you to delay final function 
optimization to runtime. You mark any function (virtual functions 
and lambdas are also supported) with @dynamicCompile and then 
call compileDynamicCode during runtime to finally optimize and 
compile function to native code, using host processor instruction 
set.


There is also jit bind which works much like c++ bind but also 
non-placeholder params are treated and optimized as constants by 
optimizer.


@dynamicCompileEmit int foo(int a, int b, int c, bool flag)
{
  if (flag)
  {
// this check and code will be removed by optimizer
...
  }
  return a + b + c; // this will be optimized to 40 + c
}

auto f = bind(, 30, 10, placeholder, false);
int delegate(int) d = f.toDelegate();

compileDynamicCode(...);

assert(f(2) == 42);
assert(d(2) == 42);


https://github.com/ldc-developers/ldc/blob/v1.18.0-beta1/runtime/jit-rt/d/ldc/dynamic_compile.d


Re: D at 20: Hits and Misses, and what I learned along the way Oct 19

2019-09-23 Thread H. S. Teoh via Digitalmars-d-announce
On Sun, Sep 22, 2019 at 12:40:48PM -0700, Walter Bright via 
Digitalmars-d-announce wrote:
> I'll be speaking at the Northwest C++ Users's Group on Oct 19.
> 
> https://nwcpp.org/
> 
> Work began on the D programming language 20 years ago. A huge part of
> language design is looking at the past for what worked and what
> didn’t, and divining future trajectories so the language can be where
> the ball lands. D has its share of strikes and home runs. I’ll be
> talking about a few of each, and lessons learned the hard way. I’ll
> pontificate a bit about where programming languages and D are headed.

Will this talk be posted somewhere like Youtube afterwards?  I'd love to
hear it, but can't attend in-session for practical reasons.


T

-- 
Being able to learn is a great learning; being able to unlearn is a greater 
learning.


Re: LDC 1.18.0-beta1

2019-09-23 Thread Newbie2019 via Digitalmars-d-announce

On Thursday, 12 September 2019 at 23:49:04 UTC, kinke wrote:

Glad to announce the first beta for LDC 1.18:

* Based on D 2.088.0+ (yesterday's stable).
* Bundled dub upgraded to v1.17.0+ with improved LDC support, 
incl. cross-compilation.
* Init symbols of zero-initialized structs are no longer 
emitted.
* druntime: DMD-compatible {load,store}Unaligned and prefetch 
added to core.simd.

* JIT improvements, incl. multi-threaded compilation.

Full release log and downloads: 
https://github.com/ldc-developers/ldc/releases/tag/v1.18.0-beta1


Please help test, and thanks to all contributors!


Thanks for keep the great work.

Maybe  https://github.com/ldc-developers/ldc/issues/3156  should 
in Known issues ?




Re: LDC 1.18.0-beta1

2019-09-23 Thread Martin Tschierschke via Digitalmars-d-announce

On Thursday, 12 September 2019 at 23:49:04 UTC, kinke wrote:

Glad to announce the first beta for LDC 1.18:

* Based on D 2.088.0+ (yesterday's stable).
* Bundled dub upgraded to v1.17.0+ with improved LDC support, 
incl. cross-compilation.
* Init symbols of zero-initialized structs are no longer 
emitted.
* druntime: DMD-compatible {load,store}Unaligned and prefetch 
added to core.simd.

* JIT improvements, incl. multi-threaded compilation.

Full release log and downloads: 
https://github.com/ldc-developers/ldc/releases/tag/v1.18.0-beta1


Please help test, and thanks to all contributors!


Great!

Can you please give (again?) a link or a more detailed 
description of the JIT, explaining some use cases?


Regards mt.


Re: LDC 1.18.0-beta1

2019-09-23 Thread zoujiaqing via Digitalmars-d-announce

On Thursday, 12 September 2019 at 23:49:04 UTC, kinke wrote:

Glad to announce the first beta for LDC 1.18:

* Based on D 2.088.0+ (yesterday's stable).
* Bundled dub upgraded to v1.17.0+ with improved LDC support, 
incl. cross-compilation.
* Init symbols of zero-initialized structs are no longer 
emitted.
* druntime: DMD-compatible {load,store}Unaligned and prefetch 
added to core.simd.

* JIT improvements, incl. multi-threaded compilation.

Full release log and downloads: 
https://github.com/ldc-developers/ldc/releases/tag/v1.18.0-beta1


Please help test, and thanks to all contributors!


Thank you kinke.

Is there a timeline for iOS support?


Re: D at 20: Hits and Misses, and what I learned along the way Oct 19

2019-09-23 Thread Peter Jacobs via Digitalmars-d-announce

On Sunday, 22 September 2019 at 19:40:48 UTC, Walter Bright wrote:

I'll be speaking at the Northwest C++ Users's Group on Oct 19.

https://nwcpp.org/


That page says "Oct 16th, 2019 at 7:00 PM".