Re: D IDE Coedit - version 3 beta 3

2017-01-30 Thread Basile B. via Digitalmars-d-announce
On Tuesday, 31 January 2017 at 07:23:24 UTC, Basile B. wrote: On Monday, 30 January 2017 at 23:32:12 UTC, dminded wrote: Ok, the debugger also works if i write a bit more then just a 'writeln' into main. How can i set breakpoints? If i click on the left side of a row, a little red dot

Re: D IDE Coedit - version 3 beta 3

2017-01-30 Thread Basile B. via Digitalmars-d-announce
On Monday, 30 January 2017 at 19:45:38 UTC, dminded wrote: On Sunday, 29 January 2017 at 02:56:53 UTC, Basile B. wrote: I'm on IRC right now. Communication on the forum is really painfull, it looks like I need to explain a few things. Also you can ask questions on the bugtracker, although it's

Re: D IDE Coedit - version 3 beta 3

2017-01-30 Thread Basile B. via Digitalmars-d-announce
On Monday, 30 January 2017 at 23:32:12 UTC, dminded wrote: Ok, the debugger also works if i write a bit more then just a 'writeln' into main. How can i set breakpoints? If i click on the left side of a row, a little red dot appears. This means that GDB cannot set the breakpoint. checkout

Re: Yield from function?

