How to embed static strings to a D program?

2017-10-15 Thread Ky-Anh Huynh via Digitalmars-d-learn
Hello, I want to use some static contents in my program, e.g, a CSS file, a long listing. To help deployment process I'd like to have them embedded in the final binary file. Is there any convenient way to support this? Maybe I need a tool/library to load file contents and generate D-code at

Re: D on quora ...

2017-10-15 Thread Dmitry Olshansky via Digitalmars-d
On Sunday, 15 October 2017 at 20:24:02 UTC, Adam Wilson wrote: database access (MySQL, PostgreSQL, Aerospike) libraries are available, That is important actually. So important that it should be a Priority 0 Must Have. Luckily it should also be quite strightforward to write them. At

Re: Why isn't IID_ITaskbarList3 defined?

2017-10-15 Thread evilrat via Digitalmars-d-learn
On Sunday, 15 October 2017 at 15:13:09 UTC, Nieto wrote: I'm trying to write a blinding and I found both IID_ITaskbarList and IID_ITaskbarList2 are defined but IID_ITaskbarList3 isn't. Any reason why it isn't defined? sorry if it sounds such a naive question, I'm new to COM and D interop. I

Re: Why Physicists Still Use Fortran

2017-10-15 Thread Manu via Digitalmars-d
On 15 Oct. 2017 6:40 pm, "Walter Bright via Digitalmars-d" < digitalmars-d@puremagic.com> wrote: On 10/15/2017 5:26 PM, H. S. Teoh wrote: > 1-based array indexing... I don't know, but I've become so accustomed > to 0-based indexing that I doubt I'll ever be able to get used to a > language with

Re: Temporary objects as function parameters or when-is-this-shit-going-to-end?

2017-10-15 Thread ketmar via Digitalmars-d-learn
Michael V. Franklin wrote: In fact, you might want to propose matching bounty from the community on this specific bug to encourage funding. For example, make an announcement on the forum that anyone who places a bounty on the bug in question will receive a matching contribution from you.

Re: Temporary objects as function parameters or when-is-this-shit-going-to-end?

2017-10-15 Thread Michael V. Franklin via Digitalmars-d-learn
On Monday, 16 October 2017 at 03:29:03 UTC, Michael V. Franklin wrote: My experience says that BountySource almost doesn't help. It works if the bounty is worth someone sacrificing their free time to do the work. For example, I'd attempt fixing the bug if the bounty were greater than

Re: Temporary objects as function parameters or when-is-this-shit-going-to-end?

2017-10-15 Thread Michael V. Franklin via Digitalmars-d-learn
On Friday, 13 October 2017 at 11:54:38 UTC, Jack Applegame wrote: On Friday, 13 October 2017 at 11:21:48 UTC, Biotronic wrote: BountySource[2] lets you do basically exactly that. My experience says that BountySource almost doesn't help. It works if the bounty is worth someone sacrificing

Re: Why Physicists Still Use Fortran

2017-10-15 Thread jmh530 via Digitalmars-d
On Sunday, 15 October 2017 at 22:09:21 UTC, Walter Bright wrote: http://moreisdifferent.com/2015/07/16/why-physicsts-still-use-fortran/ Some good information there! The article could have mentioned the restrict annotation in C. They mention the issue indirectly because Fortran programmers

Re: D on quora ...

2017-10-15 Thread Jerry via Digitalmars-d
On Sunday, 15 October 2017 at 16:29:22 UTC, Ecstatic Coder wrote: If all that is already available, perfect :) [snip] And moreover I'd be delighted to start using D instead of Go for my next web server developments. You can start now and get performance later? In fact you may supply

Re: D on quora ...

2017-10-15 Thread Tony via Digitalmars-d
On Friday, 6 October 2017 at 21:12:58 UTC, Rion wrote: Other aspects like being unsure when the GC will trigger can also influence people to a non-gc language. The Go developers have done a massive ( an impressive ) amount of work on trying to reduce GC pauses in the last two years, and

Re: Will D continu to live after walter death?

2017-10-15 Thread Walter Bright via Digitalmars-d
On 10/15/2017 2:36 PM, inspecta-deck wrote: Wo ist Walter? In das Machinen mit der Blinkenlights und Sparken Spitzen.

Re: Why Physicists Still Use Fortran

