dmd as a library for scripting/JIT?

2018-09-14 Thread dennis luehring via Digitalmars-d
i've got user defined flow charts in my C++ application that calling C/C++ Code - could be possible to embedd dmd as a library, generate D code out of my flow charts and execute the "compiled" code directly without doing file io or dmd.exe runs to create dlls that i hot reload?

Re: The nail in the coffin of C++ or why don't GO there...

2017-03-30 Thread dennis luehring via Digitalmars-d
Am 30.03.2017 um 08:58 schrieb Ervin Bosenbacher: That is the same, that came as a shock to me. most compilers (for many languages) can optimize your super-trivial example down to nothing - for at least the last 10 years or more so whats the point? you're talkin about "performance is

Re: Rant after trying Rust a bit

2015-07-24 Thread dennis luehring via Digitalmars-d
Am 23.07.2015 um 22:47 schrieb Ziad Hatahet via Digitalmars-d: Having expressions be built-in extends beyond the simple if/else case and allowes const correctness without functions

Re: PHP verses C#.NET verses D.

2015-06-22 Thread dennis luehring via Digitalmars-d
you should stay with PHP + C# or migrated to pure C# if you need to ask such a question here (without giving any infos about what the co-workers understand, the real size of the project is, etc.) Am 16.06.2015 um 01:53 schrieb Nick B: Hi. There is a startup in New Zealand that I have some

Re: module win32.winioctl :IOCTL_STORAGE_EJECT_MEDIA' Value is Error

2014-12-30 Thread dennis luehring via Digitalmars-d
Am 30.12.2014 um 04:03 schrieb FrankLike: On Monday, 29 December 2014 at 12:19:34 UTC, dennis luehring wrote: Am 29.12.2014 um 13:00 schrieb FrankLike: Now,I use the win32.winioctl.d file,find :IOCTL_STORAGE_EJECT_MEDIA ' Value is 0x0202,if you use it ,will get the error value 50.(by

Re: module win32.winioctl :IOCTL_STORAGE_EJECT_MEDIA' Value is Error

2014-12-29 Thread dennis luehring via Digitalmars-d
Am 29.12.2014 um 13:00 schrieb FrankLike: Now,I use the win32.winioctl.d file,find :IOCTL_STORAGE_EJECT_MEDIA ' Value is 0x0202,if you use it ,will get the error value 50.(by GetLastError()). It should be 0x2d4808.If you use it ,it works ok. Why have this kind of mistake? Frank maybe just

Re: D2 port of Sociomantic CDGC available for early experiments

2014-10-10 Thread dennis luehring via Digitalmars-d-announce
Am 11.10.2014 06:25, schrieb Andrei Alexandrescu: On 10/10/14, 7:54 PM, Walter Bright wrote: On 10/10/2014 5:45 PM, Leandro Lucarella wrote: I still don't understand why wouldn't we use environment variables for what they've been created for, it's foolish :-) Because using environment

Re: DConf 2014 Keynote: High Performance Code Using D by Walter Bright

2014-07-18 Thread dennis luehring via Digitalmars-d-announce
Am 18.07.2014 07:54, schrieb Walter Bright: On 7/17/2014 9:40 PM, dennis luehring wrote: i understand your focus on dmd - but talking about fast code and optimizing WITHOUT even trying to compare with other compiler results is just a little bit strange for someone who stated speed = money The

Re: DConf 2014 Keynote: High Performance Code Using D by Walter Bright

2014-07-17 Thread dennis luehring via Digitalmars-d-announce
Am 18.07.2014 04:52, schrieb Walter Bright: On 7/16/2014 7:21 AM, dennis luehring wrote: can you give an short (working) example code to show the different resulting assembler for your for-rewrite example - and what compilers your using for testing - only dmd or gdc? I used dmd. i

Re: DConf 2014 Keynote: High Performance Code Using D by Walter Bright

2014-07-16 Thread dennis luehring via Digitalmars-d-announce
Am 15.07.2014 18:20, schrieb Andrei Alexandrescu: http://www.reddit.com/r/programming/comments/2aruaf/dconf_2014_keynote_high_performance_code_using_d/ https://www.facebook.com/dlang.org/posts/885322668148082 https://twitter.com/D_Programming/status/489081312297635840 Andrei @Walter can

