Re: A GUI library to begin with

2012-02-09 Thread Jacob Carlborg
On 2012-02-09 21:27, Damian Ziemba wrote: Ach, and there is plugin for Windows Gtk+ runtime called WIMP which emulates Windows Native look, so situation with GtkD isn't so bad on Linux/FreeBSD and Windows. I guess the biggest problem is da Mac OSX platform. Monodevelop looks so f**cking ugly on

Re: A GUI library to begin with

2012-02-09 Thread Jacob Carlborg
On 2012-02-09 21:25, Damian Ziemba wrote: On Wednesday, 8 February 2012 at 03:55:41 UTC, Mr. Anonymous wrote: Hello, I want to start playing with D, and I'm looking at a GUI library to begin with. From what I see here: http://www.prowiki.org/wiki4d/wiki.cgi?GuiLibraries I have four choices: Gtk

Re: Compiler error with static vars/functions

2012-02-09 Thread Mike Parker
On 2/10/2012 6:42 AM, Oliver Plow wrote: Thanks for the answer. This means that all classes belonging to the same module must be in the same *.d file? I mean not one *.d file per class as in most languages? Regards, Oliver Actually, yes. You can't have two modules of the same name. In D, '

Re: Compiler error with static vars/functions

2012-02-09 Thread Mike Parker
On 2/10/2012 1:00 PM, Mike Parker wrote: On 2/10/2012 6:42 AM, Oliver Plow wrote: Thanks for the answer. This means that all classes belonging to the same module must be in the same *.d file? I mean not one *.d file per class as in most languages? Regards, Oliver Actually, yes. You can't hav

Re: Socket: The connection was reset

2012-02-09 Thread DNewbie
Try this while(true) { Socket cs = s.accept(); cs.receive(new byte[1024]); cs.sendTo("HTTP/1.1 200 OK\r\nContent-Length: 11\r\n\r\nHello World"); cs.close(); } On Thu, Feb 9, 2012, at 07:31 PM, Nrgyzer wrote: > Hi

Re: DLL Injection

2012-02-09 Thread maarten van damme
does it ever go past the cast point? what happens when you try{}catch and print the error out? I've injected but with writeprocessmemory.

Re: Compiler error with static vars/functions

2012-02-09 Thread Jonathan M Davis
On Thursday, February 09, 2012 22:42:17 Oliver Plow wrote: > Thanks for the answer. This means that all classes belonging to the same > module must be in the same *.d file? I mean not one *.d file per class as > in most languages? There is no connection between modules and classes other than the f

Re: Compiler error with static vars/functions

2012-02-09 Thread Jonathan M Davis
On Thursday, February 09, 2012 14:45:43 bearophile wrote: > Jonathan M Davis: > > Normally, it's considered good practice to give modules names which are > > all lowercase (particularly since some OSes aren't case-sensitive for > > file operations). > > That's just a fragile work-around for a modu

Re: Compiler error with static vars/functions

2012-02-09 Thread Oliver Plow
Thanks for the answer. This means that all classes belonging to the same module must be in the same *.d file? I mean not one *.d file per class as in most languages? Regards, Oliver Original-Nachricht > Datum: Thu, 09 Feb 2012 14:18:07 -0500 > Von: "Jonathan M Davis" > An: "

Re: A GUI library to begin with

2012-02-09 Thread maarten van damme
I used gtkd, it worked perfectly. only downside is it isn't native on windows.

Re: A GUI library to begin with

2012-02-09 Thread Jordi Sayol
Al 09/02/12 21:25, En/na Damian Ziemba ha escrit: > > GtkD seems to be the most mature and production ready for D. > Although indeed, Gtk+ (and then GtkD) suffers from its lack of Native > controls. > > The best solution would be QtD, but it looks like its abandoned. QtJambi > isn't officially

Re: Arrays - Inserting and moving data

2012-02-09 Thread MattCodr
On Thursday, 9 February 2012 at 19:49:43 UTC, Timon Gehr wrote: Note that this code does the same, but is more efficient if you don't actually need the array: Yes I know, In fact I need re-think the way I code with this new features of D, like ranges for example. Thanks, Matheus.

Re: A GUI library to begin with

2012-02-09 Thread Damian Ziemba
Ach, and there is plugin for Windows Gtk+ runtime called WIMP which emulates Windows Native look, so situation with GtkD isn't so bad on Linux/FreeBSD and Windows. I guess the biggest problem is da Mac OSX platform. Monodevelop looks so f**cking ugly on Mac :D

Re: A GUI library to begin with

2012-02-09 Thread Damian Ziemba
On Wednesday, 8 February 2012 at 03:55:41 UTC, Mr. Anonymous wrote: Hello, I want to start playing with D, and I'm looking at a GUI library to begin with. From what I see here: http://www.prowiki.org/wiki4d/wiki.cgi?GuiLibraries I have four choices: GtkD, DWT, DFL, DGui. Has anyone tried thes

Re: Compiler error with static vars/functions

2012-02-09 Thread bearophile
> I'll take a look in Bugzilla if there is already something on this. Nevermind. Bye, bearophile

Re: A GUI library to begin with

2012-02-09 Thread Denis Shelomovskij
08.02.2012 7:55, Mr. Anonymous пишет: Why does GTK suck (I read that a couple of times). GtkD (+OpenGL) worked stable in my rather big D1+Tango project 2 years ago (and do it now). Looks like it has lots of memory leaks (in almost every function call) but it didn't lead to crash after few hou

Re: Arrays - Inserting and moving data

