[OT] Is there anybody from D-community in Tel Aviv?

2016-12-09 Thread Suliman via Digitalmars-d
I plan to visit Tel Aviv from 31 December to 6-th of January of next year. Is there anybody who take part in D-community there?

Re: CTFE Status

2016-12-09 Thread Stefan Koch via Digitalmars-d
On Monday, 31 October 2016 at 13:29:01 UTC, Stefan Koch wrote: Hi Guys, since I got a few complaints about giving minor status updates in the announce group, I am opening this thread. I will start with giving an overview of what works and what does not work. Currently the only basic type

[Issue 16961] New: Fix Algorithms to Account for ref Value Front and Avoid Copying Where Unnecessary.

2016-12-09 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16961 Issue ID: 16961 Summary: Fix Algorithms to Account for ref Value Front and Avoid Copying Where Unnecessary. Product: D Version: D2 Hardware: x86 OS: Windows

Re: ETA: std.experimental.allocator -> std.allocator

2016-12-09 Thread Ilya Yaroshenko via Digitalmars-d
Q4: Current allocator API requires DRuntime to be linked. So, they are not compatible with BetterC mode. Can this be fixed before std.experimental.allocator -> std.allocator migration? --Ilya

Re: Separate IP parts

2016-12-09 Thread Anonymouse via Digitalmars-d-learn
On Saturday, 10 December 2016 at 03:51:34 UTC, brocolis wrote: How do I separate IP parts with dlang? I found this very cool trick, with C++: http://stackoverflow.com/a/5328190 std::string ip ="192.168.1.54"; std::stringstream s(ip); int a,b,c,d; //to store the 4 ints char ch; //to

ETA: std.experimental.allocator -> std.allocator

2016-12-09 Thread Seb via Digitalmars-d
Hi all, tl;dr: I would like to start having GC-free methods and data structures in Phobos, which depends on std.allocator being stable (i.e not in experimental). Q1: So I would like to know what's missing/blocking this? Is it just time? (FYI: std.experimental.allocator has been merged in

[Issue 16949] [Reg 2.073] confusing @safe error message for fields with unsafe destructors

2016-12-09 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16949 Martin Nowak changed: What|Removed |Added Status|RESOLVED|REOPENED

Separate IP parts

2016-12-09 Thread brocolis via Digitalmars-d-learn
How do I separate IP parts with dlang? I found this very cool trick, with C++: http://stackoverflow.com/a/5328190 std::string ip ="192.168.1.54"; std::stringstream s(ip); int a,b,c,d; //to store the 4 ints char ch; //to temporarily store the '.' s >> a >> ch >> b >> ch >> c >> ch >> d;

Re: mkdir; remove; under Windows throw Exception

2016-12-09 Thread unDEFER via Digitalmars-d-learn
On Saturday, 10 December 2016 at 03:36:11 UTC, Adam D. Ruppe wrote: On Saturday, 10 December 2016 at 03:29:18 UTC, unDEFER wrote: But it works under Linux That's just because the underlying C function handles the case. But the D function makes no promises about that: std.file.remove's

Re: mkdir; remove; under Windows throw Exception

2016-12-09 Thread unDEFER via Digitalmars-d-learn
On Saturday, 10 December 2016 at 01:30:52 UTC, Jonathan M Davis wrote: On Saturday, December 10, 2016 01:19:45 unDEFER via Digitalmars-d-learn wrote: Well, much as I'd love to rag on Windows for doing dumb and annoying stuff with file locks (which they do do), in this case, your code

Re: mkdir; remove; under Windows throw Exception

2016-12-09 Thread Adam D. Ruppe via Digitalmars-d-learn
On Saturday, 10 December 2016 at 03:29:18 UTC, unDEFER wrote: But it works under Linux That's just because the underlying C function handles the case. But the D function makes no promises about that: std.file.remove's documentation says "removes the file", leaving what it does to

Re: mkdir; remove; under Windows throw Exception

