D : dmd vs gdc : which one to choose?

2015-02-19 Thread Mayuresh Kathe via Digitalmars-d-learn

How do I (a newbie to D) figure out which compiler set to use?
I am running Ubuntu 14.10, and intend to stick with it in the 
long term.

Should I choose DMD or go with GDC?
I would like to know the rationale for suggestions for either.

Thanks.


Re: D : dmd vs gdc : which one to choose?

2015-02-19 Thread Rikki Cattermole via Digitalmars-d-learn

On 19/02/2015 9:46 p.m., Mayuresh Kathe wrote:

How do I (a newbie to D) figure out which compiler set to use?
I am running Ubuntu 14.10, and intend to stick with it in the long term.
Should I choose DMD or go with GDC?
I would like to know the rationale for suggestions for either.

Thanks.


Atleast while learning stick with dmd.
It is the reference compiler. There are far more developers involved in 
its production then GDC.


And anyway, GDC is still hasn't been updated to the latest version of D. 
And its the last major D compiler that hasn't.


There is a D-apt repository, which will interest you.
http://d-apt.sourceforge.net/


[Issue 14179] Posix x86_64 varargs prolog clobbers RDX

2015-02-19 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14179

--- Comment #4 from github-bugzi...@puremagic.com ---
Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/0687872a11386f5cb9da0d88af59cf460badf2d7
Fix Issue 14179 - Posix x86_64 varargs prolog clobbers RDX

RDX is used in the prolog but may be used to pass named arguments.  When used
for a named argument, store in R11 during prolog.

https://github.com/D-Programming-Language/dmd/commit/d08a9afeb7670aae4a6a7c74518b94a937bd96a6
Merge pull request #4413 from yebblies/issue14179

Issue 14179 - Posix x86_64 varargs prolog clobbers RDX

--


Re: Is this possible in D?

2015-02-19 Thread tcak via Digitalmars-d-learn
On Thursday, 19 February 2015 at 08:24:08 UTC, Jonathan Marler 
wrote:
I am having a heck of a time trying to figure out how to do 
this.
 How do I change the attributes of a function based on the 
version without copying the function body?  For example:


version(StaticVersion) {
static void myLongFunction()
{
// long body ...
}
} else {
void myLongFunction()
{
// same long body copied...
}
}

In one version I want the function to be static and in another 
I don't want it to be static.  I cannot figure out how to do 
this without copy/pasting the entire function body to both 
versions.


Same problem is seen with shared and non-shared class methods 
as well. I hope there is a good solution for it.


If it was C, by using #ifdef #else #endif, just the name line of 
function could be changed, but I am not sure whether that works 
with version() expression.


[Issue 14056] std.array.assocArray with a const value

2015-02-19 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14056

--- Comment #4 from Ulrich Küttler kuett...@gmail.com ---
(In reply to Martin Nowak from comment #3)
 You know where it was introduced? We shouldn't switch from working to
 not-working without a deprecation phase.

Unfortunately not, I do not know what changed here.

--


Is this possible in D?

2015-02-19 Thread Jonathan Marler via Digitalmars-d-learn
I am having a heck of a time trying to figure out how to do this. 
 How do I change the attributes of a function based on the 
version without copying the function body?  For example:


version(StaticVersion) {
static void myLongFunction()
{
// long body ...
}
} else {
void myLongFunction()
{
// same long body copied...
}
}

In one version I want the function to be static and in another I 
don't want it to be static.  I cannot figure out how to do this 
without copy/pasting the entire function body to both versions.


Re: D : dmd vs gdc : which one to choose?

2015-02-19 Thread Dicebot via Digitalmars-d-learn
On Thursday, 19 February 2015 at 08:46:11 UTC, Mayuresh Kathe 
wrote:

How do I (a newbie to D) figure out which compiler set to use?
I am running Ubuntu 14.10, and intend to stick with it in the 
long term.

Should I choose DMD or go with GDC?
I would like to know the rationale for suggestions for either.

Thanks.


GDC:

+ generates faster code
+ supports many of low-level GCC flags for code generation tuning
+ more platforms (ARM, MIPS)
- slow compilation
- updates to latest language version with considerable delay

DMD:
+ very fast edit/compile cycle
+ reference compiler
- ancient code generation backend
- not many ways to affect generated code (outside of -O -inline)

It is common to use DMD for development and GDC for building 
actual release binaries.


Re: D and GPGPU

2015-02-19 Thread Paulo Pinto via Digitalmars-d

On Wednesday, 18 February 2015 at 18:14:19 UTC, luminousone wrote:
On Wednesday, 18 February 2015 at 15:15:21 UTC, Russel Winder 
wrote:
It strikes me that D really ought to be able to work with 
GPGPU – is
there already something and I just failed to notice. This is 
data
parallelism but of a slightly different sort to that in 
std.parallelism.
std.concurrent, std.parallelism, std.gpgpu ought to be 
harmonious

though.

The issue is to create a GPGPU kernel (usually C code with 
bizarre data
structures and calling conventions) set it running and then 
pipe data in
and collect data out – currently very slow but the next 
generation of
Intel chips will fix this (*). And then there is the 
OpenCL/CUDA debate.


Personally I think OpenCL, for all it's deficiencies, as it is 
vendor
neutral. CUDA binds you to NVIDIA. Anyway there is an NVIDIA 
back end
for OpenCL. With a system like PyOpenCL, the infrastructure 
data and
process handling is abstracted, but you still have to write 
the kernels
in C. They really ought to do a Python DSL for that, but… So 
with D can
we write D kernels and have them compiled and loaded using a 
combination

of CTFE, D → C translation, C ompiler call, and other magic?

Is this a GSoC 2015 type thing?


(*) It will be interesting to see how NVIDIA responds to the 
tack Intel

are taking on GPGPU and main memory access.


https://github.com/HSAFoundation

This is really the way to go, yea opencl and cuda exist, along 
with opengl/directx compute shaders, but pretty much every 
thing out their suffers from giant limitations.


With HSA, HSAIL bytecode is embedded directly into the elf/exe 
file, HASIL bytecode can can fully support all the features of 
c++, virtual function lookups in code, access to the stack, 
cache coherent memory access, the same virtual memory view as 
the application it runs in, etc.


HSA is implemented in the llvm backend compiler, and when it is 
used in a elf/exe file, their is a llvm based finalizer that 
generates gpu bytecode.


More importantly, it should be very easy to implement in any 
llvm supported language once all of the patches are moved up 
stream to their respective libraries/toolsets.


I believe that linux kernel 3.19 and above have the iommu 2.5 
patches, and I think amd's radeon KFD driver made it into 3.20. 
HSA will also be supported by ARM.


HSA is generic enough, that assuming Intel implements similar 
capabilities into their chips it otta be supportable their with 
or without intels direct blessing.


HSA does work with discrete gpu's and not just the embedded 
stuff, And I believe that HSA can be used to accelerate OpenCL 
2.0, via copyless cache coherent memory access.


Java will support HSA as of Java 9 - 10, depending on project's 
progress.


http://openjdk.java.net/projects/sumatra/

https://wiki.openjdk.java.net/display/Sumatra/Main

--
Paulo


[Issue 14192] Access Violation when assigning to shared AA

2015-02-19 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14192

--- Comment #7 from github-bugzi...@puremagic.com ---
Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/5afc1177551fa8f6e43bb1fc499698eaab41655a
fix Issue 14192 - Access Violation when assigning to shared AA

- the runtime expects an unqualified TypeInfo for the AA and crashes
  if it is wrapped inside a TypeInfo_Shared

https://github.com/D-Programming-Language/dmd/commit/4091ddc1af08f3a65512e41a19ffda06335471c2
Merge pull request #4420 from MartinNowak/fix14192

fix Issue 14192 - Access Violation when assigning to shared AA

--


Re: D : dmd vs gdc : which one to choose?

2015-02-19 Thread bearophile via Digitalmars-d-learn

Mayuresh Kathe:


Should I choose DMD or go with GDC?


It's a good idea to use all available compilers. LDC and DMD are 
both useful. Every one of them has advantages and disadvantages.


Bye,
bearophile


Re: Google Summer of Code - Again

2015-02-19 Thread CraigDillabaugh via Digitalmars-d

On Thursday, 19 February 2015 at 19:22:11 UTC, Martin Nowak wrote:
On Thursday, 19 February 2015 at 19:19:51 UTC, Martin Nowak 
wrote:

dawg


BTW, please mail me for urgent stuff 'code dawg eu'.


I should have guessed that!  Anyway, I've now added you, I guess 
you need to log in to formally accept the invite to be admin.  My 
display says you are an admin anyway.


Cheers,

Craig


[Issue 14201] New: fatal error LNK1235: corrupt or invalid COFF symbol table

2015-02-19 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14201

  Issue ID: 14201
   Summary: fatal error LNK1235: corrupt or invalid COFF symbol
table
   Product: D
   Version: D2
  Hardware: x86_64
OS: Windows
Status: NEW
  Severity: blocker
  Priority: P1
 Component: DMD
  Assignee: nob...@puremagic.com
  Reporter: etci...@gmail.com

While compiling the Botan D library on Win64 with COFF, I encountered a linker
error:

fatal error LNK1235: corrupt or invalid COFF symbol table

The only way to remove the error is to remove symbols in the application. I
have no way of producing a test case, because it's an error inherent to very
large applications with a big amount of symbols.

--


Re: State of Windows x64 COFF support?

2015-02-19 Thread Etienne via Digitalmars-d-learn

On 2015-02-19 1:41 PM, ketmar wrote:


i remember that DMD creates one section for each function (to allow
smartlink feature). with templates this can be alot. maybe it needs new
cli flag --collapse-sections or something like it.



I watched the section names and discovered over 20,000 sections named : 
.debug$S


According to the code, a new .debug$S section is created every time it 
is searched with the flag IMAGE_SCN_LNK_COMDAT in:


https://github.com/D-Programming-Language/dmd/blob/de6fccf8391b1dfdb959fa0f089920c2c8e6aff8/src/backend/mscoffobj.c#L1724

I deleted this flag and now the program links correctly with COFF with 
50k sections.


It would have been easier to debug with an error in mscoffobj.c:1591:

assert(scnhdr_cnt  65536, Too many symbols for COFF format);

https://github.com/D-Programming-Language/dmd/blob/de6fccf8391b1dfdb959fa0f089920c2c8e6aff8/src/backend/mscoffobj.c#L1591

With this simple patch on the compiler, there are stil some errors 
compiling Botan on win64, but they are not related to the COFF format 
anymore.


Re: Google Summer of Code - Again

2015-02-19 Thread Martin Nowak via Digitalmars-d

On Thursday, 19 February 2015 at 19:19:51 UTC, Martin Nowak wrote:

dawg


BTW, please mail me for urgent stuff 'code dawg eu'.


Re: contiguous ranges

2015-02-19 Thread Pasqui23 via Digitalmars-d
On Thursday, 19 February 2015 at 11:20:13 UTC, Guillaume Chatelet 
wrote:




From this discussion I understand you mainly want to be able to 
BitBlt ranges

http://en.wikipedia.org/wiki/Bit_blit

BitBlt covers multi dimensional arrays as well (2D textures) 
and might convey the semantic you want better than Contiguous 
(too fine grained ?).


Effectively bit blit range is a better name than contiguous 
range,but as I have said this and range castable to T[] are not 
mutually exclusive concepts.
Also the blitting term is already used in D (post-blit 
constructor).
Unfotunately the post-blit constructor covers only the copy of 
structures(like smart pointers)and is inadequate for ranges(it 
would be surprising if

auto cp=r;
would copy the entire range and not the position in the container 
only).


Re: contiguous ranges

2015-02-19 Thread Andrei Alexandrescu via Digitalmars-d

On 2/19/15 11:29 AM, Pasqui23 wrote:

On Thursday, 19 February 2015 at 11:20:13 UTC, Guillaume Chatelet wrote:



From this discussion I understand you mainly want to be able to BitBlt
ranges
http://en.wikipedia.org/wiki/Bit_blit

BitBlt covers multi dimensional arrays as well (2D textures) and might
convey the semantic you want better than Contiguous (too fine grained ?).


Effectively bit blit range is a better name than contiguous range,but as
I have said this and range castable to T[] are not mutually exclusive
concepts.


I don't see a need for contiguous ranges if the only embodiment is T[]. 
-- Andrei


Re: Google Summer of Code - Again

2015-02-19 Thread Martin Nowak via Digitalmars-d
On Thursday, 19 February 2015 at 18:31:53 UTC, CraigDillabaugh 
wrote:

Can I get your Username?


dawg


[Issue 14201] fatal error LNK1235: corrupt or invalid COFF symbol table

2015-02-19 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14201

--- Comment #1 from Etienne etci...@gmail.com ---
Proposed fix: https://github.com/D-Programming-Language/dmd/pull/4422

--


Re: let (x,y) = ...

2015-02-19 Thread ponce via Digitalmars-d-announce

On Thursday, 19 February 2015 at 04:38:32 UTC, thedeemon wrote:
Creating tuples and returning them from functions is trivial in 
D:


auto getTuple() { return tuple(Bob, 42); }

but using them afterwards can be confusing and error prone

auto t = getTuple();
writeln(name is , t[0],  age is , t[1]);

I really missed the ML syntax to write

let (name, age) = getTuple();

Turns out this is ridiculously easy to implement in D, so 
here's my very tiny module for this:


https://bitbucket.org/infognition/dstuff/src (scroll down to 
letassign.d)