2017-01-30 Thread Ali Çehreli via Digitalmars-d-learn
On 01/30/2017 08:12 PM, Profile Anaysis wrote: import std.stdio, std.concurrency, core.thread; class Search : Fiber { this() { super(); } int res = 0; void start() { Fiber.yield(); res = 1; } } void main() { auto search = new Search(); search.call();

Re: Snap packages for D compilers and core projects

2017-01-30 Thread Joakim via Digitalmars-d
On Monday, 30 January 2017 at 23:47:50 UTC, Joseph Rushton Wakeling wrote: On Monday, 30 January 2017 at 19:07:03 UTC, Nick Sabalausky wrote: I don't understand where people keep getting that idea. It very clearly states that all you need is to ask permission. It's always been that way, and no

Re: Yield from function?

2017-01-30 Thread Profile Anaysis via Digitalmars-d-learn
On Monday, 30 January 2017 at 18:48:10 UTC, Ali Çehreli wrote: On 01/30/2017 03:03 AM, Profile Anaysis wrote: > I need to yield from a complex recursive function too allow visualizing > what it is doing. > > e.g., if it is a tree searching algorithm, I'd like to yield for each > node so that the

Re: Yield from function?

2017-01-30 Thread Profile Anaysis via Digitalmars-d-learn
On Monday, 30 January 2017 at 22:34:11 UTC, TheFlyingFiddle wrote: On Monday, 30 January 2017 at 11:03:52 UTC, Profile Anaysis wrote: I need to yield from a complex recursive function too allow visualizing what it is doing. e.g., if it is a tree searching algorithm, I'd like to yield for

[Issue 17132] Using DLL makes an empty stacktrace on error

2017-01-30 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17132 j...@red.email.ne.jp changed: What|Removed |Added Keywords||dll --

Re: C++ interop

2017-01-30 Thread Timothee Cour via Digitalmars-d
also: catch D exceptions from C++ vs catching C++ exceptions from D; IIRC only one direction is supported On Mon, Jan 30, 2017 at 11:42 AM, kinke via Digitalmars-d < digitalmars-d@puremagic.com> wrote: > I was wondering whether C++ interop is already considered sufficiently > working enough, as

[Issue 17132] Using DLL makes an empty stacktrace on error

2017-01-30 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17132 --- Comment #1 from j...@red.email.ne.jp --- The reason is that each dlls and app initialize the own druntime (and stacktrace modules) though the Windows' DBGHELP does not allow to initialize *more than once*.

[Issue 17132] New: Using DLL makes an empty stacktrace on error

2017-01-30 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17132 Issue ID: 17132 Summary: Using DLL makes an empty stacktrace on error Product: D Version: D2 Hardware: All OS: Windows Status: NEW Severity: normal

Re: memcpy() comparison: C, Rust, and D

2017-01-30 Thread rikki cattermole via Digitalmars-d
On 31/01/2017 3:58 PM, Jaded Observer wrote: On Tuesday, 31 January 2017 at 02:01:05 UTC, Walter Bright wrote: On 1/30/2017 5:53 PM, Mike wrote: One in particular prevents me from using D, period! - https://issues.dlang.org/show_bug.cgi?id=14758 The -betterC switch is the approach we intend

Re: memcpy() comparison: C, Rust, and D

2017-01-30 Thread Jaded Observer via Digitalmars-d
On Tuesday, 31 January 2017 at 02:01:05 UTC, Walter Bright wrote: On 1/30/2017 5:53 PM, Mike wrote: One in particular prevents me from using D, period! - https://issues.dlang.org/show_bug.cgi?id=14758 The -betterC switch is the approach we intend to take to deal with that issue. You aren't

Re: memcpy() comparison: C, Rust, and D

2017-01-30 Thread Mike via Digitalmars-d
On Tuesday, 31 January 2017 at 02:01:05 UTC, Walter Bright wrote: On 1/30/2017 5:53 PM, Mike wrote: One in particular prevents me from using D, period! - https://issues.dlang.org/show_bug.cgi?id=14758 The -betterC switch is the approach we intend to take to deal with that issue. I

Re: Release D 2.073.0

2017-01-30 Thread Nestor via Digitalmars-d-announce
Just a quick unrelated words: Shouldn't copyright be updated too? D:\>dmd --version DMD32 D Compiler v2.073.0 Copyright (c) 1999-2016 by Digital Mars written by Walter Bright

Re: memcpy() comparison: C, Rust, and D

2017-01-30 Thread Walter Bright via Digitalmars-d
On 1/30/2017 5:53 PM, Mike wrote: One in particular prevents me from using D, period! - https://issues.dlang.org/show_bug.cgi?id=14758 The -betterC switch is the approach we intend to take to deal with that issue.

Re: memcpy() comparison: C, Rust, and D

2017-01-30 Thread Mike via Digitalmars-d
On Tuesday, 31 January 2017 at 01:30:48 UTC, Walter Bright wrote: Just from D's type signature, we can know a lot about memcpy(): Yes, D has some notable advantages over other languages, but it also has some notable disadvantages. One in particular prevents me from using D, period! -

memcpy() comparison: C, Rust, and D

2017-01-30 Thread Walter Bright via Digitalmars-d
The C99 Standard says: #include void *memcpy(void * restrict s1, const void * restrict s2, size_t n); Description The memcpy function copies n characters from the object pointed to by s2 into the object pointed to by s1. If copying takes place between objects that overlap, the

Re: `in` no longer same as `const ref`

2017-01-30 Thread Chris Wright via Digitalmars-d
On Mon, 30 Jan 2017 19:05:33 +, Q. Schroll wrote: > Would have been a far better definition. Why does anyone really need a > shorthand attribute for two attributes that could be easily spelled out? Because there was existing code thath used `in` and `scope const` was the nearest equivalent.

Re: `in` no longer same as `const ref`

2017-01-30 Thread Walter Bright via Digitalmars-d
On 1/30/2017 7:06 AM, Nordlöw wrote: And it won't be too difficult to search-and-replace `const scope` with `in` once things has stabilized and all the corner cases have been sorted out. Thanks for making D more safe, Walter. D really needs it in the competition with Rust. You're welcome.

Re: `in` no longer same as `const ref`

2017-01-30 Thread Soulsbane via Digitalmars-d
On Monday, 30 January 2017 at 00:26:27 UTC, Walter Bright wrote: On 1/29/2017 3:50 AM, Nordlöw wrote: Why is `in` no longer the same as `const scope`? Because it was unchecked and largely unimplemented. I was afraid that by checking it, too much code would break. Unless I'm completely

Re: Snap packages for D compilers and core projects

2017-01-30 Thread Joseph Rushton Wakeling via Digitalmars-d
On Monday, 30 January 2017 at 19:07:03 UTC, Nick Sabalausky wrote: I don't understand where people keep getting that idea. It very clearly states that all you need is to ask permission. It's always been that way, and no reasonable request (or any at all to my knowledge) has ever been denied.

Re: D IDE Coedit - version 3 beta 3

2017-01-30 Thread dminded via Digitalmars-d-announce
Ok, the debugger also works if i write a bit more then just a 'writeln' into main. How can i set breakpoints? If i click on the left side of a row, a little red dot appears. But the debugger seems to ignore it and instead every statement is a breakpoint. I also can not find a "step out of

Re: Yield from function?

2017-01-30 Thread TheFlyingFiddle via Digitalmars-d-learn
On Monday, 30 January 2017 at 11:03:52 UTC, Profile Anaysis wrote: I need to yield from a complex recursive function too allow visualizing what it is doing. e.g., if it is a tree searching algorithm, I'd like to yield for each node so that the current state can be shown visually. I realize

Re: Yield from function?

2017-01-30 Thread Ali Çehreli via Digitalmars-d-learn
On 01/30/2017 02:04 PM, cym13 wrote: On Monday, 30 January 2017 at 18:48:10 UTC, Ali Çehreli wrote: http://ddili.org/ders/d.en/fibers.html BTW the alias to avoid a name conflic on "Generator" isn't necessary anymore [...] Otherwise I believe you'll agree that removing it would make it

Re: Yield from function?

2017-01-30 Thread cym13 via Digitalmars-d-learn
On Monday, 30 January 2017 at 18:48:10 UTC, Ali Çehreli wrote: On 01/30/2017 03:03 AM, Profile Anaysis wrote: > I need to yield from a complex recursive function too allow visualizing > what it is doing. > > e.g., if it is a tree searching algorithm, I'd like to yield for each > node so that the

Re: Why fatal log throw object.Error@(0) on console?

2017-01-30 Thread Ali Çehreli via Digitalmars-d-learn
On 01/30/2017 05:21 AM, Suliman wrote: I found in the docs mention "If data is logged with LogLevel fatal by default an Error will be thrown.". But what the reason of such behavior? That likely comes from the fact that 'fatal' describes states that you can't trust the program to do the right

Boston D Meetup 2/9: `shared` Experiences

2017-01-30 Thread Steven Schveighoffer via Digitalmars-d-announce
Attention fellow Boston D enthusiasts: I have set up a meetup for February, and Michael Coulombe will give a presentation on his experiences with shared. As before, this will be at the Capital One Cafe in the back bay (across from Prudential center). Hope to see you all there!

Re: `in` no longer same as `const ref`

2017-01-30 Thread kinke via Digitalmars-d
On Monday, 30 January 2017 at 19:05:33 UTC, Q. Schroll wrote: Can't we make "in" mean "const scope ref", that binds on r-values, too? Effectively, that's (similar to) what "const T&" in C++ means. It's a non-copying const view on the object. We have the longstanding problem, one must overload

Re: D IDE Coedit - version 3 beta 3

2017-01-30 Thread dminded via Digitalmars-d-announce
On Sunday, 29 January 2017 at 02:56:53 UTC, Basile B. wrote: I'm on IRC right now. Communication on the forum is really painfull, it looks like I need to explain a few things. Also you can ask questions on the bugtracker, although it's the same problem as here (not real time...). Seems we

Re: `in` no longer same as `const ref`

2017-01-30 Thread bitwise via Digitalmars-d
On Monday, 30 January 2017 at 19:05:33 UTC, Q. Schroll wrote: Can't we make "in" mean "const scope ref", that binds on r-values, too? Effectively, that's (similar to) what "const T&" in C++ means. It's a non-copying const view on the object. 'ref' being separate from 'in' allows you to use

C++ interop

2017-01-30 Thread kinke via Digitalmars-d
I was wondering whether C++ interop is already considered sufficiently working enough, as I don't see any plans for improving it in the H1 2017 vision, except for the `C++ stdlib interface` bullet point. IMO, the main obstacles for mixed D/C++ RAII-style code are: 1) Constructors don't work

Re: Snap packages for D compilers and core projects

2017-01-30 Thread Jon Degenhardt via Digitalmars-d
On Monday, 30 January 2017 at 19:28:58 UTC, bachmeier wrote: On Monday, 30 January 2017 at 16:53:34 UTC, Joseph Rushton Wakeling wrote: Yea, I'm a little sad to see the apparent lack of feedback/interest :-\ I have interest, but as I've never heard of Snap before, I have no comments. Others

Re: Snap packages for D compilers and core projects

2017-01-30 Thread bachmeier via Digitalmars-d
On Monday, 30 January 2017 at 16:53:34 UTC, Joseph Rushton Wakeling wrote: Yea, I'm a little sad to see the apparent lack of feedback/interest :-\ I have interest, but as I've never heard of Snap before, I have no comments. Others may be in the same boat. Installation of D compilers is

Re: Snap packages for D compilers and core projects

2017-01-30 Thread Nick Sabalausky via Digitalmars-d
On 01/30/2017 09:40 AM, qznc wrote: Is it legally possible to distribute DMD this way? Afaik only dlang.org is allowed to distribute it publically due to the backend licence issue. I don't understand where people keep getting that idea. It very clearly states that all you need is to ask

Re: `in` no longer same as `const ref`

2017-01-30 Thread Q. Schroll via Digitalmars-d
On Monday, 30 January 2017 at 12:08:06 UTC, Olivier FAURE wrote: On Monday, 30 January 2017 at 06:38:11 UTC, Jonathan M Davis wrote: Personally, I think that effectively having an alias for two attributes in a single attribute is a confusing design decision anyway and think that it was a

Re: Yield from function?

2017-01-30 Thread Ali Çehreli via Digitalmars-d-learn
On 01/30/2017 03:03 AM, Profile Anaysis wrote: > I need to yield from a complex recursive function too allow visualizing > what it is doing. > > e.g., if it is a tree searching algorithm, I'd like to yield for each > node so that the current state can be shown visually. I used tree iteration as

Re: embedding a library in Windows

2017-01-30 Thread biozic via Digitalmars-d-learn
On Monday, 30 January 2017 at 17:25:13 UTC, Nestor wrote: On Monday, 30 January 2017 at 16:40:47 UTC, biozic wrote: As an alternative, you could build an object file from Sqlite's source code (e.g. the amalgamation file from Sqlite's website) with a C compiler. Then you just build your D

