On 10/22/22 5:53 PM, WhatMeWorry wrote:
string[] tokens = userSID.output.split!isWhite;
writeln("tokens = ", tokens);
tokens = ["SID", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
"", "", "", "", "", "", "",
On Saturday, 22 October 2022 at 21:53:05 UTC, WhatMeWorry wrote:
string[] tokens = userSID.output.split!isWhite;
writeln("tokens = ", tokens);
[...]
Is there a clever way that I can discard all the extra null
strings in the resultant string array?
Easiest way is to use [`filter`][1].
On Saturday, 22 October 2022 at 22:01:09 UTC, Enjoys Math wrote:
On Saturday, 22 October 2022 at 21:53:05 UTC, WhatMeWorry wrote:
string[] tokens = userSID.output.split!isWhite;
writeln("tokens = ", tokens);
tokens = ["SID", "", "", "", "", "", "", "", "", "", "", "",
"", "", "", "", "",
__MWE Code:__
```
module DlangForumsMWE;
import std.stdio;
import std.algorithm.mutation;
int main()
{
//string[] tokens = userSID.output.split!isWhite;
//writeln("tokens = ", tokens);
auto tokens = ["SID", "", "", "", "", "", "", "", "", "", "",
"", "", "", "", "", "", "", "", "",
On 10/22/22 14:53, WhatMeWorry wrote:
>
>
> string[] tokens = userSID.output.split!isWhite;
> writeln("tokens = ", tokens);
Could you please show minimal compilable code that demonstrates the
issue. I spent some time with some guesses but failed (to get my code to
compile with
On Saturday, 22 October 2022 at 21:53:05 UTC, WhatMeWorry wrote:
string[] tokens = userSID.output.split!isWhite;
writeln("tokens = ", tokens);
tokens = ["SID", "", "", "", "", "", "", "", "", "", "", "",
"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
"", "", "", "", "",
string[] tokens = userSID.output.split!isWhite;
writeln("tokens = ", tokens);
tokens = ["SID", "", "", "", "", "", "", "", "", "", "", "", "",
"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
"", "", "",
On Friday, 20 November 2020 at 03:06:37 UTC, WhatMeWorry wrote:
The "..when this option is enabled..." is exactly the behavior
I want, but how is it enabled? Is there an "all inclusive
pattern" that I'm missing.
dmd -i yourfile.d
that's the default it is describing when you don't specify
The DMD forum mentions internal design. This is more of a
beginner usage question.
- from Compiler Switches
-
-I=directory
Look for imports also in directory
-i[=pattern ]
Enables "include imports" mode, where the compiler will
On Friday, 13 January 2017 at 16:56:43 UTC, WhatMeWorry wrote:
I'm converting some C++ and glm code to D and gl3n. And I'm
stumped at the following line.
GLboolean CheckCollision(BallObject , GameObject ) //
AABB - Circle collision
{
// Get center point circle first
glm::vec2
On Friday, 13 January 2017 at 16:56:43 UTC, WhatMeWorry wrote:
A vec and scalar can't be added together. So why (or how) is
the glm code working?
The C++ source disagrees:
https://github.com/g-truc/glm/blob/master/glm/detail/type_vec2.hpp#L219
It works via operator overloading, and adding a
On 10/22/16 5:34 PM, WhatMeWorry wrote:
On Saturday, 22 October 2016 at 20:51:14 UTC, Jonathan M Davis wrote:
On Saturday, October 22, 2016 20:35:27 WhatMeWorry via
Digitalmars-d-learn wrote:
[...]
Just put it in a separate module and then import it. e.g.
file: mypackage/constants.d
On Saturday, 22 October 2016 at 21:34:36 UTC, WhatMeWorry wrote:
On Saturday, 22 October 2016 at 20:51:14 UTC, Jonathan M Davis
wrote:
[...]
Ok, but now I'm getting these error in my new
mypackage/constants.d
..\common\vertex_data.d(5,15): Error: undefined identifier
'GLfloat'
On Saturday, October 22, 2016 21:34:36 WhatMeWorry via Digitalmars-d-learn
wrote:
> Ok, but now I'm getting these error in my new
> mypackage/constants.d
>
> ..\common\vertex_data.d(5,15): Error: undefined identifier
> 'GLfloat'
> ..\common\vertex_data.d(53,12): Error: undefined identifier 'vec3'
On Saturday, 22 October 2016 at 20:51:14 UTC, Jonathan M Davis
wrote:
On Saturday, October 22, 2016 20:35:27 WhatMeWorry via
Digitalmars-d-learn wrote:
[...]
Just put it in a separate module and then import it. e.g.
file: mypackage/constants.d
==
module mypackage.constants;
On Saturday, October 22, 2016 20:35:27 WhatMeWorry via Digitalmars-d-learn
wrote:
> This is probably so simple that there's no example anywhere.
>
> Basically, I've got a huge array definition (see below) which I
> reuse over and over again in different projects.
>
> GLfloat[] vertices =
> [
>
This is probably so simple that there's no example anywhere.
Basically, I've got a huge array definition (see below) which I
reuse over and over again in different projects.
GLfloat[] vertices =
[
// Positions // Texture Coords
-0.5f, -0.5f, -0.5f, 0.0f, 0.0f,
0.5f,
On Saturday, 3 January 2015 at 12:08:16 UTC, Vladimir Panteleev
wrote:
On Saturday, 3 January 2015 at 11:58:48 UTC, Laeeth Isharc
wrote:
import ae.utils;
ae.utils is a package, perhaps you meant to import ae.utils.xml?
aha. schoolboy error on my part. thank you for your help, and
On Saturday, 3 January 2015 at 11:58:48 UTC, Laeeth Isharc wrote:
import ae.utils;
ae.utils is a package, perhaps you meant to import ae.utils.xml?
On Monday, 18 August 2014 at 16:30:13 UTC, Nikolay wrote:
I found this code sample in vibe:
void connect(NetworkAddress addr)
{
enforce(.connect(m_ctx.socketfd, addr.sockAddr,
addr.sockAddrLen) == 0, Failed to connect UDP
socket.~to!string(getLastSocketError()));
}
What
On Mon, 18 Aug 2014 16:30:12 +
Nikolay via Digitalmars-d-learn digitalmars-d-learn@puremagic.com
wrote:
What does mean .connect? Where I can find description of this
syntax (dot + function name)?
right here: http://dlang.org/expression.html#PrimaryExpression
language documentation rulez!
right here: http://dlang.org/expression.html#PrimaryExpression
language documentation rulez! ;-)
Yes I found it. Correct link:
Module Scope Operator
http://dlang.org/module.html
On Tue, 19 Aug 2014 03:36:26 +
Nikolay via Digitalmars-d-learn digitalmars-d-learn@puremagic.com
wrote:
right here: http://dlang.org/expression.html#PrimaryExpression
language documentation rulez! ;-)
Yes I found it. Correct link:
Module Scope Operator
http://dlang.org/module.html
On Friday, 16 November 2012 at 01:00:58 UTC, Walter Bright wrote:
On 11/15/2012 4:11 PM, Stugol wrote:
am I likely to be told to fuck off again?
I haven't seen Bernard lately, so probably not.
I'm still about.
Bernard was certainly out of line with that remark
Absolutely. I let the NG
On 11/16/2012 4:08 AM, Nick Sabalausky wrote:
On Fri, 16 Nov 2012 01:11:18 +0100
As for your specific issue, there's a few different factors:
1. Like other have already said, all the files need to be sent to DMD
together (possibly by using RDMD) or, if not that, then at least their
objects
On 16/11/12 05:15, Rob T wrote:
On Friday, 16 November 2012 at 03:41:45 UTC, Stugol wrote:
Event_t e2;// Will compile!
Yeah but that kinda blows, doesn't it?
I found it surprising or unintuitive that the !() is required, and I do
want to know what is the reasoning behind it,
One
Now I'm working that.
Kenji Hara
2012/11/16 Don Clugston d...@nospam.com
On 16/11/12 05:15, Rob T wrote:
On Friday, 16 November 2012 at 03:41:45 UTC, Stugol wrote:
Event_t e2;// Will compile!
Yeah but that kinda blows, doesn't it?
I found it surprising or unintuitive that the
Done.
https://github.com/D-Programming-Language/dmd/pull/1295
Kenji Hara
2012/11/16 kenji hara k.hara...@gmail.com
Now I'm working that.
Kenji Hara
2012/11/16 Don Clugston d...@nospam.com
One of the oldest open enhancement requests is on this topic:
On 11/16/12, kenji hara k.hara...@gmail.com wrote:
Done.
https://github.com/D-Programming-Language/dmd/pull/1295
Have you seen this comment:
On 11/16/12, jerro a...@a.com wrote:
doing that certainly would introduce some ambiguities. For
example, consider this line:
alias Foo Bar;
Should
On 2012-11-16 11:16, Andrej Mitrovic wrote:
Have you seen this comment:
On 11/16/12, jerro a...@a.com wrote:
doing that certainly would introduce some ambiguities. For
example, consider this line:
alias Foo Bar;
Should Bar be a template or an instance of a template here?
And my reply to
When I post on these forums to ask for new features (e.g.
iterators), you say that you won't be adding any new features at
the moment, and that you are instead concentrating on making the
language stable and usable.
However, when I post on these forums to ask for bugs to be fixed
(e.g. the
On Thursday, 15 November 2012 at 21:25:03 UTC, Stugol wrote:
When I post on these forums to ask for new features (e.g.
iterators), you say that you won't be adding any new features
at the moment, and that you are instead concentrating on making
the language stable and usable.
However, when I
On Thursday, 15 November 2012 at 22:43:22 UTC, Jesse Phillips
wrote:
To say that being told you won't see it any times soon is
flaming is exaggeration.
If you have a real example of flames then please do bring that
forward, but there isn't much the community will be able to do
about it.
I
On Thursday, 15 November 2012 at 21:25:03 UTC, Stugol wrote:
However, when I post on these forums to ask for bugs to be
fixed (e.g. the defective MODULE keyword, or the linker not
supporting spaces in paths), you say that's not going to happen
anytime soon.
Please provide links to that
On Thursday, 15 November 2012 at 23:56:49 UTC, David Nadlinger
wrote:
On Thursday, 15 November 2012 at 21:25:03 UTC, Stugol wrote:
However, when I post on these forums to ask for bugs to be
fixed (e.g. the defective MODULE keyword, or the linker not
supporting spaces in paths), you say that's
On Thursday, 15 November 2012 at 23:56:49 UTC, David Nadlinger
wrote:
On Thursday, 15 November 2012 at 21:25:03 UTC, Stugol wrote:
However, when I post on these forums to ask for bugs to be
fixed (e.g. the defective MODULE keyword, or the linker not
supporting spaces in paths), you say that's
On Friday, 16 November 2012 at 00:11:19 UTC, Stugol wrote:
As to the module bug, I refer you to this error I just received
after trying to use D again after a long absence:
Error 42: Symbol Undefined
_D8infinity8standard3api7windows12__ModuleInfoZ
On Friday, 16 November 2012 at 00:11:19 UTC, Stugol wrote:
Are these bugs likely to be addressed, or am I likely to be
told to fuck off again?
Ah, now things become clearer. The issue here is that what you
are describing is not an actual bug, but the consequence of you
not specifying one of
On Friday, 16 November 2012 at 00:29:24 UTC, David Nadlinger
wrote:
Granted, the diagnostics for it are terrible, you just get to
see the raw linker error message.
This is potentially very easy to fix...
$ cat demangle.d
import core.demangle;
import std.stdio;
import std.regex;
string
On Friday, 16 November 2012 at 00:20:00 UTC, Adam D. Ruppe wrote:
On Friday, 16 November 2012 at 00:11:19 UTC, Stugol wrote:
As to the module bug, I refer you to this error I just
received after trying to use D again after a long absence:
Error 42: Symbol Undefined
On Friday, 16 November 2012 at 00:39:48 UTC, bearophile wrote:
Stugol:
Huh? This usually happens if I omit the module statement at
the top of EVERY DAMN FILE (why???) but in this case I haven't
omitted it, yet I'm still getting the error.
...
What the HELL is this ModuleInfo, why is it
On Friday, 16 November 2012 at 00:29:24 UTC, David Nadlinger
wrote:
On Friday, 16 November 2012 at 00:11:19 UTC, Stugol wrote:
Are these bugs likely to be addressed, or am I likely to be
told to fuck off again?
Ah, now things become clearer. The issue here is that what you
are describing is
On 11/15/2012 4:11 PM, Stugol wrote:
am I likely to be told to fuck off again?
I haven't seen Bernard lately, so probably not. Bernard was certainly out of
line with that remark, but we try not to censor people here. Peoples' comments
are their own responsibility.
On Friday, 16 November 2012 at 00:55:36 UTC, Stugol wrote:
The point is, it says that kind of crap all the time. Even when
it doesn't, if I take the MODULE statement out, it comes back.
The module keyword is supposed to be optional.
Oh, I see what's going on now.
The module thing is only
I believe this post occurred *after* I had already been met with
hostility.
That post was actually the very first post in the thread.
On Friday, 16 November 2012 at 01:14:18 UTC, Adam D. Ruppe wrote:
The module thing is only optional in simple cases, where the
name has no dots and matches the filename.
If you are using packages, the module line is required to get
that full name registered in the file.
Hmm, that makes a
On Friday, 16 November 2012 at 02:00:05 UTC, Stugol wrote:
Hmm, that makes a bit more sense now I guess. Funny, I don't
remember seeing that rule when I read the documentation.
It might not be clear, but it is there:
http://dlang.org/module.html
The ModuleDeclaration sets the name of the
On Friday, 16 November 2012 at 02:22:32 UTC, Adam D. Ruppe wrote:
On Friday, 16 November 2012 at 02:00:05 UTC, Stugol wrote:
Hmm, that makes a bit more sense now I guess. Funny, I don't
remember seeing that rule when I read the documentation.
It might not be clear, but it is there:
On Fri, 16 Nov 2012 01:11:18 +0100
Stugol stu...@gmx.com wrote:
On Thursday, 15 November 2012 at 23:56:49 UTC, David Nadlinger
wrote:
On Thursday, 15 November 2012 at 21:25:03 UTC, Stugol wrote:
However, when I post on these forums to ask for bugs to be
fixed (e.g. the defective MODULE
On Fri, 16 Nov 2012 03:55:53 +0100
Stugol stu...@gmx.com wrote:
On Friday, 16 November 2012 at 02:22:32 UTC, Adam D. Ruppe wrote:
On Friday, 16 November 2012 at 02:00:05 UTC, Stugol wrote:
Hmm, that makes a bit more sense now I guess. Funny, I don't
remember seeing that rule when I read
On Friday, 16 November 2012 at 02:55:54 UTC, Stugol wrote:
I'm not quite sure what purpose the MODULE keyword serves in
any case. I have a file
Include.D\Infinity\Standard\Mixins\Event.d, but if I give it
a module name of infinity.standard.event it doesn't work. I
have to include the .mixins
On Friday, 16 November 2012 at 02:55:54 UTC, Stugol wrote:
Also, I'm having difficulty specifying a default specialisation
for a template class:
class Event(TEventArgs : EventArgs = EventArgs) {
}
Usage:
Event!() e1; // Works
Event e2;// Won't compile
How can I have
On Friday, 16 November 2012 at 02:55:54 UTC, Stugol wrote:
Also, I'm having difficulty specifying a default specialisation
for a template class:
class Event(TEventArgs : EventArgs = EventArgs) {
}
Usage:
Event!() e1; // Works
Event e2;// Won't compile
How can I have
On Friday, 16 November 2012 at 03:24:28 UTC, Nick Sabalausky
wrote:
Unless you really are requiring that TEventArgs must be either
EventArgs or something derived from EventArgs. (Maybe you are?)
I am.
You may be able to do this:
alias Event!() Event;
But I don't know if that would
On Friday, 16 November 2012 at 03:32:06 UTC, Rob T wrote:
I encountered this same wtf??? today. Apparently, even with a
default type specified, you still have to put in a !(). I don't
know what the reasoning was behind making this seeming
redundancy a requirement, and it partially defeats
On Friday, 16 November 2012 at 00:55:36 UTC, Stugol wrote:
On Friday, 16 November 2012 at 00:20:00 UTC, Adam D. Ruppe
wrote:
On Friday, 16 November 2012 at 00:11:19 UTC, Stugol wrote:
As to the module bug, I refer you to this error I just
received after trying to use D again after a long
On Friday, 16 November 2012 at 03:41:45 UTC, Stugol wrote:
Event_t e2;// Will compile!
Yeah but that kinda blows, doesn't it?
I found it surprising or unintuitive that the !() is required,
and I do want to know what is the reasoning behind it, but it's
not that big of a deal
I found it surprising or unintuitive that the !() is required,
and I do want to know what is the reasoning behind it
I don't know whether the language could be changed to support
code like:
struct Foo(){}
Foo foo;
but doing that certainly would introduce some ambiguities. For
example,
On Friday, 16 November 2012 at 04:26:31 UTC, jerro wrote:
I found it surprising or unintuitive that the !() is required,
and I do want to know what is the reasoning behind it
I don't know whether the language could be changed to support
code like:
struct Foo(){}
Foo foo;
but doing that
On 2012-11-16 05:26, jerro wrote:
I don't know whether the language could be changed to support code like:
struct Foo(){}
Foo foo;
but doing that certainly would introduce some ambiguities. For example,
consider this line:
alias Foo Bar;
Should Bar be a template or an instance of a template
60 matches
Mail list logo