Hi,
I need to build some static binaries with LDC. I also need to
execute builds on both platform 32-bit and 64-bit.
From Docker Hub there are two image groups:
* language/ldc (last update 5 months ago)
* dlang2/ldc-ubuntu (updated recently)
Which one do you suggest?
Thanks a lot.
SrMordred had already figured it (setjmp vs _setjmp(..., null))
out:
https://forum.dlang.org/post/abrjmdvvlqdmmnpxc...@forum.dlang.org
I need get the Route UDA only for method without (static methods,
property, constructor, destructor), dont know how to do it.
Route[] getRoutes(T)(){
Route[] routes;
foreach(int i, m; __traits(allMembers, T) ){
pragma(msg, m.stringof);
static
On Wednesday, 17 October 2018 at 01:17:40 UTC, Chris Katko wrote:
I finally noticed in the docs it says "for arrays only." The
question is, why?
foreach for user-defined types only allow arguments that match
what the user defined. Ranges typically do not define this (since
it generally
int [50]data;
foreach(i, datum; data){} // works
File file("gasdgasd");
foreach(i, line; file.byLine){} //NOPE.
foreach(line; file.byLine){} //works.
I finally noticed in the docs it says "for arrays only." The
question is, why?
Every language that I used previously (as far as I can
If they don't, I have to wrap it like so:
import std.signals;
class Signal(T) {
protected:
mixin Signal!(T);
};
class Changed(T) : Signal!T {
protected:
void delegate(T)[] slots;
public:
override void connect(void delegate(T) slot) {
foreach (s; slots) {
if (s == slot)
On Tue, Oct 16, 2018 at 10:59:50PM +, Dennis via Digitalmars-d-learn wrote:
> I've always been curious around the design choice of ranges to make
> front and popFront separate functions, instead of having popFront
> return the front. I suppose it is useful sometimes to be able to
> access
I've always been curious around the design choice of ranges to
make front and popFront separate functions, instead of having
popFront return the front. I suppose it is useful sometimes to be
able to access front multiple times without having to save it
temporarily (can't think of a specific
On Tuesday, 16 October 2018 at 13:09:34 UTC, Steven Schveighoffer
wrote:
On 10/15/18 4:36 PM, Márcio Martins wrote:
[...]
Hm... didn't realize that. It seems to me like an odd
limitation, but I can see how it's ambiguous.
The solution is to double-template:
template incx(Args...)
{
An old thread about the same problem:
https://forum.dlang.org/thread/mmxwhdypncaeikknl...@forum.dlang.org
struct jmp_buf {
byte[256] data;
}
jmp_buf my_jmp_buf;
extern(C) {
int setjmp(ref jmp_buf env);
void longjmp(ref jmp_buf env, int);
}
void
second() {
writefln("second");
16.10.2018 17:47, cosinus пишет:
On Tuesday, 16 October 2018 at 14:42:32 UTC, cosinus wrote:
Is there a way to use std.regex at compile-time?
I would like to `mixin()` the result of this function:
```D
string generateVertexStruct()
{
auto reVertex =
On Tuesday, 16 October 2018 at 14:47:19 UTC, cosinus wrote:
On Tuesday, 16 October 2018 at 14:42:32 UTC, cosinus wrote:
Is there a way to use std.regex at compile-time?
I would like to `mixin()` the result of this function:
```D
string generateVertexStruct()
{
auto reVertex =
On 10/16/18 11:42 AM, Vinay Sajip wrote:
On Monday, 15 October 2018 at 22:49:31 UTC, Nicholas Wilson wrote:
Oh, sorry I missed that. Take a look at
https://github.com/schveiguy/iopipe
Great, thanks.
Let me know if anything doesn't work there. The text processing is
pretty robust, but
On Monday, 15 October 2018 at 22:49:31 UTC, Nicholas Wilson wrote:
Oh, sorry I missed that. Take a look at
https://github.com/schveiguy/iopipe
Great, thanks.
On Tuesday, 16 October 2018 at 14:42:32 UTC, cosinus wrote:
Is there a way to use std.regex at compile-time?
I would like to `mixin()` the result of this function:
```D
string generateVertexStruct()
{
auto reVertex =
ctRegex!(`in\s+(?P\w+)\s+(?P\w+)\s*;`);
const vertexStruct =
Is there a way to use std.regex at compile-time?
On 10/15/18 4:36 PM, Márcio Martins wrote:
On Monday, 15 October 2018 at 16:46:34 UTC, Steven Schveighoffer wrote:
On 10/15/18 12:40 PM, Márcio Martins wrote:
import std.stdio;
void incx(T, Args...)(ref T t) {
++t.x;
}
static struct Test(T) {
T x;
}
void main() {
Test!uint t;
On Tuesday, 16 October 2018 at 09:38:44 UTC, John Burton wrote:
The information I have found indicates that it runs to free
memory when the system runs out of memory to allocate.
No, that is incorrect. By default, here's what's happening:
1) At startup (or first 'new' or GC.malloc) the GC
On Wednesday, 26 September 2018 at 08:51:11 UTC, Radu wrote:
On Wednesday, 26 September 2018 at 05:55:49 UTC, dangbinghoo
wrote:
On Wednesday, 26 September 2018 at 05:24:08 UTC, Radu wrote:
On Wednesday, 26 September 2018 at 03:46:21 UTC, dangbinghoo
wrote:
hi,
On 16/10/2018 11:36 PM, Codifies wrote:
I've a bunch of 4x4 matrix routines in C, in order to avoid copying
around multiple 4x4 matrices I pass pointers...
I'm assuming that in D it would make sense to use ref ?
what's going on behind the scenes with ref is it just a nice way of
passing
I've a bunch of 4x4 matrix routines in C, in order to avoid
copying around multiple 4x4 matrices I pass pointers...
I'm assuming that in D it would make sense to use ref ?
what's going on behind the scenes with ref is it just a nice way
of passing pointers with automagical dereferencing or is
Solved:
I forgot to initialize some member variable along the way, which
is a class so needed to be new'd.
Thanks.
On Tuesday, 16 October 2018 at 09:38:44 UTC, John Burton wrote:
Is there any documentation or information about the specifics
of the garbage collector?
The information I have found indicates that it runs to free
memory when the system runs out of memory to allocate. But will
this try to use
On 16/10/2018 10:38 PM, John Burton wrote:
Is there any documentation or information about the specifics of the
garbage collector?
The information I have found indicates that it runs to free memory when
the system runs out of memory to allocate. But will this try to use all
the system memory
Is there any documentation or information about the specifics of
the garbage collector?
The information I have found indicates that it runs to free
memory when the system runs out of memory to allocate. But will
this try to use all the system memory or some other amount before
trying to
On Sunday, 14 October 2018 at 13:07:30 UTC, Heromyth wrote:
On Monday, 8 October 2018 at 09:39:55 UTC, John Burton wrote:
My use case is sending data to a socket.
We have ported some containers from JAVA.
ByteBuffer is a basic container interface and widely used in
JAVA.
See also:
I have a class or struct (have tried both; same error):
module track_changes;
import std.array;
import std.signals;
class TrackChanges(T)
{
private:
T[] _stack;
int _current = 0;
public:
mixin Signal!(T);
TrackChanges opAssign(TrackChanges x) {
this = x();
return
You can simply group them:
t.on!(
handlers!(
"abc", {
writeln("abc");
},
"cde", {
writeln("cde");
}
)
);
handlers!(
"abc", {
writeln("abc");
},
"cde", {
writeln("cde");
}
).bind(t);
On Tuesday, 16 October 2018 at 02:13:21 UTC, Ali Çehreli wrote:
On 10/15/2018 01:36 PM, Márcio Martins wrote:
> Considering that the declaration is legal, and that the
template
> parameter deduction works when Args.length == 0, but stops
working when
> Args.length > 0.
For deduction to work,
29 matches
Mail list logo