On Saturday, 24 November 2018 at 03:48:12 UTC, Eko Wahyudin wrote:
Hi all,
anyone know how to iterate getSymbolsByUDA ?
enum Attr;
struct A
{
@Attr int a;
int b;
@Attr void foo() {}
@Attr void foo(int) {}
}
void main() {
import std.traits;
import std.stdio;
alias
I have a package named command, and many modules inside it, such
as command.build, command.pack, command.help...
I want to get all these modules at compile time so that I know
what command is available.
On Saturday, 24 November 2018 at 08:09:38 UTC, Stanislav Blinov
wrote:
On Saturday, 24 November 2018 at 03:48:12 UTC, Eko Wahyudin
wrote:
Hi all,
anyone know how to iterate getSymbolsByUDA ?
enum Attr;
struct A
{
@Attr int a;
int b;
@Attr void foo() {}
@Attr void foo(int) {}
}
On Friday, 23 November 2018 at 10:00:17 UTC, Nicholas Wilson
wrote:
If you pass all the files on the command line then they all get
(re)compiled.
How are you supposed include files if not passing them to the
compiler?
I'm only using std.regex in one file, IIRC, so whatever the
"proper" wa
On Friday, 23 November 2018 at 21:49:55 UTC, Kagamin wrote:
Well, just have all factories in one module and import it, then
they will be visible.
They're part of another library over which I have no control, but
yes, I could still import them all and make life easier.
import allfactories;
a
On Saturday, 24 November 2018 at 08:44:19 UTC, Domain wrote:
I have a package named command, and many modules inside it,
such as command.build, command.pack, command.help...
I want to get all these modules at compile time so that I know
what command is available.
If you just want static if exp
On Fri, Nov 23, 2018 at 09:43:01PM -0700, Jonathan M Davis via
Digitalmars-d-learn wrote:
[...]
> Honestly, I would argue that if you have multiple versions of the
> documentation, then there's a serious problem. The documentation
> shouldn't be platform-dependent even if the symbols are. Even if
Easiest way is to put this in your build script:
find path/to/package -name '*.d' | \
xargs grep '^module ' | \
sed 's,^module,import,' \
> data/modules.d
Add `-J data` to your DMD command line, or add `"stringImportPaths":
["data"]` to dub.json.
Then in your file:
mixin(import("module
On Saturday, 24 November 2018 at 07:00:31 UTC, Jonathan M Davis
wrote:
[not legal]
enum Foo
{
a,
b,
version(linux) c = 42,
else version(Windows) c = 54,
}
You're forced to version the entire enum.
Not in this case, no:
enum Foo
{
a,
b,
c = {
version(linux
On Sat, Nov 24, 2018 at 09:20:08AM +, Chris Katko via Digitalmars-d-learn
wrote:
> On Friday, 23 November 2018 at 10:00:17 UTC, Nicholas Wilson wrote:
> >
> > If you pass all the files on the command line then they all get
> > (re)compiled.
>
> How are you supposed include files if not passi
On Saturday, November 24, 2018 9:28:47 AM MST Stanislav Blinov via
Digitalmars-d-learn wrote:
> On Saturday, 24 November 2018 at 07:00:31 UTC, Jonathan M Davis
>
> wrote:
> > [not legal]
> >
> > enum Foo
> > {
> >
> > a,
> > b,
> > version(linux) c = 42,
> > else version(Windows) c
On Saturday, 24 November 2018 at 17:43:35 UTC, Jonathan M Davis
wrote:
On Saturday, November 24, 2018 9:28:47 AM MST Stanislav Blinov
via Digitalmars-d-learn wrote:
On Saturday, 24 November 2018 at 07:00:31 UTC, Jonathan M Davis
wrote:
> [not legal]
>
> enum Foo
> {
>
> a,
> b,
> ve
On Friday, 23 November 2018 at 08:57:57 UTC, Chris Katko wrote:
D is supposed to compile fast.
You didnt read the fine print. It compiles simple code fast. Also
compilation is separate step from linking and your program might
spend half of "compilation" time in link phase.
On Saturday, 24 November 2018 at 16:16:08 UTC, H. S. Teoh wrote:
Actually, what would be ideal is if each platform-specific
version of the symbol can have its own associated
platform-specific docs, in addition to the one common across
all platforms, and the doc system would automatically compil
I have a file in xdr format and I'm trying to use the xdr module
from dub.
After a lot of failures, I got this to work:
ubyte[] b2 = cast (ubyte[]) read(fname);
string n = cast (string) b2.get!string();
tracef("<%s>", n);
I feel like there should be a way for the xdr get to read
di
On Saturday, 24 November 2018 at 08:50:59 UTC, Eko Wahyudin wrote:
On Saturday, 24 November 2018 at 08:09:38 UTC, Stanislav Blinov
wrote:
On Saturday, 24 November 2018 at 03:48:12 UTC, Eko Wahyudin
wrote:
Hi all,
anyone know how to iterate getSymbolsByUDA ?
enum Attr;
struct A
{
@Attr int
On Sat, Nov 24, 2018 at 10:27:07PM +, Adam D. Ruppe via Digitalmars-d-learn
wrote:
[...]
> (Though a parsing thing: /// version(linux) void foo(); - is that doc
> on version linux or on void foo or on both? I guess it could only
> apply it in if there are {}... but eh I still don't love it.)
On Sat, Nov 24, 2018 at 05:48:16PM +, Stanislav Blinov via
Digitalmars-d-learn wrote:
> On Saturday, 24 November 2018 at 17:43:35 UTC, Jonathan M Davis wrote:
> > On Saturday, November 24, 2018 9:28:47 AM MST Stanislav Blinov via
> > Digitalmars-d-learn wrote:
[...]
> > > enum Foo
> > > {
> >
On Sunday, 25 November 2018 at 05:41:56 UTC, H. S. Teoh wrote:
On Sat, Nov 24, 2018 at 05:48:16PM +, Stanislav Blinov via
Digitalmars-d-learn wrote:
Yup. UDAs did get in there eventually, and version should too.
I think this would be a trivial DIP, by making it such that a
version block
On Sunday, 25 November 2018 at 07:19:50 UTC, Stanislav Blinov
wrote:
Granted, it may require some special syntax, i.e.
enum E {
a,
b if version(Windows),
c if version(Windows),
d if version(Posix),
}
or something to that effect.
Come to think of it, since UDAs are now allowe
20 matches
Mail list logo