Re: mysql-native: API Refresh RC

2017-01-30 Thread Nick Sabalausky via Digitalmars-d-announce
On 01/30/2017 02:49 AM, Sönke Ludwig wrote: What about directly going for 1.0.0? At least after it has gotten enough real-world exposure, I'd say that the first API overhaul is a good opportunity for that. Good point.

[Issue 8471] std.stdio.readf should be @trusted

2017-01-30 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=8471 --- Comment #13 from Jakub Łabaj --- I understand now, thanks! You can find my profile here: https://github.com/byebye. I've create a simple PR: https://github.com/dlang/phobos/pull/5040 for similar issue involving

Re: embedding a library in Windows

2017-01-30 Thread Nestor via Digitalmars-d-learn
On Monday, 30 January 2017 at 16:40:47 UTC, biozic wrote: As an alternative, you could build an object file from Sqlite's source code (e.g. the amalgamation file from Sqlite's website) with a C compiler. Then you just build your D application with: dmd app.d sqlite3.d sqlite3.o[bj] No dll.

[Issue 8471] std.stdio.readf should be @trusted

2017-01-30 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=8471 --- Comment #12 from Andrei Alexandrescu --- @Jakub, what's your github id? thx! --

[Issue 8471] std.stdio.readf should be @trusted

2017-01-30 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=8471 --- Comment #11 from Andrei Alexandrescu --- Oh, sorry. The idea is to leave readf unqualified and let the compiler infer whether it's safe or not. In this particular case I see there's a simple solution - just add a constraint to

