Re: Problem with BP's

2017-08-20 Thread Rainer Schuetze via Digitalmars-d-debugger
On 20.08.2017 20:26, Johnson Jones wrote: On Friday, 18 August 2017 at 06:43:37 UTC, Rainer Schuetze wrote: On 18.08.2017 00:41, Johnson Jones wrote: I was doing something strange ;/ I had code like mixin(import("Myfile.d")); CallSomeFunctionInMyFile(); And no BP's could be hit in side

Re: dmd download record

2017-08-20 Thread Joakim via Digitalmars-d
On Monday, 21 August 2017 at 04:39:11 UTC, TooHuman wrote: On Friday, 18 August 2017 at 12:59:07 UTC, Joakim wrote: Downloads from dlang.org, which doesn't include outside distro packages like Arch or FreeBSD, have now jumped an order of magnitude over the last five years:

Re: dmd download record

2017-08-20 Thread TooHuman via Digitalmars-d
On Friday, 18 August 2017 at 12:59:07 UTC, Joakim wrote: Downloads from dlang.org, which doesn't include outside distro packages like Arch or FreeBSD, have now jumped an order of magnitude over the last five years: http://erdani.com/d/downloads.daily.png Congrats to all those who kept their

function cannot access frame

2017-08-20 Thread Johnson Jones via Digitalmars-d-learn
cannot access frame of function I declared a helper function outside a lambda that is passed to C. The semantics are the same inside of the function as they are outside as far as code goes. How can I declare a function that essentially works inside the lambda also without having to do any

Re: cv2pdb: cannot add symbols to module, probably msobj140.dll missing

2017-08-20 Thread Johnson via Digitalmars-d-debugger
On Monday, 21 August 2017 at 03:18:38 UTC, Johnson wrote: All of a sudden I'm getting this error. All I did was comment out a huge block of code so I could check something. The code compiles but the pdb conversion gives me that error ;/ Uncommenting out the code allows it to work again. I

cv2pdb: cannot add symbols to module, probably msobj140.dll missing

2017-08-20 Thread Johnson via Digitalmars-d-debugger
All of a sudden I'm getting this error. All I did was comment out a huge block of code so I could check something. The code compiles but the pdb conversion gives me that error ;/ Uncommenting out the code allows it to work again. I can't see why the code I'm commenting out would give that

Re: DerelictGL3 reload crashes in 32 builds

2017-08-20 Thread Mike Parker via Digitalmars-d-learn
On Sunday, 20 August 2017 at 19:29:55 UTC, Igor wrote: In 64 bit builds it works with both LDC and DMD but in 32 bit LDC version crashes and DMD release version crashes. Using LDC debug build I managed to find that it crashes after executing ret instruction from bindGLFunc in glloader. If

Re: std.range.put vs R.put: Best practices?