Re: GDC/ARM: Help needed: Porting std.math.internal.gammafunction

2014-07-03 Thread dennis luehring via Digitalmars-d
Am 03.07.2014 17:33, schrieb Johannes Pfau: Hi, std.math.internal.gammafunction is the last module with failing unittest on ARM, simply because it assumes that reals are always in x86 extended precision format which is obviously not true on ARM. OT question: can you also check big endian

Re: std.math performance (SSE vs. real)

2014-06-30 Thread dennis luehring via Digitalmars-d
Am 30.06.2014 18:30, schrieb dennis luehring: Am 30.06.2014 08:21, schrieb Walter Bright: The only way I know to access x87 is with inline asm. I suggest using long double on Linux and look at the compiler output. You don't have to believe me - use gcc or clang. gcc.godbolt.org clang 3.4.1

Re: std.math performance (SSE vs. real)

2014-06-30 Thread dennis luehring via Digitalmars-d
Am 30.06.2014 08:21, schrieb Walter Bright: The only way I know to access x87 is with inline asm. I suggest using long double on Linux and look at the compiler output. You don't have to believe me - use gcc or clang. gcc.godbolt.org clang 3.4.1 -O3 int main(int argc, char** argv) { return

Re: std.math performance (SSE vs. real)

2014-06-30 Thread dennis luehring via Digitalmars-d
Am 01.07.2014 00:18, schrieb Andrei Alexandrescu: On 6/30/14, 2:20 AM, Don wrote: For me, a stronger argument is that you can get *higher* precision using doubles, in many cases. The reason is that FMA gives you an intermediate value with 128 bits of precision; it's available in SIMD but not on

Re: Module level variable shadowing

2014-06-29 Thread dennis luehring via Digitalmars-d
Am 29.06.2014 08:06, schrieb Kapps: struct Foo { int a; this(this.a) { } } a parameter declaration with the name of the scope name??? totaly different to everything else???

Re: Module level variable shadowing

2014-06-28 Thread dennis luehring via Digitalmars-d
Am 28.06.2014 07:11, schrieb H. S. Teoh via Digitalmars-d: On Sat, Jun 28, 2014 at 06:37:08AM +0200, dennis luehring via Digitalmars-d wrote: Am 27.06.2014 20:09, schrieb Kapps: [...] struct Foo { int a; this(int a) { this.a = a; } } forgot that case - but i

Re: Module level variable shadowing

2014-06-28 Thread dennis luehring via Digitalmars-d
Am 28.06.2014 11:30, schrieb Jacob Carlborg: On 2014-06-28 08:19, dennis luehring wrote: thx for the examples - never though of these problems i personaly would just forbid any shadowing and single-self-assign and then having unique names (i use m_ for members and p_ for parameters etc.) or

Re: Module level variable shadowing

