Re: D <-> C++ exceptions

2016-05-21 Thread Manu via Digitalmars-d
On 22 May 2016 at 11:35, Walter Bright via Digitalmars-d wrote: > On 5/21/2016 5:36 PM, Manu via Digitalmars-d wrote: >> >> Where are we with exceptions? >> I am now working against a C++ codebase that uses exceptions, on both >> linux and windows. >> Is it still only

Re: Need a Faster Compressor

2016-05-21 Thread Lionello Lunesu via Digitalmars-d
On 22/5/2016 05:51, Stefan Koch wrote: On Saturday, 21 May 2016 at 21:12:15 UTC, Walter Bright wrote: The current one is effective, but slow: https://github.com/dlang/dmd/blob/master/src/backend/compress.c Anyone want to make a stab at making it faster? Changing the format is fair game, as

Re: Need a Faster Compressor

2016-05-21 Thread Era Scarecrow via Digitalmars-d
On Sunday, 22 May 2016 at 01:46:23 UTC, Era Scarecrow wrote: I know, if it doesn't fit in 64k then you can't rely on the cache... Finished. It's blazing fast and even compresses in my test example as good or better than gzip/zlib (although maybe that's because it's headerless). Now I

Generation of AST for semantic rule checking

2016-05-21 Thread Chris Katko via Digitalmars-d-learn
I have an idea for something. I know I can't be the only one to think this way but I can't find very much information on it. Basically, I want compile-time enforcement of semantic rules. For one example--I asked previously here--if it was possible to generate a compile-time warning or error

Re: D <-> C++ exceptions

2016-05-21 Thread Walter Bright via Digitalmars-d
On 5/21/2016 7:02 PM, Jack Stouffer wrote: If exceptions work now, what's blocking using the STL in D? Somebody doing the Phobos end.

Re: Is there a way to make a class variable visible but constant to outsiders, but changeable (mutable) to the class itself?

2016-05-21 Thread Mike Parker via Digitalmars-d-learn
On Sunday, 22 May 2016 at 03:06:44 UTC, Mike Parker wrote: As for 'const' and '@property', neither is strictly a requirement to implement this idiom. Adding const means that Oh, and the same holds true for final, of course. It's probably what you want most of the time, but it isn't strictly

Re: Is there a way to make a class variable visible but constant to outsiders, but changeable (mutable) to the class itself?

2016-05-21 Thread Mike Parker via Digitalmars-d-learn
On Saturday, 21 May 2016 at 19:17:00 UTC, dan wrote: Thanks Vit, Meta, and Yuxuan for your speedy help! So 3 pieces to put together, function, const, and @property (and i guess final for protection against subclasses). Minimally, there are two pieces to this: a private member variable and a

Re: Basic question about stderr

2016-05-21 Thread Mike Parker via Digitalmars-d-learn
On Saturday, 21 May 2016 at 22:11:30 UTC, chaseratx wrote: On Saturday, 21 May 2016 at 22:08:15 UTC, Era Scarecrow wrote: On Saturday, 21 May 2016 at 21:54:43 UTC, Era Scarecrow wrote: On Saturday, 21 May 2016 at 21:47:20 UTC, chaseratx wrote: Thanks Era, but I am not trying to fix the range

[Issue 15885] float serialized to JSON loses precision

2016-05-21 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15885 thomas.bock...@gmail.com changed: What|Removed |Added CC||thomas.bock...@gmail.com ---

[Issue 16055] New: double.stringof is not precise

2016-05-21 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16055 Issue ID: 16055 Summary: double.stringof is not precise Product: D Version: D2 Hardware: All OS: Linux Status: NEW Severity: normal Priority: P1

Re: D <-> C++ exceptions

2016-05-21 Thread Jack Stouffer via Digitalmars-d
On Sunday, 22 May 2016 at 01:35:19 UTC, Walter Bright wrote: On 5/21/2016 5:36 PM, Manu via Digitalmars-d wrote: Where are we with exceptions? I am now working against a C++ codebase that uses exceptions, on both linux and windows. Is it still only DWARF that works? That's right. If

Re: Need a Faster Compressor

2016-05-21 Thread Era Scarecrow via Digitalmars-d
On Sunday, 22 May 2016 at 01:36:39 UTC, Walter Bright wrote: On 5/21/2016 5:52 PM, Era Scarecrow wrote: I'm going to try for a lookback and scan which uses quite a bit of memory. Just a note: large lookup tables can have cold cache performance problems. I know, if it doesn't fit in 64k

Re: Is there a 128-bit integer in D?

