Re: Parse File at compile time, but not embedded

2016-06-14 Thread cym13 via Digitalmars-d-learn
On Tuesday, 7 June 2016 at 04:17:05 UTC, Pie? wrote: Ok, I will assume it will be able to be removed for release. It is an easy check(just search if binary contains file info). I'm sure an easy fix could be to write 0's over the data in the binary if necessary. Binaries aren't magical

Re: Parse File at compile time, but not embedded

2016-06-13 Thread ketmar via Digitalmars-d-learn
On Sunday, 12 June 2016 at 01:39:11 UTC, Joerg Joergonson wrote: This doesn't seem to be the case though in more complex examples ;/ it is. My code is almost identical do what you have written your code is *completely* different. that's why there are no traces of CTFE values in my sample.

Re: Parse File at compile time, but not embedded

2016-06-11 Thread Joerg Joergonson via Digitalmars-d-learn
On Friday, 10 June 2016 at 07:03:21 UTC, ketmar wrote: On Thursday, 9 June 2016 at 22:02:44 UTC, Joerg Joergonson wrote: Lol, who says you have access to my software? You know, the problem with assumptions is that they generally make no sense when you actually think about them. oh, yeah. it

Re: Parse File at compile time, but not embedded

2016-06-11 Thread Joerg Joergonson via Digitalmars-d-learn
On Saturday, 11 June 2016 at 13:03:47 UTC, ketmar wrote: On Friday, 10 June 2016 at 18:47:59 UTC, Joerg Joergonson wrote: In any case, this is impossible. D has no such concept as "compile-time-only" values, so any usage of a value risks embedding it into the binary. sure, it has. template

Re: Parse File at compile time, but not embedded

2016-06-11 Thread ketmar via Digitalmars-d-learn
On Friday, 10 June 2016 at 18:47:59 UTC, Joerg Joergonson wrote: In any case, this is impossible. D has no such concept as "compile-time-only" values, so any usage of a value risks embedding it into the binary. sure, it has. template ParseData (string text) { private static enum Key =

Re: Parse File at compile time, but not embedded

2016-06-10 Thread Adrian Matoga via Digitalmars-d-learn
On Tuesday, 7 June 2016 at 22:09:58 UTC, Alex Parrill wrote: Not necessarily, You chased that rabbit quite far! The data your reading could contain sensitive information only used at compile time and not meant to embed. For example, the file could contain login and password to an SQL database

Re: Parse File at compile time, but not embedded

2016-06-10 Thread Joerg Joergonson via Digitalmars-d-learn
On Friday, 10 June 2016 at 12:48:43 UTC, Alex Parrill wrote: On Thursday, 9 June 2016 at 22:02:44 UTC, Joerg Joergonson wrote: On Tuesday, 7 June 2016 at 22:09:58 UTC, Alex Parrill wrote: Accessing a SQL server at compile time seems like a huge abuse of CTFE (and I'm pretty sure it's

Re: Parse File at compile time, but not embedded

2016-06-10 Thread Alex Parrill via Digitalmars-d-learn
On Thursday, 9 June 2016 at 22:02:44 UTC, Joerg Joergonson wrote: On Tuesday, 7 June 2016 at 22:09:58 UTC, Alex Parrill wrote: Accessing a SQL server at compile time seems like a huge abuse of CTFE (and I'm pretty sure it's impossible at the moment). Why do I need to install and set up a MySQL

Re: Parse File at compile time, but not embedded

2016-06-10 Thread ketmar via Digitalmars-d-learn
On Thursday, 9 June 2016 at 22:02:44 UTC, Joerg Joergonson wrote: Lol, who says you have access to my software? You know, the problem with assumptions is that they generally make no sense when you actually think about them. oh, yeah. it suddenly reminds me about some obscure thing. other

Re: Parse File at compile time, but not embedded

2016-06-09 Thread Joerg Joergonson via Digitalmars-d-learn
On Tuesday, 7 June 2016 at 22:09:58 UTC, Alex Parrill wrote: On Monday, 6 June 2016 at 21:57:20 UTC, Pie? wrote: On Monday, 6 June 2016 at 21:31:32 UTC, Alex Parrill wrote: [...] Not necessarily, You chased that rabbit quite far! The data your reading could contain sensitive information

Re: Parse File at compile time, but not embedded

2016-06-09 Thread cy via Digitalmars-d-learn
On Tuesday, 7 June 2016 at 22:09:58 UTC, Alex Parrill wrote: Accessing a SQL server at compile time seems like a huge abuse of CTFE (and I'm pretty sure it's impossible at the moment). Why do I need to install and set up a MySQL database in order to build your software? Presumably you

Re: Parse File at compile time, but not embedded

2016-06-07 Thread Alex Parrill via Digitalmars-d-learn
On Monday, 6 June 2016 at 21:57:20 UTC, Pie? wrote: On Monday, 6 June 2016 at 21:31:32 UTC, Alex Parrill wrote: But reading sensitive data at compile-time strikes me as dangerous, depending on your use case. If you are reading sensitive information at compile time, you are presumably going to

Re: Parse File at compile time, but not embedded

2016-06-06 Thread Pie? via Digitalmars-d-learn
If I use an enum dmd DOES remove it in release build. But I'm not sure for the general case yet.

Re: Parse File at compile time, but not embedded

2016-06-06 Thread Pie? via Digitalmars-d-learn
On Tuesday, 7 June 2016 at 02:04:41 UTC, Mithun Hunsur wrote: On Monday, 6 June 2016 at 21:57:20 UTC, Pie? wrote: On Monday, 6 June 2016 at 21:31:32 UTC, Alex Parrill wrote: [...] This doesn't seem to be the case. In a release build, even though I never "use" the string, it is embedded. I

Re: Parse File at compile time, but not embedded

2016-06-06 Thread Mithun Hunsur via Digitalmars-d-learn
On Monday, 6 June 2016 at 21:57:20 UTC, Pie? wrote: On Monday, 6 June 2016 at 21:31:32 UTC, Alex Parrill wrote: On Monday, 6 June 2016 at 17:31:52 UTC, Pie? wrote: Is it possible to parse a file at compile time without embedding it into the binary? I have a sort of "configuration" file that

Re: Parse File at compile time, but not embedded

2016-06-06 Thread Pie? via Digitalmars-d-learn
On Monday, 6 June 2016 at 21:31:32 UTC, Alex Parrill wrote: On Monday, 6 June 2016 at 17:31:52 UTC, Pie? wrote: Is it possible to parse a file at compile time without embedding it into the binary? I have a sort of "configuration" file that defines how to create some objects. I'd like to be

Re: Parse File at compile time, but not embedded

2016-06-06 Thread Alex Parrill via Digitalmars-d-learn
On Monday, 6 June 2016 at 17:31:52 UTC, Pie? wrote: Is it possible to parse a file at compile time without embedding it into the binary? I have a sort of "configuration" file that defines how to create some objects. I'd like to be able to read how to create them but not have that config file

Parse File at compile time, but not embedded

2016-06-06 Thread Pie? via Digitalmars-d-learn
Is it possible to parse a file at compile time without embedding it into the binary? I have a sort of "configuration" file that defines how to create some objects. I'd like to be able to read how to create them but not have that config file stick around in the binary. e.g., (simple