Re: cpp_binder, a not-yet-useful tool for generating C++ bindings

2015-09-22 Thread Ola Fosheim Grøstad via Digitalmars-d-announce
On Tuesday, 22 September 2015 at 15:53:22 UTC, Kagamin wrote: Of course you didn't. In C you can mutate const object without cast. But it's not an issue because it's not what is usually done and usually const works as expected. No. Const objects are read only. Writing to read only objects

Scriptlike v0.9.4 - Perl-like interpolated strings, full examples and more.

2015-09-22 Thread Nick Sabalausky via Digitalmars-d-announce
Big update to Scriptlike, v0.9.4: https://github.com/Abscissa/scriptlike Scriptlike is a library to help you write script-like programs in D. The two highlights in this release are string interpolation and a full set of examples in the documentation. Also of note are the new functions

Re: Scriptlike v0.9.4 - Perl-like interpolated strings, full examples and more.

2015-09-22 Thread Adam D. Ruppe via Digitalmars-d-announce
On Wednesday, 23 September 2015 at 01:24:54 UTC, Sebastiaan Koppe wrote: What about: void echo(T)() { writeln(mixin(interp!T)); Won't work because it won't be able to see the local variables you want to interpolate.

Re: Scriptlike v0.9.4 - Perl-like interpolated strings, full examples and more.

2015-09-22 Thread Sebastiaan Koppe via Digitalmars-d-announce
On Tuesday, 22 September 2015 at 20:18:48 UTC, Nick Sabalausky wrote: // Output: The number 21 doubled is 42! int num = 21; writeln( mixin(interp!"The number ${num} doubled is ${num * 2}!") ); What

OneDrive Client written in D

2015-09-22 Thread skilion via Digitalmars-d-announce
I've been waiting for a good sync client for OneDrive (15 GB for free!) on Linux, but Microsoft seems to have other plans... So I've decided to write my own, using D. Take a look: http://skilion.github.io/onedrive/

Re: OneDrive Client written in D

2015-09-22 Thread Rikki Cattermole via Digitalmars-d-announce
On 23/09/15 8:43 AM, skilion wrote: I've been waiting for a good sync client for OneDrive (15 GB for free!) on Linux, but Microsoft seems to have other plans... So I've decided to write my own, using D. Take a look: http://skilion.github.io/onedrive/ You probably should not be exposing

Re: Scriptlike v0.9.4 - Perl-like interpolated strings, full examples and more.

2015-09-22 Thread Sebastiaan Koppe via Digitalmars-d-announce
On Wednesday, 23 September 2015 at 01:45:03 UTC, Adam D. Ruppe wrote: On Wednesday, 23 September 2015 at 01:24:54 UTC, Sebastiaan Koppe wrote: What about: void echo(T)() { writeln(mixin(interp!T)); Won't work because it won't be able to see the local variables you want to interpolate.

Re: Scriptlike v0.9.4 - Perl-like interpolated strings, full examples and more.

2015-09-22 Thread Sönke Ludwig via Digitalmars-d-announce
Am 22.09.2015 um 22:18 schrieb Nick Sabalausky: = String Interpolation: = https://github.com/Abscissa/scriptlike#string-interpolation AFAICT, a string mixin is necessary to accomplish this in D, but otherwise it works much like other languages:

Re: cpp_binder, a not-yet-useful tool for generating C++ bindings

2015-09-22 Thread Kagamin via Digitalmars-d-announce
On Tuesday, 22 September 2015 at 15:33:40 UTC, Ola Fosheim Grøstad wrote: On Tuesday, 22 September 2015 at 15:11:55 UTC, Kagamin wrote: Another C feature you didn't know about: the standard allows to create a mutable pointer to const data and mutate it. I didn't? Of course I did. In C++ other

Re: Go 1.5

2015-09-22 Thread Chris via Digitalmars-d-announce
On Tuesday, 22 September 2015 at 03:59:31 UTC, Ola Fosheim Grostad wrote: On Tuesday, 22 September 2015 at 02:15:51 UTC, jmh530 wrote: Interesting. Not to resurrect the older D vs. Rust thread, but I have heard it that it can be painful to do some things in Rust. D often has the ability to do

Re: reggae v0.5.0: new features in the D meta-build system

2015-09-22 Thread Joakim via Digitalmars-d-announce
On Tuesday, 22 September 2015 at 12:39:48 UTC, Per Nordlöw wrote: On Wednesday, 16 September 2015 at 14:07:17 UTC, Atila Neves wrote: http://code.dlang.org/my_packages/reggae What's new: Atila If you want to build a really revolutionary *new* build system you should turn reggae into a

Re: cpp_binder, a not-yet-useful tool for generating C++ bindings

2015-09-22 Thread Marc Schütz via Digitalmars-d-announce
On Tuesday, 22 September 2015 at 04:07:54 UTC, Ola Fosheim Grostad wrote: On Tuesday, 22 September 2015 at 00:31:45 UTC, Paul O'Neil wrote: While D and C++ const don't quite share semantics, they're petty close and they mangle the same way. I do what ZombieDev has in the table. Going from

Re: Go 1.5

2015-09-22 Thread Johannes Pfau via Digitalmars-d-announce
Am Mon, 21 Sep 2015 19:32:21 + schrieb Ola Fosheim Grøstad : > On Monday, 21 September 2015 at 18:28:19 UTC, jmh530 wrote: > > My understanding is that the key benefit of Rust's system is > > that compile time checks don't have the runtime costs of smart

Re: Go 1.5

2015-09-22 Thread Ola Fosheim Grøstad via Digitalmars-d-announce
On Tuesday, 22 September 2015 at 09:01:07 UTC, Chris wrote: But that's very annoying to work with and more pain than gain. I don't know... unique_ptr in C++ is quite ok for managing resources, but it does not track "borrowed pointers". But as I point out one can: 1. do it in runtime in

Re: cpp_binder, a not-yet-useful tool for generating C++ bindings

2015-09-22 Thread Jacob Carlborg via Digitalmars-d-announce
On 2015-09-22 02:24, Paul O'Neil wrote: How would you address those issues? You mean that no one works together? Or that DStep only has one pass? My intermediate data structures have evolved quite a lot and I'm glad that I wasn't dragging dstep along as I tried to figure it out. The model

Re: cpp_binder, a not-yet-useful tool for generating C++ bindings

2015-09-22 Thread Kagamin via Digitalmars-d-announce
On Tuesday, 22 September 2015 at 14:53:54 UTC, Ola Fosheim Grøstad wrote: The consequences of a C function mutating something reachable through const is either a disaster or the D compiler will have to forget about those kind of optimizations after calling a C function. But then const has very

Re: cpp_binder, a not-yet-useful tool for generating C++ bindings

2015-09-22 Thread Ola Fosheim Grøstad via Digitalmars-d-announce
On Tuesday, 22 September 2015 at 14:46:24 UTC, Kagamin wrote: I believe I've seen const declarations in C incorrectly declared as head const when transitive const was really wanted, but it wasn't done because transitive const in C is so much PITA. So the only real concern here is mangling.

Re: cpp_binder, a not-yet-useful tool for generating C++ bindings

2015-09-22 Thread Kagamin via Digitalmars-d-announce
On Tuesday, 22 September 2015 at 11:04:17 UTC, Marc Schütz wrote: Can pragma(mangle, ...) be used on types? Then we can define a C/C++ compatible `HeadConst` template that simulates C/C++ const semantics, while still being mangled correctly I believe I've seen const declarations in C

Re: reggae v0.5.0: new features in the D meta-build system

2015-09-22 Thread Per Nordlöw via Digitalmars-d-announce
On Wednesday, 16 September 2015 at 14:07:17 UTC, Atila Neves wrote: http://code.dlang.org/my_packages/reggae What's new: Atila If you want to build a really revolutionary *new* build system you should turn reggae into a client-server-architecture that listens to file

Re: cpp_binder, a not-yet-useful tool for generating C++ bindings

2015-09-22 Thread Ola Fosheim Grøstad via Digitalmars-d-announce
On Tuesday, 22 September 2015 at 15:11:55 UTC, Kagamin wrote: Another C feature you didn't know about: the standard allows to create a mutable pointer to const data and mutate it. I didn't? Of course I did. In C++ other threads can write to const objects. The function receiving a const