2016-05-21 Thread Saurabh Das via Digitalmars-d-learn
On Saturday, 21 May 2016 at 21:51:34 UTC, Jonathan M Davis wrote: On Saturday, May 21, 2016 09:43:38 Saurabh Das via Digitalmars-d-learn wrote: I see that 'cent' and 'ucent' are reserved for future use but not yet implemented. Does anyone have a working implementation of these types? The

Re: Need a Faster Compressor

2016-05-21 Thread Walter Bright via Digitalmars-d
On 5/21/2016 5:52 PM, Era Scarecrow wrote: I'm going to try for a lookback and scan which uses quite a bit of memory. On the other hand you can reuse the memory over and over again, so that isn't an issue. Although it will take up a Meg in memory. Also written entirely in D, so... I think

Re: D <-> C++ exceptions

2016-05-21 Thread Walter Bright via Digitalmars-d
On 5/21/2016 5:36 PM, Manu via Digitalmars-d wrote: Where are we with exceptions? I am now working against a C++ codebase that uses exceptions, on both linux and windows. Is it still only DWARF that works? That's right.

Re: Need a Faster Compressor

2016-05-21 Thread Era Scarecrow via Digitalmars-d
On Saturday, 21 May 2016 at 22:01:40 UTC, Walter Bright wrote: Give it a try, see if it pans out. Other possibilities are the lookback dictionary is fixed at 1023 characters. Experimenting and benchmarking can indicate if it should be more or less. Perhaps 512 will yield just as good

D <-> C++ exceptions

2016-05-21 Thread Manu via Digitalmars-d
Where are we with exceptions? I am now working against a C++ codebase that uses exceptions, on both linux and windows. Is it still only DWARF that works?

Re: Identifier-name compression.

2016-05-21 Thread Stefan Koch via Digitalmars-d
On Saturday, 21 May 2016 at 23:52:59 UTC, Walter Bright wrote: On 5/21/2016 4:45 PM, Stefan Koch wrote: On Saturday, 21 May 2016 at 23:43:48 UTC, Walter Bright wrote: On 5/21/2016 4:30 PM, Stefan Koch wrote: Of course the table would have to build by the compiler and inserted as data into

Re: Identifier-name compression.

2016-05-21 Thread Walter Bright via Digitalmars-d
On 5/21/2016 4:45 PM, Stefan Koch wrote: On Saturday, 21 May 2016 at 23:43:48 UTC, Walter Bright wrote: On 5/21/2016 4:30 PM, Stefan Koch wrote: Of course the table would have to build by the compiler and inserted as data into the object-file. You'd have to build your own linker, too. Not

Re: Identifier-name compression.

2016-05-21 Thread Stefan Koch via Digitalmars-d
On Saturday, 21 May 2016 at 23:43:48 UTC, Walter Bright wrote: On 5/21/2016 4:30 PM, Stefan Koch wrote: Of course the table would have to build by the compiler and inserted as data into the object-file. You'd have to build your own linker, too. Not if dmd is used to build the executable.

Re: Identifier-name compression.

2016-05-21 Thread Walter Bright via Digitalmars-d
On 5/21/2016 4:30 PM, Stefan Koch wrote: Of course the table would have to build by the compiler and inserted as data into the object-file. You'd have to build your own linker, too.

Re: OneDrive Client written in D

2016-05-21 Thread frieder via Digitalmars-d-announce
On Wednesday, 23 September 2015 at 04:30:23 UTC, Rikki Cattermole wrote: On 23/09/15 8:43 AM, skilion wrote: I've been waiting for a good sync client for OneDrive (15 GB for free!) on Linux, but Microsoft seems to have other plans... So I've decided to write my own, using D. Take a look:

Re: Identifier-name compression.

2016-05-21 Thread Stefan Koch via Digitalmars-d
On Saturday, 21 May 2016 at 23:20:53 UTC, Walter Bright wrote: On 5/21/2016 4:02 PM, Stefan Koch wrote: and at link time the id-to-identifier translation-table would be consulted ? There's no such table. Of course the table would have to build by the compiler and inserted as data into

Re: Identifier-name compression.

2016-05-21 Thread Stefan Koch via Digitalmars-d
On Saturday, 21 May 2016 at 23:22:22 UTC, Walter Bright wrote: On 5/21/2016 4:08 PM, Stefan Koch wrote: A symbol can be uniquely identified with the module it is defined in and a numerical id. I've used such for temporaries, but they caused problems and people complained. I see. But

Re: Identifier-name compression.

2016-05-21 Thread Walter Bright via Digitalmars-d
On 5/21/2016 4:08 PM, Stefan Koch wrote: A symbol can be uniquely identified with the module it is defined in and a numerical id. I've used such for temporaries, but they caused problems and people complained.

