float computeToFitInWindow(uint rows, uint cols)
{
// code removed ...
writeln(hexWidth);
return hexWidth;
}
unittest
{
assert(computeToFitInWindow(1, 1) == 2.0f, "This assert
failed");
assert(computeToFitInWindow(3, 3) == 0.8f, "This
Thanks, that did the trick. Not sure why having the declarations
at global scope (or is it module scope in D) would work versus
having them at local scope?
import std.container : RedBlackTree;
int main()
{
struct Location {
int x;
int y;
}
struct Node{
this(Location loc, uint f) {
this.loc = loc;
this.f = f;
}
Location loc;
uint f;
}
auto priorityQueue = new R
This should be trivial, right?
I've been looking at existing D repo code for hours. Can't figure
why TTF_Init doesn't work?
It would help if I could figure out how to use SDL_GetError()
INFO: SDL loaded v2.30.2
INFO: SDL initialized: 0
INFO: TTF loaded: v2.0.14
Error Program exited with code -1
import bindbc.sdl;
import bindbc.loader;
SDL_version ver;
SDL_GetVersion(&ver);
writeln("version = ", ver); // runs and displays: version =
SDL_version(2, 30, 2)
writeln("version = ", SDL_GetVersion(&ver)); // compile fails
with
// template `wr
Error: Unresolvable dependencies to package bindbc-loader:
bindbc-opengl 0.13.0 depends on bindbc-loader ~>0.3.0
bindbc-sdl 1.4.7 depends on bindbc-loader ~>1.1.0
Huge fan of Mike Shah's YouTube videos regarding D and his latest
for D conference:
https://mshah.io/conf/24/DConf%20%20Online%202024%20_%20The%20Case%20for%20Graphics%20Programming%20in%20Dlang.pdf
So I installed github desktop app and cloned his Talks repo.
There is a build command commen
Wanted to study code.
I watched the video talk. But i couldn't see any URL etc..
Believe it was called Draw.
On Wednesday, 26 April 2023 at 23:02:07 UTC, Richard (Rikki)
Andrew Cattermole wrote:
Don't forget ``num % 2 == 0``.
None should matter, pretty much all production compilers within
the last 30 years should recognize all forms of this and do the
right thing.
Thanks. Fastest reply ever! And I
I just need an even/odd functionality. Don't think D has a
built-in operator.
// Found this C code online.
int isEven(int num)
{
return !(num & 1);
}
// found this in std.functional.unaryFun
alias isEven = unaryFun!("(a & 1) == 0");
assert(isEven(2) && !isEven(1));
If int
On Wednesday, 22 March 2023 at 21:08:23 UTC, Richard (Rikki)
Andrew Cattermole wrote:
I finally went ahead and looked at the dependencies of
FreeImage3180.
Try installing:
https://www.microsoft.com/en-ca/download/details.aspx?id=48145
It requires VCOMP140.dll which comes with the 2015 VC
re
Ok, I've gotten rid of dub and dub packages code. Just
LoadLibraryA. All eight dlls work except for FreeImage.dll. I've
compiled with dmd and -m64 option and freshly download a x64
FreeImage. Any Window users out there that use LoadLibraryA or
FreeImage.dll?
```
import std.stdio: writeln;
imp
I appreciate all the help people have given me previously. So
I've made everything super simple. The dub.sdl file consists of
four lines:
name "00_03_freeimage_debug"
dependency "bindbc-glfw" version="~>1.0.0"
dependency "bindbc-freeimage" version="~>1.0.2"
versions "FI_318"
The app.d use ex
On Thursday, 9 March 2023 at 06:36:18 UTC, IchorDev wrote:
On Thursday, 9 March 2023 at 00:21:02 UTC, WhatMeWorry wrote:
[...]
Sorry about that. Try updating to bindbc-glfw 1.0.2, should be
fixed now. If you see any other deprecation warnings from
BindBC bindings you can silence them with `-
my small dub.sdl project uses:
dependency "bindbc-glfw" version="~>1.0.1"
versions "GLFW_33"
and returns
Building bindbc-glfw 1.0.1: building configuration [dynamic]
C:\Users\Admin\AppData\Local\dub\packages\bindbc-glfw-1.0.1\bindbc-glfw\source\bindbc\glfw\binddynamic.d(557,11):
Deprecati
On Friday, 3 March 2023 at 19:44:17 UTC, ryuukk_ wrote:
What happens if you put the dll next to your executable, does
it find it?
Good idea. I copied the dll into same directory as the executable
and changed loadFreeImage to
immutable FISupport fiLib = loadFreeImage();
And I get the same no
I've tried distilling the problem to its very essence.
I downloaded the FreeImage.dll from
https://freeimage.sourceforge.io/download.html
to the following directory:
where /R c:\ FreeImage.dll
c:\Users\Admin\Downloads\FreeImage3180Win32Win64\FreeImage\Dist\x64\FreeImage.dll
dir
c:\Users
On Monday, 20 February 2023 at 01:04:25 UTC, Mike Parker wrote:
Any error about a missing DLL is a run-time error that's
unrelated to dub or the compiler.
Normally, for end users, a missing MSVC runtime DLL means you
have to install the MSVC Redistributable package. This version
of the DLL yo
and is abending with an error saying exactly this. How do I
specify the path to this library? Can I use one of the
environment variables in sc.ini, one of the Windows env
variables, or one of the dub options?
Btw, I'm bypassing on purpose the official D installation.
On Monday, 31 October 2022 at 20:31:11 UTC, ryuukk_ wrote:
On Monday, 31 October 2022 at 20:20:49 UTC, WhatMeWorry wrote:
I've got a pretty straightforward SDL dub file
dependency "bindbc-opengl"version="~>1.0.3"
versions "GL_46"
dependency "bindbc-glfw" version="~>1.0.1"
versions "GLFW
I've got a pretty straightforward SDL dub file
dependency "bindbc-opengl"version="~>1.0.3"
versions "GL_46"
dependency "bindbc-glfw" version="~>1.0.1"
versions "GLFW_33"
dependency "gl3n" version="~>1.4.1"
dependency "bindbc-freeimage" version="~>0.1.1"
versions "FI_317"
Unr
typeof(screen.output.findSplit("")) s;
Perfect. That was the "essence" of my question. But thanks to
Ali, I don't have to use such esoteric syntax. D is a wonderful
language, but I seem to shoot myself in the foot :)
I'm naturally getting a undefined identifier `s` error in the
return. Is there some way to refactor my code? I tried to
declare s outside of the else brackets like:
auto screen = executeShell(cmdLine);
auto s;
...
{
s = screen.output.findSplit("REG_SZ");
}
but that doesn't compile either
string[] tokens = userSID.output.split!isWhite;
writeln("tokens = ", tokens);
tokens = ["SID", "", "", "", "", "", "", "", "", "", "", "", "",
"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
"", "", "", "S-1-5-
I lost about a half an hour troubleshooting some code of mine
which as it turned out to be resolved with just one line.
// paths.remove(i); // compiles fine but does nothing
paths = paths.remove(i); // works - what I erroneously thought
the previous line was doing
Is the first line no
I was a little (nicely) surprised that I could use double quotes,
single quotes, or back ticks in the following line of code.
return s.split(";"); // double quotes
or
return s.split(';'); // single quotes
or
return s.split(`;`); // back ticks
Does D provide any guidance as to what is pref
I'm playing around with dynamic arrays and I wrote the tiny
program (at bottom). I get the following output:
PS C:\D\sandbox> dmd -m64 maxMem.d
PS C:\D\sandbox> .\maxMem.exe
Reserving 1,610,613,245 elements
reserve() returned a size of: 1,610,613,245
The capacity() of big is 1,610,613,245
ulong.
I run the program (at the bottom) and get, as expected, the
run-time out of memory error:
PS C:\D\sandbox> .\Reserve.exe
newCapacity = [ 1]
newCapacity = [ 3]
newCapacity = [ 5]
ooo
newCapacity = [905,207,293]
newCapaci
Quoting the D documentation:
size_t is an alias to one of the unsigned integral basic types,
and represents a type that is large enough to represent an offset
into all addressable memory. And I have a line of code:
size_t huge = ulong.max;
dmd GC.d
GC.d(29): Error: cannot implicitly convert
While studying Ali's book at chapter "Constructor and Other
Special Functions" and the below code snippet:
import std.stdio;
struct S {
this(int i) { writeln("an object"); }
// Original
//this(int i) const { writeln("a const object"); }
//this(int i) immuta
On Sunday, 28 February 2021 at 22:10:21 UTC, Siemargl wrote:
On Sunday, 28 February 2021 at 18:29:11 UTC, WhatMeWorry wrote:
It seems pretty obvious the problem is with name mangling. But
how to fix it?
fixing
int numb = 1;
and your example work correct
ldc 1.24 / win10
P.S.I'm not re
It seems pretty obvious the problem is with name mangling. But
how to fix it?
--
module file;
extern(D) export
{
int addOne(int i) { return (i + 1); }
}
--
module p
On Wednesday, 10 February 2021 at 11:38:00 UTC, Ferhat Kurtulmuş
wrote:
On Tuesday, 9 February 2021 at 19:37:17 UTC, WhatMeWorry wrote:
I'm trying to create a super simple dynamic library consisting
of two files:
[...]
remove /NOENTRY, and include "mixin SimpleDllMain;" in one of
the sour
I'm trying to create a super simple dynamic library consisting of
two files:
file2.d --
extern(D):
double addEight(double d) { return (d + 8.0); }
fileB.d --
extern(D)
{
string concatSuffix(string s) { return
I'm studying the D article at:
https://dlang.org/articles/dll-linux.html#dso5
https://dlang.org/articles/dll-linux.html#dso6
Statically Linking D Program With libphobos2.a
Statically Linking D Program With libphobos2.so
Don't we want to Dynamically link with shared libphobos2.so?
Also why do
// The following four lines in run.lang.io
int[] a;
alias T = long;
pragma(msg, is(typeof(a) : U[], U : T));
pragma(msg, is(typeof(a) : T[]));
// returns
true
false
But I'm not even sure what I'm looking at. Ali's book talks
about the colon appearing for
:, associative array ⬁
:, import
https://github.com/dlang/dlang.org/blob/ff235feedcb2bcb73ba348dcd1763542a43c7778/doc.ddoc
D_S = $(LAYOUT ,$1,$(ARGS $+))
SPEC_S = $(LAYOUT ,$1,$(ARGS $+))
COMMUNITY= $(LAYOUT ,$1,$(ARGS $+))
_=
LAYOUT=$3
_=
I realize that D_S and LAYOUT, etc are macros. I've read the DDoc
documentation
On Sunday, 3 January 2021 at 15:49:03 UTC, Imperatorn wrote:
On Saturday, 2 January 2021 at 22:08:34 UTC, WhatMeWorry wrote:
On Saturday, 2 January 2021 at 22:04:28 UTC, WhatMeWorry wrote:
I'm stepping through the windows static library tutorial at
http://prowiki.org/wiki4d/wiki.cgi?D__Tutoria
On Saturday, 2 January 2021 at 22:04:28 UTC, WhatMeWorry wrote:
I'm stepping through the windows static library tutorial at
http://prowiki.org/wiki4d/wiki.cgi?D__Tutorial/CompilingLinkingD#Linkingmanually
[...]
Oops. used the manual example. Should be
/LIBPATH:c:\dev\LibraryStudy\StaticLibr
I'm stepping through the windows static library tutorial at
http://prowiki.org/wiki4d/wiki.cgi?D__Tutorial/CompilingLinkingD#Linkingmanually
```
The fix is to specify the prebuilt .lib file on the command line:
dmd driver.d %cd%\libs\libfoo\libfoo.lib
```
The tutorial is for 32 bit so it u
On Wednesday, 16 December 2020 at 22:51:55 UTC, WhatMeWorry wrote:
Looking at;
https://dlang.org/dmd-windows.html#library
Compile modules separately and then run the librarian on them:
dmd -c foo.d
dmd -c bar.d
phobos.lib -c -p32 foo.lib foo.obj bar.obj abc.obj def.lib
My bad. I now see th
Looking at;
https://dlang.org/dmd-windows.html#library
Compile modules separately and then run the librarian on them:
dmd -c foo.d
dmd -c bar.d
phobos.lib -c -p32 foo.lib foo.obj bar.obj abc.obj def.lib
The last line puzzles me. I presume phobos.lib is the "librarian"
referred to in the fi
On Tuesday, 1 December 2020 at 22:58:53 UTC, WhatMeWorry wrote:
I'm trying to build DMD with Visual D under Visual Studio as
shown in the Wiki:
https://wiki.dlang.org/Building_under_Windows
The notes say to use the solution vcbuild:
You should be able to build DMD using the visual studio
s
I'm trying to build DMD with Visual D under Visual Studio as
shown in the Wiki:
https://wiki.dlang.org/Building_under_Windows
The notes say to use the solution vcbuild:
You should be able to build DMD using the visual studio solution
found in: dmd\src\vcbuild A typical choice is to build t
The DMD forum mentions internal design. This is more of a
beginner usage question.
- from Compiler Switches
-
-I=directory
Look for imports also in directory
-i[=pattern ]
Enables "include imports" mode, where the compiler will
in
I was poking around the dmd code just to "learn from the best"
and I came across some files that ended with the .d extension
which did not have the module statement. (I was under the naive
impression that all .d files must have a module statement)
However, in the directory:
https://github.
On Wednesday, 11 November 2020 at 06:21:38 UTC, Jacob Carlborg
wrote:
On 2020-11-11 06:29, WhatMeWorry wrote:
Which begs the question, how would the statement, m_State =
new BreakState() ever get executed?
class DebuggerSession
{
private BreakState m_State = new BreakState();
privat
I've been studying an 8 year old D project in Github and this
code fragment has left me befuddled. I'm confused as to when and
how the new BreakState() statement gets executed. Wouldn't the
class DebuggerSession need to be instantiated first and then the
this() constructor be called? Which
module mydll;
extern (C):
import core.stdc.stdio : printf;
export
{
int addSeven(int a, int b)
{
//printf("Hello from within my DLL");
return a+b+7;
}
}
The above D code file compiles and links, no problems with
C:\D\dmd2\samples\d\mydll>dmd -v -m64 mydll.d -L/DLL -L/
On Friday, 16 October 2020 at 15:14:03 UTC, Ali Çehreli wrote:
On 10/15/20 2:42 PM, Ali Çehreli wrote:
> I've recently done the same by calling dlopen() and dlsym()
> directly. Runtime.loadLibrary documentation says "If the
library
> contains a D runtime it will be integrated with the current
ru
I've go a small DLL and a test module both written in D. Why do I
need to use the extern(C)? Shouldn't both sides be using D name
wrangling?
mydll.d
module mydll;
extern(C): // removing or changing to (D): results in error
export
{
On Thursday, 1 October 2020 at 21:56:46 UTC, Ferhat Kurtulmuş
wrote:
On Thursday, 1 October 2020 at 21:35:42 UTC, WhatMeWorry wrote:
On Thursday, 1 October 2020 at 20:28:58 UTC, kinke wrote:
[...]
Thanks all. I've gotten it to work with:
[...]
[...]
[...]
total = 12
[...]
1) try
On Thursday, 1 October 2020 at 20:28:58 UTC, kinke wrote:
On Thursday, 1 October 2020 at 20:03:19 UTC, WhatMeWorry wrote:
Yes, but shouldn't the /NOENTRY option take care of that. Say,
I just want to make a DLL of simple functions.
Your little example has 2 problems, the first being an
incomp
On Thursday, 1 October 2020 at 09:22:29 UTC, user1234 wrote:
On Wednesday, 30 September 2020 at 11:45:53 UTC, Ferhat
Kurtulmuş wrote:
On Tuesday, 29 September 2020 at 21:22:21 UTC, WhatMeWorry
wrote:
module user;
export { int myAddSeven(int a, int b); }
[...]
it is better to use this templa
module user;
export { int myAddSeven(int a, int b); }
void main()
{
int total = myAddSeven(2, 3);
}
dmd -m64 -c user.d
module mydll;
export extern(D) {
int myAddSeven(int a, int b) { return a+b+7; } /* <--
function body */
}
dmd -c -shared -m64 mydll.d
link mydll.obj /DLL
1) The D Language Reference says:
"There are four kinds of arrays..." with the first example being
"type* Pointers to data" and "int* p; etc.
At the risk of sounding overly nitpicky, isn't a pointer to an
integer simply a pointer to an integer? How does that pertain to
an array?
2) "
I'm trying to study Adam Ruppe's terminal.d sub-package and I see
the following code segment:
version(demos) unittest
{
import arsd.terminal;
void main()
{
// . . .
}
main; // exclude from docs
}
Looks like a good baby step to take, so in the command line I use:
The documentation doesn't go into much detail:
sourcePaths "" ["" [...]] Allows to customize the
path where to look for source files (any folder "source" or "src"
is automatically used as a source path if no sourcePaths setting
is specified) - note that you usually also need to define
"impo
Really stupid question here, but when I try to run the same
command I get:
C:\Users\whatmeworry>dub add arsd-official
Unknown command: add
USAGE: dub [--version] [] [] [--
[]]
. . .
DUB version 1.11.0, built on Oct 6 2018
I thought about dub init, but that still doesn't give me an 'ad
On Wednesday, 25 September 2019 at 19:25:06 UTC, Ali Çehreli
wrote:
On 09/25/2019 12:06 PM, WhatMeWorry wrote:
> I was
> assuming that [] meant "the entirety" of the array.
Assuming we're talking about D slices, Yes. (It could be a
user-defined type with surprisingly different semantics.)
>
Just got through debugging a line of code which uses dynamic
array. It boiled to to my use of []. How should I "D think"
about slice[]? The run time error seems to say the the length of
[] is zero. I was assuming that [] meant "the entirety" of the
array.
In short, is there anytime th
On Monday, 9 September 2019 at 19:12:34 UTC, Adam D. Ruppe wrote:
On Monday, 9 September 2019 at 19:08:17 UTC, WhatMeWorry wrote:
Is this even possible?
what are you trying to do?
if c is static, it just needs to be initialized by a helper
function, like
int helper() {
int c = 60;
f
Is this even possible?
klondike.d(155): Error: no identifier for declarator c
klondike.d(155): Error: declaration expected, not =
struct FoundationPile
{
Card[] up;// all cards are face up on the Foundation
}
FoundationPile[4] foundations;
static if(true)
{
int r = 2;
int c =
int[] a = [ 3, 7, 9 ];
1) a = [];
and
2) a = null;
sets both the .ptr property of the array to null, and the length
to 0.
whereas
3) a.length = 0;
just sets the length to 0.
If all the above is correct, does this mean we should just stick
to either of the first two forms and never use
This is a very stupid question but from Ali's book, I took this
segment:
writeln("Résumé preparation: 10.25€");
writeln("\x52\ésum\u00e9 preparation: 10.25\€");
and after running it all I get is the following:
Résumé preparation: 10.25€
Résumé preparation: 10.25€
I was expecting t
I've been using DUB for several years and I've gotten it to work
generally. But I've been trying to troubleshoot a DUB issue for
two days now and I've come to the conclusion, I don't really
understand DUB and I'm tired of muddling through. (Surely it
hurts that I've never been exposed to a li
On Tuesday, 26 March 2019 at 21:20:06 UTC, Andre Pany wrote:
On Tuesday, 26 March 2019 at 17:36:15 UTC, WhatMeWorry wrote:
https://dlang.org/blog/2019/03/14/containerize-your-d-server-application/
I'm following the excellent blog posting by Mr. Nacke, but I
keep getting the following
error whe
https://dlang.org/blog/2019/03/14/containerize-your-d-server-application/
I'm following the excellent blog posting by Mr. Nacke, but I keep
getting the following
error when I attempt to compile hellorest with dub. Since
everything is pretty much on
autopilot, Everything seems to have worked be
On Tuesday, 4 September 2018 at 19:40:10 UTC, JN wrote:
On Tuesday, 4 September 2018 at 19:23:16 UTC, SrMordred wrote:
Most C++ game related projects uses GLM as they default
math/vector lib (even if not using opengl).
In D we have (that I found):
gfm.math - https://github.com/d-gamedev-team
Thanks all. I sometimes feel like Michael Corleone: "Just when I
thought I was out, they pull me back in!" :)
I realize it is not the place for it, but sometimes I wish the
Library Reference explained things in terms of "why".
On Friday, 9 March 2018 at 10:42:47 UTC, Kagamin wrote:
To make a struct noncopyable, add @disable this(this); to it,
then compiler will give an error on an attempt to copy it.
I tried the @disable this(this); but now it doesn't even compile?
Error: template std.concurrency.spawn cannot deduce
I read where shared classes have not been implemented yet. So I'm
using
just a struct e below: But the output below is showing that
sharing is
not happening between Struct in main() and the various spawned
threads.
I'm I doing something wrong?
creating queue in EventBuffer constructor
even
Sorry if this is the wrong place to post, but I just came across
this just now:
https://www.khronos.org/opengl/wiki/Language_bindings
I was thinking that with derelictGL, D should be on this list?
If so, I'm not sure how one would go about this?
On Thursday, 11 January 2018 at 23:29:30 UTC, Adam D. Ruppe wrote:
On Thursday, 11 January 2018 at 23:20:44 UTC, WhatMeWorry wrote:
When I simply move the array out of main() but still in app.d,
the compiler returns
Error: expression ["SCRATCH":Track("scratch.wav",
cast(Sound)1, 0, null),... i
I've built a sound.d module with lots data types, free functions
(initAndOpenSound() loadSound()), and enums etc.
In my main/app.d module, I've created the the following
associative array:
void main(string[] argv)
{
initAndOpenSound();
Track[string] tracks =
[
"SCRATCH"
enum SoundType { MUSIC = 0, SOUND_EFFECT };
struct Sound
{
string file;
SoundType musicOrSfx;
void* ptr; // Mix_Chunk* for sfx; Mix_Music* for
music;
}
immutable Sound[string] soundLibrary = // line 148
[
"SCRATCH" : { file : "scratch.wav", musicOrSfx :
I can compile the derelict-fmod example with
dub.json
...
"dependencies": {
"derelict-util": ">=1.9.1"
...
and dub.selections.json
...
"versions": {
"derelict-util": "2.1.0"
...
dub run
Fetching derelict-util 2.
I've been using Dub for a while but from the very beginning I
decided to go with SDL 100% of the time, So I've got a dub.sdl
file like:
name "01_10_camera_view_space"
description "A minimal D application."
authors "kheaser"
copyright "Copyright © 2017, kheaser"
license "proprietary"
dependen
I've tried debugging this for hours to no avail. It works on
Windows and Mac fine. But I'm running Antergos Linux (very much
like Arch) and it keeps failing at the System Init line. The code
is pretty much a copy of the example of derelict fmod on github.
I have no idea what the "bindings" num
I've got a github project and using DUB with DMD and I keep
running into this problem. I've tried deleting the entire
...\AppData\Roaming\dub\packages folder, but the
problem repeats the very next build attempt.
Fetching derelict-util 2.0.6 (getting selected version)...
Fetching derelict-ft 1
On Saturday, 30 September 2017 at 18:21:11 UTC, Jon Degenhardt
wrote:
On Saturday, 30 September 2017 at 17:17:17 UTC, SrMordred wrote:
[...]
It's easy to overlook, but documentation for splitter starts
out:
Lazily splits a range using an element as a separator.
An element of a string
I don't know the first step about how to trouble shoot this? I
haven't changed anything with my configuration.
Using dub registry url 'http://code.dlang.org/'
Refreshing local packages (refresh existing: true)...
Looking for local package map at
C:\ProgramData\dub\packages\local-packages.js
On Monday, 25 September 2017 at 06:07:58 UTC, H. S. Teoh wrote:
On Mon, Sep 25, 2017 at 05:28:13AM +, WhatMeForget via
Digitalmars-d-learn wrote:
[...]
You're not the only one. I stared at this same piece of
documentation for a long time before I figured out what it
meant. This is anoth
It's stuff like this which makes me very frustrated. Or depressed
because it demonstrates just how poor a programmer I am:
string printStatement(string message) {
return `writeln("` ~ message ~ `");`;
}
void main()
{
// Mixins are for mixing in generated code into the source
code.
On Friday, 18 August 2017 at 20:39:38 UTC, angel wrote:
On Friday, 18 August 2017 at 02:38:15 UTC, WhatMeForget wrote:
[...]
This actually appears correct ...
The 1-st example:
Each call to makeCalculator() increments a static (i.e. shared
among all makeCalculator() instances) variable - cont
On Wednesday, 26 July 2017 at 02:32:07 UTC, Adam D. Ruppe wrote:
I've hand rolled a function which is working for me currently,
but with my coding ability, I'd feel much safer with something
official :)
You could also do (cast(ubyte[]) array).length.
This was my (way over complicated) att
On Wednesday, 26 July 2017 at 02:31:33 UTC, Mike Parker wrote:
On Wednesday, 26 July 2017 at 02:24:06 UTC, WhatMeForget wrote:
[...]
Because .sizeof has nothing to do with how many elements are in
the array. It tells you how much space the array itself takes
up.
Totally agree. .length ret
Linking...
01_06_coord_systems.obj : error LNK2001: unresolved external
symbol _D11common_game12__ModuleInfoZ
01_06_coord_systems.obj : error LNK2001: unresolved external
symbol _D14post_processor12__ModuleInfoZ
I've gotten plenty of undefined external symbol errors in my time
but how does o
On Tuesday, 13 June 2017 at 12:39:53 UTC, Joseph Rushton Wakeling
wrote:
On Tuesday, 13 June 2017 at 12:38:03 UTC, Joseph Rushton
Wakeling wrote:
On Sunday, 11 June 2017 at 21:58:27 UTC, WhatMeForget wrote:
Just trying to compile a "Hello World" using dub and ldc2.
I presume from your command
Dub or Dmd dies when it can't find the linker. Like so:
C:\Users\kheaser\Git\Delivery\projects\00_01_print_ogl_ver>dub
run --arch=x86_64 --force
Performing "debug" build using dmd for x86_64.
derelict-util 2.0.6: building configuration "library"...
derelict-al 1.0.3: building configuration "l
kheaser@IT-ASST-SB MINGW64 /c/Users/kheaser/Git/Delivery/projects
(master)
$ dub init 00_01_print_ogl_ver
... All this white space here is me just pressing the Enter key
... to get the default values.
Package recipe format (sdl/json) [json]: Name
[00_01_print_ogl_ver]: Description [A minim
On Monday, 8 May 2017 at 21:16:53 UTC, Igor wrote:
Hi,
I am following Casey Muratori's Handmade Hero and writing it in
DLang.
This sounds very interesting. Maybe make it a public github
project?
On Tuesday, 18 April 2017 at 15:15:47 UTC, Stanislav Blinov wrote:
On Tuesday, 18 April 2017 at 15:07:27 UTC, WhatMeWorry wrote:
When I try to upload these files to my new repo, GitHub
(rightfully so) complains that
I have too many files. Since I'm using sdl and not json, can I
safely delete a
Just some basic questions regarding Dub projects with GitHub. I'm
just getting
my toes wet with GitHub so these might be pretty naive questions.
I've got about 35 mini dub projects where each project holds an
OpenGL tutorial.
like so:
01_01_hello_window
.dub
build
app
I'm doing conditional compilation using static ifs like so:
enum bool audio = true;
// if audio flag is present and set to true, add to code build
static if ( (__traits(compiles, audio)) && audio)
playSound(soundSys, BLEEP );
This works, b
On Saturday, 11 February 2017 at 03:10:35 UTC, WhatMeWorry wrote:
I followed the instructions for derelict.fmod.
// Load the Fmod library.
DerelictFmod.load(); // compiles fine.
// Load the Fmod studio library.
DerelictFmodStudio.load();
but the Studio load ..\common\derelict_libraries.d
I followed the instructions for derelict.fmod.
// Load the Fmod library.
DerelictFmod.load(); // compiles fine.
// Load the Fmod studio library.
DerelictFmodStudio.load();
but the Studio load ..\common\derelict_libraries.d(122,5): Error:
undefined identifier 'DerelictFmodStudio'
In the
On Friday, 3 February 2017 at 18:37:15 UTC, Johan Engelen wrote:
On Friday, 3 February 2017 at 17:20:43 UTC, WhatMeWorry wrote:
[...]
The error is in this line. Instead of assigning to the
`postProc` at module scope, you are defining a new local
variable and assigning to it.
[...]
The code below compiles fine but I always get a run time abort
with the error down below. Isn't the postProc at module scope so
shouldn't the class instance always be around (ie not
deallocated?) If it helps, this was translated from C++ code.
Thanks.
-file post_proces
module_common
import app; // Ugly? Bad? Better way?
common_func()
{
static if (compileTimeFlag1)
codeBlockA
static if (compileTimeFlag2)
codeBlockB
static if (compileTimeFlag3)
codeBlockC
}
I want to have many stan
1 - 100 of 219 matches
Mail list logo