2016-12-09 Thread unDEFER via Digitalmars-d-learn
On Saturday, 10 December 2016 at 01:28:13 UTC, SonicFreak94 wrote: On Saturday, 10 December 2016 at 01:19:45 UTC, unDEFER wrote: remove("D:\\TEST"); Try rmdir instead. But it works under Linux

Re: The module 'foo' is already defined in 'libmylib.so'

2016-12-09 Thread timotheecour via Digitalmars-d-learn
On Saturday, 10 December 2016 at 02:39:33 UTC, timotheecour wrote: Have a look at what `trace -E d_executable args` and `trace -E c++_executable args` print on startup and grep for dlopen calls and the like. do you mean strace? I have trace on OSX but I'm asking for linux. Looking at the

Re: The module 'foo' is already defined in 'libmylib.so'

2016-12-09 Thread timotheecour via Digitalmars-d-learn
Have a look at what `trace -E d_executable args` and `trace -E c++_executable args` print on startup and grep for dlopen calls and the like. do you mean strace? I have trace on OSX but I'm asking for linux.

Re: staticIota is easy

2016-12-09 Thread Ali Çehreli via Digitalmars-d-learn
On 12/09/2016 05:34 PM, Stefan Koch wrote: On Friday, 9 December 2016 at 18:52:59 UTC, Ali Çehreli wrote: I thought I needed something like staticIota in a unittest to effect static foreach over a number range and I found one in druntime's implementation:

Re: staticIota is easy

2016-12-09 Thread Stefan Koch via Digitalmars-d-learn
On Friday, 9 December 2016 at 18:52:59 UTC, Ali Çehreli wrote: I thought I needed something like staticIota in a unittest to effect static foreach over a number range and I found one in druntime's implementation: https://github.com/dlang/druntime/blob/master/src/core/internal/traits.d#L106

Re: mkdir; remove; under Windows throw Exception

2016-12-09 Thread SonicFreak94 via Digitalmars-d-learn
On Saturday, 10 December 2016 at 01:19:45 UTC, unDEFER wrote: remove("D:\\TEST"); Try rmdir instead.

Re: Getters/setters generator

2016-12-09 Thread Stefan Koch via Digitalmars-d-announce
On Friday, 9 December 2016 at 10:27:05 UTC, Eugene Wissner wrote: Hello, we've just open sourced a small module ("accessors") that helps to generate getters and setters automatically: https://github.com/funkwerk/accessors http://code.dlang.org/packages/accessors It takes advantage of the

Re: The program exits unexpectedly

2016-12-09 Thread unDEFER via Digitalmars-d-learn
On Friday, 9 December 2016 at 21:20:12 UTC, Martin Krejcirik wrote: On Friday, 9 December 2016 at 16:50:05 UTC, unDEFER wrote: And in mini program it works and shows diagnostic message. Where my diagnostic message in more complicate program??? Try redirecting stdout and stderr to a file(s).

Re: The program exits unexpectedly

2016-12-09 Thread unDEFER via Digitalmars-d-learn
On Friday, 9 December 2016 at 20:35:07 UTC, Ali Çehreli wrote: Assuming boundschecking is turned off, I think you get unlucky in the mini program and happen to hit a '\0' byte. No, no.. the program built in debug mode with dub.

mkdir; remove; under Windows throw Exception

2016-12-09 Thread unDEFER via Digitalmars-d-learn
Hello! $ cat try.d import std.file; void main () { mkdir("D:\\TEST"); remove("D:\\TEST"); } $ ./try.exe std.file.FileException@std\file.d(731): D:\TEST: Access Denied. What I don't know about removing directories in Windows? Why I can't remove directory

Re: A new linker wlink32

2016-12-09 Thread rikki cattermole via Digitalmars-d
On 10/12/2016 12:00 PM, jest wrote: The wlink32 is a 32 bit linker for Windows. It is an effort of me, (Manos) and LADSoft (David Lindauer) to produce a modern linker. It is based on the original ALINK of Anthony A.J. Williams. But ALINK does not support MS-COFF import libraries and its support

Re: [OT] Interesting blog post on disadvantages of the pure functional paradigm

