On Friday, 13 February 2015 at 19:03:10 UTC, Jonathan Marler
wrote:
This question comes from wanting to be able to throw an
exception in code that is @nogc.
https://dlang.org/changelog/2.079.0.html#dip1008
```d
void main() @nogc
{
throw new Exception("I'm @nogc now");
}
```
D and nim are both very promising.
I created this git repo to compare them:
https://github.com/timotheecour/D_vs_nim/
Goal: up to date and objective comparison of features between D
and nim (to help deciding what language to use), and 1:1 map of
features and libraries to help D users learn
On Wednesday, 22 April 2015 at 06:03:07 UTC, Timothee Cour wrote:
On Mon, Apr 13, 2015 at 10:28 AM, Timothee Cour
wrote:
I would like to refocus this thread on feature set and how it
compares to D, not on flame wars about brackets or language
marketing issues.
On Thursday, 15 March 2018 at 09:05:52 UTC, Kagamin wrote:
On Sunday, 11 March 2018 at 04:06:13 UTC, Nick Sabalausky
(Abscissa) wrote:
First of all, betterC is about far more than interfacing with
C. In fact, interop with C isn't really what betterC is about
at all - that's a separate aspect
On Thursday, 26 January 2017 at 07:38:50 UTC, Jacob Carlborg
wrote:
On 2017-01-26 04:43, Timothee Cour via Digitalmars-d wrote:
Can we do this is 1 step?
```
rdmd -offoo.o -c foo.d
g++ -o foo foo.o -pie -Wl,--export-dynamic
```
Ideally something like this would be great:
```
rdmd -offoo
On Wednesday, 7 March 2018 at 22:28:26 UTC, ketmar wrote:
H. S. Teoh wrote:
I've pestered Brad about it before, but the real trouble is
the Mailman
software. If you feel motivated enough, pestering the
upstream Mailman
authors about it might actually get us closer to fixing this
problem, as
On Tuesday, 27 February 2018 at 05:28:41 UTC, Timothee Cour wrote:
https://github.com/llvm-mirror/lldb/pull/3
+
https://github.com/timotheecour/dtools/blob/master/dtools/lldbdplugin.d
on OSX, it works great except when encountering large symbols
which
cause segfault when GC does a collection
[this is cross posted from
https://forum.dlang.org/post/mailman.288.1519709357.3374.digitalmar...@puremagic.com for reference only; please reply to orginal thread]
On Friday, 12 January 2018 at 22:44:48 UTC, Timon Gehr wrote:
As promised [1], I have started setting up a DIP to improve
tuple ergonomics in D:
https://github.com/tgehr/DIPs/blob/tuple-syntax/DIPs/DIP1xxx-tg.md
This DIP aims to make code like the following valid D:
...
Would this DIP
On Friday, 16 February 2018 at 00:42:02 UTC, Timothee Cour wrote:
is there a way to get typeid of extern(C++) classes (eg for
ones in
dmd/astbase.d but not limited to that) ?
as a workaround, could the compiler insert (eg, depending on a
version(insert_typeid)) a virtual method in each
On Tuesday, 13 February 2018 at 04:16:22 UTC, Nick Sabalausky
(Abscissa) wrote:
On 02/09/2018 07:11 AM, Kagamin wrote:
On Friday, 9 February 2018 at 11:16:01 UTC, Nick Sabalausky
(Abscissa) wrote:
On 02/09/2018 05:31 AM, Kagamin wrote:
version(none)q{ FOO }; is likely to work for most stuff
On Thursday, 11 January 2018 at 15:37:20 UTC, Seb wrote:
On Wednesday, 10 January 2018 at 15:07:40 UTC, Luís Marques
It's not well documented, but you can always overwrite DUB with
DFLAGS:
DFLAGS="-dw" dub
It will give you a warning though, but it's justified as you
might have `DFLAGS`
On Monday, 12 February 2018 at 01:27:19 UTC, Walter Bright wrote:
Know what is a heavyweight problem worth our while? Having dmd
be able to directly read C .h files, so the poor user does not
have to manually translate them.
read directly C++ header files instead of C .h files is what we
On Monday, 12 February 2018 at 01:39:31 UTC, Walter Bright wrote:
Easy:
mixin template comment(string s) { }
mixin comment!q"EOS
This is a multi-line
heredoc comment allowing
/+ documented unittests containing nesting comments +/
and weird urls like
On Monday, 5 February 2018 at 19:32:37 UTC, Timothee Cour wrote:
just filed https://issues.dlang.org/show_bug.cgi?id=18377:
@wilzbach
It probably makes sense to have a look at how other languages
are dealing with this. Seems to be a common problem
some links:
*
On Tuesday, 6 February 2018 at 21:13:50 UTC, timotheecour wrote:
On Tuesday, 6 February 2018 at 20:39:09 UTC, Timothee Cour
wrote:
should we force force casting through `void*` for extern(C++)
classes ?
i.e. `cast(Derived) cast(void*) base_instance;`
currently, `cast(A) unrelad_cpp_instance`
On Wednesday, 22 October 2008 at 18:43:15 UTC, Denis Koroskin
wrote:
On Wed, 22 Oct 2008 22:39:10 +0400, bearophile
wrote:
[...]
You can use the following short-cut to avoid double casting:
if (auto foo = cast(Foo)obj) {
...
} else if (auto bar =
On Tuesday, 6 February 2018 at 20:39:09 UTC, Timothee Cour wrote:
should we force force casting through `void*` for extern(C++)
classes ?
i.e. `cast(Derived) cast(void*) base_instance;`
currently, `cast(A) unrelad_cpp_instance` happily compiles but
shouldn't, it's very error prone even though
On Sunday, 19 November 2017 at 04:44:24 UTC, Meta wrote:
On Friday, 24 March 2017 at 16:34:46 UTC, Martin Nowak wrote:
On Tuesday, 21 March 2017 at 20:16:00 UTC, Atila Neves wrote:
git rebase master my_branch
git checkout master
git merge --no-ff my_branch
Yes, that's about what we aim for,
On Saturday, 27 January 2018 at 10:38:46 UTC, Kagamin wrote:
dmd
see also this horrendous stacktrace when calling getopt with a
bad argument:
full stacktrace:
https://gist.github.com/timotheecour/d6b623bd3d223f5d958cd86adffd7807
just 1 line of this stacktrace:
```
28 dscanner
On Friday, 26 January 2018 at 18:40:23 UTC, Seb wrote:
Want to know what it prints? Run the file!
Spoiler: it's similar to new the AST feature at run.dlang.io:
prettyPrint produces valid D code except for template
instantiations:
```
writeln!int
{
@safe void writeln(int _param_0)
On Saturday, 27 January 2018 at 01:10:35 UTC, timotheecour wrote:
On Saturday, 27 January 2018 at 00:47:01 UTC, timotheecour
the bug is that homebrew dmd installs dmd.conf in
/Users/timothee/homebrew/etc/dmd.conf; findDMDConfig should
instead look for dmd.conf by calling `dmd -v|grep 'Config
On Saturday, 27 January 2018 at 00:47:01 UTC, timotheecour wrote:
on OSX:
chmod u+x main.d
./main.d
WARNING: A deprecated branch based version specification is
used for the dependency dmd. Please use numbered versions
instead. Also note that you can still use the
dub.selections.json file to
On Saturday, 27 January 2018 at 01:36:17 UTC, Seb wrote:
On Saturday, 27 January 2018 at 01:25:18 UTC, timotheecour
Agreed, but prettyPrint:
https://github.com/dlang/dmd/blob/master/src/dmd/frontend.d#L275
is just a nice wrapper around the existing PrettyPrintVisitor:
On Friday, 12 January 2018 at 18:51:31 UTC, Basile B. wrote:
On Friday, 12 January 2018 at 18:50:10 UTC, Basile B. wrote:
On Friday, 12 January 2018 at 17:58:30 UTC, Stefan Koch wrote:
On Friday, 12 January 2018 at 14:13:22 UTC, Basile B. wrote:
I have a simple program that only compiles if
On Friday, 26 January 2018 at 08:44:26 UTC, Seb wrote:
What is the benefit of using link-time renaming (a linker
specific feature) instead of directly renaming the symbol in
the compiler? We could be quite radical and hash all symbols >
a certain threshold. As long as we have a hash function
On Friday, 26 January 2018 at 18:40:23 UTC, Seb wrote:
In case someone wants to play with DMD as a library, it got a
lot easier as of today.
Here's an example:
```
#!/usr/bin/env dub
/+dub.sdl:
dependency "dmd" version="~master"
+/
void main()
{
import dmd.frontend;
import
On Friday, 26 January 2018 at 11:18:21 UTC, Oleksii Skidan wrote:
Hi,
I wonder if it's possible to convert D language code into a
string at compile time? C/C++ preprocessor has this feature
built-in: `#` preprocessing operator allows converting a macro
argument into a string constant. See
this compiles, but equivalent in C++ (const int vs int) would
give a
compile error (error: redefinition of 'fun'); what's the
rationale for
allowing these overloads?
```
void fun(int src){ writeln2(); }
void fun(immutable int src){ writeln2(); }
void fun(const int src){ writeln2(); }
void
On Saturday, 30 January 2016 at 03:13:59 UTC, Matt Elkins wrote:
std.typecons.Unique seems to require heap allocation, which
makes it a far cry from std::unique_ptr.
isn't unique_ptr typically for heap allocation?
eg:
On Wednesday, 10 January 2018 at 21:42:38 UTC, Nathan S. wrote:
When I remove the "inline" option the build + test time becomes
<10 seconds. So the weirdly slow part is related to inlining.
filed so we don't forget:
https://issues.dlang.org/show_bug.cgi?id=18221
On Wednesday, 13 December 2017 at 00:43:31 UTC, rikki cattermole
wrote:
You don't need to change this and if you think you do, you're
wrong :)
Except when you need to:
https://github.com/dlang/dub/issues/1305
dub build --compiler=ldmd2 overwrites files in ~/.dub written by
dub build #1305
On Sunday, 11 June 2017 at 07:09:33 UTC, timotheecour wrote:
On Sunday, 11 June 2017 at 05:21:23 UTC, Timothee Cour wrote:
[...]
NOTE: this is on linux, and the above simple case doesn't
reproduce
the error, but my test case is similar albeit from a larger
program
that's hard to reduce.
On Sunday, 11 June 2017 at 05:21:23 UTC, Timothee Cour wrote:
```
NOTE: this is on linux, and the above simple case doesn't
reproduce
the error, but my test case is similar albeit from a larger
program
that's hard to reduce.
the code that crashes is in druntime:
/**
* Check for module
Might I suggest that you simply define an enum for UnixEpoch
that's a
SysTime. Then you can do whatever you want.
ping on this.
On Wednesday, 13 November 2013 at 13:34:37 UTC, Jacob Carlborg
wrote:
On 2013-11-13 13:20, Timothee Cour wrote:
alas, no, I posted on exactly this some times ago:
glob is non-recursive in D:
http://forum.dlang.org/post/mailman.2367.1382320537.1719.digitalmars-d-le...@puremagic.com
Hmm, right,
On Wednesday, 15 February 2017 at 20:21:45 UTC, Nick Treleaven
wrote:
On Wednesday, 15 February 2017 at 20:09:46 UTC, Timothee Cour
wrote:
This thread completely diverged from the original post, which
was propsing `::` instead of `from!`:
```
void fun(T)(std.stdio::File input, T value) if
On Saturday, 10 December 2016 at 02:39:33 UTC, timotheecour wrote:
Have a look at what `trace -E d_executable args` and `trace -E
c++_executable args`
print on startup and grep for dlopen calls and the like.
do you mean strace?
I have trace on OSX but I'm asking for linux.
Looking at the
Have a look at what `trace -E d_executable args` and `trace -E
c++_executable args`
print on startup and grep for dlopen calls and the like.
do you mean strace?
I have trace on OSX but I'm asking for linux.
UPDATE:
* b Loader.d:123 didn't help either:
error: parsing line table prologue at 0x (parsing ended
around 0x
Breakpoint 1: where =
mybinary.temp`D4gtkc6Loader6Linker12_staticDtor3FZv, address =
0x000100315410
(process exited despite breakpoint); dmd's dwarf debug info
On Sunday, 15 May 2016 at 14:08:57 UTC, Joseph Rushton Wakeling
wrote:
(2) It's probably more idiomatic to use `void[]` for buffers of
binary data, although I imagine you may have some reasons for
using `ubyte[]` ... ?
curious about this. https://dlang.org/phobos/std_outbuffer.html
defines:
On Monday, 30 November 2015 at 14:55:53 UTC, yawniek wrote:
would anyone be interested in doing the work for adding D /
vibe.d to
https://github.com/grpc/grpc ?
we currently lack the manpower but would be able to sponsor it
(or parts, depending on the effort needed).
grpc is probably going
On Friday, 17 August 2012 at 13:10:52 UTC, Timon Gehr wrote:
On 08/17/2012 02:17 PM, Marco Leise wrote:
Am Tue, 14 Aug 2012 12:15:35 +0200
schrieb Don Clugstond...@nospam.com:
Seriously, if you are finding ANY error messages for things
which are
not real errors, that is a bug.
What about
On Sunday, 12 April 2015 at 04:08:47 UTC, Andrei Alexandrescu
wrote:
On 4/11/15 12:25 AM, Vladimir Panteleev wrote:
[...]
The actual command line generated by is:
../dmd/src/dmd -conf= -I../druntime/import -w -dip25 -m64 -g
-debug -main -unittest generated/osx/debug/64/libphobos2.a
On Thursday, 21 May 2015 at 19:06:35 UTC, Jacob Carlborg wrote:
On 2015-05-21 11:06, Timothee Cour via Digitalmars-d-learn
wrote:
Can I create an instance of A without calling a constructor?
(see below)
Use case: for generic deserialiaztion, when the
deserialization library
encounters a class
On Saturday, 10 November 2012 at 22:09:07 UTC, Andrej Mitrovic
wrote:
On 11/10/12, nixda b...@or.de wrote:
You can try vibe.d bson serialization.
http://vibed.org/api/vibe.data.bson/serializeToBson
It doesn't handle them either. Anyway I've implemented it for
msgpack
(took a whole of 30
On Saturday, 23 May 2015 at 08:01:28 UTC, timotheecour wrote:
On Saturday, 10 November 2012 at 22:09:07 UTC, Andrej Mitrovic
wrote:
On 11/10/12, nixda b...@or.de wrote:
You can try vibe.d bson serialization.
http://vibed.org/api/vibe.data.bson/serializeToBson
It doesn't handle them either.
On Wednesday, 6 August 2014 at 17:03:23 UTC, Timothee Cour via
Digitalmars-d-learn wrote:
Is there a reason why 'with(Foo):' is not allowed, and we have
to
use with(Foo){...} ?
It would be more in line with how other scope definitions work
(extern(C)
etc)
ping, anyone?
On Thursday, 5 June 2014 at 06:58:50 UTC, Timothee Cour via
Digitalmars-d-learn wrote:
Is there a way to do this?
import std.algorithm;
auto fun(T)(T a){return a;}
template fun2(T){auto fun2(T a){return fun(a);}}//OK but heavy
syntax and
cannot be nested inside test()
void main(){
49 matches
Mail list logo