Re: How to prevent sensitive information is displayed when the extension 'exe' is modified to 'txt' on windows?

2015-01-06 Thread FrankLike via Digitalmars-d-learn
What you want is some kind of code obfuscation. The easiest thing for you is to use exe compression. It is not going to stop a dedicated attacker, but ordinary people will not be able to extract any information from it. http://upx.sourceforge.net/ Martin Yes,if I can't get some tools from

Re: How to prevent sensitive information is displayed when the extension 'exe' is modified to 'txt' on windows?

2015-01-06 Thread FrankLike via Digitalmars-d-learn
On Tuesday, 6 January 2015 at 17:45:19 UTC, Rene Zwanenburg wrote: On Tuesday, 6 January 2015 at 17:32:29 UTC, Adam D. Ruppe wrote: On Tuesday, 6 January 2015 at 17:15:28 UTC, FrankLike wrote: How to prevent sensitive information is displayed when the extension 'exe' is modified to 'txt' on win

Re: Error: function declaration without return type.

2015-01-06 Thread ketmar via Digitalmars-d-learn
On Tue, 06 Jan 2015 21:25:49 + Suliman via Digitalmars-d-learn wrote: > On Tuesday, 6 January 2015 at 21:19:38 UTC, bearophile wrote: > > Suliman: > > > >>void foo() > >>{ > >>writeln("test"); > >>writeln(mystring); > >>} > >>foo(); < > >> } > > > > I guess you h

Re: Copy only frame pointer between objects of nested struct

2015-01-06 Thread Artur Skawina via Digitalmars-d-learn
On 01/06/15 23:14, Peter Alexander via Digitalmars-d-learn wrote: > auto foo(T)(T a) { > T b; // Error: cannot access frame pointer of main.X > b.data[] = 1; > return b; > } > > void main() { > struct X { > this(int) {} > int[4096] data; > } > foo(X());

Re: What is the absolute minimum code for a D kernel, and how should it be compiled?

2015-01-06 Thread Stijn via Digitalmars-d-learn
On Tuesday, 6 January 2015 at 22:41:06 UTC, Adam D. Ruppe wrote: I showed how to do it in my book using dmd. Here's the code: http://arsdnet.net/dcode/book/chapter_11/01/ I've just bought the book, I'll dive right into it :) Thanks!

Re: What is the absolute minimum code for a D kernel, and how should it be compiled?

2015-01-06 Thread Adam D. Ruppe via Digitalmars-d-learn
I showed how to do it in my book using dmd. Here's the code: http://arsdnet.net/dcode/book/chapter_11/01/ Explanation is in chapter 11 here: https://www.packtpub.com/application-development/d-cookbook In the appendix, I also did ARM with gdc: http://arsdnet.net/dcode/book/appendix_a/01/ The a

What is the absolute minimum code for a D kernel, and how should it be compiled?

2015-01-06 Thread Stijn via Digitalmars-d-learn
After writing a bootloader and getting it to jump to a Hello World "kernel" written in assembly, I want to give it a go with a "kernel" written in D. I'm using GDC because I didn't have much luck with making DMD skip the D runtime and standard libs. Starting with this code: void main() {

Copy only frame pointer between objects of nested struct

2015-01-06 Thread Peter Alexander via Digitalmars-d-learn
Consider: auto foo(T)(T a) { T b; // Error: cannot access frame pointer of main.X b.data[] = 1; return b; } void main() { struct X { this(int) {} int[4096] data; } foo(X()); } Note the error is because you c

Re: Error: function declaration without return type.

2015-01-06 Thread Martin Drašar via Digitalmars-d-learn
Dne 6.1.2015 v 22:25 Suliman via Digitalmars-d-learn napsal(a): > On Tuesday, 6 January 2015 at 21:19:38 UTC, bearophile wrote: >> Suliman: >> >>> void foo() >>> { >>> writeln("test"); >>> writeln(mystring); >>> } >>> foo(); < >>> } >> >> I guess you have to remove tha

Re: Error: function declaration without return type.

2015-01-06 Thread Suliman via Digitalmars-d-learn
On Tuesday, 6 January 2015 at 21:19:38 UTC, bearophile wrote: Suliman: void foo() { writeln("test"); writeln(mystring); } foo(); < } I guess you have to remove that line. Bye, bearophile Why? I can't call function in instance of class?

Re: Error: function declaration without return type.

2015-01-06 Thread bearophile via Digitalmars-d-learn
Suliman: void foo() { writeln("test"); writeln(mystring); } foo(); < } I guess you have to remove that line. Bye, bearophile