2016-12-09 Thread Timon Gehr via Digitalmars-d
On 10.12.2016 00:25, qznc wrote: On Friday, 9 December 2016 at 10:25:49 UTC, Kagamin wrote: On Friday, 9 December 2016 at 10:01:13 UTC, qznc wrote: http://beza1e1.tuxen.de/articles/functional.html What about python and javascript? Python and Javascript are mixed paradigm languages. You

Re: How about a bounty for a new windows installer using inno setup ?

2016-12-09 Thread Jesse Phillips via Digitalmars-d
On Friday, 9 December 2016 at 17:05:24 UTC, Kagamin wrote: On Friday, 9 December 2016 at 16:47:18 UTC, Jesse Phillips wrote: An MSI can't execute an arbitrary executable, just an arbitrary DLL which could run an arbitrary executable :)

Re: [OT] Interesting blog post on disadvantages of the pure functional paradigm

2016-12-09 Thread qznc via Digitalmars-d
On Friday, 9 December 2016 at 10:25:49 UTC, Kagamin wrote: On Friday, 9 December 2016 at 10:01:13 UTC, qznc wrote: http://beza1e1.tuxen.de/articles/functional.html What about python and javascript? Python and Javascript are mixed paradigm languages. You could argue if purity and

Re: Installing ldc breaks gdc

2016-12-09 Thread Daniel Kozak via Digitalmars-d
Ok, thats your opinion :P Dne 9.12.2016 v 23:04 Iain Buclaw via Digitalmars-d napsal(a): On 9 December 2016 at 18:34, Daniel Kozak via Digitalmars-d wrote: Dne 9.12.2016 v 16:59 Eduard Staniloiu via Digitalmars-d napsal(a): Hello, everyone. ... Based on my

A new linker wlink32

2016-12-09 Thread jest via Digitalmars-d
The wlink32 is a 32 bit linker for Windows. It is an effort of me, (Manos) and LADSoft (David Lindauer) to produce a modern linker. It is based on the original ALINK of Anthony A.J. Williams. But ALINK does not support MS-COFF import libraries and its support for making DLLs was limited and had

Re: CTFE Status

2016-12-09 Thread Stefan Koch via Digitalmars-d
On Friday, 9 December 2016 at 03:06:49 UTC, Stefan Koch wrote: On Friday, 9 December 2016 at 02:10:58 UTC, Andrei Alexandrescu wrote: That's pretty awesome. The new CTFE engine release will soon rival Tesla Model 3 in terms of interest raised :o). In addition to artificial corpora like the

[Issue 16960] New: implicit function return breaks chaining of exceptions thrown in scope(exit)

2016-12-09 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16960 Issue ID: 16960 Summary: implicit function return breaks chaining of exceptions thrown in scope(exit) Product: D Version: D2 Hardware: x86_64 OS: Linux

Re: Installing ldc breaks gdc

2016-12-09 Thread Iain Buclaw via Digitalmars-d
On 9 December 2016 at 18:34, Daniel Kozak via Digitalmars-d wrote: > > > Dne 9.12.2016 v 16:59 Eduard Staniloiu via Digitalmars-d napsal(a): >> >> Hello, everyone. >> >> ... >> >> Based on my previous assumtion (both dmd and gdc use /usr/include/dmd/) >> and the error

Re: Installing ldc breaks gdc

2016-12-09 Thread Iain Buclaw via Digitalmars-d
On 9 December 2016 at 18:53, Matthias Klumpp via Digitalmars-d wrote: > Hi! > > This issue should be fixed since LDC 1:1.1.0-2, which Xenial doesn't have. > Ideally, fetch a newer version from Debian or a PPA to solve this issue. > > Cheers, > Matthias > Thanks

Re: The program exits unexpectedly

2016-12-09 Thread Martin Krejcirik via Digitalmars-d-learn
On Friday, 9 December 2016 at 16:50:05 UTC, unDEFER wrote: And in mini program it works and shows diagnostic message. Where my diagnostic message in more complicate program??? Try redirecting stdout and stderr to a file(s). There are cases when the console itself can crash.