Re: Identifier-name compression.

2016-05-21 Thread Walter Bright via Digitalmars-d
On 5/21/2016 4:02 PM, Stefan Koch wrote: On Saturday, 21 May 2016 at 22:59:48 UTC, Walter Bright wrote: On 5/21/2016 3:50 PM, Stefan Koch wrote: [...] It won't be reproducible from run to run, and worse, if you use separate compilation, duplicates are inevitable. please elaborate why

Re: Division - precision

2016-05-21 Thread Rygel via Digitalmars-d-learn
Ah, ok, got it. thx you all.

Re: binary expression...

2016-05-21 Thread Ali Çehreli via Digitalmars-d-learn
On 05/21/2016 12:56 PM, captain_fid wrote: > On Saturday, 21 May 2016 at 18:33:53 UTC, Anonymouse wrote: >> On Saturday, 21 May 2016 at 18:10:55 UTC, captain_fid wrote: >>> Please forgive if asked before. My google skills seemed to fail me >>> and didn't see any result from search. >>> >>> My

Re: Identifier-name compression.

2016-05-21 Thread Stefan Koch via Digitalmars-d
On Saturday, 21 May 2016 at 22:59:48 UTC, Walter Bright wrote: On 5/21/2016 3:50 PM, Stefan Koch wrote: [...] It won't be reproducible from run to run, and worse, if you use separate compilation, duplicates are inevitable. There will not be duplicates since you would not compile the same

Re: Identifier-name compression.

2016-05-21 Thread Stefan Koch via Digitalmars-d
On Saturday, 21 May 2016 at 22:59:48 UTC, Walter Bright wrote: On 5/21/2016 3:50 PM, Stefan Koch wrote: [...] It won't be reproducible from run to run, and worse, if you use separate compilation, duplicates are inevitable. please elaborate why wouldn't it be reproduceble from run to run ?

Re: Identifier-name compression.

2016-05-21 Thread Walter Bright via Digitalmars-d
On 5/21/2016 3:50 PM, Stefan Koch wrote: [...] It won't be reproducible from run to run, and worse, if you use separate compilation, duplicates are inevitable.

Re: Always false float comparisons

2016-05-21 Thread Tobias M via Digitalmars-d
On Saturday, 21 May 2016 at 21:56:02 UTC, Walter Bright wrote: On 5/21/2016 11:36 AM, Tobias M wrote: Sorry but this is a misrepresentation. I never claimed that the x87 doesn't conform to the IEEE standard. My point was directed to more than just you. Sorry I didn't make that clear. The

Re: Need a Faster Compressor

2016-05-21 Thread Walter Bright via Digitalmars-d
On 5/21/2016 3:41 PM, Guillaume Boucher wrote: Sorry if I didn't memorize everything in this forum from the last 20 years, can you give a link to some reasoning? DMC++ matches the Microsoft name mangling scheme, which includes such compression. It proved hopelessly inadequate, which is why I

Re: Identifier-name compression.

2016-05-21 Thread Stefan Koch via Digitalmars-d
On Saturday, 21 May 2016 at 22:40:44 UTC, Stefan Koch wrote: Hi, I just had a nice idea. However due to my lack of obj-file-format knowlege I don't know how feasible it is. As far as I can see Identifiers are already in a hashed format while inside the symbol-table of the compiler. The Idea

Re: Need a Faster Compressor

2016-05-21 Thread Stefan Koch via Digitalmars-d
On Saturday, 21 May 2016 at 22:41:49 UTC, Guillaume Boucher wrote: It's almost as if using information about the actual data leads to a better compression scheme. Exactly. It always is. Since you know where to look for redundancy instead of blindly comparing bytes.

Re: Need a Faster Compressor

2016-05-21 Thread Guillaume Boucher via Digitalmars-d
On Saturday, 21 May 2016 at 22:07:27 UTC, Walter Bright wrote: As mentioned elsewhere, the C++ mangling scheme has a primitive and ineffective LZ77 scheme built in, so I wouldn't waste time on that. Sorry if I didn't memorize everything in this forum from the last 20 years, can you give a

Re: Division - precision

2016-05-21 Thread Ali Çehreli via Digitalmars-d-learn
On 05/21/2016 02:45 PM, Rygel wrote: > Hi there. I'm a beginners, so my questions could be silly. > > double x1 = 7.0; > double x2 = 3.0; > writeln(x1 / x2); > > from this code i get: > > 2.3 > > this is ok but how can i get more digits? For example: > > 2.3. > >

