On Saturday, 2 September 2017 at 03:47:24 UTC, Adam D. Ruppe
wrote:
On Saturday, 2 September 2017 at 03:41:47 UTC, SrMordred wrote:
Whats going on , and how to prevent this ?
Are you using a static this anywhere?
Hm, right.
I was constructing the window there.
Forgot that static this will
On Saturday, 2 September 2017 at 03:41:47 UTC, SrMordred wrote:
Whats going on , and how to prevent this ?
Are you using a static this anywhere?
Im using SDL2 with derelict, on ubuntu.
Last DMD.
When using spawn or new Thread like :
spawn( (){
while(true){
Thread.sleep(500.msecs);
});
the program open two SDL windows.
Whats going on , and how to prevent this ?
On Saturday, 2 September 2017 at 02:37:08 UTC, Mike Parker wrote:
On Saturday, 2 September 2017 at 01:19:52 UTC, EntangledQuanta
wrote:
The whole point is so that there is no wasted space, so if it
requires that then it's not a waste of space but a bug.
Audio that is in24 is 3 bytes per
On Saturday, 2 September 2017 at 02:49:41 UTC, Ilya Yaroshenko
wrote:
On Friday, 1 September 2017 at 19:39:14 UTC, EntangledQuanta
wrote:
Is there a way to create a 24-bit int? One that for all
practical purposes acts as such? This is for 24-bit stuff like
audio. It would respect endianness,
On Friday, 1 September 2017 at 19:39:14 UTC, EntangledQuanta
wrote:
Is there a way to create a 24-bit int? One that for all
practical purposes acts as such? This is for 24-bit stuff like
audio. It would respect endianness, allow for arrays int24[]
that work properly, etc.
Hi,
Probably you
On Saturday, 2 September 2017 at 01:19:52 UTC, EntangledQuanta
wrote:
The whole point is so that there is no wasted space, so if it
requires that then it's not a waste of space but a bug.
Audio that is in24 is 3 bytes per sample, not 4. Every 3 bytes
are a sample, not every 3 out of 4.
On Friday, 1 September 2017 at 11:33:15 UTC, Biotronic wrote:
On Friday, 1 September 2017 at 10:15:09 UTC, Nicholas Wilson
wrote:
So I have the following types
struct DevicePointer(T) { T* ptr; }
struct Buffer(T)
{
void* driverObject;
T[] hostMemory;
}
and a function
auto
I came up with a library solution that isn't pretty ;/
I offer it up to the gods, but being gods, they probably don't
care.
template EnumMapper(alias func, string[] args, eT...)
{
import std.meta, std.typecons, std.traits, std.string,
std.algorithm, std.array, std.conv;
private
On Saturday, 2 September 2017 at 00:43:00 UTC, Nicholas Wilson
wrote:
On Friday, 1 September 2017 at 22:10:43 UTC, Biotronic wrote:
On Friday, 1 September 2017 at 19:39:14 UTC, EntangledQuanta
wrote:
Is there a way to create a 24-bit int? One that for all
practical purposes acts as such? This
On Friday, 1 September 2017 at 22:10:43 UTC, Biotronic wrote:
On Friday, 1 September 2017 at 19:39:14 UTC, EntangledQuanta
wrote:
Is there a way to create a 24-bit int? One that for all
practical purposes acts as such? This is for 24-bit stuff like
audio. It would respect endianness, allow for
On Friday, 1 September 2017 at 23:25:04 UTC, Jesse Phillips wrote:
I've love being able to inherit and override generic functions
in C#. Unfortunately C# doesn't use templates and I hit so many
other issues where Generics just suck.
I don't think it is appropriate to dismiss the need for the
I've love being able to inherit and override generic functions in
C#. Unfortunately C# doesn't use templates and I hit so many
other issues where Generics just suck.
I don't think it is appropriate to dismiss the need for the
compiler to generate a virtual function for every instantiated T,
On Friday, 1 September 2017 at 22:21:18 UTC, Biotronic wrote:
On Friday, 1 September 2017 at 20:58:20 UTC, EntangledQuanta
wrote:
template(A, B...)
{
auto foo(C...)(C c)
{
... get c's parameter names, should be alpha, beta
}
}
foo!(., .)(alpha, beta)
I need the actual
On Friday, 1 September 2017 at 22:10:43 UTC, Biotronic wrote:
On Friday, 1 September 2017 at 19:39:14 UTC, EntangledQuanta
wrote:
[...]
I haven't looked at endianness beyond it working on my
computer. If you have special needs in that regard, consider
this a starting point:
[...]
On Friday, 1 September 2017 at 20:58:20 UTC, EntangledQuanta
wrote:
template(A, B...)
{
auto foo(C...)(C c)
{
... get c's parameter names, should be alpha, beta
}
}
foo!(., .)(alpha, beta)
I need the actual identifiers passed to foo. I can get the
types(obviously C) but when
On Friday, 1 September 2017 at 19:39:14 UTC, EntangledQuanta
wrote:
Is there a way to create a 24-bit int? One that for all
practical purposes acts as such? This is for 24-bit stuff like
audio. It would respect endianness, allow for arrays int24[]
that work properly, etc.
I haven't looked at
On Friday, 1 September 2017 at 19:04:39 UTC, Daniel Kozak wrote:
I have same issue. How this help you? Catching exception does
not help. How do I catch exception and still print help message?
Your are correct, sorry about that. What my response showed is
how to avoid printing the full stack
On Friday, September 01, 2017 20:58:20 EntangledQuanta via Digitalmars-d-
learn wrote:
> template(A, B...)
> {
> auto foo(C...)(C c)
> {
> ... get c's parameter names, should be alpha, beta
> }
> }
>
>
> foo!(., .)(alpha, beta)
>
> I need the actual identifiers passed to foo. I
Nothing new here but I almost fell prey to this bug today. Spot the bug:
import std.stdio;
import std.range;
int[3] bar() {
return [ 1, 2, 3 ];
}
auto foo() {
auto a = bar();
return zip(a[], a[]);
}
void main() {
writeln(foo());
}
In the real code, bar() was a call to
template(A, B...)
{
auto foo(C...)(C c)
{
... get c's parameter names, should be alpha, beta
}
}
foo!(., .)(alpha, beta)
I need the actual identifiers passed to foo. I can get the
types(obviously C) but when I try to get the identifier
names(__traits(identifier or other
On 09/01/2017 07:27 AM, Brian wrote:
double [] hugeCalc(int i){
// Code that takes a long time
}
so if I do
double[][int] _hugeCalcCache;
foreach(i ; I)
_hugeCalcCache[i] = hugeCalc(i);
of course the required time is I.length * (a long time), so I wanted to
shorten this by
This happens when building, not running. This might be a Visual D
issue as when I use dmd from the command line, it works fine ;/
Is there a way to create a 24-bit int? One that for all practical
purposes acts as such? This is for 24-bit stuff like audio. It
would respect endianness, allow for arrays int24[] that work
properly, etc.
On Friday, 1 September 2017 at 19:25:53 UTC, Adam D Ruppe wrote:
On Friday, 1 September 2017 at 18:17:22 UTC, EntangledQuanta
wrote:
I get an access violation, changed the code to
What is the rest of your code? access violation usually means
you didn't new the class...
No, that is the
On Friday, 1 September 2017 at 18:17:22 UTC, EntangledQuanta
wrote:
I get an access violation, changed the code to
What is the rest of your code? access violation usually means you
didn't new the class...
I have same issue. How this help you? Catching exception does not help.
How do I catch exception and still print help message?
Dne 1. 9. 2017 8:10 odpoledne napsal uživatel "Vino.B via
Digitalmars-d-learn" :
On Friday, 1 September 2017 at 17:23:01 UTC, Jon
On Friday, 1 September 2017 at 15:24:39 UTC, Adam D. Ruppe wrote:
static foreach is now in the new release! You can now do stuff
like:
---
alias I(A...) = A;
interface Foo {
static foreach(T; I!(int, float))
void set(T t); // define virt funcs for a list
of types
}
On Friday, 1 September 2017 at 17:23:01 UTC, Jon Degenhardt wrote:
On Friday, 1 September 2017 at 13:13:39 UTC, Vino.B wrote:
Hi All,
When i run the below program without any arguments "D1.d -r"
it is throwing error, but i need it to show the help menu
[snip...]
Hi Vino,
To get good
On Friday, September 01, 2017 14:38:38 bitwise via Digitalmars-d-learn
wrote:
> When I'm using __traits(allMembers), I get a all the invisible
> functions added by the compiler as well "__ctor", "__xdtor",
> "__cpctor", etc..
>
> Is there a way to filter them out?
You can use std.meta.Filter if
On 08/31/2017 10:27 PM, Brian wrote:
> the 'real' problem is trying
> to split a huge calculation to different threads.
I still think you can take advantage of std.parallelism:
https://dlang.org/phobos/std_parallelism.html
Unfortunately, its features like asyncBuf, map, and amap do not
On Friday, 1 September 2017 at 17:26:11 UTC, ketmar wrote:
[...]
they *should* listen. anyone who doesn't just aksing for
troubles, and i see no reason to guard 'em further.
Yeah...eventually came to the same conclusion ;)
Thanks
bitwise wrote:
On Friday, 1 September 2017 at 14:38:38 UTC, bitwise wrote:
When I'm using __traits(allMembers), I get a all the invisible functions
added by the compiler as well "__ctor", "__xdtor", "__cpctor", etc..
Is there a way to filter them out?
dlang's "Lexical" page says:
On Friday, 1 September 2017 at 13:13:39 UTC, Vino.B wrote:
Hi All,
When i run the below program without any arguments "D1.d -r"
it is throwing error, but i need it to show the help menu
[snip...]
Hi Vino,
To get good error message behavior you need to put the construct
in a try-catch
static foreach is now in the new release! You can now do stuff
like:
---
alias I(A...) = A;
interface Foo {
static foreach(T; I!(int, float))
void set(T t); // define virt funcs for a list of
types
}
class Ass : Foo {
static foreach(T; I!(int, float))
On 01-09-17 10:01, Suliman wrote:
I got same problem on Windows Server 2016 and on Linux Debian 8.5.
I have few very simple backend based on vibed 0.8.1, compiler dmd 2.075.1.
nginx servise is do port forwarding. Nothing more is used.
After several days of working I am begining to get "502 Bad
It's seems that it's error in libevent on Linux. I tried to add
to dub.sdl:
versions "libasync"
and it's seems that not it's working (but I need more time to
test).
On Friday, 1 September 2017 at 14:38:38 UTC, bitwise wrote:
When I'm using __traits(allMembers), I get a all the invisible
functions added by the compiler as well "__ctor", "__xdtor",
"__cpctor", etc..
Is there a way to filter them out?
dlang's "Lexical" page says:
"Identifiers starting
When I'm using __traits(allMembers), I get a all the invisible
functions added by the compiler as well "__ctor", "__xdtor",
"__cpctor", etc..
Is there a way to filter them out?
Hi All,
When i run the below program without any arguments "D1.d -r" it
is throwing error, but i need it to show the help menu
Program:
import std.stdio;
import std.getopt;
string r;
void main (string[] args)
{
getopt(args, std.getopt.config.caseInsensitive,
On Thursday, 31 August 2017 at 23:45:01 UTC, Jonathan M Davis
wrote:
On Thursday, August 31, 2017 23:23:17 Vino via
Digitalmars-d-learn wrote:
[...]
And why would that not be valid? isValidPath and
isValidFilename are quite specific about what they think are
valid path/file names, and
On Friday, 1 September 2017 at 09:33:08 UTC, Alex wrote:
On Sunday, 27 August 2017 at 23:13:24 UTC, Moritz Maxeiner
wrote:
On Sunday, 27 August 2017 at 19:47:59 UTC, Alex wrote:
[...]
To expand on the earlier workaround: You can also adapt a
floating point to string algorithm in order to
On Friday, 1 September 2017 at 11:33:15 UTC, Biotronic wrote:
On Friday, 1 September 2017 at 10:15:09 UTC, Nicholas Wilson
wrote:
So I have the following types
struct DevicePointer(T) { T* ptr; }
struct Buffer(T)
{
void* driverObject;
T[] hostMemory;
}
and a function
auto
On Friday, 1 September 2017 at 10:15:09 UTC, Nicholas Wilson
wrote:
So I have the following types
struct DevicePointer(T) { T* ptr; }
struct Buffer(T)
{
void* driverObject;
T[] hostMemory;
}
and a function
auto enqueue(alias k)(HostArgsOf!k) { ... }
where k would be a function like
On Friday, 1 September 2017 at 10:58:51 UTC, user1234 wrote:
On Friday, 1 September 2017 at 10:15:09 UTC, Nicholas Wilson
wrote:
So I have the following types
...
i.e. it substitutes the template DevicePointer for the
template Buffer in Parameters!foo,
The templates can be assumed to not be
On Thursday, 31 August 2017 at 15:48:12 UTC, EntangledQuanta
wrote:
On Thursday, 31 August 2017 at 10:34:14 UTC, Kagamin wrote:
On Thursday, 31 August 2017 at 00:49:22 UTC, EntangledQuanta
wrote:
I've already implemented a half ass library solution.
It can be improved alot.
Then, by all
On Friday, 1 September 2017 at 10:15:09 UTC, Nicholas Wilson
wrote:
So I have the following types
...
i.e. it substitutes the template DevicePointer for the template
Buffer in Parameters!foo,
The templates can be assumed to not be nested templates, i.e.
DevicePointer!(DevicePointer!(float))
On Friday, 1 September 2017 at 08:01:24 UTC, Suliman wrote:
I got same problem on Windows Server 2016 and on Linux Debian
8.5.
I have few very simple backend based on vibed 0.8.1, compiler
dmd 2.075.1.
nginx servise is do port forwarding. Nothing more is used.
After several days of working I
On Friday, 1 September 2017 at 10:01:16 UTC, Nicholas Wilson
wrote:
b.arr refers to an `(AliasSeq!(int, double))[]`, so with
`b.arr[0] ~= 5;` you are trying to append a integer to an array
of pairs of ints and doubles, which you can't do.
b.arr[0] ~= ElementType!(typeof(b.arr))(5,42.0);
So I have the following types
struct DevicePointer(T) { T* ptr; }
struct Buffer(T)
{
void* driverObject;
T[] hostMemory;
}
and a function
auto enqueue(alias k)(HostArgsOf!k) { ... }
where k would be a function like
void foo( DevicePointer!float a, float b , int c) { ... }
How can I
On Friday, 1 September 2017 at 09:38:59 UTC, Alex wrote:
Hi all!
Say, I have
struct A(T...)
{
T arr;
}
struct B(T...)
{
T[] arr;
}
void main()
{
A!(int[], double[]) a;
a.arr[0] ~= 5;
a.arr[0] ~= 6;
static assert(!__traits(compiles, a.arr[0] ~=
Hi all!
Say, I have
struct A(T...)
{
T arr;
}
struct B(T...)
{
T[] arr;
}
void main()
{
A!(int[], double[]) a;
a.arr[0] ~= 5;
a.arr[0] ~= 6;
static assert(!__traits(compiles, a.arr[0] ~= 3.5));
a.arr[1] ~= 19.8;
On Sunday, 27 August 2017 at 23:13:24 UTC, Moritz Maxeiner wrote:
On Sunday, 27 August 2017 at 19:47:59 UTC, Alex wrote:
[...]
To expand on the earlier workaround: You can also adapt a
floating point to string algorithm in order to dynamically
determine an upper bound on the number of after
On Thursday, 31 August 2017 at 15:55:26 UTC, Stefan Koch wrote:
On Thursday, 31 August 2017 at 15:43:05 UTC, Per Nordlöw wrote:
Which allocator is best suited for allocating tree nodes (all
of equal size around 40-60 bytes in size) in one shot and then
delete them all in one go? My use case is
I got same problem on Windows Server 2016 and on Linux Debian 8.5.
I have few very simple backend based on vibed 0.8.1, compiler dmd
2.075.1.
nginx servise is do port forwarding. Nothing more is used.
After several days of working I am begining to get "502 Bad
Gateway" error. The service is
55 matches
Mail list logo