Re: dfmt 0.1.0

2015-03-07 Thread FG via Digitalmars-d-announce

On 2015-03-07 at 07:51, Russel Winder via Digitalmars-d-announce wrote:

Many C++  projects are returning to it, Go enforces it if you let it,
many Python projects are starting to use it in spite of PEP-8.


Now, that you mentioned Python, it was one of the main reasons why I moved away 
from tabs. I was used to tab-completion in the shell and Python's interactive 
interpreter (and didn't want to rebind that feature to some key combination on 
every system that I worked with). Whenever I copied chunks of tab-indented 
source code into the interpreter, it got screwed up, because the indentations 
had vanished, so eventually I switched to using spaces only and had no problems 
ever since.


I can also say from experience that removing tabs from Phobos source has removed
a lot of irritation with messed up code rendering and wasted effort arguing
about it. We're not going back :-)


And I am not going to work on Phobos for exactly the same reasons. My
loss, not yours.


You must be joking. :)

If at all, the problem with Phobos' style isn't with horizontal spacing but 
vertical space.
Consider the waste of space below. Too much scrolling and I lose focus. Now, 
*that* is really irritating. ;)


struct Boo
{
int a;
}

struct Foo
{
int a;
auto opAssign(Foo foo)
{
assert(0);
}
auto opEquals(Foo foo)
{
return a == foo.a;
}
}

X calculate(Range)(Range r)
{
static if (something)
{
import whatever;

auto result = xxx();

size_t i;
foreach (e; r)
{
doSomething(result[i], e);
++i;
}
return result;
}
else
{
auto a = blah();
foreach (e; r)
{
a.put(e);
}
return a.data;
}
}


Re: Reloaded for dub

2015-02-20 Thread FG via Digitalmars-d-announce

On 2015-02-20 at 15:00, Kingsley wrote:

Just thought I would share this in case anyone else finds it useful. I wrote a 
tiny utility that detects changes to D files and then rebuilds and re-executes 
the main binary using dub.


I see two problems:

1. It doesn't sleep for a few seconds after detecting that a file has changed, 
so when you upload several changed source files, recompilation may start before 
all of them are updated and either fail or produce something strange.

2. It works like this:

if (changed) { kill(projectName); build()  run(projectName); sleep(); }

As a result, if the compilation fails, no application will be running. Probably 
a better approach would be to have the application copied to a different place 
and run from there. Then the loop would look like this (I also added an extra 
unittest run before the running application is replaced):

if (changed) { sleep(); build()  test()  kill(dest)  copy(projectName, dest) 
 run(dest); sleep(); }

In this approach your program is almost always running. You only have to figure 
out how to provide `dest`. Perhaps via command line arguments where you provide 
a path (or just a directory).


Re: DStep - Bindings Generator 0.0.1

2015-02-03 Thread FG via Digitalmars-d-announce

On 2015-02-03 at 14:05, Mike Parker wrote:

On 2/3/2015 7:01 PM, Chris wrote:


And still nobody knows what DStep is all about?


  Define nobody. I've known about it for quite a while now.


Well, there is someone called nobody on the D forums... :)
He might know about DStep, and that would make the sentence true.


Re: This Week in D: Issue #4

2015-02-02 Thread FG via Digitalmars-d-announce

On 2015-02-02 at 05:57, Adam D. Ruppe wrote:

I can't believe it, but yet another week has already passed, so up late to 
release this again!

http://arsdnet.net/this-week-in-d/feb-01.html


It's great! I have to wonder though, why have you chosen this naming 
convention: jan-12, jan-18, jan-25, feb-01, ... instead of just 1, 2, ... ? 
That would make navigation between issues much easier, even without the page 
with a list of all issues (which I am unable to find).  :)


Re: Sociomantic: We're looking for a Software Developer! (D language)

2015-01-08 Thread FG via Digitalmars-d-announce

On 2015-01-08 14:01 Joseph Rushton Wakeling wrote:

Just to mention that this call is particularly focused on getting
new people for my team at Sociomantic.


There is one important piece of information missing:
Are you still using only D1?
If not, how is your code base currently split into D1 and D2?