On Wednesday, 5 December 2012 at 08:39:12 UTC, Gor Gyolchanyan
wrote:
Consider this piece of code:
struct Test
{
template member(Type)
{
Type member;
}
}
unittest
{
Test test;
test.member!int = 0;
test.member!long = 0;
test.member!short = 0;
import std.stdio; writeln(test.sizeof);
assert(test.s
On Tuesday, 11 December 2012 at 13:24:59 UTC, d coder wrote:
No, it's a fix of a gotcha from C. The C code would just allow
the
assignment.
Yes Andrei.
But it does not look clean if you have to write:
byte a, b, c;
a = cast(byte) (b + c);
Well I know the advantages (safety). But imagine ha
A part of the project I'm currently working on relies heavily on
messages being sent between objects. There's some sort of
container object which receives the messages, and notifies any
listeners registered to it. We can't send the messages to the
final recipients directly because the sender do
:37 UTC, Daniel Murphy wrote:
Does message _have_ to be an interface? With an abstract class
the offset
will always be zero, so
T my_cast(T : Message)(Message m)
{
debug
return cast(T)m;
else
return cast(T)cast(void*)m;
}
"Rene Zwanenburg" wrote in messa
The project I'm currently working on is becoming quite large, and
is being compiled to a few different lib files. This is useful,
so the application and tools only have to link to the libraries
they need.
We use DMD's interface generation option to create the header
files, which is an awesome
Done:
http://d.puremagic.com/issues/show_bug.cgi?id=7610
On Wednesday, 29 February 2012 at 15:35:23 UTC, Andrei
Alexandrescu wrote:
On 2/29/12 9:25 AM, Rene Zwanenburg wrote:
The project I'm currently working on is becoming quite large,
and is
being compiled to a few different lib files.
On Wednesday, 29 February 2012 at 18:10:41 UTC, Martin Nowak
wrote:
On Wed, 29 Feb 2012 16:25:32 +0100, Rene Zwanenburg
wrote:
The project I'm currently working on is becoming quite large,
and is being compiled to a few different lib files. This is
useful, so the application and tools
On Thursday, 1 March 2012 at 07:45:24 UTC, Jonathan M Davis wrote:
On Thursday, March 01, 2012 08:26:00 Jacob Carlborg wrote:
On 2012-03-01 01:53, Jonathan M Davis wrote:
> package functions are currenly non-virtual.
>
> The spec claims that "all non-static non-private
> non-template membe
On Wednesday, 29 February 2012 at 23:55:05 UTC, Andrei
Alexandrescu wrote:
On 2/29/12 12:26 PM, Rene Zwanenburg wrote:
On Wednesday, 29 February 2012 at 18:10:41 UTC, Martin Nowak
wrote:
On Wed, 29 Feb 2012 16:25:32 +0100, Rene Zwanenburg
wrote:
The project I'm currently working
A few months ago, I remember reading in a thread in this group
that Andrei is working on an Allocator design for the standard
library. I'd like to know if this is still actively being worked
on, and if so, if there's a (rough) ETA.
The reason I'm asking is that I'm working on a piece of code
On Thursday, 15 March 2012 at 15:34:18 UTC, Andrei Alexandrescu
wrote:
On 3/15/12 8:19 AM, Rene Zwanenburg wrote:
A few months ago, I remember reading in a thread in this group
that
Andrei is working on an Allocator design for the standard
library. I'd
like to know if this is still act
On Tuesday, 20 March 2012 at 19:02:16 UTC, Andrei Alexandrescu
wrote:
I plan to give a talk at Lang.NEXT
(http://channel9.msdn.com/Events/Lang-NEXT/Lang-NEXT-2012) with
the subject above. There are a few features of D that turned
out to be successful, in spite of them being seemingly
unimporta
And there goes the formatting, here's a pastebin version:
http://pastebin.com/dHdiG0ce
On Wednesday, 21 March 2012 at 01:41:27 UTC, Rene Zwanenburg
wrote:
On Tuesday, 20 March 2012 at 19:02:16 UTC, Andrei Alexandrescu
wrote:
I plan to give a talk at Lang.NEXT
(http://channel9.msdn.com/E
It appears I'm running into issue 6906, meaning it's impossible
to store structs in an AA if they have opAssign defined. For
example:
struct S {
}
On Thursday, 22 March 2012 at 20:08:02 UTC, Rene Zwanenburg wrote:
It appears I'm running into issue 6906, meaning it's impossible
to store structs in an AA if they have opAssign defined. For
example:
struct S {
}
Apologies, sent before I finished. Tab + enter in the web
interface
On Friday, 30 March 2012 at 18:39:44 UTC, Jonathan M Davis wrote:
I'd propose that we make it so that if a module publicly
imports another
module, then you could treat it as if it were in that module.
So, because
std.datetime.package publicly imports std.datetime.systime, you
could use
std.dat
I'm not sure, but it appears that std.xml uses exceptions for
control flow. I use VisualD for development, and Visual Studio
has been configured to break on exceptions. This means that every
time a new DocumentParser is created with valid XML, the debugger
explodes because of the thrown excepti
On Sunday, 15 April 2012 at 15:31:52 UTC, Jesse Phillips wrote:
On Sunday, 15 April 2012 at 14:43:37 UTC, Rene Zwanenburg wrote:
I'm not sure, but it appears that std.xml uses exceptions for
control flow. I use VisualD for development, and Visual Studio
has been configured to bre
On Monday, 16 April 2012 at 20:59:11 UTC, Nick Sabalausky wrote:
"Rene Zwanenburg" wrote in message
news:qsfdbygjmisksxwmz...@forum.dlang.org...
Thanks. I've been trying to get D2-XML to compile for a few
hours now without much luck, so that one is out. Does anyone
kn
On Thursday, 7 March 2013 at 09:43:21 UTC, jerro wrote:
Are errors of this magnitude to be expected using doubles, or
is this a compiler bug?
Errors of this magnitude are to be expected. the value of accum
in your example is somewhere around 3e+08, so the relative
error is around 1e-15, and d
On Tuesday, 9 April 2013 at 11:10:40 UTC, Denis Shelomovskij
wrote:
If you are not interesting in developing OPTLINK but want to
live without Issue 6144, email me (on this address or without
".reg" suffix) and I'll send you fixed OPTLINK.
Hi,
It looks like the web interface to the NG doesn't
On Monday, 18 June 2012 at 17:51:39 UTC, Walter Bright wrote:
On 6/17/2012 3:34 AM, Jacob Carlborg wrote:
1. DMD can only output OMF binaries
2. DMD cannot output 64bit code for Windows
3. DMD is not compatible with the MSVC linker or runtime
I intend to fix all of those, at least for 64 bit
I like this idea, I've had some nasty bugs because of this when I
just started with D.
But IIRC the language doesn't forbid use of the GC in
destructors, meaning it's an implementation issue. I don't know
what the problems involved in allowing allocations during sweeps
are, but I'd prefer to
On Tuesday, 29 October 2013 at 10:26:13 UTC, Jacob Carlborg wrote:
On 2013-10-29 10:43, Andrea Fontana wrote:
I was reading 2.064 changelog on website.
Check this:
template Tuple(T...) { alias Tuple = T; }
template isIntOrFloat(T)
{
static if (is(T == int) || is(T == float))
enum i
On Tuesday, 29 October 2013 at 14:15:27 UTC, Iain Buclaw wrote:
On 29 October 2013 12:13, Rene Zwanenburg
wrote:
Didn't we get the shorthand enum template syntax in this
release?
enum isInOrFloat(T) = is(T == int) || is(T == float)
In 2.063? No we didn't.
Oops, I didn
Hi,
I'm mostly a windows developer, so my linux-fu is pretty non
existent. I do however run some D applications on a Debian box
which has been quite painless up until now.
Today I tried to update DMD on the Debian box from 2.062 to
2.063.2. I removed dmd, switched to the D-Apt repository on
25 July 2013 at 01:59:43 UTC, H. S. Teoh wrote:
On Thu, Jul 25, 2013 at 03:51:48AM +0200, Rene Zwanenburg wrote:
[...]
apt-get install dmd-bin
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you
ha
That fixed it, thanks!
One more question about my current sources.list:
# deb http://ftp.nl.debian.org/debian/ squeeze main
deb http://ftp.nl.debian.org/debian/ squeeze main non-free
deb-src http://ftp.nl.debian.org/debian/ squeeze main
deb http://security.debian.org/ squeeze/updates main
Okay great. Thanks again for your help.
On Thursday, 25 July 2013 at 15:01:59 UTC, H. S. Teoh wrote:
For best results, replace all occurrences of "squeeze" with
"stable"
(and remove the line you added, since it will be identical with
one of
the previous lines). That way, it will automatically
I need a template constraint to ensure a struct is not copyable.
While I found hasElaborateCopyConstructor* in std.traits, there
seems not to be something like isCopyConstructible. Shall I
create an enhancement request or did I miss something? Same
question for isDefaultConstructible.
* This
On Tuesday, 1 April 2014 at 17:49:21 UTC, monnoroch wrote:
I mean, it would be just super cool. At my work we have like
gigabytes of c++ code, and almost all of it in namespaces, if i
just could write simple extern(C++) declarations for them it
would be so much easier to start working with D.
On Friday, 1 August 2014 at 10:25:39 UTC, Tudor Berariu wrote:
Is it possible to compare at compile time an element from a
TypeTuple with another type?
This code fails:
alias T = Tuple!(int, bool);
static assert(is(T[0] == int));
Error: static assert (is(Tuple!(int, bool)[0] ==
On Friday, 1 August 2014 at 11:55:02 UTC, Tudor Berariu wrote:
On Friday, 1 August 2014 at 10:34:02 UTC, Rene Zwanenburg wrote:
On Friday, 1 August 2014 at 10:25:39 UTC, Tudor Berariu wrote:
Is it possible to compare at compile time an element from a
TypeTuple with another type?
This code
On Monday, 8 December 2014 at 10:31:46 UTC, John Colvin wrote:
On Sunday, 7 December 2014 at 22:46:02 UTC, Dmitry Olshansky
wrote:
08-Dec-2014 01:38, John Colvin пишет:
On Sunday, 7 December 2014 at 22:13:50 UTC, Dmitry Olshansky
wrote:
08-Dec-2014 00:36, John Colvin пишет:
On Sunday, 7 Decemb
On Wednesday, 16 April 2014 at 06:59:30 UTC, Steve Teale wrote:
On Tuesday, 15 April 2014 at 16:02:33 UTC, Steven Schveighoffer
wrote:
Sorry, I had this wrong. The [] on the left hand side is
actually part of the []= operator. But on the right hand side,
it simply is a [] operator, not tied t
On Wednesday, 28 May 2014 at 07:13:37 UTC, BlackEdder wrote:
I'm trying to write a thin wrapper around redblacktree, but it
seems every object of the class shares the same copy of
redblacktree. Am I doing something wrong or is this a bug.
Minimal code example:
import std.array;
import std.con
On Wednesday, 28 May 2014 at 08:37:14 UTC, Chris wrote:
On Wednesday, 28 May 2014 at 07:13:37 UTC, BlackEdder wrote:
I'm trying to write a thin wrapper around redblacktree, but it
seems every object of the class shares the same copy of
redblacktree. Am I doing something wrong or is this a bug.
On Wednesday, 28 May 2014 at 11:57:51 UTC, Namespace wrote:
On Wednesday, 28 May 2014 at 11:54:30 UTC, Wanderer wrote:
Java misses this feature badly, forcing programmers to
copy-paste bloated code (constructor A calls constructor B
with fewer arguments, constructor B calls constructor C etc,
On Wednesday, 28 May 2014 at 09:37:55 UTC, Edwin van Leeuwen
wrote:
Thank you for the reply. Does this mean I should never
initialize classes/objects like that or is it more specific to
RBT?
It's the same for any class.
I guess structs have the same problem with classes/objects?
That's rig
I depend heavily on RAII in a project I'm working on. Since
structs in dynamic arrays never have their destructors called I'm
using Array!T instead. A pattern that comes up often is that I
have some input range of T's which need to be stored in a member
Array!T. However Array is not an output r
On Thursday, 5 June 2014 at 16:29:09 UTC, monarch_dodra wrote:
On Thursday, 5 June 2014 at 16:21:21 UTC, monarch_dodra wrote:
Well, one issue is that for a "Range", "put" really just means
overwrite the front element, and pop it. So...
I see. I wasn't aware of that.
That said, having an expl
On Thursday, 12 June 2014 at 15:56:17 UTC, simendsjo wrote:
Yeah, not good. Does any sane person use _ as a variable
identifier and
then reference it? A breaking change would be a special rule so
_ can
never be used and is allowed to shadow. Of course - this could
break
existing code, so it wi
On Friday, 13 June 2014 at 09:29:25 UTC, Jonathan M Davis via
Digitalmars-d wrote:
I'd honestly rather see for(;;) {} removed than have foreach(;
0..n) {} added.
I don't like special cases like like these.
And I really don't think that it's a big deal to have to
provide a counter
variable that
I /think/ this is a bug, but I'm not 100% sure. The following
compiles without any problems, as it should:
import std.typecons;
alias Handle(T) = RefCounted!(T, RefCountedAutoInitialize.no);
auto initialized(T)() if(is(T == RefCounted!S, S...))
{
T refCounted;
refCounted.refCou
On Thursday, 26 June 2014 at 10:52:22 UTC, Shammah Chancellor
wrote:
On 2014-06-26 10:38:53 +, bearophile said:
For people that are not following closely what's happening in
GitHub, there are some nice or very nice patches waiting to be
fixed and/or accepted, among the last ones:
...
By
On Thursday, 26 June 2014 at 13:25:00 UTC, Meta wrote:
Yes, this is a bug. This code should work. If it doesn't
compile with Git HEAD, you should file a bug report.
Apparently it does. I'm not set up to build DMD myself so I'm
always just using the latest release.
On Thursday, 26 June 2014 at 12:52:54 UTC, hane wrote:
DMD 2.066(git head) compiled both without error.
Thanks for checking!
Over the past few weeks I've noticed increasing performance
issues with the web interface. Most of the time everything works
fine, but every now and then it takes between ten to twenty
seconds to load a page. It used to be quite rare but now it
happens quite often, usually multiple times when I
On Monday, 4 April 2016 at 19:56:11 UTC, Vladimir Panteleev wrote:
On Friday, 1 April 2016 at 08:55:16 UTC, Vladimir Panteleev
wrote:
There are some IO-intensive tasks running on a server right
now which should be done in a few days. They've been running
for a few days, not weeks, though.
Sho
On Thursday, 12 May 2016 at 08:41:25 UTC, John Burton wrote:
Is this legal / valid in D and if not what is the appropriate
way to efficiently access data like this?
Phobos / druntime use casts like this as well, but there has been
some discussion as to whether it should be guaranteed to be
co
On Thursday, 12 May 2016 at 09:25:49 UTC, Stefan Koch wrote:
How would such a cast be safe?
I'm guessing safe as in defined behavior.
On Thursday, 12 May 2016 at 22:23:38 UTC, Marco Leise wrote:
The pointer cast solution is specifically supported at CTFE,
because /unions/ don't work there. :p
Well that's a problem ^^
I remember a discussion quite a while ago where Walter stated D
should have strict aliasing rules, let me se
On Friday, 20 May 2016 at 11:32:16 UTC, ZombineDev wrote:
IMO, the best way forward is:
+ The compiler should lower voldemort types, according to the
scheme that Steve suggested
(http://forum.dlang.org/post/nhkmo7$ob5$1...@digitalmars.com)
+ After that, during symbol generation (mangling) if a
On Friday, 20 May 2016 at 12:08:37 UTC, ZombineDev wrote:
@Rene
How do you expect the compiler to know the exact return type,
only by looking at this signature:
auto transmogrify(string str);
A possible implementation might be this:
auto transmogrify(string str)
{
return str.map!someFunc.fi
On Tuesday, 24 May 2016 at 09:46:28 UTC, wobbles wrote:
The fact the 'security' feature is done on the name of a file
and therefore so easily circumvented means it's not a
'security' feature at all, and only an annoyance!
If the filename does not contain install or setup there is no
elevation
On Sunday, 19 June 2016 at 14:05:22 UTC, mogu wrote:
Today, I'm working on a private GUI tool which must be run at
linux and windows. It's awful that I compile a little 64bit
program(or -m32mscoff) in windows must have visual studio which
has tremendous size installed even though I only need a
On Sunday, 19 June 2016 at 14:45:29 UTC, mogu wrote:
Moreover, I wonder if D is really a cross-platform programming
language?! The official dmd only supports x86 structure. You
can never build a project with third party static library in
windows independently.
Back when DMD on windows exclusi
On Friday, 13 April 2018 at 05:31:25 UTC, Jesse Phillips wrote:
Well if DIP1000 isn't on by default I don't think Phobos should
be compiled with it.
I think that the version issue is not unique to D and would be
good to address, but I don't see the compiler reading the
object file to determin
On Wednesday, 3 May 2017 at 13:50:53 UTC, Bastiaan Veelo wrote:
On Wednesday, 3 May 2017 at 13:36:45 UTC, Steven Schveighoffer
wrote:
(first of which I'm having now ;). Where were you thinking to
meet?
If there's beer where you are, I can get to you. 20 min.
I'm also staying at the Beethov
On Wednesday, 3 May 2017 at 13:36:45 UTC, Steven Schveighoffer
wrote:
I am at the Ludwig van Beethoven hotel. Just had a 2 hour nap,
couldn't sleep on the plane. So a few beers will do me well
(first of which I'm having now ;). Where were you thinking to
meet?
-Steve
Are you still at the ho
On Wednesday, 3 May 2017 at 15:05:02 UTC, Bastiaan Veelo wrote:
On Wednesday, 3 May 2017 at 14:38:41 UTC, Rene Zwanenburg wrote:
On Wednesday, 3 May 2017 at 13:36:45 UTC, Steven Schveighoffer
wrote:
I am at the Ludwig van Beethoven hotel. Just had a 2 hour
nap, couldn't sleep on the plan
On Friday, 4 August 2017 at 08:33:42 UTC, RazvanN wrote:
On Friday, 4 August 2017 at 05:57:00 UTC, Nick B wrote:
See -
https://medium.freecodecamp.org/a-hacker-stole-31m-of-ether-how-it-happened-and-what-it-means-for-ethereum-9e5dc29e33ce
[...]
I don't think the problem was with the blockcha
On Wednesday, 9 August 2017 at 23:57:19 UTC, Johnson Jones wrote:
Sometimes one doesn't want to import either the whole module
nor specify a single function to import. It seems that
basically D has all the info to import the function implicitly
because it usually gives a nice error message tell
On Friday, 22 September 2017 at 08:14:43 UTC, Szabo Bogdan wrote:
Hi,
Is there a reason why code.dlang.org is offline?
Thanks,
Bogdan
It works fine for me. Can you verify?
On Friday, 30 September 2016 at 03:27:36 UTC, Nick Sabalausky
wrote:
You don't have to USE the web framework stuff to the use json
part.
This sort of question has come up before, but I've really never
understood the problem. Sounds more ideologic than anything
real to me.
Since Vibe has bee
On Thursday, 10 November 2016 at 09:35:00 UTC, Mario Silva wrote:
I haven't tried it yet, but I would want to avoid changing the
compiler at this point, since we already have all our tooling
build around DMD.
That is why I'm asking specifically about the state of the
64-bit windows version of
On Tuesday, 15 November 2016 at 16:20:53 UTC, AB wrote:
Hopefully, future releases of DMD will fix this inconsistency
by requiring Visual Studio for 32-bit D programs as well.
You already do, if you compile with -m32mscoff.
Hi,
I just tried to register for DConf, but PayPal is borken at the
moment. (Not the link on the DConf website, PayPal itself is
throwing errors)
In case it's still not working tomorrow, would it be possible to
register some other way? I don't have a credit card.
On Saturday, 1 April 2017 at 23:54:45 UTC, Walter Bright wrote:
On 4/1/2017 12:38 PM, Rene Zwanenburg wrote:
I just tried to register for DConf, but PayPal is borken at
the moment. (Not the
link on the DConf website, PayPal itself is throwing errors)
In case it's still not working tom
69 matches
Mail list logo