On Wednesday, 2 August 2017 at 18:06:03 UTC, H. S. Teoh wrote:
On Wed, Aug 02, 2017 at 01:15:44PM -0400, Steven Schveighoffer
via Digitalmars-d-learn wrote: [...]
The real answer is to have tail modifiers for structs, so you
can do the same thing an array does. Note that if Result is an
array,
On Tuesday, 1 August 2017 at 16:12:45 UTC, Dukc wrote:
On Tuesday, 1 August 2017 at 15:18:12 UTC, ashit wrote:
i couldn't set control's width and height (Button widget)
shows error. maybe it works a different way.
1. Try layoutHeight/width. Remember to set it for the main
widget too, not
On Wednesday, 2 August 2017 at 15:38:12 UTC, Steven Schveighoffer
wrote:
On 8/2/17 11:06 AM, Timoses wrote:
On Wednesday, 2 August 2017 at 13:51:01 UTC, Steven
Schveighoffer wrote:
However, your original code has potential as an enhancement
request, as the type is known at compile-time and
On Thursday, 3 August 2017 at 14:03:56 UTC, Michael wrote:
So this might be a bit of a stupid question, but looking at the
DMD source code (dmodule.d in particular) I see the following
code:
if (srcfile._ref == 0)
.free(srcfile.buffer);
srcfile.buffer = null;
srcfile.len = 0;
and I was
On Thursday, 3 August 2017 at 14:15:40 UTC, Temtaime wrote:
On Thursday, 3 August 2017 at 14:03:56 UTC, Michael wrote:
So this might be a bit of a stupid question, but looking at
the DMD source code (dmodule.d in particular) I see the
following code:
[...]
and I was just wondering why
I am trying to create a vectorize function that mixes in a new
version of function with the same name that applies the function
(to an ndslice).
The code below compiles without error and has the behavior I
would expect.
However, when I change the function import to a selective import
(e.g.
On Thursday, 3 August 2017 at 15:18:17 UTC, Michael wrote:
I've not seen that either, though I'm not a C++ programmer.
Does using free() on its own not assume access of a global
namespace?
Consider the following:
class Foo {
void free(void*);
void other_method() {
free(ptr); //
On Wednesday, 2 August 2017 at 12:07:46 UTC, Timoses wrote:
Hey,
wondering whether it's possible to access the derived type from
a function template in the base class or interface.
[...]
Created an enhancement issue:
https://issues.dlang.org/show_bug.cgi?id=17714
So this might be a bit of a stupid question, but looking at the
DMD source code (dmodule.d in particular) I see the following
code:
if (srcfile._ref == 0)
.free(srcfile.buffer);
srcfile.buffer = null;
srcfile.len = 0;
and I was just wondering why certain functions seem to be called
On 03-08-17 05:00, Johnson Jones wrote:
On Wednesday, 2 August 2017 at 14:51:45 UTC, Mike Wey wrote:
On 02-08-17 08:04, Johnson Jones wrote:
Ok, Using msys I was able to get glade 3.20 running. Maybe that will
fix everything.
Great, unfortunately "Use msys2" seems to be the official way to
On 8/3/17 4:30 AM, Olivier FAURE wrote:
I understand the general concept you're describing, but what exactly are
tail modifiers? It's the first time I see this name, and my google-fu
gives me nothing.
tail modifiers are modifiers that only apply to the "tail" of the type.
For example
On 03-08-17 22:40, Johnson Jones wrote:
Ok, so, I linked the gtk to the msys gtk that I installed before when
trying to get glade to work and it worked!
seems that msys is much more up to date than anything else as it just
works(I need to remember than in the future).
The problem I see is
On Thursday, 3 August 2017 at 15:11:46 UTC, Mike Wey wrote:
On 03-08-17 05:00, Johnson Jones wrote:
On Wednesday, 2 August 2017 at 14:51:45 UTC, Mike Wey wrote:
On 02-08-17 08:04, Johnson Jones wrote:
Ok, Using msys I was able to get glade 3.20 running. Maybe
that will fix everything.
On Thursday, 3 August 2017 at 19:03:55 UTC, Meta wrote:
`mixin vectorize!sin vsin; alias sin = vsin;` and see if it
Should be `alias sin = vsin.sin;`
On Thursday, 3 August 2017 at 15:11:46 UTC, Mike Wey wrote:
On 03-08-17 05:00, Johnson Jones wrote:
On Wednesday, 2 August 2017 at 14:51:45 UTC, Mike Wey wrote:
On 02-08-17 08:04, Johnson Jones wrote:
Ok, Using msys I was able to get glade 3.20 running. Maybe
that will fix everything.
On Thursday, 3 August 2017 at 15:11:46 UTC, Mike Wey wrote:
On 03-08-17 05:00, Johnson Jones wrote:
On Wednesday, 2 August 2017 at 14:51:45 UTC, Mike Wey wrote:
On 02-08-17 08:04, Johnson Jones wrote:
Ok, Using msys I was able to get glade 3.20 running. Maybe
that will fix everything.
On Thursday, 3 August 2017 at 13:12:03 UTC, Mengu wrote:
On Thursday, 3 August 2017 at 03:59:40 UTC, Johnson Jones wrote:
How can be use gtkD to load images, I assume through
gdkpixbuf? While I am getting errors loading images through
glade's image:
(test.exe:8188): Gtk-[1;33mWARNING[0m
On Thursday, 3 August 2017 at 13:12:03 UTC, Mengu wrote:
On Thursday, 3 August 2017 at 03:59:40 UTC, Johnson Jones wrote:
How can be use gtkD to load images, I assume through
gdkpixbuf? While I am getting errors loading images through
glade's image:
(test.exe:8188): Gtk-[1;33mWARNING[0m
On Thursday, 3 August 2017 at 15:29:47 UTC, jmh530 wrote:
I am trying to create a vectorize function that mixes in a new
version of function with the same name that applies the
function (to an ndslice).
The code below compiles without error and has the behavior I
would expect.
However,
On Thursday, 3 August 2017 at 19:05:47 UTC, Meta wrote:
On Thursday, 3 August 2017 at 19:03:55 UTC, Meta wrote:
`mixin vectorize!sin vsin; alias sin = vsin;` and see if it
Should be `alias sin = vsin.sin;`
Thanks, this pointed me in the right direction. I got the line
below working.
On Thursday, 3 August 2017 at 21:00:17 UTC, Mike Wey wrote:
On 03-08-17 22:40, Johnson Jones wrote:
Ok, so, I linked the gtk to the msys gtk that I installed
before when trying to get glade to work and it worked!
seems that msys is much more up to date than anything else as
it just works(I
On Thursday, 3 August 2017 at 15:29:29 UTC, Adam D. Ruppe wrote:
On Thursday, 3 August 2017 at 15:18:17 UTC, Michael wrote:
I've not seen that either, though I'm not a C++ programmer.
Does using free() on its own not assume access of a global
namespace?
Consider the following:
class Foo {
On 08/03/2017 06:02 PM, Andrew Edwards wrote:
> char *s;
That's an uninitialized C string.
> nk_color_hex_rgb(s, str);
That function is expecting it to have at least 7 chars when doing things
like
output[1] = (char)NK_TO_HEX((col.r & 0x0F));
So you have to have a proper
On 8/3/17 9:12 PM, Andrew Edwards wrote:
Andrew Edwards wrote:
int main()
{
//int wierd[4];
struct nk_color str = nk_rgba_hex("#deadbeef");
//int wierd[4];
char *s;
//int wierd[4];
nk_color_hex_rgb(s, str);
//int wierd[4];
printf("(%d,%d,%d)\n",str.r, str.g,
Also, interfaces are not linkable.
e.g., for gtk.ApplicationWindow, it inherits from gtk.Window but
I have to go back to the packages and scroll down to find
gtk.Window to see it's properties and methods. Would be nice if I
could just click on the gtk.Window and it jump me to it.
On 8/3/17 10:14 PM, Andrew Edwards wrote:
Steven Schveighoffer wrote:
On 8/3/17 9:12 PM, Andrew Edwards wrote:
Andrew Edwards wrote:
Just in case... here are the two functions being called in main():
https://github.com/vurtun/nuklear/blob/master/nuklear.h#L5695-L5722
Can you show how you
https://api.gtkd.org
It is difficult to navigate.
1. clicking the documentation on the main site takes it to the
gtk.AboutDialog api. That is all it shows, I was confused at
first, as I'm sure most people would be.
2. The packages list lists all the packages, but all the sub
elements are
Steven Schveighoffer wrote:
On 8/3/17 9:12 PM, Andrew Edwards wrote:
Andrew Edwards wrote:
Just in case... here are the two functions being called in main():
https://github.com/vurtun/nuklear/blob/master/nuklear.h#L5695-L5722
Can you show how you declared these in D? It's important. I think
Ali Çehreli wrote:
On 08/03/2017 06:02 PM, Andrew Edwards wrote:
char *s;
That's an uninitialized C string.
OK, I was is indeed the problem. I was thinking for some reason that s
gets initialized inside nk_color_hex_rgb() but it's expecting to an
array to work with. I actually
Steven Schveighoffer wrote:
On 8/3/17 10:14 PM, Andrew Edwards wrote:
I certainly can, but the problem is completely in C, I'm not having
any problems in D. In this case, I've simply copied the two functions
to test.c and inserted main().
Oh. Then Ali is correct. I assumed that char *s was
Ali Çehreli wrote:
On 08/03/2017 06:02 PM, Andrew Edwards wrote:
char *s;
That's an uninitialized C string.
OK, I was is indeed the problem. I was thinking for some reason that s
gets initialized inside nk_color_hex_rgb() but it's expecting to an
array to work with. I actually
I've made a linux program with GtkD, and so far, it's been pretty
awesome, however I'm thinking about porting it to Windows also,
but the Adwaita theme is too fugly, and cringy, so I'd want to
use a compatible theme, which is supposed to be doable.
What would be the way to go to make a GtkD
Andrew Edwards wrote:
int main()
{
//int wierd[4];
struct nk_color str = nk_rgba_hex("#deadbeef");
//int wierd[4];
char *s;
//int wierd[4];
nk_color_hex_rgb(s, str);
//int wierd[4];
printf("(%d,%d,%d)\n",str.r, str.g, str.b);
//int wierd[4];
printf("%s\n",
int main()
{
//int wierd[4];
struct nk_color str = nk_rgba_hex("#deadbeef");
//int wierd[4];
char *s;
//int wierd[4];
nk_color_hex_rgb(s, str);
//int wierd[4];
printf("(%d,%d,%d)\n",str.r, str.g, str.b);
//int wierd[4];
printf("%s\n", s);
//int
On Thursday, 3 August 2017 at 03:59:40 UTC, Johnson Jones wrote:
How can be use gtkD to load images, I assume through gdkpixbuf?
While I am getting errors loading images through glade's image:
(test.exe:8188): Gtk-[1;33mWARNING[0m **: Could not load
image 'a.jpg': Couldn't recognize the
On Thursday, 3 August 2017 at 12:24:02 UTC, data pulverizer wrote:
import std.traits: isIntegral, isNumeric;
Are you familiar with isFloatingPoint?
http://dpldocs.info/experimental-docs/std.traits.isFloatingPoint.html
if(is(T: double) && isNumeric!T)
Keep in mind that T:double here means
On Thursday, 3 August 2017 at 12:31:00 UTC, Adam D. Ruppe wrote:
On Thursday, 3 August 2017 at 12:24:02 UTC, data pulverizer
wrote:
import std.traits: isIntegral, isNumeric;
Are you familiar with isFloatingPoint?
http://dpldocs.info/experimental-docs/std.traits.isFloatingPoint.html
Dear all,
I am writing template constraints for different numeric types:
```
import std.stdio: writeln;
import std.traits: isIntegral, isNumeric;
T test(T)(T x, T y)
if(is(T: double) && isNumeric!T)
{
return x*y;
}
auto test(T)(T x, T y)
if(!is(T: double) && isNumeric!T)
{
On Thursday, 3 August 2017 at 12:24:02 UTC, data pulverizer wrote:
The same issue occurs when I try using template specializations
instead. ...
That is T test(T: double)(T x, T y){...} and T test(T)(T x, T
y){...}
Thanks
On Thursday, 3 August 2017 at 12:35:08 UTC, data pulverizer wrote:
What about this case:
```
T test(T: double)(T x, T y)
{
return x*y;
}
auto test(T)(T x, T y)
{
return 5*test!double(x, y);
}
```
which also gives:
```
int test: 4
double test: 4
```
Hmm ... it looks as the
40 matches
Mail list logo