Re: The program exits unexpectedly

2016-12-09 Thread Ali Çehreli via Digitalmars-d-learn
On 12/09/2016 08:50 AM, unDEFER wrote: > On Friday, 9 December 2016 at 14:29:38 UTC, unDEFER wrote: >> I'm afraid that the problem that my program wants to say something, >> but there is no "flush" so message leaves in the buffer. > > I have found, it was code like: > > string path = "C:"; >

[OT] An interesting paper on advanced introspection

2016-12-09 Thread Andrei Alexandrescu via Digitalmars-d
https://eb.host.cs.st-andrews.ac.uk/drafts/elab-reflection.pdf Shows some of the more advanced/esoteric stuff that can be done with introspection. -- Andrei

Re: Getters/setters generator

2016-12-09 Thread Andrei Alexandrescu via Digitalmars-d-announce
On 12/9/16 5:27 AM, Eugene Wissner wrote: Hello, we've just open sourced a small module ("accessors") that helps to generate getters and setters automatically: https://github.com/funkwerk/accessors http://code.dlang.org/packages/accessors It takes advantage of the UDAs and mixins. A simple

staticIota is easy

2016-12-09 Thread Ali Çehreli via Digitalmars-d-learn
I thought I needed something like staticIota in a unittest to effect static foreach over a number range and I found one in druntime's implementation: https://github.com/dlang/druntime/blob/master/src/core/internal/traits.d#L106 (I wonder why that one is implemented in divide-and-conquer

Re: Installing ldc breaks gdc

2016-12-09 Thread Matthias Klumpp via Digitalmars-d
Hi! This issue should be fixed since LDC 1:1.1.0-2, which Xenial doesn't have. Ideally, fetch a newer version from Debian or a PPA to solve this issue. Cheers, Matthias

Re: Installing ldc breaks gdc

2016-12-09 Thread Johannes Pfau via Digitalmars-d
Am Fri, 09 Dec 2016 15:59:07 + schrieb Eduard Staniloiu : > Hello, everyone. > > So I have found that installing ldc will break gdc. > > The setup: > > I have a VM running a 64bit Ubuntu 16.04, as you can see from the > output of uname -a: > >Linux ubuntu-xenial

Re: Installing ldc breaks gdc

2016-12-09 Thread Daniel Kozak via Digitalmars-d
Dne 9.12.2016 v 16:59 Eduard Staniloiu via Digitalmars-d napsal(a): Hello, everyone. ... Based on my previous assumtion (both dmd and gdc use /usr/include/dmd/) and the error above, I am inclined to believe that after installing ldc, gdc is using /usr/include/d/ and it breaks. Maybe we

Re: How about a bounty for a new windows installer using inno setup ?

2016-12-09 Thread Kagamin via Digitalmars-d
On Friday, 9 December 2016 at 16:47:18 UTC, Jesse Phillips wrote: An MSI can't execute an arbitrary executable, just an arbitrary DLL which could run an arbitrary executable :) https://msdn.microsoft.com/en-us/library/windows/desktop/aa368563%28v=vs.85%29.aspx this?

Re: The program exits unexpectedly

2016-12-09 Thread unDEFER via Digitalmars-d-learn
On Friday, 9 December 2016 at 14:29:38 UTC, unDEFER wrote: I'm afraid that the problem that my program wants to say something, but there is no "flush" so message leaves in the buffer. I have found, it was code like: string path = "C:"; string parent = path[0..path.lastIndexOf("\\")]; And in

Re: How about a bounty for a new windows installer using inno setup ?

2016-12-09 Thread Jesse Phillips via Digitalmars-d
On Friday, 9 December 2016 at 10:35:00 UTC, Kagamin wrote: On Thursday, 8 December 2016 at 20:04:01 UTC, Jesse Phillips wrote: These sequences can call "Custom Actions" which are just table entries that point to a DLL (there is more to Custom Actions). Why not just unpack the stuff and run a

[Issue 16699] [REG 2.070] stack corruption with scope(exit)