Identifier-name compression.

2016-05-21 Thread Stefan Koch via Digitalmars-d
Hi, I just had a nice idea. However due to my lack of obj-file-format knowlege I don't know how feasible it is. As far as I can see Identifiers are already in a hashed format while inside the symbol-table of the compiler. The Idea would be to safe a hash-table from id to clear-text-name or

Re: Division - precision

2016-05-21 Thread Era Scarecrow via Digitalmars-d-learn
On Saturday, 21 May 2016 at 21:45:19 UTC, Rygel wrote: Hi there. I'm a beginners, so my questions could be silly. double x1 = 7.0; double x2 = 3.0; writeln(x1 / x2); this is ok but how can i get more digits? For example: 2.3. I'm not sure how to globally

[Issue 16054] can break immutable with std.typecons.Rebindable

2016-05-21 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16054 ag0ae...@gmail.com changed: What|Removed |Added Keywords||pull

Re: DMD producing huge binaries

2016-05-21 Thread Anon via Digitalmars-d
On Saturday, 21 May 2016 at 20:50:56 UTC, Walter Bright wrote: On 5/21/2016 1:49 PM, Walter Bright wrote: We already have a compressor in the compiler source for compressing names: https://github.com/dlang/dmd/blob/master/src/backend/compress.c A faster one would certainly be nice.

Re: Need a Faster Compressor

2016-05-21 Thread Walter Bright via Digitalmars-d
On 5/21/2016 3:13 PM, Stefan Koch wrote: Could you post a link to code you use for benchmarking ? In the comments: https://github.com/dlang/dmd/pull/5793

Re: Basic question about stderr

2016-05-21 Thread chaseratx via Digitalmars-d-learn
On Saturday, 21 May 2016 at 22:08:15 UTC, Era Scarecrow wrote: On Saturday, 21 May 2016 at 21:54:43 UTC, Era Scarecrow wrote: On Saturday, 21 May 2016 at 21:47:20 UTC, chaseratx wrote: Thanks Era, but I am not trying to fix the range error. That was put there intentionally to create stderr

Re: Basic question about stderr

2016-05-21 Thread chaseratx via Digitalmars-d-learn
On Saturday, 21 May 2016 at 21:54:43 UTC, Era Scarecrow wrote: On Saturday, 21 May 2016 at 21:47:20 UTC, chaseratx wrote: Thanks Era, but I am not trying to fix the range error. That was put there intentionally to create stderr output. I'm trying to figure out how to get ALL stderr output

Re: Need a Faster Compressor

2016-05-21 Thread Stefan Koch via Digitalmars-d
On Saturday, 21 May 2016 at 21:12:15 UTC, Walter Bright wrote: The current one is effective, but slow: https://github.com/dlang/dmd/blob/master/src/backend/compress.c Anyone want to make a stab at making it faster? Changing the format is fair game, as well as down and dirty assembler if

Re: Basic question about stderr

2016-05-21 Thread Era Scarecrow via Digitalmars-d-learn
On Saturday, 21 May 2016 at 21:54:43 UTC, Era Scarecrow wrote: On Saturday, 21 May 2016 at 21:47:20 UTC, chaseratx wrote: Thanks Era, but I am not trying to fix the range error. That was put there intentionally to create stderr output. I wonder, this sounds like a TLS (Thread Local Storage)

Re: Need a Faster Compressor

2016-05-21 Thread Walter Bright via Digitalmars-d
On 5/21/2016 2:37 PM, Timon Gehr wrote: Why is longest_match Ω(nm) instead of O(n+m) (e.g. KMP)? I don't understand the terms you use, but as to the "why" it is based on what I knew about LZ77 compression. I don't pretend to be an expert on compression, and this is what I churned out. As

Re: Always false float comparisons

2016-05-21 Thread Timon Gehr via Digitalmars-d
On 21.05.2016 20:14, Walter Bright wrote: On 5/21/2016 10:03 AM, Timon Gehr wrote: Check out section 5 for some convincing examples showing why the x87 is horrible. The polio vaccine winds up giving a handful of people polio, too. ... People don't get vaccinated without consent. It's good

Re: mutable keyword

2016-05-21 Thread ag0aep6g via Digitalmars-d-learn
On 05/21/2016 07:15 PM, Jack Applegame wrote: Really? Mutating immutable is UB too, but look at std.typecons.Rebindable. Rebindable uses a union of a mutable and an immutable variant of the type. No access to the mutable union member is provided, and it's never dereferenced by Rebindable.

Re: Need a Faster Compressor