2017-10-15 Thread Walter Bright via Digitalmars-d
On 10/15/2017 5:26 PM, H. S. Teoh wrote: 1-based array indexing... I don't know, but I've become so accustomed to 0-based indexing that I doubt I'll ever be able to get used to a language with 1-based indexing. Or whether D will ever be able to challenge Fortran in this respect. :P I don't

Re: Why Physicists Still Use Fortran

2017-10-15 Thread Jonathan M Davis via Digitalmars-d
On Sunday, October 15, 2017 17:26:20 H. S. Teoh via Digitalmars-d wrote: > On Sun, Oct 15, 2017 at 03:09:21PM -0700, Walter Bright via Digitalmars-d wrote: > > http://moreisdifferent.com/2015/07/16/why-physicsts-still-use-fortran/ > > > > Some good information there! > > 1-based array indexing...

Re: Why Physicists Still Use Fortran

2017-10-15 Thread H. S. Teoh via Digitalmars-d
On Sun, Oct 15, 2017 at 03:09:21PM -0700, Walter Bright via Digitalmars-d wrote: > http://moreisdifferent.com/2015/07/16/why-physicsts-still-use-fortran/ > > Some good information there! 1-based array indexing... I don't know, but I've become so accustomed to 0-based indexing that I doubt I'll

Re: What is the Philosophy of D?

2017-10-15 Thread ketmar via Digitalmars-d
codephantom wrote: If the philosophy of C, is 'the programmer is in charge', what might the philosophy of D be? fast. safe. reliable. choose any three of 'em.

What is the Philosophy of D?

2017-10-15 Thread codephantom via Digitalmars-d
D's overview page says "It doesn't come with an overriding philosophy." Is philosophy not important? I'd like to argue, that the problem of focusing on getting the job done quickly and reliably, does *not* leave behind maintainable, easy to understand code, but rather it leads to

Re: Will D continu to live after walter death?

2017-10-15 Thread codephantom via Digitalmars-d
On Friday, 13 October 2017 at 10:07:39 UTC, Walter Bright wrote: On 10/12/2017 8:04 AM, moechofe wrote: What is the wanted lifetime of the project? Is D will manage to pass through time? It is valuable to start a 40 years old project using D? Just download my engrams into the D-9000 computer.

[Issue 17902] FreeBSD 10.3: LocalTime().stdName is null and the assert at line 28248 fails.

2017-10-15 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17902 Jonathan M Davis changed: What|Removed |Added Status|NEW |RESOLVED

[Issue 17902] New: FreeBSD 10.3: LocalTime().stdName is null and the assert at line 28248 fails.

2017-10-15 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17902 Issue ID: 17902 Summary: FreeBSD 10.3: LocalTime().stdName is null and the assert at line 28248 fails. Product: D Version: D2 Hardware: x86_64 OS: FreeBSD

[Issue 17901] New: FreeBSD 10.3: AssertError@std/experimental/allocator/building_blocks/region.d(652)

2017-10-15 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17901 Issue ID: 17901 Summary: FreeBSD 10.3: AssertError@std/experimental/allocator/building_blocks /region.d(652) Product: D Version: D2 Hardware: All

[Issue 17900] FreeBSD 10.3 runnable/cpp_abi_tests.d(94): Assertion failure (test suite)

2017-10-15 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17900 Walter Bright changed: What|Removed |Added Keywords||C++ --

[Issue 17900] New: FreeBSD 10.3 runnable/cpp_abi_tests.d(94): Assertion failure (test suite)

2017-10-15 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17900 Issue ID: 17900 Summary: FreeBSD 10.3 runnable/cpp_abi_tests.d(94): Assertion failure (test suite) Product: D Version: D2 Hardware: All OS: FreeBSD

Re: Why Physicists Still Use Fortran

2017-10-15 Thread 12345swordy via Digitalmars-d
On Sunday, 15 October 2017 at 22:09:21 UTC, Walter Bright wrote: http://moreisdifferent.com/2015/07/16/why-physicsts-still-use-fortran/ Some good information there! A language similar to matlab when handling arrays? I recall hating the damn thing when using it for graphics programming, it

Re: DIP88 Named Parameters, Status?

2017-10-15 Thread solidstate1991 via Digitalmars-d
On Saturday, 14 October 2017 at 14:49:27 UTC, Andrei Alexandrescu wrote: Yes, we're up for that. We need a strong folow-up here (in the form of a formal proposal) from Benjamin and others interested. -- Andrei I myself might try to resurrect the issue (probably in the forum), as a better DLL

