Re: D 1.076 Alpha for Windows 64 bits, works with VS 2010
On Sat, 06 Oct 2012 11:38:43 -0700 Walter Bright wrote: > On 9/30/2012 9:35 PM, Andrej Mitrovic wrote: > > On 10/1/12, Walter Bright wrote: > >> Also, consider that in C++ you can throw any type, such as an int. > >> There is no credible way to make this work reasonably in D, as > >> exceptions are all derived from Exception. > > > > Is that a bug or a feature? :) > > > It's a feature, and I'm not joking. > > What is the compelling use case for throwing an int? How could that > possibly fit into some encapsulation model? What if library A throws > an int, and library B does? Now you catch an int - which did it come > from? You've got no clue. It's indistinguishable from garbage. > And it's not just int's either. Having to deal with code possibly, or actually, throwing any type that isn't a proper Exception type is a pain in the ass.
Re: D 1.076 Alpha for Windows 64 bits, works with VS 2010
On 9/30/2012 9:35 PM, Andrej Mitrovic wrote: On 10/1/12, Walter Bright wrote: Also, consider that in C++ you can throw any type, such as an int. There is no credible way to make this work reasonably in D, as exceptions are all derived from Exception. Is that a bug or a feature? :) It's a feature, and I'm not joking. What is the compelling use case for throwing an int? How could that possibly fit into some encapsulation model? What if library A throws an int, and library B does? Now you catch an int - which did it come from? You've got no clue. It's indistinguishable from garbage.
Re: GtkD 2.0 released, Gtk+ 3 with D.
On 10/6/12, Jordi Sayol wrote: > BTW. What's the right way to add "-L C:/D/dmd2/windows/lib/GtkD.lib" to > "sc.ini" file? If you put that library in that folder there's a good change it will end up missing when installing/reinstalling DMD. Put it somewhere outside and use the -L+ switch when invoking DMD: dmd -L+C:\path\to\gtkdlib\ GtkD.lib app.d
Re: GtkD 2.0 released, Gtk+ 3 with D.
Al 04/10/12 02:32, En/na Tommi ha escrit: > On Wednesday, 26 September 2012 at 18:48:41 UTC, Mike James wrote: >> I tried the install detailed on the github page and got the following error: >> >> >> C:\D\dmd2\gtkD2\src>dgen >> build\gtkD.d(612): Error: module SourceBuffer is in file >> 'gsv\SourceBuffer.d' wh >> ich cannot be read >> import path[0] = C:\D\dmd2\windows\bin\..\..\src\phobos >> import path[1] = C:\D\dmd2\windows\bin\..\..\src\druntime\import > > > Using those same instructions... > https://github.com/gtkd-developers/GtkD/wiki/Installing-on-Windows > ...I only manage to get this error (after ~10 seconds): > > D:\Documents\GitHub\GtkD\src>dgen.exe > Fatal Error: Out of memory > > Even though Task Manager shows only negligible increase in memory. > I got the same error in wine: "Fatal Error: Out of memory" I override it by compiling first to object files and then building the library: dgen.d: import std.path; import std.file; import std.process; void main() { std.file.write("build.rf", listFiles(".d")); system("dmd -c -op @build.rf"); std.file.write("build.rf", listFiles(".obj")); system("dmd -lib -ofGtkD @build.rf"); std.file.remove("build.rf"); } string listFiles(string file_ext) { string files; auto entries = dirEntries("src", SpanMode.breadth); foreach(DirEntry entry; entries) { if(entry.isDir == false && entry.name.extension == file_ext) { files ~= entry.name ~ " "; } } return files; } Compiling and executing from GtkD root directory. Now "GtkD.lib" is generated, and properly compiles gtkd programs: $ wine dmd.exe -L C:/D/dmd2/windows/lib/GtkD.lib HelloWorld.d BTW. What's the right way to add "-L C:/D/dmd2/windows/lib/GtkD.lib" to "sc.ini" file? Regards, -- Jordi Sayol
Re: GtkD 2.0 released, Gtk+ 3 with D.
On 10/04/2012 02:32 AM, Tommi wrote: On Wednesday, 26 September 2012 at 18:48:41 UTC, Mike James wrote: I tried the install detailed on the github page and got the following error: C:\D\dmd2\gtkD2\src>dgen build\gtkD.d(612): Error: module SourceBuffer is in file 'gsv\SourceBuffer.d' wh ich cannot be read import path[0] = C:\D\dmd2\windows\bin\..\..\src\phobos import path[1] = C:\D\dmd2\windows\bin\..\..\src\druntime\import Using those same instructions... https://github.com/gtkd-developers/GtkD/wiki/Installing-on-Windows ...I only manage to get this error (after ~10 seconds): D:\Documents\GitHub\GtkD\src>dgen.exe Fatal Error: Out of memory Even though Task Manager shows only negligible increase in memory. I seems that dmd runs out of memory when using the -lib switch with GtkD. I've updated the script posted on the wiki. -- Mike Wey
Re: GtkD 2.0 released, Gtk+ 3 with D.
On Thursday, 4 October 2012 at 21:25:09 UTC, Mike Wey wrote: On 10/04/2012 01:05 PM, JN wrote: Why does a Windows version require building anyway? Building stuff is for Linux people, because they love to hunt dependencies and stuff. On Windows you should be able to unzip an archive or use an installer and have two directories - include files and compiled .lib/.a/.dll libraries ready to include into your project. Trying to avoid it is just trouble, it takes a lot of time to compile any D library and even GDC has no binary releases, so that's another time spent on hunting libs. The library usually needs to be rebuild when there is e new conpiler release, And a library build with one D compiler cant be used with any of the other compilers. Yea it's damn PITA
glfw bindings added to Deimos by Dav1dde
https://github.com/D-Programming-Deimos/glfw "GLFW is a free, Open Source, multi-platform library for opening a window, creating an OpenGL context and managing input. It is easy to integrate into existing applications and does not lay claim to the main loop. GLFW is written in C and has native support for Windows, Mac OS X and many Unix-like systems using the X Window System, such as Linux and FreeBSD. GLFW is licensed under the zlib/libpng license."