DIP 1014

2018-09-29 Thread Manu via Digitalmars-d
Who knows about DIP 1014? (struct move hook) Is it well received? Is it likely to be accepted soon? I'm working on the std::string binding, it's almost finished... but then I hit a brick wall. GNU's std::string implementation stores an interior pointer! >_< No other implementation does this.

Re: Prevent opening binary/other garbage files

2018-09-29 Thread Adam D. Ruppe via Digitalmars-d-learn
On Saturday, 29 September 2018 at 23:46:26 UTC, helxi wrote: Thanks. Would you say https://dlang.org/library/std/encoding/get_bom.html is useful in this context? Eh, not really, most text files will not have one.

Re: Updating D beyond Unicode 2.0

2018-09-29 Thread Shachar Shemesh via Digitalmars-d
On Saturday, 29 September 2018 at 16:19:38 UTC, ag0aep6g wrote: On 09/29/2018 04:19 PM, Shachar Shemesh wrote: On 29/09/18 16:52, Dukc wrote: [...] I know you meant Sarn, but still... can you please be a bit less aggresive with our wording? From the article (the furthest point I read in

Re: Prevent opening binary/other garbage files

2018-09-29 Thread helxi via Digitalmars-d-learn
On Saturday, 29 September 2018 at 16:01:18 UTC, Adam D. Ruppe wrote: On Saturday, 29 September 2018 at 15:52:30 UTC, helxi wrote: I'm writing a utility that checks for specific keyword(s) found in the files in a given directory recursively. What's the best strategy to avoid opening a bin file

[Issue 19260] extern(C++) `T* const` mangling

2018-09-29 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19260 --- Comment #6 from Manu --- Of course! This is MS after all! This is not the first time this class of issue has emerged however, but in this case, I'm powerless to make any change to help... --

[Issue 19260] extern(C++) `T* const` mangling

2018-09-29 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19260 --- Comment #5 from ki...@gmx.net --- Well, as shown, D is flexible enough to overcome crappy situations like this, albeit in cumbersome ways. Just saying that I don't think it's worthwhile to come up, implement and document solutions to exotic

[Issue 19260] extern(C++) `T* const` mangling

2018-09-29 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19260 --- Comment #4 from Manu --- But it's impossible to link. That's really important... --

[Issue 19260] extern(C++) `T* const` mangling

2018-09-29 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19260 --- Comment #3 from ki...@gmx.net --- I don't think there's a need for a proper solution for this on the D side: 1) `T* const` is rare in my experience. 2) This `const` affecting the C++ mangle is a big mistake IMO. The caller can't care less about

[Issue 19260] extern(C++) `T* const` mangling

2018-09-29 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19260 --- Comment #2 from Manu --- I have used that hack to move forward... but it's not a reasonable solution. --

Re: lodash like utility/algorithms library for D

2018-09-29 Thread Paul Backus via Digitalmars-d-announce
On Saturday, 29 September 2018 at 12:40:14 UTC, aliak wrote: I.e. by allowing you to define the unexepcted you could for instance: enum JSONError { invalidKey, notString, notNumber } auto a = parse(jsonData); a.getAsString("key").match!( (string value) => // yay (JSONError error)

LDC 1.12.0-beta2 (based on LLVM 7)

2018-09-29 Thread kinke via Digitalmars-d-announce
Glad to announce the second beta for LDC 1.12. * Based on D 2.082.0+ (today's DMD stable). * Support for LLVM 7, which is used for the prebuilt packages. Due to an LLVM 7.0.0 regression, the prebuilt x86[_64] LDC binaries require a CPU with SSSE3. * New, Easy::jit-like interface for

[Issue 19249] Trying to build DMD for windows with LDC fails

2018-09-29 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19249 --- Comment #4 from ki...@gmx.net --- Should be working with LDC v1.12-beta2 again. --

Re: Quick C bindings

2018-09-29 Thread Arun Chandrasekaran via Digitalmars-d
On Friday, 28 September 2018 at 16:39:14 UTC, Márcio Martins wrote: Hi y'all! If you'd be so kind and help me out here with a few questions/opinions: I would like to generate decent D bindings for https://github.com/libuv/libuv with as little pain as possible. What are you guys using

Re: vibe.d error

2018-09-29 Thread hridyansh thakur via Digitalmars-d-learn
On Friday, 28 September 2018 at 11:08:57 UTC, Sebastiaan Koppe wrote: On Thursday, 27 September 2018 at 17:37:43 UTC, hridyansh thakur wrote: [snip] What version of dmd do you use? i am using ldc and gdc not dmd LDC - the LLVM D compiler (1.11.0git-054d933): based on DMD v2.081.0 and

[Issue 18955] extern(C++) default struct mangling is overridden when interacting with a `cppmangle = class` template

2018-09-29 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18955 --- Comment #9 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/a1a87203a1f01c79a96ffbc1a45cece2fed6501e add test for issue 18955

Re: Updating D beyond Unicode 2.0

2018-09-29 Thread ag0aep6g via Digitalmars-d
On 09/29/2018 04:19 PM, Shachar Shemesh wrote: On 29/09/18 16:52, Dukc wrote: [...] I know you meant Sarn, but still... can you please be a bit less aggresive with our wording? From the article (the furthest point I read in it): When I ask myself what I've found life is too short for, the

Re: Prevent opening binary/other garbage files

2018-09-29 Thread Adam D. Ruppe via Digitalmars-d-learn
On Saturday, 29 September 2018 at 15:52:30 UTC, helxi wrote: I'm writing a utility that checks for specific keyword(s) found in the files in a given directory recursively. What's the best strategy to avoid opening a bin file or some sort of garbage dump? Check encoding of the given file?

Re: lodash like utility/algorithms library for D

2018-09-29 Thread aliak via Digitalmars-d-announce
On Saturday, 29 September 2018 at 12:44:38 UTC, aliak wrote: On Saturday, 29 September 2018 at 01:40:34 UTC, Robby Marki wrote: On Friday, 28 September 2018 at 14:02:48 UTC, aliak wrote: [...] In this example https://aliak00.github.io/ddash/ddash/functional/try_.html where does the match

Prevent opening binary/other garbage files

2018-09-29 Thread helxi via Digitalmars-d-learn
I'm writing a utility that checks for specific keyword(s) found in the files in a given directory recursively. What's the best strategy to avoid opening a bin file or some sort of garbage dump? Check encoding of the given file? If so, what are the most popular encodings (in POSIX if that

Re: Updating D beyond Unicode 2.0

2018-09-29 Thread Shachar Shemesh via Digitalmars-d
On 29/09/18 16:52, Dukc wrote: On Saturday, 29 September 2018 at 02:22:55 UTC, Shachar Shemesh wrote: I missed something he said in one of the other (as of this writing, 98) posts of this thread, and thus causing Dukc to label me a bullshitter. I know you meant Sarn, but still... can you

Re: Updating D beyond Unicode 2.0

2018-09-29 Thread Dukc via Digitalmars-d
On Saturday, 29 September 2018 at 02:22:55 UTC, Shachar Shemesh wrote: I missed something he said in one of the other (as of this writing, 98) posts of this thread, and thus causing Dukc to label me a bullshitter. I know you meant Sarn, but still... can you please be a bit less aggresive

[Issue 19275] std.process: redirecting output in a non-console application fails

2018-09-29 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19275 Rainer Schuetze changed: What|Removed |Added Keywords||pull --- Comment #1 from Rainer Schuetze

[Issue 19275] std.process: redirecting output in a non-console application fails

2018-09-29 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19275 Rainer Schuetze changed: What|Removed |Added Summary|st.process: redirecting |std.process: redirecting

[Issue 19275] New: st.process: redirecting output in a non-console application fails

2018-09-29 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19275 Issue ID: 19275 Summary: st.process: redirecting output in a non-console application fails Product: D Version: D2 Hardware: x86_64 OS: Windows

Re: lodash like utility/algorithms library for D

2018-09-29 Thread aliak via Digitalmars-d-announce
On Saturday, 29 September 2018 at 01:40:34 UTC, Robby Marki wrote: On Friday, 28 September 2018 at 14:02:48 UTC, aliak wrote: Hi, I've been working for fun on a library [0] that is inspired by a library from the javascript world called lodash [1]. I basically liked the flexibility and

Re: lodash like utility/algorithms library for D

2018-09-29 Thread aliak via Digitalmars-d-announce
On Friday, 28 September 2018 at 17:33:04 UTC, Paul Backus wrote: On Friday, 28 September 2018 at 14:02:48 UTC, aliak wrote: Hi, [...] Lots of good stuff here! I'm curious about your approach to `Expect`, since I've written a version of it myself. How useful have you found being able to

Re: Quick C bindings

2018-09-29 Thread Márcio Martins via Digitalmars-d
On Friday, 28 September 2018 at 16:44:31 UTC, Adam D. Ruppe wrote: What, exactly do you want to do with them? Using them is well-supported, but creating them is more iffy. Create/load/unload. I want to create a hot-reload workflow of smaller components of my projects, since compilation times

Re: Quick C bindings

2018-09-29 Thread Márcio Martins via Digitalmars-d
On Friday, 28 September 2018 at 21:42:25 UTC, bachmeier wrote: If they're pure C, you can use dpp: https://github.com/atilaneves/dpp Even if you want to work with the bindings, not just call the C functions, you can use the intermediate files that dpp creates. It works with pretty much

[Issue 12694] Better error message for function call matching more than two overloads

2018-09-29 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=12694 wolframw changed: What|Removed |Added Status|NEW |ASSIGNED CC|

Re: Funny way to crash dmd and brick the whole computer

2018-09-29 Thread bauss via Digitalmars-d
On Friday, 28 September 2018 at 11:58:25 UTC, Zardoz wrote: CTE fib : module fib_cte; import std.stdio; long fib(long n) { if (n <= 1) return 1; return fib(n - 1) + fib(n - 2); } static immutable valueFib = fib(46); void main() { writeln(valueFib); } What exactly did you expect?

Re: Delegates with stackpointers

2018-09-29 Thread bauss via Digitalmars-d-learn
On Saturday, 29 September 2018 at 06:01:50 UTC, Ritchie wrote: How does a delegate with a stackpointer work? e.g. in this example: https://run.dlang.io/is/XviMSl Does the second call to foo not overwrite the stack of the first call and thereby the data pointed to by bar1? How is that data

Re: Delegates with stackpointers

2018-09-29 Thread Alex via Digitalmars-d-learn
On Saturday, 29 September 2018 at 06:01:50 UTC, Ritchie wrote: How does a delegate with a stackpointer work? e.g. in this example: https://run.dlang.io/is/XviMSl Does the second call to foo not overwrite the stack of the first call and thereby the data pointed to by bar1? How is that data

Delegates with stackpointers

2018-09-29 Thread Ritchie via Digitalmars-d-learn
How does a delegate with a stackpointer work? e.g. in this example: https://run.dlang.io/is/XviMSl Does the second call to foo not overwrite the stack of the first call and thereby the data pointed to by bar1? How is that data preserved?