Error: function declaration without return type.

2015-01-06 Thread Suliman via Digitalmars-d-learn
class Test { string mystring; this(string mystring) { this.mystring = mystring; } void foo() { writeln("test"); writeln(mystring); } foo(); } source\app.d(303): Error: function declaration wi

Re: How to prevent sensitive information is displayed when the extension 'exe' is modified to 'txt' on windows?

2015-01-06 Thread Martin Drašar via Digitalmars-d-learn
Dne 6.1.2015 v 18:15 FrankLike via Digitalmars-d-learn napsal(a): > How to prevent sensitive information is displayed when the extension > 'exe' is modified to 'txt' on windows? > > If you build a exe ,such as which can get Data from DataBase,when you > modify the exe's extension to 'txt', > and

Re: import std.random fails

2015-01-06 Thread Rene Zwanenburg via Digitalmars-d-learn
On Tuesday, 6 January 2015 at 20:26:25 UTC, ixid wrote: Dmd latest non-beta, with the latest VisualD. Debug build. Debug build and no additional or non default settings. Hmm.. Did you verify that the D installation directory was completely empty after uninstalling? Does VisualD have some ki

Re: import std.random fails

2015-01-06 Thread ixid via Digitalmars-d-learn
On Tuesday, 6 January 2015 at 18:37:25 UTC, Rene Zwanenburg wrote: On Monday, 5 January 2015 at 15:59:17 UTC, ixid wrote: On Friday, 31 August 2012 at 22:52:13 UTC, Jonathan M Davis wrote: On Saturday, September 01, 2012 00:40:25 deed wrote: import std.random void main() {} --- results

Re: import std.random fails

2015-01-06 Thread Rene Zwanenburg via Digitalmars-d-learn
On Monday, 5 January 2015 at 15:59:17 UTC, ixid wrote: On Friday, 31 August 2012 at 22:52:13 UTC, Jonathan M Davis wrote: On Saturday, September 01, 2012 00:40:25 deed wrote: import std.random void main() {} --- results in: Error 42: Symbol Undefined _D4core6memory2GC6qallocFkkZS4core6m

Re: Can pointers to values inside associative arrays become invalid?

2015-01-06 Thread Steven Schveighoffer via Digitalmars-d-learn
On 1/6/15 12:39 PM, Idan Arye wrote: On Tuesday, 6 January 2015 at 16:30:14 UTC, H. S. Teoh via Digitalmars-d-learn wrote: On Tue, Jan 06, 2015 at 04:18:17PM +, Idan Arye via Digitalmars-d-learn wrote: I have an associative array, and I use the `in` operator to get a reference to a value in

Re: How to prevent sensitive information is displayed when the extension 'exe' is modified to 'txt' on windows?

2015-01-06 Thread Rene Zwanenburg via Digitalmars-d-learn
On Tuesday, 6 January 2015 at 17:32:29 UTC, Adam D. Ruppe wrote: On Tuesday, 6 January 2015 at 17:15:28 UTC, FrankLike wrote: How to prevent sensitive information is displayed when the extension 'exe' is modified to 'txt' on windows? If the data is in the program, it is visible to anyone you g

Re: Can pointers to values inside associative arrays become invalid?

2015-01-06 Thread H. S. Teoh via Digitalmars-d-learn
On Tue, Jan 06, 2015 at 05:39:50PM +, Idan Arye via Digitalmars-d-learn wrote: [...] > I see... quite a shame there are no built-in data structures that > provide forever-valid references to their members. Arrays can be > reallocated, associative arrays can be rehased, and the stuff in > std.c

Re: Can pointers to values inside associative arrays become invalid?

2015-01-06 Thread Idan Arye via Digitalmars-d-learn
On Tuesday, 6 January 2015 at 16:30:14 UTC, H. S. Teoh via Digitalmars-d-learn wrote: On Tue, Jan 06, 2015 at 04:18:17PM +, Idan Arye via Digitalmars-d-learn wrote: I have an associative array, and I use the `in` operator to get a reference to a value inside it and store it in a pointer:

Re: How to prevent sensitive information is displayed when the extension 'exe' is modified to 'txt' on windows?

2015-01-06 Thread Adam D. Ruppe via Digitalmars-d-learn
On Tuesday, 6 January 2015 at 17:15:28 UTC, FrankLike wrote: How to prevent sensitive information is displayed when the extension 'exe' is modified to 'txt' on windows? If the data is in the program, it is visible to anyone you give the program to. Alternatives would be asking the user for s

