On Saturday, 25 February 2017 at 19:31:06 UTC, Andrei
Alexandrescu wrote:
What would be a simple way to count the "effective" lines in a
module, i.e. excluding ddoc comments and unittests? Having a
tool for that in tools/ would be neat. -- Andrei
Fun fact I found out using this thread: 57.4%
On Sunday, 26 February 2017 at 05:50:32 UTC, Andrei Alexandrescu
wrote:
What am I missing?
I installed dscanner from my package manager (homebrew), so I
don't get any of the extra dub noise at all.
On 2/25/2017 7:08 PM, Adam Wilson wrote:
On 2/24/17 11:02 PM, Walter Bright wrote:
http://dconf.org/2017/registration.html
Don't forget, it goes up to $400 after Monday.
What do we do if we purchased three pass via EventBrite? I didn't see anywhere
to set name/company info...
You have
On Sunday, 26 February 2017 at 06:34:07 UTC, Ali Çehreli wrote:
So, obviously, assert message generation is not lazy. This is a
WAT! for me but perhaps there is a good reason for it.
FWIW imho we shouldn't need to write such messages at all.
It shouldn't be to difficult to lower `assert (a
On Sunday, 26 February 2017 at 05:50:32 UTC, Andrei Alexandrescu
wrote:
I might be missing something, so bear with me. My current
understanding is:
* The usual way to run stuff gotten via dub is with "dub run",
so that people don't need to deal with version directories and
complex paths such
If the generation of the error message throws, then the program receives
a FormatException, not the most import AssertError:
import std.string;
void foo(int i) {
// In this case a %s is forgotten but it could be any other trivial
error.
assert(i == 42, format("Bad parameter:", i));
}
On Thursday, 16 February 2017 at 21:05:51 UTC, Stefan Koch wrote:
[ ... ]
Hi Guys,
ref variable handing is coming soon!
(only int/uint for now)...
Also I have suspicions that there is a bug in my ctfe_evaluator
in which the first default arguments can overridden with the this
pointer :)
https://issues.dlang.org/show_bug.cgi?id=17226
Issue ID: 17226
Summary: Exception during the generation of an assert message
hides AssertError
Product: D
Version: D2
Hardware: x86_64
OS: Linux
On 02/26/2017 12:17 AM, Ola Fosheim Grostad wrote:
On Saturday, 25 February 2017 at 22:37:15 UTC, Chris Wright wrote:
The undefined behavior is what happens after the would-be assertion
failure occurs. The compiler is free to emit code as if the assertion
passed, or if there is no way for the
On 2/25/17 2:55 PM, Timothee Cour via Digitalmars-d wrote:
Try dscanner --sloc although IMO --tokenCount should be the most
relevant metric (only caveat is mixin strings with which one could cheat
to make token count smaller).
Thanks, got that working with ease. The operation of dub has gotten
On Saturday, 25 February 2017 at 22:37:15 UTC, Chris Wright wrote:
The undefined behavior is what happens after the would-be
assertion failure occurs. The compiler is free to emit code as
if the assertion passed, or if there is no way for the
assertion to pass, it is free to do anything it
https://issues.dlang.org/show_bug.cgi?id=6760
--- Comment #5 from github-bugzi...@puremagic.com ---
Commits pushed to master at https://github.com/dlang/dmd
https://github.com/dlang/dmd/commit/9441e5a68bf473d7780bb2cab0c993f6819dc9ad
issue 6760 - deprecate `@disable` on overridden and deprecated
https://issues.dlang.org/show_bug.cgi?id=6760
Walter Bright changed:
What|Removed |Added
CC|
On 02/25/2017 04:49 PM, Chris Wright wrote:
It says it doesn't emit code for assertions.
Then it says assertion failures are undefined behavior.
How does that even work?
Obviously the would-be failure. No need for the docs to be pedantic
about everything. It'd read like the average RFC,
On 02/24/2017 12:47 PM, H. S. Teoh via Digitalmars-d wrote:
The elephant in the room is that the recent craze surrounding the
"cloud" has conveniently collected large numbers of online services
under a small number of umbrellas, thereby greatly expanding the impact
of any bug that occurs in the
https://issues.dlang.org/show_bug.cgi?id=10547
b2.t...@gmx.com changed:
What|Removed |Added
Status|NEW |RESOLVED
CC|
https://issues.dlang.org/show_bug.cgi?id=10233
Issue 10233 depends on issue 10547, which changed state.
Issue 10547 Summary: DMD accepts function templates with no body.
https://issues.dlang.org/show_bug.cgi?id=10547
What|Removed |Added
https://issues.dlang.org/show_bug.cgi?id=9096
b2.t...@gmx.com changed:
What|Removed |Added
Status|NEW |RESOLVED
CC|
https://issues.dlang.org/show_bug.cgi?id=9306
b2.t...@gmx.com changed:
What|Removed |Added
CC||b2.t...@gmx.com
--- Comment #1 from
On 2/24/17 11:02 PM, Walter Bright wrote:
http://dconf.org/2017/registration.html
Don't forget, it goes up to $400 after Monday.
What do we do if we purchased three pass via EventBrite? I didn't see
anywhere to set name/company info...
--
Adam Wilson
IRC: LightBender
import
On 26/02/2017 4:01 PM, ANtlord wrote:
Hello! I've encroutered intresting tool of DMD. It is dump of AST in
JSON format (dmd -X main.d). But I it contains only declaration of
methods, templates and structs. It doesn't contain statements like a
variables or nested functions inside function's body.
Hello! I've encroutered intresting tool of DMD. It is dump of AST
in JSON format (dmd -X main.d). But I it contains only
declaration of methods, templates and structs. It doesn't contain
statements like a variables or nested functions inside function's
body.
Is it possible to make dump with
Another minor, but this time slightly breaking update to Scriptlike
(Utility library to help you write script-like programs in D).
https://github.com/Abscissa/scriptlike
v0.10.1 (changes since v0.9.7):
- Change: Issue #33: Rename Path.toRawString to Path.raw.
- Change: Deprecated
https://issues.dlang.org/show_bug.cgi?id=6712
b2.t...@gmx.com changed:
What|Removed |Added
Status|NEW |RESOLVED
CC|
https://issues.dlang.org/show_bug.cgi?id=6911
b2.t...@gmx.com changed:
What|Removed |Added
Status|NEW |RESOLVED
CC|
On Sunday, 26 February 2017 at 01:03:39 UTC, Walter Bright wrote:
On 2/25/2017 5:25 AM, Moritz Maxeiner wrote:
Just registered and was returned to
http://dconf.org/2017/thankyou.html
afterwards, which yields a 404 error. Not sure if I should
laugh or cry.
Your registration is confirmed. See
https://issues.dlang.org/show_bug.cgi?id=17198
--- Comment #3 from github-bugzi...@puremagic.com ---
Commits pushed to stable at https://github.com/dlang/tools
https://github.com/dlang/tools/commit/5ffca7b0e097644fbcffbee8ba755e4ae48c9d9f
fix issue 17198 - rdmd does not recompile when
On 2/25/2017 5:25 AM, Moritz Maxeiner wrote:
Just registered and was returned to http://dconf.org/2017/thankyou.html
afterwards, which yields a 404 error. Not sure if I should laugh or cry.
Your registration is confirmed. See you there!
On Saturday, 25 February 2017 at 21:49:43 UTC, Chris Wright wrote:
On Sat, 25 Feb 2017 22:12:13 +0100, Timon Gehr wrote:
On 25.02.2017 15:38, Chris Wright wrote:
On Sat, 25 Feb 2017 13:23:03 +0100, Timon Gehr wrote:
If 'disable' (as can be reasonably expected) means the
compiler will behave
On Sat, 25 Feb 2017 21:49:43 +, Chris Wright wrote:
> On Sat, 25 Feb 2017 22:12:13 +0100, Timon Gehr wrote:
>
>> On 25.02.2017 15:38, Chris Wright wrote:
>>> On Sat, 25 Feb 2017 13:23:03 +0100, Timon Gehr wrote:
If 'disable' (as can be reasonably expected) means the compiler will
On Saturday, 25 February 2017 at 21:26:32 UTC, XavierAP wrote:
It's not GUI projects that I would plan to work on, just
something easy with basic functionality that I can use for my
own utilities or test clients for libraries. And if there's
anything with any kind of designer support (in which
On Sat, 25 Feb 2017 22:12:13 +0100, Timon Gehr wrote:
> On 25.02.2017 15:38, Chris Wright wrote:
>> On Sat, 25 Feb 2017 13:23:03 +0100, Timon Gehr wrote:
>>> If 'disable' (as can be reasonably expected) means the compiler will
>>> behave as if they were never present, then it does not.
>>
>>
On Saturday, 25 February 2017 at 19:59:29 UTC, ikod wrote:
Hello,
I have a method for range:
struct Range {
immutable(ubyte[]) _buffer;
size_t _pos;
@property void popFront() pure @safe {
enforce(_pos < _buffer.length, "popFront from empty
buffer");
On Saturday, 25 February 2017 at 20:03:17 UTC, Jacob Carlborg
wrote:
There's no de factor library for creating GUIs in D. If you
want a native look and feel, DWT is a good option. If you want
the application to look the same on all platforms, there might
be other better suited alternatives.
On Saturday, 25 February 2017 at 21:12:13 UTC, Timon Gehr wrote:
I know my claim seems insane, but it is actually true.
http://forum.dlang.org/post/lr4kek$2rd$1...@digitalmars.com
The optimizer can currently not take advantage of it.
and I don't see how that would change in the near future.
On 25.02.2017 15:38, Chris Wright wrote:
On Sat, 25 Feb 2017 13:23:03 +0100, Timon Gehr wrote:
If 'disable' (as can be reasonably expected) means the compiler will
behave as if they were never present, then it does not.
https://dlang.org/dmd-linux.html#switch-release
This literally says
On Saturday, 25 February 2017 at 20:49:51 UTC, Adam D. Ruppe
wrote:
A wrapper that unifies these 4 steps like enforce is pretty
easy to implement.
yeah easy to use exception in @nogc as long as the catch knows
to free it too.
Alas, not my case. Exception can be catched not in my code.
On Saturday, 25 February 2017 at 20:49:51 UTC, Adam D. Ruppe
wrote:
On Saturday, 25 February 2017 at 20:40:26 UTC, Eugene Wissner
wrote:
it builds and doesn't throw if I compile with:
dmd -release
though it causes a segfault, what is probably a dmd bug.
No, that's by design. assert(0)
On Saturday, 25 February 2017 at 20:40:26 UTC, Eugene Wissner
wrote:
it builds and doesn't throw if I compile with:
dmd -release
though it causes a segfault, what is probably a dmd bug.
No, that's by design. assert(0) compiles to a segfault
instruction with -release.
A wrapper that unifies
On Saturday, 25 February 2017 at 20:02:56 UTC, ikod wrote:
On Saturday, 25 February 2017 at 19:59:29 UTC, ikod wrote:
Hello,
I have a method for range:
struct Range {
immutable(ubyte[]) _buffer;
size_t _pos;
@property void popFront() pure @safe {
enforce(_pos
On 2/25/17 8:25 AM, Moritz Maxeiner wrote:
On Saturday, 25 February 2017 at 07:02:48 UTC, Walter Bright wrote:
http://dconf.org/2017/registration.html
Don't forget, it goes up to $400 after Monday.
Just registered and was returned to http://dconf.org/2017/thankyou.html
afterwards, which
On 2017-02-24 23:44, XavierAP wrote:
And second question, is DWT the de facto standard for creating GUIs? Or
are there good competitors.
There's no de factor library for creating GUIs in D. If you want a
native look and feel, DWT is a good option. If you want the application
to look the
On Saturday, 25 February 2017 at 19:59:29 UTC, ikod wrote:
Hello,
I have a method for range:
struct Range {
immutable(ubyte[]) _buffer;
size_t _pos;
@property void popFront() pure @safe {
enforce(_pos < _buffer.length, "popFront from empty
buffer");
On 2017-02-24 19:10, houdoux09 wrote:
The problem is that I can not retrieve the variables from the parent class.
Cast the value to the type of the base class and run it through the same
function. You can have a look at the Orange serialization library [1].
[1]
Hello,
I have a method for range:
struct Range {
immutable(ubyte[]) _buffer;
size_t _pos;
@property void popFront() pure @safe {
enforce(_pos < _buffer.length, "popFront from empty
buffer");
_pos++;
}
}
I'd like to have @nogc here, but I can't
Try dscanner --sloc although IMO --tokenCount should be the most relevant
metric (only caveat is mixin strings with which one could cheat to make
token count smaller).
TokenCount formatting invariant
On Feb 25, 2017 11:36 AM, "Andrei Alexandrescu via Digitalmars-d" <
digitalmars-d@puremagic.com>
What would be a simple way to count the "effective" lines in a module,
i.e. excluding ddoc comments and unittests? Having a tool for that in
tools/ would be neat. -- Andrei
On 02/25/2017 05:25 AM, Moritz Maxeiner wrote:
On Saturday, 25 February 2017 at 07:02:48 UTC, Walter Bright wrote:
http://dconf.org/2017/registration.html
Don't forget, it goes up to $400 after Monday.
Just registered and was returned to http://dconf.org/2017/thankyou.html
afterwards, which
On 2/25/17 11:00 AM, Vladimir Panteleev wrote:
On Saturday, 25 February 2017 at 15:21:10 UTC, Andrei Alexandrescu wrote:
On 02/25/2017 10:17 AM, rumbu wrote:
A lot of bloat code for something extremely basic.
If you can do it with less code, I'm all ears. Thanks! -- Andrei
Perhaps a
https://issues.dlang.org/show_bug.cgi?id=17215
--- Comment #7 from github-bugzi...@puremagic.com ---
Commits pushed to master at https://github.com/dlang/dmd
https://github.com/dlang/dmd/commit/46d1948f4c4f05143729f9849b4edefe01b1a02e
fix Issue 17215 - ICE(cgcod.c:findreg) with SIMD and -O
On Friday, 24 February 2017 at 14:35:44 UTC, Jack Stouffer wrote:
Why is it that test CIs catch bugs when people should be
running tests locally?
CI tests all platforms, not just the one a user is on. It does it
simultaneously as well. In the case of something like DMD, it's a
pain in the
https://issues.dlang.org/show_bug.cgi?id=6760
b2.t...@gmx.com changed:
What|Removed |Added
CC||jesse.k.phillip...@gmail.co
https://issues.dlang.org/show_bug.cgi?id=5171
b2.t...@gmx.com changed:
What|Removed |Added
Status|REOPENED|RESOLVED
CC|
hmm.. I didn't change my nickname. It was my answer.
Of course no.
When I have some problem I google a solution and often I find it. I'm
sure that sharing your solution may be useful for somebody else. But
very often people that have solved theirs problem do not share solution
- they think something like who cares and so on. You didn't shy to
https://issues.dlang.org/show_bug.cgi?id=17049
Martin Nowak changed:
What|Removed |Added
Summary|[scope] class references|[scope] member methods not
On Saturday, 25 February 2017 at 15:13:27 UTC, Radu wrote:
Here is sample on how destroy fails with a fwd decl error:
struct A
{
B b;
C c;
}
struct B
{
Wrap!A val;
}
struct C
{
Wrap!A val;
}
struct Wrap(T)
{
this(bool b)
{
t = cast(T*) malloc(T.sizeof);
On Saturday, 25 February 2017 at 15:21:56 UTC, Radu wrote:
The correct way of doing it using deref would to look like:
struct A { int i; }
auto a = cast (A*) malloc(A.sizeof); // Allocate
emplace(a, 42); // Construct
destroy(*a); // Destruct A
https://issues.dlang.org/show_bug.cgi?id=5558
b2.t...@gmx.com changed:
What|Removed |Added
Status|NEW |RESOLVED
CC|
On Saturday, 25 February 2017 at 15:21:10 UTC, Andrei
Alexandrescu wrote:
On 02/25/2017 10:17 AM, rumbu wrote:
A lot of bloat code for something extremely basic.
If you can do it with less code, I'm all ears. Thanks! -- Andrei
Perhaps a simpler example for the most basic use case could be
On 02/25/2017 10:17 AM, rumbu wrote:
A lot of bloat code for something extremely basic.
If you can do it with less code, I'm all ears. Thanks! -- Andrei
On Saturday, 25 February 2017 at 13:18:21 UTC, Moritz Maxeiner
wrote:
On Saturday, 25 February 2017 at 13:14:24 UTC, Moritz Maxeiner
wrote:
---
struct A {}
auto a = cast (A*) malloc(A.sizeof); // Allocate
emplace(a, 42); // Construct
destroy(a);
On Friday, 24 February 2017 at 20:37:28 UTC, Dmitry Olshansky
wrote:
On 2/24/17 4:20 PM, Robert burner Schadek wrote:
checkedint got voted in. With 2 Yes and 2 yes with remarks.
Remarkably unpopular vote we have here.
If I read it right it implies that
nobody cares for checked integers.
A
On Saturday, 25 February 2017 at 13:14:24 UTC, Moritz Maxeiner
wrote:
On Saturday, 25 February 2017 at 10:44:07 UTC, Radu wrote:
On Saturday, 25 February 2017 at 08:36:02 UTC, Ali Çehreli
wrote:
On 02/25/2017 12:17 AM, Radu wrote:
> destroy(cc) -> does c = C.init
> destroy(*cc); -> calls the
On Saturday, 25 February 2017 at 14:38:33 UTC, Chris Wright wrote:
On Sat, 25 Feb 2017 13:23:03 +0100, Timon Gehr wrote:
If 'disable' (as can be reasonably expected) means the
compiler will behave as if they were never present, then it
does not.
On Saturday, 25 February 2017 at 14:34:31 UTC, rikki cattermole
wrote:
On 26/02/2017 3:31 AM, helxi wrote:
I am trying to create an array which has a user defined size.
However
the following program is not compiling:
import std.stdio;
void main(){
write("Enter your array size: ");
On Sat, 25 Feb 2017 13:23:03 +0100, Timon Gehr wrote:
> If 'disable' (as can be reasonably expected) means the compiler will
> behave as if they were never present, then it does not.
https://dlang.org/dmd-linux.html#switch-release
Plus I actually tested it.
> Ketmar described the removal of
HyperLogLog++ is advanced cardinality estimation algorithm with
normal and compressed sparse representations. It can be used to
estimate approximate number of unique elements in an unordered
set.
hll-d [1, 2] is written in D. It can be used as betterC library
without linking with DRuntime.
On 26/02/2017 3:31 AM, helxi wrote:
I am trying to create an array which has a user defined size. However
the following program is not compiling:
import std.stdio;
void main(){
write("Enter your array size: ");
int n;
readf(" %s", );
int[n] arr; //<-Error: variable input cannot
I am trying to create an array which has a user defined size.
However the following program is not compiling:
import std.stdio;
void main(){
write("Enter your array size: ");
int n;
readf(" %s", );
int[n] arr; //<-Error: variable input cannot be read at
compile time
On Saturday, 25 February 2017 at 07:02:48 UTC, Walter Bright
wrote:
http://dconf.org/2017/registration.html
Don't forget, it goes up to $400 after Monday.
Just registered and was returned to
http://dconf.org/2017/thankyou.html afterwards, which yields a
404 error. Not sure if I should laugh
On Saturday, 25 February 2017 at 11:06:28 UTC, data pulverizer
wrote:
I have noticed that some numerical packages written in D use
pointer semantics heavily (not referring to packages that link
to C libraries). I am in the process of writing code for a
numerical computing library and would
On Saturday, 25 February 2017 at 13:14:24 UTC, Moritz Maxeiner
wrote:
---
struct A {}
auto a = cast (A*) malloc(A.sizeof); // Allocate
emplace(a, 42); // Construct
destroy(a); // Destruct
free(a); // Deallocate
---
On Saturday, 25 February 2017 at 10:44:07 UTC, Radu wrote:
On Saturday, 25 February 2017 at 08:36:02 UTC, Ali Çehreli
wrote:
On 02/25/2017 12:17 AM, Radu wrote:
> destroy(cc) -> does c = C.init
> destroy(*cc); -> calls the C dtor
>
> Is this by design? If so - how can I destroy and get the
On 25.02.2017 01:50, Chris Wright wrote:
On Fri, 24 Feb 2017 21:16:28 +0100, Timon Gehr wrote:
On 24.02.2017 16:29, Chris Wright wrote:
On Fri, 24 Feb 2017 09:14:24 +0200, ketmar wrote:
forget about "-release" dmd arg. forget about "-boundscheck=off". no,
really, they won't do you any good.
On 25.02.2017 04:12, Chris M wrote:
On Friday, 24 February 2017 at 20:16:28 UTC, Timon Gehr wrote:
On 24.02.2017 16:29, Chris Wright wrote:
On Fri, 24 Feb 2017 09:14:24 +0200, ketmar wrote:
forget about "-release" dmd arg. forget about "-boundscheck=off". no,
really, they won't do you any
On Saturday, 25 February 2017 at 11:15:53 UTC, ketmar wrote:
data pulverizer wrote:
I have noticed that some numerical packages written in D use
pointer semantics heavily (not referring to packages that link
to C libraries). I am in the process of writing code for a
numerical computing
data pulverizer wrote:
I have noticed that some numerical packages written in D use pointer
semantics heavily (not referring to packages that link to C
libraries). I am in the process of writing code for a numerical
computing library and would like to know whether there times when
addressing
I have noticed that some numerical packages written in D use
pointer semantics heavily (not referring to packages that link to
C libraries). I am in the process of writing code for a numerical
computing library and would like to know whether there times when
addressing an array using pointers
On Saturday, 25 February 2017 at 08:36:02 UTC, Ali Çehreli wrote:
On 02/25/2017 12:17 AM, Radu wrote:
> destroy(cc) -> does c = C.init
> destroy(*cc); -> calls the C dtor
>
> Is this by design? If so - how can I destroy and get the dtor
called
> without dereferencing the pointer?
It's by
On 02/25/2017 12:17 AM, Radu wrote:
> destroy(cc) -> does c = C.init
> destroy(*cc); -> calls the C dtor
>
> Is this by design? If so - how can I destroy and get the dtor called
> without dereferencing the pointer?
It's by design because setting a pointer to null can be considered as
I'm puzzled by the way destroy works when passed a pointer to a
struct, observe:
--code.d--
int i;
struct C
{
this(ref int i)
{
++i;
ii =
}
~this()
{
82 matches
Mail list logo