Re: Programming Windows D Examples are now Online!

2011-07-09 Thread Mike Parker
On 7/9/2011 5:43 AM, Steven Schveighoffer wrote: On Fri, 08 Jul 2011 16:02:39 -0400, Johannes Pfau s...@example.com wrote: Steven Schveighoffer wrote: On Fri, 08 Jul 2011 15:39:22 -0400, Johannes Pfau s...@example.com wrote: Andrej Mitrovic wrote: What's the license on the bindings? Have

Re: D programming language specification ebook

2011-07-09 Thread Andrei Alexandrescu
On 7/8/11 9:20 PM, Walter Bright wrote: On 7/8/2011 8:58 PM, Russel Winder wrote: Is there a PDF of this? The URL http://www.digitalmars.com/d/2.0/ has a link to a PDF page http://www.prowiki.org/wiki4d/wiki.cgi?LanguageSpecification/PDFArchive which has a circualr reference back to the Digital

Re: D programming language specification ebook

2011-07-09 Thread Walter Bright
On 7/9/2011 12:05 AM, Andrei Alexandrescu wrote: I don't think the current approach to generating PDFs is good - it's essentially using a bridge for generating PDF from HTML. What we need is a set of macros to generate TeX from ddoc followed by compilation. That will produce beautiful PDF

Re: D programming language specification ebook

2011-07-09 Thread Russel Winder
On Sat, 2011-07-09 at 06:59 +0200, Jordi Sayol wrote: [ . . . ] 'fbreader' properly handle 'dlangspec.mobi' on Ubuntu 11.04 I loaded fbreader on Debian Testing and it can read the file -- not sure it is properly though, there seems to be a lot of formatting missing. -- Russel.

Re: D programming language specification ebook

2011-07-09 Thread Russel Winder
On Fri, 2011-07-08 at 22:36 -0700, Walter Bright wrote: [ . . . ] I understand, and I'll see about generating a pdf. Thanks. However, although the e-readers can read pdf's, they do so very badly, because pdf's are designed for 8*11.5 paper, and will not reflow the text for the smaller

Re: D programming language specification ebook

2011-07-09 Thread Russel Winder
On Sat, 2011-07-09 at 00:24 -0700, Walter Bright wrote: On 7/9/2011 12:05 AM, Andrei Alexandrescu wrote: I don't think the current approach to generating PDFs is good - it's essentially using a bridge for generating PDF from HTML. What we need is a set of macros to generate TeX from

Re: D programming language specification ebook

2011-07-09 Thread Thomas Mader
Very nice! Maybe it is also possible that you create an epub. It is the most widley used ebook format and it seems to be possible to genarate the kindle format out of it. See: http://en.wikipedia.org/wiki/Comparison_of_e-book_formats#IDPF.2FEPUB I would go for epub since it is the most widley

Re: D programming language specification ebook

2011-07-09 Thread Andrew Wiley
On Sat, Jul 9, 2011 at 1:01 AM, Russel Winder rus...@russel.org.uk wrote: On Fri, 2011-07-08 at 22:36 -0700, Walter Bright wrote: [ . . . ] I understand, and I'll see about generating a pdf. Thanks. However, although the e-readers can read pdf's, they do so very badly, because pdf's

Re: D programming language specification ebook

