Hi yes I think noticed in another thread that you were wrapping
Qt with dynamic loading of the qt libs, interesting idea - does
your code allow subclassing of the Qt classes and overriding
the virtual methods? I'm taking a much more traditional
approach, but there is method in my madness :-)
On 2014-01-12 19:47, Gary Willoughby wrote:
When using Win32/x86 in a version block, does that relate to the
compiler or OS?
for example:
version(Win32)
{
// 32bit Windows or 32bit Compiler?
}
Microsoft 32-bit Windows systems
version(X86)
{
// 32bit OS or 32bit Compiler?
}
On Sun, 2014-01-12 at 19:11 +, Adam D. Ruppe wrote:
[…]
enum version = import(VERSION);
// use it now like any other string in D
Calling a string an enum seemed discordant, and version is sort of a
reserved word (at least as far as Emacs D-Mode colorizing is concerned)
so in the end I
On Sunday, 12 January 2014 at 20:16:15 UTC, Nordlöw wrote:
Is there a trait to check whether a type has value or reference
semantics?
I need this in a template struct that adaptively (using static
if) represent histogram bins as either a dense static array or
a sparse associative array.
On Sunday, 12 January 2014 at 20:16:15 UTC, Nordlöw wrote:
Is there a trait to check whether a type has value or reference
semantics?
I need this in a template struct that adaptively (using static
if) represent histogram bins as either a dense static array or
a sparse associative array.
On Monday, 13 January 2014 at 11:39:02 UTC, Russel Winder wrote:
Calling a string an enum seemed discordant
Slightly off-topic but I should mention that in D enums are not
just enumerations but any compile-time constants and used
idiomatically that way.
On Monday, 13 January 2014 at 11:39:02 UTC, Russel Winder wrote:
immutable auto versionNumber = strip(import(VERSION));
The auto doesn't do anything in this case, as immutable is a
storage class and hence implies auto. It might be better to write:
static immutable versionNumber = ...
On Sunday, 12 January 2014 at 20:16:15 UTC, Nordlöw wrote:
Is there a trait to check whether a type has value or reference
semantics?
I need this in a template struct that adaptively (using static
if) represent histogram bins as either a dense static array or
a sparse associative array.
Hi There,
I am playing around CTFE, and I get different compile time
behavior with the reference compiler (both 64-bit Linux):
DMD64 D Compiler v2.064
and the LLVM compiler:
LDC - the LLVM D compiler (37ee99): based on DMD v2.063.2
and
LLVM 3.3
The code snippet at the bottom of
If you just want to check if specifically it's a structure, you could
always check `__traits(compiles, T()) if(typeof(T()) == T)` beware
however that this will evaluate to true if T is a class with a static
opCall who's return type is T.
On 1/13/14, Tobias Pankrath tob...@pankrath.net wrote:
On
On Monday, 13 January 2014 at 13:41:30 UTC, Orvid King wrote:
If you just want to check if specifically it's a structure, you
could
always check `__traits(compiles, T()) if(typeof(T()) == T)`
beware
however that this will evaluate to true if T is a class with a
static
opCall who's return
On Monday, 13 January 2014 at 13:37:05 UTC, Ben Cumming wrote:
Hi There,
I am playing around CTFE, and I get different compile time
behavior with the reference compiler (both 64-bit Linux):
DMD64 D Compiler v2.064
and the LLVM compiler:
LDC - the LLVM D compiler (37ee99): based on
On Monday, 13 January 2014 at 13:41:30 UTC, Orvid King wrote:
If you just want to check if specifically it's a structure, you
could
always check `__traits(compiles, T()) if(typeof(T()) == T)`
beware
however that this will evaluate to true if T is a class with a
static
opCall who's return
On Monday, 13 January 2014 at 13:46:26 UTC, Dicebot wrote:
This is the answer. Current LDC is still based on 2.063.2
version of frontend. There have been several tweaks in
`std.conv` to make `to` more pure-friendly between those two
releases.
Thanks! I will recompile the latest version of
On Monday, 13 January 2014 at 14:18:49 UTC, Ben Cumming wrote:
On Monday, 13 January 2014 at 13:46:26 UTC, Dicebot wrote:
This is the answer. Current LDC is still based on 2.063.2
version of frontend. There have been several tweaks in
`std.conv` to make `to` more pure-friendly between those
On 1/13/14, anonymous anonym...@example.com wrote:
On Monday, 13 January 2014 at 13:41:30 UTC, Orvid King wrote:
If you just want to check if specifically it's a structure, you
could
always check `__traits(compiles, T()) if(typeof(T()) == T)`
beware
however that this will evaluate to true
On Sunday, 12 January 2014 at 18:36:19 UTC, Russel Winder wrote:
With C++ and Python, it is idiomatic to put the application
version
number in a separate file that can then be processed by the
build
system. For C++ a config file is constructed defining a macro
that is
then used in the rest of
Maxim Fomin:
as well as more sophisticated nonsense. Issue is filed is
bugzilla, so it will be fixed sooner or latter, current policy
is to ignore it.
See also:
https://d.puremagic.com/issues/show_bug.cgi?id=3934
Bye,
bearophile
On Monday, 13 January 2014 at 14:32:03 UTC, Dicebot wrote:
I don't think 2.064 LDC has been released yet
So I see, thanks.
On Monday, 13 January 2014 at 15:12:21 UTC, Ben Cumming wrote:
On Monday, 13 January 2014 at 14:32:03 UTC, Dicebot wrote:
I don't think 2.064 LDC has been released yet
So I see, thanks.
The merge-2.064 branch in Git is stable enough already for most
purposes, so if you don't mind building
On Thursday, 2 January 2014 at 20:38:10 UTC, Jeroen Bollen wrote:
Is it good to re-seed a generator for every coordinate, will
this be performance intensive? Is there maybe way to easily
implement Generator.at(uint x) in D?
Thanks Jacob and Dejan!
I guess I can just build a generic DOM using one of those and
replace the nodes I am interested with subclasses after the tree
building process. I was thinking more of a library that allows me
to say that a specific element (like svg) should use a specific
subclass,
On Mon, 2014-01-13 at 15:05 +, Dejan Lekic wrote:
[…]
I simply define version in my main module (module which contains
the main() function). I am planning to submit a DIP about
something that is related to this. - I think we really need a way
to specify version of package, and maybe
Le 12/01/2014 18:01, Benjamin Thaut a écrit :
Am 12.01.2014 17:18, schrieb Xavier Bigand:
Le 12/01/2014 11:16, Benjamin Thaut a écrit :
Am 12.01.2014 00:47, schrieb Xavier Bigand:
I didn't know this menu settings, but activate Access Violation don't
change anything.
It seems that your
On 2014-01-13 18:47, Ola Fosheim Grøstad
ola.fosheim.grostad+dl...@gmail.com wrote:
Thanks Jacob and Dejan!
I guess I can just build a generic DOM using one of those and replace
the nodes I am interested with subclasses after the tree building
process. I was thinking more of a library that
On Monday, 13 January 2014 at 19:18:17 UTC, Russel Winder wrote:
On Mon, 2014-01-13 at 15:05 +, Dejan Lekic wrote:
[…]
I simply define version in my main module (module which
contains the main() function). I am planning to submit a DIP
about something that is related to this. - I think we
I have a pre-built sqlite3 object file which I'd like to include
as part of the linking for the final executable. I have been
unable to find a way to do this with dub.
I have attempted adding:
sourceFiles: [csqlite3.obj],
This doesn't work since it is added to the compile stage, and
what is the type returned by regex function?
I want to store a regex member because I need to reuse it
multiple times.
Can this be done?
class A {
protected SomeTypeName regexPattern;
void load() {
string str;
// obtain a regex pattern and store it as str.
regexPattern
Le 13/01/2014 20:42, Xavier Bigand a écrit :
Le 12/01/2014 18:01, Benjamin Thaut a écrit :
Am 12.01.2014 17:18, schrieb Xavier Bigand:
Le 12/01/2014 11:16, Benjamin Thaut a écrit :
Am 12.01.2014 00:47, schrieb Xavier Bigand:
I didn't know this menu settings, but activate Access Violation
On Monday, 13 January 2014 at 20:53:55 UTC, Tiberiu Gal wrote:
what is the type returned by regex function?
I want to store a regex member because I need to reuse it
multiple times.
Can this be done?
class A {
protected SomeTypeName regexPattern;
void load() {
string str;
On Monday, 13 January 2014 at 20:53:55 UTC, Tiberiu Gal wrote:
what is the type returned by regex function?
I want to store a regex member because I need to reuse it
multiple times.
Can this be done?
class A {
protected SomeTypeName regexPattern;
void load() {
string str;
On Monday, 13 January 2014 at 20:59:28 UTC, Brad Anderson wrote:
On Monday, 13 January 2014 at 20:53:55 UTC, Tiberiu Gal wrote:
what is the type returned by regex function?
I want to store a regex member because I need to reuse it
multiple times.
Can this be done?
class A {
protected
On Monday, 13 January 2014 at 20:59:28 UTC, Brad Anderson wrote:
There is also std.traits.ReturnType you can use for more
complex types or voldemort types.
Or: typeof(regex())
BTW, how does ReturnType handle overloads?
--
Nicolas
Am 13.01.2014 21:52, schrieb Xavier Bigand:
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER,9)
glBindBuffer(GL_ARRAY_BUFFER,10)
glEnableVertexAttribArray(0)
glVertexAttribPointer(0,3,GL_FLOAT,false,12,)
glBindBuffer(GL_ARRAY_BUFFER,11)
glEnableVertexAttribArray(1)
Does Phobos have some variadic algorithm to order l-value
reference arguments in place? Something like
int a=3;
int b=2;
int c=1;
orderInPlace(a,b,c);
// a is now 1
// b is now 2
// c is now 3
Also a functional variant, say `order(a, b, c)`, that returns a
tuple
I'm curious, why is the .front property of narrow strings of type
dchar?
And not the underlying character type for the string.
On Monday, 13 January 2014 at 22:28:23 UTC, Nordlöw wrote:
Does Phobos have some variadic algorithm to order l-value
reference arguments in place? Something like
int a=3;
int b=2;
int c=1;
orderInPlace(a,b,c);
// a is now 1
// b is now 2
// c is now 3
import
TheFlyingFiddle:
I'm curious, why is the .front property of narrow strings of
type dchar?
And not the underlying character type for the string.
There was a long discussion on this. It was chosen this way to
allow most range-based algorithms to work correctly on UTF8 and
UTF16 strings.
In
anonymous:
static ref int deref(int* p) {return *p;}
sort(only(a, b, c).map!deref);
Despite some holes, std.algorithm and std.range are quite
powerful. Sometimes using them feels like playing a puzzle game
:-)
Bye,
bearophile
Jesse Phillips:
I thought it was to provide an index number during a foreach
iteration.
That's the enumerate() range, that is still missing in Phobos.
If you have an randomAccess range with assignable elements, why
use indexed?
But source is immutable, so its elements aren't assignable.
On Monday, January 13, 2014 23:10:03 TheFlyingFiddle wrote:
I'm curious, why is the .front property of narrow strings of type
dchar?
And not the underlying character type for the string.
It's to promote the correct handling of Unicode. A couple of related questions
and answers:
On Tuesday, 14 January 2014 at 03:01:53 UTC, Jonathan M Davis
wrote:
On Monday, January 13, 2014 23:10:03 TheFlyingFiddle wrote:
I'm curious, why is the .front property of narrow strings of
type
dchar?
And not the underlying character type for the string.
It's to promote the correct handling
Alright, so I FINALLY got shared libraries somewhat working
through my program, however I have some issues transferring data
between the shared library and the main program, the problem is
between
https://github.com/MinekoRox/Breaker-Engine/blob/master/src/breaker/utility/settings.d
and
On Tuesday, 14 January 2014 at 05:50:37 UTC, Mineko wrote:
Alright, so I FINALLY got shared libraries somewhat working
through my program, however I have some issues transferring
data between the shared library and the main program, the
problem is between
Sorry for the double post, I should be more specific.
.dup worked, I don't know how to have the GC proxy for shared
libs though.
On Tuesday, 14 January 2014 at 06:40:52 UTC, evilrat wrote:
On Tuesday, 14 January 2014 at 05:50:37 UTC, Mineko wrote:
Alright, so I FINALLY got shared libraries somewhat working
through my program, however I have some issues transferring
data between the shared library and the main program,
On Tuesday, 14 January 2014 at 06:48:48 UTC, Mineko wrote:
Sorry for the double post, I should be more specific.
.dup worked, I don't know how to have the GC proxy for shared
libs though.
the reason string.dup worked is due to GC on app side, right
after the moment your lib receive the
On Tuesday, 14 January 2014 at 07:23:52 UTC, evilrat wrote:
the reason string.dup worked is due to GC on app side, right
after the moment your lib receive the original string it is may
be marked by GC for collection, so you need to save a copy on
lib side. but using the proxies it should
48 matches
Mail list logo