2014-06-28 Thread dennis luehring via Digitalmars-d
Am 28.06.2014 14:20, schrieb Ary Borenszweig: On 6/28/14, 6:30 AM, Jacob Carlborg wrote: On 2014-06-28 08:19, dennis luehring wrote: thx for the examples - never though of these problems i personaly would just forbid any shadowing and single-self-assign and then having unique names (i use m_

Re: Module level variable shadowing

2014-06-27 Thread dennis luehring via Digitalmars-d
Am 26.06.2014 02:41, schrieb Walter Bright: On 6/25/2014 4:03 PM, bearophile wrote: The simplest way to avoid that kind of bugs is give a shadowing global x error (similar to the shadowing errors D gives with foreach and with statements). But this breaks most existing D code. D has scoped

Re: Module level variable shadowing

2014-06-27 Thread dennis luehring via Digitalmars-d
Am 27.06.2014 10:20, schrieb dennis luehring: I think we hit the sweet spot at restricting shadowing detection to local scopes. sweet does not mean - use a better name or .x to avoid manualy hard to detect problems - its like disabled shadow detection in local scopes what i don't

Re: std.math performance (SSE vs. real)

2014-06-27 Thread dennis luehring via Digitalmars-d
Am 27.06.2014 14:20, schrieb Russel Winder via Digitalmars-d: On Fri, 2014-06-27 at 11:10 +, John Colvin via Digitalmars-d wrote: [
] I understand why the current situation exists. In 2000 x87 was the standard and the 80bit precision came for free. Real programmers have been using

Re: Module level variable shadowing

2014-06-27 Thread dennis luehring via Digitalmars-d
Am 27.06.2014 22:38, schrieb Tofu Ninja: On Friday, 27 June 2014 at 08:24:16 UTC, dennis luehring wrote: what i don't understand - why on earth should someone want to shadow a(or better any) variable at all? It can be useful if you are using mixins where you don't know what is going to be in

Re: Module level variable shadowing

2014-06-27 Thread dennis luehring via Digitalmars-d
Am 27.06.2014 20:09, schrieb Kapps: On Friday, 27 June 2014 at 08:24:16 UTC, dennis luehring wrote: Am 27.06.2014 10:20, schrieb dennis luehring: I think we hit the sweet spot at restricting shadowing detection to local scopes. sweet does not mean - use a better name or .x to avoid manualy

Re: export keyword

2014-06-24 Thread dennis luehring via Digitalmars-d
Am 24.06.2014 11:34, schrieb seany: Also, while we are at it, does d support declarations like: class C { public : int a; string b; double c; } read the manual first http://dlang.org/class and could I as well write class C2{ auto x this(T)(T y) { this.x = y; } }

Re: ANTLR grammar for D?

2014-06-20 Thread dennis luehring via Digitalmars-d
Am 20.06.2014 08:57, schrieb Wesley Hamilton: I've started making a D grammar for ANTLR4, but I didn't want to spend days testing and debugging it later if somebody already has one. The best search results turn up posts that are 10 years old. Only one post has a link to a grammar file and the

Re: Perlin noise benchmark speed

2014-06-20 Thread dennis luehring via Digitalmars-d
Am 20.06.2014 14:32, schrieb Nick Treleaven: Hi, A Perlin noise benchmark was quoted in this reddit thread: http://www.reddit.com/r/rust/comments/289enx/c0de517e_where_is_my_c_replacement/cibn6sr It apparently shows the 3 main D compilers producing slower code than Go, Rust, gcc, clang,

Re: Perlin noise benchmark speed

2014-06-20 Thread dennis luehring via Digitalmars-d
Am 20.06.2014 15:14, schrieb dennis luehring: Am 20.06.2014 14:32, schrieb Nick Treleaven: Hi, A Perlin noise benchmark was quoted in this reddit thread: http://www.reddit.com/r/rust/comments/289enx/c0de517e_where_is_my_c_replacement/cibn6sr It apparently shows the 3 main D compilers

Re: Perlin noise benchmark speed

2014-06-20 Thread dennis luehring via Digitalmars-d
Am 20.06.2014 17:09, schrieb bearophile: Nick Treleaven: A Perlin noise benchmark was quoted in this reddit thread: http://www.reddit.com/r/rust/comments/289enx/c0de517e_where_is_my_c_replacement/cibn6sr This should be compiled with LDC2, it's more idiomatic and a little faster than the

Re: Perlin noise benchmark speed

2014-06-20 Thread dennis luehring via Digitalmars-d
Am 20.06.2014 22:44, schrieb bearophile: dennis luehring: it does not makes sense to optmized this example more and more - it should be fast with the original version But the original code is not fast. So someone has to find what's broken. I have shown part of the broken parts to fix (floor

Re: An LLVM bug that affect both LDC and SDC. Worth pushing for

2014-06-18 Thread dennis luehring via Digitalmars-d
Am 18.06.2014 23:22, schrieb Iain Buclaw via Digitalmars-d: Likewise here. But unless I'm missing something (I'm not sure what magic happens with @allocate, for instance), I'm not sure how you could expect the optimisation passes to squash closures together. Am I correct in that it's asking

Re: An LLVM bug that affect both LDC and SDC. Worth pushing for

2014-06-18 Thread dennis luehring via Digitalmars-d
Am 19.06.2014 07:16, schrieb deadalnix: If they go for clang specific solution, that aren't gonna cut it for us :( only as an orientation what weaker language + optimizer can reach :)

