On Monday, 16 October 2017 at 23:56:00 UTC, Nicholas Wilson wrote:
using fullyQualifiedName [here]
(https://github.com/libmir/dcompute/blob/master/source/dcompute/driver/ocl/util.d#L120)
leads to a large compilation slowdown, but I only need it to
disambiguate up to the module level i.e. so that
On Monday, 16 October 2017 at 23:56:00 UTC, Nicholas Wilson wrote:
using fullyQualifiedName [here]
(https://github.com/libmir/dcompute/blob/master/source/dcompute/driver/ocl/util.d#L120)
leads to a large compilation slowdown, but I only need it to
disambiguate up to the module level i.e. so that
Found this unanswered question on StackOverflow.
This program:
import std.stdio;
void add(ref int[] data)
{
data ~= 1;
data ~= 2;
}
void main()
{
int[] a;
writeln("capacity:",a.capacity);
auto cap = a.reserve(1000); // allocated may be more than
requested
assert(cap >
Hello.
fun.d:
import std.stdio;
void fun() { writeln("Hello"); }
main.d:
import fun;
void main() { fun(); }
$ dmd -oftest fun.d main.d
main.d(2): Error: function expected before (), not module fun of
type void
Why can't I use a function of the same name as the module? IIUC
import fun import
On Tuesday, 17 October 2017 at 04:56:23 UTC, ketmar wrote:
you can use libc's `putenv()` in D too, it is ok. just import
`core.sys.posix.stdlib`, it is there. D is not antagonistic to
C, and doesn't try to replace the whole libc with it's own
libraries. so if you see something that libc has
Ky-Anh Huynh wrote:
Hi,
Is it possible to change the current process's environment variables?
I have looked at `std/process.d` source code, and there is only a private
method `createEnv` used when new (sub)process is created.
In C `putEnv` the answer is positive:
http://man7.org/linux/man-
Hi,
Is it possible to change the current process's environment
variables?
I have looked at `std/process.d` source code, and there is only a
private method `createEnv` used when new (sub)process is created.
In C `putEnv` the answer is positive:
http://man7.org/linux/man-pages/man3/putenv.3.
On Tuesday, 17 October 2017 at 03:25:53 UTC, Neia Neutuladh wrote:
I take it you're using https://github.com/SiegeLord/Tango-D2 ?
I tried it out about a year ago and it worked, but your mileage
may vary. For the most part, Phobos and various Dub packages
have superseded it. Tango's main benefi
On Tuesday, 17 October 2017 at 02:52:41 UTC, Fat_Umpalumpa wrote:
I am having a lot of trouble trying to install Tango to use
with D2 on my mac os Sierra. Is this even possible? Thanks!
I take it you're using https://github.com/SiegeLord/Tango-D2 ?
I tried it out about a year ago and it worked
On Tuesday, 17 October 2017 at 02:32:49 UTC, Domain wrote:
Can you share your tasks.json and launch.json?
tasks.json - I don't have this file.
launch.json:
{
"version": "0.2.0",
"configurations": [
{
"name": "(Windows) Launch",
"type": "cppvsdbg",
I am having a lot of trouble trying to install Tango to use with
D2 on my mac os Sierra. Is this even possible? Thanks!
On Sunday, 15 October 2017 at 13:54:49 UTC, Dmitry wrote:
On Friday, 13 October 2017 at 12:55:09 UTC, piotrklos wrote:
Has anyone been able to debug in VS code on Windows? What am I
doing wrong?
Yep, it work for me.
How do you start debugging?
I noticed that the bottom button (small bug) at st
using fullyQualifiedName [here]
(https://github.com/libmir/dcompute/blob/master/source/dcompute/driver/ocl/util.d#L120)
leads to a large compilation slowdown, but I only need it to
disambiguate up to the module level i.e. so that
struct Context
{
enum Properties {}
static struct Info
On Monday, 16 October 2017 at 21:48:35 UTC, Nieto wrote:
How do I convert/create a D string from LPVOID (void*)?
There is no one answer to this, but for the specific function are
are looking at, the ALLOCATE_BUFFER argument means it puts the
pointer in the pointer.
So the way I'd do it is:
On Monday, 16 October 2017 at 21:48:35 UTC, Nieto wrote:
How do I convert/create a D string from LPVOID (void*)?
string GetLastErrorMessage() {
LPVOID lpMsgBuf;
DWORD errorMessageID = GetLastError();
FormatMessageA(
FORMAT_MESSAGE_ALLOCATE_BUFFER |
How do I convert/create a D string from LPVOID (void*)?
string GetLastErrorMessage() {
LPVOID lpMsgBuf;
DWORD errorMessageID = GetLastError();
FormatMessageA(
FORMAT_MESSAGE_ALLOCATE_BUFFER |
FORMAT_MESSAGE_FROM_SYSTEM |
F
On Monday, 16 October 2017 at 03:49:18 UTC, ketmar wrote:
Michael V. Franklin wrote:
[...]
judging from my several decades of expirience, bounties almost
never works. there are alot of reasons for that, but the fact
still stands: it is *almost* impossible to make something
happen with boun
On Monday, 16 October 2017 at 18:21:46 UTC, Jacob Carlborg wrote:
On 2017-10-16 17:13, Andrew Edwards wrote:
Is there a better way?
The official download script [1] is using the following:
You're a godsend. Thank you very much.
On 2017-10-16 17:13, Andrew Edwards wrote:
The best way I know to determine the latest DMD release is
http://ftp.digitalmars.com/LATEST. I'm not aware that such a file exists
for LDC and GDC so I'm currently doing:
string latest(string url) {
return executeShell("git ls-remote --tags " ~
On 10/16/17 8:00 AM, drug wrote:
I refactored `MyStructure` added own implementation of malloced array
based on pureRealloc/pureFree instead of dynamic array I used before and
now I have error:
Error: cannot implicitly convert expression get(msg.getData()) of type
const(MyStructure) to MyStruct
On Monday, 16 October 2017 at 05:06:26 UTC, evilrat wrote:
On Sunday, 15 October 2017 at 15:13:09 UTC, Nieto wrote:
I'm trying to write a blinding and I found both
IID_ITaskbarList and IID_ITaskbarList2 are defined but
IID_ITaskbarList3 isn't. Any reason why it isn't defined?
sorry if it sound
The best way I know to determine the latest DMD release is
http://ftp.digitalmars.com/LATEST. I'm not aware that such a file
exists for LDC and GDC so I'm currently doing:
string latest(string url) {
return executeShell("git ls-remote --tags " ~ url ~ " | cut
-d 'v' -f 2 | cut -d '-' -f 1
On Monday, 16 October 2017 at 06:03:40 UTC, evilrat wrote:
can cast to ubyte[] for binary too, be careful with enums
though, because enum arrays will allocate every time you access
it
Arrays yes, but not strings. So you can do `enum data =
import("strings.txt");`.
On Monday, 16 October 2017 at 07:28:03 UTC, Nick Sabalausky
(Abscissa) wrote:
Does Phobos have a way to "tee" a range?
use my dpldocs search engine
http://dpldocs.info/tee
std.range pops right up!
16.10.2017 15:18, Biotronic пишет:
On Monday, 16 October 2017 at 12:00:13 UTC, drug wrote:
I refactored `MyStructure` added own implementation of malloced array
based on pureRealloc/pureFree instead of dynamic array I used before
and now I have error:
Error: cannot implicitly convert expression
On Monday, 16 October 2017 at 12:00:13 UTC, drug wrote:
I refactored `MyStructure` added own implementation of malloced
array based on pureRealloc/pureFree instead of dynamic array I
used before and now I have error:
Error: cannot implicitly convert expression get(msg.getData())
of type const(M
I refactored `MyStructure` added own implementation of malloced array
based on pureRealloc/pureFree instead of dynamic array I used before and
now I have error:
Error: cannot implicitly convert expression get(msg.getData()) of type
const(MyStructure) to MyStructure.
What operators should I ove
On 10/16/2017 03:30 AM, lobo wrote:
On Monday, 16 October 2017 at 07:28:03 UTC, Nick Sabalausky (Abscissa)
wrote:
Does Phobos have a way to "tee" a range?
For example, suppose you had something like this:
[...]
https://dlang.org/phobos/std_range.html#tee ?
Ahh, thanks, I was only looking i
On Monday, 16 October 2017 at 07:28:03 UTC, Nick Sabalausky
(Abscissa) wrote:
Does Phobos have a way to "tee" a range?
For example, suppose you had something like this:
[...]
https://dlang.org/phobos/std_range.html#tee ?
Does Phobos have a way to "tee" a range?
For example, suppose you had something like this:
-
// Do something with each file in a dir
dirEntries(selectedDir, SpanMode.shallow)
.filter!someFilterCriteria
.doSomethingWithFile;
30 matches
Mail list logo