2017-08-20 Thread Mike Parker via Digitalmars-d-learn
On Sunday, 20 August 2017 at 18:08:27 UTC, Jon Degenhardt wrote: Documentation for std.range.put (https://dlang.org/phobos/std_range_primitives.html#.put) has the intriguing line: put should not be used "UFCS-style", e.g. r.put(e). Doing this may call R.put directly, by-passing any

Re: Does anyone understand how to use "shared" types with concurrency send/receive functions?

2017-08-20 Thread crimaniak via Digitalmars-d-learn
On Monday, 21 August 2017 at 02:17:57 UTC, crimaniak wrote: ... shared A a; ... Sorry, accidental delete, read this as shared A a = new shared(A);

Re: Does anyone understand how to use "shared" types with concurrency send/receive functions?

2017-08-20 Thread crimaniak via Digitalmars-d-learn
On Monday, 14 August 2017 at 03:59:48 UTC, Jonathan M Davis wrote: And no, this isn't ideal, but the only semi-decent solution that's been proposed that safely casts away shared for you is synchronized classes, which Andrei describes in TDPL but have never been implemented. After reading

std.format expand "%s"

2017-08-20 Thread jmh530 via Digitalmars-d-learn
I'm playing around with std.format and I'm trying to figure out if there is any way to identify what "%s" should expand to. So for instance: int x = 1; auto result = x.format!"%s"; I would know that result="1". I could run "1" through unformatValue and get back 1. I'm looking to see if there

Re: Does anyone understand how to use "shared" types with concurrency send/receive functions?

2017-08-20 Thread crimaniak via Digitalmars-d-learn
On Thursday, 17 August 2017 at 13:09:29 UTC, Kagamin wrote: On Wednesday, 16 August 2017 at 23:15:10 UTC, crimaniak wrote: I wonder if it possible and usable to make some template to support this pattern, where we give mutex(es), shared object(s) and delegate to operate with objects as

GtkD: New widget

2017-08-20 Thread Johnson Jones via Digitalmars-d-learn
Hey Mike, I bet you can answer this! I'd like to extend a widget to add some functionality. class MyBox : Box { protected GtkBox* gtkBox; import std.typecons; _gtk.Box Wrapped; mixin Proxy!Wrapped; public this(Box b) {

Re: @safe(bool)

2017-08-20 Thread Danni Coy via Digitalmars-d
> For instance, as it stands, it's relatively easy to figure out whether > @safe > has been explicitly applied. You can look on the function and look for > @safe: or @safe {} which affects it. The same goes for other attributes. > But > as soon as you can do stuff like create new attributes that

Re: GtkD: Build script

2017-08-20 Thread Johnson Jones via Digitalmars-d-learn
On Sunday, 20 August 2017 at 20:13:17 UTC, Mike Wey wrote: On 20-08-17 20:41, Johnson Jones wrote: I guess I see why now you did what you did! ;) .LIB pagesize exceeds 512 https://issues.dlang.org/show_bug.cgi?id=15418 Wanna take bets on how many *years* this takes to get fixed?!? That one

Re: Mixed up over mixins.

2017-08-20 Thread Johnson Jones via Digitalmars-d-learn
On Sunday, 20 August 2017 at 19:27:43 UTC, WhatMeWorry wrote: It's stuff like this which makes me very frustrated. Or depressed because it demonstrates just how poor a programmer I am: string printStatement(string message) { return `writeln("` ~ message ~ `");`; } void main() { //

[Issue 17767] Dmd can't link recast.d, Gdc can't compile it and Ldc can perfectly compile it.

2017-08-20 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17767 --- Comment #2 from ecstatic.coder --- Indeed... I've downloaded the version on gdcproject.org, but same result... $ ./gdc --version gdc (gdcproject.org 20161225-v2.068.2_gcc6) 6.3.0 Copyright (C) 2016 Free Software

Re: Fix D's segfaults!

2017-08-20 Thread user1234 via Digitalmars-d
On Sunday, 20 August 2017 at 20:20:30 UTC, Jonathan M Davis wrote: On Sunday, August 20, 2017 12:35:45 Ali Çehreli via Digitalmars-d wrote: On 08/20/2017 12:14 PM, Johnson Jones wrote: >>> Dmd needs to be modified so that errors try to show from the source >>> code. This should be obvious

Trial v0.3.1 is out

2017-08-20 Thread Szabo Bogdan via Digitalmars-d-announce
Hi, I added some new improvements to `trial` http://trial.szabobogdan.com/ which is a hackable test runner for D. This release contains: - Support for `trial` configuration, that allows you to use custom dependencies for the test build - Improved command line interface - Spec test

Re: Fix D's segfaults!

2017-08-20 Thread Jonathan M Davis via Digitalmars-d
On Sunday, August 20, 2017 12:35:45 Ali Çehreli via Digitalmars-d wrote: > On 08/20/2017 12:14 PM, Johnson Jones wrote: > >>> Dmd needs to be modified so that errors try to show from the source > >>> code. This should be obvious the reasons, if it is not possible, make > >>> it possible! There

Re: GtkD: Build script

2017-08-20 Thread Mike Wey via Digitalmars-d-learn
On 20-08-17 20:41, Johnson Jones wrote: I guess I see why now you did what you did! ;) .LIB pagesize exceeds 512 https://issues.dlang.org/show_bug.cgi?id=15418 Wanna take bets on how many *years* this takes to get fixed?!? That one happens when GtkD is build with debug symbols. The main

Re: Mixed up over mixins.