2016-05-21 Thread Walter Bright via Digitalmars-d
On 5/21/2016 2:27 PM, Era Scarecrow wrote: I assume this is related to compressing symbols thread? Yes. I mentioned possibly considering the LZO library. Give it a try, see if it pans out. Other possibilities are the lookback dictionary is fixed at 1023 characters. Experimenting and

[Issue 16054] New: can break immutable with std.typecons.Rebindable

2016-05-21 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16054 Issue ID: 16054 Summary: can break immutable with std.typecons.Rebindable Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: normal

Re: Always false float comparisons

2016-05-21 Thread Walter Bright via Digitalmars-d
On 5/21/2016 11:36 AM, Tobias M wrote: Sorry but this is a misrepresentation. I never claimed that the x87 doesn't conform to the IEEE standard. My point was directed to more than just you. Sorry I didn't make that clear. The point is, that is IS possible to provide fairly reasonable and

Re: Basic question about stderr

2016-05-21 Thread Era Scarecrow via Digitalmars-d-learn
On Saturday, 21 May 2016 at 21:47:20 UTC, chaseratx wrote: Thanks Era, but I am not trying to fix the range error. That was put there intentionally to create stderr output. I'm trying to figure out how to get ALL stderr output directed to a file the same as if I had used a "2>error.log"

Re: Need a Faster Compressor

2016-05-21 Thread Stefan Koch via Digitalmars-d
On Saturday, 21 May 2016 at 21:12:15 UTC, Walter Bright wrote: The current one is effective, but slow: https://github.com/dlang/dmd/blob/master/src/backend/compress.c Anyone want to make a stab at making it faster? Changing the format is fair game, as well as down and dirty assembler if

Re: Is there a 128-bit integer in D?

2016-05-21 Thread Jonathan M Davis via Digitalmars-d-learn
On Saturday, May 21, 2016 09:43:38 Saurabh Das via Digitalmars-d-learn wrote: > I see that 'cent' and 'ucent' are reserved for future use but not > yet implemented. Does anyone have a working implementation of > these types? The keywords are reserved for future use not in current use. So, no,

Re: Basic question about stderr

2016-05-21 Thread chaseratx via Digitalmars-d-learn
On Saturday, 21 May 2016 at 21:40:36 UTC, Era Scarecrow wrote: On Saturday, 21 May 2016 at 21:21:31 UTC, chaseratx wrote: I'm learning D and I have a basic question. I'm trying to write stderr to a file using open() (rather than shell piping/redirection). It works for stdout but doesn't

Division - precision

2016-05-21 Thread Rygel via Digitalmars-d-learn
Hi there. I'm a beginners, so my questions could be silly. double x1 = 7.0; double x2 = 3.0; writeln(x1 / x2); from this code i get: 2.3 this is ok but how can i get more digits? For example: 2.3. thx :-)

Re: mutable keyword

2016-05-21 Thread Jonathan M Davis via Digitalmars-d-learn
On Saturday, May 21, 2016 17:15:16 Jack Applegame via Digitalmars-d-learn wrote: > On Friday, 20 May 2016 at 20:46:18 UTC, Jonathan M Davis wrote: > > Casting away const and mutating is undefined behavior in D. No > > D program should ever do it. > > Really? Mutating immutable is UB too, but look

Re: Basic question about stderr

2016-05-21 Thread Era Scarecrow via Digitalmars-d-learn
On Saturday, 21 May 2016 at 21:21:31 UTC, chaseratx wrote: I'm learning D and I have a basic question. I'm trying to write stderr to a file using open() (rather than shell piping/redirection). It works for stdout but doesn't seem to work with stderr. http://pastebin.com/KgzR9wAF stdout is

Re: Need a Faster Compressor

2016-05-21 Thread Timon Gehr via Digitalmars-d
On 21.05.2016 23:37, Timon Gehr wrote: On 21.05.2016 23:12, Walter Bright wrote: The current one is effective, but slow: https://github.com/dlang/dmd/blob/master/src/backend/compress.c Anyone want to make a stab at making it faster? Changing the format is fair game, as well as down and

Re: Need a Faster Compressor

2016-05-21 Thread Timon Gehr via Digitalmars-d
On 21.05.2016 23:12, Walter Bright wrote: The current one is effective, but slow: https://github.com/dlang/dmd/blob/master/src/backend/compress.c Anyone want to make a stab at making it faster? Changing the format is fair game, as well as down and dirty assembler if that's what it takes.

Re: Need a Faster Compressor