[Issue 8471] std.stdio.readf should be @trusted

2017-01-30 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=8471 --- Comment #10 from Jakub Łabaj --- I know how to create PRs, I've already created some. What I mean is I'm not sure how you see the solution, e.g. '@safe function with a small @trusted core', could elaborate on this, please?

[Issue 17131] New: [Reg 2.074] Fiber.state collides with differently attributed function in derived class

2017-01-30 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17131 Issue ID: 17131 Summary: [Reg 2.074] Fiber.state collides with differently attributed function in derived class Product: D Version: D2 Hardware: All OS: All

[Issue 17130] [Reg 2.074] ambiguous implicit super call when inheriting core.sync.mutex.Mutex

2017-01-30 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17130 Martin Nowak changed: What|Removed |Added Hardware|x86_64 |All OS|Linux

[Issue 8471] std.stdio.readf should be @trusted

2017-01-30 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=8471 --- Comment #9 from Andrei Alexandrescu --- (In reply to Jakub Łabaj from comment #8) > Sorry, I'm not sure what you mean by that - what are the next steps to do > here? I think Razvan Nitu has reached out to you on how to go

Re: Snap packages for D compilers and core projects

2017-01-30 Thread Joseph Rushton Wakeling via Digitalmars-d
On Monday, 30 January 2017 at 14:40:13 UTC, qznc wrote: No comments? Well, there seems to be no downside (apart from the work). Yea, I'm a little sad to see the apparent lack of feedback/interest :-\ I had quite a lot of fun creating these packages and was hoping for a bit more curiosity.