It allows you to write:

int x, y, z, age;
string name;

let (name, age) = getTuple();   // tuple
let (x,y,z) = argv[1..4].map!(to!int);  // lazy range
let (x,y,z) = [1,2,3];  // array

SomeStruct s;
let (s.a, s.b) = tuple(3, piggies);

If a range or array doesn't have enough elements, this thing 
will throw, and if it's not desired there's

let (x,y,z)[] = ...
variant that uses just the available data and keeps the rest 
variables unchanged.


That's pretty neat! May I turn this code into a d-idioms? Name 
and link will be kept of course.


Re: Is this possible in D?

2015-02-19 Thread John Colvin via Digitalmars-d-learn

On Thursday, 19 February 2015 at 09:38:48 UTC, Mike Parker wrote:
On Thursday, 19 February 2015 at 08:24:08 UTC, Jonathan Marler 
wrote:
I am having a heck of a time trying to figure out how to do 
this.
How do I change the attributes of a function based on the 
version without copying the function body?  For example:


version(StaticVersion) {
   static void myLongFunction()
   {
   // long body ...
   }
} else {
   void myLongFunction()
   {
   // same long body copied...
   }
}

In one version I want the function to be static and in another 
I don't want it to be static.  I cannot figure out how to do 
this without copy/pasting the entire function body to both 
versions.


You should be able to cobble something together with string 
mixins.


I'm still holding out hope for some sort of .codeof


Re: contiguous ranges

2015-02-19 Thread Guillaume Chatelet via Digitalmars-d

On Monday, 16 February 2015 at 06:06:19 UTC, Vlad Levenfeld wrote:
Since C++17, there's a new iterator category: the contiguous 
iterator. Check it out: 
http://en.cppreference.com/w/cpp/iterator


So, by extension, I think a ContiguousRange would be any 
RandomAccessRange which has a member called ptr which supports 
a dereferencing operator * that yields an ElementType!R. This 
notion is useful for functions which might otherwise perform an 
element-by-element transfer to an OutputRange via put, instead 
perform an optimized batch transfer directly to a 
ContiguousRange via ptr. (Not that Contiguous implies Output; 
this example assumes the ContigiousRange has enough length to 
accomodate the transfer or otherwise has mutable length, e.g. 
builtin arrays.)


I've been using the idea implicitly in my code with static if 
(is (typeof(*R.init.ptr) == ElementType!R)), but seeing that 
table made me realize it could be formally abstracted out to a 
range concept.


From this discussion I understand you mainly want to be able to 
BitBlt ranges

http://en.wikipedia.org/wiki/Bit_blit

BitBlt covers multi dimensional arrays as well (2D textures) and 
might convey the semantic you want better than Contiguous (too 
fine grained ?).


Also the blitting term is already used in D (post-blit 
constructor).


Re: Plan for Exceptions and @nogc?

2015-02-19 Thread via Digitalmars-d

On Wednesday, 18 February 2015 at 20:25:07 UTC, Dicebot wrote:

On Wednesday, 18 February 2015 at 18:26:34 UTC, deadalnix wrote:

On Wednesday, 18 February 2015 at 14:46:30 UTC, Dicebot wrote:
From my POV best proposal from last lengthy discussion was to 
enable reference-counted non-gc-heap Exceptions. But that 
needs a language change because RefCounted!T is a struct and 
thus neither can be thrown nor can be part of Throwable class 
hierarchy.




This is not satisfactory. First there is no safe way to 
refcount right now. Second, this has all kind of implication 
for the GC to scan the heap and so on. Finally this do not 
solve the type qualifier problem.


I don't think a language change to do this pay for itself. i 
understand the appeal, as this is probably simpler to 
implement than the alternative, but that is really building 
technical debt.


Right now I don't care for full memory safety or type safety of 
any proposed solution. I will be glad to have any that actually 
works - and I have not heard of any idea that allows to do that 
without language changes. Your push for owned is also hardly 
relevant because exceptions are good examples of data with 
shared / non-determenistic ownership and thus won't benefit 
from it.


Non-deterministic ownership is exactly what the owned concept 
helps with, because it allows to delay deciding on an actual 
management mechanism until it reaches the consumer. When someone 
catches an owned exception, they can then choose to store it in a 
non-owned variable (= making it GC owned), in a ref-counted 
(which then takes ownership), or to not store it at all, in which 
case it will get released automatically when the catch block is 
left. Before that decision is made, it can still be used without 
losing the owned property, by passing it as a scope parameter 
(or storing it in a scope variable).


Re: let (x,y) = ...

2015-02-19 Thread bearophile via Digitalmars-d-announce

Kagamin:


Doesn't let normally declare a new variable?


You are right, yours is a valid point... So tie could be a 
better name after all.


Bye,
bearophile


Re: let (x,y) = ...