2016-05-21 Thread Era Scarecrow via Digitalmars-d
On Saturday, 21 May 2016 at 21:12:15 UTC, Walter Bright wrote: So really, how good are you at fast code? I recall being able to get a marginal boost in speed by assigning the first 1-2 bytes in preassigned buckets (256 & 65536 respectively), so you have an immediate 1-2 byte matches

Re: Battle-plan for CTFE

2016-05-21 Thread Martin Nowak via Digitalmars-d-announce
On 05/21/2016 11:18 PM, Martin Nowak wrote: > The debugging metaphor would be comparing a program that only uses > pointer arithmetic against one that is memory safe, the former can > randomly write everywhere from anywhere, the latter could use the wrong > reference. It's also similar to

Re: Battle-plan for CTFE

2016-05-21 Thread Martin Nowak via Digitalmars-d-announce
On 05/18/2016 04:59 PM, Daniel Murphy wrote: > The bytecode generator and bytecode interpreter can be debugged (and > tested!) independently. So the total amount of code will increase but > the components themselves will be better isolated and easier to work with. It's simpler to debug an AST

Basic question about stderr

2016-05-21 Thread chaseratx via Digitalmars-d-learn
I'm learning D and I have a basic question. I'm trying to write stderr to a file using open() (rather than shell piping/redirection). It works for stdout but doesn't seem to work with stderr. http://pastebin.com/KgzR9wAF stdout is written to the file, but stderr is not and outputs to the

Re: Always false float comparisons

2016-05-21 Thread Fool via Digitalmars-d
Reasons have been alleged. What's your final decision?

Need a Faster Compressor

2016-05-21 Thread Walter Bright via Digitalmars-d
The current one is effective, but slow: https://github.com/dlang/dmd/blob/master/src/backend/compress.c Anyone want to make a stab at making it faster? Changing the format is fair game, as well as down and dirty assembler if that's what it takes. So really, how good are you at fast code?

Re: Battle-plan for CTFE

2016-05-21 Thread Martin Nowak via Digitalmars-d-announce
On 05/18/2016 07:50 PM, Stefan Koch wrote: > Indeed. > > I am currently designing an IR to feed into the CTFE Evaluator. > I am aware that this could potentially make it harder to get things > merged since DMD already has the glue-layer. As a compat layer between different interpreters or as a

Re: DMD producing huge binaries

2016-05-21 Thread Walter Bright via Digitalmars-d
On 5/21/2016 1:49 PM, Walter Bright wrote: We already have a compressor in the compiler source for compressing names: https://github.com/dlang/dmd/blob/master/src/backend/compress.c A faster one would certainly be nice. Anyone game? Note how well it does:

Re: DMD producing huge binaries

2016-05-21 Thread Walter Bright via Digitalmars-d
On 5/21/2016 1:09 PM, Era Scarecrow wrote: Depends on implementation and algorithm. However even the weakest compression settings can yield huge initial compression benefits. In normal text a reduction of 2:1 is expected, and will . The benefit being compression still contains all it's

Re: Small-Size-Optimized Array

2016-05-21 Thread Nordlöw via Digitalmars-d-learn
On Thursday, 19 May 2016 at 06:20:24 UTC, Nikolay wrote: You can look to my experement (see iarray.d): https://bitbucket.org/sibnick/inplacearray.git Thanks!

[Issue 15885] float serialized to JSON loses precision

2016-05-21 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15885 b2.t...@gmx.com changed: What|Removed |Added Status|NEW |ASSIGNED CC|

[Issue 15831] IFTI voldemort type exploding bloat

2016-05-21 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15831 Walter Bright changed: What|Removed |Added CC|

Re: Always false float comparisons

2016-05-21 Thread Timon Gehr via Digitalmars-d
On 21.05.2016 19:58, Walter Bright wrote: On 5/21/2016 2:26 AM, Tobias Müller wrote: On Friday, 20 May 2016 at 22:22:57 UTC, Walter Bright wrote: On 5/20/2016 5:36 AM, Tobias M wrote: Still an authority, though. If we're going to use the fallacy of appeal to authority, may I present Kahan

Re: DMD producing huge binaries

2016-05-21 Thread Era Scarecrow via Digitalmars-d
On Saturday, 21 May 2016 at 17:34:19 UTC, Kagamin wrote: Equivalent to not mangling return type at all. But this leaves you with 2^^n growth, still exponential. Also is there any evidence that compression is faster than hashing? Depends on implementation and algorithm. However even the

Re: binary expression...

2016-05-21 Thread captain_fid via Digitalmars-d-learn
On Saturday, 21 May 2016 at 18:33:53 UTC, Anonymouse wrote: On Saturday, 21 May 2016 at 18:10:55 UTC, captain_fid wrote: Please forgive if asked before. My google skills seemed to fail me and didn't see any result from search. My problem is simple (though not my understanding LOL). struct D