2016-12-09 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16699 --- Comment #31 from anonymous4 --- The obvious solution is to create a different merge PR that will just merge and nothing more. --

Re: Getters/setters generator

2016-12-09 Thread Eugene Wissner via Digitalmars-d-announce
On Friday, 9 December 2016 at 12:37:58 UTC, Iakh wrote: Is there possibility to remove affixes in generated accessor names? No, there is no way to manipulate the accessor names. What affixes do you mean?

Installing ldc breaks gdc

2016-12-09 Thread Eduard Staniloiu via Digitalmars-d
Hello, everyone. So I have found that installing ldc will break gdc. The setup: I have a VM running a 64bit Ubuntu 16.04, as you can see from the output of uname -a: Linux ubuntu-xenial 4.4.0-51-generic #72-Ubuntu SMP Thu Nov 24 18:29:54 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux I have

[Issue 4125] std.numeric.gcd can use a binary GCD

2016-12-09 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=4125 Alexandru Razvan Caciulescu changed: What|Removed |Added CC|

[Issue 15421] The behaviours of the topNs differ with the bottom

2016-12-09 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15421 Andrei Alexandrescu changed: What|Removed |Added Status|NEW |RESOLVED

[Issue 15401] partialSort should accept two ranges

2016-12-09 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15401 Issue 15401 depends on issue 15421, which changed state. Issue 15421 Summary: The behaviours of the topNs differ with the bottom https://issues.dlang.org/show_bug.cgi?id=15421 What|Removed |Added

Re: Range of uncopyable elements

2016-12-09 Thread Jerry via Digitalmars-d-learn
On Thursday, 8 December 2016 at 23:08:35 UTC, Jonathan M Davis wrote: I've seen that in C++ code all the time, especially if you're dealing with smart pointers, because otherwise you have to do stuff like (*iter)->foo() instead of just var->foo(). Smart pointers weren't introduced until

Re: CTFE Status

2016-12-09 Thread Faux Amis via Digitalmars-d
On 2016-12-09 00:00, Stefan Koch wrote: On Thursday, 8 December 2016 at 19:49:47 UTC, Faux Amis wrote: Any reason for the infinite depth update posting style? I would have loved to see each update to be a child of the root post with its own discussions tree. Currently, the posts are quite

Re: The program exits unexpectedly

2016-12-09 Thread unDEFER via Digitalmars-d-learn
I'm afraid that the problem that my program wants to say something, but there is no "flush" so message leaves in the buffer.

Re: Getters/setters generator

2016-12-09 Thread Iakh via Digitalmars-d-announce
mixin template GenerateFieldAccessorMethods() { static enum GenerateFieldAccessorMethods() { string result = ""; return result; } } Strange syntax

Re: Getters/setters generator

2016-12-09 Thread Iakh via Digitalmars-d-announce
On Friday, 9 December 2016 at 10:27:05 UTC, Eugene Wissner wrote: Hello, we've just open sourced a small module ("accessors") that helps to generate getters and setters automatically: https://github.com/funkwerk/accessors http://code.dlang.org/packages/accessors It takes advantage of the

[Issue 6133] Improvements to RedBlackTree

2016-12-09 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=6133 --- Comment #2 from Carlos Ballesteros Velasco --- @Infiltrator Probably it changed to not be compatible. But you can find the original collection in the git history here, if you want to try to merge or PR it:

Re: @property

2016-12-09 Thread ArturG via Digitalmars-d-learn
My issue isn't about @property, it just shows 3 cases where i think that dmd is missing a check for alias this. Even if D didnt had @property or parentesis less function call, due to alias opCall this it should be possible to call opCall without parentesis.

Re: [OT] Interesting blog post on disadvantages of the pure functional paradigm

2016-12-09 Thread Kagamin via Digitalmars-d
On Friday, 9 December 2016 at 10:01:13 UTC, qznc wrote: http://beza1e1.tuxen.de/articles/functional.html What about python and javascript?

Getters/setters generator