2015-02-19 Thread bearophile via Digitalmars-d-announce

Ola Fosheim Grøstad:


Maybe change the name to tie:

http://www.cplusplus.com/reference/tuple/tie/

?


I prefer let, it's much more traditional and descriptive. C++ 
standard library is often a bad example to follow...


Bye,
bearophile


Re: let (x,y) = ...

2015-02-19 Thread Kagamin via Digitalmars-d-announce

On Thursday, 19 February 2015 at 10:52:40 UTC, Kagamin wrote:

On Thursday, 19 February 2015 at 09:50:25 UTC, bearophile wrote:
I prefer let, it's much more traditional and descriptive. 
C++ standard library is often a bad example to follow...


Doesn't let normally declare a new variable?


http://ideone.com/iBzuiG - how let works in javascript.


Problem Instantiating a BinaryHeap with a Comparison Function the needs this

2015-02-19 Thread Nordlöw
I can understand how to correctly define an instance of 
BinaryHeap in my class DijkstraWalker at


https://github.com/nordlow/justd/blob/master/knet/traversal.d#L264

because the comparsion function can't ge access to the class 
member distMap


I get the error

need 'this' for 'distMap' of type 'Tuple!(double, 
Ref!(Node))[Ref!(Node)]'


What to do?


Re: let (x,y) = ...

2015-02-19 Thread bearophile via Digitalmars-d-announce

Mengu:


that's a great example to show d's strength. thank you.


It's also a great way to show what's missing in D syntax.

Bye,
bearophile


Re: Is this possible in D?

2015-02-19 Thread Mike Parker via Digitalmars-d-learn
On Thursday, 19 February 2015 at 08:24:08 UTC, Jonathan Marler 
wrote:
I am having a heck of a time trying to figure out how to do 
this.
 How do I change the attributes of a function based on the 
version without copying the function body?  For example:


version(StaticVersion) {
static void myLongFunction()
{
// long body ...
}
} else {
void myLongFunction()
{
// same long body copied...
}
}

In one version I want the function to be static and in another 
I don't want it to be static.  I cannot figure out how to do 
this without copy/pasting the entire function body to both 
versions.


You should be able to cobble something together with string 
mixins.


Re: let (x,y) = ...

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

On Thursday, 19 February 2015 at 04:38:32 UTC, thedeemon wrote:

let (name, age) = getTuple();


Maybe change the name to tie:

http://www.cplusplus.com/reference/tuple/tie/

?


Re: let (x,y) = ...

2015-02-19 Thread Kagamin via Digitalmars-d-announce

On Thursday, 19 February 2015 at 09:50:25 UTC, bearophile wrote:
I prefer let, it's much more traditional and descriptive. C++ 
standard library is often a bad example to follow...


Doesn't let normally declare a new variable?


Re: let (x,y) = ...

2015-02-19 Thread Mengu via Digitalmars-d-announce

On Thursday, 19 February 2015 at 04:38:32 UTC, thedeemon wrote:
Creating tuples and returning them from functions is trivial in 
D:


auto getTuple() { return tuple(Bob, 42); }

but using them afterwards can be confusing and error prone

auto t = getTuple();
writeln(name is , t[0],  age is , t[1]);

I really missed the ML syntax to write

let (name, age) = getTuple();

Turns out this is ridiculously easy to implement in D, so 
here's my very tiny module for this:


https://bitbucket.org/infognition/dstuff/src (scroll down to 
letassign.d)


It allows you to write:

int x, y, z, age;
string name;

let (name, age) = getTuple();   // tuple
let (x,y,z) = argv[1..4].map!(to!int);  // lazy range
let (x,y,z) = [1,2,3];  // array

SomeStruct s;
let (s.a, s.b) = tuple(3, piggies);

If a range or array doesn't have enough elements, this thing 
will throw, and if it's not desired there's

let (x,y,z)[] = ...
variant that uses just the available data and keeps the rest 
variables unchanged.


that's a great example to show d's strength. thank you.


Re: let (x,y) = ...

2015-02-19 Thread Kagamin via Digitalmars-d-announce

Or even more obvious (VBA,TSQL):

set (x,y,z) = [1,2,3];


Re: [NEEDING HELP] Translation of Ali Cehreli's book in French

2015-02-19 Thread Raphaël Jakse via Digitalmars-d

Le 18/02/2015 17:58, Olivier Pisano a écrit :

On Tuesday, 17 February 2015 at 22:46:01 UTC, Raphaël Jakse wrote:


To begin the translation of a chapter, I suggest you tell it here so
two people are not translating the same chapter at the same time.


Ok, I am gonna start with the Variable number of parameters chapter,
then.
I am thinking about using ODT/LibreOffice at the moment, since I don't
know much about whata and don't have a bitbucket account yet. I'll get
into this when I have some translated work to show.

Regards,

Olivier


Ok, great!

I didn't expected anybody to no much about whata, it still lacks 
documentation.


I don't think a bitbucket or a gitorious account is necessary, you just 
need to download a file, translate it and send it to me by e-mail if you 
want to work that way


Re: Plan for Exceptions and @nogc?

2015-02-19 Thread via Digitalmars-d

On Wednesday, 18 February 2015 at 20:47:36 UTC, deadalnix wrote:

On Wednesday, 18 February 2015 at 20:25:07 UTC, Dicebot wrote:
Right now I don't care for full memory safety or type safety 
of any proposed solution. I will be glad to have any that 
actually works - and I have not heard of any idea that allows 
to do that without language changes. Your push for owned is 
also hardly relevant because exceptions are good examples of 
data with shared / non-determenistic ownership and thus won't 
benefit from it.


I think it make sense to require that something thrown to be 
owned. That means ownership can be transferred from one thread 
to the other. That also mean that the compiler can free the 
exception when it goes out of scope, which is what is wanted 
for exception and @nogc to work together.


The invalid operation in @nogc would become promoting owned to 
Tl/shared/immutable rather than not allocating at all.


This has added benefit to allow for way more code to be @nogc, 
and in many cases transfers the GCness of something in the 
caller, which makes for @nogc compatible libraries that can be 
used in both @nogc and gc situation.


If we are gonna add something in the language, it'd better be 
worth it.


+1

Could you take the time to make a concrete proposal? I'll try to 
have another go at `scope`, which is of course deeply linked with 
ownership, and these two things need to work well together. I 
want to avoid proposing something that will later collide with 
your ideas.


Re: let (x,y) = ...

2015-02-19 Thread thedeemon via Digitalmars-d-announce
On Thursday, 19 February 2015 at 09:46:13 UTC, Ola Fosheim 
Grøstad wrote:

On Thursday, 19 February 2015 at 04:38:32 UTC, thedeemon wrote:

let (name, age) = getTuple();


Maybe change the name to tie:
http://www.cplusplus.com/reference/tuple/tie/
?


SML, OCaml, Haskell, F#, ATS, Rust, Swift and others have it as 
let keyword, so personally I'd prefer continuing that tradition.


Re: let (x,y) = ...

2015-02-19 Thread thedeemon via Digitalmars-d-announce

On Thursday, 19 February 2015 at 09:31:59 UTC, ponce wrote:

That's pretty neat! May I turn this code into a d-idioms? Name 
and link will be kept of course.


Sure, if you wish. There was just one person using this thing 
until today, so I dunno whether it deserves to be in that list.


Re: Is this possible in D?

2015-02-19 Thread Dicebot via Digitalmars-d-learn
Most practical approach I am currently aware of is wrapping 
actual implementation (in most restrictive version):


class Test {

private static void foo_() {}

version (Static)
{
 static void foo() { foo_(); }
}
else
{
 void foo() { foo_(); }
}

private void bar_() shared
{
}

version (Shared)
{
void bar() shared { bar_(); }
}
else
{
void bar() { (cast(shared Test)this).bar_(); }
}

}

But this relies on very careful code review because of casual 
casts for certain attributes (static and public/private are easy 
in that regard)


Re: Quick help on version function parameter

2015-02-19 Thread via Digitalmars-d-learn
On Thursday, 19 February 2015 at 01:39:19 UTC, Jonathan Marler 
wrote:
On Wednesday, 18 February 2015 at 23:49:26 UTC, Adam D. Ruppe 
wrote:
I'd write a foo_impl which always takes a parameter. Then do 
the versioned foo() functions which just forward to it:


void foo_impl(int x) { long function using x here }

version(globals) {
  int x;
  void foo() {
 foo_impl(x);
  }
} else {
  void foo(int x) { foo_impl(x); }
}

Minimal duplication with both interfaces.


That kinda defeats the purpose of why I want this.  It's for 
performance reasons.  I need one version to have NO arguments 
and one version to have one ref argument.


If it's a `ref` argument (your original example doesn't have 
one), are you sure there will be a performance problem?


Anyway, how about using a template and an alias, respectively:

void foo_impl(ref ExpensiveStruct x) { ... }

version(globals) {
ExpensiveStruct x;
void foo()() {
foo_impl(x);
}
} else {
alias foo = foo_impl;
}

That way, you'd force `foo` to be instantiated at the call site, 
making it more likely to be inlinable. In the non-global case, 
there will be no overhead at all because of the `alias`.


