I can create a python project by creating a PyDobject and `python
setup.py install` and get the output.
If I want to add an external library in D (usually I do that with
`dub run --single` command), how do I accomplish that?
In the project below, if I want to use some D libraries, how do I
b
hi, im trying to interface a cpp class. I'd like to interface a
bigger library and I'm trying to figure out the minimum effort.
--- c++ part:
#include
class some_class {
public:
static some_class* __ctor();
some_class();
~some_class();
void some_method();
};
some_class* some_class::__ct
On Tuesday, 21 November 2017 at 04:39:52 UTC, A Guy With a
Question wrote:
I'm trying to learn D using Visual D in Visual Studio Community
2015. Both dmd and ldc give me this error when building from
Visual Studio. Any ideas? I'm able to build C++ projects...
So I figured this one out. I set m
On Tue, Nov 21, 2017 at 12:05:21PM -0700, Jonathan M Davis via
Digitalmars-d-learn wrote:
> On Tuesday, November 21, 2017 18:49:40 David Zhang via Digitalmars-d-learn
> wrote:
[...]
> > char[64] chars;
> > chars[0..str.length] = str;
> > assert(false, chars[0..str.length]);
[...]
> Well, th
On Tuesday, November 21, 2017 19:13:36 David Zhang via Digitalmars-d-learn
wrote:
> On Tuesday, 21 November 2017 at 19:05:21 UTC, Jonathan M Davis
>
> wrote:
> > Well, the assertion is going to throw an AssertError, which
> > takes a string for its message. It doesn't copy the contents of
> > the
On Tuesday, 21 November 2017 at 13:28:44 UTC, Anonymouse wrote:
Looking at the dmd command dub issues and testing them myself I
notice that if I reorder the arguments it builds.
$ dmd -d -oftest source/arsd/*.d source/kameloso/plugins/*.d
source/kameloso/*.d
zsh: segmentation fault (core dumpe
On Tuesday, November 21, 2017 18:59:14 David Zhang via Digitalmars-d-learn
wrote:
> On Tuesday, 21 November 2017 at 18:56:03 UTC, Adam D. Ruppe wrote:
> > On Tuesday, 21 November 2017 at 18:49:40 UTC, David Zhang
> >
> > wrote:
> >>assert(false, chars[0..str.length]);
> >>
> >> }
> >>
> >> Wh
On Tuesday, November 21, 2017 12:05:21 Jonathan M Davis via Digitalmars-d-
learn wrote:
> On Tuesday, November 21, 2017 18:49:40 David Zhang via Digitalmars-d-learn
> wrote:
> > Hi,
> >
> > I've been trying to copy a string, then output it from an
> > `assert(false)` statement, but the copy seems t
On Tuesday, 21 November 2017 at 19:05:21 UTC, Jonathan M Davis
wrote:
Well, the assertion is going to throw an AssertError, which
takes a string for its message. It doesn't copy the contents of
the string. It's just taking a slice just like whenever you
pass a string to any other function. So,
On Tuesday, November 21, 2017 18:49:40 David Zhang via Digitalmars-d-learn
wrote:
> Hi,
>
> I've been trying to copy a string, then output it from an
> `assert(false)` statement, but the copy seems to be corrupted
> somehow.
>
> void main()
> {
> string str = "some string";
>
> //initia
On Tuesday, 21 November 2017 at 18:56:03 UTC, Adam D. Ruppe wrote:
On Tuesday, 21 November 2017 at 18:49:40 UTC, David Zhang
wrote:
assert(false, chars[0..str.length]);
}
What am I missing here?
You're escaping a reference to a local variable there. chars[]
is a pointer to the stack
On Tuesday, 21 November 2017 at 18:49:40 UTC, David Zhang wrote:
assert(false, chars[0..str.length]);
}
What am I missing here?
You're escaping a reference to a local variable there. chars[] is
a pointer to the stack, which is promptly smashed when the assert
error starts working up
Hi,
I've been trying to copy a string, then output it from an
`assert(false)` statement, but the copy seems to be corrupted
somehow.
void main()
{
string str = "some string";
//initializing `chars` with any value doesn't do anything
char[64] chars;
//char[64]
On Tuesday, 21 November 2017 at 07:36:25 UTC, drug wrote:
Probably author needs the following:
dependency "package" version="*"
path="../relative/path/to/other/custom/package"
instead of
dependency "package" version="~>1.2.3"
this allows using custom package not registered on dub and
after d
I am using the DrawRescaled method of DrawBuf[1] of DLangUI To
draw a PNG image to a CanvasWidget[2] subclass. It has a minor
issue of the box bounds showing in area that shoud be transparent
but otherwise works well.
My question is, does anybody know a way to draw that image
backwards withou
On Tuesday, 21 November 2017 at 10:12:11 UTC, Petar Kirov
[ZombineDev] wrote:
On Tuesday, 21 November 2017 at 10:10:59 UTC, Petar Kirov
[ZombineDev] wrote:
On Tuesday, 21 November 2017 at 00:15:04 UTC, Anonymouse wrote:
I have a large named enum (currently 645 members) of IRC
event types. It's
On Tuesday, 21 November 2017 at 00:36:00 UTC, rikki cattermole
wrote:
Source code please.
https://github.com/zorael/kameloso.git
I'm not proud of some of the early bits there (main.d) so don't
judge me, please. I'm learning as I go.
The offending bits are IRCEvent.Type in ircstructs.d[1]. I
On Tuesday, 21 November 2017 at 09:21:29 UTC, Chirs Forest wrote:
I'm interpolating some values and I need to make an
(elapsed_time/duration) value a float between 0 and 1
(inclusive of 0 and 1). The elapsed_time might be more than the
duration, and in some cases might be 0 or less. What's the
On Tuesday, 21 November 2017 at 10:10:59 UTC, Petar Kirov
[ZombineDev] wrote:
On Tuesday, 21 November 2017 at 00:15:04 UTC, Anonymouse wrote:
I have a large named enum (currently 645 members) of IRC event
types. It's big by neccessity[1].
I'm using dub, and both dmd and ldc successfully build
On Tuesday, 21 November 2017 at 00:15:04 UTC, Anonymouse wrote:
I have a large named enum (currently 645 members) of IRC event
types. It's big by neccessity[1].
I'm using dub, and both dmd and ldc successfully build it in
test and debug modes, but choke and die on plain and release. I
bisecte
On Tuesday, 21 November 2017 at 07:02:20 UTC, Michael V. Franklin
wrote:
I'm getting this error when I try to run the DMD test suite.
cd dmd
make -C test -f Makefile
[...]
I don't think you're doing anything wrong, though you shouldn't
be getting that error. File a bug report and try contact
On Tuesday, 21 November 2017 at 09:53:33 UTC, Petar Kirov
[ZombineDev] wrote:
On Tuesday, 21 November 2017 at 09:21:29 UTC, Chirs Forest
wrote:
I'm interpolating some values and I need to make an
(elapsed_time/duration) value a float between 0 and 1
(inclusive of 0 and 1). The elapsed_time migh
On Tuesday, 21 November 2017 at 09:21:29 UTC, Chirs Forest wrote:
I'm interpolating some values and I need to make an
(elapsed_time/duration) value a float between 0 and 1
(inclusive of 0 and 1). The elapsed_time might be more than the
duration, and in some cases might be 0 or less. What's the
I'm interpolating some values and I need to make an
(elapsed_time/duration) value a float between 0 and 1 (inclusive
of 0 and 1). The elapsed_time might be more than the duration,
and in some cases might be 0 or less. What's the most efficient
way to cap out of bounds values to 0 and 1? I can d
24 matches
Mail list logo