True disposable objects (add "Finalized!" assertion)

2012-05-04 Thread Denis Shelomovskij
This idea is too obvious and I suppose I'm the only one not knowing it, but I have never seen it's implementation. Why? The idea: 1. `Object` class has hidden `isAlive` field which is true since construction and up to finalization. 2. Every method asserts that the object is alive first. 3. The

mixin templates and classes

2012-05-04 Thread Denis Shelomovskij
IMHO this should compile: --- mixin template T() { final void f() { } } class A { mixin T ta; } class B : A { mixin T tb; } --- these asserts should pass: --- mixin template T(string s) { string f() { return s; } } class A { mixin T!"T1" ta1; mixin T!"T2" ta2; mixin T!"T"; }

Re: Escaping control in formatting

2012-04-24 Thread Denis Shelomovskij
On Tuesday, 24 April 2012 at 04:55:34 UTC, kenji hara wrote: My concern is that the proposal is much complicated and less useful for general use cases. You can emulate such formatting like follows: IMHO addition of %!+s and %!-s alone and removing %c's magic will only simplify formatting for

Re: Escaping control in formatting

2012-04-23 Thread Denis Shelomovskij
23.04.2012 21:49, Denis Shelomovskij написал: 23.04.2012 21:15, kenji hara написал: 2012年4月24日1:14 Denis Shelomovskij: 23.04.2012 18:54, kenji hara написал: Please give us use cases. I cannot imagine why you want to change/remove quotations but keep escaped contents. Sorry, I should

Re: Escaping control in formatting

2012-04-23 Thread Denis Shelomovskij
23.04.2012 21:15, kenji hara написал: 2012年4月24日1:14 Denis Shelomovskij: 23.04.2012 18:54, kenji hara написал: Please give us use cases. I cannot imagine why you want to change/remove quotations but keep escaped contents. Sorry, I should mention that !' and !" are optional

Re: Escaping control in formatting