[Issue 17130] New: [Reg 2.074] ambiguous implicit super call when inheriting core.sync.mutex.Mutex

2017-01-30 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17130 Issue ID: 17130 Summary: [Reg 2.074] ambiguous implicit super call when inheriting core.sync.mutex.Mutex Product: D Version: D2 Hardware: x86_64 OS: Linux

Re: embedding a library in Windows

2017-01-30 Thread biozic via Digitalmars-d-learn
On Monday, 30 January 2017 at 16:40:47 UTC, biozic wrote: You could also try https://code.dlang.org/packages/d2sqlite3 with option "--all-included". This wasn't tested much though. Sorry, this uses a dll on Windows.

Re: embedding a library in Windows

2017-01-30 Thread biozic via Digitalmars-d-learn
On Monday, 30 January 2017 at 13:00:15 UTC, Nestor wrote: Hi, In Windows, is it possible embed a dll library into an application (in this particular case, sqlite3.dll)? Notice I don't mean storing the resource in the application to extract it at runtime, but rather to produce a static

Re: embedding a library in Windows

2017-01-30 Thread kinke via Digitalmars-d-learn
You'll probably be more successful with a static .lib library generated with the MS compiler (Visual Studio). I'd suggest compiling sqlite yourself and then using DMD with the `-m32mscoff` switch (32-bit) or `-m64` for 64-bit. Google is your friend in case you don't know how to build a static

Re: embedding a library in Windows

2017-01-30 Thread Kagamin via Digitalmars-d-learn
That looks compiled for linux.

[Issue 17057] trait "allMembers" incorrectly includes imports

2017-01-30 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17057 --- Comment #1 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/912252b50277b95964981ef197d708db662b6554 Fix Issue 17057 - Added test file

[Issue 17057] trait "allMembers" incorrectly includes imports

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

Re: embedding a library in Windows

2017-01-30 Thread Nestor via Digitalmars-d-learn
On Monday, 30 January 2017 at 13:58:45 UTC, Adam D. Ruppe wrote: On Monday, 30 January 2017 at 13:29:20 UTC, Nestor wrote: OK, and in case I have a sqlite3.a file Just pass the sqlite3.a file instead of sqlite3.lib and the compiler should do the rest... worst case is you might need to edit

Re: CTFE Status

