On Friday, 30 May 2014 at 04:21:18 UTC, Jesse Phillips wrote:
I've got two posts complete[1]. Since C++ and D are exactly the
same for the majority of the code I'm only showing D and talk
of C++'s choice. While the rules governing D's behavior are
fairly simple I feel that I've expanded on the
On Saturday, 31 May 2014 at 07:32:22 UTC, Kagamin wrote:
What do you mean D does not provide a decltype?
typeof(cx) my_cx2 = cx;
I'll blame this on my poor knowledge of C++, at this time typeof
in C++ does not appear to compile, in the way I'm trying to use
it. I thought using typeof in C++
On Saturday, 31 May 2014 at 17:49:18 UTC, Jesse Phillips wrote:
On Saturday, 31 May 2014 at 07:32:22 UTC, Kagamin wrote:
What do you mean D does not provide a decltype?
typeof(cx) my_cx2 = cx;
I'll blame this on my poor knowledge of C++, at this time
typeof in C++ does not appear to
I don't know how many people use unit-threaded
(https://github.com/atilaneves/unit-threaded) for their tests,
and of those how many use Arch Linux, but for anyone else there
for who that applies, I added a dtest
(https://github.com/atilaneves/dtest) package to the AUR:
Sublime integration update
http://dynamic.dlang.ru/Files/2014/Sublime-D-integration-plugin-linux-31-05-2014.zip
(only for 64 bit system)
Screenshot
http://dynamic.dlang.ru/Files/2014/87800e29-2dca-49c4-ae79-9f44a2dfe913.png
sorry, I will repost it's to actual thread.
Sublime integration update
http://dynamic.dlang.ru/Files/2014/Sublime-D-integration-plugin-linux-31-05-2014.zip
Screenshot
http://dynamic.dlang.ru/Files/2014/87800e29-2dca-49c4-ae79-9f44a2dfe913.png
On 05/30/2014 02:37 PM, Steven Schveighoffer wrote:
in which case
static if(cond) {
immutable:
}
int x;
should not create x as immutable if cond is true. The current
behavior is not consistent with attribute either.
Ugh, that is really bad. It shouldn't do that. Is that intentional?
On 5/30/2014 5:37 AM, Steven Schveighoffer wrote:
On Thu, 29 May 2014 21:15:21 -0400, deadalnix deadal...@gmail.com wrote:
On Thursday, 29 May 2014 at 19:06:15 UTC, Steven Schveighoffer
wrote:
Static if is certainly NOT an attribute, it doesn't make any sense.
Well... it sorta does. static
On Sat, 2014-05-31 at 07:32 +0200, dennis luehring via Digitalmars-d
wrote:
faulty benchmark
Indeed.
-do not benchmark format
-use a dummy-var - just add(overflow is not a problem) your plus()
results to it and return that in your main - preventing dead code
optimization in any way
On Fri, 2014-05-30 at 19:58 +, bearophile via Digitalmars-d wrote:
Russel Winder:
A priori I would believe there a problem with these numbers: my
experience of CPU-bound D code is that it is generally as fast
as C++.
The C++ code I've shown above if compiled with -Ofast seems
Am 31.05.2014 00:19, schrieb bearophile:
Code similar to this is not uncommon. Currently it's refused:
immutable data = [1, 5, 3, 1, 5, 1, 5];
void main() @nogc {
import std.algorithm: count;
assert(data.count([1, 5]) == 3);
}
test.d(4,23): Error: array literal in @nogc function
I remember Kenji is not fond of this []s syntax, for reasons I
don't remember. Do you think there are other better/different
solutions?
Bye,
bearophile
Read it on my closed Pull Request:
https://github.com/D-Programming-Language/dmd/pull/2952
Another attempt was also closed:
On 31/05/2014 5:34 a.m., Craig Dillabaugh wrote:
I had a couple of things I wanted to post about the D Google Summer of
Code submission for 2015.
1.
After Andrei had asked for someone interested in taking over the D GSOC
submission for 2015, I, along with a few others of you volunteered to
The design of TCMalloc seems to be compatible with Boehm GC, so D
GC can probably use same ideas.
Benjamin Thaut:
give scope a meaning for function arguments other then
lambdas E.g:
size_t count(scope int[] heystack, scope int[] needle);
Now the compiler can allocate the literal [1, 5] on the stack
without any special syntax because it knows that the array
literal will not be escaped.
int foo(scope int[] items) @nogc {
return foo.sum;
}
That was:
return items.sum;
Bye,
bearophile
Am 31.05.2014 11:08, schrieb bearophile:
int foo(scope int[] items) @nogc {
return foo.sum;
}
That was:
return items.sum;
Bye,
bearophile
Well obviously the std.algorithm sum would also be annoted with scope.
Because it doesn't escape it either. I don't see the problem here. And
in
On Saturday, 31 May 2014 at 02:44:00 UTC, Craig Dillabaugh wrote:
On Friday, 30 May 2014 at 19:49:31 UTC, Tobias Pankrath wrote:
I know this is very early, but I work slowly :o)
* Something like boost::log
* Something like boost::program_options
* An parser generator on par with antlr4
*
Benjamin Thaut:
Well obviously the std.algorithm sum would also be annoted with
scope. Because it doesn't escape it either. I don't see the
problem here. And in case you really want to escape it, you
need to .dup it.
A additional advantage of my solution is, that the compiler can
prove it
My opinions about D array bound checks are slowly changing. I
still think -boundscheck=off is useful and good to have. But
now I am giving increasing importance to compiler logic that
optimizes away bound checks safely. People more and more want a
safe system language, more and more persons
On 31/05/2014 10:56 p.m., bearophile wrote:
My opinions about D array bound checks are slowly changing. I still
think -boundscheck=off is useful and good to have. But now I am giving
increasing importance to compiler logic that optimizes away bound checks
safely. People more and more want a safe
31-May-2014 14:56, bearophile пишет:
My opinions about D array bound checks are slowly changing. I still
think -boundscheck=off is useful and good to have. But now I am giving
increasing importance to compiler logic that optimizes away bound checks
safely.
Cool, I hope it means you are getting
Am 31.05.2014 08:36, schrieb Russel Winder via Digitalmars-d:
As well as the average (mean), you must provide standard deviation and
degrees of freedom so that a proper error analysis and t-tests are
feasible.
average means average of benchmarked times
and the dummy values are only for
Am 31.05.2014 13:25, schrieb dennis luehring:
Am 31.05.2014 08:36, schrieb Russel Winder via Digitalmars-d:
As well as the average (mean), you must provide standard deviation and
degrees of freedom so that a proper error analysis and t-tests are
feasible.
average means average of benchmarked
Rikki Cattermole:
The first two foreach statements assignment statements should
be compile errors.
I'm actually a little bit surprised that we don't already test
for this.
But I spose that would actually be quite hard.
I don't know how hard it is. One purpose of this post is to ask
how
On Saturday, 31 May 2014 at 05:29:00 UTC, AsmMan wrote:
Did you mean you use dmd compiler 32-bit itself or are you just
using a 64-bit one with -m32 flag?
the 32 bit compiler itself
On 1/06/2014 12:04 a.m., bearophile wrote:
Rikki Cattermole:
The first two foreach statements assignment statements should be
compile errors.
I'm actually a little bit surprised that we don't already test for this.
But I spose that would actually be quite hard.
I don't know how hard it is.
void main() {
int[5] data;
foreach (const i; 0 .. 10)
data[i] = 0;
foreach (immutable i; 0 .. 10)
data[i] = 0;
int[10] big;
foreach (const i, x; big)
data[i] = x;
}
I'm not sure if bound checks should be removed here. Before
removal, this code gives
https://github.com/tomprimozic/type-systems/tree/master/refined_types
The implementation of a refined type-checker is actually very
straightforward and turned out to be much simpler than I
expected. Essentially, program expressions and contracts on
function parameters and return types are
Wanderer:
void main() {
int[5] data;
foreach (const i; 0 .. 10)
data[i] = 0;
foreach (immutable i; 0 .. 10)
data[i] = 0;
int[10] big;
foreach (const i, x; big)
data[i] = x;
}
I'm not sure if bound checks should be removed here. Before
removal, this code
On Thursday, 29 May 2014 at 18:24:57 UTC, Tom Browder via
Digitalmars-d wrote:
Has anyone done a survey of the primary OS of D users?
I (a D newbie) use Debian Linux (64-bit), but I get the feeling
that
many (if not most) users are on some version of Windows.
Thanks.
Best regards,
-Tom
There's been 100 votes and the results are:
Linux 64 bits: 53
Linux 32 bits: 4
Windows 64 bits:27
Windows 32 bits: 3
Mac: 7
Other: 6:
ArchLinux
Android
Centos 6
MAC OSX, LINUX 64, Windows 64, FreeBSD 64
On 29 May 2014 03:35, via Digitalmars-d digitalmars-d@puremagic.com wrote:
On Wednesday, 28 May 2014 at 17:27:20 UTC, Dicebot wrote:
Adding GC pointer type does not enable anything that you can't do write
now for high-level applications and does not help at all low-level
applications. It is
On Saturday, 31 May 2014 at 13:37:26 UTC, Abdulhaq wrote:
There's been 100 votes and the results are:
Linux 64 bits: 53
Linux 32 bits: 4
Windows 64 bits:27
Windows 32 bits: 3
Mac: 7
Other: 6:
ArchLinux
Android
Centos 6
On 1/06/2014 1:45 a.m., Abdulhaq wrote:
On Saturday, 31 May 2014 at 13:37:26 UTC, Abdulhaq wrote:
There's been 100 votes and the results are:
Linux 64 bits: 53
Linux 32 bits: 4
Windows 64 bits:27
Windows 32 bits: 3
Mac: 7
Other: 6:
On 5/30/14, 10:32 PM, dennis luehring wrote:
-do not benchmark anything without millions of loops - use the average
as the result
Use the minimum unless networking is involved. -- Andrei
On Saturday, 31 May 2014 at 13:52:46 UTC, Rikki Cattermole wrote:
On 1/06/2014 1:45 a.m., Abdulhaq wrote:
On Saturday, 31 May 2014 at 13:37:26 UTC, Abdulhaq wrote:
There's been 100 votes and the results are:
Linux 64 bits: 53
Linux 32 bits: 4
Windows 64 bits:27
Windows 32 bits:
On 5/31/14, 1:30 AM, Rikki Cattermole wrote:
As I said with this years one. I'll most likely be available as a mentor.
I'll be able to definitely help with anything involving web development.
You're welcome to cc me in / chat via gmail.
Thanks! Craig, you may want to put together a permanent
On 5/30/14, 11:36 PM, Russel Winder via Digitalmars-d wrote:
As well as the average (mean), you must provide standard deviation and
degrees of freedom so that a proper error analysis and t-tests are
feasible. Or put it another way: even if you quote a mean with knowing
how many in the sample and
On Sat, 2014-05-31 at 07:02 -0700, Andrei Alexandrescu via Digitalmars-d
wrote:
On 5/30/14, 11:36 PM, Russel Winder via Digitalmars-d wrote:
As well as the average (mean), you must provide standard deviation and
degrees of freedom so that a proper error analysis and t-tests are
feasible. Or
On 5/31/14, 6:45 AM, Abdulhaq wrote:
See the graph at https://www.surveymonkey.com/results/SM-5GGGJV5/
100 voters - no decimals in percentages :o). -- Andrei
On Saturday, 31 May 2014 at 14:01:52 UTC, Andrei Alexandrescu
wrote:
On 5/30/14, 11:36 PM, Russel Winder via Digitalmars-d wrote:
As well as the average (mean), you must provide standard
deviation and
degrees of freedom so that a proper error analysis and t-tests
are
feasible. Or put it
Windows 8.1 Update, x64. Using dmd 32-bit though, can't be
bothered to install MSVC.
On 5/31/14, 7:10 AM, Russel Winder via Digitalmars-d wrote:
On Sat, 2014-05-31 at 07:02 -0700, Andrei Alexandrescu via Digitalmars-d
wrote:
On 5/30/14, 11:36 PM, Russel Winder via Digitalmars-d wrote:
As well as the average (mean), you must provide standard deviation and
degrees of freedom so
On Saturday, 31 May 2014 at 05:12:54 UTC, Marco Leise wrote:
Run this with: -O3 -frelease -fno-assert -fno-bounds-check
-march=native
This way GCC and LLVM will recognize that you alternately add
p0 and p1 to the sum and partially unroll the loop, thereby
removing the condition. It takes
On Saturday, 31 May 2014 at 12:15:57 UTC, Adam D. Ruppe wrote:
On Saturday, 31 May 2014 at 05:29:00 UTC, AsmMan wrote:
Did you mean you use dmd compiler 32-bit itself or are you just
using a 64-bit one with -m32 flag?
the 32 bit compiler itself
I was having problems like some functions like
On Saturday, 31 May 2014 at 08:30:17 UTC, Rikki Cattermole wrote:
On 31/05/2014 5:34 a.m., Craig Dillabaugh wrote:
I had a couple of things I wanted to post about the D Google
Summer of
Code submission for 2015.
1.
After Andrei had asked for someone interested in taking over
the D GSOC
On Saturday, 31 May 2014 at 08:30:17 UTC, Rikki Cattermole wrote:
On 31/05/2014 5:34 a.m., Craig Dillabaugh wrote:
I had a couple of things I wanted to post about the D Google
Summer of
Code submission for 2015.
1.
After Andrei had asked for someone interested in taking over
the D GSOC
On Saturday, 31 May 2014 at 10:19:03 UTC, Tobias Pankrath wrote:
On Saturday, 31 May 2014 at 02:44:00 UTC, Craig Dillabaugh
wrote:
On Friday, 30 May 2014 at 19:49:31 UTC, Tobias Pankrath wrote:
I know this is very early, but I work slowly :o)
* Something like boost::log
* Something like
On Saturday, 31 May 2014 at 14:03:58 UTC, Andrei Alexandrescu
wrote:
On 5/31/14, 1:30 AM, Rikki Cattermole wrote:
As I said with this years one. I'll most likely be available
as a mentor.
I'll be able to definitely help with anything involving web
development.
You're welcome to cc me in /
On Sat, 2014-05-31 at 10:29 -0700, Andrei Alexandrescu via Digitalmars-d
wrote:
[…]
Well there's quantization noise which has uniform distribution. Then all
other sources of noise are additive (no noise may make code run faster).
So I speculate that the pdf is a half Gaussian mixed with a
Dicebot:
Benefits: no arbitrary message length limit, no string
construction unless toString is actually called.
A nothrow @nogc function like the bufferText I've suggested is
also useful in situations like this (currently this can't
compile):
struct Foo {
int[3] data;
ref int
After watching Andrei's keynote where he was asking for help, and
noticing that there wasn't any proof of someone working on this,
I took charge.
http://w0rp.com:8010/
That's the design in the form of a single page website running on
my Linode. The source is available here.
Firstly, wow, the site looks beautiful. It has an air of
professionality to it, but stays minimal and to the point. I
think it'd be best if there was a code example above the fold
though (e.g. how basically every programming language website
does it nowadays), such as the word length snippet
On Saturday, 31 May 2014 at 20:01:50 UTC, Dylan Knutson wrote:
Firstly, wow, the site looks beautiful. It has an air of
professionality to it, but stays minimal and to the point. I
think it'd be best if there was a code example above the fold
though (e.g. how basically every programming
The flat design looks nice, but I really dislike the choice of
background colour. It's bland and clashes quite badly with the
white of the menu and content box.
On Saturday, 31 May 2014 at 20:38:05 UTC, Meta wrote:
On Saturday, 31 May 2014 at 20:12:06 UTC, Meta wrote:
The flat design looks nice, but I really dislike the choice of
background colour. It's bland and clashes quite badly with the
white of the menu and content box.
For comparison, here's
On Saturday, 31 May 2014 at 20:12:06 UTC, Meta wrote:
The flat design looks nice, but I really dislike the choice of
background colour. It's bland and clashes quite badly with the
white of the menu and content box.
For comparison, here's two images. One is the site with the
background as the
On Saturday, 31 May 2014 at 20:38:41 UTC, Meta wrote:
On Saturday, 31 May 2014 at 20:38:05 UTC, Meta wrote:
On Saturday, 31 May 2014 at 20:12:06 UTC, Meta wrote:
The flat design looks nice, but I really dislike the choice
of background colour. It's bland and clashes quite badly with
the white
On Saturday, 31 May 2014 at 20:52:56 UTC, Kapps wrote:
One thing that's a bit broken is that Modern convenience.
Modelling power. Native efficiency. wraps to put efficiency.
on a different line. Perhaps the text should be made smaller
there. Another thing that I'd like to see is a much more
On Saturday, 31 May 2014 at 19:49:22 UTC, w0rp wrote:
After watching Andrei's keynote where he was asking for help,
and noticing that there wasn't any proof of someone working on
this, I took charge.
http://w0rp.com:8010/
That's the design in the form of a single page website running
on my
On Saturday, 31 May 2014 at 19:49:22 UTC, w0rp wrote:
After watching Andrei's keynote where he was asking for help,
and noticing that there wasn't any proof of someone working on
this, I took charge.
http://w0rp.com:8010/
That's the design in the form of a single page website running
on my
On 5/31/14, 11:49 AM, Russel Winder via Digitalmars-d wrote:
On Sat, 2014-05-31 at 10:29 -0700, Andrei Alexandrescu via Digitalmars-d
wrote:
[…]
Well there's quantization noise which has uniform distribution. Then all
other sources of noise are additive (no noise may make code run faster).
So
On 5/31/14, 2:42 PM, Andrei Alexandrescu wrote:
On 5/31/14, 11:49 AM, Russel Winder via Digitalmars-d wrote:
On Sat, 2014-05-31 at 10:29 -0700, Andrei Alexandrescu via Digitalmars-d
wrote:
[…]
Well there's quantization noise which has uniform distribution. Then all
other sources of noise are
On Saturday, 31 May 2014 at 19:49:22 UTC, w0rp wrote:
After watching Andrei's keynote where he was asking for help,
and noticing that there wasn't any proof of someone working on
this, I took charge.
http://w0rp.com:8010/
That's the design in the form of a single page website running
on my
bound tests. This means that optimizing away bound checks is
becoming more and more important in D. And D can't ignore this
Expressions like
x[0 .. $/n]
and
x[$/n .. $]
are important in many divide and conquer (recursive) algorithms
such as quick-sort and shall not need bounds check simply
On 5/31/2014 4:06 PM, Nordlöw wrote:
I've looked around in DMD for a suitable place to add checks for this but
haven't found the spot where range-check is injected. Help anyone?
There isn't a suitable place. To make it work, data flow analysis would have to
be added to the front end. While
On Saturday, 31 May 2014 at 22:54:28 UTC, Kiith-Sa wrote:
Looks better than what we have now.
Doesn't look as good/to the point/'new' as e.g.
http://www.rust-lang.org/
or https://www.dartlang.org/ , I suspect the main problem is
content of the
front page (wall of text, 'too much stuff'
On 5/31/2014 5:02 PM, Nordlöw wrote:
Could you elaborate a bit on what data flow optimizations mean?
http://en.wikipedia.org/wiki/Data-flow_analysis
What other kinds of optimizations will become possible?
Escape analysis, for one.
http://en.wikipedia.org/wiki/Escape_analysis
Is this
On Saturday, 31 May 2014 at 13:59:40 UTC, Andrei Alexandrescu
wrote:
On 5/30/14, 10:32 PM, dennis luehring wrote:
-do not benchmark anything without millions of loops - use the
average
as the result
Use the minimum unless networking is involved. -- Andrei
cache??
On Saturday, 31 May 2014 at 23:30:41 UTC, Walter Bright wrote:
There isn't a suitable place. To make it work, data flow
analysis would have to be added to the front end. While doable,
this is not a simple addition. Eventually, we'll have to do it
as a lot of things become possible better with
Meta wrote in message news:pogogtdjyetukenny...@forum.dlang.org...
I've always wondered if VRP can be leveraged in certain situations. I
can't remember exactly how it's supposed to work, but very basically,
isn't it just numeric variables (and expressions?) having an associated
range that
On 1/06/2014 7:49 a.m., w0rp wrote:
After watching Andrei's keynote where he was asking for help, and
noticing that there wasn't any proof of someone working on this, I took
charge.
http://w0rp.com:8010/
That's the design in the form of a single page website running on my
Linode. The source is
Am Sat, 31 May 2014 17:44:23 +
schrieb Thomas t.leich...@arcor.de:
Thank you for the help. Which OS is running on your notebook ?
For I compiled your source code with your settings with the GCC
compiler. The run took 3.1 nanoseconds per step. For the DMD
compiler the run took
On Sat, 2014-05-31 at 02:43 +, Craig Dillabaugh via Digitalmars-d
wrote:
On Friday, 30 May 2014 at 19:49:31 UTC, Tobias Pankrath wrote:
I know this is very early, but I work slowly :o)
* Something like boost::log
* Something like boost::program_options
* An parser generator on par
On Sat, 2014-05-31 at 19:49 +, w0rp via Digitalmars-d wrote:
After watching Andrei's keynote where he was asking for help, and
noticing that there wasn't any proof of someone working on this,
I took charge.
http://w0rp.com:8010/
I have to admit my initial reaction on seeing this was:
On Sat, 2014-05-31 at 20:40 +, w0rp via Digitalmars-d wrote:
On Saturday, 31 May 2014 at 20:38:41 UTC, Meta wrote:
On Saturday, 31 May 2014 at 20:38:05 UTC, Meta wrote:
On Saturday, 31 May 2014 at 20:12:06 UTC, Meta wrote:
The flat design looks nice, but I really dislike the choice
They may use different debugging formats, but just linking should
be possible, especially with import libraries.
On Fri, 2014-05-30 at 16:44 +, Andrew Brown via Digitalmars-d-learn
wrote:
GDC version 4.8.2,i guess that's my problem. This is what happens
when you let Ubuntu look after your packages.
Debian Sid has GCC 4.9 packages, but that may not help?
--
Russel.
On Saturday, 31 May 2014 at 06:54:13 UTC, Russel Winder via
Digitalmars-d-learn wrote:
On Fri, 2014-05-30 at 16:44 +, Andrew Brown via
Digitalmars-d-learn
wrote:
GDC version 4.8.2,i guess that's my problem. This is what
happens
when you let Ubuntu look after your packages.
Debian Sid
So, I've gotten interested in kernel programming in D.. And as
much as I like C/C++, I wanna try innovating, I'm aware that
phobos/gc and any OS-specific issues are going to be a problem,
but I'm willing to implement them into the kernel itself.
So, I guess what I'm asking is this: What
On Sat, 31 May 2014 06:38:46 +
Kagamin via Digitalmars-d-learn digitalmars-d-learn@puremagic.com
wrote:
They may use different debugging formats, but just linking should
be possible, especially with import libraries.
_Dynamic_ linking is possible. Static linking is not.
- Jonathan M Davis
On Sat, May 31, 2014 at 6:39 AM, Dicebot via Digitalmars-d-learn
digitalmars-d-learn@puremagic.com wrote:
private in D does not provide any strong guarantees, it only controls direct
access to the symbol. You effectively want some sort of strict internal
linkage attribute which does not exist
By dynamic linking do you mean LoadLibrary or linking with import
library?
What do you mean? Like this?
Hidden* foo() { return new Hidden();}
Yes, this way you can control all aspects of the construction and use. You
wouldn't need to make it private even, just don't lay out the struct in the
normal import:
struct Hidden;
I think you would need to use a .di
http://www.xomb.org/ ?
On Saturday, 31 May 2014 at 07:28:32 UTC, Mineko wrote:
Any ideas? :P
Buy my book, chapter 11 talks about it a little to get you
started :P
http://www.packtpub.com/discover-advantages-of-programming-in-d-cookbook/book
The summary of my approach there is:
1) Use a regular linux compiler
On Saturday, 31 May 2014 at 07:28:32 UTC, Mineko wrote:
So, I've gotten interested in kernel programming in D.. And as
much as I like C/C++, I wanna try innovating, I'm aware that
phobos/gc and any OS-specific issues are going to be a problem,
but I'm willing to implement them into the kernel
This has been asked so many times, is this info not on the website? We
should have an article on the site explaining this in depth. OT: Sorry for
top-quoting and over-quoting.
On Friday, May 30, 2014, monarch_dodra via Digitalmars-d-learn
digitalmars-d-learn@puremagic.com wrote:
On Friday, 30
Hi,
import std.stdio;
void main() {
writefln(Entered);
sub1();
sub1();
sub1();
writefln(Returning);
void sub1() {
static int i2 = 6;
i2 = i2 + 1;
writefln(%s,i2);
};
}
does not compile, but
import std.stdio;
void main() {
void sub1() {
On Saturday, 31 May 2014 at 16:18:35 UTC, DLearner wrote:
Is this intended?
Yes, nested functions access local variables and thus follow the
same order of declaration rules as they do; you can't use a local
variable before it is declared so same with a nested function.
Hello all,
Is there a straightforward way to indicate that two modules should not be used
together in the same program? Preferably one that does not require editing both
of the modules?
The application I have in mind is when one is making available an experimental
module which is planned
Hi !
Does anybody knows why dmd segfaults on this code ? Should I
report this as a bug ?
import std.stdio;
enum LiftingGender
{
PREDICT,
UPDATE,
}
struct Test(float[][] coeffs,
int[] offsets,
LiftingGender gender)
{
immutable float[][] coeffs = coeffs;
matovitch:
Does anybody knows why dmd segfaults on this code ? Should I
report this as a bug ?
Please report this minimized case to Bugzilla:
struct Foo(int[] arr) {
const int[] arr = arr;
}
void main() {
Foo!([0]) foo;
}
The error it gives before the crash:
test.d(2,17):
On Saturday, 31 May 2014 at 17:01:23 UTC, bearophile wrote:
matovitch:
Does anybody knows why dmd segfaults on this code ? Should I
report this as a bug ?
Please report this minimized case to Bugzilla:
struct Foo(int[] arr) {
const int[] arr = arr;
}
void main() {
Foo!([0]) foo;
}
In fact it segfauls on any template parameter if it has the same
name as the immutable member (at least it's coherent). Something
as simple as :
struct Foo(int i)
{
immutable int i = i;
}
void main()
{
Foo!5 foo;
writeln(foo);
}
I am suprised that nobody tried this before. BTW I
I remembered my psswd don't take my last sentence into account (i
will filed this).
On Saturday, 31 May 2014 at 17:22:41 UTC, matovitch wrote:
In fact it segfauls on any template parameter if it has the
same name as the immutable member (at least it's coherent).
Something as simple as :
struct Foo(int i)
{
immutable int i = i;
}
void main()
{
Foo!5 foo;
I updated the issue. Strangely if done in the main everything is
fine :
Error: undefined identifier i
1 - 100 of 123 matches
Mail list logo