2016-12-09 Thread Eugene Wissner via Digitalmars-d-announce
Hello, we've just open sourced a small module ("accessors") that helps to generate getters and setters automatically: https://github.com/funkwerk/accessors http://code.dlang.org/packages/accessors It takes advantage of the UDAs and mixins. A simple example would be: import accessors;

Re: How about a bounty for a new windows installer using inno setup ?

2016-12-09 Thread Kagamin via Digitalmars-d
On Thursday, 8 December 2016 at 20:04:01 UTC, Jesse Phillips wrote: These sequences can call "Custom Actions" which are just table entries that point to a DLL (there is more to Custom Actions). Why not just unpack the stuff and run a configuration program? The latter would be useful anyway.

Re: The program exits unexpectedly

2016-12-09 Thread unDEFER via Digitalmars-d-learn
On Friday, 9 December 2016 at 10:08:24 UTC, unDEFER wrote: On Friday, 9 December 2016 at 09:42:52 UTC, unDEFER wrote: Exceptions works good, and prints debug message always. It is not exception.. I have tried to add try/catch around full loop of the program. It doesn't work. And program has

Re: [OT] Interesting blog post on disadvantages of the pure functional paradigm

2016-12-09 Thread Kagamin via Digitalmars-d
On Friday, 9 December 2016 at 10:01:13 UTC, qznc wrote: What is your definition of Functional Programming? Mine: http://beza1e1.tuxen.de/articles/functional.html I think, it's more about being declarative.

Re: @property

2016-12-09 Thread Satoshi via Digitalmars-d-learn
On Thursday, 8 December 2016 at 22:09:14 UTC, Jonathan M Davis wrote: On Thursday, December 08, 2016 16:54:57 Adam D. Ruppe via Digitalmars-d- learn wrote: [...] Yeah, it's pretty common for folks to slap @property on functions to make it clear that it's intended to be used as a property

Re: The program exits unexpectedly

2016-12-09 Thread unDEFER via Digitalmars-d-learn
On Friday, 9 December 2016 at 09:42:52 UTC, unDEFER wrote: Exceptions works good, and prints debug message always. It is not exception.. I have tried to add try/catch around full loop of the program. It doesn't work. And program has infinite loop. But maybe it is unhandled signal? I have

Re: [OT] Interesting blog post on disadvantages of the pure functional paradigm

2016-12-09 Thread qznc via Digitalmars-d
On Friday, 9 December 2016 at 09:58:27 UTC, Kagamin wrote: Functional doesn't imply purity and immutability I disagree. What is your definition of Functional Programming? Mine: http://beza1e1.tuxen.de/articles/functional.html

Re: [OT] Interesting blog post on disadvantages of the pure functional paradigm

2016-12-09 Thread Kagamin via Digitalmars-d
Functional doesn't imply purity and immutability, and mutable functional has cognitive problems: mutation is important, but functional code is too high level, so whatever happens is hidden from the programmer; D suffers from this too as people are confused whether ranges are taken by value or

Re: The program exits unexpectedly

2016-12-09 Thread unDEFER via Digitalmars-d-learn
On Friday, 9 December 2016 at 09:29:36 UTC, rikki cattermole wrote: On 09/12/2016 10:26 PM, unDEFER wrote: An exception/error might be thrown, try catching Error's in the threads function. Also try adding an infinite loop to it. Exceptions works good, and prints debug message always. It is

Re: The program exits unexpectedly

2016-12-09 Thread rikki cattermole via Digitalmars-d-learn
On 09/12/2016 10:26 PM, unDEFER wrote: Hello! I'm starting port my program to Windows _without_ Cygwin and found big trouble. My main thread exits unexpectedly without any diagnostic messages. The second thread still lives when it happens. The visual studio debugger say that thread exits with

The program exits unexpectedly

2016-12-09 Thread unDEFER via Digitalmars-d-learn
Hello! I'm starting port my program to Windows _without_ Cygwin and found big trouble. My main thread exits unexpectedly without any diagnostic messages. The second thread still lives when it happens. The visual studio debugger say that thread exits with code 2. What it maybe?