But, as always for things related to performance: profile first, 
then optimize.


Re: D : dmd vs gdc : which one to choose?

2015-02-19 Thread Mayuresh Kathe via Digitalmars-d-learn
On Thursday, 19 February 2015 at 09:10:16 UTC, Rikki Cattermole 
wrote:

On 19/02/2015 9:46 p.m., Mayuresh Kathe wrote:

How do I (a newbie to D) figure out which compiler set to use?
I am running Ubuntu 14.10, and intend to stick with it in the 
long term.

Should I choose DMD or go with GDC?
I would like to know the rationale for suggestions for either.

Thanks.


Atleast while learning stick with dmd.
It is the reference compiler. There are far more developers 
involved in its production then GDC.


And anyway, GDC is still hasn't been updated to the latest 
version of D. And its the last major D compiler that hasn't.


There is a D-apt repository, which will interest you.
http://d-apt.sourceforge.net/


I thank you for your response, and thank you for that link.

I installed the dmd_2.066.1-0_amd64.deb from the dlang.org 
website, though. :)
Figured it best to stick with the official DMD as I am working 
through The D Programming Language.


Re: D : dmd vs gdc : which one to choose?

2015-02-19 Thread Rikki Cattermole via Digitalmars-d-learn

On 20/02/2015 12:10 a.m., Mayuresh Kathe wrote:

On Thursday, 19 February 2015 at 09:10:16 UTC, Rikki Cattermole wrote:

On 19/02/2015 9:46 p.m., Mayuresh Kathe wrote:

How do I (a newbie to D) figure out which compiler set to use?
I am running Ubuntu 14.10, and intend to stick with it in the long term.
Should I choose DMD or go with GDC?
I would like to know the rationale for suggestions for either.

Thanks.


Atleast while learning stick with dmd.
It is the reference compiler. There are far more developers involved
in its production then GDC.

And anyway, GDC is still hasn't been updated to the latest version of
D. And its the last major D compiler that hasn't.

There is a D-apt repository, which will interest you.
http://d-apt.sourceforge.net/


I thank you for your response, and thank you for that link.

I installed the dmd_2.066.1-0_amd64.deb from the dlang.org website,
though. :)
Figured it best to stick with the official DMD as I am working through
The D Programming Language.


In that case, you probably also want to read the errata for TDPL.
http://erdani.com/index.php?cID=109
For changes since that book was written.


Re: Google Summer of Code - Again

2015-02-19 Thread Russel Winder via Digitalmars-d
On Thu, 2015-02-19 at 04:28 +, Craig Dillabaugh via Digitalmars-d
wrote:
[…]
 
 Russel.  Can you accept my invitation to be adminstrator (perhaps 
 you received and email about this), but who knows, that is the 
 most baffling registration process I've ever been a part of 

I logged in and now it tells me I am an administrator. So something did
something :-)

-- 
Russel.
=
Dr Russel Winder  t: +44 20 7585 2200   voip: sip:russel.win...@ekiga.net
41 Buckmaster Roadm: +44 7770 465 077   xmpp: rus...@winder.org.uk
London SW11 1EN, UK   w: www.russel.org.uk  skype: russel_winder


signature.asc
Description: This is a digitally signed message part


Re: [NEEDING HELP] Translation of Ali Cehreli's book in French

2015-02-19 Thread Raphaël Jakse via Digitalmars-d

Le 18/02/2015 01:24, deadalnix a écrit :

If the book is under an open source licence, framalang may be able to
help. Please contact them:

http://framablog.org/framalang/


This is a great idea. I think we will consider contacting them if people 
who want to work on the translation here feel we should, or if the way 
we are working know doesn't fit, for any reason. My current feeling is 
that the D community is here in these newsgroups.


The translation is sure an open source project, keeping the original 
license of Ali's work, as stated in the introduction of the translation.


I wouldn't do anything closed on my own initiative if I don't have a 
very very good reason to, supposing such a reason even exists.




Re: Problem Instantiating a BinaryHeap with a Comparison Function the needs this

2015-02-19 Thread Gary Willoughby via Digitalmars-d-learn

On Thursday, 19 February 2015 at 11:56:19 UTC, Nordlöw wrote:
I can understand how to correctly define an instance of 
BinaryHeap in my class DijkstraWalker at


https://github.com/nordlow/justd/blob/master/knet/traversal.d#L264

because the comparsion function can't ge access to the class 
member distMap


I get the error

need 'this' for 'distMap' of type 'Tuple!(double, 
Ref!(Node))[Ref!(Node)]'


What to do?


I don't know if the lambda form can access the outer scope. Try 
different forms for the comparer:


auto comparer = delegate (a, b)
{
return this.distMap[a][0]  this.distMap[b][0];
}

BinaryHeap!(Nds, comparer) pendingNds;

or

BinaryHeap!(Nds, this.distMap[a][0]  this.distMap[b][0]) 
pendingNds;


Caveat: this is off the top of my head and no way even tested or 
read the docs. :)


Re: Google Summer of Code - Again

2015-02-19 Thread CraigDillabaugh via Digitalmars-d
On Thursday, 19 February 2015 at 12:12:20 UTC, Russel Winder 
wrote:
On Thu, 2015-02-19 at 04:28 +, Craig Dillabaugh via 
Digitalmars-d

wrote:
[…]


Russel.  Can you accept my invitation to be adminstrator 
(perhaps you received and email about this), but who knows, 
that is the most baffling registration process I've ever been 
a part of 


I logged in and now it tells me I am an administrator. So 
something did

something :-)


So, the Google folks told me you had to accept the invitation, 
but you apparently did nothing other than log in and now the 
Melange site is telling me our proposal is now complete.  Seems 
about par for the course.


Anyway, thanks Russel! You've been a great help.  The person from 
Google said that I should be able to switch administrators, but 
they did not seem to have any idea on how that would be done, but 
I will make sure you don't get stuck as admin.


Martin, have you signed up for Melange yet?  To busy with the 
release stuff maybe :o)


Cheers,
Craig


Re: [NEEDING HELP] Translation of Ali Cehreli's book in French

2015-02-19 Thread Raphaël Jakse via Digitalmars-d

Le 17/02/2015 18:29, Raphaël Jakse a écrit :

Hello everybody,

I'm the current translator of Ali Cehreli's book in French. You can find
it there:

http://dlang-fr.org/cours/programmer-en-d/

So far, I translated 48 chapters, and I began the 49th.

My work is versioned here:

SSH:   g...@gitorious.org:programmez-en-d/programmez-en-d.git
HTTPS: https://gitorious.org/programmez-en-d/programmez-en-d.git

I write here today to announce that despite my efforts, I'm afraid I
can't find enough time and energy to keep translating the book anymore.
There are just too many things to get done beside this project.

I am willing to organize a translation group to finish the translation
to get this wonderful piece of work within French speaking people's reach.

Is anybody interested? Don't hesitate to send me an email if you are
willing to get involved, even for the smallest task. There are no small
tasks when a work is to get completed. I will tell you how to help.

ps: Due to technical reasons, I lost corrections people brought by using
the correction module present on the page. I'm really sorry for this.
This mean there are known errors in the current translation. This also
mean proofreading is also absolutely needed.

If there is anything you need, don't hesitate to tell me, I'll try to
answer the best I can do.

Thanks for your attention,

Cheers,
Raphaël.


If anybody is annoyed by this thread, please shout, we'll then try to do 
things differently.


Cheers,
Raphaël.



Re: let (x,y) = ...

2015-02-19 Thread Martin Nowak via Digitalmars-d-announce

On 02/19/2015 11:04 AM, thedeemon wrote:


SML, OCaml, Haskell, F#, ATS, Rust, Swift and others have it as let
keyword, so personally I'd prefer continuing that tradition.


It's semantically different though because it doesn't declare the variables.


Re: let (x,y) = ...

2015-02-19 Thread Martin Nowak via Digitalmars-d-announce

On 02/19/2015 12:59 PM, bearophile wrote:


It's also a great way to show what's missing in D syntax.


True that.


Re: Is this possible in D?

2015-02-19 Thread Mike Parker via Digitalmars-d-learn

On Thursday, 19 February 2015 at 10:17:47 UTC, Dicebot wrote:
Most practical approach I am currently aware of is wrapping 
actual implementation (in most restrictive version):



I really like mixins for this sort of thing.

```
enum signature = void longFunction();
version( Static )
enum sig = static  ~ signature;
else
alias sig = signature;

enum funcBody =
q{{
import std.stdio : writeln;
writeln( Hi there! );
version( Static ) writeln( I'm static! );
}};

struct Mixed {
mixin(sig ~ funcBody);
}

void main() {
version( Static ) Mixed.longFunction();
else {
Mixed m;
m.longFunction();
}
}
```

@OP: By using a token string (q{}) for funcBody rather than a 
WYSIWYG string (r or ``), you can still get syntax highlighting 
in your editor.


Re: let (x,y) = ...

2015-02-19 Thread bearophile via Digitalmars-d-announce

Kagamin:


Or even more obvious (VBA,TSQL):

set (x,y,z) = [1,2,3];


I prefer to use set as in Python, to define sets:


s = set([1, 2, 3])
2 in s