Re: A Perspective on D from game industry

2014-06-17 Thread dennis luehring via Digitalmars-d
Am 17.06.2014 11:30, schrieb Walter Bright: And how would you syntax-highlight a string mixin that's assembled from arbitrary string fragments? You wouldn't need to, since the text editor sees only normal D code. the text editor sees just D-code-Strings - so no syntax-highlight except that

Unicode 7.0.0 is out

2014-06-17 Thread dennis luehring via Digitalmars-d
http://www.unicode.org/versions/Unicode7.0.0/

Re: Unicode 7.0.0 is out

2014-06-17 Thread dennis luehring via Digitalmars-d
Am 17.06.2014 16:58, schrieb Dmitry Olshansky: 17-Jun-2014 17:43, dennis luehring пОшет: http://www.unicode.org/versions/Unicode7.0.0/ OMG The good news is we haven't implemented yet the collation algorithm, so no need to re-implement it! :) P.S. Seriously we should be good to go, with

Re: What's going on with std.experimental.lexer?

2014-06-13 Thread dennis luehring via Digitalmars-d
Am 13.06.2014 16:59, schrieb Dejan Lekic: Please no. See: javax Spelling out 'experimental' is probably the best, for all those reasons already stated. What's wrong with javax? experimental is 100% clear and simple to understand beeing evil javax was interpreted as eXtendet or eXtra or

Re: DConf 2014 Day 1 Talk 4: Inside the Regular Expressions in D by Dmitry Olshansky

2014-06-12 Thread dennis luehring via Digitalmars-d-announce
Am 12.06.2014 11:17, schrieb Dmitry Olshansky: This one thing I'm loosing sleep over - what precisely is so good in CTFE code generation in_practical_ context (DSL that is quite stable, not just tiny helpers)? By the end of day it's just about having to write a trivial line in your favorite

Re: What's going on with std.experimental.lexer?

2014-06-09 Thread dennis luehring via Digitalmars-d
Am 09.06.2014 22:21, schrieb Brian Schott: On Friday, 6 June 2014 at 23:50:40 UTC, Brian Schott wrote: SIMD reduces execution time by 5.15% with DMD. Compiling the non-SIMD code with GDC reduces execution time by 42.39%. So... There's that. Changing the code generator to output a set of if

Re: What's going on with std.experimental.lexer?

2014-06-08 Thread dennis luehring via Digitalmars-d
Am 07.06.2014 01:50, schrieb Brian Schott: On Friday, 6 June 2014 at 00:33:23 UTC, Brian Schott wrote: Implementing some SIMD code just in the lexWhitespace function causes a drop in total lexing time of roughly 3.7%. This looks promising so far, so I'm going to implement similar code in

Re: [OT] C++ the Clear Winner In Google's Language Performance Tests

2014-06-06 Thread dennis luehring via Digitalmars-d
Am 06.06.2014 16:34, schrieb Dejan Lekic: Slashdot thread: http://developers.slashdot.org/story/11/06/15/0242237/c-the-clear-winner-in-googles-language-performance-tests Research paper: https://days2011.scala-lang.org/sites/days2011/files/ws3-1-Hundt.pdf I wonder what would be situation if

Re: Interview at Lang.NEXT

2014-06-05 Thread dennis luehring via Digitalmars-d-announce
Am 05.06.2014 11:42, schrieb Jonathan M Davis via Digitalmars-d-announce: if(cond) var = hello world; else var = 42; The fact that an if statement could change the type of a variable is just atrocious IMHO. Maybe I've just spent too much of my time in statically typed languages, but I

Re: Interview at Lang.NEXT

2014-06-04 Thread dennis luehring via Digitalmars-d-announce
Am 04.06.2014 19:57, schrieb Meta: On Wednesday, 4 June 2014 at 17:55:15 UTC, bearophile wrote: How many good usages of D Variant do you know? Bye, bearophile It depends on what you mean by a good usage. I rarely ever use Variant, but you *can* use it if you need weak and/or dynamic typing.

port C++ to D - copy constness

2014-06-02 Thread dennis luehring via Digitalmars-d-learn
i want to port this C++ code to good/clean D and have no real idea how to start contains 2 templates - a slice like and a binary reader for an slice main idea was to copy the immutablity of the slice data to the reader http://pastebin.com/XX2yhm8D the example compiles fine with

