On 21.04.2016 04:35, Alex Parrill wrote:
On Wednesday, 20 April 2016 at 22:44:37 UTC, ag0aep6g wrote:
On 20.04.2016 23:59, Alex Parrill wrote:
[...]
That's not assigning the elements of a void[]; it's just changing what
the slice points to and adjusting the length, like doing `void* ptr =
some
On Wednesday, 20 April 2016 at 22:44:37 UTC, ag0aep6g wrote:
On 20.04.2016 23:59, Alex Parrill wrote:
On Wednesday, 20 April 2016 at 17:09:29 UTC, Matt Kline wrote:
[...]
First, you can't assign anything to a void[], for the same
reason you
can't dereference a void*. This includes the slice
On Thursday, 21 April 2016 at 02:06:00 UTC, newB wrote:
How is D implemented? (Compiler, Interpreter and Hybrid). Can
you please explain why?
Generally D is a compiled language: you give the compiler some
source code and it produces executable binary with native machine
code. Then you ca
On Thursday, 21 April 2016 at 01:49:19 UTC, Nicholas Wilson wrote:
[...]
you want to broadcast the rhs to a float4 and then adds them.
Can you post the errors (if any) you get during compilation.
Urgh, autocorrect. That should be addps them.
I get a "Error: floating point constant expressi
How is D implemented? (Compiler, Interpreter and Hybrid). Can
you please explain why?
On Thursday, 21 April 2016 at 01:48:15 UTC, Nicholas Wilson wrote:
On Thursday, 21 April 2016 at 00:14:53 UTC, Straivers wrote:
Hi,
I want to make a utility wrapper around a core.simd.float4,
and have been trying to make the following code work, but have
been met with no success.
[...]
yo
On Thursday, 21 April 2016 at 00:14:53 UTC, Straivers wrote:
Hi,
I want to make a utility wrapper around a core.simd.float4, and
have been trying to make the following code work, but have been
met with no success.
[...]
you want to broadcast the rhs to a float4 and then adds them. Can
you
On Thursday, 21 April 2016 at 01:18:14 UTC, rcorre wrote:
On Wednesday, 20 April 2016 at 19:24:49 UTC, Chris wrote:
On Wednesday, 20 April 2016 at 12:04:45 UTC, rcorre wrote:
===
$ dmd /tmp/d.d
/usr/bin/ld: d.o: relocation R_X86_64_32 against
`__dmd_personality_v0' can not be used when making
On Wednesday, 20 April 2016 at 19:24:49 UTC, Chris wrote:
On Wednesday, 20 April 2016 at 12:04:45 UTC, rcorre wrote:
===
$ dmd /tmp/d.d
/usr/bin/ld: d.o: relocation R_X86_64_32 against
`__dmd_personality_v0' can not be used when making a shared
object; recompile with -fPIC
d.o: error adding s
Hi,
I want to make a utility wrapper around a core.simd.float4, and
have been trying to make the following code work, but have been
met with no success.
auto add(float rhs)
{
return __simd(XMM.ADDPS, lhs, rhs);
}
Then I tried
auto add(float4 lhs, float rhs)
{
float4 tmp = [rhs, rhs,
Hi Everyone,
Preamble: We're a Win7+VisualStudio development environment. This
question involves integrating the GitHub-based
'D-Programming-Deimos/ZeroMQ' package in a 'D' solution.
Short form of issue: If anyone has compiled a D program using
(say) zmq_ctx_new(), then I'd appreciate knowin
On 20.04.2016 23:59, Alex Parrill wrote:
On Wednesday, 20 April 2016 at 17:09:29 UTC, Matt Kline wrote:
[...]
First, you can't assign anything to a void[], for the same reason you
can't dereference a void*. This includes the slice assignment that you
are trying to do in `buf[0..minLen] = remai
On Wednesday, 20 April 2016 at 17:09:29 UTC, Matt Kline wrote:
[...]
First, you can't assign anything to a void[], for the same reason
you can't dereference a void*. This includes the slice assignment
that you are trying to do in `buf[0..minLen] =
remainingData[0..minLen];`.
Cast the buffe
On 20.04.2016 22:09, Matt Kline wrote:
I'd rather not write my own cURL wrapper. Do you think it would be
worthwhile starting a PR for Phobos to get it changed to ubyte[]? A
reading of https://dlang.org/spec/arrays.html indicates the main
difference is that that GC crawls void[], but I would thin
On Wednesday, 20 April 2016 at 18:40:58 UTC, Alex Parrill wrote:
As for the GC, you're probably out of luck. Adding a global
mask option is unlikely to work well if multiple libraries use
it.
So we need an optional block-local mask then! ;)
On Wednesday, 20 April 2016 at 20:00:58 UTC, ag0aep6g wrote:
Maybe I've missed it, but you didn't say where the HTTP type
comes from, did you?
std.net.curl: https://dlang.org/phobos/std_net_curl.html#.HTTP
(Sorry, I assumed that was a given since it's a standard library
type. Poor assumption,
On Wednesday, 20 April 2016 at 16:08:32 UTC, Lass Safin wrote:
core.memory.GC.setAttr can set attributes for a block of
memory, with which you can set the attribute NO_SCAN, which as
it implies, forces that no scan be done in the particular block
of memory.
This can be used to insure that the G
On Wednesday, 20 April 2016 at 18:48:58 UTC, Alex Parrill wrote:
On Wednesday, 20 April 2016 at 12:32:48 UTC, Tofu Ninja wrote:
Is there a way to shallow copy an object when the type is
known? I cant seem to figure out if there is a standard way. I
can't just implement a copy function for the c
On 20.04.2016 21:48, Matt Kline wrote:
I don't have an option here, do I? I assume HTTP.onSend doesn't take a
`delegate size_t(ubyte[])` insetad of a `delegate size_t(void[])`, and
that the former isn't implicitly convertible to the latter.
Maybe I've missed it, but you didn't say where the HTT
On Wednesday, 20 April 2016 at 19:29:22 UTC, ag0aep6g wrote:
Maybe use ubyte[] for the buffer type instead.
I don't have an option here, do I? I assume HTTP.onSend doesn't
take a `delegate size_t(ubyte[])` insetad of a `delegate
size_t(void[])`, and that the former isn't implicitly convertibl
On 20.04.2016 19:09, Matt Kline wrote:
1. What is the idiomatic way to constrain the function to only take char
ranges? One might naïvely add `is(ElementType!T : char)`, but that falls
on its face due to strings "auto-decoding" their elements to dchar.
(More on that later.)
Well, string is not
On Wednesday, 20 April 2016 at 12:04:45 UTC, rcorre wrote:
===
$ dmd /tmp/d.d
/usr/bin/ld: d.o: relocation R_X86_64_32 against
`__dmd_personality_v0' can not be used when making a shared
object; recompile with -fPIC
d.o: error adding symbols: Bad value
collect2: error: ld returned 1 exit statu
On Wednesday, 20 April 2016 at 13:41:27 UTC, Nordlöw wrote:
At
https://github.com/nordlow/phobos-next/blob/master/src/variant_pointer.d
I've implemented a pointer-only version of Variant called
VariantPointer.
I plan to use it to construct light-weight polymorphism in trie
containers for D
On Wednesday, 20 April 2016 at 12:32:48 UTC, Tofu Ninja wrote:
Is there a way to shallow copy an object when the type is
known? I cant seem to figure out if there is a standard way. I
can't just implement a copy function for the class, I need a
generic solution.
A generic class copy function
On Wednesday, 20 April 2016 at 17:09:29 UTC, Matt Kline wrote:
I'm doing some work with a REST API, and I wrote a simple
utility function that sets an HTTP's onSend callback to send a
string:
[...]
IO functions usually work with octets, not characters, so an
extra encoding step is needed. F
I'm doing some work with a REST API, and I wrote a simple utility
function that sets an HTTP's onSend callback to send a string:
@property outgoingString(ref HTTP request, const(void)[] sendData)
{
import std.algorithm : min;
request.contentLength = sendData.length;
auto
On Wednesday, 20 April 2016 at 12:48:46 UTC, rcorre wrote:
On Wednesday, 20 April 2016 at 12:04:45 UTC, rcorre wrote:
===
$ dmd /tmp/d.d
/usr/bin/ld: d.o: relocation R_X86_64_32 against
`__dmd_personality_v0' can not be used when making a shared
object; recompile with -fPIC
d.o: error adding
On Wednesday, 20 April 2016 at 14:36:54 UTC, Nordlöw wrote:
On Wednesday, 20 April 2016 at 13:41:27 UTC, Nordlöw wrote:
At
https://github.com/nordlow/phobos-next/blob/master/src/variant_pointer.d
Further:
What to do with fact that the GC will fail to scan
VariantPointers?
Can the GC be tw
On Wednesday, 20 April 2016 at 13:41:27 UTC, Nordlöw wrote:
At
https://github.com/nordlow/phobos-next/blob/master/src/variant_pointer.d
I've implemented a pointer-only version of Variant called
VariantPointer.
[...]
It safe to assume that `typeBits` most significant bits of a
pointer on a
On Wednesday, 20 April 2016 at 13:41:27 UTC, Nordlöw wrote:
At
https://github.com/nordlow/phobos-next/blob/master/src/variant_pointer.d
Further:
What to do with fact that the GC will fail to scan
VariantPointers?
Can the GC be tweaked to mask out the type bits before scanning?
At
https://github.com/nordlow/phobos-next/blob/master/src/variant_pointer.d
I've implemented a pointer-only version of Variant called
VariantPointer.
I plan to use it to construct light-weight polymorphism in trie
containers for D I'm currently writing.
VariantPointer uses the top N-bits (
On Wednesday, 20 April 2016 at 10:19:10 UTC, abad wrote:
I have a project which is a mixture of D, C++ and C. I have
used Make for build automation so far but would like to migrate
to DUB.
I have hard time figuring out what to do with C / C++ sections
of the program. DUB seems to ignore (prob
On Wednesday, 20 April 2016 at 13:12:54 UTC, Mike Parker wrote:
"libs": [ "stdc++", "sid.a" ],
Oh, if you're using DMD only you can also pass configure it using
sourceFiles:
"sourceFile": ["/path/to/libsid.a"]
The first is the equivalant of:
dmd -L-lsid main.d ...
And the second:
dmd ma
On Wednesday, 20 April 2016 at 12:32:48 UTC, Tofu Ninja wrote:
Is there a way to shallow copy an object when the type is
known? I cant seem to figure out if there is a standard way. I
can't just implement a copy function for the class, I need a
generic solution.
I feel like
void shallow_copy
On Wednesday, 20 April 2016 at 12:04:45 UTC, rcorre wrote:
===
$ dmd /tmp/d.d
/usr/bin/ld: d.o: relocation R_X86_64_32 against
`__dmd_personality_v0' can not be used when making a shared
object; recompile with -fPIC
d.o: error adding symbols: Bad value
collect2: error: ld returned 1 exit statu
Is there a way to shallow copy an object when the type is known?
I cant seem to figure out if there is a standard way. I can't
just implement a copy function for the class, I need a generic
solution.
===
$ dmd /tmp/d.d
/usr/bin/ld: d.o: relocation R_X86_64_32 against
`__dmd_personality_v0' can not be used when making a shared
object; recompile with -fPIC
d.o: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
--- errorlevel 1
===
I'm seeing the above trying to compi
I have a project which is a mixture of D, C++ and C. I have used
Make for build automation so far but would like to migrate to DUB.
I have hard time figuring out what to do with C / C++ sections of
the program. DUB seems to ignore (probably sensibly) everything
but D source files. I compiled a
38 matches
Mail list logo