2012-02-09 Thread Timon Gehr
On 02/09/2012 08:20 PM, MattCodr wrote: On Thursday, 9 February 2012 at 18:30:22 UTC, Ali Çehreli wrote: On 02/09/2012 03:47 AM, MattCodr wrote: I have a doubt about the best way to insert and move (not replace) some data on an array. For example, In some cases if I want to do action above, I

Re: Compiler error with static vars/functions

2012-02-09 Thread bearophile
Jonathan M Davis: > Normally, it's considered good practice to give modules names which are all > lowercase (particularly since some OSes aren't case-sensitive for file > operations). That's just a fragile work-around for a module system design problem that I didn't like from the first day I've

Socket: The connection was reset

2012-02-09 Thread Nrgyzer
Hi guys, I wrote the following few lines: private { import std.socket; } void main() { Socket s = new TcpSocket(); s.bind(new InternetAddress(80)); s.listen(0); while(true) { Socket cs = s.accept(); cs.sendTo("HTTP/1.1

Re: Arrays - Inserting and moving data

2012-02-09 Thread Ali Çehreli
On 02/09/2012 11:03 AM, H. S. Teoh wrote: > On Thu, Feb 09, 2012 at 10:30:22AM -0800, Ali Çehreli wrote: > [...] >> But if you don't actually want to modify the data, you can merely >> access the elements in-place by std.range.chain: >> >> import std.stdio; >> import std.range; >> >> void main() >

Re: Arrays - Inserting and moving data

2012-02-09 Thread MattCodr
On Thursday, 9 February 2012 at 18:30:22 UTC, Ali Çehreli wrote: On 02/09/2012 03:47 AM, MattCodr wrote: I have a doubt about the best way to insert and move (not replace) some data on an array. For example, In some cases if I want to do action above, I do a loop moving the data until the po

Re: Compiler error with static vars/functions

2012-02-09 Thread simendsjo
On 02/09/2012 02:57 PM, Oliver Plow wrote: Hello, I'm fighting with a strange compiler error. This here compiles and runs fine: -- main.d - class Foo { static int z = 4; static int bar() { return 6; } int foobar() { return 7; } } int main(string[] argv) {

Re: Compiler error with static vars/functions

2012-02-09 Thread Jonathan M Davis
On Thursday, February 09, 2012 14:57:08 Oliver Plow wrote: > Hello, > > I'm fighting with a strange compiler error. This here compiles and runs > fine: > [snip] > > This is a bit strange for me. Apparently, must be some kind of import > problem importing Foo. But I don't see how ... It's because

Compiler error with static vars/functions

2012-02-09 Thread Oliver Plow
Hello, I'm fighting with a strange compiler error. This here compiles and runs fine: -- main.d - class Foo { static int z = 4; static int bar() { return 6; } int foobar() { return 7; } } int main(string[] argv) { writeln(Foo.z); writeln(Foo.bar()); // pro

Re: Arrays - Inserting and moving data

2012-02-09 Thread H. S. Teoh
On Thu, Feb 09, 2012 at 10:30:22AM -0800, Ali Çehreli wrote: [...] > But if you don't actually want to modify the data, you can merely > access the elements in-place by std.range.chain: > > import std.stdio; > import std.range; > > void main() > { > int[] arr = [0,1,2,3,4,5,6,7,8,9]; > im

Re: A GUI library to begin with

2012-02-09 Thread Zachary Lund
On Wednesday, 8 February 2012 at 22:21:35 UTC, AaronP wrote: On 02/08/2012 09:24 AM, Jesse Phillips wrote: I think GtkD is stated to suck because it isn't native to Windows or Mac, both in look and availability. Hmm, perhaps. Incidentally, it looks great on Linux! :P GTK+ was created for G

Re: Arrays - Inserting and moving data

2012-02-09 Thread Ali Çehreli
On 02/09/2012 03:47 AM, MattCodr wrote: I have a doubt about the best way to insert and move (not replace) some data on an array. For example, In some cases if I want to do action above, I do a loop moving the data until the point that I want and finally I insert the new data there. In D I di

Re: Makefile, compilation and linkage

2012-02-09 Thread Jacob Carlborg
On 2012-02-09 14:47, Pedro Lacerda wrote: Hi all, My directory tree: proj/ ├── Makefile ├── bin/ ├── C/ │ └── ev.h ├── deimos/ │ └── ev.d └── proj/ └── main.d In my makefile I want: * compile deimos/ev.d * compile proj/main.d * link all together in bin/ Do you have some sugest

Re: Arrays - Inserting and moving data

2012-02-09 Thread MattCodr
On Thursday, 9 February 2012 at 12:51:09 UTC, Pedro Lacerda wrote: I __believe__ that insertInPlace doesn't shift the elements, Yes, It appears that it really doesn't shift the array, insertInPlace just returns a new array with a new element in n position. Maybe this function do what you

Re: Arrays - Inserting and moving data

2012-02-09 Thread Pedro Lacerda
I __believe__ that insertInPlace doesn't shift the elements, but use an appender allocating another array instead. Maybe this function do what you want. int[] arr = [0,1,2,3,4,5,6,7,8,9]; void maybe(T)(T[] arr, size_t pos, T value) { size_t i; for (i = arr.length - 1; i >

Arrays - Inserting and moving data

2012-02-09 Thread MattCodr
I have a doubt about the best way to insert and move (not replace) some data on an array. For example, In some cases if I want to do action above, I do a loop moving the data until the point that I want and finally I insert the new data there. In D I did this: begin code . . . int[] ar

Re: D at work

2012-02-09 Thread Pedro Lacerda
> > DVM is great for this: https://bitbucket.org/doob/dvm DVM sounds well, thanks! As for use cases, command line is a good bet. I suggest starting with > something that has a clear scope and isn't chosen based on a marketing > feature. For example if you're going to build a server of some sor