RFC: Implementation of binary assignment operators (e.g s.x += 2) for @property functions

2017-08-14 Thread Michael V. Franklin via Digitalmars-d
An implementation of binary assignment operators for @property functions has been submitted to the DMD pull request queue at https://github.com/dlang/dmd/pull/7079. It addresses the following issues: Issue 8006 - Implement proper in-place-modification for properties

Re: Temporary objects as function parameters or when-is-this-shit-going-to-end?

2017-10-15 Thread Michael V. Franklin via Digitalmars-d-learn
On Friday, 13 October 2017 at 11:54:38 UTC, Jack Applegame wrote: On Friday, 13 October 2017 at 11:21:48 UTC, Biotronic wrote: BountySource[2] lets you do basically exactly that. My experience says that BountySource almost doesn't help. It works if the bounty is worth someone sacrificing

Re: Temporary objects as function parameters or when-is-this-shit-going-to-end?

2017-10-15 Thread Michael V. Franklin via Digitalmars-d-learn
On Monday, 16 October 2017 at 03:29:03 UTC, Michael V. Franklin wrote: My experience says that BountySource almost doesn't help. It works if the bounty is worth someone sacrificing their free time to do the work. For example, I'd attempt fixing the bug if the bounty were greater than

Question about DMD's Travis CI

2017-09-09 Thread Michael V. Franklin via Digitalmars-d
I've been battling DMD's Travis CI for the past couple of weeks with a few of my pull requests. It often fails for various reasons that have nothing to do with my PRs (e.g. "The job exceeded the maximum time limit for jobs, and has been terminated.") It's also takes almost half a day to

Re: Question about DMD's Travis CI