True

Bye,
bearophile


Re: let (x,y) = ...

2015-02-19 Thread Nick Treleaven via Digitalmars-d-announce

On 19/02/2015 04:38, thedeemon wrote:

int x, y, z, age;
string name;

let (name, age) = getTuple();   // tuple
let (x,y,z) = argv[1..4].map!(to!int);  // lazy range
let (x,y,z) = [1,2,3];  // array

SomeStruct s;
let (s.a, s.b) = tuple(3, piggies);


Alternatively std.typetuple.TypeTuple can be used instead of let:
http://forum.dlang.org/post/op.wa4vn6lgsqugbd@localhost


If a range or array doesn't have enough elements, this thing will throw,
and if it's not desired there's
let (x,y,z)[] = ...
variant that uses just the available data and keeps the rest variables
unchanged.


With these functions you can skip certain elements:
http://forum.dlang.org/post/jjnmh2$27o5$1...@digitalmars.com


[Issue 14199] [REG2.067a] Dwarf Error: mangled line number section

2015-02-19 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14199

Martin Krejcirik m...@krej.cz changed:

   What|Removed |Added

   Keywords||symdeb

--


[Issue 14199] New: [REG2.067a] Dwarf Error: mangled line number section

2015-02-19 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14199

  Issue ID: 14199
   Summary: [REG2.067a] Dwarf Error: mangled line number section
   Product: D
   Version: unspecified
  Hardware: x86
OS: Linux
Status: NEW
  Severity: regression
  Priority: P1
 Component: DMD
  Assignee: nob...@puremagic.com
  Reporter: m...@krej.cz

void main()
{
assert(0);
}

compile dmd -g, run

mk@bid:~/work/bugs$ ./dwarfbug
core.exception.AssertError@dwarfbug.d(3): Assertion failure

./dwarfbug() [0x8064cc5]
./dwarfbug(_Dmain+0xd) [0x8064c9d]

$ addr2line -e ./dwarfbug 0x8064cc5
BFD: Dwarf Error: mangled line number section.
??:?

Happened sometime between 2014-11-10 and 2015-01-01 (git)

Linux x86 (x86_64 seems ok)

--


Re: Google Summer of Code - Again

2015-02-19 Thread Andrei Alexandrescu via Digitalmars-d

On 2/18/15 8:33 PM, Craig Dillabaugh wrote:


Oh, so its official now - I think - I've submitted our orgnaizational
proposal.  I had to copy and paste my beautiful Latex document into a
crappy web-form, I am so bitter now.  There is still time to add an idea
or two to the Idea's page though ... since I've seen some recent chatter
on the forums about GSoC project ideas.


Yah the PDF looked real nice. Congratulations on taking this to 
finalization, and good luck to us all! -- Andrei


Re: let (x,y) = ...

2015-02-19 Thread Rory McGuire via Digitalmars-d-announce
let reads better either way I think.

let this and that equal this other thing.

On Thu, Feb 19, 2015 at 2:00 PM, bearophile via Digitalmars-d-announce 
digitalmars-d-announce@puremagic.com wrote:

 Kagamin:

  Doesn't let normally declare a new variable?


 You are right, yours is a valid point... So tie could be a better name
 after all.

 Bye,
 bearophile



Re: Problem Instantiating a BinaryHeap with a Comparison Function the needs this

2015-02-19 Thread Tobias Pankrath via Digitalmars-d-learn

On Thursday, 19 February 2015 at 11:56:19 UTC, Nordlöw wrote:

Please provide reduced examples.

This fails:

class C
{
int[] a;
alias BH = BinaryHeap!(int[], (x, y) = (x+a  y));
}

This works:

class C
{
int[] a;

void foo() {
alias BH = BinaryHeap!(int[], (x, y) = (x+a  y));
}
}

But will create an instance of BinaryHeap per member function.


What to do?


Dunno.


[Issue 14198] New: [REG2.067a] Link failure with Variant

2015-02-19 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14198

  Issue ID: 14198
   Summary: [REG2.067a] Link failure with Variant
   Product: D
   Version: D2
  Hardware: All
OS: All
Status: NEW
  Keywords: link-failure
  Severity: regression
  Priority: P1
 Component: DMD
  Assignee: nob...@puremagic.com
  Reporter: k.hara...@gmail.com

From: https://issues.dlang.org/show_bug.cgi?id=13167#c1

This code fails to compile with git-head, but succeeds with 2.066.1.

// test.d
import std.variant;
void main()
{
Variant a = true;

}

$ dmd test.d
DMD v2.067 DEBUG
OPTLINK (R) for Win32  Release 8.00.15
Copyright (C) Digital Mars 1989-2013  All rights reserved.
http://www.digitalmars.com/ctg/optlink.html
test.obj(test)
 Error 42: Symbol Undefined _D3std4conv11__T2toTAyaZ9__T2toTbZ2toFbZAya
--- errorlevel 1

--


[Issue 14198] [REG2.067a] Link failure with Variant

2015-02-19 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14198

--- Comment #1 from Kenji Hara k.hara...@gmail.com ---
Introduced in: https://github.com/D-Programming-Language/dmd/pull/4335

But i'm not sure what is the problem.

--


Re: State of Windows x64 COFF support?

2015-02-19 Thread ketmar via Digitalmars-d-learn
On Thu, 19 Feb 2015 13:29:58 -0500, Etienne wrote:

 On 2015-02-19 11:39 AM, Etienne wrote:
 I'm having corrupt symbol table errors on a Win64 build of a big
 application, I can't find a way around it. I'm wondering if the COFF
 support is still experimental in DMD?

 Thanks!
 
 I just counted 67k sections using a printf in DMD... The limit is 65k so
 that explains that.

i remember that DMD creates one section for each function (to allow 
smartlink feature). with templates this can be alot. maybe it needs new 
cli flag --collapse-sections or something like it.

signature.asc
Description: PGP signature


Re: Google Summer of Code - Again

2015-02-19 Thread Martin Nowak via Digitalmars-d
On Friday, 13 February 2015 at 22:59:32 UTC, CraigDillabaugh 
wrote:

Also, Martin have you created a profile yet on Melange?


I logged into it, what do I need to do?


[Issue 14200] New: C++ mangling issue with expanded tuples

2015-02-19 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14200

  Issue ID: 14200
   Summary: C++ mangling issue with expanded tuples
   Product: D
   Version: D2
  Hardware: x86_64
OS: Windows
Status: NEW
  Severity: normal
  Priority: P1
 Component: DMD
  Assignee: nob...@puremagic.com
  Reporter: c...@benjamin-thaut.de

The following triggers a ICE:

template Tuple(T...)
{
  alias Tuple = T;
}

extern(C++) void badFunc(Tuple!(int));
pragma(msg, typeof(badFunc));

void main(string[] args)
{
  auto p = badFunc;
}

Error: ICE: Unsupported type (int)

It seems the C++ mangling does not correctly expand tuples.

--


[Issue 14200] C++ mangling issue with expanded tuples

2015-02-19 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14200

--- Comment #1 from Benjamin Thaut c...@benjamin-thaut.de ---
https://github.com/D-Programming-Language/dmd/pull/4421

--


Re: Google Summer of Code - Again

2015-02-19 Thread Martin Nowak via Digitalmars-d

On Thursday, 19 February 2015 at 18:00:22 UTC, Martin Nowak wrote:

I logged into it, what do I need to do?


OK, I have a profile with MartinNowak as public name.
How do I connect with dlang?


each extern (C) keyword causes ld (OS X) to add a duplicate library entry

2015-02-19 Thread Ernest Bruce via Digitalmars-d-learn
Note the last two lines of this list (i am running OS X 10.10.2 
and Xcode 6.1.1):


clang -v -t cprog.c dprog.a -o cprog
Apple LLVM version 6.0 (clang-600.0.56) (based on LLVM 3.5svn)
Target: x86_64-apple-darwin14.1.0
Thread model: posix
 
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang 
-cc1 -triple x86_64-apple-macosx10.10.0 -emit-obj -mrelax-all 
-disable-free -disable-llvm-verifier -main-file-name cprog.c 
-mrelocation-model pic -pic-level 2 -mdisable-fp-elim 
-masm-verbose -munwind-tables -target-cpu core2 
-target-linker-version 241.9 -v -resource-dir 
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/6.0 
-fdebug-compilation-dir /Users/ernest/dev/inquiries/c_and_d 
-ferror-limit 19 -fmessage-length 146 -stack-protector 1 
-mstackrealign -fblocks -fobjc-runtime=macosx-10.10.0 
-fencode-extended-block-signature -fdiagnostics-show-option 
-fcolor-diagnostics -vectorize-slp -o 
/var/folders/gc/yfwyjyhn5b15xrsym2fyz6hr000327/T/cprog-897189.o 
-x c cprog.c
clang -cc1 version 6.0 based upon LLVM 3.5svn default target 
x86_64-apple-darwin14.1.0

ignoring nonexistent directory /usr/local/include
#include ... search starts here:
#include ... search starts here:
 
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/6.0/include
 
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include

 /usr/include
 /System/Library/Frameworks (framework directory)
 /Library/Frameworks (framework directory)