Why Physicists Still Use Fortran

2017-10-15 Thread Walter Bright via Digitalmars-d
http://moreisdifferent.com/2015/07/16/why-physicsts-still-use-fortran/ Some good information there!

[Issue 17684] [REG 2.062] `static alias this` bug or incomplete implementation?

2017-10-15 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17684 --- Comment #7 from github-bugzi...@puremagic.com --- Commits pushed to stable at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/3fcf20a69f8f63df74e88bcde5e22d55721a1b68 Fix Issue 17684 - [REG 2.062] static alias this (Part 4)

Re: Will D continu to live after walter death?

2017-10-15 Thread inspecta-deck via Digitalmars-d
On Thursday, 12 October 2017 at 15:04:57 UTC, moechofe wrote: What is the wanted lifetime of the project? Is D will manage to pass through time? It is valuable to start a 40 years old project using D? Wo ist Walter?

Re: GtkD 3.7.0 released, GTK+ with D.

2017-10-15 Thread lobo via Digitalmars-d-announce
On Sunday, 15 October 2017 at 20:18:37 UTC, Mike Wey wrote: GtkD is a D binding and OO wrapper of Gtk+ and is released on the LGPL license. Apart form the biannual update to the latest glib/gtk version, this release adds bindings for Gstreamer Mpegts and Gstreamer AppSink. Full changelog:

Re: For fun: Expressive C++ 17 Coding Challenge in D

2017-10-15 Thread Christian Köstlin via Digitalmars-d-learn
Another solution using dlangs builtin csv support for reading. import std.csv; import std.file; import std.algorithm : map; import std.range; string csvWrite(Header, Rows)(Header header, Rows rows) { return header.join(",") ~ "\n" ~ rows.map!(r => header.map!(h =>

Re: D on quora ...

2017-10-15 Thread Laeeth Isharc via Digitalmars-d
On Saturday, 14 October 2017 at 22:43:33 UTC, Adam Wilson wrote: On 10/7/17 14:08, Laeeth Isharc wrote: In a polyglot environment, D's code generation and introspection abilities might be quite valuable if it allows you to write core building blocks once and call them from other languages

Re: D on quora ...

2017-10-15 Thread Laeeth Isharc via Digitalmars-d
On Sunday, 15 October 2017 at 07:21:55 UTC, Ecstatic Coder wrote: But as a C++ developer, I can tell you that : D's GC is what prevents me to use it for my current C++ programming tasks. Because I can perfectly live with a GC that progressively collects bits of memory in a predefined amount

Re: My first experience as a D Newbie

2017-10-15 Thread Laeeth Isharc via Digitalmars-d
On Friday, 13 October 2017 at 15:29:54 UTC, Rion wrote: I have probably put in a few hundred hours try to learn D and get going. And half that time was pure wasted on bugs, editor issues, frustration, hours looking up something that is so easy in other languages, ... Recently i was helping a

Re: D on quora ...

2017-10-15 Thread Adam Wilson via Digitalmars-d
database access (MySQL, PostgreSQL, Aerospike) libraries are available, That is important actually. So important that it should be a Priority 0 Must Have. preferably as a standard library (like in Dart and Go). Can’t do that. And it’s not standard in Go and Dart but packages, dub should

Re: My first experience as a D Newbie

2017-10-15 Thread Laeeth Isharc via Digitalmars-d
On Friday, 13 October 2017 at 13:14:39 UTC, Steven Schveighoffer wrote: On 10/13/17 2:58 AM, Peter R wrote: Replying to a couple of the comments here "I don't know if it's a different expectation or a different mindset or something else." I'd like to think I'm fairly knowledgeable, but Yes, I

GtkD 3.7.0 released, GTK+ with D.

2017-10-15 Thread Mike Wey via Digitalmars-d-announce
GtkD is a D binding and OO wrapper of Gtk+ and is released on the LGPL license. Apart form the biannual update to the latest glib/gtk version, this release adds bindings for Gstreamer Mpegts and Gstreamer AppSink. Full changelog: http://gtkd.org/changelog.html Download:

Re: My first experience as a D Newbie

2017-10-15 Thread Jacob Carlborg via Digitalmars-d
On 2017-10-13 17:29, Rion wrote: Recently i was helping a developer who was benchmarking D+Vibe.d, on his OsX he never got parallel support to work ( error fault 11 )  for Vibe.d, resulting in vibe.d running single core and losing to Crystal and Rust big time ( single core tests ). I do not

[Issue 11847] sub-pkg not available as qualified name

2017-10-15 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=11847 Martin Nowak changed: What|Removed |Added Summary|Importing "package.d" |sub-pkg not available as

Re: D on quora ...

2017-10-15 Thread Dmitry Olshansky via Digitalmars-d
On Sunday, 15 October 2017 at 16:29:22 UTC, Ecstatic Coder wrote: On Sunday, 15 October 2017 at 12:14:02 UTC, Dmitry Olshansky wrote: If all that is already available, perfect :) [snip] And moreover I'd be delighted to start using D instead of Go for my next web server developments. You can

Re: D on quora ...

2017-10-15 Thread Ecstatic Coder via Digitalmars-d
On Sunday, 15 October 2017 at 12:14:02 UTC, Dmitry Olshansky wrote: On Sunday, 15 October 2017 at 10:09:02 UTC, Ecstatic Coder wrote: If the GC issue can not be tackled and even with the recent communication blogs, it still keeps showing up. Is it maybe not better to focus the marketing

Re: Is there an opposite of .toString()?

2017-10-15 Thread Faux Amis via Digitalmars-d-learn
On 2017-10-14 05:47, Jonathan M Davis wrote: On Saturday, October 14, 2017 00:18:35 myst via Digitalmars-d-learn wrote: I'm sorry if this has been answered already, it seems like a very basic question. There is .toString() method convention for printing, but I can not find anything alike for

Re: Proposal: Object/?? Destruction

2017-10-15 Thread Q. Schroll via Digitalmars-d
On Saturday, 14 October 2017 at 23:20:26 UTC, sarn wrote: On Saturday, 14 October 2017 at 22:20:46 UTC, Q. Schroll wrote: Therefore, and because of brackets, you can distinguish f(1, 2) from f([1, 2]). But in f([1, 2]), it's ambiguous (just by parsing) whether [1, 2] is a tuple literal or a

Why isn't IID_ITaskbarList3 defined?

2017-10-15 Thread Nieto via Digitalmars-d-learn
I'm trying to write a blinding and I found both IID_ITaskbarList and IID_ITaskbarList2 are defined but IID_ITaskbarList3 isn't. Any reason why it isn't defined? sorry if it sounds such a naive question, I'm new to COM and D interop. I knew a thing or two about PInvokes with C#. Then how do I

[Issue 16013] [REG2.072a] ICE with mutually dependent structs and alias this

2017-10-15 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16013 github-bugzi...@puremagic.com changed: What|Removed |Added Status|NEW |RESOLVED

[Issue 16013] [REG2.072a] ICE with mutually dependent structs and alias this

2017-10-15 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16013 --- Comment #4 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/4d798345fb4b28e03acb42abec88366bf55fb4b3 fix Issue 16013 - [REG2.072a] ICE with mutually dependent

[Issue 7957] std.functional untuple/untupleReversed too

2017-10-15 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=7957 Andrei Alexandrescu changed: What|Removed |Added Status|NEW |RESOLVED

Runtime.initialize nothrow?

2017-10-15 Thread Luís Marques via Digitalmars-d
The initialize and terminate methods of core.runtime.Runtime aren't nothrow. Can initialize actually throw? If so, is it safe to catch the Throwable and use it, given that the RT isn't properly initialized? If it doesn't actually throw, shouldn't it be marked nothrow?

Re: debugging in vs code on Windows

2017-10-15 Thread Dmitry via Digitalmars-d-learn
On Friday, 13 October 2017 at 12:55:09 UTC, piotrklos wrote: Has anyone been able to debug in VS code on Windows? What am I doing wrong? Yep, it work for me. How do you start debugging? I noticed that the bottom button (small bug) at status bar doesn't work for me. But when I use Debug →

Re: D on quora ...

2017-10-15 Thread Daniel Kozak via Digitalmars-d
techempower bench is not good. It is wierd. On my pc vibe.d is much faster with techempower benchmark. So I do not beleive their results Dne 15. 10. 2017 12:10 odpoledne napsal uživatel "Ecstatic Coder via Digitalmars-d" : If the GC issue can not be tackled and even

Re: D on quora ...

2017-10-15 Thread Dmitry Olshansky via Digitalmars-d
On Sunday, 15 October 2017 at 10:09:02 UTC, Ecstatic Coder wrote: If the GC issue can not be tackled and even with the recent communication blogs, it still keeps showing up. Is it maybe not better to focus the marketing features that other developers ( none C++ ) may see as advantages and slow

Re: D on quora ...

2017-10-15 Thread Ecstatic Coder via Digitalmars-d
If the GC issue can not be tackled and even with the recent communication blogs, it still keeps showing up. Is it maybe not better to focus the marketing features that other developers ( none C++ ) may see as advantages and slow draw then in? High performance web development package for

Re: How to overload with enum type?

2017-10-15 Thread Jonathan M Davis via Digitalmars-d-learn
On Sunday, October 15, 2017 08:47:42 Domain via Digitalmars-d-learn wrote: > void f(int i) > { > writeln("i"); > } > > void f(E)(E e) if (is(E == enum)) > { > writeln("e"); > } > > enum E { A } > E e = E.A; > f(e);// output i > > How can I overload with enum type? I'd strongly

Re: How to overload with enum type?

2017-10-15 Thread Domain via Digitalmars-d-learn
On Sunday, 15 October 2017 at 08:47:42 UTC, Domain wrote: void f(int i) { writeln("i"); } void f(E)(E e) if (is(E == enum)) { writeln("e"); } enum E { A } E e = E.A; f(e);// output i How can I overload with enum type? I know I can do that with this: void f(T)(T i) if (is(T ==

How to overload with enum type?

2017-10-15 Thread Domain via Digitalmars-d-learn
void f(int i) { writeln("i"); } void f(E)(E e) if (is(E == enum)) { writeln("e"); } enum E { A } E e = E.A; f(e);// output i How can I overload with enum type?

[Issue 11847] Importing "package.d" module causes qualified name lookup to fail for sub modules

2017-10-15 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=11847 --- Comment #12 from Martin Nowak --- Weird, only seems to fail for top-level packages, but not for nested `std.pkg` and `std.pkg.mod` cases. --

Re: DCompute v0.1.0 supporting OpenCL 2.1+ and CUDA

2017-10-15 Thread Nicholas Wilson via Digitalmars-d-announce
On Sunday, 15 October 2017 at 06:58:19 UTC, Ilya Yaroshenko wrote: On Sunday, 15 October 2017 at 05:57:35 UTC, Nicholas Wilson wrote: I am very pleased to announce the first proper release of DCompute, a framework for heterogeneous computing for D. It wraps the OpenCL and CUDA runtimes to run

Re: D on quora ...

2017-10-15 Thread Ecstatic Coder via Digitalmars-d
On Friday, 6 October 2017 at 21:12:58 UTC, Rion wrote: On Friday, 6 October 2017 at 20:17:33 UTC, Jonathan M Davis wrote: D's GC isn't going anywhere. The implementation may be improved or replaced, but there are huge advantages to having the GC (particularly with regards to memory safety),

Re: Assert and undefined behavior

2017-10-15 Thread Timon Gehr via Digitalmars-d-learn
On 14.10.2017 23:36, kdevel wrote: On Saturday, 14 October 2017 at 09:32:32 UTC, Timon Gehr wrote: Also, UB can and does sometimes mean that the program can execute arbitrary code. It's called "arbitrary code execution": https://en.wikipedia.org/wiki/Arbitrary_code_execution This confuses

Re: DCompute v0.1.0 supporting OpenCL 2.1+ and CUDA

2017-10-15 Thread Ilya Yaroshenko via Digitalmars-d-announce
On Sunday, 15 October 2017 at 05:57:35 UTC, Nicholas Wilson wrote: I am very pleased to announce the first proper release of DCompute, a framework for heterogeneous computing for D. It wraps the OpenCL and CUDA runtimes to run compute kernels for computationally intensive workloads.

Re: Will D continu to live after walter death?

2017-10-15 Thread bitwise via Digitalmars-d
On Friday, 13 October 2017 at 10:07:39 UTC, Walter Bright wrote: On 10/12/2017 8:04 AM, moechofe wrote: What is the wanted lifetime of the project? Is D will manage to pass through time? It is valuable to start a 40 years old project using D? Just download my engrams into the D-9000 computer.