How to prevent sensitive information is displayed when the extension 'exe' is modified to 'txt' on windows?

2015-01-06 Thread FrankLike via Digitalmars-d-learn
How to prevent sensitive information is displayed when the extension 'exe' is modified to 'txt' on windows? If you build a exe ,such as which can get Data from DataBase,when you modify the exe's extension to 'txt', and you open it by notepad.exe (on windows),you will find the info,it's import

Re: Can pointers to values inside associative arrays become invalid?

2015-01-06 Thread H. S. Teoh via Digitalmars-d-learn
On Tue, Jan 06, 2015 at 04:18:17PM +, Idan Arye via Digitalmars-d-learn wrote: > I have an associative array, and I use the `in` operator to get a > reference to a value inside it and store it in a pointer: > > int[string] aa; > aa["myKey"] = 42; > int* myPointer = "myKey" in aa;

Can pointers to values inside associative arrays become invalid?

2015-01-06 Thread Idan Arye via Digitalmars-d-learn
I have an associative array, and I use the `in` operator to get a reference to a value inside it and store it in a pointer: int[string] aa; aa["myKey"] = 42; int* myPointer = "myKey" in aa; Is it possible that due to rehashing or something D will decide to move the associative arra

Re: Any chance of a linux dtoh?

2015-01-06 Thread Laeeth Isharc via Digitalmars-d-learn
On Tuesday, 6 January 2015 at 14:25:19 UTC, Dicebot wrote: On Tuesday, 6 January 2015 at 14:14:28 UTC, Laeeth Isharc wrote: On Tuesday, 6 January 2015 at 14:11:19 UTC, Dicebot wrote: dstep is your only realistic chance currently. htod is completely unmaintained, even on Windows. Please report a

tango linking problem

2015-01-06 Thread Laeeth Isharc via Digitalmars-d-learn
when trying to build dstep. any thoughts? (since I thought it may be a problem on my machine rather than something dstep specific). Fedora 21 64 bit, release dmd. Target tango 1.0.0+2.066 is up to date. Use --force to rebuild. Target mambo 0.0.3 is up to date. Use --force to rebuild. Target

Re: Any chance of a linux dtoh?

2015-01-06 Thread Dicebot via Digitalmars-d-learn
On Tuesday, 6 January 2015 at 14:14:28 UTC, Laeeth Isharc wrote: On Tuesday, 6 January 2015 at 14:11:19 UTC, Dicebot wrote: dstep is your only realistic chance currently. htod is completely unmaintained, even on Windows. Please report any issues found with it in relevant issue tracker. I got

Re: Any chance of a linux dtoh?

2015-01-06 Thread Dicebot via Digitalmars-d-learn
On Tuesday, 6 January 2015 at 14:22:54 UTC, ketmar via Digitalmars-d-learn wrote: On Tue, 06 Jan 2015 14:08:30 + Laeeth Isharc via Digitalmars-d-learn wrote: I realize Walter has far better things to work on, but value of having a translation tool is considerable, since it opens up easy a

Re: Any chance of a linux dtoh?

2015-01-06 Thread ketmar via Digitalmars-d-learn
On Tue, 06 Jan 2015 14:08:30 + Laeeth Isharc via Digitalmars-d-learn wrote: > I realize Walter has far better things to work on, but value of > having a translation tool is considerable, since it opens up easy > access to an enormous range of libraries. It is not much work to > do the tra

Re: Any chance of a linux dtoh?

2015-01-06 Thread Laeeth Isharc via Digitalmars-d-learn
On Tuesday, 6 January 2015 at 14:11:19 UTC, Dicebot wrote: dstep is your only realistic chance currently. htod is completely unmaintained, even on Windows. Please report any issues found with it in relevant issue tracker. I got it the wrong way around - yes, I meant htod. I have reported the

Re: Any chance of a linux dtoh?

2015-01-06 Thread Dicebot via Digitalmars-d-learn
dstep is your only realistic chance currently. htod is completely unmaintained, even on Windows. Please report any issues found with it in relevant issue tracker.

Any chance of a linux dtoh?

2015-01-06 Thread Laeeth Isharc via Digitalmars-d-learn
I realize Walter has far better things to work on, but value of having a translation tool is considerable, since it opens up easy access to an enormous range of libraries. It is not much work to do the translation oneself, but in the world as it is small frictions cumulatively have large conse