End of search list.
 
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld 
-demangle -dynamic -arch x86_64 -macosx_version_min 10.10.0 -t -o 
cprog 
/var/folders/gc/yfwyjyhn5b15xrsym2fyz6hr000327/T/cprog-897189.o 
dprog.a -lSystem 
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/6.0/lib/darwin/libclang_rt.osx.a

/var/folders/gc/yfwyjyhn5b15xrsym2fyz6hr000327/T/cprog-897189.o
/usr/lib/libSystem.dylib
/usr/lib/system/libcache.dylib
/usr/lib/system/libcommonCrypto.dylib
...
dprog.a(dprog_1_487.o)
dprog.a(dprog_2_495.o)


cprog.c includes two symbols exported from dprog.a, which uses 
the extern(C) keyword on the two functions exported from dprog.a


when i remove one of the extern(C) keywords from dprog.a, ld 
lists only one dprog.a(dprog_x_x.o) at the end


should ld be listing multiple instances of dprog.a when dprog.a 
uses multiple extern C symbols?


i built dprog.a with dmd v2.066.1

i didnt include the listings to make this inquiry short, but i 
can add them if it would help (im new here, and i dont to annoy 
folks too much)


Re: Undefined symbol?

2015-02-19 Thread Rene Zwanenburg via Digitalmars-d-learn

On Thursday, 19 February 2015 at 01:29:39 UTC, Tofu Ninja wrote:
I am not sure what could be the offending obj. I re downloaded 
dmd and phobos(pre compiled for windows), cleaned out all my 
builds and removed all of the tempfiles for dub that I could 
find.


Have you tried running dub with --force?


C++ calling convention only

2015-02-19 Thread Benjamin Thaut via Digitalmars-d-learn
Is it possible to declare a function in D which gets the C++ calling 
convetion but not the C++ mangling?


Kind Regards
Benjamin Thaut


Re: Google Summer of Code - Again

2015-02-19 Thread CraigDillabaugh via Digitalmars-d

On Thursday, 19 February 2015 at 18:21:30 UTC, Martin Nowak wrote:
On Thursday, 19 February 2015 at 18:00:22 UTC, Martin Nowak 
wrote:

I logged into it, what do I need to do?


OK, I have a profile with MartinNowak as public name.
How do I connect with dlang?


I need your Username not your Public Name. If I try to enter your 
public name it says 'MartinNowak is not a properly-formed 
identifier'.  I tried all the reasonable permutations on your 
name that I could come up with but it says those don't exist.


Can I get your Username?



Re: State of Windows x64 COFF support?

2015-02-19 Thread Etienne via Digitalmars-d-learn

On 2015-02-19 11:39 AM, Etienne wrote:

I'm having corrupt symbol table errors on a Win64 build of a big
application, I can't find a way around it. I'm wondering if the COFF
support is still experimental in DMD?

Thanks!


I just counted 67k sections using a printf in DMD... The limit is 65k so 
that explains that.


Re: Is this possible in D?

2015-02-19 Thread Jonathan Marler via Digitalmars-d-learn

On Thursday, 19 February 2015 at 17:23:47 UTC, Mike Parker wrote:
I agree that string mixins can kill readability. I encountered 
that when I used them to support both D1 and D2 in Derelict 2 
years ago. But I think that when they are kept small and local 
as in cases like this, they aren't bad at all.


Thanks for your example.  It's ugly but it's the only solution 
I've seen that gives me what I'm looking for.  I hadn't thought 
about putting the function body inside a q{ string }


Re: C++ calling convention only

2015-02-19 Thread John Colvin via Digitalmars-d-learn
On Thursday, 19 February 2015 at 18:25:10 UTC, Benjamin Thaut 
wrote:
Is it possible to declare a function in D which gets the C++ 
calling convetion but not the C++ mangling?


Kind Regards
Benjamin Thaut


You can use pragma(mangle, ...) to set whatever mangling you like.


Re: C++ calling convention only

2015-02-19 Thread John Colvin via Digitalmars-d-learn

On Thursday, 19 February 2015 at 21:33:50 UTC, John Colvin wrote:
On Thursday, 19 February 2015 at 18:25:10 UTC, Benjamin Thaut 
wrote:
Is it possible to declare a function in D which gets the C++ 
calling convetion but not the C++ mangling?


Kind Regards
Benjamin Thaut


You can use pragma(mangle, ...) to set whatever mangling you 
like.


I would duplicate the declaration, once without extern(C++), once 
with, the use the .mangleof from the 1st to set the mangle of the 
2nd with pragma(mangle


[Issue 14202] Missing template instantiation (Phobos) with -inline

2015-02-19 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14202

Justin Whear jus...@economicmodeling.com changed:

   What|Removed |Added

   Keywords||industry

--


[Issue 14202] New: Missing template instantiation (Phobos) with -inline

2015-02-19 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14202

  Issue ID: 14202
   Summary: Missing template instantiation (Phobos) with -inline
   Product: D
   Version: D2
  Hardware: x86_64
OS: Linux
Status: NEW
  Severity: regression
  Priority: P1
 Component: DMD
  Assignee: nob...@puremagic.com
  Reporter: jus...@economicmodeling.com

I am getting an undefined reference linker error with a trivial program that
only imports std.stdio, but only when compiling with -inline.  Minimized test
case below.

$ cat missing_symbol.d
---
import std.stdio;
void main(string[] args)
{
auto f = File();
float[3] parts;
auto n = f.rawRead(parts[]);
}
---

$ dmd -inline missing_symbol.d
missing_symbol.o: In function
`_D3std5stdio4File14__T7rawReadTfZ7rawReadMFAfZAf':
missing_symbol.d:(.text._D3std5stdio4File14__T7rawReadTfZ7rawReadMFAfZAf+0x17d):
undefined reference to
`_D3std9exception196__T12errnoEnforceTbVAyaa81_2f686f6d652f6a757374696e2f2e64766d2f636f6d70696c6572732f646d642d322e3036372e302d62312f6c696e75782f62696e2f2e2e2f2e2e2f7372632f70686f626f732f7374642f737464696f2e64Vmi722Z12errnoEnforceFNfbLAyaZb'
collect2: error: ld returned 1 exit status
--- errorlevel 1

This code compiles and links properly with 2.065.0.  I get the error above with
2.066.0, 2.066.1, and 2.067.0-b1.

--


[Issue 14202] Missing template instantiation (Phobos) with -inline

2015-02-19 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14202

Martin Krejcirik m...@krej.cz changed:

   What|Removed |Added

 CC||m...@krej.cz

--- Comment #1 from Martin Krejcirik m...@krej.cz ---
Cannot reproduce in v2.067.0-b2. Don't know if it was fixed or just
disappeared.

--


Re: Is this a bug in dmd 2.067 for struct initializers?

2015-02-19 Thread stewarth via Digitalmars-d-learn

On Thursday, 19 February 2015 at 07:46:51 UTC, Ali Çehreli wrote:

On 02/18/2015 10:39 PM, stewarth wrote:

 This works under dmd 2066.1 but fails under dmd 2.067-b2.

I don't know whether it is a bug.

 struct B {
  A* a;

In any case, that must be immutable(A)*.

 }

 static immutable B[] someB = [{a:someA[0]}, {a:someA[1]}];

 I want it to initialize at runtime before main(). I don't
 actually want any CTFE stuff here.

Then you need 'static this()' (or 'shared static this()'):

static immutable B[] someB;

static this() {
someB = [ B(someA[0]), B(someA[1]) ];
}

Note that I could not use the named member syntax because in my 
case the compiler cannot know what the right-hand side 
expression is. However, it is still possible with a temporary 
where the type is explicit as in your case:


static this() {
immutable B[] tmp = [ {a:someA[0]}, {a:someA[1]} ];
someB = tmp;
}

Ali


Hi Ali,

Thanks for the help.

I've gone with static this() approach and it works. In a way 
it's cleaner because it's explicit that these variables are only 
initialised at runtime before d_main(). At least that's how I 
understand things :)


It would be nice if the named syntax also worked in static 
this(), maybe I'll file an ER for it. I'm a big fan of the whole 
named args thing in Python, which from a quick search has been 
discussed before in the forums.



Cheers,
Stew


Re: We are Beta (2.067.0-b2)

2015-02-19 Thread Brian Schott via Digitalmars-d-announce
On Wednesday, 18 February 2015 at 14:13:25 UTC, Martin Nowak 
wrote:

Find more information on the dmd-beta mailing list.
http://forum.dlang.org/thread/54e41ca2.4060...@dawg.eu


Many of the beta-2 files are missing from downloads.dlang.org, 
and all of them are missing from ftp.digitalmars.com. This makes 
testing the Debian packages or using DVM impossible.


Re: GC deadlocks on linux

2015-02-19 Thread Steven Schveighoffer via Digitalmars-d-learn

On 2/19/15 12:01 PM, ketmar wrote:

On Thu, 19 Feb 2015 16:33:58 +, Byron Heads wrote:


Now I am not sure. This code runs correctly:


as i told you before, `fork()` is hard. you can experiment for monthes
seeing strange bugs here and there, and seeing no bugs, and strange bugs,
and...




