I have the following code in attempt to create an RAII object
wrapper, but it seems that it might be impossible. The problem
here is that FT_Init_FreeType is a static which is set at some
previous time to a function entry point in the FreeType library.
I could use a scope block, but would
On Friday, 20 November 2015 at 23:21:03 UTC, anonymous wrote:
[...]
FT_Init_FreeType must be read at compile time, because freeType
is a module level variable, and initializers for module
variables must be static values. The initializer is run through
CTFE (Compile Time Function Evaluation).
On Friday, 20 November 2015 at 23:35:50 UTC, Spacen Jasset wrote:
On Friday, 20 November 2015 at 23:21:03 UTC, anonymous wrote:
[...]
FT_Init_FreeType must be read at compile time, because
freeType is a module level variable, and initializers for
module variables must be static values
On Thursday, 19 November 2015 at 08:30:54 UTC, Jonathan M Davis
wrote:
On Wednesday, November 18, 2015 22:15:19 anonymous via
Digitalmars-d-learn wrote:
[...]
Exactly. T[] _is_ a dynamic array. Steven's otherwise wonderful
article on arrays in D ( http://dlang.org/d-array-article.html
)
I thought scope was deprecated, but I see that this is still
here: http://dlang.org/attribute.html#scope
Is it just the uses on classes and local variables that are
discouraged, but the use in a function signature will continue?
in == const scope?
Should this be allowed? What is it's purpose? It could compare
two arrays, but surely not that each element of type char is null?
char[] buffer;
if (buffer == null) {}
On Tuesday, 10 November 2015 at 11:57:03 UTC, Jonathan M Davis
wrote:
...
building blocks rather than kitchen sinks. And most range-based
...
I still can't really see why byChunk and byLine are part of the
File API? Especially byLine, I'll get byChunk go for now.
I think what I am trying
I can't seem to find a way of splitting a range of characters
into lines unless the range has a length or can be sliced? This
presumably is because i is a range of chunks, which cannot have a
length or a slice. I do not see how to get anything else from the
File object at the moment.
import
On Monday, 9 November 2015 at 18:04:23 UTC, Alex Parrill wrote:
On Monday, 9 November 2015 at 17:56:14 UTC, Alex Parrill wrote:
On Monday, 9 November 2015 at 15:23:21 UTC, Spacen Jasset
wrote:
On Monday, 9 November 2015 at 14:58:19 UTC, Adam D. Ruppe
wrote:
File has a .byLine and .byLineCopy
On Monday, 9 November 2015 at 14:58:19 UTC, Adam D. Ruppe wrote:
File has a .byLine and .byLineCopy method you could use to just
get lines from it.
Ah yes. but unfortunately I don't want to do that. I want to pass
a range into my print function. i.e. Sometimes it may not be a
File, it might
On Sunday, 8 November 2015 at 08:29:30 UTC, BBaz wrote:
On Sunday, 8 November 2015 at 08:21:38 UTC, BBaz wrote:
On Saturday, 7 November 2015 at 13:52:29 UTC, Spacen Jasset
wrote:
[...]
I have a used a template, because I cannot directly use the
InputRange(char) interface as a type, and auto
On Saturday, 7 November 2015 at 13:30:44 UTC, Jonathan M Davis
wrote:
On Saturday, November 07, 2015 12:10:05 Spacen Jasset via
Digitalmars-d-learn wrote:
Deprecation: module std.stream is deprecated - It will be
removed from Phobos in October 2016.
The std.stream module documentation doesn't
Deprecation: module std.stream is deprecated - It will be removed
from Phobos in October 2016.
The std.stream module documentation doesn't give any clues as to
what an alternative might be.
I have this sort of code:
this(InputStream input)
{
int
On Friday, 6 November 2015 at 17:50:17 UTC, Atila Neves wrote:
On Friday, 6 November 2015 at 17:34:29 UTC, Spacen Jasset wrote:
Hello,
I have read various things about struct constructors,
specifically 0 argument constructors, and using opCall and
@disable this(); which no longer seems
On Friday, 6 November 2015 at 15:52:10 UTC, johann wrote:
hi,
i like to use a window gui library and i think i found a
working one.
https://github.com/FrankLIKE/dfl2 - works with x64
the problem is, that with DMD 2.069.0, VS2015 and visualD the
trick of using "-L/SUBSYSTEM:windows,6.00
Hello,
I have read various things about struct constructors,
specifically 0 argument constructors, and using opCall and
@disable this(); which no longer seems to work.
What I am after I think is the behavior of C++'s structs on the
stack, namely for some or all of these uses at a given
On Friday, 6 November 2015 at 19:26:50 UTC, HeiHon wrote:
Consider this:
[code]
import std.stdio, std.utf, std.exception;
void do_decode(string txt)
{
try
{
size_t idx;
writeln("decode ", txt);
for (size_t i = 0; i < txt.length; i++)
{
dchar
If I say this in one module:
version = current
version (Current) {
version = featurea;
version = featureb;
version = featurec;
}
It appears that I can't put this in a module and import it
elsewhere to test the version specifications as they are all in
their own namespaces. Is this
On Sunday, 30 August 2015 at 18:12:40 UTC, BBasile wrote:
On Sunday, 30 August 2015 at 17:02:58 UTC, Spacen Jasset wrote:
[...]
try
---
Vector3 opBinary(string op)(Vector3 rhs)
{
static if (op ==/){}
else static assert(0, op ~ not implemented);
}
---
you used the char litteral
On Sunday, 30 August 2015 at 07:36:55 UTC, BBasile wrote:
On Sunday, 30 August 2015 at 02:42:30 UTC, Spacen Jasset wrote:
immutable(ElementEncodingType!(ElementType!Range))[]
buildPath(Range)(Range segments) if (isInputRange!Range
isSomeString!(ElementType!Range));
pure nothrow @safe
I have just added an opDiv to this class, but it doesn't seem to
pick it up.
math/vector.d(30): Error: 'this /= mag' is not a scalar, it is a
Vector3
I can't see why that is, becuase my opMul works in the same
place. Can anyone point out what I have done wrong?
Class Matrix {
void
On Sunday, 30 August 2015 at 20:09:25 UTC, Timon Gehr wrote:
On 08/30/2015 07:02 PM, Spacen Jasset wrote:
[...]
import std.math: sqrt;
import std.algorithm: map,sum,canFind;
struct Vector3{
float[3] xyz;
void normalise(){ this/=magnitude(); }
float magnitude(){ return sqrt(xyz
The following reminds me of the good old C++ template errors the
C++ compiler spits out.
Whilst D has fixed that problem, some things have gotten more
complex. I just wanted to find a replacement for D1 path join,
and found this, but it doesn't seem very easy to wade though this
stuff.
On Wednesday, 22 July 2015 at 00:49:29 UTC, Mike Parker wrote:
On Tuesday, 21 July 2015 at 16:34:35 UTC, Spacen Jasset wrote:
On Tuesday, 21 July 2015 at 15:17:13 UTC, Alex Parrill wrote:
On Tuesday, 21 July 2015 at 14:51:47 UTC, John Colvin wrote:
Isn't glu considered legacy these days? I
On Tuesday, 21 July 2015 at 15:17:13 UTC, Alex Parrill wrote:
On Tuesday, 21 July 2015 at 14:51:47 UTC, John Colvin wrote:
Isn't glu considered legacy these days? I think it's entirely
OpenGL 2.x. For the maths stuff see
http://code.dlang.org/packages/gl3n
Yep. It still uses immediate mode,
Hello,
Can anyone tell me if the GLU functions, gluSpehere etc are
availble in DerelictOrg or have they been removed. I can replace
these with my own versions, but was hoping to do a quick port to
DerelictOrg
On Tuesday, 21 July 2015 at 11:23:23 UTC, John Colvin wrote:
On Tuesday, 21 July 2015 at 11:08:13 UTC, Spacen Jasset wrote:
Hello,
Can anyone tell me if the GLU functions, gluSpehere etc are
availble in DerelictOrg or have they been removed. I can
replace these with my own versions
It seems that Derelict3 contains GLUT whereas derelict2 containss
GLU.
It appears I need GLU but I am somewhat confused as to what the
diffrence is.
A method call in the GTK API takes a delegate as an
argument(addOnActivate) I would like to be able to pass a
function instead (address of). What is the solution, at present I
have a wrapper class around the function.
Why does the read function return void[] and not byte[]
void[] read(in char[] name, size_t upTo = size_t.max);
I am trying to use file in a class. It doesn't seem to work. File
is a struct. Are you not supposed to new structs anymore? The
examples seem to use auto, but that isn't going to work in this
situation.
Is File a struct to take advantage of Raii?
import std.stdio;
class X
{
this()
{
On Tuesday, 8 April 2014 at 14:53:56 UTC, Adam D. Ruppe wrote:
On Tuesday, 8 April 2014 at 14:52:02 UTC, Spacen Jasset wrote:
Are you not supposed to new structs anymore?
Only if they're pointers. new File returns a File*, not a File.
But you shouldn't new a File because then the file won't
On Tuesday, 8 April 2014 at 15:15:37 UTC, Rene Zwanenburg wrote:
On Tuesday, 8 April 2014 at 15:08:17 UTC, Spacen Jasset wrote:
On Tuesday, 8 April 2014 at 14:53:56 UTC, Adam D. Ruppe wrote:
On Tuesday, 8 April 2014 at 14:52:02 UTC, Spacen Jasset wrote:
Are you not supposed to new structs
On Tuesday, 8 April 2014 at 15:18:20 UTC, Steven Schveighoffer
wrote:
On Tue, 08 Apr 2014 10:52:01 -0400, Spacen Jasset
spacenjas...@mailrazer.com wrote:
I am trying to use file in a class. It doesn't seem to work.
File is a struct. Are you not supposed to new structs anymore?
The examples
I caught a FileException, and want to print out the descriptive
error, but not the stacktrace. I cannot see how to do this at the
moment. I only see the toString function.
i.e. in the case below I would like to obtain c:/temp\junk: The
directory is not empty. or something similar, but not the
I see thanks. I couldn't see the throwable class at the time.
On Monday, 17 March 2014 at 20:39:45 UTC, anonymous wrote:
On Monday, 17 March 2014 at 09:18:36 UTC, Spacen Jasset wrote:
While trying to use dirEntries range with foreach I
encountered a seemingly unsurmountable problem. The problem is
that an execption is thrown while calling .front
On Tuesday, 18 March 2014 at 08:54:50 UTC, Spacen Jasset wrote:
On Monday, 17 March 2014 at 20:39:45 UTC, anonymous wrote:
On Monday, 17 March 2014 at 09:18:36 UTC, Spacen Jasset wrote:
While trying to use dirEntries range with foreach I
encountered a seemingly unsurmountable problem
While trying to use dirEntries range with foreach I encountered a
seemingly unsurmountable problem. The problem is that an
execption is thrown while calling .front() on the range that
dirEntries returnes, which seems to mean it's impossible to use
it with a for loop if you exepect any sort of
I would like to subtract 60 days from a SysTime, but find that
SysTime.add!days is not available, unlike Systime.roll!days
which is available.
main.d(18): Error: template instance add!(days) add!(days)
does not match te
mplate declaration add(string units)(long value, AllowDayOverflow
On Monday, 17 March 2014 at 11:52:08 UTC, Vladimir Panteleev
wrote:
On Monday, 17 March 2014 at 11:11:26 UTC, Spacen Jasset wrote:
I would like to subtract 60 days from a SysTime, but find that
SysTime.add!days is not available, unlike
Systime.roll!days which is available.
You can do
On Monday, 17 March 2014 at 14:39:16 UTC, Adam D. Ruppe wrote:
On Monday, 17 March 2014 at 14:31:54 UTC, Spacen Jasset wrote:
Thanks. What devilish magic allows for the syntax 60.days?
(how does it work)
There's a function in core.time:
Duration days(int n);
D functions f(x, t...) can also
On Monday, 17 March 2014 at 15:24:22 UTC, Ary Borenszweig wrote:
On 3/17/14, 12:11 PM, Spacen Jasset wrote:
On Monday, 17 March 2014 at 14:39:16 UTC, Adam D. Ruppe wrote:
On Monday, 17 March 2014 at 14:31:54 UTC, Spacen Jasset wrote:
Thanks. What devilish magic allows for the syntax 60.days
On Monday, 17 March 2014 at 16:33:34 UTC, Adam D. Ruppe wrote:
On Monday, 17 March 2014 at 16:16:20 UTC, Spacen Jasset wrote:
int and days is a random method that happens to belong to
Duration.
There's a separate function days
https://github.com/D-Programming-Language/druntime/blob/master
Hello,
Which version of the DMD front end is this gdc release using?
jason@adrastea:~$ gdc -v
Using built-in specs.
COLLECT_GCC=gdc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/i686-linux-gnu/4.6/lto-wrapper
Target: i686-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro
On 11/10/2013 07:25, monarch_dodra wrote: On Thursday, 10 October 2013
at 22:27:14 UTC, Spacen Jasset wrote:
Hello,
I am after a fast floor function; In fact a fast truncation and
conversion to integer. I see that std.math takes a real, and that
std.c.math takes a double
I recently heard about dub and other useful things happening in the D
world after being away from it for a long while. So, as you do I thought
I would see what's going on.
C:\bzr\mk4k-dmd2dub build
Checking dependencies in 'C:\bzr\mk4k-dmd2'
Building configuration application, build type
On 14/03/2012 09:59, Dmitry Olshansky wrote:
...
To make it real simple:
- assert on stuff you know has to be true regardless of circumstances
and not dependent on any possible external factors.
- enforce on stuff that must be true, but in general can fail like file
not found, etc. and/or
On 11/10/2011 18:12, Justin Whear wrote:
From the docs:
Different signals can be added to a class by naming the mixins.
So I think something like this ought to work:
mixin Signal!(string) onBlah;
mixin Signal!(int, int) onClicketyClick;
Peter Ravinovich wrote:
Is there a way to have
On 10/05/2011 04:48, Nick Sabalausky wrote:
Adam D. Ruppedestructiona...@gmail.com wrote in message
news:iqa7bi$1djh$1...@digitalmars.com...
Nick Sabalausky wrote:
2. Remove -L--no-warn-search-mismatch
Note for readers: this is in dmd.conf and is a relatively new thing.
My dmd 2.051 and
On 11/05/2011 06:47, Nick Sabalausky wrote:
Nick Sabalauskya@a.a wrote in message
news:iq9ujn$111t$1...@digitalmars.com...
The only problem I'm having now (aside from the fact that I haven't
attempted to deal with the other shared host server yet - the debian one
from the horrible ipower
On 09/05/2011 22:28, Nick Sabalausky wrote:
Spacen Jassetspacenjas...@yahoo.co.uk wrote in message
news:iq69q1$1ack$1...@digitalmars.com...
It should work,but again is depends what your target platform is. It's
quite important that - Even on windows. At the company I am now
contracting for we
On 08/05/2011 12:59, Nick Sabalausky wrote:
Nick Sabalauskya@a.a wrote in message
news:iq2g72$ngp$1...@digitalmars.com...
Aggg!!! God damnnit, I officially fucking hate linux now... (not that
I'm a win, mac or bsd fan, but whatever...)
I temporarily gave up trying to actually get ahold
On 08/05/2011 20:42, Nick Sabalausky wrote:
Spacen Jassetspacenjas...@yahoo.co.uk wrote in message
news:iq69q1$1ack$1...@digitalmars.com...
It should work,but again is depends what your target platform is. It's
quite important that - Even on windows. At the company I am now
contracting for we
On 29/04/2011 21:02, Nick Sabalausky wrote:
...
I'm having a rediculously hard time trying to find a CentOS 3 installation
disc image (or any other version before 5.6). This is the closest I've been
able to find:
...
It seems that the older versions that are no longer supported have
On 29/04/2011 01:46, Alexander wrote:
On 26.04.2011 21:44, Spacen Jasset wrote:
On 26/04/2011 20:10, Steven Schveighoffer wrote:
...
I don't think static linking is officially supported any more.
It is but only for OS binaries. Some systems infact, like AIX and Windows, do
no support
On 27/04/2011 21:56, Nick Sabalausky wrote:
Nick Sabalauskya@a.a wrote in message
news:ip9va1$2lbe$1...@digitalmars.com...
Spacen Jassetspacenjas...@yahoo.co.uk wrote in message
news:ip9n5d$27je$1...@digitalmars.com...
try lsb_release for this, if you aren't sure (and it's available as a
On 27/04/2011 18:51, Nick Sabalausky wrote:
Kai Meyerk...@unixlords.com wrote in message
news:ip9bro$1lak$1...@digitalmars.com...
On 04/26/2011 02:28 PM, Nick Sabalausky wrote:
Ok, so I guess statically linking against the stuff isn't the way to go,
and
apparently DLL hell is worse on linux.
On 26/04/2011 10:05, Robert Clipsham wrote:
On 26/04/2011 00:05, Nick Sabalausky wrote:
Thanks. How would I statically link against libc?
The way to do this with C is to pass -static to gcc, and I recall doing
something similar with dmd to get it working (maybe -L-static?) - I
don't have a
On 26/04/2011 19:09, Nick Sabalausky wrote:
On Linux, how do I get DMD to statically link against the necessary system
libs like libc?
Someone suggested trying -L-static, but that just gives me this:
/usr/bin/ld: cannot find -lgcc_s
collect2: ld returned 1 exit status
--- errorlevel 1
As I
On 26/04/2011 20:10, Steven Schveighoffer wrote:
...
I don't think static linking is officially supported any more.
It is but only for OS binaries. Some systems infact, like AIX and
Windows, do no support it at all.
i.e. linking to kernel32.dll statically, this is what you are asking
for,
On 10/04/2011 17:51, Jonathan M Davis wrote:
Ref http://digitalmars.com/d/2.0/lex.html
What are some possible use cases for delimited strings?
What is solved by having this in the language?
It's probably so that you can still use characters that require escaping in
the string without having
On 13/03/2011 00:06, Bekenn wrote:
On 3/12/2011 2:20 PM, Simon wrote:
I've done lots of 3d over the years and used quite a lot of different
libraries and I've come to prefer code that makes a distinction between
points and vectors.
Agreed. This has some nice benefits with operator
On 10/03/2011 12:18, Steven Schveighoffer wrote:
On Wed, 09 Mar 2011 18:19:55 -0500, Joel Christensen joel...@gmail.com
wrote:
This is on Windows 7. Using a def file to stop the terminal window
coming up.
win.def
EXETYPE NT
SUBSYSTEM WINDOWS
bug.d
import std.stdio;
import std.string;
void
On 01/03/2011 16:59, d coder wrote:
I'm afraid that I have no idea what would be stale about a shared
variable.
sychronized uses a mutex, and if you want to avoid race conditions,
you need to
use mutexes or something similar when dealing with shared variables.
But I don't
know what
On 01/03/2011 22:52, Spacen Jasset wrote:
On 01/03/2011 16:59, d coder wrote:
I'm afraid that I have no idea what would be stale about a shared
variable.
sychronized uses a mutex, and if you want to avoid race conditions,
you need to
use mutexes or something similar when dealing with shared
Trass3r wrote:
Just found that wonderful Detours package from Microsoft:
http://research.microsoft.com/en-us/projects/detours/
Is there something like this for Linux, maybe even written in/available for D?
Not sure. But you can't probably do exciting things like that. Have a
look at ptrace
noboy wrote:
There was a soft link /bin/sh - dash
I have change this to bash, and now all went fine.
Thank you
Steven Schveighoffer Wrote:
On Thu, 18 Mar 2010 09:28:06 -0400, noboy nob...@nowhere.com wrote:
I was little bit surprise because
mkdir -p dmd-2/usr/{bin,lib,src/phobos2,share/man
Sam Hu wrote:
Sam Hu Wrote:
I asked this question a couple of month ago but it is pending,is there any
solution now?
Thanks.
Sorry,Windows (XP).
Have you set-up an appropriate console font? There are article on the
internet on Unicode display and command console.
Trass3r wrote:
Are there any bindings out there?
I guess you have checked derlict on dsource already. I don't know if
there is version 3 or not.
BLS wrote:
yep, mean it...
has somebody done it before...to me it seems to be not as trivial as it
looks on the very first view. (speed matters)
Did one in C once for an editor (of course). Does that count? I might be
able to find the code. It might not be pretty I can't remember.
Daniel Keep wrote:
white_man wrote:
Does it possible to modify DMD and publish it in that form. Of course with full information about authors. Does it legal?
It depends. If you ONLY modify the front-end (front-end files are
identified as being licensed under GPL [1]), then you can distribute
AxelS wrote:
Hello evrybody...
I want to use all the opengl extensions like Shaders in my D2.0 prog...
I already got the opengl32.lib and also the headers...
I tried it wglGetProc (similar name...)! I could compile it but it hangs up
runtime and creates errors which dont tell me the actual
Michael P. wrote:
Hey, I've started to do some of the problems on Project Euler to practice my
programming skills. I'm doing #10 right now, and I think I've got a working
solution. It's just that it's way too slow.
Here's the link:
http://projecteuler.net/index.php?section=problemsid=10
The
How many people / projects are using Tango at this time?
I am considering switching over to tango instead of phobos due to
missing features, but mainly I think because of bugs that don't seem to
get fixed.
I had a look round for a poll on my question but couldn't really see
one. It seems to
Spacen Jasset wrote:
Spacen Jasset wrote:
Spacen Jasset wrote:
I installing a new pc, and so have installed the latest tools
specifically dss 0.78
I find that when compiling certain things, such as Derelict (dsss net
install derelict) or the project I am working on, rebuild runs out
Spacen Jasset wrote:
I installing a new pc, and so have installed the latest tools
specifically dss 0.78
I find that when compiling certain things, such as Derelict (dsss net
install derelict) or the project I am working on, rebuild runs out of
memory.
version 0.75 works ok, but 0.78 does
Spacen Jasset wrote:
Spacen Jasset wrote:
I installing a new pc, and so have installed the latest tools
specifically dss 0.78
I find that when compiling certain things, such as Derelict (dsss net
install derelict) or the project I am working on, rebuild runs out of
memory.
version 0.75
Ellery Newcomer wrote:
raymond wrote:
how to check if array key exist in array or not? for example
char[] [char[]] t;
t[tes1]=val1;
t[tes2]=val2;
t[tes3]=val3;
if (t[test1]) writefln(NONE);
if(test1 in t) writefln(exists);
Also useful:
char[] value;
if ( (value = test1
79 matches
Mail list logo