Re: DMD producing huge binaries

2016-05-21 Thread Guillaume Boucher via Digitalmars-d
On Saturday, 21 May 2016 at 18:25:46 UTC, Walter Bright wrote: On 5/20/2016 11:18 PM, poliklosio wrote: foo!(boo!(bar!(baz!(int))), #1, #2) Where #1 and #2 are special symbols that refer to stuff that was **already in the name**, particularly: #1: bar!(baz!(int)) #2: baz!(int) This is what

Re: Diamond - MVC / Template engine

2016-05-21 Thread Bauss via Digitalmars-d-announce
On Saturday, 21 May 2016 at 19:46:38 UTC, Vladimir Panteleev wrote: On Saturday, 21 May 2016 at 08:20:00 UTC, Bauss wrote: Just finished up the base for Diamond and its initiate state with Github and Dub, as well the first guide on using Diamond with vibe.d for websites. The name is taken :)

[Issue 16053] New: SysTime.fromIsoExtString don't work if nanoseconds are presented

2016-05-21 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16053 Issue ID: 16053 Summary: SysTime.fromIsoExtString don't work if nanoseconds are presented Product: D Version: D2 Hardware: x86_64 OS: Linux Status:

Re: DMD producing huge binaries

2016-05-21 Thread poliklosio via Digitalmars-d
On Saturday, 21 May 2016 at 18:25:46 UTC, Walter Bright wrote: On 5/20/2016 11:18 PM, poliklosio wrote: I have an Idea of reproducible, less-than-exponential time mangling, although I don't know how actionable. Leave mangling as is, but pretend that you are mangling something different, for

Re: Diamond - MVC / Template engine

2016-05-21 Thread Vladimir Panteleev via Digitalmars-d-announce
On Saturday, 21 May 2016 at 08:20:00 UTC, Bauss wrote: Just finished up the base for Diamond and its initiate state with Github and Dub, as well the first guide on using Diamond with vibe.d for websites. The name is taken :) https://github.com/CyberShadow/Diamond I don't mind though.

Re: Diamond - MVC / Template engine

2016-05-21 Thread Bauss via Digitalmars-d-announce
On Saturday, 21 May 2016 at 11:02:41 UTC, Bauss wrote: On Saturday, 21 May 2016 at 10:02:17 UTC, Chris wrote: On Saturday, 21 May 2016 at 08:20:00 UTC, Bauss wrote: [snip] Sounds interesting. Are you planning to add a tutorial / more examples? Typo on your Github page: "on every playform

Re: DMD producing huge binaries

2016-05-21 Thread poliklosio via Digitalmars-d
On Saturday, 21 May 2016 at 08:57:57 UTC, Johan Engelen wrote: On Saturday, 21 May 2016 at 06:18:05 UTC, poliklosio wrote: I have an Idea of reproducible, less-than-exponential time mangling, although I don't know how actionable. Leave mangling as is, but pretend that you are mangling

Re: Is there a way to make a class variable visible but constant to outsiders, but changeable (mutable) to the class itself?

2016-05-21 Thread dan via Digitalmars-d-learn
Thanks Vit, Meta, and Yuxuan for your speedy help! So 3 pieces to put together, function, const, and @property (and i guess final for protection against subclasses).

Re: DMD producing huge binaries

2016-05-21 Thread Kagamin via Digitalmars-d
On Saturday, 21 May 2016 at 18:18:21 UTC, Andrei Alexandrescu wrote: He said that that won't happen any longer, the growth was because of the return type. Is that correct? https://issues.dlang.org/show_bug.cgi?id=15831#c4 Looks like growth is due to the fact that the voldemort type is in the

Re: binary expression...

2016-05-21 Thread captain_fid via Digitalmars-d-learn
On Saturday, 21 May 2016 at 18:31:46 UTC, vit wrote: On Saturday, 21 May 2016 at 18:10:55 UTC, captain_fid wrote: Please forgive if asked before. My google skills seemed to fail me and didn't see any result from search. My problem is simple (though not my understanding LOL). struct D {

Re: Game Development Using D

2016-05-21 Thread Rishub Nagpal via Digitalmars-d-learn
On Saturday, 21 May 2016 at 15:53:18 UTC, David wrote: Hi, I want to try to create a game using D. I'm a complete newbie though (other than having C/C++ experience). Where would I start? Does D have an openGL binding? I am assuming I'll need to leverage a good amount C APIs? Any list of

Re: problems with Rebindable

