On Tuesday, 28 February 2017 at 20:08:25 UTC, Jordan Wilson wrote:
Hello,
Been trying to learn the Simple Fast Multimedia Library (SFML)
using the Derelict bindings, and noticed some functionality is
offered by both SFML and the std library (for example, sfClock
and sfMutex).
Is there a
On Wednesday, 15 February 2017 at 19:56:31 UTC, berni wrote:
On Wednesday, 15 February 2017 at 16:11:36 UTC, drug wrote:
No, you recursively call main() and get segfault (due to stack
overflow) as expected
I thought, that an stack overflow leeds to an exception. But
that's not true, as I now
On Thursday, 2 February 2017 at 08:42:44 UTC, Andrea Fontana
wrote:
On Wednesday, 1 February 2017 at 21:43:09 UTC, Ali Çehreli
wrote:
That's a local variable that you've defined. Since OS.init
happens to be OS.win32, that's what you get.
:)
Maybe it should be "unknown" or "undefined" :)
On Saturday, 21 January 2017 at 18:38:22 UTC, Nestor wrote:
Hi friends,
Is there a way to "compile" d code to C, similar to what nim
does?
That would be cool for greater portability.
Nim is able to, because Nim doesn't really compile. The Nim
compiler just translates Nim code to C code
On Thursday, 12 January 2017 at 00:30:33 UTC, Ignacious wrote:
On Wednesday, 11 January 2017 at 19:23:10 UTC, Razvan Nitu
wrote:
[...]
If you change the return type to a void* your code basically
works.
void* makeMultidimensionalArray(T, Allocator)(auto ref
Allocator alloc, size_t[]
On Monday, 2 January 2017 at 18:56:40 UTC, Mike Bierlee wrote:
When compiling the following code with DMD 2.072.2:
class LeClass {
import std.stdio;
}
void main() {
foreach (memberName; __traits(allMembers, LeClass)) {
pragma(msg, memberName);
}
}
The
On Monday, 2 January 2017 at 21:07:37 UTC, Ignacious wrote:
when one prints out a string with some extended(I guess it's
unicode), writeln prints out the ascii versions that do not
correspond to what they really are. e.g., an umlaut is printed
out as 1/2 or something.
how to get it to print
On Wednesday, 21 December 2016 at 15:01:20 UTC, Eugene Wissner
wrote:
On Wednesday, 21 December 2016 at 14:15:06 UTC, John C wrote:
On Wednesday, 21 December 2016 at 11:45:18 UTC, Eugene Wissner
wrote:
This prints 3 times "Destruct" with dmd 0.072.1. If I remove
the if block, it prints
On Saturday, 17 December 2016 at 15:46:20 UTC, albert-j wrote:
I am trying to use Tango in a dub project because I need a
HashSet. I added Tango as a dependency to the dub.json, but now
dub gives me a bunch of depreciation warnings and a few errors,
like
On Thursday, 15 December 2016 at 07:56:40 UTC, Jacob Carlborg
wrote:
On 2016-12-14 21:47, bauss (wtf happend to my name took some
old cached title LOL??) wrote:
[...]
I would recommend creating a small script that iterates a
directory and generates a D file with string imports for all
the
On Thursday, 15 December 2016 at 02:58:11 UTC, rikki cattermole
wrote:
I did a lot of work in this area.
There are two solutions:
1) Use a package file and public import all modules via it.
From this do some form of 'registration' in a module
constructor. Using __traits(allMembers, retrieve
On Wednesday, 14 December 2016 at 20:47:23 UTC, bauss (wtf
happend to my name took some old cached title LOL??) wrote:
Is there a way to get all files in a folder at compile-time.
To be more specific I want to import the content of all files
within a specific folder during compile-time. I know
If a function is only called during compile-time will it be
available at runtime?
On Monday, 12 December 2016 at 10:25:05 UTC, aberba wrote:
On Monday, 12 December 2016 at 00:42:54 UTC, Nicholas Wilson
wrote:
On Sunday, 11 December 2016 at 18:30:54 UTC, aberba wrote:
You can enforce that the string that you receive is an email
address with `isEmail` from `std.net.isemail`
On Saturday, 10 December 2016 at 08:41:56 UTC, Suliman wrote:
import std.stdio;
import std.concurrency;
void main()
{
void sp(int i)
{
receive((int i)
{
writeln("i: ", i);
});
}
auto r = new Generator!int(
{
foreach(i; 1
On Thursday, 1 December 2016 at 00:36:30 UTC, Jake Pittis wrote:
How do I convert a double to a ubyte[]?
I've tried all sorts of things including converting the double
to a ulong and trying to serialize the ulong. For example test
bellow fails.
unittest {
double d = 3.14;
ulong
On Tuesday, 29 November 2016 at 15:56:23 UTC, Jerry wrote:
On Monday, 28 November 2016 at 11:26:41 UTC, dm wrote:
```
abstract class MyClass(T)
{
public:
@property const(T) value(){return _value;}
@property void value(T val){_value = val;}
...
private:
T _value;
...
}
To avoid
On Tuesday, 29 November 2016 at 09:58:16 UTC, ag0aep6g wrote:
On 11/29/2016 02:21 AM, Basile B. wrote:
The cast from a class type to a sub class in itself does
absolutely
nothing.
That can't be right. A bad downcast gives you null, so it has
to check the dynamic type information. Compare
On Tuesday, 22 November 2016 at 15:48:36 UTC, rumbu wrote:
On Tuesday, 22 November 2016 at 11:00:52 UTC, Bauss wrote:
[...]
Obtaining the true Windows version is tricky starting with
Windows 8.
Be careful when using GetVersionEx, it's deprecated.
VerifyVersionInfo is more reliable, but it
On Monday, 21 November 2016 at 09:11:39 UTC, Jonathan M Davis
wrote:
On Monday, November 21, 2016 08:57:11 Bauss via
Digitalmars-d-learn wrote:
[...]
Phobos doesn't have anything like that, but you can use the C
functions from the Windows API to do it. A quick search turned
up GetVersion
Is there a way to identify the Windows version? Such as if it's
XP, Vista, 7, 8 or 10? Either some way to tweak with version
flags or something in the standard library.
On Wednesday, 2 November 2016 at 02:42:01 UTC, Konstantin
Kutsevalov wrote:
On Wednesday, 2 November 2016 at 02:33:10 UTC, Konstantin
Kutsevalov wrote:
On Wednesday, 2 November 2016 at 02:20:43 UTC, rikki
cattermole wrote:
On 02/11/2016 3:17 PM, Konstantin Kutsevalov wrote:
[...]
You forgot
Wrote some pretty simple sockets that you could use (Based on
vibe.d though.)
https://github.com/bausshf/cheetah
On Sunday, 18 September 2016 at 13:28:15 UTC, ketmar wrote:
https://issues.dlang.org/show_bug.cgi?id=11595
https://issues.dlang.org/show_bug.cgi?id=16044
Thanks that clarifies my issues...
Do you if there are any statuses on that?
I'm trying to retrieve all functions with a certain attribute.
I know how to go about it and I can get it working with functions
in the same module as the traits expression, but as soon as I
nest modules in packages and import those packages then I don't
get any functions.
Is there a way to
On Saturday, 21 May 2016 at 05:03:14 UTC, ag0aep6g wrote:
On 05/21/2016 06:54 AM, Bauss wrote:
When I then compile with dub build I get this error:
Selected package diamond 0.1.0 does not match the dependency
specification >=0.2.1 <0.3.0 in package diamondtest. Need to
"dub upgrade"?
Have
It seems like dub selects the wrong version of my package.
I have tried the following:
- Reinstall dub
- Delete all packages
- Clear dubs cache
- Release new versions in the github repository
- Update the dub package on code.dlang.org multiple times and it
says it has the lates
The issue is
On Saturday, 16 April 2016 at 23:46:58 UTC, Zekereth wrote:
On Saturday, 16 April 2016 at 20:57:10 UTC, Bauss wrote:
Is there a way to achieve using -J through dub, preferable
through dub.json
I can't seem to find anything through the dub.json docs on how
to pass regular dmd flags.
For
Is there a way to achieve using -J through dub, preferable
through dub.json
I can't seem to find anything through the dub.json docs on how to
pass regular dmd flags.
On Saturday, 16 April 2016 at 14:08:05 UTC, newB wrote:
Let's say you have decided to use D programming language. For
what kind of applications would you choose D programming
language and For what kind of applications you won't choose D
programming.
I use D for pretty much everything. I
Oh yeah I forgot to notice that by name would be preferred. Not
title, but name.
Looking at std.process I could not see a standard way of
retrieving a process.
Is there any and if not are the functions available for just
windows somehow?
I'm sure if there's no standard way I'd need to call the win api
so if anyone could tell me which ones and/or the declarations if
In other programming languages you can open a website in the
default browser by spawning a process using the url, but it does
not seem to work with D using spawnProcess().
Do I have to do API calls to get the default browser and then
call spawnProcess() with the url as an argument or is there
On Thursday, 25 June 2015 at 14:05:54 UTC, MrSmith wrote:
On Thursday, 25 June 2015 at 14:02:41 UTC, Bauss wrote:
In other programming languages you can open a website in the
default browser by spawning a process using the url, but it
does not seem to work with D using spawnProcess().
Do I
On Wednesday, 14 January 2015 at 01:16:54 UTC, Bauss wrote:
Is it possible to access a pointer by its offsets.
Ex. write a 32bit integer to a byte pointer at ex. offset 4.
To give an example in C# you can do this:
fixed (byte* Packet = Buffer) // Buffer would be a byte array
And then to set
Is it possible to access a pointer by its offsets.
Ex. write a 32bit integer to a byte pointer at ex. offset 4.
To give an example in C# you can do this:
fixed (byte* Packet = Buffer) // Buffer would be a byte array
And then to set the value of a specific offset
*((TYPE*)(Packet + OFFSET))
Is there a way to get all functions within a module using traits?
I tried allMembers and it seem to work, but I can't use
getFunctionAttributes with it and if I use getAttributes then
it won't find any applied attributes.
What I do is having a package module with a staic constructor
which
On Saturday, 10 January 2015 at 23:23:52 UTC, Ali Çehreli wrote:
On 01/10/2015 08:21 AM, Bauss wrote:
Is there a way to get all functions within a module using
traits? I
tried allMembers and it seem to work, but I can't use
getFunctionAttributes with it and if I use getAttributes
then it
Is it possible to compile for other OS's on Windows using dmd?
On Monday, 5 January 2015 at 12:54:00 UTC, Gary Willoughby wrote:
On Monday, 5 January 2015 at 11:49:32 UTC, Bauss wrote:
Is it possible to compile for other OS's on Windows using dmd?
This is what's known as cross compiling and is not currently
supported by DMD at this time.
Any
On Monday, 10 November 2014 at 10:50:49 UTC, Chris wrote:
On Sunday, 9 November 2014 at 08:26:59 UTC, Suliman wrote:
I know that a lot of people are using for programming tools
like Sublime. I am one of them. But if for very simple code
it's ok, how to write hard code?
Do you often need
Is there any way to track down access violations, instead of me
having to look through my source code manually.
I have a pretty big source code and an access violation happens
at runtime, but it's going to be a nightmare looking through it
all to find the access violation. Not to mention all
On Wednesday, 5 November 2014 at 11:27:02 UTC, thedeemon wrote:
On Wednesday, 5 November 2014 at 11:09:42 UTC, Bauss wrote:
Is there any way to track down access violations, instead of
me having to look through my source code manually.
I have a pretty big source code and an access violation
On Wednesday, 5 November 2014 at 11:39:21 UTC, Marc Schütz wrote:
On Wednesday, 5 November 2014 at 11:09:42 UTC, Bauss wrote:
Is there any way to track down access violations, instead of
me having to look through my source code manually.
I have a pretty big source code and an access violation
Is there nobody that knows a solution? :(
Is there a way to spawn a process that won't be a child process,
because I can't seem to kill any processes created with
spawnProcess() It keeps giving me access denied for the processes
and it's necessary for me to kill a process, compile it and then
spawn it again.
Currently what I do is
Is there anyway to pull of a runtime compilation of D code or at
the very least asm execution?
I am not able to run the output file compiled. I am not sure if
it might be an error with my commandline or not.
Operating System: Windows 8
Commandline Arguments Try1: -c hello.d out\hello.exe
Commandline Arguments Try2: -c hello.d -m32 out\hello.exe
hello.d:
import std.stdio;
void main()
{
I know the socket has the nonblocking settings, but how would I
actually go around using it in D? Is there a specific procedure
for it to work correctly etc.
I've taken a look at splat.d but it seems to be very outdated, so
that's why I went ahead and asked here as I'd probably have to
end
501 - 549 of 549 matches
Mail list logo