2012-04-23 Thread Denis Shelomovskij
23.04.2012 18:54, kenji hara написал: Please give us use cases. I cannot imagine why you want to change/remove quotations but keep escaped contents. Sorry, I should mention that !' and !" are optional and aren't commonly used, and all !?* are very optional and are here just for completeness (IM

Escaping control in formatting

2012-04-23 Thread Denis Shelomovskij
I've never used new excellent range formatting syntax by Kenji Hara until now. And I've met with difficulties, because "%(%(%c%), %)" is the most common format for string array for me and it neither obvious nor elegant. It occurs that "%c" disables character escaping. What the hell? Why? Not ob

Re: Random D geekout

2012-04-19 Thread Denis Shelomovskij
20.04.2012 8:06, H. S. Teoh написал: I'm writing some code that does some very simplistic parsing, and I'm just totally geeking out on how awesome D is for writing such code: import std.conv; import std.regex; import std.stdio; struct Data { strin

Let's give a honor to dead giants!

2012-04-19 Thread Denis Shelomovskij
D already has a history with heroes and great projects... Unfortunately, lots of dead great projects. IMHO, a monument to them should be set up. Reasons: 1. If a project failed because of some design issues (e.g. Descent) new developers should be informed about a danger of this approach and wa

Re: An idea to improve eponymous templates

2012-04-11 Thread Denis Shelomovskij
12.04.2012 6:21, Reid Levenick написал: Firstly, I had no idea where suggestions should go, and I saw a few others here and thus here I am. I was writing some code that depended heavily on my own eponymous templates, and decided to change the names of some of them to make them more self-document

Re: std.benchmark ready for review. Manager sought after

2012-04-10 Thread Denis Shelomovskij
09.04.2012 17:26, Andrei Alexandrescu пишет: On 4/9/12 2:06 AM, Denis Shelomovskij wrote: Why will recording the average produce so much noise? As I explained, the average takes noise and outliers (some very large, e.g. milliseconds in a benchmark that takes microseconds) into account. The

Re: std.benchmark ready for review. Manager sought after

2012-04-09 Thread Denis Shelomovskij
08.04.2012 21:31, Andrei Alexandrescu пишет: On 4/8/12 11:59 AM, Denis Shelomovskij wrote: Very good but minimum isn't a best guess. Personally I (and there will be a lot of such maniacs I suppose) will think that this (minimum) time can be significantly smaller than average time.

Re: std.benchmark ready for review. Manager sought after

2012-04-08 Thread Denis Shelomovskij
Very good but minimum isn't a best guess. Personally I (and there will be a lot of such maniacs I suppose) will think that this (minimum) time can be significantly smaller than average time. So a parameter (probably with a default value) should be added. Something like enum of flags telling wh

Re: D projects list

2012-04-06 Thread Denis Shelomovskij
06.04.2012 12:49, Gour пишет: On Fri, 06 Apr 2012 12:34:09 +0400 Denis Shelomovskij wrote: Because I believes HTML should die with all present web browsers and JS. And XML because of its frighten overuse. And all slow and buggy web apps. And adobe Flash of course should also die

Re: D projects list

2012-04-06 Thread Denis Shelomovskij
06.04.2012 1:04, Nick Sabalausky пишет: "Denis Shelomovskij" wrote in message news:jlkubn$k4f$1...@digitalmars.com... I think it will be great to have a single place for all D related projects so a developer can easily find what is already done (for an example of "I didn&

D projects list

2012-04-05 Thread Denis Shelomovskij
I think it will be great to have a single place for all D related projects so a developer can easily find what is already done (for an example of "I didn't now about you project" see, e.g. "Modern COM Programming in D" thread), what is *planned* and what great projects have already failed (and,

Re: [Feature Request] Forwardable as Ruby does

2012-03-05 Thread Denis Shelomovskij
05.03.2012 22:06, bioinfornatics пишет: opDispaytch is not really easy to use for this. my first code do this in 1 line and it is easy to understand hat it do. In 1 line i forward 3 method to a member. This save time, code and bug. So what's the problem with opDispatch? By the way, don't do

Re: GC-safe memory copying for D

2012-03-02 Thread Denis Shelomovskij
02.03.2012 19:29, Alex Rønne Petersen пишет: On 02-03-2012 16:25, Robert Jacques wrote: On Fri, 02 Mar 2012 08:13:00 -0600, Denis Shelomovskij wrote: Even `memcpy` is claimed dangerous at http://dlang.org/garbage.html (because of possibility of moving GC, I suppose) but it just creates false

Terribly slow rawWrite is a major problem

2012-03-02 Thread Denis Shelomovskij
Do you remember this: http://d.puremagic.com/issues/show_bug.cgi?id=7033 It should be solved and I'm volunteer to do it. But I need to know: 1. `_setmode` is only defined in version(DIGITAL_MARS_STDIO) which is defined in version(DigitalMars)version(Windows) but used in version(Windows) in raw

GC-safe memory copying for D

2012-03-02 Thread Denis Shelomovskij
Even `memcpy` is claimed dangerous at http://dlang.org/garbage.html (because of possibility of moving GC, I suppose) but it just creates false positives for GC. `memmove` can even temporary destroy pointers in some overlapping cases like Google answer on "Lucky" `memmove source code` request do

Re: [your code here]

2012-02-18 Thread Denis Shelomovskij
18.02.2012 0:33, Joshua Niehus пишет: Not as fancy as the other submits, but it might be worthy of the front page: import std.stdio, std.traits; void main(string[] args) { auto foo(T)(T n) { return delegate(T i) { static if (isSomeString!(T)) auto m = mix

Re: Higher abstraction level for calling C functions

2012-01-30 Thread Denis Shelomovskij
30.01.2012 8:59, Kagamin пишет: static assert(__traits(compiles, HANDLE.init is null)); hmm... What declaration of HANDLE do you use? Wrapper knows nothing about non-standard types, but in `CreateFileW` the last argument is `__(in?) HANDLE hTemplateFile`, so it is an optional parameter (can

Re: Higher abstraction level for calling C functions

2012-01-30 Thread Denis Shelomovskij
30.01.2012 4:42, Timon Gehr пишет: I suppose the unary + before the second 'num' is required to disambiguate from which array length 'num' will be deduced? Shouldn't this restriction be lifted? (Obviously, if the lengths have to match, both are fine.) Yes, this restriction isn't necessary. I ju

Re: indent style for D

2012-01-30 Thread Denis Shelomovskij
30.01.2012 0:49, Walter Bright пишет: On 1/29/2012 6:04 AM, Denis Shelomovskij wrote: Why does Phobos use 4-space indentation? Because it works, changing it would be a vast waste of time for a non-existent benefit, and it would become a nuisance to do diffs of source code that cross the re

Re: indent style for D

2012-01-29 Thread Denis Shelomovskij
30.01.2012 0:53, Walter Bright пишет: On 1/29/2012 10:53 AM, Denis Shelomovskij wrote: No, it isn't. Spaces aren't comfortable to use in existed editors. Right, and I use tabs in my editor. I also run all files through the tools: detab to convert my tabs to spaces ... Works li

Re: indent style for D

2012-01-29 Thread Denis Shelomovskij
30.01.2012 0:42, Walter Bright пишет: On 1/29/2012 6:17 AM, bearophile wrote: D2 style guide should *require* D2 to be edited using a mono-spaced font, and the D2 front-end should enforce this with a "-ms" compiler switch. What? How could the compiler possibly know what font was used in your e

Re: indent style for D

2012-01-29 Thread Denis Shelomovskij
29.01.2012 23:02, Iain Buclaw пишет: On 29 January 2012 18:11, Denis Shelomovskij wrote: 29.01.2012 18:09, Iain Buclaw пишет: On 29 January 2012 14:04, Denis Shelomovskij wrote: 29.01.2012 15:21, Alex Rønne Petersen пишет: On 29-01-2012 10:15, Gour wrote: Hello! It was

Higher abstraction level for calling C functions

2012-01-29 Thread Denis Shelomovskij
D has complete (IMHO) compiler support for calling C functions (using extern(C)). But there is a lack of library support. Readers from this NG probably know this, but... Microsoft .NET Framework has such support. Look briefly at source example in: http://msdn.microsoft.com/en-gb/library/s97sht

Re: indent style for D

2012-01-29 Thread Denis Shelomovskij
29.01.2012 21:29, Russel Winder пишет: On Sun, 2012-01-29 at 14:09 +, Iain Buclaw wrote: [...] The problem is lines with mixed tabs and spaces, and different users set their text editors see tabs differently. ie: is your tab-width set to 2, 3, 4, or 8? Isn't that the whole point: using sp

Re: indent style for D

2012-01-29 Thread Denis Shelomovskij
29.01.2012 22:07, Stewart Gordon пишет: It is. But mishmashing tab and space indentation causes far worse conflict. Iain - I take it you meant that mishmashing, combined with users having different tab size settings, causes a problem. Correct? Stewart. Looks the reason against tabs is: mixed

Re: indent style for D

2012-01-29 Thread Denis Shelomovskij
29.01.2012 18:09, Iain Buclaw пишет: On 29 January 2012 14:04, Denis Shelomovskij wrote: 29.01.2012 15:21, Alex Rønne Petersen пишет: On 29-01-2012 10:15, Gour wrote: Hello! It was mentioned in #D that gdc will probably adapt its code to GNU code style and I wonder, seeing no

Re: indent style for D

2012-01-29 Thread Denis Shelomovskij
29.01.2012 20:48, bearophile пишет: Stewart Gordon: What do you mean by the "D2 front-end"? It was one of my first attempts at humor :-) Bye and sorry, bearophile Thanks for explicitly defining that! You just saved a lot of my time. )

Re: indent style for D

2012-01-29 Thread Denis Shelomovskij
29.01.2012 15:21, Alex Rønne Petersen пишет: On 29-01-2012 10:15, Gour wrote: Hello! It was mentioned in #D that gdc will probably adapt its code to GNU code style and I wonder, seeing no recemmendation in http://www.d-programming-language.org/dstyle.html in regard to indent-style, can someone

Strict aliasing in D

2012-01-29 Thread Denis Shelomovskij
It was originally posted to D.learn but there was no reply. So: Is there a strict aliasing rule in D? I just saw https://bitbucket.org/goshawk/gdc/changeset/b44331053062

Re: Aliasing of template results

2012-01-24 Thread Denis Shelomovskij
22.01.2012 18:51, Alex Rønne Petersen пишет: Hi, Someone on IRC wanted to know the element type of an array type and the following code was suggsted: template ElementType(T : T[]) { alias T ElementType; } He was confused about how ElementType!(int[]) could possibly equal int, until we explaine

Re: Aliasing of template results

2012-01-24 Thread Denis Shelomovskij
22.01.2012 22:33, Andrej Mitrovic пишет: A while ago there was a suggestion by Andrei to incorporate this sort of syntax: template ElementType(T : T[]) { alias ElementType = T; } struct Foo(T) { alias Type = T; } I think people agreed it was a nice syntax, but I don't know if anyone t

Re: binding tool for C libs

2012-01-24 Thread Denis Shelomovskij
23.01.2012 17:15, Gour пишет: On Sun, 22 Jan 2012 22:03:08 +0400 Denis Shelomovskij wrote: I'm finishing a fast (I just don't see a faster way) and garbage-free CTFE-capable wrapper. But it requires IDL to be written for every C function. I'm curious if you have read the

Re: A modest proposal

2012-01-24 Thread Denis Shelomovskij
24.01.2012 19:28, David Nadlinger пишет: On 1/24/12 4:16 PM, Denis Shelomovskij wrote: If people have a problem with #d IRC they should just disable technical messages they don't need. If they can't do that, it's their own problem. They are supposed to be programmers. Have no

Re: Do we need Win95/98/Me support?

2012-01-24 Thread Denis Shelomovskij
22.01.2012 23:55, Denis Shelomovskij пишет: In this thread I would like a reason of trying to support Win95/98/Me to be discussed. "Get rid of win9x support" pull requests: https://github.com/D-Programming-Language/druntime/pull/140 https://github.com/D-Programming-Language/phobo

Re: A modest proposal

2012-01-24 Thread Denis Shelomovskij
24.01.2012 5:57, Brad Anderson пишет: Recently there has been explosion in bug closures. This has had the unfortunate side effect of making it difficult to have a conversation in #d IRC with the bot constantly announcing these changes. I humbly request that those responsible slow down this beha

Re: Ranges and indexes with foreach

2012-01-24 Thread Denis Shelomovskij
24.01.2012 5:50, kenji hara пишет: Precise documentation is not yet written. Filled an issue: http://d.puremagic.com/issues/show_bug.cgi?id=7361

Re: Do we need Win95/98/Me support?

2012-01-24 Thread Denis Shelomovskij
24.01.2012 2:32, Nick Sabalausky пишет: "Andrei Alexandrescu" wrote in message news:jfk1r6$2a5j$1...@digitalmars.com... On 1/23/12 3:14 AM, Nick Sabalausky wrote: "Walter Bright" wrote in message news:jfj0ao$3q9$1...@digitalmars.com... Another way of looking at it is Phobos should provide

Re: Do we need Win95/98/Me support?

2012-01-22 Thread Denis Shelomovskij
22.01.2012 23:55, Denis Shelomovskij пишет: In this thread I would like a reason of trying to support Win95/98/Me to be discussed. In the case Win95/98/Me will be marked as unsupported, I will volunteer to remove unnecessary code from druntime/Phobos.

Re: Aliasing of template results

2012-01-22 Thread Denis Shelomovskij
22.01.2012 22:11, Timon Gehr пишет: On 01/22/2012 07:07 PM, Denis Shelomovskij wrote: 22.01.2012 18:51, Alex Rønne Petersen пишет: Hi, Someone on IRC wanted to know the element type of an array type and the following code was suggsted: template ElementType(T : T[]) { alias T ElementType

Do we need Win95/98/Me support?

2012-01-22 Thread Denis Shelomovskij
In this thread I would like a reason of trying to support Win95/98/Me to be discussed. I would like to see arguments for and against and, when there will be enough arguments, to vote, make a decision, and add supported Windows OS-es list to the docs, because now D is stamping itself by having u

Re: Aliasing of template results

2012-01-22 Thread Denis Shelomovskij
22.01.2012 18:51, Alex Rønne Petersen пишет: Hi, Someone on IRC wanted to know the element type of an array type and the following code was suggsted: template ElementType(T : T[]) { alias T ElementType; } He was confused about how ElementType!(int[]) could possibly equal int, until we explaine

Re: binding tool for C libs

2012-01-22 Thread Denis Shelomovskij
21.01.2012 19:24, Gour пишет: Hello! We have a need to bind smaller to medium-size C library and would like to provide more D-ish or higher-level bindings than just wrapper over C code. E.g. the C function looks like: int swe_calc_ut ( double tjd_ut, int ipl, int iflag, double* xx, char* serr)

Re: [OT] Programming language WATs

2012-01-20 Thread Denis Shelomovskij
20.01.2012 19:40, Robert Clipsham пишет: Just came across this amusing 4 minute video: https://www.destroyallsoftware.com/talks/wat Good talk! But with a mistake: there are 15 delimiters in 16 element array (printing/join result), not 16.

Re: Pow operator precedence

2012-01-13 Thread Denis Shelomovskij
13.01.2012 19:56, Don Clugston пишет: On 13/01/12 14:47, Manu wrote: On 13 January 2012 14:48, bearophile mailto:bearophileh...@lycos.com>> wrote: This is the third time I see people trip on power operator precedence: http://d.puremagic.com/issues/show_bug.cgi?id=7268 Some people expect this:

Re: compact library for creating window + OpenGL context + input handling?

2012-01-10 Thread Denis Shelomovskij
09.01.2012 17:22, Trass3r пишет: I don't think you are looking for such solution, so it is here just for information. But if someone need this, I will release sources. Please do so, could be helpful. IIRC it was the last working version before I decided to create a bigger library (the one th

Re: compact library for creating window + OpenGL context + input handling?

2012-01-09 Thread Denis Shelomovskij
09.01.2012 17:22, Trass3r пишет: I have written a Windows OpenGL context creation for given HWND (initially for DGUI but it isn't a restriction, one just have to write his own control class) because of complicated context creation in this OS (~800 lines of D code for only context creation with de

Re: compact library for creating window + OpenGL context + input handling?

2012-01-09 Thread Denis Shelomovskij
09.01.2012 6:05, Trass3r пишет: (other than SDL) Basically something like the SFML Window module, but written in D and working on Windoze/Linux. I have written a Windows OpenGL context creation for given HWND (initially for DGUI but it isn't a restriction, one just have to write his own cont

Re: Compiling in std.regex affecting performance

2012-01-07 Thread Denis Shelomovskij
07.01.2012 5:12, Andrej Mitrovic пишет: Oooh I've just realized something, the *compilation* calls are what's destroying the performance. I was using "dmd test.d&& test.exe" instead of just "test.exe" and this would generate a new exe which screwed up the results. So regex has nothing to do wit

Re: Happy New Year in 2012....

2012-01-01 Thread Denis Shelomovskij
01.01.2012 8:34, Andrei Alexandrescu пишет: to the entire D community! Andrei Happy new year from Russia! It's OT. This post should be in D.announce NG titled: "A year have rev. 2012 now. Everybody is switched to this revision automatically." With the following text: "Somebody is telling it

How mutable is immutable?

2012-01-01 Thread Denis Shelomovskij
So, I'm a function `f`, I have an `immutable(type)[]` argument and I want to store it for my friend `g` in an TLS variable `v`: --- string v; debug string sure; void f(string s) { v = s; debug sure = s.idup; } void g() { assert(v == sure); } --- I also store a copy of `s` into `sure` for my frie

Re: Program size, linking matter, and static this()

2011-12-21 Thread Denis Shelomovskij
21.12.2011 0:22, Walter Bright пишет: First off, dmd most definitely puts 0 initialized static data into the BSS segment. So what's going on here? 1. char data is not initialized to 0, it is initialized to 0xFF. Non-zero data cannot be put in BSS. Sorry, it was because of copying C code in my po

Re: Program size, linking matter, and static this()

2011-12-20 Thread Denis Shelomovskij
16.12.2011 21:29, Andrei Alexandrescu пишет: Hello, Late last night Walter and I figured a few interesting tidbits of information. Allow me to give some context, discuss them, and sketch a few approaches for improving things. A while ago Walter wanted to enable function-level linking, i.e. onl

Re: Doom3 (id tech 4) port/binding in D ?

2011-11-29 Thread Denis Shelomovskij
23.11.2011 19:16, deadalnix пишет: Hi, I want to suggest a project to the community. Doom3 source code has just been released, and I think we may want to do a port in D. ... I'm definitively in. And you ? It's insane at first sight. But after thinking for a moment I realized that is isn't d

Re: Discussion on D support in gdb

2011-11-22 Thread Denis Shelomovskij
22.11.2011 15:13, mta`chrono пишет: A noob question from my side: What is DWARF? By the way I never touched the sources of gdb. I'm just a friendly user of it. http://lmgtfy.com/?q=gdb+DWARF&l=1

Re: Concepts vs template constraints - the practical approach

2011-11-20 Thread Denis Shelomovskij
Your example, a bit improved: --- // In std.concept, e.g. template verify(alias concept, T) { //static assert(isConcept!concept, concept.stringof ~ " is not a concept"); //the test for particular concept's concepts can be added mixin concept!T; } template verify(alias concept) { mix

Re: Concepts vs template constraints - the practical approach

2011-11-20 Thread Denis Shelomovskij
void myfunction(A)(A arr) if(__traits(compiles, verifyMyConcept!(A))) { } It should be --- void myfunction(A)(A arr) { verifyMyConcept!A; } --- to see the error messages.

Re: Spurious compiler warning ?

2011-11-03 Thread Denis Shelomovskij
03.11.2011 11:29, kenji hara пишет: EnumMember returns tuple, it is compile-time sequence. And foreach with tuple unrolls its body. Then, Loop A is unrolled like follows. __foreachEntry0: { if ( TestEnum.ONE == TestEnum.TWO ) goto __foreachEntry1; writeln( "A: ", TestEnum.ONE ); } __

Re: BitBucket Offers Git Support

2011-11-02 Thread Denis Shelomovskij
02.11.2011 8:23, Caligo пишет: I just found out that Bitbucket finally offers Git support. I wonder, would anyone else like to see GDC switch to Git? I would like to kindly make a request because it would make things little easier. What things? I see, that every one switches to Git, but what

Multidimensional arrays for D

2011-10-25 Thread Denis Shelomovskij
What does D already have: build-in rectangular static arrays, dynamic arrays of arrays, std.range.frontTransversal, std.range.transversal. Some time ago I was told that "FORTRAN is good for its arrays" and heard me saying "it is easy to implement in C++ or D, but in D it will have more conveni

Re: Matrix-type-friendly syntax and more

2011-10-13 Thread Denis Shelomovskij
Suddenly, I had a talk with an Fortran guy at previous weekend and have wrote something like Fortran arrays in D last week. I had an idea of adding it into Phobos, but just had no time for review of my code. Draft version is in attachment. rarray.d - something like Fortran array main.d - example

Re: Matrix-type-friendly syntax and more

2011-10-09 Thread Denis Shelomovskij
09.10.2011 21:29, bearophile пишет: Kenji Hara has just copied in GIT a large patch by Don: https://github.com/9rnsr/dmd/branches/opDollar It allows user defined collections usable with this syntax: x[$-2, y[$-6, $-9], $-2] See: http://d.puremagic.com/issues/show_bug.cgi?id=3474 But a syntax

Re: Fast 2D matrix of bits

2011-09-20 Thread Denis Shelomovskij
20.09.2011 10:22, bearophile пишет: Josh Simmons: You could also just... uint32_t next_pow_2(uint32_t n) { n -= 1; n |= n>> 1; n |= n>> 2; n |= n>> 4; n |= n>> 8; n |= n>> 16; return n + 1; } My version with bsr is faster. Bye, bearophile Is it? Eve

Re: Std.path: Final Vote

2011-08-05 Thread Denis Shelomovskij
05.08.2011 16:26, dsimcha пишет: My apologies for not announcing this yesterday. For some reason I thought today was the official end of review. Anyhow, Lars Kyllingstad's new std.path module, which has been in review for the past 3 weeks, is up for vote. Please vote yes or no in this thread. Co

Re: Building GtkD app on Win32 results in 111 MiB file mostly from zeroes (compressed size - 324 KiB)

2011-08-04 Thread Denis Shelomovskij
04.08.2011 17:57, Trass3r пишет: dmd -oftestGtkD.exe -release -IgtkD-1.4.1-release\headers main.d gtkD-1.4.1-release\library.lib Gives the same result. Ok, could you try with Unilink to see if it's a linker problem? ftp://ftp.styx.cabel.net/pub/UniLink/ http://www.digitalmars.com/d/archives/di

Re: Building GtkD app on Win32 results in 111 MiB file mostly from zeroes (compressed size - 324 KiB)

2011-08-04 Thread Denis Shelomovskij
04.08.2011 15:33, Trass3r пишет: doCompile.bat: dmd -c -release -IgtkD-1.4.1-release\headers main.d doLink.bat: link main,"testGtkD.exe",,"gtkD-1.4.1-release\library.lib"+user32+kernel32/noi; Don't invoke optlink directly like that. Just use something like 'dmd -release main.obj gtkD-1.4.1-re

Re: Building GtkD app on Win32 results in 111 MiB file mostly from zeroes (compressed size - 324 KiB)

2011-08-04 Thread Denis Shelomovskij
I use dmd with default configuration. Files from huge-build.zip: zeroCount.exe: counts zero bytes main.d: module main; import gtk.Main; void main(string[] args) { Main.init(args); } doCompile.bat: dmd -c -release -IgtkD-1.4.1-release\headers main.d doLink.bat: link main,"testGtkD.exe",,"

Building GtkD app on Win32 results in 111 MiB file mostly from zeroes (compressed size - 324 KiB)

2011-08-04 Thread Denis Shelomovskij
AFAIK GtkD is the only mature crossplatform GUI for D. So the question is: 111 MiB *.exe file mostly from zeroes is good/acceptable? Is it a bug or it's how dmd2+OPTLINK works? It looks like dmd1 hasn't this issue. Files (dmd 2.054 compiled) are here: http://deoma-cmd.ru/files/other/huge-build.

Re: From a C++/JS benchmark

2011-08-03 Thread Denis Shelomovskij
03.08.2011 22:48, Adam D. Ruppe пишет: System: Windows XP, Core 2 Duo E6850 Is this Windows XP 32 bit or 64 bit? That will probably make a difference on the longs I'd expect. I meant Windows XP 32 bit (5.1 (Build 2600: Service Pack 3)) (according to what is "Windows XP" in wikipedia)

Re: From a C++/JS benchmark

2011-08-03 Thread Denis Shelomovskij
03.08.2011 22:15, Ziad Hatahet: I believe that "long" in this case is 32 bits in C++, and 64-bits in the remaining languages, hence the same result for int and long in C++. Try with "long long" maybe? :) -- Ziad 2011/8/3 Denis Shelomovskij mailto:verylonglogin@gmail.c

Re: From a C++/JS benchmark

2011-08-03 Thread Denis Shelomovskij
03.08.2011 18:20, bearophile: The benchmark info: http://chadaustin.me/2011/01/digging-into-javascript-performance/ The code, in C++, JS, Java, C#: https://github.com/chadaustin/Web-Benchmarks/ The C++/JS/Java code runs on a single core. D2 version translated from the C# version (the C++ versio

<    1   2   3