On 11/06/2013 02:36 AM, Jacob Carlborg wrote:
On 2013-11-06 08:28, John J wrote:
Thanks Jacob,
I guess I have to compile and distribute a FreeTDS.dll, and it only
works for win32
FreeTDS works on Posix platforms. I wrote that code on Mac OS X. We use
FreeTDS in production, running servers
I installed the DMD32 D Compiler v2.063.2 into C:\
I try to complie and test the dserver.d sample specifically, but
when I run build.bat in the dmd2\samples\d directory, I've got
the following errors.
C:\D\dmd2\samples\d..\..\windows\bin\shell all.sh
shell 1.05
..\..\windows\bin\dmd d2html
On Wednesday, 6 November 2013 at 07:46:00 UTC, Jacob Carlborg
wrote:
Which other languages? private in Ruby and Java is not the
same.
The one's which implement private as meaning accessible to the
class only.
On Wednesday, 6 November 2013 at 07:46:00 UTC, Jacob Carlborg
wrote:
Which other languages? private in Ruby and Java is not the
same.
The one's which implement private as meaning accessible to the
class only.
On Wednesday, 6 November 2013 at 09:02:57 UTC, Adam Ryczkowski
wrote:
I installed the DMD32 D Compiler v2.063.2 into C:\
I try to complie and test the dserver.d sample specifically, but
when I run build.bat in the dmd2\samples\d directory, I've got
the following errors.
On Wednesday, 6 November 2013 at 01:04:10 UTC, Jonathan M Davis
wrote:
On Wednesday, November 06, 2013 00:22:13 Namespace wrote:
OPTLINK (R) for Win32 Release 8.00.13
Copyright (C) Digital Mars 1989-2010 All rights reserved.
http://www.digitalmars.com/ctg/optlink.html
Debug\Foo.obj Offset
import std.typecons: Typedef;
alias Foo = Typedef!double;
void main() {
auto a1 = Foo(1);
pragma(msg, typeof(a1));
auto a2 = 1.Foo;
pragma(msg, typeof(a2));
auto a3 = Foo(-1);
pragma(msg, typeof(a3));
auto a4 = -1.Foo;
pragma(msg, typeof(a4));
}
It prints:
Thank you for the answer.
This is the contents of the build.bat, which is shipped with the
D instalation:
..\..\windows\bin\shell all.sh
Can you tell me, what is outdated?
On Wednesday, 6 November 2013 at 10:13:07 UTC, Namespace wrote:
Should I open a bug for this?
you should fix ur sc.ini first to use visual studio linker for
x64 and optlink for x86, you can use dmd 2.064.2 installer now to
do so automatically.
On Wednesday, 6 November 2013 at 11:04:05 UTC, bearophile wrote:
import std.typecons: Typedef;
alias Foo = Typedef!double;
void main() {
auto a1 = Foo(1);
pragma(msg, typeof(a1));
auto a2 = 1.Foo;
pragma(msg, typeof(a2));
auto a3 = Foo(-1);
pragma(msg, typeof(a3));
The title isn't very clear but I wasn't sure how to phrase it
without code. Basically what I want to do is this (won't compile):
struct Foo(int N) {
}
void func(T)(T obj) if(is(T:Foo)) {
}
void func(T)(T obj) if(!is(T:Foo)) {
}
Foo by itself isn't a type, but I don't want to limit func
On Tue, 05 Nov 2013 16:00:41 -, bearophile bearophileh...@lycos.com
wrote:
1) I usually write more than one class or struct inside each D module,
unlike in Java. But sometimes when I move that class or struct elsewhere
(during refactoring, or in other situations) I get access errors to
On Wednesday, 6 November 2013 at 13:00:17 UTC, Atila Neves wrote:
The title isn't very clear but I wasn't sure how to phrase it
without code. Basically what I want to do is this (won't
compile):
struct Foo(int N) {
}
void func(T)(T obj) if(is(T:Foo)) {
}
void func(T)(T obj) if(!is(T:Foo)) {
On Friday, 1 November 2013 at 20:29:54 UTC, Jonathan M Davis
wrote:
On Friday, November 01, 2013 14:28:55 Daniel Davidson wrote:
On Thursday, 31 October 2013 at 19:39:44 UTC, Jonathan M Davis
Deep copying is not the only reason to have a postblit. Smart
pointers such as
On 11/05/2013 05:00 PM, bearophile wrote:
1) I usually write more than one class or struct inside each D module,
unlike in Java. But sometimes when I move that class or struct elsewhere
(during refactoring, or in other situations) I get access errors to
private fields. Those errors were already
On Wednesday, 6 November 2013 at 10:38:29 UTC, Adam Ryczkowski
wrote:
Thank you for the answer.
This is the contents of the build.bat, which is shipped with
the D instalation:
..\..\windows\bin\shell all.sh
Can you tell me, what is outdated?
pi sample at least has compile errors.
...All the samples I use are shipped with the DMD32 D Compiler
v2.063.2 instalation package for Windows. I've just reinstalled D
to make sure that.
On Wednesday, 6 November 2013 at 10:46:39 UTC, Adam Ryczkowski
wrote:
...All the samples I use are shipped with the DMD32 D Compiler
v2.063.2 instalation package for Windows. I've just reinstalled
D to make sure that.
no, i mean its not get updated to fetch with phobos changes.
though it
On 11/06/2013 04:34 AM, Tyro[17] wrote:
I’m sure the following table is missing a few items but am unclear
what they are. For starters these , =, , , !, !=
belong on the table but I’m not sure where. I am also not sure if
these ..., @, # belong there at all. There might be other errors
or
On Wednesday, 6 November 2013 at 13:00:17 UTC, Atila Neves wrote:
The title isn't very clear but I wasn't sure how to phrase it
without code. Basically what I want to do is this (won't
compile):
struct Foo(int N) {
}
void func(T)(T obj) if(is(T:Foo)) {
}
void func(T)(T obj) if(!is(T:Foo)) {
qznc:
Operator precedence of . is higher than unary minus.
Is this good?
However, what is Typedef for?
It's to create a differently named type, useful for stronger
static typing, to increase code clarity and avoid some bugs.
If you have a function like this:
double foo(in double x,
A simple request but i'm failing hard. How do i re-init an
associative array? This is obviously not the way:
import std.stdio;
void main(string[] args)
{
int[string] x;
x[hello] = 1;
x[world] = 2;
On Wednesday, 6 November 2013 at 16:15:36 UTC, Gary Willoughby
wrote:
A simple request but i'm failing hard. How do i re-init an
associative array? This is obviously not the way:
import std.stdio;
void main(string[] args)
{
int[string] x;
On Wednesday, 6 November 2013 at 16:15:36 UTC, Gary Willoughby
wrote:
A simple request but i'm failing hard. How do i re-init an
associative array? This is obviously not the way:
import std.stdio;
void main(string[] args)
{
int[string] x;
On Wednesday, 6 November 2013 at 16:41:19 UTC, Gary Willoughby
wrote:
x.clear();
I looked at that but apparently it leaves the array in an
unsafe state.
Source:
http://forum.dlang.org/thread/iu3ll6$2d48$1...@digitalmars.com
Wow! Good to know, thanks!
On Wednesday, 6 November 2013 at 16:34:13 UTC, Daniel Davidson
wrote:
On Wednesday, 6 November 2013 at 16:15:36 UTC, Gary Willoughby
wrote:
A simple request but i'm failing hard. How do i re-init an
associative array? This is obviously not the way:
import std.stdio;
void
On Wednesday, 6 November 2013 at 16:41:19 UTC, Gary Willoughby
wrote:
I looked at that but apparently it leaves the array in an
unsafe state.
Source:
http://forum.dlang.org/thread/iu3ll6$2d48$1...@digitalmars.com
Is that still the case? The following seems to work just fine.
Maybe Kenji
On Wednesday, 6 November 2013 at 16:49:44 UTC, Daniel Davidson
wrote:
On Wednesday, 6 November 2013 at 16:41:19 UTC, Gary Willoughby
wrote:
I looked at that but apparently it leaves the array in an
unsafe state.
Source:
http://forum.dlang.org/thread/iu3ll6$2d48$1...@digitalmars.com
Is
On 11/06/2013 03:04 AM, bearophile wrote:
import std.typecons: Typedef;
alias Foo = Typedef!double;
void main() {
auto a1 = Foo(1);
pragma(msg, typeof(a1));
auto a2 = 1.Foo;
pragma(msg, typeof(a2));
auto a3 = Foo(-1);
pragma(msg, typeof(a3));
auto a4 = -1.Foo;
On Wed, Nov 06, 2013 at 05:15:34PM +0100, Gary Willoughby wrote:
A simple request but i'm failing hard. How do i re-init an
associative array?
[...]
Just assign null to it:
import std.stdio;
void main() {
int[string] aa;
aa[a] = 1;
On Wednesday, 6 November 2013 at 17:10:34 UTC, Ali Çehreli wrote:
I would be very surprised if unary - produced a different
type from the operand:
Ali
Operator does not produce type, it produces value of expression,
and type of expression happens not to be the type you expected.
But such
On Wednesday, 6 November 2013 at 17:49:41 UTC, H. S. Teoh wrote:
The GC will take care of cleaning up the old data.
T
Unfortunately it will not take care of calling struct destructors.
On 11/06/2013 09:46 AM, Maxim Fomin wrote:
On Wednesday, 6 November 2013 at 17:10:34 UTC, Ali Çehreli wrote:
I would be very surprised if unary - produced a different type from
the operand:
Ali
Operator does not produce type, it produces value of expression, and
type of expression
06-Nov-2013 00:36, Charles Hixson пишет:
On 11/05/2013 05:34 AM, Dmitry Olshansky wrote:
05-Nov-2013 02:20, Charles Hixson пишет:
On 11/03/2013 01:46 AM, Dmitry Olshansky wrote:
03-Nov-2013 02:37, Charles Hixson пишет:
I'm contemplating an associative array that will eventually grow to be
an
On Wednesday, 6 November 2013 at 18:02:32 UTC, Ali Çehreli wrote:
But such
expectations need not correspond to language rules (try to
think from
from language laywer perspective).
I still argue that the expression -expr must have the same type
as expr.
In bearophile case, I guess
On Wednesday, 6 November 2013 at 18:16:04 UTC, Maxim Fomin wrote:
I think that reason for such behavior is the way used defined
operator overloading functions are implemented, not the
language per se, so programmers confuse themselves.
What about other possible reason - Typedef implementation
As part of developing the DUnit framework i'm looking into
executing the unit test at a more fine grain level. The new
'getUnitTests' trait looks interesting but it's value is a symbol
of an aggregate (e.g. struct/class/module).
foreach (module_; ModuleInfo)
{
Could someone please explain the new -allinst compiler flag? Is it
supposed to be used on static libraries or on the executable using
templates from those static libraries?
Kind Regards
Benjamin Thaut
On Wednesday, 6 November 2013 at 19:33:10 UTC, Benjamin Thaut
wrote:
Could someone please explain the new -allinst compiler flag? Is
it supposed to be used on static libraries or on the executable
using templates from those static libraries?
Kind Regards
Benjamin Thaut
It is a hack that
module aaa;
import std.string;
template Alias(alias S)
{
alias Alias = S;
}
void main()
{
import std.string;
foreach (symbol_name; __traits(allMembers, aaa))
{
alias symbol = Alias!(__traits(getMember, aaa, symbol_name));
Am 06.11.2013 20:48, schrieb Dicebot:
On Wednesday, 6 November 2013 at 19:33:10 UTC, Benjamin Thaut wrote:
Could someone please explain the new -allinst compiler flag? Is it
supposed to be used on static libraries or on the executable using
templates from those static libraries?
Kind Regards
On Wednesday, 6 November 2013 at 20:02:42 UTC, Benjamin Thaut
wrote:
Well I encounter strange linker errors since 2.064. The
question is if it is supposed to be used when compiling the
executable or when compiling the static library.
You are trying to think about it about a normal feature
Am 06.11.2013 21:14, schrieb Dicebot:
On Wednesday, 6 November 2013 at 20:02:42 UTC, Benjamin Thaut wrote:
Well I encounter strange linker errors since 2.064. The question is if
it is supposed to be used when compiling the executable or when
compiling the static library.
You are trying to
Sorry about that, I have already spent all my rage on this
decision but with no result. Releasing incomplete features as in
good old times.
On Wednesday, 6 November 2013 at 21:07:47 UTC, Gary Willoughby
wrote:
Unfortunately this still suffers the same problem in that you
need a module symbol name to do anything. I need to get all
module symbols at compile time.
You need only symbol name of your root compiled module which
imports
On Wednesday, 6 November 2013 at 21:26:09 UTC, Dicebot wrote:
On Wednesday, 6 November 2013 at 21:07:47 UTC, Gary Willoughby
wrote:
Unfortunately this still suffers the same problem in that you
need a module symbol name to do anything. I need to get all
module symbols at compile time.
You
On Wednesday, 6 November 2013 at 21:36:52 UTC, Daniel Davidson
wrote:
I don't think it works that way, as how could a compile time
test module know about modules that have pulled it in?
Exactly. __traits work during compile-time. If module is not
imported, it is not known during compile-time
Wow. It didn't even occur to me that `is` could be used like
that. I think that operator is the hardest part of the language
for me to grok. Thanks guys!
On Wednesday, 6 November 2013 at 21:49:52 UTC, Atila Neves wrote:
Wow. It didn't even occur to me that `is` could be used like
that. I think that operator is the hardest part of the language
for me to grok. Thanks guys!
http://dlang.org/expression.html#IsExpression ;)
Dicebot:
Typedef implementation sucks? ;)
So do you suggest to open some enhancement request/bug report on
Typedef?
Bye,
bearophile
foreach (module_; ModuleInfo)
{
auto func = module_.unitTest;
func(); // run tests;
}
The above code retrieves all of the current project's modules and
then grabs each module's unit test blocks. The only trouble is
that the module's unit tests are kinda rolled into one function
as
On Wednesday, 6 November 2013 at 22:33:48 UTC, Gary Willoughby
wrote:
The above code retrieves all of the current project's modules
and then grabs each module's unit test blocks. The only trouble
is that the module's unit tests are kinda rolled into one
function as show by the 'func' variable
On Wednesday, 6 November 2013 at 21:52:04 UTC, Dicebot wrote:
On Wednesday, 6 November 2013 at 21:49:52 UTC, Atila Neves
wrote:
Wow. It didn't even occur to me that `is` could be used like
that. I think that operator is the hardest part of the
language for me to grok. Thanks guys!
On Wednesday, 6 November 2013 at 22:41:08 UTC, Atila Neves wrote:
I know, but I keep having to refer back to that and even then I
didn't know about the syntax these guys just posted! ;)
Well, it is mentioned in the list of `is` usage cases down that
link. It is very ugly part of the language
On Wednesday, 6 November 2013 at 22:43:18 UTC, Dicebot wrote:
On Wednesday, 6 November 2013 at 22:41:08 UTC, Atila Neves
wrote:
I know, but I keep having to refer back to that and even then
I didn't know about the syntax these guys just posted! ;)
Well, it is mentioned in the list of `is`
On Wed, Nov 06, 2013 at 11:52:56PM +0100, Namespace wrote:
On Wednesday, 6 November 2013 at 22:43:18 UTC, Dicebot wrote:
On Wednesday, 6 November 2013 at 22:41:08 UTC, Atila Neves wrote:
I know, but I keep having to refer back to that and even then I
didn't know about the syntax these guys
On Wednesday, 6 November 2013 at 21:57:47 UTC, bearophile wrote:
Dicebot:
Typedef implementation sucks? ;)
So do you suggest to open some enhancement request/bug report
on Typedef?
Bye,
bearophile
Sure. get enough such reports and we may even get it back as
language feature :) (I think
Hi, I've been following the D language off and on for several
years, have read Andrei's D book, but haven't ever posted here
before. Mostly, I come from a C++ and C# background. Recently, I
was playing with D using the derelict bindings for the SDL
library.
The SDL library uses handles in
On Tuesday, 5 November 2013 at 21:01:40 UTC, John J wrote:
On 11/05/2013 11:00 AM, bearophile wrote:
How to solve such little troubles? A possible idea is to add
to D
another attribute, a kind of private private that is
enforced inside
the same module. It could be named super private because D
On Thursday, 7 November 2013 at 00:07:25 UTC, ChrisG wrote:
My question is: what's the status of D's struct Unique? It
looks like struct RefCounted is current, but I can't tell with
Unique. There's several comments in the source that say:
doesn't work yet. It seems like some of it could be
On Wednesday, 6 November 2013 at 12:19:26 UTC, Timon Gehr wrote:
How about just adding full granularity?
By condition:
@visibleIf!true // public
@visibleIf!(isSubtypeOf!(typeof(this))) // protected
By explicit enumeration:
@visible!(getModule!(typeof(this))) //
How does one reflect on all the classes in a module? I would like to
read their attributes and generate an enum from attributes on said
classes.
On Thursday, 7 November 2013 at 01:37:24 UTC, Shammah Chancellor
wrote:
How does one reflect on all the classes in a module?
__traits(allMembers, your_module)
There's two easy ways to get your_module: __traits(parent,
some_top_level_symbol0 or mixin(module.name.here);
allMembers gives a
I'm trying to use BinaryHeap and i found out that i cannot use
foreach(). My question is, there is any other way to do it?, can
i iterate a BinaryHeap?
On Wednesday, 6 November 2013 at 10:32:01 UTC, Namespace wrote:
On Wednesday, 6 November 2013 at 10:21:38 UTC, evilrat wrote:
On Wednesday, 6 November 2013 at 10:13:07 UTC, Namespace wrote:
Should I open a bug for this?
you should fix ur sc.ini first to use visual studio linker for
x64 and
65 matches
Mail list logo