2017-08-20 Thread Ali Çehreli via Digitalmars-d-learn
On 08/20/2017 12:27 PM, WhatMeWorry wrote: > // Mixins are for mixing in generated code into the source code. > // The mixed in code may be generated as a template instance > // or a string. Yes, it means that the string must be legal D code. > mixin(`writeln(` ~ `Hello` ~

[Issue 17767] Dmd can't link recast.d, Gdc can't compile it and Ldc can perfectly compile it.

2017-08-20 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17767 Iain Buclaw changed: What|Removed |Added CC||ibuc...@gdcproject.org

Re: Fix D's segfaults!

2017-08-20 Thread Ali Çehreli via Digitalmars-d
On 08/20/2017 12:14 PM, Johnson Jones wrote: >>> Dmd needs to be modified so that errors try to show from the source >>> code. This should be obvious the reasons, if it is not possible, make >>> it possible! There are no excuses why dmd should make me go on an >>> easter egg hunt when a seg

Re: Fix D's segfaults!

2017-08-20 Thread Bastiaan Veelo via Digitalmars-d
On Sunday, 20 August 2017 at 19:14:10 UTC, Johnson Jones wrote: Dne 20. 8. 2017 8:06 odpoledne napsal uživatel "Johnson Jones via Digitalmars-d" : D has a major issue with segfaults! It always reports the fault in the lowest function that it occurs! This is

Mixed up over mixins.

2017-08-20 Thread WhatMeWorry via Digitalmars-d-learn
It's stuff like this which makes me very frustrated. Or depressed because it demonstrates just how poor a programmer I am: string printStatement(string message) { return `writeln("` ~ message ~ `");`; } void main() { // Mixins are for mixing in generated code into the source code.

DerelictGL3 reload crashes in 32 builds

2017-08-20 Thread Igor via Digitalmars-d-learn
In 64 bit builds it works with both LDC and DMD but in 32 bit LDC version crashes and DMD release version crashes. Using LDC debug build I managed to find that it crashes after executing ret instruction from bindGLFunc in glloader. If someone wants to try it you can do it with this project:

Re: Fix D's segfaults!

2017-08-20 Thread Johnson Jones via Digitalmars-d
On Sunday, 20 August 2017 at 18:35:07 UTC, Daniel Kozak wrote: This is not segfault. This is an uncatched exception. So it is your error. You does not do proper error handling. But still IIRC you should be able to see place where things go wrong Dne 20. 8. 2017 8:06 odpoledne napsal

Re: GtkD: Build script

2017-08-20 Thread Johnson Jones via Digitalmars-d-learn
I guess I see why now you did what you did! ;) .LIB pagesize exceeds 512 https://issues.dlang.org/show_bug.cgi?id=15418 Wanna take bets on how many *years* this takes to get fixed?!?

Re: Debugging Visual D using Visual D

