On Monday, 10 November 2014 at 05:00:25 UTC, tcak wrote:
On Sunday, 9 November 2014 at 21:47:03 UTC, eles wrote:
On Sunday, 9 November 2014 at 19:00:01 UTC, tcak wrote:
Because I am auto casting with a keyword, compiler shouldn't
complain about it as well. This can also solve uncast thing.
Meta:
On the other hand, making assert a built-in that provides
optimization hints has been proposed for C++17:
Thank you for the link.
http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2014/n4154.pdf
But that behavour is on request (using NDEBUG = strong), it's not
suddenly becoming
On Sunday, 9 November 2014 at 08:26:59 UTC, Suliman wrote:
I know that a lot of people are using for programming tools
like Sublime. I am one of them. But if for very simple code
it's ok, how to write hard code?
Do you often need debugger when you are writing code? For which
tasks debugger
On Sunday, 9 November 2014 at 14:45:11 UTC, ketmar via
Digitalmars-d-learn wrote:
On Sun, 09 Nov 2014 09:33:29 -0500
Etienne via Digitalmars-d-learn
digitalmars-d-learn@puremagic.com
wrote:
I've seen a lot more invalid memory operation errors since the
GC calls destructors. Letting the GC
On Mon, 10 Nov 2014 11:13:11 +
via Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote:
On Sunday, 9 November 2014 at 14:45:11 UTC, ketmar via
Digitalmars-d-learn wrote:
On Sun, 09 Nov 2014 09:33:29 -0500
Etienne via Digitalmars-d-learn
digitalmars-d-learn@puremagic.com
On Sunday, 9 November 2014 at 22:41:29 UTC, H. S. Teoh via
Digitalmars-d-learn wrote:
On Sun, Nov 09, 2014 at 09:57:21PM +, eles via
Digitalmars-d-learn wrote:
On Sunday, 9 November 2014 at 16:31:46 UTC, bearophile wrote:
H. S. Teoh:
It's only a bad idea because people abuse assert() where
I wanted to know how to compile a D program that has multiple
source files. I looked under Modules in the language reference,
but there isn't anything there about compilation, or anything
about where to put the source files, or anything about how the
compiler finds the files to use.
I'm
Solomon E:
I don't want to have to guess how to do it and experiment, as if
it's all implementation defined and in flux to the degree that
that's the only way to compile anything.
It's not in flux.
A simple way to compile more than one file is to put them in the
same compilation unit (almost
dmd a.d b.d
Otherwise you can also use ddmd and let it find the module
dependencies by itself.
Am I right understand that if I will put all needed files at src
folder and name main file App.d dub will add all needed files to
App.d ?
On Mon, 10 Nov 2014 12:10:36 +
Solomon E via Digitalmars-d-learn digitalmars-d-learn@puremagic.com
wrote:
If there aren't instructions or documentation on how to compile
more than one file into a finished D runnable project in a
correct way that can grow with larger projects, then I'll
On Monday, 10 November 2014 at 12:21:51 UTC, bearophile wrote:
It's not in flux.
A simple way to compile more than one file is to put them in
the same compilation unit (almost the same if you want to
create a lib):
dmd a.d b.d
Otherwise you can also use ddmd and let it find the module
On Monday, 10 November 2014 at 12:49:46 UTC, ketmar via
Digitalmars-d-learn wrote:
you'd better not use command-line toolchain, they all aren't
ready. if
you can't figure out how to use some compiler of GCC suite,
you'd
better try some IDEs.
So there's such a lack of documentation on D that
On Mon, 2014-11-10 at 12:10 +, Solomon E via Digitalmars-d-learn
wrote:
I wanted to know how to compile a D program that has multiple
source files. I looked under Modules in the language reference,
but there isn't anything there about compilation, or anything
about where to put the source
On Mon, 2014-11-10 at 13:01 +, Solomon E via Digitalmars-d-learn
wrote:
On Monday, 10 November 2014 at 12:49:46 UTC, ketmar via
Digitalmars-d-learn wrote:
you'd better not use command-line toolchain, they all aren't
ready. if
you can't figure out how to use some compiler of GCC
On Monday, 10 November 2014 at 13:11:45 UTC, Russel Winder via
Digitalmars-d-learn wrote:
ketmar was just being a teensy weensy bit over-dramatic.
He was trying to point out that gdc is part of the GCC and so
all the
GCC documentation is relevant for gdc. D thus gets huge amounts
of
On 11/10/2014 9:55 PM, Solomon E wrote:
On Monday, 10 November 2014 at 12:21:51 UTC, bearophile wrote:
That's not applicable because I'm not using DMD. Also that
doesn't answer where a .o or .a file comes from, whether there's
any difference between them besides the name, and if so what.
On Mon, 10 Nov 2014 13:29:02 +
Solomon E via Digitalmars-d-learn digitalmars-d-learn@puremagic.com
wrote:
The problem that I'm having with this seems to be with GDC, not
the rest of the D community. The following is a quote of the
entire amount of information in the GDC man page on the
On Monday, 10 November 2014 at 13:44:26 UTC, ketmar via
Digitalmars-d-learn wrote:
you'd better use some IDE if you have to guess such things. gdc
manpage
documents gdc-specific options. it even gives you some
directions in
see also section, which you are supposed to follow to read
more about
On Mon, 10 Nov 2014 14:12:12 +
Solomon E via Digitalmars-d-learn digitalmars-d-learn@puremagic.com
wrote:
I keep saying I want documentation or specifications.
and i keep saying that if you can't find those for you case, you'd
better stick with IDE. you keep ignoring the fact that gdc is a
I'm translating the library Botan and I'm at a point where I have to ask
myself if I'm going to change functions and object names respectively
from snake_case and Camel_Case to camelCase and CamelCase. Same goes for
file names. Is this a strict rule for D libraries?
Hi guys,
I've been looking and haven't found any libraries for ODBC or
MSSQL. I saw some for D v1, but nothing for v2. Anyone know of
any, or anyone know of a tutorial that I could use to create this
myself?
Thanks,
Charles
I kinda slapped one together but idk if it actually works.
https://github.com/adamdruppe/arsd
database.d and mssql.d from that repo. I haven't even tried to
compile it for a while though, so it might not work at all.
The way I made it was to write the extern(C) function
declarations and
Etienne:
I'm translating the library Botan and I'm at a point where I
have to ask myself if I'm going to change functions and object
names respectively from snake_case and Camel_Case to camelCase
and CamelCase. Same goes for file names. Is this a strict rule
for D libraries?
Take a look:
Personally, I don't really care about naming conventions. I
prefer the camelCase and it seems most D people do, but if you're
translating another library, there's value it keeping it the same
for ease of documentation lookups from the original etc.
On 2014-11-10 11:16 AM, Adam D. Ruppe wrote:
Personally, I don't really care about naming conventions. I prefer the
camelCase and it seems most D people do, but if you're translating
another library, there's value it keeping it the same for ease of
documentation lookups from the original etc.
I develop a web site with vibe, but because I am using a Virtual Private
Server I get some memory issues. The server only has 1Go of memory (
900Mo free) and it seems I can't compile directly on it a simple static
page (70 lines).
I get the following message when building with dub :
Running
On Monday, 10 November 2014 at 16:01:21 UTC, Charles wrote:
Hi guys,
I've been looking and haven't found any libraries for ODBC or
MSSQL. I saw some for D v1, but nothing for v2. Anyone know of
any, or anyone know of a tutorial that I could use to create
this myself?
Assuming you're using
On 2014-11-10 11:32 AM, Xavier Bigand wrote:
Is there some options can help me to reduce the memory consumption? As
it's for production purpose I don't think that is a good idea to remove
compiler optimizations.
The memory issues are probably related to diet templates.
LDC and GDC won't
Oh, here's a sample, since it doesn't look like that zip includes
one:
import sql.Connection;
import sql.Exception;
import sql.ResultSet;
import sql.Statement;
import core.stdc.stdio;
pragma( lib, odbc32.lib );
pragma( lib, sql.lib );
void main()
{
try
{
auto conn = new
On Monday, 10 November 2014 at 12:10:37 UTC, Solomon E wrote:
I don't trust the
DMD Debian package enough to install it, considering it has
Google adsense ads in its HTML pages, which is against even
Google's policy.
Could you point to the exact page your looking at?
Xavier Bigand:
So for the moment I build the web site on a physical machine,
and I saw the compilation takes around 1.6Go of memory.
Compiling the whole Phobos as a single compilation unit on 32 bit
DMD requires a little more than 1 GB.
Bye,
bearophile
Le 10/11/2014 17:41, Etienne a écrit :
On 2014-11-10 11:32 AM, Xavier Bigand wrote:
Is there some options can help me to reduce the memory consumption? As
it's for production purpose I don't think that is a good idea to remove
compiler optimizations.
The memory issues are probably related to
On 2014-11-10 12:02 PM, Xavier Bigand wrote:
As I know to be able to have no down time with vibe we need to be able
to build directly on the server where the program runs.
Maybe I just need to wait that I have some users to pay a better server
with more memory.
With a low number of users,
On Monday, 10 November 2014 at 15:35:54 UTC, ketmar via
Digitalmars-d-learn wrote:
On Mon, 10 Nov 2014 14:12:12 +
Solomon E via Digitalmars-d-learn
digitalmars-d-learn@puremagic.com
wrote:
I keep saying I want documentation or specifications.
and i keep saying that if you can't find
On Monday, 10 November 2014 at 16:49:27 UTC, John Colvin wrote:
On Monday, 10 November 2014 at 12:10:37 UTC, Solomon E wrote:
I don't trust the
DMD Debian package enough to install it, considering it has
Google adsense ads in its HTML pages, which is against even
Google's policy.
Could you
I kinda slapped one together but idk if it actually works.
https://github.com/adamdruppe/arsd
database.d and mssql.d from that repo. I haven't even tried to
compile it for a while though, so it might not work at all.
The way I made it was to write the extern(C) function
declarations and
Le 10/11/2014 18:17, Etienne a écrit :
On 2014-11-10 12:02 PM, Xavier Bigand wrote:
As I know to be able to have no down time with vibe we need to be able
to build directly on the server where the program runs.
Maybe I just need to wait that I have some users to pay a better server
with more
On 11/09/2014 11:39 PM, H. S. Teoh via Digitalmars-d-learn wrote:
The original meaning of assert() is what assume() means nowadays,
whereas nowadays what people think of as assert() is actually what
enforce() does in Phobos.
T
No.
On Mon, 10 Nov 2014 17:18:05 +
Solomon E via Digitalmars-d-learn digitalmars-d-learn@puremagic.com
wrote:
I do know about how to use GCC and where the documentation for
that is. I know what .o files and .a files are in terms of GCC
for C, because there's tons of documentation about that. I
I can't understand how to use UFCS with instance of class:
void main()
{
string name = Suliman;
userName username = new userName(name);
/// How to use UFCS here?
userName.name.sayHello();
///
}
class userName
{
string name;
this(string name)
{
this.name = name;
}
On Mon, 10 Nov 2014 16:49:26 +
John Colvin via Digitalmars-d-learn digitalmars-d-learn@puremagic.com
wrote:
On Monday, 10 November 2014 at 12:10:37 UTC, Solomon E wrote:
I don't trust the
DMD Debian package enough to install it, considering it has
Google adsense ads in its HTML pages,
On 11/09/2014 05:24 PM, H. S. Teoh via Digitalmars-d-learn wrote:
On Sun, Nov 09, 2014 at 04:12:06PM +, bearophile via Digitalmars-d-learn
wrote:
H. S. Teoh:
Walter *did* mention recently that he was planning to eventually take
advantage of information in assert()'s as optimizer hints.
I would also be curious to see projects in D that involved cache
optimization.
Dear D community (and specifically experts on cache optimization),
I'm a C++ programmer and was waiting for a while to do a project
in D.
I'd like to build a cache-optimized decision tree forest library,
and I'm debating between D and C++. I'd like to make it similar
to atlas, spiral, or
On Mon, 10 Nov 2014 16:16:04 +
Adam D. Ruppe via Digitalmars-d-learn
digitalmars-d-learn@puremagic.com wrote:
Personally, I don't really care about naming conventions. I
prefer the camelCase and it seems most D people do, but if you're
translating another library, there's value it
On Mon, 10 Nov 2014 19:07:38 +
Suliman via Digitalmars-d-learn digitalmars-d-learn@puremagic.com
wrote:
/// How to use UFCS here?
userName.name.sayHello();
///
you can't.
a little explanation: UFCS substitutes only the first argument. and for
class methods first argument is hidden 'this'.
On Mon, Nov 10, 2014 at 09:19:58PM +0200, ketmar via Digitalmars-d-learn wrote:
On Mon, 10 Nov 2014 16:16:04 +
Adam D. Ruppe via Digitalmars-d-learn
digitalmars-d-learn@puremagic.com wrote:
Personally, I don't really care about naming conventions. I prefer
the camelCase and it seems
On Mon, 10 Nov 2014 19:07:38 +, Suliman wrote:
I can't understand how to use UFCS with instance of class:
void main()
{
string name = Suliman;
userName username = new userName(name);
/// How to use UFCS here?
userName.name.sayHello();
///
}
class userName {
string
On 11/10/2014 11:07 AM, Suliman wrote:
I can't understand how to use UFCS with instance of class:
void main()
{
string name = Suliman;
userName username = new userName(name);
/// How to use UFCS here?
userName.name.sayHello();
///
}
class userName
{
string name;
this(string name)
Hard styling rules only apply to Phobos contributions. Any other
project can have their own, for example, vibe.d requires own
style which is incompatible with Phobos.
For ported 3d party library value of minimizing the diff is
indeed more important than styling.
If your server runs systemd, I would strongly recommend to use
that instead of a shell script. You can use Restart=always or
Restart=on-failure in the unit file. It also provides socket
activation, which will allow you to restart the program without
downtime.
Thanks!
Ali Çehreli, could you add this mention and possible the example
to your book?
On Monday, 10 November 2014 at 18:13:58 UTC, Adam D. Ruppe wrote:
On Monday, 10 November 2014 at 17:57:21 UTC, Charles wrote:
It didn't compile, says, mssql.d(12): Error: module sql is in
file 'win32\sql.d' which cannot be read
Oh, I forgot I used those. You can download the win32 folder
On 2014-11-10 2:52 PM, Marc =?UTF-8?B?U2Now7x0eiI=?=
schue...@gmx.net wrote:
If your server runs systemd, I would strongly recommend to use that
instead of a shell script. You can use Restart=always or
Restart=on-failure in the unit file. It also provides socket
activation, which will allow you
On Mon, 10 Nov 2014 11:35:04 -0800
H. S. Teoh via Digitalmars-d-learn
digitalmars-d-learn@puremagic.com wrote:
I have to say that I *hate* camelCase... it looks really ugly. But what
looks uglier is a mixture of camelCase and something else. And since
Phobos is all camelCased, and almost all D
On Monday, 10 November 2014 at 19:09:45 UTC, ketmar via
Digitalmars-d-learn wrote:
as for D... they are compiled object files. exactly the same
thing as
for c++, gnu pascal or any other language in GCC that produces
.o. are
you expecting them to be something special? then you'll read
about
I was perusing a PR for phobos where std/range.d was split into
submodules and std/range.d was moved to std/range/package.d
I was wondering why a package module had to be called package.d
instead of just being the package name. For example, instead of
moving std/range.d to
On Monday, 10 November 2014 at 21:25:32 UTC, Jonathan Marler
wrote:
I was perusing a PR for phobos where std/range.d was split into
submodules and std/range.d was moved to std/range/package.d
I was wondering why a package module had to be called
package.d instead of just being the package
On Monday, 10 November 2014 at 19:37:06 UTC, H. S. Teoh via
Digitalmars-d-learn wrote:
I have to say that I *hate* camelCase... it looks really ugly.
But what
looks uglier is a mixture of camelCase and something else.
Ah, but here I disagree. I like to use different formatting for
different
On 11/10/14 4:33 PM, Dicebot wrote:
On Monday, 10 November 2014 at 21:25:32 UTC, Jonathan Marler wrote:
I was perusing a PR for phobos where std/range.d was split into
submodules and std/range.d was moved to std/range/package.d
I was wondering why a package module had to be called package.d
On Mon, 10 Nov 2014 21:27:20 +
Solomon E via Digitalmars-d-learn digitalmars-d-learn@puremagic.com
wrote:
(There is a dlang page http://wiki.dlang.org/GDC/Using_GDC that
gives some instructions, including how to compile hello world and
how to get a .o file, but strangely to me doesn't
On Mon, Nov 10, 2014 at 11:27:13PM +0200, ketmar via Digitalmars-d-learn wrote:
On Mon, 10 Nov 2014 11:35:04 -0800
H. S. Teoh via Digitalmars-d-learn
digitalmars-d-learn@puremagic.com wrote:
I have to say that I *hate* camelCase... it looks really ugly. But
what looks uglier is a mixture
On Mon, Nov 10, 2014 at 09:36:18PM +, via Digitalmars-d-learn wrote:
On Monday, 10 November 2014 at 19:37:06 UTC, H. S. Teoh via
Digitalmars-d-learn wrote:
I have to say that I *hate* camelCase... it looks really ugly. But
what looks uglier is a mixture of camelCase and something else.
On Monday, 10 November 2014 at 22:04:20 UTC, H. S. Teoh via
Digitalmars-d-learn wrote:
No idea what you're talking about, but I was referring to
squishingAllWordsIntoOneUnreadableMess vs.
keeping_them_visually_separate_and_readable.
I like the keeping_the_visually_separate_and_readable when it
On 11/10/2014 12:04 PM, Suliman wrote:
Thanks!
Ali Çehreli, could you add this mention and possible the example to your
book?
Of course. Perhaps I should rephrase some of the descriptions here?
http://ddili.org/ders/d.en/ufcs.html
Please email me at acehr...@yahoo.com if you have specific
On Mon, 10 Nov 2014 14:00:32 -0800
H. S. Teoh via Digitalmars-d-learn
digitalmars-d-learn@puremagic.com wrote:
I used to be an Egyptian-braces / tabs-only-indentation advocate. That
works reasonably well in C/C++, but I find that with idiomatic D, Phobos
style actually works much better.
On 11/10/2014 02:00 PM, H. S. Teoh via Digitalmars-d-learn wrote:
(I kid you not, people
actually exist who write code like this):
I know one of those people! They are from a different era. :)
int my_func(int arg) {
if (arg==1) {
printf(One\n);
ketmar, I understand that GDC documentation can be as terse as it
wants to be, especially in the man page, which is supposed to be
the shortest, for quick command line reference. It still seems a
little odd to me that there wouldn't be additional instructions
somewhere in the introductory pages
It all works fine for me so far. I wrote a trivial test project
of four d files, and compiled it all together, directly from d
files, which took a couple of seconds to compile. Then instead I
compiled it as two o files in an a file (using ar to
archive), plus a d file, plus another o file for
69 matches
Mail list logo