2017-01-30 Thread Stefan Koch via Digitalmars-d
New bugs incoming: uint fn(uint a) { final switch(a) { case 1 : { while(a < 20) // bool whileCondition; //WhileBlockEvalCond : //whileCondition = (a < 20); { //WhileBlockBegin: a++;

Re: `in` no longer same as `const ref`

2017-01-30 Thread Olivier FAURE via Digitalmars-d
On Monday, 30 January 2017 at 13:57:10 UTC, Adam D. Ruppe wrote: On Monday, 30 January 2017 at 00:26:27 UTC, Walter Bright wrote: I was afraid that by checking it, too much code would break. Code that was using it improperly was *already* broken. Now, the compiler will simply tell them, at

Re: `in` no longer same as `const ref`

2017-01-30 Thread Nordlöw via Digitalmars-d
On Monday, 30 January 2017 at 11:32:11 UTC, Walter Bright wrote: I'd rather do one thing at a time. +1 And it won't be too difficult to search-and-replace `const scope` with `in` once things has stabilized and all the corner cases have been sorted out. Thanks for making D more safe,

Re: embedding a library in Windows

2017-01-30 Thread Kagamin via Digitalmars-d-learn
On Monday, 30 January 2017 at 13:29:20 UTC, Nestor wrote: OK, and in case I have a sqlite3.a file, what parameters should I pass to dmd to build a static application? If it's an import library, you will link against the dll dynamically (the library only contains bindings to dll). If it's a

Re: Snap packages for D compilers and core projects

2017-01-30 Thread qznc via Digitalmars-d
On Sunday, 29 January 2017 at 20:07:50 UTC, Joseph Rushton Wakeling wrote: The question is, (i) is this a welcome proposal? and (ii) if it is welcome, what do people see as the best way to go about this? No comments? Well, there seems to be no downside (apart from the work). So far, I

[Issue 17129] New: class-nested alias of free function can't be called from const-methods

2017-01-30 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17129 Issue ID: 17129 Summary: class-nested alias of free function can't be called from const-methods Product: D Version: D2 Hardware: x86_64 OS: Linux

Re: `in` no longer same as `const ref`

2017-01-30 Thread Adam D. Ruppe via Digitalmars-d
On Monday, 30 January 2017 at 00:26:27 UTC, Walter Bright wrote: I was afraid that by checking it, too much code would break. Code that was using it improperly was *already* broken. Now, the compiler will simply tell them, at compile time, why instead of letting it silently accept undefined

Re: embedding a library in Windows

2017-01-30 Thread Adam D. Ruppe via Digitalmars-d-learn
On Monday, 30 January 2017 at 13:29:20 UTC, Nestor wrote: OK, and in case I have a sqlite3.a file Just pass the sqlite3.a file instead of sqlite3.lib and the compiler should do the rest... worst case is you might need to edit the source of my sqlite.d to comment out the pragma(lib) line to

Re: mysql-native: API Refresh RC

2017-01-30 Thread Daniel Kozak via Digitalmars-d-announce
Dne 30.1.2017 v 10:53 aberba via Digitalmars-d-announce napsal(a): On Monday, 30 January 2017 at 08:09:18 UTC, Daniel Kozak wrote: Wow :) Maybe it is time to go back from mysql-lited to mysql-native :) I doubt that. Mysql-lited has support for using a struct as a Schema for DB queries. The

[Issue 16521] Wrong code generation with switch + static foreach

2017-01-30 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16521 Nemanja Boric <4bur...@gmail.com> changed: What|Removed |Added CC||4bur...@gmail.com ---

Re: embedding a library in Windows

2017-01-30 Thread Nestor via Digitalmars-d-learn
On Monday, 30 January 2017 at 13:22:45 UTC, Kagamin wrote: In general case the library can depend on it being a dll, then it can't be linked statically. OK, and in case I have a sqlite3.a file, what parameters should I pass to dmd to build a static application?

Re: embedding a library in Windows

2017-01-30 Thread Kagamin via Digitalmars-d-learn
In general case the library can depend on it being a dll, then it can't be linked statically.

Re: Why fatal log throw object.Error@(0) on console?

2017-01-30 Thread Suliman via Digitalmars-d-learn
I found in the docs mention "If data is logged with LogLevel fatal by default an Error will be thrown.". But what the reason of such behavior?

Project Highlight: DPaste

2017-01-30 Thread Mike Parker via Digitalmars-d-announce
Nazriel talks about the past, present, and future of his online D compiler and collaboration tool. The usual links: https://dlang.org/blog/2017/01/30/project-highlight-dpaste/ https://www.reddit.com/r/programming/comments/5r0ksq/dpaste_an_online_compiler_and_collaboration_tool/

[Issue 17128] Wrong destructor call, if variables declared using tuple of types.

2017-01-30 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17128 ag0ae...@gmail.com changed: What|Removed |Added Keywords||wrong-code CC|

Re: Another bug?

2017-01-30 Thread Yuxuan Shui via Digitalmars-d-learn
On Monday, 30 January 2017 at 12:40:44 UTC, Jack Applegame wrote: bug report: https://issues.dlang.org/show_bug.cgi?id=17128 LDC (2.070.2) has a different problem: the dtor is never called.

embedding a library in Windows

2017-01-30 Thread Nestor via Digitalmars-d-learn
Hi, In Windows, is it possible embed a dll library into an application (in this particular case, sqlite3.dll)? Notice I don't mean storing the resource in the application to extract it at runtime, but rather to produce a static self-contained application. If it's possible, please provide a

Re: D idom for removing array elements

2017-01-30 Thread ag0aep6g via Digitalmars-d-learn
On 01/30/2017 01:33 PM, albert-j wrote: On Monday, 30 January 2017 at 12:31:33 UTC, albert-j wrote: OK, got it. Can you do removal without reallocation with std.container.array? Array!int arr; foreach (i; 0..10) arr ~= i; Sorry, sent too early. arr = arr[].remove!(x=> x > 5);

Re: Another bug?

2017-01-30 Thread Jack Applegame via Digitalmars-d-learn
bug report: https://issues.dlang.org/show_bug.cgi?id=17128

[Issue 17128] New: Wrong destructor call, if variables declared using tuple of types.

2017-01-30 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17128 Issue ID: 17128 Summary: Wrong destructor call, if variables declared using tuple of types. Product: D Version: D2 Hardware: All OS: All Status: NEW

Re: D idom for removing array elements

2017-01-30 Thread albert-j via Digitalmars-d-learn
On Monday, 30 January 2017 at 12:31:33 UTC, albert-j wrote: OK, got it. Can you do removal without reallocation with std.container.array? Array!int arr; foreach (i; 0..10) arr ~= i; Sorry, sent too early. arr = arr[].remove!(x=> x > 5); //Doesn't work withouth calling

Re: D idom for removing array elements

2017-01-30 Thread albert-j via Digitalmars-d-learn
On Monday, 30 January 2017 at 10:45:03 UTC, cym13 wrote: Meh. Forget that, bad memory. remove isn't working in-place. However slapping ".array" is still asking explicitely for reallocation, so just forget it. Here is a code that works: import std.conv; import std.stdio; import std.format;

Re: Another bug?

2017-01-30 Thread ag0aep6g via Digitalmars-d-learn
On 01/30/2017 12:55 PM, Jack Applegame wrote: Code: import std.stdio; struct Foo { int val = 0; ~this() { writefln("destruct %s", val); } } void bar(ARGS...)() { ARGS args; args[0].val = 1; writefln("val = %s", args[0].val); } void main() { bar!Foo(); }

Re: Problems compiling sqlite-d

2017-01-30 Thread Nestor via Digitalmars-d-learn
On Monday, 30 January 2017 at 03:07:22 UTC, Adam D. Ruppe wrote: If I specify all source files, there are even more problems: Error 42: Symbol Undefined _sqlite3_open It apparently couldn't find sqlite3.lib. Files sqlite3.{def|dll|lib} are on both source/ and source/arsd/ (just in case)

Why fatal log throw object.Error@(0) on console?

2017-01-30 Thread Suliman via Digitalmars-d-learn
import std.stdio; import std.experimental.logger; void main() { sharedLog = new FileLogger("New_Default_Log_File.log"); fatal("Fatal error: "); } All other log-levels write as expected log files, but `fatal` throw on console: app.exe object.Error@(0): A fatal log message

Re: Another bug?

2017-01-30 Thread Jack Applegame via Digitalmars-d-learn
WORKAROUND: import std.stdio; struct Foo { int val = 0; ~this() { writefln("destruct %s", val); } } void bar(ARGS...)() { struct Tuple { ARGS args; alias args this; } Tuple args; args[0].val = 1; writefln("val = %s", args[0].val); }

Re: `in` no longer same as `const ref`

2017-01-30 Thread Olivier FAURE via Digitalmars-d
On Monday, 30 January 2017 at 06:38:11 UTC, Jonathan M Davis wrote: Personally, I think that effectively having an alias for two attributes in a single attribute is a confusing design decision anyway and think that it was a mistake, but we've had folks slapping in on stuff for years with no

Another bug?

2017-01-30 Thread Jack Applegame via Digitalmars-d-learn
Code: import std.stdio; struct Foo { int val = 0; ~this() { writefln("destruct %s", val); } } void bar(ARGS...)() { ARGS args; args[0].val = 1; writefln("val = %s", args[0].val); } void main() { bar!Foo(); } Excpected output: val = 1 destruct 1 But

Re: Release D 2.073.0

2017-01-30 Thread deadalnix via Digitalmars-d-announce
On Saturday, 28 January 2017 at 21:46:17 UTC, Walter Bright wrote: Same problem, same solution, same fallout. What problem? Ask Andrei, he asked for inout's deprecation. I'm not going to run after you two like you are toddlers. Having to make the same case again and again for literally

Re: Release D 2.073.0

2017-01-30 Thread deadalnix via Digitalmars-d-announce
On Monday, 30 January 2017 at 01:34:52 UTC, ilya-stromberg wrote: Walter created an entire language and a community around it. Can you, please, share with us how your accomplishments give any importance to whatever your disagreement is with him? All that is visible, here is you protest

Re: Release D 2.073.0

2017-01-30 Thread deadalnix via Digitalmars-d-announce
On Monday, 30 January 2017 at 01:15:52 UTC, Dicebot wrote: On 01/30/2017 12:38 AM, Walter Bright wrote: ... Please, don't waste your time. You mentioned being curious about what is wrong with that PR - I have explained. Let's just stop here before you write another 20 posts presuming that I

Re: `in` no longer same as `const ref`

2017-01-30 Thread Walter Bright via Digitalmars-d
On 1/30/2017 12:42 AM, Radu wrote: Can it be enabled for -dip1000 flag? Doc was pretty clear on what it was suppose to do and people kinda knew that scope was not finished. Having it turned on for dip flag will allow some testing of the existing code. I would like to have in's intended semantic

Re: unDE 0.2.0 - unusual command line and keybar

2017-01-30 Thread unDEFER via Digitalmars-d-announce
On Monday, 30 January 2017 at 11:20:40 UTC, FreeSlave wrote: Can't load /home/freeslave/git_projects/unde/images/clear_errors.png: Invalid renderer Yes, it is very strange message, I still didn't find how to clean it out...

Re: unDE 0.2.0 - unusual command line and keybar

2017-01-30 Thread FreeSlave via Digitalmars-d-announce
On Monday, 30 January 2017 at 03:10:28 UTC, unDEFER wrote: On Sunday, 29 January 2017 at 23:57:30 UTC, FreeSlave wrote: On Sunday, 29 January 2017 at 19:00:30 UTC, unDEFER wrote: Very interesting concept (Probably it's not new, but I never actually used file managers like this). It looks you

Re: Bug in generator

2017-01-30 Thread ag0aep6g via Digitalmars-d-learn
On 01/30/2017 11:58 AM, Profile Anaysis wrote: Also, if one tries to create a global generator an error about PAGESIZE not being a compile time value is given. That means you can't initialize it statically, because PAGESIZE is not known statically. But you can have a global (module scope,

Re: Bug in generator

2017-01-30 Thread ag0aep6g via Digitalmars-d-learn
On 01/30/2017 11:58 AM, Profile Anaysis wrote: the code from https://dlang.org/library/std/concurrency/generator.html gives a seg fault at the end. import std.concurrency; import std.stdio; void main() { auto tid = spawn( { while (true) {

[Issue 17127] New: bad example code for std.concurrency.Generator

2017-01-30 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17127 Issue ID: 17127 Summary: bad example code for std.concurrency.Generator Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: minor

Re: Yield from function?

2017-01-30 Thread pineapple via Digitalmars-d-learn
On Monday, 30 January 2017 at 11:03:52 UTC, Profile Anaysis wrote: I need to yield from a complex recursive function too allow visualizing what it is doing. e.g., if it is a tree searching algorithm, I'd like to yield for each node so that the current state can be shown visually. I realize

Yield from function?

2017-01-30 Thread Profile Anaysis via Digitalmars-d-learn
I need to yield from a complex recursive function too allow visualizing what it is doing. e.g., if it is a tree searching algorithm, I'd like to yield for each node so that the current state can be shown visually. I realize that there are several ways to do this but D a yield version

Bug in generator

2017-01-30 Thread Profile Anaysis via Digitalmars-d-learn
the code from https://dlang.org/library/std/concurrency/generator.html gives a seg fault at the end. import std.concurrency; import std.stdio; void main() { auto tid = spawn( { while (true) { writeln(receiveOnly!int()); } }); auto r = new

Re: D idom for removing array elements

2017-01-30 Thread cym13 via Digitalmars-d-learn
On Monday, 30 January 2017 at 10:30:22 UTC, cym13 wrote: On Monday, 30 January 2017 at 08:50:14 UTC, albert-j wrote: On Monday, 30 January 2017 at 00:17:51 UTC, ag0aep6g wrote: Removing works by overwriting the array with only the wanted values and discarding the rest. But then why do I get

[Issue 12894] Make extern(Windows) behave like extern(C) on non-Windows systems

2017-01-30 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=12894 anonymous4 changed: What|Removed |Added Resolution|WONTFIX |INVALID --- Comment

Re: D idom for removing array elements

2017-01-30 Thread cym13 via Digitalmars-d-learn
On Monday, 30 January 2017 at 08:50:14 UTC, albert-j wrote: On Monday, 30 January 2017 at 00:17:51 UTC, ag0aep6g wrote: Removing works by overwriting the array with only the wanted values and discarding the rest. But then why do I get this: import std.stdio, std.algorithm, std.array;

[Issue 17118] [REG 2.074a] iasm64.d in test suite with with -g reveals a regression

2017-01-30 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17118 b2.t...@gmx.com changed: What|Removed |Added Status|NEW |RESOLVED Resolution|---

  1   2   >