there are alot of things going on under the hood, and alot of things
aren't. strictly speaking you *CAN'T* get cloned process in the same
state as it's parent. it may work, though, if stars are in a good shape.


Just as an example, Sociomantic uses a concurrent GC based on forking.

I'm not sure what the issue here is, but I don't think forking is as 
unstable as you seem to think, or maybe I'm reading this wrong. I can 
agree there are many gotchas with forking.


-Steve


[Issue 14202] Missing template instantiation (Phobos) with -inline

2015-02-19 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14202

Justin Whear jus...@economicmodeling.com changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |DUPLICATE

--- Comment #2 from Justin Whear jus...@economicmodeling.com ---


*** This issue has been marked as a duplicate of issue 13172 ***

--


[Issue 13172] optimize and rawread cause symbol undefined errors

2015-02-19 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13172

Justin Whear jus...@economicmodeling.com changed:

   What|Removed |Added

 CC||jus...@economicmodeling.com

--- Comment #14 from Justin Whear jus...@economicmodeling.com ---
*** Issue 14202 has been marked as a duplicate of this issue. ***

--


Re: quick-and-dirty minimalistic LISP engine

2015-02-19 Thread Bill Baxter via Digitalmars-d-announce
On Thu, Feb 19, 2015 at 8:30 AM, ketmar via Digitalmars-d-announce 
digitalmars-d-announce@puremagic.com wrote:

 On Thu, 19 Feb 2015 06:50:29 -0800, Bill Baxter via Digitalmars-d-announce
 wrote:

  If you weren't deliberately making a joke, you might want to google
  milf.

 no jokes, it's Serious Bussiness! do you think that our project architect
 will allow to build our own milf without googling? or our security team
 don't know that i want to share our milf? it's all Official.


Okie dokie then.  :-)  Just wanted to make sure you knew what you were
doing.  But seems it's all under control.  Don't mind me.  You can go about
your business.

--bb


Re: dfmt 0.1.0

2015-02-19 Thread Joakim via Digitalmars-d-announce

On Friday, 20 February 2015 at 02:21:01 UTC, Brian Schott wrote:

dfmt is a D source code formatting tool.

https://github.com/Hackerpilot/dfmt/
https://github.com/Hackerpilot/dfmt/releases/tag/v0.1.0


Thanks, you should list some of the formatting changes it makes 
in the README.


[Issue 14203] Return of floating point values from extern(C++) member functions does not match dmc

2015-02-19 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14203

--- Comment #1 from github-bugzi...@puremagic.com ---
Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/c73f7fefb952adbf8f5bfc28d87854926033
Add workaround for issue 14203

https://github.com/D-Programming-Language/dmd/commit/b1ace291ac3078b55f9895177fe13b3f537874d9
Merge pull request #4423 from yebblies/floatworkaround

[DDMD] Add workaround for issue 14203

--


Re: How to make Application bundle from Executable? (Mac)

2015-02-19 Thread Gan via Digitalmars-d-learn
On Friday, 20 February 2015 at 06:10:51 UTC, Nicholas Wilson 
wrote:

On Friday, 20 February 2015 at 03:26:47 UTC, Gan wrote:
Also I can't get my application to load images that I place in 
the Resources folder(or any folder in the bundle for that 
matter).
I suggest to have a look at the projects generated by SFML 
regarding locating the resources in C++/ObjC and translate them 
to C/ObjC/D.
As for code (i.e frameworks and .dylibs) i don't know as shared 
libraries are still a murky area for D. Probably just better to 
stick to static libs.
Is there an official way to turn a D executable into a Mac 
Application Bundle?

Dunno

Good luck!


Frameworks aren't an issue, I put them into the Frameworks folder 
in my hand made bundle and they load fine.
When running the executable, it loads the image when it's in the 
same folder but when running the executable through the bundle, 
it doesn't find the image anywhere.


Re: vibe-d basic build errors

2015-02-19 Thread Charles via Digitalmars-d-learn

On Friday, 20 February 2015 at 02:55:32 UTC, MartinNowak wrote:

On Friday, 20 February 2015 at 02:50:05 UTC, Charles wrote:

Pastebin of dub --vverbose: http://pastebin.com/4BcHJM74



Target vibe-d 0.7.22 is up to date. Use --force to rebuild.

Have you tried the --force switch to rebuild vibe.d?

Looks like the existing vibe.d lib was build against a different
build of druntime.


Yes, I have. Here's a pastebin with --force --vverbose: 
http://pastebin.com/qZEKUN46


[Issue 13167] Link errors with std.variant

2015-02-19 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13167

--- Comment #4 from growler...@gmail.com ---
@Kenji: Thanks for doing that, I wasn't sure.

--


Re: We are Beta (2.067.0-b2)

2015-02-19 Thread Walter Bright via Digitalmars-d-announce

On 2/19/2015 2:06 PM, Brian Schott wrote:

On Wednesday, 18 February 2015 at 14:13:25 UTC, Martin Nowak wrote:

Find more information on the dmd-beta mailing list.
http://forum.dlang.org/thread/54e41ca2.4060...@dawg.eu


Many of the beta-2 files are missing from downloads.dlang.org, and all of them
are missing from ftp.digitalmars.com. This makes testing the Debian packages or
using DVM impossible.


The files are up now on ftp.digitalmars.com


Re: D : dmd vs gdc : which one to choose?

2015-02-19 Thread Sebastien Alaiwan via Digitalmars-d-learn
On Thursday, 19 February 2015 at 08:46:11 UTC, Mayuresh Kathe 
wrote:

Should I choose DMD or go with GDC?


I work with projects whose code is half written in C, half 
written in D. I use GNU make to build them. I found out that 
using GDC was a much better choice for several reasons:


- project portability 1: under Windows, dmd generates OMF object 
files that can't be linked by the gcc linker, while gdc generates 
COFF objet files. Which means:

   - I can use the same Makefile regardless of the target OS.
   - I can link mingw-compiled C code with D code.
   - I avoid the struggle of finding OMF versions of SDL.lib, 
advapi32.lib, etc.


- project portability 2: stupid detail, but the weird dmd way of 
specifying the output file in the command line ( dmd 
-ofmyfile.o ) defeats the heuristics of MSYS2 path conversion. 
That's a dealbreaker for me.


- when I'm running Debian/Ubuntu, the simple ability to natively 
run apt-get install gdc to install/upgrade is very practical.


