Re: Smart pointers instead of GC?

2014-02-03 Thread Eric Suen

"Ola Fosheim Gr?stad" "> On Tuesday, 4 
February 2014 at 00:49:04 UTC, Adam Wilson 
wrote:
>> Ahem. Wrong. See: WinForms, WPF, Silverlight. All extremely successful GUI 
>> toolkits that are not known for GC related 
>> problems. I've been working with WPF since 2005, I can say the biggest 
>> performance problem with it by far is the 
>> naive rendering of rounded corners, the GC has NEVER caused a hitch.
>
> According to Wikipedia:
>
> ?While the majority of WPF is in managed code, the composition engine which 
> renders the WPF applications is a native 
> component. It is named Media Integration Layer (MIL) and resides in 
> milcore.dll. It interfaces directly with DirectX 
> and provides basic support for 2D and 3D surfaces, timer-controlled 
> manipulation of contents of a surface with a view 
> to exposing animation constructs at a higher level, and compositing the 
> individual elements of a WPF application into 
> a final 3D "scene" that represents the UI of the application and renders it 
> to the screen.?
>
> So, Microsoft does not think that GC is suitable for real time interactive 
> graphics. And they are right.

As long as other code is in managed code, there is GC running at
 background, no matter your code write in whatever high performance
language, it will be affect by GC anyway.  so that "So, Microsoft does
not think that GC is suitable for real time > interactive graphics.
And they are right." is only your opinion. you don't know the real reason
behind MS's decision. some resource need release ASAP, so you can't
rely on GC. or maybe bacause of overhead when call low API in managed
code. 




Re: Typed GC

2014-02-12 Thread Eric Suen
That's called precise GC...

Off topic: Toward Go 1.3: 100% precise GC Finally

http://www.reddit.com/r/programming/comments/1xmh7j/toward_go_13_100_precise_gc_finally/

"Shammah Chancellor" ...
> With all the talk of garbage collection.  I was wondering if it would be 
> useful to make the GC typed.  If it was 
> typed, it maybe be possible to make it more efficient via type information, 
> (such as only scanning reference fields). 
> Also, it could have access to attribute information if applicable.
>
> -S.
> 




Re: Modern Windows GUI visual styles

2009-09-09 Thread Eric Suen
Hi,

Take a look Windows API:  CreateActCtx, ActivateActCtx, DeactivateActCtx and 
ReleaseActCtx and the struct ACTCTX

You still need a manifest file, but that file can generate by program, and 
you can turn on/off the XP theme.

"ACTCTX.lpSource  Null-terminated string specifying the path of the manifest 
file or PE image to be used to create the activation context. If this path 
refers to an EXE or DLL file, the lpResourceName member is required."

The attachment is the cpp code I wrote for Java...

Regards,

Eric Suen

> Recently I spent a few hours to find a way to enable a new styles of 
> Windows XP controls from the code (without manual created external 
> manifest files, resource files, ...). The only solution I found in DFL 
> library and it looks quite complicated.
>
> Maybe should create that function at the level of the compiler or linker?


