On Wednesday, 29 July 2015 at 16:36:41 UTC, Atila Neves wrote:
LDC:
Cerealed: 970 ms, 482 μs, and 6 hnsecs
MsgPack: 896 ms, 591 μs, and 2 hnsecs
Not too shabby!
Atila
cool.
what are the advantages of cereald over msgpack?
can you stream in packets with cereald too?
cool thing about msgpack
On Wednesday, 29 July 2015 at 17:09:52 UTC, Namespace wrote:
On Wednesday, 29 July 2015 at 09:25:50 UTC, Snape wrote:
I'm in the early stages of building a little game with OpenGL
(in D) and I just want to know the facts about the GC before I
decide to either use it or work around it. Lots of p
I'm trying to compile a DLL using DMC for use in a sample DMD
program, but the link stage keeps failing and I can't figure out
why. The C source:
```
#include
#ifdef __DMC__
#define WIN32_LEAN_AND_MEAN
#include
BOOL APIENTRY DllMain(HANDLE hModule, DWORD reason, LPVOID
lpReserved) {
sw
On Thursday, 30 July 2015 at 03:52:16 UTC, Rikki Cattermole wrote:
On 30/07/2015 8:27 a.m., tcak wrote:
On Wednesday, 29 July 2015 at 19:41:14 UTC, tcak wrote:
After a long time (Failed many times before), I checked the
page
http://dlang.org/dll-linux.html again. It shows a message on
top
say
On 30/07/2015 8:27 a.m., tcak wrote:
On Wednesday, 29 July 2015 at 19:41:14 UTC, tcak wrote:
After a long time (Failed many times before), I checked the page
http://dlang.org/dll-linux.html again. It shows a message on top
saying that preliminary and subject to change.
Exactly what changes are
On Wednesday, 29 July 2015 at 20:20:47 UTC, Adel Mamin wrote:
Hello,
Why dmd cannot inference the type of 'arr' in my_func()
parameter?
test.d:
import std.stdio;
void my_func(auto arr)
{
writeln(arr);
}
void main()
{
auto arr = new int[5];
arr = [1, 2, 3, 4, 5];
my_func(arr);
}
On Wednesday, 29 July 2015 at 18:42:45 UTC, Kyoji Klyden wrote:
Thanks for the replies,
This issue really highlights one of D's weak points I think.
I've atleast got a round about solution almost working. :P
Really? I see it as one of D's strengths. It's much easier to
connect D with C than
On Thursday, 30 July 2015 at 00:14:23 UTC, Yuxuan Shui wrote:
Is there a way to have dub pack the library along with all its
dependencies into a single .a?
And if not, is there any D build system capable of doing this?
reggae maybe?
Is there a way to have dub pack the library along with all its
dependencies into a single .a?
On Wednesday, 29 July 2015 at 23:54:29 UTC, Ivan Kazmenko wrote:
On Wednesday, 29 July 2015 at 12:25:14 UTC, Marc Schütz wrote:
On Tuesday, 28 July 2015 at 21:25:23 UTC, Ivan Kazmenko wrote:
...
Perhaps I still don't implement save() correctly.
The line
@property auto save() {return S(con
On Wednesday, 29 July 2015 at 12:25:14 UTC, Marc Schütz wrote:
On Tuesday, 28 July 2015 at 21:25:23 UTC, Ivan Kazmenko wrote:
Hello,
I wrap an array into a struct. Then I use alias this to
expose the array functionality. Sadly, range properties of
the array are not forwarded, and so I can't
On Wednesday, 29 July 2015 at 22:12:38 UTC, anonymous wrote:
Slapping `static` on `get` seems to make it work:
static size_t get() {return member.offsetof;}
Good slap, thanks!
you solved my problem
I guess the compiler thinks that since `item.link` is an
instance member, it ne
On 07/29/2015 11:54 AM, vladde wrote:
On Wednesday, 29 July 2015 at 18:14:11 UTC, Ali Çehreli wrote:
else if(is(typeof(c) == fg))
{
// slots[xy.y][xy.x].fg = C;
}
The error occurs when the commented line is run. The full code can be
viewed at
https://github.
On Wednesday, 29 July 2015 at 21:33:16 UTC, remi thebault wrote:
Hello
I have this weird error trying to achieve something simple:
That's far from simple.
Here's a reduction:
template wl_container_of(alias member)
{
size_t get() {return member.offsetof;}
}
struct item { int link; }
Hello
I have this weird error trying to achieve something simple:
module list_test;
// import wayland.util;
template Id(alias a) { alias Id = a; }
template ParentOf(alias member)
{
alias ParentOf = Id!(__traits(parent, member));
}
template wl_container_of(alias member)
{
ParentOf
On Wednesday, 29 July 2015 at 20:20:47 UTC, Adel Mamin wrote:
void my_func(auto arr)
{
writeln(arr);
}
There are no `auto` parameters in D. You have to make it a
template explicitly:
void my_func(A)(A arr)
{
writeln(arr);
}
On Wednesday, 29 July 2015 at 19:41:14 UTC, tcak wrote:
After a long time (Failed many times before), I checked the
page http://dlang.org/dll-linux.html again. It shows a message
on top saying that preliminary and subject to change.
Exactly what changes are expected? Where can I learn about
t
Hello,
Why dmd cannot inference the type of 'arr' in my_func() parameter?
test.d:
import std.stdio;
void my_func(auto arr)
{
writeln(arr);
}
void main()
{
auto arr = new int[5];
arr = [1, 2, 3, 4, 5];
my_func(arr);
}
dmd test.d
test.d(3): Error: undefined identifier arr
Adel
After a long time (Failed many times before), I checked the page
http://dlang.org/dll-linux.html again. It shows a message on top
saying that preliminary and subject to change.
Exactly what changes are expected? Where can I learn about them?
I would do tests again with dynamic library writing
On Wednesday, 29 July 2015 at 19:10:36 UTC, Adam D. Ruppe wrote:
On Sunday, 26 July 2015 at 12:16:30 UTC, Joseph Rushton
Wakeling wrote:
My aim by contrast is to _allow_ that kind of use, but render
the original handle empty when it's done.
I don't think D offers any way to do that. With the d
On Sunday, 26 July 2015 at 12:16:30 UTC, Joseph Rushton Wakeling
wrote:
My aim by contrast is to _allow_ that kind of use, but render
the original handle empty when it's done.
I don't think D offers any way to do that. With the disabled
postblit, you can force people into a method you write th
On Wednesday, 29 July 2015 at 18:14:11 UTC, Ali Çehreli wrote:
else if(is(typeof(c) == fg))
{
// slots[xy.y][xy.x].fg = C;
}
The error occurs when the commented line is run. The full code
can be viewed at
https://github.com/vladdeSV/clayers/blob/change-slot
On Sunday, 26 July 2015 at 11:30:16 UTC, Joseph Rushton Wakeling
wrote:
Hello all,
A design question that came up during the hackathon held during
the last Berlin D Meetup.
[...]
Ping on the above -- nobody has any insight...?
Thanks for the replies,
This issue really highlights one of D's weak points I think.
I've atleast got a round about solution almost working. :P
On Wednesday, 29 July 2015 at 13:39:33 UTC, simendsjo wrote:
Is there no Unix socket support in Phobos? Or vibe? Or any
other library?
I've found some discussions:
* https://issues.dlang.org/show_bug.cgi?id=9384
*
http://forum.rejectedsoftware.com/groups/rejectedsoftware.vibed/thread/10870/
,
On Wednesday, 29 July 2015 at 17:59:26 UTC, Kyoji Klyden wrote:
How would I use a C function that's returning a struct? auto
doesn't work here, and from what I can tell D can't import C
headers. (If it really can't then, that would be a very welcome
feature)
I do have the required libs but I
On 07/29/2015 10:59 AM, Kyoji Klyden wrote:
> How would I use a C function that's returning a struct?
The binding file must have a matching D struct.
> auto doesn't
> work here, and from what I can tell D can't import C headers. (If it
> really can't then, that would be a very welcome feature)
On Wednesday, 29 July 2015 at 17:59:26 UTC, Kyoji Klyden wrote:
How would I use a C function that's returning a struct? auto
doesn't work here, and from what I can tell D can't import C
headers. (If it really can't then, that would be a very welcome
feature)
I do have the required libs but I
On 07/29/2015 11:08 AM, vladde wrote:
On Wednesday, 29 July 2015 at 18:04:48 UTC, vladde wrote:
Apparently, if I only check for a character the code compiles without
the need of static if.
if(is(typeof(c) == dchar) || is(typeof(c) == char)){
slots[xy.y][xy.x].character = c; } //Compiles and wor
On Wednesday, 29 July 2015 at 18:04:48 UTC, vladde wrote:
Apparently, if I only check for a character the code compiles
without the need of static if.
if(is(typeof(c) == dchar) || is(typeof(c) == char)){
slots[xy.y][xy.x].character = c; } //Compiles and works as
expected
And changing all if
On Wednesday, 29 July 2015 at 17:52:45 UTC, Ali Çehreli wrote:
On 07/29/2015 10:48 AM, vladde wrote:
> static if(is(typeof(c) == dchar) || is(typeof(c) ==
char))
> {
> slots[xy.y][xy.x].character = c;
> }
> else if(is(typeof(c) == fg))
I don't kn
How would I use a C function that's returning a struct? auto
doesn't work here, and from what I can tell D can't import C
headers. (If it really can't then, that would be a very welcome
feature)
I do have the required libs but I can't create my D obj file so I
can't really get there.
I know
On 07/29/2015 10:48 AM, vladde wrote:
> static if(is(typeof(c) == dchar) || is(typeof(c) == char))
> {
> slots[xy.y][xy.x].character = c;
> }
> else if(is(typeof(c) == fg))
I don't know whether it is the reason here but you fell for one of the D
I want to have a template function where I can throw in some
stuff in the parameters, then run foreach+static ifs and check
what type the current is. From my project clayers[1], I've taken
out some parts. (Note the current code does not compile.)
This is what I have so far:
struct XY {size_t
On Wednesday, 29 July 2015 at 08:03:06 UTC, anonymous wrote:
int[2][] is exactly an dynamic array of (arrays with the length
2), the logic behind this notation is:
1. Array of 2 int -> int[2]
2. a dynamic array of 1. -> int[2][] (like SomeType[] is an
array of SomeType)
Thank you!
On Wednesday, 29 July 2015 at 09:25:50 UTC, Snape wrote:
I'm in the early stages of building a little game with OpenGL
(in D) and I just want to know the facts about the GC before I
decide to either use it or work around it. Lots of people have
said lots of things about it, but some of that inf
On Monday, 29 June 2015 at 13:59:37 UTC, Nordlöw wrote:
On Monday, 29 June 2015 at 10:22:10 UTC, Atila Neves wrote:
I guess I'm going to have benchmark this now... :)
What about doing a memory profiling using DMD fresh builtin
profiler of
http://dpaste.dzfl.pl/17b0ed9c0204
?
I'm guessing
On Monday, 29 June 2015 at 10:22:10 UTC, Atila Neves wrote:
On Monday, 29 June 2015 at 08:45:15 UTC, Atila Neves wrote:
On Sunday, 28 June 2015 at 17:02:42 UTC, Nordlöw wrote:
On Friday, 26 June 2015 at 21:40:49 UTC, Atila Neves wrote:
I'd have to benchmark it against something, but I'm pretty
On Monday, 27 July 2015 at 15:50:11 UTC, Alex wrote:
Hey guys!
I am super new to programming and still trying to learn the
very basics via a book that I bought.
Out of interest: what made you start with D? It's not the most
obvious choice for a programming novice.
On Wednesday, 29 July 2015 at 13:39:33 UTC, simendsjo wrote:
Is there no Unix socket support in Phobos? Or vibe? Or any
other library?
I've found some discussions:
* https://issues.dlang.org/show_bug.cgi?id=9384
*
http://forum.rejectedsoftware.com/groups/rejectedsoftware.vibed/thread/10870/
,
On Wed, Jul 29, 2015 at 01:39:31PM +, simendsjo via Digitalmars-d-learn
wrote:
> Is there no Unix socket support in Phobos?
No, there's plenty of support. Just use a unix address when
making a socket.
I used it in my terminal emulator:
https://github.com/adamdruppe/terminal-emulator/blob/ma
Is there no Unix socket support in Phobos? Or vibe? Or any other
library?
I've found some discussions:
* https://issues.dlang.org/show_bug.cgi?id=9384
*
http://forum.rejectedsoftware.com/groups/rejectedsoftware.vibed/thread/10870/
, but it seems there are no support yet.
On Tuesday, 28 July 2015 at 21:25:23 UTC, Ivan Kazmenko wrote:
Hello,
I wrap an array into a struct. Then I use alias this to expose
the array functionality. Sadly, range properties of the array
are not forwarded, and so I can't use the struct as an array
with functions from std.algorithm a
On 29/07/2015 9:25 p.m., Snape wrote:
I'm in the early stages of building a little game with OpenGL (in D) and
I just want to know the facts about the GC before I decide to either use
it or work around it. Lots of people have said lots of things about it,
but some of that information is old, so a
I'm in the early stages of building a little game with OpenGL (in
D) and I just want to know the facts about the GC before I decide
to either use it or work around it. Lots of people have said lots
of things about it, but some of that information is old, so as of
today, what effect does the GC
On Tuesday, 28 July 2015 at 22:52:31 UTC, Binarydepth wrote:
I'm reading the reference : http://dlang.org/arrays.html
And I'm declaring two dynamic arrays as I understand. What I
had in mind was declaring a dynamic array of two elements each.
int[2][] is exactly an dynamic array of (arrays wi
46 matches
Mail list logo