Re: How to run DMD's tests?

2011-04-08 Thread Brad Roberts
On 4/7/2011 10:17 PM, Nick Sabalausky wrote:
 Like the subject says. I try to use the makefile, but I keep getting this:
 
 Error on line 76: expecting target : dependencies
 

It requires gnu make to run.  You can look at the scripts used by the 
auto-tester here:

  https://github.com/braddr/d-tester/tree/master/client/src




Re: Compiling DMD

2011-04-08 Thread Simon

On 08/04/2011 05:37, Nick Sabalausky wrote:

Is the makefile supposed to work out-of-the-box, or is it expected that it
be edited first?  Because when I do make -f win32.mak form the src dir I
just get Error: '\dm\bin\dmc' not found. Same (exact same) result if I do
make -f win32.mak D=path_to_parent_of_dm.

I know I can just hack the make file to make it work like I've alwayd done
before, but now that I'm starting to work with the source from github, I
want to see if theres a proper way to do it that I'm missing that won't
end up with me needing to omit the makefile from commits and re-apply my
change whenever I pull a new version of the makefile.




You could create a junction from \dm\bin to where ever you've put the 
dmc bin folder. saves mucking around.


--
My enormous talent is exceeded only by my outrageous laziness.
http://www.ssTk.co.uk


Re: ddoc patterns

2011-04-08 Thread spir

On 04/08/2011 03:00 PM, Aleksandar Ružičić wrote:

On Thu, Apr 7, 2011 at 7:27 PM, spirdenis.s...@gmail.com  wrote:

how are we supposed to insert code phrases in the
flow of normal text?


code/code  tags should be used for that
(http://www.w3.org/TR/html401/struct/text.html#h-9.2.1).


Right, but IIUC unlike pre there is no guarantee for code contents not to 
be interpreted further. It's a semantic hint to the rendering engine (which 
is often used to perform syntax highlighting).



 But I know
nothing about ddoc so I don't know how to write macro that will use
code  instead ofpre. Although I believe it's a piece of cake :)


Yes:
Macros:
CODE = code$0/code

Denis
--
_
vita es estrany
spir.wikidot.com



Why do the WindowsAPI bindings have pragma calls?

2011-04-08 Thread Andrej Mitrovic
E.g. the WindowsAPI bindings have the wingdi.d file, which has this call at the 
very top of the module:

pragma(lib, gdi32.lib);

This doesn't seem to put any gdi32.lib symbol references to the final winapi 
library file, and if I try to use a function from wingdi.d from a main file, I 
still have to manually link to the gdi32.lib file (or use a pragma), otherwise 
I get undefined symbol errors.

So what are those pragmas for?


Re: Why do the WindowsAPI bindings have pragma calls?

2011-04-08 Thread Andrej Mitrovic
Ok so if I compile the Winapi .d modules with my main file, the pragma
statement is taken into account and I don't have to manually add the
pragma again.

But If I use an import switch (dmd -Iwin32\) and a precompiled
library, then the pragma statement is skipped. Could this be
considered a bug?


Re: ddoc patterns

2011-04-08 Thread Aleksandar Ružičić
On Fri, Apr 8, 2011 at 8:52 PM, spir denis.s...@gmail.com wrote:
 Right, but IIUC unlike pre there is no guarantee for code contents not
 to be interpreted further. It's a semantic hint to the rendering engine
 (which is often used to perform syntax highlighting).

AFAIK no major browser (A-grade browser) does nothing more with code
than making it have monospaced font (i.e. look at default styles for
all elements in webkit:
http://trac.webkit.org/browser/trunk/Source/WebCore/css/html.css,
you'll see code only has it's font-family defined, while pre has
few others more, most notably white-space: pre; and display: block).
And no browser supports rendering syntax highlighting (as I know of)
for any computer language (there are user scripts and maybe extensions
which does that but in no way is that default behavior).

It's true, code does have semantic hint, and that's hey anything
between code and /code is a computer code!, which is I believe
exact what you want - to display some code inline..


Re: ddoc patterns

2011-04-08 Thread Aleksandar Ružičić
On Fri, Apr 8, 2011 at 8:52 PM, spir denis.s...@gmail.com wrote:
 Yes:
        Macros:
            CODE = code$0/code

That's really nice! I might take a look at ddoc and try to write some
useful macros if it's expressive enough...