On Sunday, 30 April 2017 at 03:20:20 UTC, JV wrote:
On Sunday, 30 April 2017 at 03:18:04 UTC, Adam D. Ruppe wrote:
On Sunday, 30 April 2017 at 03:10:25 UTC, JV wrote:
btw i forgot to add () at readln while editing the post
That's not necessary, it doesn't change anything.
But readln without
I've been playing around with using D with no runtime on Linux,
but recently I was thinking it would be nice to have an alloca
implementation. I was thinking I could just bump the stack
pointer (with alignment considerations) but from what I
understand compilers sometimes generate code that
https://issues.dlang.org/show_bug.cgi?id=14402
Walter Bright changed:
What|Removed |Added
Keywords||ice
On Sunday, 30 April 2017 at 03:18:39 UTC, JV wrote:
On Sunday, 30 April 2017 at 03:13:14 UTC, JV wrote:
On Sunday, 30 April 2017 at 02:07:48 UTC, JV wrote:
int func;
writeln("\t\tEnter Selection : ");
readln(func);
On Sunday, 30 April 2017 at 03:20:20 UTC, JV wrote:
On Sunday, 30 April 2017 at 03:18:04 UTC, Adam D. Ruppe wrote:
On Sunday, 30 April 2017 at 03:10:25 UTC, JV wrote:
okay?? but how do i return an int?
tried using what i found in the internet like using std.conv;
to use toInt() but still
On Sunday, 30 April 2017 at 03:18:04 UTC, Adam D. Ruppe wrote:
On Sunday, 30 April 2017 at 03:10:25 UTC, JV wrote:
btw i forgot to add () at readln while editing the post
That's not necessary, it doesn't change anything.
But readln without arguments returns a string, not an int.
okay?? but
On Sunday, 30 April 2017 at 03:13:14 UTC, JV wrote:
On Sunday, 30 April 2017 at 02:07:48 UTC, JV wrote:
Hello i'm kinda new to D language and i wanted to make a
simple program
but somehow my input does no go to my if statements and just
continues to ask for the user to input.Kindly help me
On Sunday, 30 April 2017 at 03:10:25 UTC, JV wrote:
btw i forgot to add () at readln while editing the post
That's not necessary, it doesn't change anything.
But readln without arguments returns a string, not an int.
On Sunday, 30 April 2017 at 02:07:48 UTC, JV wrote:
Hello i'm kinda new to D language and i wanted to make a simple
program
but somehow my input does no go to my if statements and just
continues to ask for the user to input.Kindly help me
btw here is my sample code
int func;
On Sunday, 30 April 2017 at 03:04:49 UTC, Adam D. Ruppe wrote:
On Sunday, 30 April 2017 at 02:07:48 UTC, JV wrote:
int func;
writeln("\t\tEnter Selection : ");
func = readln;
writeln(func);
That shouldn't even compile... are you sure that's your actual
code, and that it is
On Saturday, 29 April 2017 at 14:13:18 UTC, Patrick Schluter
wrote:
For the same reason it is in C. If the ambition for D is to be
a system language then it should avoid introducing artificial
abstractions and work with the machine it runs on, not against.
The C model isn't much like x86 at
On Sunday, 30 April 2017 at 02:07:48 UTC, JV wrote:
int func;
writeln("\t\tEnter Selection : ");
func = readln;
writeln(func);
That shouldn't even compile... are you sure that's your actual
code, and that it is actually building successfully?
On Sunday, 30 April 2017 at 00:17:37 UTC, Carl Sturtivant wrote:
Consider the following.
struct member
{
int n;
}
struct outer
{
member x;
alias x this;
alias n2 = n;
}
This does not compile: alias n2 = n;
Error: undefined identifier 'n'
On the other hand if change that into
Hello i'm kinda new to D language and i wanted to make a simple
program
but somehow my input does no go to my if statements and just
continues to ask for the user to input.Kindly help me
btw here is my sample code
int func;
writeln("\t\tEnter Selection : ");
func = readln;
// Round floating point numbers
import std.algorithm, std.conv, std.functional,
std.math, std.regex, std.stdio;
alias round = pipe!(to!real, std.math.round, to!string);
static reFloatingPoint = ctRegex!`[0-9]+\.[0-9]+`;
void main()
{
// Replace anything that looks like a real
//
On Sat, Apr 29, 2017 at 09:45:36PM +, Ichneumwn via Digitalmars-d wrote:
> Hi,
>
> I use Andrei Alexandrescu's "The D Programming Language" as my main
> reference for the D language. I was wondering if there is a list of
> major developments/changes to D since the 2010 publication of the
>
On Saturday, 29 April 2017 at 19:16:14 UTC, kinke wrote:
On Saturday, 29 April 2017 at 18:08:16 UTC, سليمان السهمي
(Soulaïman Sahmi) wrote:
GCC has this attribute called abi_tag that they put on any
function that returns std::string or std::list
The usual workaround is compiling the C++
Consider the following.
struct member
{
int n;
}
struct outer
{
member x;
alias x this;
alias n2 = n;
}
This does not compile: alias n2 = n;
Error: undefined identifier 'n'
On the other hand if change that into
alias n2 = x.n;
then it does compile.
void main()
{
outer
On Thursday, 27 April 2017 at 05:41:43 UTC, Daniel N wrote:
On Wednesday, 26 April 2017 at 18:34:48 UTC, Carl Sturtivant
wrote:
On Wednesday, 26 April 2017 at 15:00:30 UTC, Steven
Image using frameworks which conveniently allow adding features
to a struct...
struct Beholder
{
mixin
On Friday, 21 April 2017 at 14:55:31 UTC, Steven Schveighoffer
wrote:
One thing we can do also is just use declaration order to
prioritize which alias this to use.
Presumably using declaration order as a means of prioritizing
which name wins was rejected as a design possibility in the case
On Friday, 28 April 2017 at 07:07:44 UTC, Daniel N wrote:
On Friday, 28 April 2017 at 05:32:36 UTC, Carl Sturtivant wrote:
On Friday, 28 April 2017 at 04:44:44 UTC, Carl Sturtivant
wrote:
On Thursday, 27 April 2017 at 05:41:43 UTC, Daniel N wrote:
On Wednesday, 26 April 2017 at 18:34:48 UTC,
On Thursday, 27 April 2017 at 05:41:43 UTC, Daniel N wrote:
On Wednesday, 26 April 2017 at 18:34:48 UTC, Carl Sturtivant
wrote:
On Wednesday, 26 April 2017 at 15:00:30 UTC, Steven
Schveighoffer wrote:
I think you can appreciate that this doesn't scale. Imagine a
case which has 2 or 3 optional
Hi,
I use Andrei Alexandrescu's "The D Programming Language" as my
main reference for the D language. I was wondering if there is a
list of major developments/changes to D since the 2010
publication of the book? Just the language itself, not the
libraries/packages.
The information will be
On Saturday, 29 April 2017 at 21:18:27 UTC, cym13 wrote:
On Saturday, 29 April 2017 at 21:09:13 UTC, fred wrote:
import std.stdio;
I am somewhat new to D, and I am trying to receive user input,
like this, with a prompt:
string str;
writeln("Enter a string: ");
str = readln;
writeln(str);
On Saturday, 29 April 2017 at 21:09:13 UTC, fred wrote:
import std.stdio;
I am somewhat new to D, and I am trying to receive user input,
like this, with a prompt:
string str;
writeln("Enter a string: ");
str = readln;
writeln(str);
However, the prompt appears after I enter the input; any
import std.stdio;
I am somewhat new to D, and I am trying to receive user input,
like this, with a prompt:
string str;
writeln("Enter a string: ");
str = readln;
writeln(str);
However, the prompt appears after I enter the input; any reason
why?
I've trawled the internet for a good hour,
On Saturday, 29 April 2017 at 17:58:15 UTC, Joakim wrote:
Any update on the stream this year, for those of us planning to
watch the talks remotely?
The last bit of news I've received is they will be streamed on
youtube this time.
On Saturday, 29 April 2017 at 18:54:36 UTC, سليمان السهمي
(Soulaïman Sahmi) wrote:
But still, this needs to be fixed, copy pasting the name
mangling is in my opinion just a hack for your specific cpp
compiler on your specific platform.
It can't be fixed on the D side as the Visual C++
On Saturday, 29 April 2017 at 18:08:16 UTC, سليمان السهمي
(Soulaïman Sahmi) wrote:
GCC has this attribute called abi_tag that they put on any
function that returns std::string or std::list
The usual workaround is compiling the C++ source with
_GLIBCXX_USE_CXX11_ABI=0 for gcc >= 5.
On Saturday, 29 April 2017 at 08:08:27 UTC, ParticlePeter wrote:
On Saturday, 29 April 2017 at 00:31:32 UTC, Nicholas Wilson
wrote:
If you are having problems with the linker with Ali's you can
do
```
extern(C++) bool cppFunc( float[3] color ); // correct
signature, but causes compiler
GCC has this attribute called abi_tag that they put on any
function that returns std::string or std::list, for the rational
behind that read
here:https://gcc.gnu.org/onlinedocs/libstdc++/manual/using_dual_abi.html .
the special thing with this attribute is that it adds something
to the name
On Saturday, 15 April 2017 at 07:23:10 UTC, Joakim wrote:
On Saturday, 15 April 2017 at 07:15:06 UTC, Nick B wrote:
Hi
Can anyone advise if there will be live streaming or will
there only YouTube videos after the event. Not that I'm
complaining.
thanks Nick
They had it on Ustream last
On Friday, 28 April 2017 at 17:53:04 UTC, Stefan Koch wrote:
On Thursday, 16 February 2017 at 21:05:51 UTC, Stefan Koch
wrote:
[ ... ]
Hi Guys, I just implemented sliceAssigment.
meaning the following code will now compile:
uint[] assignSlice(uint from, uint to, uint[] stuff)
{
uint[]
On Friday, 28 April 2017 at 08:47:43 UTC, Stefan Koch wrote:
On Thursday, 16 February 2017 at 21:05:51 UTC, Stefan Koch
wrote:
[ ... ]
After a little of exploration of the JIT, I have now determined
that a simple risc architecture is still the best.
(codegen for scaled loads is hard :p)
I
On Sat, Apr 29, 2017 at 11:24:36AM +, Patrick Schluter via
Digitalmars-d-announce wrote:
> On Friday, 28 April 2017 at 22:11:30 UTC, H. S. Teoh wrote:
> > The latest WAT I found in D is this one, see if you can figure it
> > out:
> >
> > char ch;
> > wchar wch;
> > dchar dch;
> >
https://issues.dlang.org/show_bug.cgi?id=17351
--- Comment #8 from ag0ae...@gmail.com ---
(In reply to Andrei Alexandrescu from comment #6)
> Now, Lucia (@somzzz) has gotten to the point where it all passes druntime
> and phobos unittests, but breaks in exactly one point in the compiler. It
> can
On Saturday, 29 April 2017 at 14:13:18 UTC, Patrick Schluter
wrote:
That's not a simple assumption, it's acknowledgment that a C
program runs on real
hardware not a virtual machine like Java or C#.
Modern X86s are basically virtual machines... The instruction set
is decoded and executed on a
On Saturday, 29 April 2017 at 13:54:04 UTC, Petar Kirov
[ZombineDev] wrote:
Are the *.di generated automatically, or are they written by
hand? The compiler is known [0] to have problems with header
(*.di) generation, and IIRC there were some fixes recently [1]
that may have caused this
On Saturday, 29 April 2017 at 11:48:46 UTC, Ola Fosheim Grøstad
wrote:
On Saturday, 29 April 2017 at 11:24:36 UTC, Patrick Schluter
wrote:
C99 says "if an int can represent all values of the original
type, the value is converted to an int; otherwise, it is
converted to an unsigned int."
https://issues.dlang.org/show_bug.cgi?id=17141
Jack Stouffer changed:
What|Removed |Added
Summary|CommonType!(dchar, char)|Type Inference
https://issues.dlang.org/show_bug.cgi?id=17351
ZombineDev changed:
What|Removed |Added
CC|
https://issues.dlang.org/show_bug.cgi?id=17141
Jack Stouffer changed:
What|Removed |Added
Blocks||17358
--
https://issues.dlang.org/show_bug.cgi?id=17358
Jack Stouffer changed:
What|Removed |Added
Depends on||17141
--
On Saturday, 29 April 2017 at 12:42:09 UTC, JamesD wrote:
Is there a known issue with DMD 2.074.0 importing *.di files?
(If no answer here, I will re-post in the DMD thread)
I've searched, but could not find this issue in the forums.
The following errors occur on both linux and windows when
https://issues.dlang.org/show_bug.cgi?id=17351
--- Comment #7 from Andrei Alexandrescu ---
I meant:
bool __equals(L, R)(L[] lhs, R[] rhs);
bool __equals(L, R, size_t n1)(auto ref L[n1] lhs, R[] rhs);
bool __equals(L, R, size_t n2)(auto ref L[] lhs, auto ref R[n2] rhs);
bool
https://issues.dlang.org/show_bug.cgi?id=17351
--- Comment #6 from Andrei Alexandrescu ---
(In reply to ag0aep6g from comment #5)
> You have to initialize the int[3], as you did with the int. I suppose the
> compiler assumes that you're going to do run-time initialization via
I'd like to know why the things work like they are working now:
===
module a;
immutable int[42] a = [42]; // OK
static immutable int[42] b = [42]; // OK
void main()
{
immutable int[42] c = [42]; // Not allowed
}
===
1/ this is error prone
2/ the semantic is not consistent (allowed here,
Is there a known issue with DMD 2.074.0 importing *.di files?
(If no answer here, I will re-post in the DMD thread)
I've searched, but could not find this issue in the forums.
The following errors occur on both linux and windows when
building a simple hello world DWT gui app. The same code
On Saturday, 29 April 2017 at 11:24:36 UTC, Patrick Schluter
wrote:
C99 says "if an int can represent all values of the original
type, the value is converted to an int; otherwise, it is
converted to an unsigned int."
Well, C is making the simple assumption that registers are
int-sized...
On Saturday, 29 April 2017 at 10:17:47 UTC, Atila Neves wrote:
On Saturday, 29 April 2017 at 06:22:03 UTC, ParticlePeter wrote:
On Saturday, 29 April 2017 at 01:49:56 UTC, Atila Neves wrote:
On Friday, 28 April 2017 at 18:41:22 UTC, kinke wrote:
[...]
The worst part about that is mangling
On Friday, 28 April 2017 at 22:11:30 UTC, H. S. Teoh wrote:
The latest WAT I found in D is this one, see if you can figure
it out:
char ch;
wchar wch;
dchar dch;
pragma(msg, typeof(true ? ch : ch));// char - OK
pragma(msg, typeof(true ? ch : wch));
Thank you guys for your input.
On Saturday, 29 April 2017 at 10:54:02 UTC, bachmeier wrote:
Many invested in Rust and C++ will look for arguments to
support staying with their language. I've come to the
conclusion that the D community is mostly to blame for not
making a good case to the other group that are open to D, but
On Friday, 28 April 2017 at 19:49:35 UTC, Ola Fosheim Grøstad
wrote:
On Friday, 28 April 2017 at 17:48:47 UTC, Ola Fosheim Grøstad
wrote:
On Friday, 28 April 2017 at 17:42:18 UTC, bachmeier wrote:
I'm hoping to put all information in one place. Then when
someone on Reddit or HN or here starts
On Saturday, 29 April 2017 at 06:22:03 UTC, ParticlePeter wrote:
On Saturday, 29 April 2017 at 01:49:56 UTC, Atila Neves wrote:
On Friday, 28 April 2017 at 18:41:22 UTC, kinke wrote:
[...]
The worst part about that is mangling aside, the two
declarations are identical to the compiler.
On Saturday, 29 April 2017 at 09:24:35 UTC, Ola Fosheim Grøstad
wrote:
On Saturday, 29 April 2017 at 08:45:26 UTC, Moritz Maxeiner
wrote:
On Saturday, 29 April 2017 at 07:26:45 UTC, Timon Gehr wrote:
I don't doubt that, but the implicit generalization is
"multiple pointer types are necessarily
https://issues.dlang.org/show_bug.cgi?id=17359
--- Comment #3 from ki...@gmx.net ---
So the proper workaround for MSVC targets would be:
C++:
bool cppFunc(float color[3])
{
for (int i = 0; i < 3; ++i) color[i] *= 2;
return true;
}
D:
pragma(mangle, "?cppFunc@@YA_NQEAM@Z")
extern(C++)
On Thursday, 27 April 2017 at 14:53:02 UTC, Mike Parker wrote:
This year, DConf has an extra day tacked on for problem solving
in the form of a hackathon. The intent is to work on issues
people find frustrating in the D ecosystem. While there will be
time given at the event for proposals, and
https://issues.dlang.org/show_bug.cgi?id=17359
ki...@gmx.net changed:
What|Removed |Added
CC||ki...@gmx.net
--- Comment #2 from
On Saturday, 29 April 2017 at 08:45:26 UTC, Moritz Maxeiner wrote:
On Saturday, 29 April 2017 at 07:26:45 UTC, Timon Gehr wrote:
I don't doubt that, but the implicit generalization is
"multiple pointer types are necessarily always a royal PITA".
The "implicit generalization" is your
On Saturday, 29 April 2017 at 03:44:50 UTC, Nick Sabalausky
(Abscissa) wrote:
On 04/28/2017 06:11 PM, H. S. Teoh via Digitalmars-d-announce
wrote:
https://bartoszmilewski.com/2013/09/19/edward-chands/
That is *awesome*!
Although, I always saw Eddie Scissors as more of a retelling of
On Friday, 28 April 2017 at 18:08:38 UTC, H. S. Teoh wrote:
On Fri, Apr 28, 2017 at 04:42:28PM +, via
Digitalmars-d-learn wrote: [...]
writefln(text("%.", i, "f"), x);
[...]
There's no need to use text() here:
writefln("%.*f", i, x);
does what you want.
T
Thanks, I
On Saturday, 29 April 2017 at 08:15:06 UTC, Stanislav Blinov
wrote:
Ah, that calls for something like a isCallableWith template.
Pay extra care to how you pass parameters in that variadic
opCall template though. Doing it like in the code above will
pass everything by value, even though the
On Saturday, 29 April 2017 at 07:26:45 UTC, Timon Gehr wrote:
On 28.04.2017 23:52, H. S. Teoh via Digitalmars-d wrote:
On Fri, Apr 28, 2017 at 09:50:49PM +, Atila Neves via
Digitalmars-d wrote:
On Friday, 28 April 2017 at 19:41:15 UTC, Ola Fosheim Grøstad
wrote:
On Friday, 28 April 2017 at
On Saturday, 29 April 2017 at 07:15:36 UTC, Timon Gehr wrote:
On 28.04.2017 17:43, Moritz Maxeiner wrote:
[...]
No. Every single thread I read in the last couple of years
ended with
Walter pointing out issues that need to be "hashed out" and
then nobody
doing it.
This is not the full
On Saturday, 29 April 2017 at 06:18:34 UTC, Alex wrote:
The problem is another one: say I have something like this:
import std.traits;
struct A(alias T) if(isCallable!T)
{
auto opCall(U...)(U args) if(is(Parameters!T == U))
//if(__traits(compiles, T(args)))
{
On Saturday, 29 April 2017 at 00:31:32 UTC, Nicholas Wilson wrote:
If you are having problems with the linker with Ali's you can do
```
extern(C++) bool cppFunc( float[3] color ); // correct
signature, but causes compiler error
pragma(mangle, cppFunc.mangleof)
float cppFunc(float * color);
On Saturday, 29 April 2017 at 07:26:45 UTC, Timon Gehr wrote:
I don't doubt that, but the implicit generalization is
"multiple pointer types are necessarily always a royal PITA".
Not true. scope has worse usability than a scoped pointer type.
Yes. In this context it is was more about the GC
https://issues.dlang.org/show_bug.cgi?id=17359
--- Comment #1 from Peter Particle ---
As a work around, we can use Ali's variant and pragma(mangle, "mangle_string").
I found my "mangle_string" with dependency walker.
--
On 28.04.2017 23:52, H. S. Teoh via Digitalmars-d wrote:
On Fri, Apr 28, 2017 at 09:50:49PM +, Atila Neves via Digitalmars-d wrote:
On Friday, 28 April 2017 at 19:41:15 UTC, Ola Fosheim Grøstad wrote:
On Friday, 28 April 2017 at 19:41:15 UTC, Ola Fosheim Grøstad wrote:
«Back in the old DOS
On 28.04.2017 17:43, Moritz Maxeiner wrote:
On Friday, 28 April 2017 at 14:59:46 UTC, Ola Fosheim Grøstad wrote:
On Friday, 28 April 2017 at 09:40:07 UTC, Moritz Maxeiner wrote:
I'm sorry, but that's just plain wrong. D does not have ownership
pointers because nobody that wants them has
https://issues.dlang.org/show_bug.cgi?id=17355
--- Comment #4 from Rainer Schuetze ---
HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\VisualD
is where the installer remembers the setting made during installation. For each
Visual Studio version that you choose for Vsiual D
On Saturday, 29 April 2017 at 01:49:56 UTC, Atila Neves wrote:
On Friday, 28 April 2017 at 18:41:22 UTC, kinke wrote:
On Friday, 28 April 2017 at 18:07:49 UTC, ParticlePeter wrote:
Interesting, your example corresponds to my third case, the
linker error. I am on Window, building an x64 App,
On Saturday, 29 April 2017 at 05:58:35 UTC, Stanislav Blinov
wrote:
On Friday, 28 April 2017 at 20:43:50 UTC, Alex wrote:
void main()
{
foreach(o1; __traits(getOverloads, S1, "opCall"))
{
alias P1 = Parameters!o1;
foreach(o2; __traits(getOverloads, S2, "opCall"))
On Friday, 28 April 2017 at 20:43:50 UTC, Alex wrote:
Hi all,
I have a question about the Parameters trait from
https://dlang.org/phobos/std_traits.html#Parameters
The following code does not compile. Why?
Is it mainly assumed to use it with functions without overloads?
Rather, it is to be
75 matches
Mail list logo