Re: port C++ to D - copy constness

2014-06-02 Thread dennis luehring via Digitalmars-d-learn
Am 02.06.2014 12:09, schrieb Timon Gehr: On 06/02/2014 09:06 AM, dennis luehring wrote: i want to port this C++ code to good/clean D and have no real idea how to start contains 2 templates - a slice like and a binary reader for an slice main idea was to copy the immutablity of the slice data

Re: Performance

2014-05-31 Thread dennis luehring via Digitalmars-d
Am 31.05.2014 08:36, schrieb Russel Winder via Digitalmars-d: As well as the average (mean), you must provide standard deviation and degrees of freedom so that a proper error analysis and t-tests are feasible. average means average of benchmarked times and the dummy values are only for

Re: Performance

2014-05-31 Thread dennis luehring via Digitalmars-d
Am 31.05.2014 13:25, schrieb dennis luehring: Am 31.05.2014 08:36, schrieb Russel Winder via Digitalmars-d: As well as the average (mean), you must provide standard deviation and degrees of freedom so that a proper error analysis and t-tests are feasible. average means average of benchmarked

Re: Performance

2014-05-30 Thread dennis luehring via Digitalmars-d
faulty benchmark -do not benchmark format -use a dummy-var - just add(overflow is not a problem) your plus() results to it and return that in your main - preventing dead code optimization in any way -introduce some sort of random-value into your plus() code, for example use an

Re: Scott Meyers' DConf 2014 keynote The Last Thing D Needs

2014-05-28 Thread dennis luehring via Digitalmars-d-announce
woudl be nice to have some sort of example by example comparison or as an extension to the page http://dlang.org/cpptod.html Am 28.05.2014 07:40, schrieb Jesse Phillips: On Wednesday, 28 May 2014 at 05:30:18 UTC, Philippe Sigaud via Digitalmars-d-announce wrote: I did a translation of most of

OT: but maybe still interesting - runtime c++ compilation

2014-05-28 Thread dennis luehring via Digitalmars-d
could be a nice next step for D if D compiler as a library comes someday available http://runtimecompiledcplusplus.blogspot.co.uk/ from the blog: Runtime Compiled C++ is in Kythera, the AI behind Star Citizen. Video: RCC++ at the 2012 Develop Conference http://vimeo.com/85934969 and it

Re: OT: but maybe still interesting - runtime c++ compilation

2014-05-28 Thread dennis luehring via Digitalmars-d
example from a simulation project a runtime-configured (0-6)-axis cinematics system able to bring axis to an given position or calculates back to axis positions for simulation purpose so the interface is target/current-reached-position and axis.positions currently done by using virtuals,

Re: OT: but maybe still interesting - runtime c++ compilation

2014-05-28 Thread dennis luehring via Digitalmars-d
Am 28.05.2014 16:32, schrieb Byron Heads: Would love to have this for vibe.d for what use case?

Re: DFL is really cool,Who can contact Christopher E. Miller?

2014-05-14 Thread dennis luehring via Digitalmars-d
Am 15.05.2014 05:58, schrieb FrankLike: 1.DFL's Memory Usage is the least than other. winsamp.exe is 2.1M,DFL's example's exe is 2.7M. 2.The size of DFL's example's exe files is the least than other, and only a single file. 3.DFL's source code is the most easy to understand. D need Christopher

Re: Cost of assoc array?

2014-05-14 Thread dennis luehring via Digitalmars-d-learn
Am 14.05.2014 12:33, schrieb Chris: On Wednesday, 14 May 2014 at 10:20:51 UTC, bearophile wrote: Chris: Is there any huge difference as regards performance and memory footprint between the two? Or is 2. basically 1. under the hood? An associative array is a rather more complex data

Re: Cost of assoc array?

2014-05-14 Thread dennis luehring via Digitalmars-d-learn
Am 14.05.2014 15:20, schrieb Chris: Profiling is not really feasible, because for this to work properly, I would have to introduce the change first to be able to compare both. Nothing worse than carefully changing things only to find out, it doesn't really speed up things. why not using an