2017-09-12 Thread Michael V. Franklin via Digitalmars-d
On Sunday, 10 September 2017 at 01:25:29 UTC, Michael V. Franklin wrote: I've been battling DMD's Travis CI for the past couple of weeks with a few of my pull requests. It often fails for various reasons that have nothing to do with my PRs (e.g. "The job exceeded the maximum time limit for

Re: D as a Better C

2017-08-24 Thread Michael V. Franklin via Digitalmars-d-announce
On Thursday, 24 August 2017 at 18:26:37 UTC, H. S. Teoh wrote: For instance, a D project targeting STM board, makes heavy use of classes and templates, resultant code segment is 3k. https://github.com/JinShil/stm32f42_discovery_demo#the-good To be fair, though, the above-mentioned project

Re: D as a Better C

2017-08-24 Thread Michael V. Franklin via Digitalmars-d-announce
On Thursday, 24 August 2017 at 19:21:31 UTC, Walter Bright wrote: On 8/24/2017 11:56 AM, Walter Bright wrote: I find -betterC to be somewhat of a copout for avoiding the hard work of improving D's implementation. On the contrary, I view it as providing motivation for dealing with those

Re: D as a Better C

2017-08-25 Thread Michael V. Franklin via Digitalmars-d-announce
On Friday, 25 August 2017 at 23:13:53 UTC, Mengu wrote: On Friday, 25 August 2017 at 00:24:14 UTC, Michael V. Franklin wrote: On Thursday, 24 August 2017 at 19:21:31 UTC, Walter Bright wrote: [...] Great! I look forward to seeing improvements and hope to help. [...] i believe that should

Re: What's the best D programming book

2017-08-25 Thread Michael V. Franklin via Digitalmars-d
On Friday, 25 August 2017 at 21:08:59 UTC, Macdonal wrote: What is the best D-Programming Book? Start here (http://ddili.org/ders/d.en/index.html) and then go here (https://wiki.dlang.org/Books) Mike

Please review these pull requests (DMD #7097 & Phobos #5704)

2017-08-27 Thread Michael V. Franklin via Digitalmars-d
These pull request were submitted a few days ago, but appear to have gone unnoticed. https://github.com/dlang/dmd/pull/7097 https://github.com/dlang/phobos/pull/5704 I'm assuming that is because neither currently passes the test suite. I'm making this forum post to bring attention to the

Re: Please review these pull requests (DMD #7097 & Phobos #5704)

2017-08-27 Thread Michael V. Franklin via Digitalmars-d
On Monday, 28 August 2017 at 00:21:00 UTC, Michael V. Franklin wrote: These pull request were submitted a few days ago, but appear to have gone unnoticed. https://github.com/dlang/dmd/pull/7097 https://github.com/dlang/phobos/pull/5704 I'm assuming that is because neither currently passes the

Re: D as a Better C

2017-08-23 Thread Michael V. Franklin via Digitalmars-d-announce
On Wednesday, 23 August 2017 at 17:44:31 UTC, Jonathan M Davis wrote: I confess that I tend to think of betterC as a waste of time. Clearly, there are folks who find it useful, but it loses so much that I see no point in using it for anything unless I have no choice. As long as attempts to

Re: dmd demangle

2017-08-30 Thread Michael V. Franklin via Digitalmars-d
On Thursday, 31 August 2017 at 02:20:00 UTC, Arun Chandrasekaran wrote: Just a thought. Can dmd demangle the symbols before spitting the output of ld to stderr? dmd doesn't print the output of ld to stderr, ld does. I believe binutils has some support for D symbol demangling thanks to the

Re: D as a Better C

2017-08-29 Thread Michael V. Franklin via Digitalmars-d-announce
On Wednesday, 30 August 2017 at 00:29:19 UTC, Parke wrote: But my original question was about what you (Kagamin) called "intermediate D". I was trying to understand what "intermediate D" is, and whether or not I could use "intermediate D" (whatever it is) to produce small(er) executables.

Re: dmd demangle

2017-08-30 Thread Michael V. Franklin via Digitalmars-d
On Thursday, 31 August 2017 at 02:51:25 UTC, Arun Chandrasekaran wrote: I was looking at src/ddmd/link.d, has the below that reads the output of ld. Ah, right you are. My apologies. It'd probably be simple enough to have that demangling on by default. Maybe I'll give it a go later today.

Re: Result of CTFE should be implicitly castable to immutable

2017-10-11 Thread Michael V. Franklin via Digitalmars-d
On Wednesday, 11 October 2017 at 14:30:54 UTC, Dmitry Olshansky wrote: My motivation is, of course, std.regex. static immutable r = regex("abc"); This is perfectly fine but because in general there is some amount of impurtiy in regex and it won't work. Yet regex is called at CTFE so there is

Re: Deprecate implicit `int` to `bool` conversion for integer literals

2017-11-15 Thread Michael V. Franklin via Digitalmars-d
On Tuesday, 14 November 2017 at 13:17:22 UTC, Steven Schveighoffer wrote: The array handling is probably the only part that would be painful. but we could handle that the same way we deprecated octal numbers: bools!"01001101"; => [false, true, false, false, true, true, false, true];

Re: Deprecate implicit `int` to `bool` conversion for integer literals

2017-11-14 Thread Michael V. Franklin via Digitalmars-d
On Tuesday, 14 November 2017 at 13:54:03 UTC, Steven Schveighoffer wrote: IMO, no character types should implicitly convert from integer types. In fact, character types shouldn't convert from ANYTHING (even other character types). We have so many problems with this. Is everyone in general

Re: Deprecate implicit `int` to `bool` conversion for integer literals

2017-11-14 Thread Michael V. Franklin via Digitalmars-d
On Tuesday, 14 November 2017 at 13:20:22 UTC, Nick Treleaven wrote: An very similar problem exists for int and char overloads: alias foo = (char c) => 1; alias foo = (int i) => 4; enum int e = 7; static assert(foo(e) == 4); // fails Wait a minute! This doesn't appear to be a casting or

Should aliasing a lambda expression be allowed?

2017-11-14 Thread Michael V. Franklin via Digitalmars-d
On Tuesday, 14 November 2017 at 23:41:39 UTC, Steven Schveighoffer wrote: An very similar problem exists for int and char overloads: alias foo = (char c) => 1; alias foo = (int i) => 4; enum int e = 7; static assert(foo(e) == 4); // fails Wait a minute!  This doesn't appear to be a casting

Re: Deprecate implicit `int` to `bool` conversion for integer literals

2017-11-14 Thread Michael V. Franklin via Digitalmars-d
On Tuesday, 14 November 2017 at 23:53:49 UTC, H. S. Teoh wrote: Argh, should've checked before I posted. What I meant was more something like this: import std.stdio; void f(dchar) { writeln("dchar overload"); } void f(ubyte) { writeln("ubyte overload"); } void

Re: Deprecate implicit `int` to `bool` conversion for integer literals

2017-11-14 Thread Michael V. Franklin via Digitalmars-d
On Wednesday, 15 November 2017 at 04:30:32 UTC, Walter Bright wrote: I just tried: import core.stdc.stdio; void foo(char c) { printf("char\n"); } void foo(int c) { printf("int\n"); } void main() { enum int e = 1; foo(e); foo(1); foo('c'); } and it prints: int

Re: Deprecate implicit `int` to `bool` conversion for integer literals

2017-11-14 Thread Michael V. Franklin via Digitalmars-d
On Wednesday, 15 November 2017 at 04:24:58 UTC, Walter Bright wrote: On 11/14/2017 5:20 AM, Nick Treleaven wrote: An very similar problem exists for int and char overloads: alias foo = (char c) => 1; alias foo = (int i) => 4; enum int e = 7; static assert(foo(e) == 4); // fails I cannot

Re: First Impressions!

2017-11-28 Thread Michael V. Franklin via Digitalmars-d
On Tuesday, 28 November 2017 at 19:34:27 UTC, A Guy With an Opinion wrote: I take it adding those inverse attributes is no trivial thing? It would require a DIP: https://github.com/dlang/DIPs This DIP is related (https://github.com/dlang/DIPs/blob/master/DIPs/DIP1012.md) but I don't know

Re: Floating point types default to NaN?

2017-11-28 Thread Michael V. Franklin via Digitalmars-d-learn
On Monday, 27 November 2017 at 23:05:55 UTC, Michael V. Franklin wrote: I think I'm going to implement a feature gate to require explicit initialization. It would be better to be strict up front and relax it as flow control analysis becomes more mature. Well, I implemented it

Re: DMD test suite assertion failure in test_cdvecfill.d

2017-11-25 Thread Michael V. Franklin via Digitalmars-d-learn
On Tuesday, 21 November 2017 at 10:04:50 UTC, Petar Kirov [ZombineDev] wrote: File a bug report and try contacting Martin Nowak, as he's the author of this test, IIRC. https://issues.dlang.org/show_bug.cgi?id=18013

A few DMD PRs needing attention. They are easy reviews.

2017-11-25 Thread Michael V. Franklin via Digitalmars-d
Fix compiler preferring `body` to `do` https://github.com/dlang/dmd/pull/7347 Fix issue 6400 - Better interaction between with() and opDispatch (Part 2) https://github.com/dlang/dmd/pull/7356 Fix Issue 15094 - __traits(getMember) fails when the source is a struct/class field

Re: Thoughts about D

2017-11-26 Thread Michael V. Franklin via Digitalmars-d
On Monday, 27 November 2017 at 00:14:40 UTC, IM wrote: - D is unnecessarily a huge language. I remember in DConf 2014, Scott Meyers gave a talk about the last thing D needs, which is a guy like him writing a lot of books covering the many subtleties of the language. However, it seems that the

Re: betterC and noboundscheck

2017-11-24 Thread Michael V. Franklin via Digitalmars-d-learn
On Wednesday, 22 November 2017 at 15:10:40 UTC, Oleg B wrote: import core.stdc.stdio; import std.algorithm : min; extern (C) void main() { char[256] buf; buf[] = '\0'; auto str = "hello world"; auto ln = min(buf.length, str.length); buf[0..ln] = str[0..ln];

Re: Can I count the of enum's fields at compile time?

2017-11-22 Thread Michael V. Franklin via Digitalmars-d-learn
On Thursday, 23 November 2017 at 00:58:21 UTC, Marc wrote: for example: enum A { a = -10, b = -11, c = -12, d = -13, e = -34} enum int countOfA = coutOfFields(A); // 5 fields https://dlang.org/spec/traits.html#allMembers enum A { a = -10, b = -11, c = -12, d = -13, e = -34} enum int

Re: Attributes on Enum Members: Call for use cases.

2017-11-29 Thread Michael V. Franklin via Digitalmars-d
On Tuesday, 28 November 2017 at 19:38:44 UTC, Meta wrote: I'd be interested in working on a DIP like this Michael, but I also want to expand the scope to allowing UDAs on function arguments as well. We should have some solid use cases in mind; let's take this to private email. I'm on IRC

Re: Floating point types default to NaN?

2017-11-28 Thread Michael V. Franklin via Digitalmars-d-learn
On Wednesday, 29 November 2017 at 01:24:21 UTC, A Guy With a Question wrote: I was just more curious of the design decisions that were made. So am I. I'm trying to get to the heart of in the the PR comments. Mike

Re: First Impressions!

2017-11-27 Thread Michael V. Franklin via Digitalmars-d
On Tuesday, 28 November 2017 at 03:01:33 UTC, A Guy With an Opinion wrote: + D code so far is pushing me towards more "flat" code (for a lack of a better way to phrase it) and so far that has helped tremendously when it comes to readability. C# kind is the opposite. With it's namespace ->

Re: First Impressions!

2017-11-27 Thread Michael V. Franklin via Digitalmars-d
On Tuesday, 28 November 2017 at 04:48:57 UTC, A Guy With an Opinion wrote: I'd be happy to submit an issue, but I'm not quite sure I'd be the best to determine an error message (at least not this early). Mainly because I have no clue what it was yelling at me about. I only new to add static

Re: Floating point types default to NaN?

2017-11-27 Thread Michael V. Franklin via Digitalmars-d-learn
On Saturday, 25 November 2017 at 22:13:43 UTC, Adam D. Ruppe wrote: It technically did: https://dlang.org/spec/function.html#local-variables "It is an error to use a local variable without first assigning it a value. The implementation may not always be able to detect these cases. Other

Re: UDAs on Enum Members: Does it require a DIP?

2017-11-27 Thread Michael V. Franklin via Digitalmars-d
On Sunday, 19 November 2017 at 13:35:13 UTC, Michael V. Franklin wrote: Apparently user-defined attributes are not permitted on enum members. Issue is documented here: https://issues.dlang.org/show_bug.cgi?id=9701 Pull request implementing the feature is here:

Attributes on Enum Members: Call for use cases.

2017-11-27 Thread Michael V. Franklin via Digitalmars-d
On Sunday, 19 November 2017 at 13:35:13 UTC, Michael V. Franklin wrote: What's the official word? Does it require a DIP? For those who might want to know, Walter has informed me that this change will require a DIP. I already have two DIPs in the queue right now, so I wouldn't mind if

Re: Thoughts about D

2017-11-29 Thread Michael V. Franklin via Digitalmars-d
On Wednesday, 29 November 2017 at 16:57:36 UTC, H. S. Teoh wrote: Doesn't this mean that we should rather focus our efforts on improving druntime instead of throwing out the baby with the bathwater with BetterC? Exactly! We should be making a better D, not a better C. Mike

Re: UDAs on Enum Members: Does it require a DIP?

2017-11-28 Thread Michael V. Franklin via Digitalmars-d
On Tuesday, 28 November 2017 at 01:49:19 UTC, Jonathan M Davis wrote: There is a definite difference between posting stuff in the newsgroup to get attention brought to something and posting in the newsgroup to get an official answer on something from Walter or Andrei. My question was on

Re: Thoughts about D

2017-12-03 Thread Michael V. Franklin via Digitalmars-d
On Sunday, 3 December 2017 at 12:20:14 UTC, Walter Bright wrote: It may indeed work to use a special druntime. My expectation, however, is that it's a lot more work trying to develop and support another runtime library, and a lot more work for the user trying to get that library worked into

Re: Enumerating unittests

2017-11-17 Thread Michael V. Franklin via Digitalmars-d
On Friday, 17 November 2017 at 08:12:13 UTC, Shachar Shemesh wrote: Is there a way to enumerate all the unittests in a specific module? Try this: https://dlang.org/spec/traits.html#getUnitTests Mike

DMD PR management hits a new low

2017-11-17 Thread Michael V. Franklin via Digitalmars-d
I'll just refer you to this comment: https://github.com/dlang/dmd/pull/6947#issuecomment-345423103 Manually merging this pull as it sat around long enough waiting to be marked approved that it accumulated github's max 1000 status updates per commit id and won't ever see more until a new

Re: writeln, alias this and dynamic arrays.

2017-11-16 Thread Michael V. Franklin via Digitalmars-d-learn
On Friday, 17 November 2017 at 02:13:54 UTC, matthewh wrote: [...] as is it produces: [1, 2, 3, 4, 5, 6, 7, 8] [] I expected it to produce: [1, 2, 3, 4, 5, 6, 7, 8] [1, 2, 3, 4, 5, 6, 7, 8] And with the toString override included it does. Why does the version without the toString override

Deprecate implicit `int` to `bool` conversion for integer literals

2017-11-11 Thread Michael V. Franklin via Digitalmars-d
What's the official word on this: https://github.com/dlang/dmd/pull/6404 Does it need a DIP? If I revive it will it go anywhere? What needs to be done to move it forward? Thanks, Mike

Re: Deprecate implicit `int` to `bool` conversion for integer literals

2017-11-12 Thread Michael V. Franklin via Digitalmars-d
On Sunday, 12 November 2017 at 13:34:50 UTC, Dmitry Olshansky wrote: However, I’d hate to rewrite things like: if (a & (flag1 | flag2)) to if ((a & (flag1 | flag2)) != 0) When the first is quite obvious. I don't think the proposal to deprecate integer literal conversions to `bool` would

Re: Deprecate implicit `int` to `bool` conversion for integer literals

2017-11-12 Thread Michael V. Franklin via Digitalmars-d
On Sunday, 12 November 2017 at 13:49:51 UTC, Michael V. Franklin wrote: I don't think the proposal to deprecate integer literal conversions to `bool` would affect that as there doesn't appear to be an integer literal in the code. Nevermind. I see what you mean now. Mike

Re: Zig mentions D in justifying its existence

2017-11-13 Thread Michael V. Franklin via Digitalmars-d
On Monday, 13 November 2017 at 16:12:42 UTC, Joakim wrote: Probably a good sign that they mention D with C++ and Rust and have looked at D features: https://github.com/zig-lang/zig/wiki/Why-Zig-When-There-is-Already-CPP%2C-D%2C-and-Rust%3F "D has @property functions, which are methods that

Re: Deprecate implicit `int` to `bool` conversion for integer literals

2017-11-13 Thread Michael V. Franklin via Digitalmars-d
On Saturday, 11 November 2017 at 23:30:18 UTC, Andrei Alexandrescu wrote: A DIP is necessary for all language changes. In this case a short and well-argued DIP seems to be the ticket. Walter and I spoke and such a proposal has a good chance to be successful. Subject issues:

Re: Deprecate implicit `int` to `bool` conversion for integer literals

2017-11-14 Thread Michael V. Franklin via Digitalmars-d
On Tuesday, 14 November 2017 at 13:32:52 UTC, Andrei Alexandrescu wrote: An very similar problem exists for int and char overloads: alias foo = (char c) => 1; alias foo = (int i) => 4; enum int e = 7; static assert(foo(e) == 4); // fails Thanks. Addressing this should be part of the DIP as

Re: New LDC feature: dynamic compilation

2017-11-13 Thread Michael V. Franklin via Digitalmars-d-announce
On Monday, 13 November 2017 at 19:04:16 UTC, Ivan Butygin wrote: You need to explicitly compile `@dynamicCompile` functions before using any of them. Interesting feature. So is the executable linked to an installed instance of LDC/LLVM to make this happen, or is there some limited compiler

Re: Deprecate implicit `int` to `bool` conversion for integer literals

2017-11-14 Thread Michael V. Franklin via Digitalmars-d
On Tuesday, 14 November 2017 at 13:43:32 UTC, Michael V. Franklin wrote: An very similar problem exists for int and char overloads: alias foo = (char c) => 1; alias foo = (int i) => 4; enum int e = 7; static assert(foo(e) == 4); // fails Thanks. Addressing this should be part of the DIP as

DMD test suite assertion failure in test_cdvecfill.d

2017-11-20 Thread Michael V. Franklin via Digitalmars-d-learn
I'm getting this error when I try to run the DMD test suite. cd dmd make -C test -f Makefile ... runnable/test_cdvecfill.d -O (-mcpu=avx -mcpu=avx2) Test failed. The logged output: ../src/dmd -conf= -m64 -Irunnable -O -odtest_results/runnable -oftest_results/runnable/test_cdvecfill_0

UDAs on Enum Members: Does it require a DIP?

2017-11-19 Thread Michael V. Franklin via Digitalmars-d
Apparently user-defined attributes are not permitted on enum members. Issue is documented here: https://issues.dlang.org/show_bug.cgi?id=9701 Pull request implementing the feature is here: https://github.com/dlang/dmd/pull/6161 The pull request seems to have stalled over how to get the

Question about deprecation process

2017-11-18 Thread Michael V. Franklin via Digitalmars-d
I've resurrected a PR that fixes an implementation bug. https://github.com/dlang/dmd/pull/7332 The existing implementation does not comply with the spec. The PR fixes that, but it may cause breakage, so in the original PR, there was a preference to have it go through the deprecation

Re: [OT] D merch

2017-11-19 Thread Michael V. Franklin via Digitalmars-d
On Monday, 20 November 2017 at 05:16:22 UTC, Walter Bright wrote: Anyone know how to get the .svg file from this? My attempts have failed :-( I took this out of the page source. https://web.archive.org/web/20050213192555if_/http://w148.de:80/~mmartin/d/dlogo.svg Mike

Re: UDAs on Enum Members: Does it require a DIP?

2017-11-19 Thread Michael V. Franklin via Digitalmars-d
On Sunday, 19 November 2017 at 15:57:58 UTC, Jonathan M Davis wrote: It isn't specific to UDAs. You can't put _any_ attributes on enums - including something like deprecated (though to be fair, not many attributes would make sense on an enum member).

Re: Deprecate implicit `int` to `bool` conversion for integer literals

2017-11-15 Thread Michael V. Franklin via Digitalmars-d
On Thursday, 16 November 2017 at 07:24:44 UTC, Andrei Alexandrescu wrote: Try it here: https://run.dlang.io/is/nfMGfG DMD-nightly Cool, thanks. That seems to be an unrelated bug. Have you added it to bugzilla? Thanks! -- Andrei Bugzilla Issue is here:

Introducing Nullable Reference Types in C#. Is there hope for D, too?

2017-11-16 Thread Michael V. Franklin via Digitalmars-d
I ran into this blog post today: https://blogs.msdn.microsoft.com/dotnet/2017/11/15/nullable-reference-types-in-csharp/ It peeked my interested, because when I first started studying D, the lack of any warning or error for this trivial case surprised me. // Example A class Test { int

Re: writeln, alias this and dynamic arrays.

2017-11-16 Thread Michael V. Franklin via Digitalmars-d-learn
On Friday, 17 November 2017 at 02:13:54 UTC, matthewh wrote: And with the toString override included it does. Why does the version without the toString override output an empty array? I think that is due to this bug: https://issues.dlang.org/show_bug.cgi?id=13189 It's actually on my todo

Re: writeln, alias this and dynamic arrays.

2017-11-16 Thread Michael V. Franklin via Digitalmars-d-learn
On Friday, 17 November 2017 at 02:16:35 UTC, Michael V. Franklin wrote: On Friday, 17 November 2017 at 02:13:54 UTC, matthewh wrote: And with the toString override included it does. Why does the version without the toString override output an empty array? I think that is due to this bug:

Re: Deprecate implicit `int` to `bool` conversion for integer literals

2017-11-12 Thread Michael V. Franklin via Digitalmars-d
On Sunday, 12 November 2017 at 16:57:05 UTC, Andrei Alexandrescu wrote: A DIP could be formulated to only address the problem at hand. BTW, here's a really fun example: void fun(long) { assert(0); } void fun(bool) {} enum int a = 2; enum int b = 1; void main() { fun(a - b); } The

Re: Compiler magic for preventing memory access re-ordering _by the compiler_ (keywords: memory model, compiler optimisations, memory order)

2017-11-05 Thread Michael V. Franklin via Digitalmars-d-learn
On Monday, 6 November 2017 at 03:40:23 UTC, Cecil Ward wrote: Is there a magic visible sign (or even one needed) in the D language that tells D _compilers_ not to move certain types of memory load / store operations forwards or backwards relative to other operations when optimising the code

Re: Compiler magic for preventing memory access re-ordering _by the compiler_ (keywords: memory model, compiler optimisations, memory order)

2017-11-05 Thread Michael V. Franklin via Digitalmars-d-learn
On Monday, 6 November 2017 at 05:54:00 UTC, Michael V. Franklin wrote: On Monday, 6 November 2017 at 03:40:23 UTC, Cecil Ward wrote: Is there a magic visible sign (or even one needed) in the D language that tells D _compilers_ not to move certain types of memory load / store operations

Re: Any book recommendation for writing a compiler?

2017-11-01 Thread Michael V. Franklin via Digitalmars-d-learn
On Wednesday, 1 November 2017 at 20:53:44 UTC, Dr. Assembly wrote: Hey guys, if I were to get into dmd's source code to play a little bit (just for fun, no commercial use at all), which books/resources do you recommend to start out? I found this to be quite helpful:

Re: Conditional compilation of array of structs initializer

2017-11-09 Thread Michael V. Franklin via Digitalmars-d-learn
On Friday, 10 November 2017 at 06:22:51 UTC, Tony wrote: Doing a port of some C code that has an #ifdef in the middle of an initialization for an array of structs. I am getting a compile error trying to get equivalent behavior with "static if" or "version". Is there a way to achieve this other

Re: Thoughts about D

2017-12-03 Thread Michael V. Franklin via Digitalmars-d
On Sunday, 3 December 2017 at 23:34:13 UTC, Walter Bright wrote: If -betterC motivates people to come up with better solutions, I'm all for it. A better solution would be to do what Iain said: Try compiling a simple "hello world" with an empty object.d file. Then inspect what the compiler

Re: Thoughts about D

2017-12-03 Thread Michael V. Franklin via Digitalmars-d
On Monday, 4 December 2017 at 00:25:53 UTC, Michael V. Franklin wrote: A better solution would be to do what Iain said: Try compiling a simple "hello world" with an empty object.d file. Then inspect what the compiler does. Does it error and exit, or does it ICE? What can be done to

Re: Thoughts about D

2017-12-03 Thread Michael V. Franklin via Digitalmars-d
On Monday, 4 December 2017 at 01:01:47 UTC, Michael V. Franklin wrote: .$> dmd -defaultlib= -debuglib= -conf= main.d -of=main /usr/bin/ld: main.o: relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: final link failed: