Re: RSA library

2016-08-18 Thread Andre via Digitalmars-d-learn
On Thursday, 18 August 2016 at 14:29:54 UTC, Adam D. Ruppe wrote: On Thursday, 18 August 2016 at 09:00:58 UTC, Andre Pany wrote: Is there a D library which can be built with a plain x86 DMD and without dll dependencies? Not that I know of, and I don't think the win32 api includes rsa256

Re: string mixin and alias

2016-07-29 Thread Andre via Digitalmars-d-learn
On Friday, 29 July 2016 at 18:39:23 UTC, Jesse Phillips wrote: On Friday, 29 July 2016 at 18:34:56 UTC, Jesse Phillips wrote: Here the generateCode() is mixed in to the context of foo(), which is fine if your code is performing actions but is no good if you're creating declarations that you

Re: JSONValue floating and 42

2016-04-19 Thread Andre via Digitalmars-d-learn
On Tuesday, 19 April 2016 at 13:58:05 UTC, Edwin van Leeuwen wrote: On Tuesday, 19 April 2016 at 13:44:08 UTC, Andre wrote: -> I need to analyze every value whether it is a floating or an integer? This is the correct option. Something like: double f; if (j["value"].type == JSON_TYPE.INTEGER)

JSONValue floating and 42

2016-04-19 Thread Andre via Digitalmars-d-learn
Hi, I have to deal with a JSON like this [{"value":42},{"value":1e+100}] Value is a floating number, but the providing system does not write 42 as 42.00. While trying to get the value with .floating, I get an exception because 42 is not a floating value. I try to understand what is the

Where to buy the official DLang shirt?

2016-04-15 Thread Andre via Digitalmars-d
Hi, Is there an official DLang shirt, i can buy? I work in a software company and would like to make some advertisement for D. The profit for marketing articles like the shirt e.g. could be used for the DLang foundation. This would be a nice way to donate some money. Kind regards Andre

Re: Some strange behaviors of enums and string.startsWith

2016-04-08 Thread Andre via Digitalmars-d-learn
On Friday, 8 April 2016 at 14:56:51 UTC, Adam D. Ruppe wrote: On Friday, 8 April 2016 at 14:38:10 UTC, Andre wrote: Therefore I use std.conv.text to convert the string enum? to string. That converts the *name* of the enum to string, not the contents. (BTW, I think the name of the enum is

Some strange behaviors of enums and string.startsWith

2016-04-08 Thread Andre via Digitalmars-d-learn
Hi, I have some issues with enums. Please have a look at the last 3 assertions. It is annoying that I cannot directly use my StringEnum for startsWith. Therefore I use std.conv.text to convert the string enum? to string. But then the assertion fails, that is very strange, it fails only for

Re: Issue with 2.071: Regression or valid error?

2016-04-06 Thread Andre via Digitalmars-d-learn
On Wednesday, 6 April 2016 at 19:22:44 UTC, Daniel Kozak wrote: This should not compile. Cat cant access create because it is private. Ok it can access it but only if you move cat into same module as animal Dne 6. 4. 2016 17:16 napsal uživatel "Andre via Digitalmars-d-learn" <

Issue with 2.071: Regression or valid error?

2016-04-06 Thread Andre via Digitalmars-d-learn
Hi, With 2.071 following coding does not compile anymore and somehow I feel it should compile. The issue is with line "cat.create();". Cat is a sub type of Animal. Animal "owns" method create and I want to call the method create within the class Animal for cat. Is the error message "no

Re: dub, copyFiles and linux

2016-03-30 Thread Andre via Digitalmars-d-learn
OK solved;) Shared libraries doesn't need to be mentioned in libs section in dub. Therefore copying after the linking is correct and is working fine. Kind regards André

Re: dub, copyFiles and linux

2016-03-30 Thread Andre via Digitalmars-d-learn
On Thursday, 31 March 2016 at 04:57:01 UTC, Andre wrote: I can't see why it is working with vibe-d projects (openssl libraries copied to application folder) but not for my project. There is no console output "copying files for..." while using dub for my application project. What is wrong?

dub, copyFiles and linux

2016-03-30 Thread Andre via Digitalmars-d-learn
Hi, I created a library which uses some shared objects. The dub.json looks like this: { "name": "sec", "configurations": [ { "name": "debug", "targetType": "library",

Re: Usage of custom class with JSONValue

2016-03-24 Thread Andre via Digitalmars-d-learn
On Thursday, 24 March 2016 at 16:03:13 UTC, Edwin van Leeuwen wrote: On Thursday, 24 March 2016 at 11:39:13 UTC, arturg wrote: isnt alias this supposed to do this implicitly? convert this auto jsValue = JSONValue(new MyClass()); into this auto jsValue = JSONValue((new MyClass())._data);

Usage of custom class with JSONValue

2016-03-24 Thread Andre via Digitalmars-d-learn
Hi, I have a class which has already an alias this to a string array, so I can use it in a foreach loop. class MyClass { string[] _data; alias _data this; // ... } void main() { import std.json; auto jsValue = JSONValue(new MyClass()); } For some

Re: Determine decimal separator (comma vs point)

2016-03-07 Thread Andre via Digitalmars-d-learn
On Monday, 7 March 2016 at 12:29:39 UTC, Andre wrote: Hi, I execute an external application and get some decimal numbers: auto p = execute(["curl", "-o", "/dev/null", "-s", "-w",

Determine decimal separator (comma vs point)

2016-03-07 Thread Andre via Digitalmars-d-learn
Hi, I execute an external application and get some decimal numbers: auto p = execute(["curl", "-o", "/dev/null", "-s", "-w", "%{time_namelookup}:%{time_appconnect}:%{time_redirect}:%{time_starttransfer}:%{time_pretransfer}:%{time_connect}:%{time_total}", url]);

Re: Syntax highlighting of backticks now supported in Notepad++

2016-02-26 Thread Andre via Digitalmars-d-announce
On Friday, 26 February 2016 at 15:31:33 UTC, Remo wrote: On Wednesday, 24 February 2016 at 02:57:20 UTC, Charles wrote: On Tuesday, 23 February 2016 at 17:01:47 UTC, Andre wrote: Hi, with the newest version of Notepad++ (6.9) strings enclosed with backticks `Hello World!` are now correctly

Re: Issues

2016-02-23 Thread Andre via Digitalmars-d-learn
On Tuesday, 23 February 2016 at 19:53:52 UTC, Johan Engelen wrote: On Monday, 22 February 2016 at 23:21:28 UTC, Jonathan M Davis wrote: Well, if you'll notice th list of resolved issues is going up way faster than the list of new issues. (To put some oil on the fire:) But the number of

Syntax highlighting of backticks now supported in Notepad++

2016-02-23 Thread Andre via Digitalmars-d-announce
Hi, with the newest version of Notepad++ (6.9) strings enclosed with backticks `Hello World!` are now correctly highlighted. Kind regards André

Re: Issues

2016-02-23 Thread Andre via Digitalmars-d-learn
On Tuesday, 23 February 2016 at 00:13:23 UTC, ag0aep6g wrote: On 22.02.2016 23:56, Andre wrote: I was wondering how people in this D community think about the number of issues with NEW status... It could scare individuals/organizations to start with D, when they get the impression that there

Issues

2016-02-22 Thread Andre via Digitalmars-d-learn
I was wondering how people in this D community think about the number of issues with NEW status... It could scare individuals/organizations to start with D, when they get the impression that there are a large and growing number of issues that are open (for years). I know this is not a fair

cast fails for classes from windows dll

2016-01-12 Thread Andre via Digitalmars-d-learn
Hi, I am not sure, whether this is a current limitation of the windows dll functionality of D or I am doing s.th. which will not work. I have developed in D a windows DLL which creates class instances by passing the name (using object.factory method). In another D application I am using

Re: Runtime.unloadLibrary terminates application on Windows

2015-12-14 Thread Andre via Digitalmars-d-learn
On Monday, 14 December 2015 at 17:50:26 UTC, Andre wrote: Hi, there is an issue with the example from http://wiki.dlang.org/Win32_DLLs_in_D While executing the DYNAMIC_LOAD version, the application will exit on statement: if (!Runtime.unloadLibrary(h)) Neither "error freeing mydll.dll" nor

Re: Runtime.unloadLibrary terminates application on Windows

2015-12-14 Thread Andre via Digitalmars-d-learn
On Monday, 14 December 2015 at 19:17:00 UTC, Andre wrote: It seems to be a regression https://issues.dlang.org/show_bug.cgi?id=1550 I will open a ticket for this issue https://issues.dlang.org/show_bug.cgi?id=15443

Runtime.unloadLibrary terminates application on Windows

2015-12-14 Thread Andre via Digitalmars-d-learn
Hi, there is an issue with the example from http://wiki.dlang.org/Win32_DLLs_in_D While executing the DYNAMIC_LOAD version, the application will exit on statement: if (!Runtime.unloadLibrary(h)) Neither "error freeing mydll.dll" nor "End..." is written to the console. The application just

Forward declaration issue

2015-12-04 Thread Andre via Digitalmars-d-learn
Hi, I have a strange issue with following coding. void baz(); // forward declaration void foo() { void bar() { baz(); // (1) without f.d. syntax error } void baz() { bar(); } baz(); // (2)

Re: Forward declaration issue

2015-12-04 Thread Andre via Digitalmars-d-learn
On Friday, 4 December 2015 at 09:51:30 UTC, Artur Skawina wrote: No, it's how D is designed -- inside functions the order of declarations matters (and forward declarations don't work). Your version wrongly declares another `baz` at module scope, and, as there's no definition, you end up with

Re: utils.toBulkString is not accesible from utils

2015-12-02 Thread Andre via Digitalmars-d-learn
On Wednesday, 2 December 2015 at 12:37:29 UTC, Marc Schütz wrote: I think so, yes. But according to digger, the current behaviour goes back to at least DMD 2.052. Please file a bug report anyway. Bug report filed https://issues.dlang.org/show_bug.cgi?id=15395

utils.toBulkString is not accesible from utils

2015-12-01 Thread Andre via Digitalmars-d-learn
Hi, for following coding there is an error during compilation: module utils; package string toBulkString(string s) { import std.string: format; return "$%s\r\n%s\r\n".format(s.length, s); } unittest { string actual = "foobar".toBulkString();

Re: experimental.logger: safe function and stdou

2015-11-18 Thread Andre via Digitalmars-d-learn
On Thursday, 19 November 2015 at 06:27:58 UTC, Andre wrote: override void writeLogMsg(ref LogEntry payload) { with (payload) { _stdOutLogger.logf(logLevel, `{ "file":"%s", "line":%s, "funcName":"%s", "prettyFuncName":"%s",

experimental.logger: safe function and stdou

2015-11-18 Thread Andre via Digitalmars-d-learn
Hi, I want to write log entries to stdout in JSON format. Therefore I created a customer logger. Unfortunatelly there are 2 errors with following implementation: module logger; import std.experimental.logger; import std.stdio: stdout; class MyCustomLogger : Logger { private FileLogger

win32 from master: unicode functions by default?

2015-11-11 Thread Andre via Digitalmars-d-learn
Hi, by using the win32 library from master, the functions aliases to the ansi windows functions (...A) instead of the unicode functions (...W). Is there a way to control this behavior beside using the explicit function names (A/W)? Kind regards André

Re: win32 from master: unicode functions by default?

2015-11-11 Thread Andre via Digitalmars-d-learn
On Thursday, 12 November 2015 at 05:08:25 UTC, Mike Parker wrote: On Thursday, 12 November 2015 at 04:58:42 UTC, Andre wrote: Hi, by using the win32 library from master, the functions aliases to the ansi windows functions (...A) instead of the unicode functions (...W). Is there a way to

Ternary if and ~ does not work quite well

2015-10-11 Thread Andre via Digitalmars-d-learn
Hi, I am not sure, whether the output of following coding is correct: import std.stdio; void main() { writeln("foo "~ true ? "bar" : "baz"); writeln("foo "~ false ? "bar" : "baz"); // assert("foo "~ true ? "bar" : "baz" == "foo bar"); does not compile } Output: bar bar I

Re: Ternary if and ~ does not work quite well

2015-10-11 Thread Andre via Digitalmars-d-learn
On Monday, 12 October 2015 at 05:25:46 UTC, H. S. Teoh wrote: On Mon, Oct 12, 2015 at 05:19:38AM +, Andre via Digitalmars-d-learn wrote: [...] [...] It's best to parenthesize when mixing other operators with ?, because ? has a pretty low precedence and may "steal" argum

Re: Marketing for D: Making D an official Cloud Foundry built-in language

2015-10-10 Thread Andre via Digitalmars-d
On Saturday, 10 October 2015 at 02:49:23 UTC, Rikki Cattermole wrote: [...] Wrong way round. Bundle dub with dmd is already planned. I hoped 2.069 already contains dub, maybe with 2.070 [...] I am sure Walter will have no problem with you creating a custom archive, perhaps with tar?

Marketing for D: Making D an official Cloud Foundry built-in language

2015-10-09 Thread Andre via Digitalmars-d
I want to share my experiences with making marketing for D. At the company I am working for, Cloud and Cloud Foundry is a big thing. At the office github there are several coding examples how to develop applications for the languages Cloud Foundry supports out of box: Java, Node.js, Ruby, Go,

Re: Experience: Developing Cloud Foundry applications with D

2015-10-06 Thread Andre via Digitalmars-d
On Tuesday, 6 October 2015 at 09:36:42 UTC, Marc Schütz wrote: On Tuesday, 6 October 2015 at 05:45:18 UTC, Andre wrote: vagrant@vagrant-ubuntu-trusty-64:~/projects/tests/vibed_test$ dub Target memutils 0.4.1 is up to date. Use --force to rebuild. Target libasync 0.7.5 is up to date. Use

Re: Experience: Developing Cloud Foundry applications with D

2015-10-05 Thread Andre via Digitalmars-d
On Monday, 5 October 2015 at 15:51:09 UTC, Andre wrote: On Sunday, 4 October 2015 at 23:34:58 UTC, Rikki Cattermole wrote: On 05/10/15 8:13 AM, Andre wrote: Vibe.d has a provider called libasync. Libasync is fully implemented in D. You probably should have tried that at least. Although I

Re: Experience: Developing Cloud Foundry applications with D

2015-10-05 Thread Andre via Digitalmars-d
On Sunday, 4 October 2015 at 22:47:46 UTC, Vladimir Panteleev wrote: On Sunday, 4 October 2015 at 19:13:58 UTC, Andre wrote: I tried different http servers available for D. One more (my own): https://github.com/CyberShadow/ae/tree/master/net ae.net is used on: - http://forum.dlang.org/ -

Re: Experience: Developing Cloud Foundry applications with D

2015-10-05 Thread Andre via Digitalmars-d
On Sunday, 4 October 2015 at 23:34:58 UTC, Rikki Cattermole wrote: On 05/10/15 8:13 AM, Andre wrote: Vibe.d has a provider called libasync. Libasync is fully implemented in D. You probably should have tried that at least. Although I still would recommend trying it ;) It's a lot better then

Experience: Developing Cloud Foundry applications with D

2015-10-04 Thread Andre via Digitalmars-d
I want to share my experiences with D and the platform as a service solution Cloud Foundry. Cloud Foundry supports any development language as long it is runnable on Linux 64 bit and the application has a http Server listening on a port which Cloud Foundry provides you using system environment

Re: Final templated interface method not found

2015-09-16 Thread Andre via Digitalmars-d-learn
Thanks, it works like a charme. Kind regards André

Final templated interface method not found

2015-09-15 Thread Andre via Digitalmars-d-learn
Hi, following coding shoud work, or? It doesn't compile with v2.068.0. Kind regards André interface IfStatement { void execute(); final void execute(T...)(T t) { execute(); } } class Statement: IfStatement { void execute(){} }

Definition of SIGRTMIN

2015-08-31 Thread Andre via Digitalmars-d-learn
Hi, I cannot use the definition of SIGRTMIN on ubuntu. For following code I receive errors: import core.sys.posix.time, core.sys.posix.signal, core.sys.posix.stdlib, core.sys.posix.unistd; import std.stdio; alias SIG = SIGRTMIN; void main() { writeln("Establishing handler for signal

Re: std.typecons: PrimitiveRef

2015-03-24 Thread Andre via Digitalmars-d
Definition of BoolRef: alias BoolRef = PrimitiveRef!bool;

std.typecons: PrimitiveRef

2015-03-24 Thread Andre via Digitalmars-d
Hi, Namespace helped me to get following template working. struct PrimitiveRef(T) { private T* _value; @property ref inout(T) get() inout pure nothrow { assert(_value); return *_value; } alias get this;

Re: std.typecons: PrimitiveRef

2015-03-24 Thread Andre via Digitalmars-d
On Tuesday, 24 March 2015 at 16:58:48 UTC, Gary Willoughby wrote: On Tuesday, 24 March 2015 at 15:38:04 UTC, Andre wrote: The use case is a type tuple where you cannot use the keyword ref. Could template alias parameters not be used here? http://dlang.org/template.html#aliasparameters

Re: PrimitiveRef ?

2015-03-23 Thread Andre via Digitalmars-d-learn
Thanks a lot. I read it in the D Cookbook from Adam D. Ruppe. In the chapter of memory management there is a topic, how to build reference counted objects. Here this construct is explained. Kind regards André On Monday, 23 March 2015 at 20:58:48 UTC, Namespace wrote: Something like that?

PrimitiveRef ?

2015-03-23 Thread Andre via Digitalmars-d-learn
Hi, I read that if a structure only contains a reference, it will behave like a reference type in function calls (needed for specifying reference behavior in a type tuple). I need exactly that behavior. I am currently unsure whether it is possible at all to have such a construct which works

Re: How to use UFCS and std.algorithm.sort?

2015-03-10 Thread Andre via Digitalmars-d-learn
Thanks a lot! Kind regards André On Tuesday, 10 March 2015 at 08:40:28 UTC, Jonathan M Davis wrote: On Tuesday, March 10, 2015 07:24:52 Andre via Digitalmars-d-learn wrote: Hi, with the new beta I get the warning I should use std.algorithm.sort instead the .sort property. I thought

Re: 2.067 Beta: Behavior of enum and ref changed

2015-03-10 Thread Andre via Digitalmars-d-learn
Thanks a lot! Kind regards André On Tuesday, 10 March 2015 at 09:25:02 UTC, Meta wrote: On Tuesday, 10 March 2015 at 08:37:46 UTC, Jonathan M Davis wrote: It's the base type that isn't implicitly convertible to the enum type. Err, yes. I had that the wrong way around. Anyway, I filed an

2.067 Beta: Behavior of enum and ref changed

2015-03-10 Thread Andre via Digitalmars-d-learn
Hi, following coding raises a compiler error with the beta of 2.067. Is this error intended or not? It is working if I change first line of main to: ulong bits; enum Bits: ulong { none = 0 } bool hasBit(ref ulong rBits, ulong rBit) { return cast(bool)(rBits rBit); } void

How to use UFCS and std.algorithm.sort?

2015-03-10 Thread Andre via Digitalmars-d-learn
Hi, with the new beta I get the warning I should use std.algorithm.sort instead the .sort property. I thought the std.algorithm.sort method is used in this example? void main() { import std.algorithm: sort, uniq, map; import std.array: array; string[]

Re: Implicit fall through not detected (Example from lex.html)

2015-03-03 Thread Andre via Digitalmars-d-learn
On Tuesday, 3 March 2015 at 07:27:33 UTC, ketmar wrote: implicit fallthru is not a fatal bug (but i believe it should be), it generates only warning. I am also not really happy with the actual behavor (w / wi switch needed) because the documentation is clear about that it is an error:

Implicit fall through not detected (Example from lex.html)

2015-03-02 Thread Andre via Digitalmars-d-learn
Hi, I am little bit confused. I am copied the switch example from lex.html and expected that case 6 will lead to a syntax error due to the missing break statement. But the example compiles without error (C:dmd app) I tried 3 different dmd version, also the newest beta. Kind regards André

curl password issue

2015-02-23 Thread Andre via Digitalmars-d-learn
Hi, Curl has some issues with passwords containing special characters like the hash key (#). The password will not be accepted although it is correctly set with the method setAuthencication(user, pass1234#); I know this is more a Curl issue than a DLang issue but it is very frustrating and for

Re: Problem with coupling shared object symbol visibility with protection

2015-02-18 Thread Andre via Digitalmars-d
Hi, I also want to say a big thank you to all of you involved in this topic and especially to Benjamin. Proper DLL handling in D I would really appreciate. I think this topic is the break through. Kind regards André On Tuesday, 17 February 2015 at 18:03:06 UTC, Benjamin Thaut wrote: So i

Re: Parameterized enum does not work

2015-01-09 Thread Andre via Digitalmars-d-learn
Thanks a lot. Kind regards André On Friday, 9 January 2015 at 07:59:51 UTC, Daniel Kozak wrote: On Friday, 9 January 2015 at 07:52:50 UTC, Daniel Kozak wrote: On Friday, 9 January 2015 at 07:50:53 UTC, Daniel Kozak wrote: On Friday, 9 January 2015 at 06:17:53 UTC, Andre wrote: Hi, Should

Parameterized enum does not work

2015-01-08 Thread Andre via Digitalmars-d-learn
Hi, Should following coding work? string lpad(ubyte length, long n) { import std.string: rightJustify; import std.conv: to; return rightJustify(to!string(n), length, '0'); } enum lpad14(long n) = lpad(14, n); void main() { lpad14(123); } There is

Re: BigInt and

2014-12-19 Thread Andre via Digitalmars-d-learn
Great! Thanks a lot. Kind regards André On Friday, 19 December 2014 at 08:47:50 UTC, bearophile wrote: Andre: Do you have any idea how to translate the coding correctly? Try: i += long(buffer[3]) 24 0; But I also suggest to add parentheses, to make the code less unreadable for humans.

BigInt and

2014-12-18 Thread Andre via Digitalmars-d-learn
Hi, I try to translate following javascript coding to D: i = buffer[2] 16; i |= buffer[1] 8; i |= buffer[0]; i += buffer[3] 24 0; Buffer is: [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 111] Expected result for i is: 4294967295 But in D the last statement

Re: Template bug with second mixin?

2014-12-05 Thread Andre via Digitalmars-d-learn
!(readTinyInt, ubyte); mixin insertReadMethods!(readShortInt, short); } void main(){} Kind regards André On Friday, 5 December 2014 at 07:28:26 UTC, ketmar via Digitalmars-d-learn wrote: On Fri, 05 Dec 2014 07:06:34 + Andre via Digitalmars-d-learn digitalmars-d-learn@puremagic.com

Re: Template bug with second mixin?

2014-12-05 Thread Andre via Digitalmars-d-learn
thanks a lot. That makes sense. Kind regards André On Friday, 5 December 2014 at 09:29:21 UTC, ketmar via Digitalmars-d-learn wrote: On Fri, 05 Dec 2014 09:19:27 + Andre via Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote: I think I mimized the coding too much. What I

Template bug with second mixin?

2014-12-04 Thread Andre via Digitalmars-d-learn
Hi, following coding fails to compile with 2.066.0 and 2.067.0-b1. This is a bug, or? source\app.d(9): Error: mixin app.Data.insertReadMethods!(readTinyInt, ubyte) is not defined template insertReadMethods(string MethodName, DataType) { enum insertReadMethods = ; } struct Data {

jsnode crypto createHmac createHash

2014-11-28 Thread andre via Digitalmars-d-learn
Hi, I translate some functionality written in jsnode, which contains a crypto library. Although there is some sha256 support in phobos I think, they do not provide all functionality I need to translate following two functions. (Input and output is ubyte[]) Is there a library which supports the

Re: jsnode crypto createHmac createHash

2014-11-28 Thread andre via Digitalmars-d-learn
fantastic, thanks a lot. Kind regards André On Friday, 28 November 2014 at 13:09:34 UTC, Daniel Kozák via Digitalmars-d-learn wrote: V Fri, 28 Nov 2014 12:46:25 + andre via Digitalmars-d-learn digitalmars-d-learn@puremagic.com napsáno: Hi, I translate some functionality written

attribute length missing in std.array: Appender

2014-11-27 Thread Andre via Digitalmars-d-learn
Hi, I implement a network protocol and use an Appender!(ubyte[])(). I have following issue. The first three bytes I have to fill, the following bytes are reserved and must be 0. In this example the overall header length must be 8. import std.array: appender; const HEADER_LENGTH = 8;

Re: attribute length missing in std.array: Appender

2014-11-27 Thread andre via Digitalmars-d-learn
Thanks a lot for the help. Kind regards André On Thursday, 27 November 2014 at 17:29:50 UTC, Marc Schütz wrote: On Thursday, 27 November 2014 at 16:08:13 UTC, Andre wrote: Hi, I implement a network protocol and use an Appender!(ubyte[])(). I have following issue. The first three bytes I

Re: @property method needs ()

2014-11-24 Thread Andre via Digitalmars-d-learn
Thanks a lot for the info. Kind regards André On Monday, 24 November 2014 at 09:26:16 UTC, Marc Schütz wrote: On Monday, 24 November 2014 at 08:35:08 UTC, ketmar via Digitalmars-d-learn wrote: a known thing. not sure if this is a known *bug* (seems that almost nobody cares). compiler is

@property method needs ()

2014-11-23 Thread Andre via Digitalmars-d-learn
Hi, in following example the @property method needs the () otherwise compiler error for row 24 is thrown. I cannot judge, whether the compiler behaves correct or not. Kind regards André --- alias fnError = void delegate(string s); interface IfSession { @property fnError addError();

InvalidMemoryOperationError@(0)

2014-11-17 Thread Andre via Digitalmars-d-learn
Hi, the following coding is an extract from the DGUI library. On my system (Win 8) I receive InvalidMemoryOperationError@. I got the information that this Error doesn't not occur on a WinXP system. I think there is definetely a bug in the following coding. The Grid class has a Collection of

Get full class name at compile time - Not yet implemented

2014-11-12 Thread Andre via Digitalmars-d-learn
Hi, I currently have some issues to get the full class name at compile time by the variable which might point to null. With .stringof I get the class name without the module. It seems typeid(typeof()) is the solution, but DMD throws the error: source\app.d(10): Error: typeid(app.A).name is

Re: Get full class name at compile time - Not yet implemented

2014-11-12 Thread Andre via Digitalmars-d-learn
perfekt, thanks a lot. Kind regards André On Thursday, 13 November 2014 at 05:37:26 UTC, Rikki Cattermole wrote: On 13/11/2014 6:22 p.m., Andre wrote: http://dlang.org/phobos/std_traits.html#fullyQualifiedName

Re: 'partial' keyword in C# is very good for project , what's the same thing in D?

2014-11-10 Thread Andre via Digitalmars-d
One requirement for a partial alternative is, that the generated coding can access private member of the actual class as they are in most GUI framework private members of the class. class Example { private Button b; private ComboBox cb; } The GUI framework takes care about calling their

Re: D 2.066.1: Assertion failure: '0' on line 2022 in file 'mtype.c'

2014-11-10 Thread Andre via Digitalmars-d
I will create a issue for this. The minimized version is: enum DummyStringEnum { foo = bar } class Test { @property DummyStringEnum e() { return DummyStringEnum.foo; } } void main() { import std.json; JSONValue[string]

D 2.066.1: Assertion failure: '0' on line 2022 in file 'mtype.c'

2014-11-09 Thread Andre via Digitalmars-d
Hi, after the update from 2.066 to 2.066.1 DMD gives following output: Assertion failure: '0' on line 2022 in file 'mtype.c' abnormal program termination Unfortunatelly I do not know how to create a reproducible example as the error occurs in a huge application. DMD doesn't give me more

Re: Intended behavior or bug (private vs public static)

2014-11-07 Thread Andre via Digitalmars-d-learn
Thanks a lot. I will create a bug report. Kind regards André On Friday, 7 November 2014 at 06:09:02 UTC, Jonathan M Davis via Digitalmars-d-learn wrote: That looks like a bug. All you have to do is change the order of the two function declarations or rename the non-static one to something

Re: 'partial' keyword in C# is very good for project , what's the same thing in D?

2014-10-30 Thread andre via Digitalmars-d
From some little tests I can say only string mixins are working for the GUI builder scenario. The concrete class contains private ui controls (members). The gui builder framework needs to access these private members to call their constructors, and set their values to the last persisted state.

Re: Issue with WIKI example Win32_DLLs_in_D

2014-10-22 Thread andre via Digitalmars-d-learn
I think there is a bigger issue with the mentioned example. The command cannot work: dmd test mydll.lib -g test.d has an import statement to mydll. mydll has to be included in the command. But as mydll not only contains the exported dll functions but also DllMain, it cannot be compiled

Issue with WIKI example Win32_DLLs_in_D

2014-10-21 Thread Andre via Digitalmars-d-learn
Hi, by copy and paste the example from http://wiki.dlang.org/Win32_DLLs_in_D exactly as described, the following errors is thrown: J:\Projects\Tests\Exampledmd test mydll.lib -g OPTLINK (R) for Win32 Release 8.00.15 test.obj(test) Error 42: Symbol Undefined _D5mydll12__ModuleInfoZ I created

Re: Runtime type information

2014-10-10 Thread andre via Digitalmars-d
I just saw, there is also dip 8. As a suggestion, instead of a compiler switch , we could introduce an interface IPersistent. By implementing this interface in your actual class, rtti would be available/generated. What do You think? Kind regards André On Thursday, 9 October 2014 at

__traits(getMember) works only the second time

2014-10-10 Thread andre via Digitalmars-d-learn
Hi, by executing the example source code, following output is returned: Reference: Child false true At first childStr is not found, then it is found? Is this a bug? Kind regards André - module app; import test; class Child : Parent { mixin ComponentTemplate; @property

Re: __traits(getMember) works only the second time

2014-10-10 Thread andre via Digitalmars-d-learn
I use the syntax is(typeof(__traits(getMember, MyType, childStr))) to check whether a member is public visible or not. (The example above is only a reduced example) By the way hasMember works correctly. I will file an issue. Kind regards André On Friday, 10 October 2014 at 07:25:28 UTC,

Runtime type information

2014-10-09 Thread andre via Digitalmars-d
Hi, I just stubmled over an enhancement in object_.d and object.di Benjamin Thaut described on his page: http://3d.benjamin-thaut.de/?p=25#more-25. The enhancement looks quite good and handy for me and would be a quick win to have some more runtime type information in the language. Does

(this MyType) automatic deduction?

2014-10-08 Thread andre via Digitalmars-d-learn
Hi, could you check whether it is correct, that second line in main failes with a compiler error? I think the compiler should be able to deduce the type without explicitly passing it to the method call. Kind regards André template ClassTemplate() { static auto deserialize(this MyType)() {

(this MyType) and interface: Symbol undefined

2014-10-08 Thread andre via Digitalmars-d-learn
Hi, please consider following example. I want to acces class B by interface I. Method work should print the actual class (B). The linker say: Error 42: Symbol Undefined _D3app1I17__T4workTC3app1IZ4workMFZv Is this is missing feature or even a bug? Is there any other way to get the actual

Re: (this MyType) automatic deduction?

2014-10-08 Thread andre via Digitalmars-d-learn
Thanks a lot for the helpful explanation. Kind regards André On Wednesday, 8 October 2014 at 21:10:02 UTC, anonymous wrote: On Wednesday, 8 October 2014 at 10:36:33 UTC, andre wrote: Hi, could you check whether it is correct, that second line in main failes with a compiler error? I think the

Re: Curl - Set cookie value

2014-10-06 Thread andre via Digitalmars-d-learn
I found out the real issue. Using addRequestHeader also works for cookies, but there is an issue with HTTP attribute responseHeaders. As this attribute is an associative array (string[string]) it contains only 1 value for 1 key. In case there are several HTTP keys with the same name, it only

Dlls on Windows?

2014-09-27 Thread andre via Digitalmars-d
Hi, As far as I know there are some issues with dlls on Windows (D dlls used in D applications) in contrast to linux.There are some (unfinished) pull requests, and some ideas. It would be great if You can give an update on this topic. Maybe the Wiki page for Dlls on Windows can be updated with

Re: isCallable is not an expression

2014-09-25 Thread andre via Digitalmars-d-learn
Thanks a lot. Kind regards André

isCallable is not an expression

2014-09-24 Thread andre via Digitalmars-d-learn
Hi, following code throws an error when I uncomment method getPropertyDuplicate. getPropertyDuplicate is just a copy of getProperty except the method name. Why these errors are thrown? C:\D\dmd2\windows\bin\..\..\src\phobos\std\traits.d(1257): Error: isCallable!(ge tPropertyDuplicate) is

Re: with (auto p = new ...)

2014-09-24 Thread Andre via Digitalmars-d-learn
Enhancement 13526 filed: https://issues.dlang.org/show_bug.cgi?id=13526

with (auto p = new ...)

2014-09-23 Thread Andre via Digitalmars-d-learn
Hi, I just wonder why with (auto p = new ...) is not working. It would be some syntax sugar in this scenario: with (auto p = new Panel()) { parent = this; text = bla; with (auto b = new Button()) {

Re: with (auto p = new ...)

2014-09-23 Thread andre via Digitalmars-d-learn
Yes, that is also working. As far as I remember (only my tablet currently available) also this works: Panel p; with(p = new Panel ()) {} Therefore it seems strange,the same does not work with auto. Kind regards André On Tuesday, 23 September 2014 at 19:49:22 UTC, Graham Fawcett wrote:

alias this cast

2014-09-11 Thread andre via Digitalmars-d-learn
Hi, I am 80% sure, the failing assertion is correct but please have a look. Second assertion fails. Kind regards André class A{} class B{} class C : B { A a; alias a this; this() { a = new A(); } } void main() { B b

Re: alias this cast

2014-09-11 Thread andre via Digitalmars-d-learn
3 represenations: A, B and C. It is a matter of steps. Kind regards André On Thursday, 11 September 2014 at 11:53:30 UTC, Daniel Kozak via Digitalmars-d-learn wrote: V Thu, 11 Sep 2014 11:40:05 + andre via Digitalmars-d-learn digitalmars-d-learn@puremagic.com napsáno: Hi, I am 80

Re: DUB: link to local library

2014-09-10 Thread andre via Digitalmars-d-learn
Dub command line supports something like Dub add-local. Then you can use the package directly. Kind regards Andre On Wednesday, 10 September 2014 at 15:40:11 UTC, Edwin van Leeuwen wrote: On Wednesday, 10 September 2014 at 13:40:16 UTC, rcor wrote: dub.json contains what I think should do

Re: dgui - Button continually repainting

2014-09-09 Thread andre via Digitalmars-d-learn
Hi, Just checked, on WM_PAINT all event listeners (event paint) are called. Overwriting onPaint seems to work better (issue 18 in dgui bitbucket site). Please file this issue also on the dgui bibucket home page. Kind regards Andre On Tuesday, 9 September 2014 at 10:50:11 UTC, Mike James

dgui - self defined components with double buffering

2014-09-09 Thread andre via Digitalmars-d-learn
Hi, I habe several self defined components in my Windows. During resizing of the Windows, the Windows controls gets ugly and then disappear. I want to implement double buffering but found no obvious way to create a memory canvas and after having done the drawing copying It to the canvas of the

  1   2   >