On Thursday, 10 May 2012 at 07:32:42 UTC, Namespace wrote:
Can you explain me how TemplateThisParameter works? I read in
the
manual but a more detail explanation would help me a lot.
Hmm, I have thought following code should work about foo, but
doesn't.
import std.stdio;
struct Proxy
{
On 2012-05-11 08:24, Jonathan M Davis wrote:
On Friday, May 11, 2012 08:15:45 Jacob Carlborg wrote:
Is it supposed to change the underlying array like that? It doesn't
print the original sequence.
Yes. To remove an element, it shifts all of the elements to the right of that
element over by o
On Friday, May 11, 2012 08:15:45 Jacob Carlborg wrote:
> On 2012-05-11 05:18, Jonathan M Davis wrote:
> >> ...and got the following output:
> >>
> >>
> >> a before: [2, 4, 8, 16, 32, 64, 128]
> >> a after : [2, 4, 8, 32, 64, 128, 128]
> >> a after2: [2, 8, 32, 64, 128, 128, 128]
> >>
> >>
> >>
On 2012-05-11 05:18, Jonathan M Davis wrote:
...and got the following output:
a before: [2, 4, 8, 16, 32, 64, 128]
a after : [2, 4, 8, 32, 64, 128, 128]
a after2: [2, 8, 32, 64, 128, 128, 128]
I'm confused.
Please tell me is it normal behavior of this function or is it a
bug?
Maybe i'm doing
On Friday, 11 May 2012 at 03:18:41 UTC, Jonathan M Davis wrote:
On Friday, May 11, 2012 04:45:18 mezozoysky wrote:
Hello!
I'm noticed that something non-obvious is happening with my
code
today and i've found that the trouble somewhere close to the
removing items from the dynamic arrays e.i. cl
On Friday, May 11, 2012 04:45:18 mezozoysky wrote:
> Hello!
> I'm noticed that something non-obvious is happening with my code
> today and i've found that the trouble somewhere close to the
> removing items from the dynamic arrays e.i. close to
> std.algorithm.remove function in this case.
>
> I w
I almost forgot:
i'm using DMD 2.059 on Debian testing (AMD64).
On Friday, 11 May 2012 at 02:45:20 UTC, mezozoysky wrote:
Hello!
I'm noticed that something non-obvious is happening with my
code today and i've found that the trouble somewhere close to
the removing items from the dynamic arrays
Hello!
I'm noticed that something non-obvious is happening with my code
today and i've found that the trouble somewhere close to the
removing items from the dynamic arrays e.i. close to
std.algorithm.remove function in this case.
I wrote a little test example using this function:
module tes
Ah, I see.
I wrote a short code that detects "normal" unused variables.
"Normal" means those variables, which has built-in types. This
means, that no types created by the user/programmer will detect.
Furthermore, it doesn't detect arrays yet, but maybe there are
some people here, who would he
On Thursday, May 10, 2012 22:30:14 Namespace wrote:
> After a short search I found a post which says, that currently
> and in future no warning is shown if unused variables exist. Is
> that correct?
There is not currently any such warning, and I wouldn't expect there to ever
be one. As I understa
After a short search I found a post which says, that currently
and in future no warning is shown if unused variables exist. Is
that correct?
On 10/05/12 20:47, Dmitry Olshansky wrote:
mm I've been using this beast for ages with great success.
rdmd --main -unittest std\regex.d
may it be that -unittest should go first?
D'oh! Yup. :-\
Oops, that doesn't fix the error. Seg. faults occurs...
I think I found it!
I have modified main:
void main()
{
DerelictSDL.load();
int val = SDL_Init(SDL_INIT_EVERYTHING);
writeln(val);
SDL_Surface *screen = SDL_SetVideoMode(640, 480, 32,
SDL_SWSURFACE);
writeln("ok");
DerelictSDL
It certainly doesn't happen inside SDL_Init because "writeln()"
is shown even when the seg. fault occurs... It has to be inside
SDL_SetVideoMode.
On Thu, May 10, 2012 at 4:48 PM, Xan wrote:
> public class Algorisme(V,U...) {
>
> but when I do: https://gist.github.com/2653643
>
> I get error:
> prova_amb_tuples_a_Algorisme.d:84: Error: 'alg' is not of arithmetic type,
> it is a prova_amb_tuples_a_Algorisme.Algorisme!(int,int).Algorisme
> pr
On Thu, May 10, 2012 at 09:19:57PM +0200, Minas wrote:
> I forgot about that :p
>
> Here it is:
> Starting program:
> /home/minas/Projects/OpenGL/D_template/D_template/bin/Debug/D_template
> [Thread debugging using libthread_db enabled]
> Using host libthread_db library
> "/lib/x86_64-linux-gnu/l
I forgot about that :p
Here it is:
Starting program:
/home/minas/Projects/OpenGL/D_template/D_template/bin/Debug/D_template
[Thread debugging using libthread_db enabled]
Using host libthread_db library
"/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7fffee989700 (LWP 13351)]
[Thread
On Thu, May 10, 2012 at 09:08:04PM +0200, Minas wrote:
> Well, my code is really simple, compiles and runs fine.
>
> [code]
[...]
> [/code]
>
> But sometimes (at about 3-5 runs), I get a segmentation fault!
>
> 0
> bash: line 1: 12951 Segmentation fault (core dumped)
> /home/minas/Projects
Well, my code is really simple, compiles and runs fine.
[code]
import std.stdio;
import derelict.sdl.sdl;
void main()
{
DerelictSDL.load();
int val = SDL_Init(SDL_INIT_EVERYTHING);
writeln(val);
SDL_Surface *screen = SDL_SetVideoMode(640, 480, 32,
SDL
On Thu, May 10, 2012 at 09:00:02PM +0200, Minas wrote:
> I figured it out, this is the correct:
>
> -L-L/usr/lib/Derelict2 -L-lDerelictSDL -L-lDerelictUtil -L-ldl
>
> I don't know why, but the dl library is needed. Thank you for your
> help.
This is most likely because Derelict uses dynamic load
I figured it out, this is the correct:
-L-L/usr/lib/Derelict2 -L-lDerelictSDL -L-lDerelictUtil -L-ldl
I don't know why, but the dl library is needed. Thank you for
your help.
On 10.05.2012 22:11, Joseph Rushton Wakeling wrote:
On 10/05/12 19:33, Jesse Phillips wrote:
rdmd --main mymod.d -unittest
... on second thoughts, that doesn't seem to work. I tested by putting
in place a guaranteed-fail unittest; no result. :-(
mm I've been using this beast for ages with g
On 10/05/12 19:33, Jesse Phillips wrote:
rdmd --main mymod.d -unittest
... on second thoughts, that doesn't seem to work. I tested by putting in place
a guaranteed-fail unittest; no result. :-(
On 10/05/12 19:33, Jesse Phillips wrote:
rdmd --main mymod.d -unittest
Thanks muchly. :-)
On Thursday, May 10, 2012 10:14:12 H. S. Teoh wrote:
> On Thu, May 10, 2012 at 07:05:27PM +0200, Christian Köstlin wrote:
> > On 05/10/2012 06:21 PM, Joseph Rushton Wakeling wrote:
> > >Hello all,
> > >
> > >Is there any way to specify individual Phobos modules to unittest when
> > >building, inste
On Thursday, 10 May 2012 at 16:22:11 UTC, Joseph Rushton Wakeling
wrote:
Hello all,
Is there any way to specify individual Phobos modules to
unittest when building, instead of having to do the whole lot?
When working on 1 single module, it'd be nice to be able to
unittest that one alone and
sorry ... i did not get this, as i never have developed phobos.
On 05/10/2012 06:47 PM, Jacob Carlborg wrote:
On 2012-05-10 17:39, Christian Köstlin wrote:
ok .. sure you can use them by the way of InnerClasses, but you cannot
use them directly anymore, which was one motivation to extract them from
InnerClasses.
Ah, I missed that. But one mixin isn't that
On Thu, May 10, 2012 at 07:05:27PM +0200, Christian Köstlin wrote:
> On 05/10/2012 06:21 PM, Joseph Rushton Wakeling wrote:
> >Hello all,
> >
> >Is there any way to specify individual Phobos modules to unittest when
> >building, instead of having to do the whole lot?
> >
> >When working on 1 single
On 05/10/2012 06:21 PM, Joseph Rushton Wakeling wrote:
Hello all,
Is there any way to specify individual Phobos modules to unittest when
building, instead of having to do the whole lot?
When working on 1 single module, it'd be nice to be able to unittest
that one alone and not have to worry abo
On 2012-05-10 17:39, Christian Köstlin wrote:
ok .. sure you can use them by the way of InnerClasses, but you cannot
use them directly anymore, which was one motivation to extract them from
InnerClasses.
Ah, I missed that. But one mixin isn't that bad? Or do you want to place
them in several
On Thursday, 10 May 2012 at 11:11:14 UTC, Jacob Carlborg wrote:
On 2012-05-10 09:09, F i L wrote:
Is it possible?
I get a message "rt_loadLibrary() not supported on Posix" when
I try. Is
there something I'm doing wrong or is loading shared libraries
not
supported at all on Linux systems?
th
Hello all,
Is there any way to specify individual Phobos modules to unittest when building,
instead of having to do the whole lot?
When working on 1 single module, it'd be nice to be able to unittest that one
alone and not have to worry about doing the complete set of tests until ready to
pu
On 05/10/2012 02:13 PM, Jacob Carlborg wrote:
On 2012-05-10 13:41, Christian Köstlin wrote:
thank for your answer,
yes .. that could possibly work, but would still force me to add all the
mixins to the main class. in addition to that i could not longer use the
mixin-classes standalone (i would
Hi,
I have this code: https://gist.github.com/2653620
and I want to change
public class Algorisme(U,V) {
to
public class Algorisme(V,U...) {
but when I do: https://gist.github.com/2653643
I get error:
prova_amb_tuples_a_Algorisme.d:84: Error: 'alg' is not of
arithmetic type, it is a
prova_a
On 2012-05-10 15:21, Minas wrote:
$ dmd icy.d /usr/lib/Derelict3/DerelictSDL2
This doesn't because dmd thinks that I'm talking about a .d file.
Hmm, that wasn't quite right, try this:
$ dmd icy.d /usr/lib/Derelict3/libDerelictSDL2.a
(Or whatever the full path to the library is)
--
/Jacob C
On Thursday, 10 May 2012 at 13:14:36 UTC, Jacob Carlborg wrote:
On 2012-05-10 14:55, Minas wrote:
I have a static library (libDerelictSDL2.a) in
/usr/lib/Derelict3. What
I want to to is just link to that. My code does not use
anything from it.
My .d file is icy.d.
I try to compile using:
a)
On 2012-05-10 14:55, Minas wrote:
I have a static library (libDerelictSDL2.a) in /usr/lib/Derelict3. What
I want to to is just link to that. My code does not use anything from it.
My .d file is icy.d.
I try to compile using:
a) dmd icy.d -I/usr/lib/Derelict3 -L-lDerelictSDL2
b) dmd icy.d -L-I/
I have a static library (libDerelictSDL2.a) in
/usr/lib/Derelict3. What I want to to is just link to that. My
code does not use anything from it.
My .d file is icy.d.
I try to compile using:
a) dmd icy.d -I/usr/lib/Derelict3 -L-lDerelictSDL2
b) dmd icy.d -L-I/usr/lib/Derelict3 -L-lDerelictSDL
Looks like it infers the declaring type's modifiers.
On Thursday, 10 May 2012 at 11:42:44 UTC, sclytrack wrote:
On 05/10/2012 01:12 PM, Andrea Fontana wrote:
I can't understand which is the right way to share MyClass
thru threads.
MyClass performs a lot of operation during init (it has to
parse a lot
of data). After this long init, it runs very
On 2012-05-10 13:41, Christian Köstlin wrote:
thank for your answer,
yes .. that could possibly work, but would still force me to add all the
mixins to the main class. in addition to that i could not longer use the
mixin-classes standalone (i would have to mixin them into the place i
want to us
On 05/10/2012 01:12 PM, Andrea Fontana wrote:
I can't understand which is the right way to share MyClass thru threads.
MyClass performs a lot of operation during init (it has to parse a lot
of data). After this long init, it runs very fast operations so I want
to build it just one time and use i
On 05/09/2012 10:48 PM, Jacob Carlborg wrote:
Perhaps you can use template mixins (untested).
class Test (T)
{
mixin InnerClasses!(T);
}
template InnerClasses (T)
{
static class Inner1 : Test!(T) {}
// ... and so on
}
thank for your answer,
yes .. that could possibly work, but would still fo
I can't understand which is the right way to share MyClass thru
threads.
MyClass performs a lot of operation during init (it has to parse
a lot of data). After this long init, it runs very fast
operations so I want to build it just one time and use it on
different threads.
Declaring it as a
On 2012-05-10 09:09, F i L wrote:
Is it possible?
I get a message "rt_loadLibrary() not supported on Posix" when I try. Is
there something I'm doing wrong or is loading shared libraries not
supported at all on Linux systems?
thanks.
No, not using "rt_loadLibrary". You can still use the good o
Can you explain me how TemplateThisParameter works? I read in the
manual but a more detail explanation would help me a lot.
As for mysqln, I merged jrogers patches and changed uint to
size_t so it compiles on x64.
You can look at it here:
https://github.com/simendsjo/mysqln/tree/compile-on-recent-dmd
It hasn't been tested beyond connecting to the database and
fetching metadata yet.
And my repository will go away ve
I should not I've only tried with DMD (so far). I'll try with LDC
and GDC in the morning.
Is it possible?
I get a message "rt_loadLibrary() not supported on Posix" when I
try. Is there something I'm doing wrong or is loading shared
libraries not supported at all on Linux systems?
thanks.
51 matches
Mail list logo