2011-07-09 Thread Thomas Mader
Am 09.07.2011 07:13 schrieb Russel Winder rus...@russel.org.uk: (It appears that Go now assumes you have 100% connectivity to the Internet 100% of the time both for execution and development :-( Please tell more about this or give some references I am very interested.

Re: Programming Windows D Examples are now Online!

2011-07-09 Thread Johannes Pfau
Andrej Mitrovic wrote: Using std.c.windows.windows is going to be problematic because the WindowsAPI bindings have a void* handle typedef, and std.c.windows.windows has the same typedef. If your library has this function: foo(HDC hdc) { } I can't use it from my code if I use the WindowsAPI

Re: D programming language specification ebook

2011-07-09 Thread Jacob Carlborg
On 2011-07-09 07:36, Walter Bright wrote: On 7/8/2011 10:12 PM, Russel Winder wrote: Whilst e-books and tablets may be the current fashion, PDF is still the most portable document distribution format. It would be good if PDFs were made and released -- especially for those of us who do most of

Re: D programming language specification ebook

2011-07-09 Thread Jordi Sayol
Al 09/07/11 09:55, En/na Russel Winder ha escrit: I loaded fbreader on Debian Testing and it can read the file -- not sure it is properly though, there seems to be a lot of formatting missing. You're right. Many format messing wen open with fbreader. As Andrew Wiley said, calibre's viewer

Re: D programming language specification ebook

2011-07-09 Thread Tyro[a.c.edwards]
On 7/9/2011 11:30 AM, Walter Bright wrote: Here's a binary of it. Try it out on your ebook reader! http://digitalmars.com/d/2.0/dlangspec.mobi Awesome... But I'm using an iPad and don't plan on using the kindle software because requires me to open an account with Amazon -- Not interested.

Re: Programming Windows D Examples are now Online!

2011-07-09 Thread Andrej Mitrovic
On 7/9/11, Johannes Pfau s...@example.com wrote: //Use Andrej Mitrovic's API from //https://github.com/AndrejMitrovic/DWindowsProgramming/tree/master/win32 version(EXT_WIN32_BINDINGS) { import win32.windef; import win32.wingdi; } That's not my API, it's from this project:

Re: Programming Windows D Examples are now Online!

2011-07-09 Thread Andrej Mitrovic
I'll see about contributing to your project in some way. I'm interested in how Cairo's new opengl backend operates, animation works somewhat ok with a win32 backend but it seems to quickly eat up performance (that could be my mistake though). I'll give a shot at using the cairo opengl backend via

Re: Programming Windows D Examples are now Online!

2011-07-09 Thread Sean Kelly
The docs on the Boost license say as much as well, and derive from legal consult. I must say that after reading this I felt a lot better about the headers I've implemented. Sent from my iPhone On Jul 9, 2011, at 1:56 AM, Mike Parker aldac...@gmail.com wrote: On 7/9/2011 5:43 AM, Steven

Re: D programming language specification ebook

2011-07-09 Thread Nick Sabalausky
Russel Winder rus...@russel.org.uk wrote in message news:mailman.1487.1310188380.14074.digitalmars-d-annou...@puremagic.com... (It appears that Go now assumes you have 100% connectivity to the Internet 100% of the time both for execution and development :-( About what I'd expect from the #1

Re: Programming Windows D Examples are now Online!

2011-07-09 Thread Johannes Pfau
Andrej Mitrovic wrote: On 7/9/11, Johannes Pfau s...@example.com wrote: //Use Andrej Mitrovic's API from //https://github.com/AndrejMitrovic/DWindowsProgramming/tree/master/win32 version(EXT_WIN32_BINDINGS) { import win32.windef; import win32.wingdi; } That's not my API, it's from

Re: Programming Windows D Examples are now Online!

2011-07-09 Thread Johannes Pfau
Andrej Mitrovic wrote: I'll see about contributing to your project in some way. I'm interested in how Cairo's new opengl backend operates, animation works somewhat ok with a win32 backend but it seems to quickly eat up performance (that could be my mistake though). I'll give a shot at using the

Re: Programming Windows D Examples are now Online!

2011-07-09 Thread Andrej Mitrovic
On 7/9/11, Johannes Pfau s...@example.com wrote: I'm not sure if cairo's win32 backend uses some kind of acceleration? http://cairographics.org/threaded_animation_with_cairo/ talks about performance animations, it's quite gtk specific, but maybe there's some useful information in there. I'm

Re: D programming language Chat

2011-07-09 Thread Bernard Helyer
On Tue, 05 Jul 2011 18:58:57 +0200, Andrej Mitrovic wrote: Will the chan op `set mode -v` me every time I say something offtopic? Screw SO with their stupid game mechanics. We're very informal in #d. Come on in, we try to be friendly! :D

Re: Programming Windows D Examples are now Online!

2011-07-09 Thread Sean Cavanaugh
On 6/21/2011 1:08 AM, Brad Anderson wrote: On Mon, Jun 20, 2011 at 10:14 PM, Andrej Mitrovic andrej.mitrov...@gmail.com mailto:andrej.mitrov...@gmail.com wrote: This is a translation project of Charles Petzold's Programming Windows (5th edition) book code samples. Currently over

Re: DPortMidi - D bindings for the PortMidi MIDI I/O library

2011-07-09 Thread Andrej Mitrovic
So I've added a Cairo Win32 example of capturing MIDI controller changes and painting envelopes on the screen. The data is captured in real-time but the drawing is done based on a timer. The source code is very oddball for sure, but it kinda works, so hey.. :P A screenshot:

Re: Lock-Free Actor-Based Flow Programming in D2 for GSOC2011?

2011-07-09 Thread Piotr Szturmaj
eris wrote: I used the Tango Fibers implementation (thanks Sean Kelly I believe) and various reactor libraries to implement the actor engine. I'm working on something similar, e.g. event-driven programming using fibers. I need it for my upcoming network library. But I don't use queue for

Re: druntime

2011-07-09 Thread Jacob Carlborg
On 2011-07-09 01:29, Iain Buclaw wrote: == Quote from Brad Roberts (bra...@slice-2.puremagic.com)'s article On Fri, 8 Jul 2011, Iain Buclaw wrote: == Quote from Jonathan M Davis (jmdavisp...@gmx.com)'s article On 2011-07-08 10:42, bioinfornatics wrote: @sean if you install ldc2 like: $ cmake

Re: Instructions for dmd installation on youtube

2011-07-09 Thread Jacob Carlborg
On 2011-07-08 21:26, Andrei Alexandrescu wrote: http://www.youtube.com/watch?v=AaSBma22gNA Andrei https://bitbucket.org/doob/dvm . Hopefully I'll release a new version, with windows support, at the end of next week. -- /Jacob Carlborg

Re: Pure higher order functions

2011-07-09 Thread bearophile
Seeing the recent large amount of pull requests I am seeing, is someone willing to implement this type system feature? yebblies delivers, quickly too :-) http://d.puremagic.com/issues/show_bug.cgi?id=5081 https://github.com/D-Programming-Language/dmd/pull/218 At this rhythm of improvements

Re: druntime

2011-07-09 Thread Sean Kelly
From having done this with Tango, a lot of the divergence was with detection compiler to use/not use compiler intrinsics, plus some issues where parts of stdc weren't implemented. If there are other compatibility issues outside rt I'd like to know what they are. I'd certainly be amenable to

Re: Lock-Free Actor-Based Flow Programming in D2 for GSOC2011?

2011-07-09 Thread nonexistent
Piotr Szturmaj Wrote: eris wrote: I used the Tango Fibers implementation (thanks Sean Kelly I believe) and various reactor libraries to implement the actor engine. I'm working on something similar, e.g. event-driven programming using fibers. I need it for my upcoming network library.

Re: Pure higher order functions

2011-07-09 Thread Daniel Murphy
bearophile bearophileh...@lycos.com wrote in message news:iv9grs$286j$1...@digitalmars.com... Seeing the recent large amount of pull requests I am seeing, is someone willing to implement this type system feature? yebblies delivers, quickly too :-)

The issue with libraries that use Windows API prototypes

2011-07-09 Thread Andrej Mitrovic
I've run into yet another incompatibility issue with D2 libraries that use the Windows API. This time it's Derelict: testderelict.obj(testderelict) Error 42: Symbol Undefined _wglDeleteContext@4 testderelict.obj(testderelict) Error 42: Symbol Undefined _wglMakeCurrent@8

Re: Pure higher order functions

2011-07-09 Thread bearophile
Daniel Murphy: Only for strongly pure functions - not const pure at this point. I see, OK. Still, it should make construction of immutable structures without casting a lot easier. I presume you mean something like this (function is currently required if you want to add pure too): void

Complete floating point literals

2011-07-09 Thread bearophile
This comes from a small sub-thread in D.learn (but I have asked for it the first time in bug 3837 time ago): http://www.digitalmars.com/webnews/newsgroups.php?art_group=digitalmars.D.learnarticle_id=28030 I suggest to turn floating point literals like the following into syntax errors (maybe

Re: Complete floating point literals

2011-07-09 Thread Nick Sabalausky
bearophile bearophileh...@lycos.com wrote in message news:iva982$dm8$1...@digitalmars.com... This comes from a small sub-thread in D.learn (but I have asked for it the first time in bug 3837 time ago):

Re: Complete floating point literals

2011-07-09 Thread Daniel Gibson
Am 09.07.2011 21:13, schrieb bearophile: This comes from a small sub-thread in D.learn (but I have asked for it the first time in bug 3837 time ago): http://www.digitalmars.com/webnews/newsgroups.php?art_group=digitalmars.D.learnarticle_id=28030 I suggest to turn floating point literals

Re: Complete floating point literals

2011-07-09 Thread Timon Gehr
Nick Sabalausky wrote: bearophile bearophileh...@lycos.com wrote in message news:iva982$dm8$1...@digitalmars.com... This comes from a small sub-thread in D.learn (but I have asked for it the first time in bug 3837 time ago):

Re: Complete floating point literals

2011-07-09 Thread Andrej Mitrovic
+1, I just had a bug yesterday where I erroneously used .1 instead of 1. . And I introduced that bug while fixing another one, heh.

Re: The issue with libraries that use Windows API prototypes

2011-07-09 Thread Andrej Mitrovic
Btw, the issue with those conflicting functions could be resolved by careful uses of selective imports: import win32.wingdi; // This overwrites win32\wingdi : wglMakeCurrent, wglDeleteContext, wglCreateContext; import derelict.opengl.wgl : wglMakeCurrent, wglDeleteContext, wglCreateContext; //

Re: The issue with libraries that use Windows API prototypes

2011-07-09 Thread Sean Kelly
typedef is deprecated--WindowsAPI should be updated. Problem solved? Sent from my iPhone On Jul 9, 2011, at 12:55 PM, Andrej Mitrovic andrej.mitrov...@gmail.com wrote: I've run into yet another incompatibility issue with D2 libraries that use the Windows API. This time it's Derelict:

Re: Complete floating point literals

2011-07-09 Thread Bernard Helyer
I agree with you, they cause far more pain than they are worth. Axe 'em!

Re: Complete floating point literals

2011-07-09 Thread Simen Kjaeraas
On Sat, 09 Jul 2011 21:13:06 +0200, bearophile bearophileh...@lycos.com wrote: [Good stuff] Votes += 1.0; -- Simen

Re: The issue with libraries that use Windows API prototypes

2011-07-09 Thread Andrej Mitrovic
On 7/9/11, Sean Kelly s...@invisibleduck.org wrote: typedef is deprecated--WindowsAPI should be updated. Problem solved? Druntime also has this typedef.

Re: The issue with libraries that use Windows API prototypes

2011-07-09 Thread Sean Cavanaugh
On 7/9/2011 2:42 PM, Andrej Mitrovic wrote: Btw, the issue with those conflicting functions could be resolved by careful uses of selective imports: import win32.wingdi; // This overwrites win32\wingdi : wglMakeCurrent, wglDeleteContext, wglCreateContext; import derelict.opengl.wgl :

Re: Pure higher order functions

2011-07-09 Thread Daniel Murphy
bearophile bearophileh...@lycos.com wrote in message news:iva7iv$b6v$1...@digitalmars.com... Still, it should make construction of immutable structures without casting a lot easier. I presume you mean something like this (function is currently required if you want to add pure too): Or use

Re: Float Comparison Returns False

2011-07-09 Thread Loopback
On 2011-07-08 04:31, Loopback wrote: On 2011-07-08 02:28, bearophile wrote: Loopback: I do want to ask though what an alternative would be in this case, to compare the two different values. You mentioned something about epsilons but I have no experience within this field. I would really

opCast, c bindings and normal casts.

2011-07-09 Thread Johannes Pfau
Hi, I have a wrapper for a object aware c library (cairo). Take for example two classes, Surface and a subclass, ImageSurface. Now this code has to be valid: --- auto ptr = cairo_image_surface_create(CAIRO_FORMAT_ARGB32, 512, 512); Surface s = new Surface(ptr); ImageSurface

Re: This seems like what could be a common cause of bugs

2011-07-09 Thread Jacob Carlborg
On 2011-07-09 01:03, Steven Schveighoffer wrote: On Fri, 08 Jul 2011 18:47:55 -0400, Andrej Mitrovic andrej.mitrov...@gmail.com wrote: On 7/9/11, Andrej Mitrovic andrej.mitrov...@gmail.com wrote: double step = 1 / width; // or .1 Woops that should have been `1.`. See, another bug right

Re: This seems like what could be a common cause of bugs

2011-07-09 Thread Daniel Murphy
Steven Schveighoffer schvei...@yahoo.com wrote in message news:op.vybo0hv1eav7ka@localhost.localdomain... 1. is a horrible legacy thing, and should be removed. -Steve This I hate, but I'd hate to lose 1.f and 1.L

Re: Float Comparison Returns False

2011-07-09 Thread bearophile
Loopback: I weren't able to solve this error so if it's of anyone's interest I used this function instead; If you think you have found a bug in Phobos, then I suggest you to add it to Bugzilla (with your working version too, if you want). Bye, bearophile

Re: Float Comparison Returns False

2011-07-09 Thread David Nadlinger
This has already been reported: http://d.puremagic.com/issues/show_bug.cgi?id=5089 David On 7/9/11 2:01 PM, bearophile wrote: Loopback: I weren't able to solve this error so if it's of anyone's interest I used this function instead; If you think you have found a bug in Phobos, then I

Re: Runtime evaluation

2011-07-09 Thread nrgyzer
== Auszug aus Mafi (m...@example.org)'s Artikel Am 07.07.2011 23:23, schrieb nrgyzer: Hi guys, I'm trying to read a string from a text file which contains a value of an enumeration like: enum MyEnum : string { Entry_1 = abc, Entry_2 = def, Entry_3 = ghi, } Stream

Re: This seems like what could be a common cause of bugs

2011-07-09 Thread Nick Sabalausky
Steven Schveighoffer schvei...@yahoo.com wrote in message news:op.vybq4xkkeav7ka@localhost.localdomain... On Fri, 08 Jul 2011 18:45:58 -0400, Andrej Mitrovic andrej.mitrov...@gmail.com wrote: This is just an observation, not a question or anything. void main() { enum width = 100;

[Issue 6276] New: [CTFE] Strange behavior of using ~= operator twice

2011-07-09 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6276 Summary: [CTFE] Strange behavior of using ~= operator twice Product: D Version: D2 Platform: x86 OS/Version: Windows Status: NEW Severity: normal Priority: P2

[Issue 6277] New: Disallow short floating point literals

2011-07-09 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6277 Summary: Disallow short floating point literals Product: D Version: D2 Platform: All OS/Version: All Status: NEW Keywords: accepts-invalid Severity: enhancement

[Issue 3512] dchar iteration over string in CTFE fails

2011-07-09 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3512 Johann MacDonagh johann.macdon...@gmail.com changed: What|Removed |Added CC|

[Issue 5089] feqrel does not compile for floats

2011-07-09 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5089 Mike Wey mike-...@planet.nl changed: What|Removed |Added CC||mike-...@planet.nl ---

[Issue 4216] Class method hidden by another one warning

2011-07-09 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4216 --- Comment #1 from bearophile_h...@eml.cc 2011-07-09 10:49:05 PDT --- DMD 2.054beta without -w prints this: test.d(4): Error: class test.B use of test.A.foo(A a) hidden by B is deprecated The error message may also suggest the use of alias

[Issue 6265] Pure-inference failed when calling other pure functions

2011-07-09 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6265 kenn...@gmail.com changed: What|Removed |Added Keywords||patch --- Comment #2 from

[Issue 5814] A bug with bitwise and among booleans

2011-07-09 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5814 bearophile_h...@eml.cc changed: What|Removed |Added Status|NEW |RESOLVED Resolution|

[Issue 5409] Disallow (!x y)

2011-07-09 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5409 --- Comment #2 from bearophile_h...@eml.cc 2011-07-09 11:08:24 PDT --- *** Issue 5814 has been marked as a duplicate of this issue. *** -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving

[Issue 3981] More useful and more clean 'is'

2011-07-09 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3981 --- Comment #3 from bearophile_h...@eml.cc 2011-07-09 11:14:03 PDT --- Bug 3632 implements this for floating point values (it's not truly bitwise when they are NaN). some_struct is some_struct seems useful. -- Configure issuemail:

[Issue 2740] Template Mixins do not work as advertised

2011-07-09 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=2740 Kenji Hara k.hara...@gmail.com changed: What|Removed |Added Keywords||patch

[Issue 6278] New: 'in' contract inheritance doesn't work with safe code

2011-07-09 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6278 Summary: 'in' contract inheritance doesn't work with safe code Product: D Version: D2 Platform: Other OS/Version: All Status: NEW Severity: normal Priority: P2

[Issue 6279] New: array-vararg with pointer type not working in safe code

2011-07-09 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6279 Summary: array-vararg with pointer type not working in safe code Product: D Version: D2 Platform: Other OS/Version: Mac OS X Status: NEW Severity: normal

[Issue 1913] Template error message reports correct line # but wrong file

2011-07-09 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=1913 Kenji Hara k.hara...@gmail.com changed: What|Removed |Added Status|NEW |RESOLVED

[Issue 6264] ICE on testing opSlice in static if

2011-07-09 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6264 yebblies yebbl...@gmail.com changed: What|Removed |Added Keywords||patch CC|

[Issue 4460] Regression(2.036) ICE(e2ir.c) when compiling foreach over associative array literal

2011-07-09 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4460 yebblies yebbl...@gmail.com changed: What|Removed |Added CC||yebbl...@gmail.com ---

[Issue 6278] Regression(2.054 beta): 'in' contract inheritance doesn't work with safe code

2011-07-09 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6278 yebblies yebbl...@gmail.com changed: What|Removed |Added Keywords||rejects-valid

[Issue 6267] Regression(2.054 beta): Can't increment alias this'd struct from ref return

2011-07-09 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6267 yebblies yebbl...@gmail.com changed: What|Removed |Added Keywords||patch CC|

[Issue 6278] Regression(2.054 beta): 'in' contract inheritance doesn't work with safe code

2011-07-09 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6278 --- Comment #2 from yebblies yebbl...@gmail.com 2011-07-10 15:53:01 EST --- (In reply to comment #1) Yep, the compiler generates a bunch of nested try {} catch {} blocks in the function preconditions. I think the correct change here is to