begin 666 spket.cpp
M(V1E9FEN92!?5TE.,S)?5TE.3E0@,'@P-3$P#0H-"B-I;F-L=61E(#QW:6YD
M;w=...@^#0hc:6YC;'5D92 \'1E2 ]("AA='ep...@96yv+3y'97104-R
M:71I8V%L*&IA2...@2dy)7T9!3%-%*2D@/3...@3e5,3"d...@9v]t;R!D;VYE
M.PT*( T*(V1E9FEN92!214Q%05-%*&IA2...@8v%r2...@96yv+3y296qe87-e4')I;6ET:79E07)R87E#2...@2dy)7T%"3U)4*3L-"B-D969I;f...@4d5,
M14%315]#3U!9*&IA2...@8v%r2...@96yv+3y296qe87-e4')I;6ET:79E07)R87E#2P@,"D[#0H-"G1Y<&5d...@2$%.1$q%("A*3DE#04Q,("I#$%07!E9&5F
M($)/3...@*$i.24-!3$p@*D%C=&EV871E06-T0W1X4')O8RDH2$%.1$Q%+"!5
M3$].1U]05%(J*3L-"G1Y<&5d...@0d]/3" H2DY)0T%,3" J1&5A8W1I=F%T
M94%C=$-T>%!R;V,I*$173U)$+"!53$].1U]05%(I.PT*='EP961E9B!V;VED
M("A*3DE#04Q,("I296QE87-E06-T0W1X4')O8RDH2$%.1$Q%*3L-"@T*4U!+
M151?1E5#*&IB;V]L96%N+"!?86-T:79E5&AE;6EN9RD-"B @*$I.245N=B J
M96YV+"!J8VQA$%RPT*"4A)3E-404Y#12!T:&5M94QI8B ]($QO861,:6)R87)Y
M*")5>%1H96UE(BD[#0H):6...@*'1H96UE3&EB(#T]($Y53$PI#0H)"7)E='5R
M;B!*3DE?1D%,4T4[#0H)"0T*"49R965,:6)R87)Y*'1H96UE3&EB*3L-"@D-
M"@DO+TES5&AE;65!8W1I=F4@)b...@27-!<'!4:&5M960@;F]T('=OF4@/2!S:7IE;V8H=F5R26YF;RD[#0H)"0E(4D5354Q4(&AR(#...@9&QL
M4')o...@f=f5r26yf;RD[#0H)"0EI9B H4U5#0T5%1$5$*&AR*2 F)B!V97))
M;F9O+F1W36%J;W)697)S:6]N(#X](#8I('L-"@D)"0EI2...@b2v5r;F5L,S(B*3L-"@D):6...@*&MEF4@/"!L96YG=&@I#0H)"0D)"0D)8G)E
M86L[#0H)"0D)"0D-"@D)"0D)"6Y3:7IE(#T@,#L-"@D)"0D)"6EF("AL<$9I
M;&5N86UE("$](&9I;&5N86UE*0T*"0D)"0D)"61E;&5T95M=(&QP1FEL96YA
M;64[#0H)"0D)"0D)#0H)"0D)"0EL96YG=&@@*...@34%87u!!5$@[#0H)"0D)
M"0EL<$9I;&5N86UE(#T@;F5W(%=#2$%26VQE;F=T:%T[#0H)"0D)"0EI9B H
M;'!&:6QE;F%M92 ]/2!.54Q,*0T*"0D)"0D)"6)R96%K.PT*"0D)"0E]('=H
M:6QE("AT" ](&-R96%T94%C=$-T>%!R;V,H
M)F%C=&-T>"D[#0H)"0D)"7T-"@D)"0D):6...@*&QP1FEL96YA;64@(3...@3e5,
M3" F)B!L<$9I;&5N86UE("$](&9I;&5N86UE*0T*"0D)"0D)9&5L971E6UT@
M;'!&:6QE;F%M93L-"@D)"0E]#0H)"0E](&5LPT*"0D)"4-R96%T94%C
M=$-T>$%0%!R;V,@/2 H0W)E871E06-T0W1X05!R
M;V,I($=E=%!R;V-!9&1R97-S*&ME$$B*3L-
M"@D)"0EI9B H8W)E871E06-T0W1X4')O8R A/2!.54Q,*2![#0H)"0D)"4%#
m5$-4...@86-t8w1x.pt*"0D)"0E$5T]21"!L96YG=&@@/2!-05A?4$%42#L-
M"@D)"0D)8VAAF4@/2 P.PT*"0D)
M"0D):6...@*&QP1FEL96YA;64@(3...@9fel96ya;64I#0H)"0D)"0D)9&5L971E
M6UT@;'!&:6QE;F%M93L-"@D)"0D)"0D-"@D)"0D)"6QE;F=T:" K/2!-05A?
M4$%42#L-"@D)"0D)"6QP1FEL96YA;64@/2!N97<@8VAAF5O9BAA8W1C='@I.PT*
M"0D)"0D)86-T8W1X+FQP4V]U"YD=T9L86=S(#...@04-40u187t9,04=?4D533U520T5?3D%-15]604Q)
M1#L-"@D)"0D)"6%C=&-T>"YL<%)E" A/2!)3E9!3$E$7TA!3D1,15]604Q512D@>PT*"0D)"7)C
M(#...@86-t:79A=&5!8W1#='A0PT*"0D)"0E#3TY615)4
M*&II;G0J+"!C='@L(&-T>$%R$%R
M"(I.PT*"0D)"0EI9B H%!R;V,@(3...@3e5,3"D-"@D)
M"0D)"7)E;&5A%!R;V,@(3...@3e5,3"D-"@D)"0ER96QE87-E06-T0W1X4')O
m...@j:$%C=$-T>"D[#0H)"7T-"@D)#0H)"49R965,:6)R87)Y*&ME#L-"@D)9&5L971E('5L<$%C=&EV871I
M;VY#;V]K:64[#0H)?0T*"0T*"7)E='5R;B!*3DE?5%)513L-"GT-"@T*0D]/
M3"!!4$E%3E1262!$;&Q-86EN("A(24Y35$%.0T4@:$ENPT*"7-P:V5T7VAA;F1L92 ]
M(&A);G-T.PT*"0T*"7)E='5R;b!44e5%.pt*?0t*#0...@t*PT*"6EF("AT:&5M95]S=&%T=7,@/3T@
M,"D@>PT*"0ET:&5M95]S=&%T=7,@/2 Q.PT*"0E(24y35$%@=&AE;64@
M/2!,;V%D3&EB2...@b57a4:&5M92(I.PT*"0EI9B H=&AE;64@(3...@3e5,
M3"D@>PT*"0D)=&AE;65?PT*"6EF("@A
M27-4:&5M95-U<'!OF4@/2!S:7IE;V8H
M=F5R26YF;RD[#0H)"0E(4D5354Q4(&AR(#...@9&QL4')o...@f=f5r26yf;RD[
M#0H)"0EI9B H4U5#0T5%1$5$*&AR*2 F)B!V97));F9O+F1W36%J;W)697)S
M:6]N(#X](#8I('L-"@D)"0E(24y35$%@=&AE;65,:6(@/2!,;V%D3&EB
M2...@b57a4:&5M92(I.PT*"0D)"6EF("AT:&5M94QI8B A/2!.54Q,*2![
M#0H)"0D)"4ES5&AE;65!8W1I=F50PT*"0D)"0D)27-!<'!4:&5M96102AC;VUC=$QI8BD[#0H)?0T*"7)E='5R;B H:7-!
M<'!4:&5M960@/3...@5%)512 _('1r...@.b!f86qs92d[#0i]#0h-"G-T871I
M8R!B;V]L($5N86)L951H96UI;F%1H96UE(BD[#0H):6...@*'1H96UE3&EB("$]($Y53$PI('L-"@D)16YA
M8FQE5&AE;6EN9U!R;V,@=&AE;6EN9U!R;V,@/2 H16YA8FQE5&AE;6EN9U!R
M;V,I($=E=%!R;V-!9&1R97-S*'1H96UE3&EB+" B16YA8FQE5&AE;6EN9R(I
M.PT*"0EI9B H=&AE;6EN9U!R;V,@(3...@3e5,3"D-"@D)"7)C(#...@=&AE;6EN
M9U!R;V,H96YA8FQE(#...@5%)512 Z($9!3%-%*2 ]/2!37T]+.PT*"0D-"@D)
M1G)E94QI8G)A

Re: dmd support for IDEs and the D tool chain

2009-10-16 Thread Eric Suen
"Lutger" wrote
> Jacob Carlborg wrote:
>
>> Here is my thoughts and what I think is needed to build a really good
>> IDE and maybe get some attention from the enterprise. It's really not
>> enough for the compiler to output some json for an IDE to use, the whole
>> tool chain needs to be revised.
>
> I think this list is what the toolchain might look like after it already 
> has
> gotten some attention, not a requirement of what is needed.
>
> This is a cut-down list with some comments:
>
>> Compiler:
>>   * Supports all major platform
>>   * 32 and 64bit support
>>   * Doesn't have annoying bugs like forward reference errors and problem
>> with the linker
>>   * Can build dynamic libraries
>>   * Supports incremental builds
>
> Clearly many programming languages manage without a compiler written in
> their native language and I doubt clang is even used in enterprise 
> context.

Because of many programming language is not design for speed, there is
no point to write a compiler in there native language. Even Java's compiler
is writtern in Java, why not D? Compiler bootstrapping is very basic 
technique,
A large proportion of programming languages are bootstrapped. It is nosense 
to
write D compiler in C, that means the D language author does not want to use
D language. Does Walter Bright use D for any projects himself?

Regards,

Eric




Re: dmd support for IDEs and the D tool chain

2009-10-17 Thread Eric Suen
"Christopher Wright" wrote
> Jacob Carlborg wrote:
>> On 10/16/09 12:58, Tomas Lindquist Olsen wrote:
>>> GtkD supports Glade.
>>
>> Yes, but GtkD doesn't use native controls.
>
> A minor point, I think. Eclipse doesn't look very native and has 
> widespread acceptance.

SWT wrap native controls, and Eclipse is build on SWT, but for an 
application
like Eclipse, use system provide native controls is no enough, you have to
write some custom control. Here is the problem, Java developers just unable 
to
write good looking GUI components or applications using any library, neither
Swing nor SWT. for examples, Swing is really powerful GUI frameworks, Java2D
is quite powerful, and Swing is very flexible, but most Swing applications 
are
really ugly.

Eclipse doesn't look very native because they using ugly tab for layout, you
can change that by provide your owner theme. more than 99% controls in 
Eclipse
are native controls...

There is the link of custom theme for Eclipse:

http://www.agpad.com/images/ide_m.png

Eric




Re: dmd platform support - poll

2008-12-25 Thread Eric Suen
Why not just LLVM? let LLVM do the rest?

> What platforms for dmd would you be most interested in using?
>
> .net
> jvm
> mac osx 32 bit intel
> mac osx 64 bit intel
> linux 64 bit
> windows 64 bit
> freebsd 32 bit
> netbsd 32 bit
>
> other?