2017-08-20 Thread Johnson Jones via Digitalmars-d-debugger
I should state though, that I could be wrong(and haven't tested it out yet). It's possible that some of the caching "features" screwed up what I think is going on. But the typical thing that got stuff to work was deleting the visual D entries in the registry(of course, it broke mago also).

Re: Fix D's segfaults!

2017-08-20 Thread Daniel Kozak via Digitalmars-d
This is not segfault. This is an uncatched exception. So it is your error. You does not do proper error handling. But still IIRC you should be able to see place where things go wrong Dne 20. 8. 2017 8:06 odpoledne napsal uživatel "Johnson Jones via Digitalmars-d" :

Re: Debugging Visual D using Visual D

2017-08-20 Thread Johnson Jones via Digitalmars-d-debugger
On Friday, 18 August 2017 at 06:37:44 UTC, Rainer Schuetze wrote: Glad you figured it out. I had to enable Visual D in the extension manager when using the local pkgdef. Visual D installs for all users, so I think just installing into the users AppData is not an option. VS 2017 doesn't

GtkD: Build script

2017-08-20 Thread Johnson Jones via Digitalmars-d-learn
I've modified the build script: changed 2 things: 1. Builds for all archs. 2. Replaced the specialized x86 build with the generic used for 64-bit. You were building for each individual directory for some reason, I guess for more granularity, but it produced a different result than the 64

std.range.put vs R.put: Best practices?

2017-08-20 Thread Jon Degenhardt via Digitalmars-d-learn
Documentation for std.range.put (https://dlang.org/phobos/std_range_primitives.html#.put) has the intriguing line: put should not be used "UFCS-style", e.g. r.put(e). Doing this may call R.put directly, by-passing any transformation feature provided by Range.put. put(r, e) is prefered.

[Issue 17769] New: dmd accepts conversion from shared(int)* to int* when value comes from method

2017-08-20 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17769 Issue ID: 17769 Summary: dmd accepts conversion from shared(int)* to int* when value comes from method Product: D Version: D2 Hardware: x86_64 OS: Linux

Fix D's segfaults!

2017-08-20 Thread Johnson Jones via Digitalmars-d
D has a major issue with segfaults! It always reports the fault in the lowest function that it occurs! This is completely useless! std.file.FileException@std\file.d(755): Attempting to rename file X.lib to Y.lib: The system cannot find the file specified. 0x0041015E

Re: Estimating free system resource at runtime

2017-08-20 Thread Anonymouse via Digitalmars-d-learn
On Sunday, 20 August 2017 at 15:49:09 UTC, seany wrote: However, i cant find anything on google to tell me how to estimate system resource using D. for C++ and windowes, i could find some API-s Can e do this in D? You can just use those C APIs. I believe the GC does, unless I'm reading it

Re: @safe(bool)

2017-08-20 Thread bitwise via Digitalmars-d
On Sunday, 20 August 2017 at 01:33:00 UTC, Nicholas Wilson wrote: I'm not quite sure how this would lead to a loss of modularity? Not sure if modularity is exactly the right word. The problem would be akin to extension methods in C#, or even a useful set of UFC's in D. So, imagine you

Aedi property reader, a library for reading configuration properties from multiple sources

2017-08-20 Thread Alexandru Ermicioi via Digitalmars-d-announce
Good day! Announcing first release of aedi property reader. Aedi property reader is a config reader, with ability to read from xml, json, environment, and command line. It allows to define a set of default parameters, and extend or override them from environment, command line or any other

[Issue 17768] Compile time reflection is missing for module/namespace(c++)/mixin names

2017-08-20 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17768 Илья Ярошенко changed: What|Removed |Added Keywords||C++ --

Estimating free system resource at runtime

2017-08-20 Thread seany via Digitalmars-d-learn
Hi I have a system that has to deal with 30+GB files. They can't be loaded to the amount of memory I have. So my idea was to create a way to estimate available system RAM, and read a chunk from file which is 1/10 of size of available RAM, and process it as far as i can. If the read chunk is

[Issue 17768] New: Compile time reflection is missing for module/namespace(c++)/mixin names

2017-08-20 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17768 Issue ID: 17768 Summary: Compile time reflection is missing for module/namespace(c++)/mixin names Product: D Version: D2 Hardware: All OS: All

[Issue 17766] Wrong choice of generic mutable/const/immutable methods

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

[Issue 17767] Dmd can't link recast.d, Gdc can't compile it and Ldc can perfectly compile it.

2017-08-20 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17767 ecstatic.coder changed: What|Removed |Added Summary|Dmd and Gdc report an |Dmd can't link

[Issue 17767] New: Dmd and Gdc report an internal error in the compiler when compiling recast.d, but Ldc can perfectly compile it.

2017-08-20 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17767 Issue ID: 17767 Summary: Dmd and Gdc report an internal error in the compiler when compiling recast.d, but Ldc can perfectly compile it. Product: D Version: D2

Re: Using mixin templates for operator overloading.

2017-08-20 Thread Balagopal Komarath via Digitalmars-d-learn
On Sunday, 20 August 2017 at 12:46:59 UTC, Nicholas Wilson wrote: Did you try changing the `: "+"` constraints to `if` constraints? Yes. Yields the same result as this.

[Issue 17762] Cannot compile with clean DMD.

2017-08-20 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17762 --- Comment #5 from Vincent --- (In reply to Rainer Schuetze from comment #4) > BTW: I don't think there is an infected Visual D installer anywhere It was long time ago, maybe 2-3 years. But it doesn't eliminate the fact of

Re: Some news from Dplug

2017-08-20 Thread Mike Parker via Digitalmars-d-announce
On Sunday, 20 August 2017 at 12:55:00 UTC, Guillaume Piolat wrote: On Saturday, 19 August 2017 at 07:20:06 UTC, Joakim wrote: Thanks, I also liked his post about D, especially the title: http://www.modernmetalproduction.com/d-elegant-language-civilized-age/ Mike, want to post the Dplug for

Re: Some news from Dplug

2017-08-20 Thread Guillaume Piolat via Digitalmars-d-announce
On Saturday, 19 August 2017 at 07:20:06 UTC, Joakim wrote: Thanks, I also liked his post about D, especially the title: http://www.modernmetalproduction.com/d-elegant-language-civilized-age/ Mike, want to post the Dplug for Linux post to proggit/HN after the weekend? I've put it in HN

Re: Using mixin templates for operator overloading.

2017-08-20 Thread Nicholas Wilson via Digitalmars-d-learn
On Saturday, 19 August 2017 at 10:16:18 UTC, Balagopal Komarath wrote: Let us say I want to automatically define subtraction given that addition and negation are defined. I tried the following using mixin templates. If I simply mixin the template using "mixin sub;", then it gives the error

Re: Using mixin templates for operator overloading.

2017-08-20 Thread Balagopal Komarath via Digitalmars-d-learn
On Saturday, 19 August 2017 at 10:16:18 UTC, Balagopal Komarath wrote: Let us say I want to automatically define subtraction given that addition and negation are defined. I tried the following using mixin templates... I assume there is no way to do this?

Re: dlang-requetst: openssl 1.1 compatible release

2017-08-20 Thread ikod via Digitalmars-d-announce
On Saturday, 5 August 2017 at 09:46:44 UTC, Jack Applegame wrote: On Friday, 4 August 2017 at 18:28:23 UTC, ikod wrote: On Friday, 4 August 2017 at 17:06:16 UTC, Jack Applegame wrote: Does dlang-requests support binding interface for outgoing connection, like curl --interface option? No, but

[Issue 17761] dmd 2.075.1 creates object files that can't be linked by ld.bfd

2017-08-20 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17761 Ketmar Dark changed: What|Removed |Added CC|

Re: Quora

2017-08-20 Thread Rico Decho via Digitalmars-d
Two more answers : https://www.quora.com/How-do-I-get-started-with-programming-What-kind-of-laptop-do-I-need-What-is-the-best-programming-language-for-beginners https://www.quora.com/Which-should-I-learn-as-my-first-programming-language-C-or-C++ Feel free to vote for my answers if you agree

Re: Quora

2017-08-20 Thread Patrick Schluter via Digitalmars-d
On Sunday, 20 August 2017 at 08:45:24 UTC, Rico Decho wrote: So, editing and answering old questions is encouraged on stackoverflow and imho it is a good thing, nothing is more annoying than googling for a question and only finding answers in old mailing lists that apply only to a

Re: Quora

2017-08-20 Thread Rico Decho via Digitalmars-d
So, editing and answering old questions is encouraged on stackoverflow and imho it is a good thing, nothing is more annoying than googling for a question and only finding answers in old mailing lists that apply only to a compiler/system/language from the '90s. I absolutely agree. We should

Re: Quora

2017-08-20 Thread Patrick Schluter via Digitalmars-d
On Sunday, 20 August 2017 at 02:44:13 UTC, Jonathan M Davis wrote: On Saturday, August 19, 2017 15:17:52 Ecstatic Coder via Digitalmars-d wrote: > Its called necro-posting. > I'm surprised that post isn't read-only. Call it like you want, but I ee people putting new answers/comments to years

Re: real simple delegate question.

2017-08-20 Thread angel via Digitalmars-d-learn
On Saturday, 19 August 2017 at 18:33:37 UTC, WhatMeWorry wrote: On Friday, 18 August 2017 at 20:39:38 UTC, angel wrote: On Friday, 18 August 2017 at 02:38:15 UTC, WhatMeForget wrote: [...] This actually appears correct ... The 1-st example: Each call to makeCalculator() increments a static