As dmd's compilation speed is blazingly fast, it remains a cool 
way of writing automation scripts (#!/bin/usr/env rdmd), much 
better, in my opinion, than Bash, or even Python.




Re: Are there any 2D games libraries available for D2?

2015-02-19 Thread Namespace via Digitalmars-d

On Friday, 20 February 2015 at 07:12:34 UTC, Gan wrote:
On Friday, 20 February 2015 at 04:52:29 UTC, Jeremy DeHaan 
wrote:

On Friday, 20 February 2015 at 00:07:20 UTC, Kingsley wrote:

On Thursday, 19 February 2015 at 23:59:14 UTC, Kingsley wrote:

I use Dgame which has a really nice and simple interface

http://rswhite.de/dgame4/

From the web page:

Dgame is a 2D framework which is based on the SDL and 
OpenGL, and is designed for the D programming language. The 
design is based on Pygame and as well on the SFML from the 
C++ programming language.


Cheers,
Stew


I'm looking at DGame - I'm on osx - so I guess I have to 
build all the dependencies myself sigh - Once I get it 
installed and working - it looks like it may be enough for 
what I want.


I guess I'll have to make it work with dub myself to make it 
easier to get started with.


DGame has a dependency on Derelict 3 - but going to the link 
provided says that project is no longer maintained and 
doesn't work with the latest DMD compiler. It points to a new 
location where there are multiple different Derelict 
libraries - I'm hoping DGame will work with one of those 
still.



Chiming in with my own library. https://github.com/Jebbs/DSFML

Things are a bit of a mess, but I'm gearing up for a release 
soon and things will be all nice and tidy and structured.


I really want to check out DGame but I suggest withholding from 
it until it becomes actively maintained again.


I'm using DSFML and it is one of the easiest. Though I had 
strange issues like high ram usage and text not rendering. 
Though the ease of use and performance is phenomenal.


I will try to fix the Derelict 3 mess this weekend. Putting it on 
DUB will take some more time, which I don't have currently, 
because I have my exams right now.


Re: vibe-d basic build errors

2015-02-19 Thread MartinNowak via Digitalmars-d-learn

On Friday, 20 February 2015 at 04:00:21 UTC, Charles wrote:
Yes, I have. Here's a pastebin with --force --vverbose: 
http://pastebin.com/qZEKUN46


Just tried the dub init web vibe.d  cd web  dub thing, works 
for me.

So the most interesting questions.

- What version of dub and dmd are you using?
- Are those installer versions or did you build anything yourself?


Re: vibe-d basic build errors

2015-02-19 Thread Charles via Digitalmars-d-learn

On Friday, 20 February 2015 at 04:13:08 UTC, MartinNowak wrote:

On Friday, 20 February 2015 at 04:00:21 UTC, Charles wrote:
Yes, I have. Here's a pastebin with --force --vverbose: 
http://pastebin.com/qZEKUN46


Just tried the dub init web vibe.d  cd web  dub thing, 
works for me.

So the most interesting questions.

- What version of dub and dmd are you using?
- Are those installer versions or did you build anything 
yourself?



They're installer versions, dub is 0.9.22 Nov 22 I want to say,
and DMD is 2.066.1


Re: How to make Application bundle from Executable? (Mac)

2015-02-19 Thread Jeremy DeHaan via Digitalmars-d-learn

On Friday, 20 February 2015 at 03:26:47 UTC, Gan wrote:
I managed to copy an application bundle and change stuff inside 
it to run my executable, but it was very manual and kinda 
hackish. Also I can't get my application to load images that I 
place in the Resources folder(or any folder in the bundle for 
that matter).



Is there an official way to turn a D executable into a Mac 
Application Bundle?


I don't have an answer, but I too am interested in hearing what 
others have to say about this.


Re: How to make Application bundle from Executable? (Mac)

2015-02-19 Thread Nicholas Wilson via Digitalmars-d-learn

On Friday, 20 February 2015 at 03:26:47 UTC, Gan wrote:
Also I can't get my application to load images that I place in 
the Resources folder(or any folder in the bundle for that 
matter).
I suggest to have a look at the projects generated by SFML 
regarding locating the resources in C++/ObjC and translate them 
to C/ObjC/D.
As for code (i.e frameworks and .dylibs) i don't know as shared 
libraries are still a murky area for D. Probably just better to 
stick to static libs.
Is there an official way to turn a D executable into a Mac 
Application Bundle?

Dunno

Good luck!


Re: dfmt 0.1.0

2015-02-19 Thread Joakim via Digitalmars-d-announce

On Friday, 20 February 2015 at 05:53:32 UTC, Brian Schott wrote:

On Friday, 20 February 2015 at 05:23:45 UTC, Joakim wrote:
On Friday, 20 February 2015 at 02:21:01 UTC, Brian Schott 
wrote:

dfmt is a D source code formatting tool.

https://github.com/Hackerpilot/dfmt/
https://github.com/Hackerpilot/dfmt/releases/tag/v0.1.0


Thanks, you should list some of the formatting changes it 
makes in the README.


It doesn't do formatting changes. It wipes out the formatting 
during lexing and builds it up from scratch. The only thing 
that gets preserved is that it will look at line numbers on 
comments and try to keep them in roughly the same place. (For 
example, // comments that are on the end of a line instead of 
on the next line)


Well, you should indicate what that new formatting is in the 
README, so potential users know what to expect without having to 
run it first.


Re: Are there any 2D games libraries available for D2?

2015-02-19 Thread Russel Winder via Digitalmars-d
On Thu, 2015-02-19 at 23:32 +, Kingsley via Digitalmars-d wrote:
 Hi
 
 I'm looking for a 2D games library in D2 similar to gosu from ruby: 
  http://www.libgosu.org/or ray:
 https://github.com/Mon-Ouie/ray

I got totally confused there for a moment: Gosu is a programming 
language for the JVM, and nothing to do with Ruby.

-- 
Russel.
=
Dr Russel Winder  t: +44 20 7585 2200   voip: sip:russel.win...@ekiga.net
41 Buckmaster Roadm: +44 7770 465 077   xmpp: rus...@winder.org.uk
London SW11 1EN, UK   w: www.russel.org.uk  skype: russel_winder


signature.asc
Description: This is a digitally signed message part


[Issue 13324] dynamically load libcurl at runtime

2015-02-19 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13324

Martin Nowak c...@dawg.eu changed:

   What|Removed |Added

   Keywords||pull

--- Comment #1 from Martin Nowak c...@dawg.eu ---
https://github.com/D-Programming-Language/phobos/pull/3009

--


Re: Are there any 2D games libraries available for D2?

2015-02-19 Thread Jeremy DeHaan via Digitalmars-d

On Friday, 20 February 2015 at 00:07:20 UTC, Kingsley wrote:

On Thursday, 19 February 2015 at 23:59:14 UTC, Kingsley wrote:

I use Dgame which has a really nice and simple interface

http://rswhite.de/dgame4/

From the web page:

Dgame is a 2D framework which is based on the SDL and OpenGL, 
and is designed for the D programming language. The design is 
based on Pygame and as well on the SFML from the C++ 
programming language.


Cheers,
Stew


I'm looking at DGame - I'm on osx - so I guess I have to build 
all the dependencies myself sigh - Once I get it installed 
and working - it looks like it may be enough for what I want.


I guess I'll have to make it work with dub myself to make it 
easier to get started with.


DGame has a dependency on Derelict 3 - but going to the link 
provided says that project is no longer maintained and doesn't 
work with the latest DMD compiler. It points to a new location 
where there are multiple different Derelict libraries - I'm 
hoping DGame will work with one of those still.



Chiming in with my own library. https://github.com/Jebbs/DSFML

Things are a bit of a mess, but I'm gearing up for a release soon 
and things will be all nice and tidy and structured.


Re: dfmt 0.1.0

2015-02-19 Thread Brian Schott via Digitalmars-d-announce

On Friday, 20 February 2015 at 05:23:45 UTC, Joakim wrote:

On Friday, 20 February 2015 at 02:21:01 UTC, Brian Schott wrote:

dfmt is a D source code formatting tool.

https://github.com/Hackerpilot/dfmt/
https://github.com/Hackerpilot/dfmt/releases/tag/v0.1.0


Thanks, you should list some of the formatting changes it makes 
in the README.


It doesn't do formatting changes. It wipes out the formatting 
during lexing and builds it up from scratch. The only thing that 
gets preserved is that it will look at line numbers on comments 
and try to keep them in roughly the same place. (For example, 
// comments that are on the end of a line instead of on the 
next line)


Re: Are there any 2D games libraries available for D2?

2015-02-19 Thread Gan via Digitalmars-d

On Friday, 20 February 2015 at 04:52:29 UTC, Jeremy DeHaan wrote:

On Friday, 20 February 2015 at 00:07:20 UTC, Kingsley wrote:

On Thursday, 19 February 2015 at 23:59:14 UTC, Kingsley wrote:

I use Dgame which has a really nice and simple interface

http://rswhite.de/dgame4/

From the web page:

Dgame is a 2D framework which is based on the SDL and 
OpenGL, and is designed for the D programming language. The 
design is based on Pygame and as well on the SFML from the 
C++ programming language.


Cheers,
Stew


I'm looking at DGame - I'm on osx - so I guess I have to 
build all the dependencies myself sigh - Once I get it 
installed and working - it looks like it may be enough for 
what I want.


I guess I'll have to make it work with dub myself to make it 
easier to get started with.


DGame has a dependency on Derelict 3 - but going to the link 
provided says that project is no longer maintained and doesn't 
work with the latest DMD compiler. It points to a new location 
where there are multiple different Derelict libraries - I'm 
hoping DGame will work with one of those still.



Chiming in with my own library. https://github.com/Jebbs/DSFML

Things are a bit of a mess, but I'm gearing up for a release 
soon and things will be all nice and tidy and structured.


I really want to check out DGame but I suggest withholding from 
it until it becomes actively maintained again.


I'm using DSFML and it is one of the easiest. Though I had 
strange issues like high ram usage and text not rendering. Though 
the ease of use and performance is phenomenal.


Re: Are there any 2D games libraries available for D2?

2015-02-19 Thread Kingsley via Digitalmars-d

On Thursday, 19 February 2015 at 23:59:14 UTC, Kingsley wrote:

I use Dgame which has a really nice and simple interface

http://rswhite.de/dgame4/

From the web page:

Dgame is a 2D framework which is based on the SDL and OpenGL, 
and is designed for the D programming language. The design is 
based on Pygame and as well on the SFML from the C++ 
programming language.


Cheers,
Stew


I'm looking at DGame - I'm on osx - so I guess I have to build 
all the dependencies myself sigh - Once I get it installed 
and working - it looks like it may be enough for what I want.


I guess I'll have to make it work with dub myself to make it 
easier to get started with.


DGame has a dependency on Derelict 3 - but going to the link 
provided says that project is no longer maintained and doesn't 
work with the latest DMD compiler. It points to a new location 
where there are multiple different Derelict libraries - I'm 
hoping DGame will work with one of those still.




Re: D : dmd vs gdc : which one to choose?

2015-02-19 Thread Rikki Cattermole via Digitalmars-d-learn

On 20/02/2015 5:08 a.m., ketmar wrote:

On Thu, 19 Feb 2015 22:10:11 +1300, Rikki Cattermole wrote:


And anyway, GDC is still hasn't been updated to the latest version of D.
And its the last major D compiler that hasn't.


LDC is 2.067 already? O_O 'cause GDC is 2.066.1 now.


Well according to GDC releases, it is still at 2.065.
https://github.com/D-Programming-GDC/GDC/releases
I was referring to full releases, not e.g. betas.



dfmt 0.1.0

2015-02-19 Thread Brian Schott via Digitalmars-d-announce

dfmt is a D source code formatting tool.

https://github.com/Hackerpilot/dfmt/
https://github.com/Hackerpilot/dfmt/releases/tag/v0.1.0


  1   2   >