2016-05-21 Thread Kagamin via Digitalmars-d-learn
On Saturday, 21 May 2016 at 10:42:13 UTC, chmike wrote: switch(x1) { case Infos.one: writeln("case Infos.one"); break; default: writeln("default"); break; } You can generate fairly unique ids and use them in switch statements like this: https://dpaste.dzfl.pl/873b5b4cf71e

Re: Game Development Using D

2016-05-21 Thread Rishub Nagpal via Digitalmars-d-learn
On Saturday, 21 May 2016 at 15:53:18 UTC, David wrote: Hi, I want to try to create a game using D. I'm a complete newbie though (other than having C/C++ experience). Where would I start? Does D have an openGL binding? I am assuming I'll need to leverage a good amount C APIs? Any list of

[Issue 15940] ImplicitConversionTargets and class alias in struct

2016-05-21 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15940 b2.t...@gmx.com changed: What|Removed |Added Summary|std.variant.Variant:|ImplicitConversionTargets

Re: Always false float comparisons

2016-05-21 Thread Tobias M via Digitalmars-d
On Saturday, 21 May 2016 at 17:58:49 UTC, Walter Bright wrote: On 5/21/2016 2:26 AM, Tobias Müller wrote: On Friday, 20 May 2016 at 22:22:57 UTC, Walter Bright wrote: On 5/20/2016 5:36 AM, Tobias M wrote: Still an authority, though. If we're going to use the fallacy of appeal to authority,

Re: problems with Rebindable

2016-05-21 Thread Kagamin via Digitalmars-d-learn
On Saturday, 21 May 2016 at 13:36:02 UTC, chmike wrote: static Info one() { static auto x = Info(new Obj("I'm one")); return x; } static Info two() { static auto x = Info(new Obj("I'm two")); return x; } FYI those are thread local

Re: binary expression...

2016-05-21 Thread Anonymouse via Digitalmars-d-learn
On Saturday, 21 May 2016 at 18:10:55 UTC, captain_fid wrote: Please forgive if asked before. My google skills seemed to fail me and didn't see any result from search. My problem is simple (though not my understanding LOL). struct D { int value; bool opEquals()(bool value) const {

Re: binary expression...

2016-05-21 Thread vit via Digitalmars-d-learn
On Saturday, 21 May 2016 at 18:10:55 UTC, captain_fid wrote: Please forgive if asked before. My google skills seemed to fail me and didn't see any result from search. My problem is simple (though not my understanding LOL). struct D { int value; bool opEquals()(bool value) const {

[Issue 15940] std.variant.Variant: compilation fails if a value is aliased struct

2016-05-21 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15940 b2.t...@gmx.com changed: What|Removed |Added Status|NEW |ASSIGNED CC|

Re: DMD producing huge binaries

2016-05-21 Thread Walter Bright via Digitalmars-d
On 5/20/2016 11:18 PM, poliklosio wrote: I have an Idea of reproducible, less-than-exponential time mangling, although I don't know how actionable. Leave mangling as is, but pretend that you are mangling something different, for example when the input is foo!(boo!(bar!(baz!(int))),

Re: Is there a way to make a class variable visible but constant to outsiders, but changeable (mutable) to the class itself?

2016-05-21 Thread vit via Digitalmars-d-learn
On Saturday, 21 May 2016 at 17:32:47 UTC, dan wrote: Is it possible to have a class which has a variable which can be seen from the outside, but which can only be modified from the inside? Something like: class C { int my_var = 3; // semi_const?? void do_something() { my_var = 4; } }

Re: Is there a way to make a class variable visible but constant to outsiders, but changeable (mutable) to the class itself?

2016-05-21 Thread Meta via Digitalmars-d-learn
On Saturday, 21 May 2016 at 17:32:47 UTC, dan wrote: Is it possible to have a class which has a variable which can be seen from the outside, but which can only be modified from the inside? Something like: class C { int my_var = 3; // semi_const?? void do_something() { my_var = 4; } }

Re: DMD producing huge binaries

2016-05-21 Thread Andrei Alexandrescu via Digitalmars-d
On 05/21/2016 01:34 PM, Kagamin wrote: But this leaves you with 2^^n growth, still exponential He said that that won't happen any longer, the growth was because of the return type. Is that correct? -- Andrei

binary expression...

2016-05-21 Thread captain_fid via Digitalmars-d-learn
Please forgive if asked before. My google skills seemed to fail me and didn't see any result from search. My problem is simple (though not my understanding LOL). struct D { int value; bool opEquals()(bool value) const { return (value == value); } } D aD; if (aD == 1) { // OK }

  1   2   >