Hi all,
Long time since I read/posted here but I saw this and thought it
might be good PR for D:
http://adventofcode.com/
Should also be fun.
Ciao,
Regan
On Mon, 10 Nov 2014 18:09:12 -, deadalnix wrote:
On Monday, 10 November 2014 at 10:21:34 UTC, Regan Heath wrote:
On Fri, 31 Oct 2014 09:30:25 -, Dejan Lekic
wrote:
In D apps I work on I prefer all my classes in a single module, as is
common "D way", or shall I call it &q
On Fri, 31 Oct 2014 09:30:25 -, Dejan Lekic
wrote:
In D apps I work on I prefer all my classes in a single module, as is
common "D way", or shall I call it "modular way"?
Sure, but that's not the point of partial. It's almost never used by the
programmer directly, and when it is used
On Wed, 29 Oct 2014 07:54:39 -, Paulo Pinto
wrote:
On Wednesday, 29 October 2014 at 07:41:41 UTC, FrankLike wrote:
Hello,everyone,
I've written some projects in C#,find the 'partial' keyword is very
userful,which lets the auto codes in another single file,my codes are
very easy to
On Sun, 19 Oct 2014 10:06:31 +0100, eles wrote:
On Wednesday, 15 October 2014 at 14:42:30 UTC, Regan Heath wrote:
On Thu, 09 Oct 2014 09:50:44 +0100, Martin Nowak wrote:
Would this affect your code?
Probably, but I have no D code of any size to care about.
Would this change make you to
On Thu, 09 Oct 2014 09:50:44 +0100, Martin Nowak wrote:
Would this affect your code?
Probably, but I have no D code of any size to care about.
Do you think it makes your code better or worse?
Better.
Is this just a pointless style change?
Nope.
Anything else?
Only what you said in
On Sat, 11 Oct 2014 13:47:55 +0100, Martin Nowak
wrote:
https://github.com/D-Programming-Language/dmd/pull/4043#issuecomment-58748353
There has been a broad support for this on the newsgroup discussion
because this regularly confuses beginners.
There are also some arguments against it (par
On Tue, 07 Oct 2014 14:39:06 +0100, Andrei Alexandrescu
wrote:
On 10/7/14, 12:36 AM, monarch_dodra wrote:
Hum... But arguably, that's just exception chaining "happening". Do you
have any examples of someone actually "dealing" with all the exceptions
in a chain in a catch, or actually using t
On Mon, 06 Oct 2014 15:48:31 +0100, Jacob Carlborg wrote:
On 06/10/14 15:45, Andrei Alexandrescu wrote:
Knowledge doesn't have to be by type; just place data inside the
exception. About the only place where multiple "catch" statements are
used to make fine distinctions between exception types
On Fri, 25 Jul 2014 21:38:33 +0100, Walter Bright
wrote:
On 7/25/2014 4:10 AM, Regan Heath wrote:
Sure, Andrei makes a valid point .. for a minority of cases. The
majority case
will be that opEquals and opCmp==0 will agree. In those minority cases
where
they are intended to disagree
On Sat, 26 Jul 2014 05:22:26 +0100, Walter Bright
wrote:
If you don't want to accept that equality and comparison are
fundamentally different operations, I can only repeat saying the same
things.
For the majority of use cases they are *not* in fact fundamentally
different.
You're corre
On Fri, 25 Jul 2014 09:39:11 +0100, Walter Bright
wrote:
On 7/25/2014 1:02 AM, Jacob Carlborg wrote:
3. If opCmp is defined but no opEquals, lhs == rhs will be lowered to
lhs.opCmp(rhs) == 0
This is the sticking point. opCmp and opEquals are separate on purpose,
see Andrei's posts.
Sur
Windows 7 x64
On Wed, 07 May 2014 19:41:16 +0100, Maxime Chevalier-Boisvert
wrote:
Unless I'm misunderstanding it should be as simple as:
wchar[100] stackws; // alloca() if you need it to be dynamically sized.
A slice of this static array behaves just like a slice of a dynamic
array.
I do need it to
On Fri, 02 May 2014 01:22:12 +0100, deadalnix wrote:
On Thursday, 1 May 2014 at 10:03:21 UTC, Regan Heath wrote:
On Wed, 30 Apr 2014 20:56:15 +0100, Timon Gehr
wrote:
If this is a problem, I guess the most obvious alternatives are to:
1. Get rid of namespace scopes. Require workarounds in
On Thu, 01 May 2014 11:03:21 +0100, Regan Heath
wrote:
On Wed, 30 Apr 2014 20:56:15 +0100, Timon Gehr wrote:
If this is a problem, I guess the most obvious alternatives are to:
1. Get rid of namespace scopes. Require workarounds in the case of
conflicting definitions in different
On Wed, 30 Apr 2014 20:56:15 +0100, Timon Gehr wrote:
If this is a problem, I guess the most obvious alternatives are to:
1. Get rid of namespace scopes. Require workarounds in the case of
conflicting definitions in different namespaces in the same file. (Eg.
use a mixin template.) I'd pres
On Wed, 30 Apr 2014 10:20:22 +0100, Regan Heath
wrote:
Something else to think about.
C# has the same problem and has solved it the following way..
[main.cs]
using ..
using CSTest_Test1;
using CSTest_Test2;
namespace CSTest
{
class Program
{
static void Main(string[] args
On Wed, 30 Apr 2014 05:03:58 +0100, Ola Fosheim Grøstad
wrote:
Wrong KISS: compiler internals over specification
Indeed.
I've been a C/C++ developer for ~16 years and I was confused several times
reading this thread.
The mix of D modules and C++ namespaces is the thing what needs to be k
On Thu, 17 Apr 2014 22:32:31 +0100, Steven Schveighoffer
wrote:
On Thu, 17 Apr 2014 17:29:47 -0400, Nick Sabalausky
wrote:
On 4/17/2014 8:51 AM, Steven Schveighoffer wrote:
Every time I open one of these messages I
get a huge pregnant 5-second pause, along with the Mac Beach Ball
(hourg
On Wed, 16 Apr 2014 18:38:23 +0100, Walter Bright
wrote:
On 4/16/2014 8:01 AM, qznc wrote:
However, what is still an open issue is that @nogc can be stopped by
allocations
in another thread. We need threads which are not affected by
stop-the-world. As
far as I know, creating threads via p
On Thu, 17 Apr 2014 14:08:29 +0100, Orvid King via Digitalmars-d
wrote:
I'm just going to put my 2-cents into this discussion, it's my
personal opinion that while _allocations_ should be removed from
phobos wherever possible, replacing GC usage with manual calls to
malloc/free has no place in
On Fri, 04 Apr 2014 03:10:14 +0100, dnewbie wrote:
Please vote now!
http://www.easypolls.net/poll.html?p=533e10e4e4b0edddf89898c5
See also results from previous years:
- http://d.darktech.org/2012.png
- http://d.darktech.org/2013.png
I think we need a 10+ category now too :p
R
--
Using Ope
On Fri, 28 Mar 2014 16:04:29 -, Chris wrote:
On Friday, 28 March 2014 at 15:49:06 UTC, Regan Heath wrote:
On Fri, 28 Mar 2014 14:15:10 -, Chris wrote:
Earlier Walter wrote:
"I don't like being in the position of when I need high performance
code, I have
to implem
On Fri, 28 Mar 2014 16:30:36 -, John Stahara
wrote:
On Fri, 28 Mar 2014 16:23:11 +, Paolo Invernizzi wrote:
On Friday, 28 March 2014 at 09:30:25 UTC, Regan Heath wrote:
On Fri, 28 Mar 2014 08:59:34 -, Paolo Invernizzi
wrote:
For what concern us, everyone here is happy with
On Fri, 28 Mar 2014 14:15:10 -, Chris wrote:
Earlier Walter wrote:
"I don't like being in the position of when I need high performance
code, I have
to implement my own ranges & algorithms, or telling customers they need
to do so."
I don't think there is a one size fits all. What if c
On Fri, 28 Mar 2014 08:59:34 -, Paolo Invernizzi
wrote:
For what concern us, everyone here is happy with the fact that empty
*must* be checked prior to front/popFront.
This is actually not true.
R
--
Using Opera's revolutionary email client: http://www.opera.com/mail/
On Thu, 27 Mar 2014 11:45:50 -, Kagamin wrote:
On Thursday, 27 March 2014 at 10:39:58 UTC, Regan Heath wrote:
On Wed, 26 Mar 2014 22:02:44 -, Timon Gehr
wrote:
On 03/26/2014 05:19 PM, H. S. Teoh wrote:
int x = 1, 5; // hands up, how many understand what this does
On Thu, 27 Mar 2014 10:49:42 -, Marc Schütz wrote:
On Thursday, 27 March 2014 at 04:17:16 UTC, Walter Bright wrote:
On 3/26/2014 7:55 PM, Steven Schveighoffer wrote:
OK, but it's logical to assume you *can* avoid a call to empty if you
know
what's going on under the hood, no? Then at tha
On Thu, 27 Mar 2014 02:19:13 -, Steven Schveighoffer
wrote:
if(!r.empty)
{
auto r2 = map!(x => x * 2)(r);
do
{
auto x = r2.front;
...
} while(!r2.empty);
}
if(r.empty)
return;
auto r2 = map!(x => x * 2)(r);
while(!r2.empty)
{
auto x = r2.front;
...
On Thu, 27 Mar 2014 02:44:13 -, Daniel Murphy
wrote:
"Regan Heath" wrote in message
news:op.xdb9a9v354x...@puck.auriga.bhead.co.uk...
What guarantees range2 is longer than range1? The isArray case checks
explicitly, but the generic one doesn't. Is it a prope
On Wed, 26 Mar 2014 22:02:44 -, Timon Gehr wrote:
On 03/26/2014 05:19 PM, H. S. Teoh wrote:
int x = 1, 5; // hands up, how many understand what this does?
Nothing. This fails to parse because at that place ',' is expected to be
a separator for declarators.
Spectacularly pro
On Wed, 26 Mar 2014 17:32:30 -, monarch_dodra
wrote:
On Wednesday, 26 March 2014 at 16:55:48 UTC, Regan Heath wrote:
On Wed, 26 Mar 2014 16:38:57 -, monarch_dodra
Not only that, but it's also a performance criteria: If you are
iterating on two ranges at once (think "co
On Wed, 26 Mar 2014 16:38:57 -, monarch_dodra
wrote:
On Wednesday, 26 March 2014 at 15:37:38 UTC, Steven Schveighoffer wrote:
Yes, but when you know that empty is going to return false, there isn't
any logical reason to call it. It is an awkward requirement.
-Steve
Not only that, bu
On Wed, 26 Mar 2014 15:37:38 -, Steven Schveighoffer
wrote:
On Wed, 26 Mar 2014 11:09:04 -0400, Regan Heath
wrote:
On Wed, 26 Mar 2014 12:30:53 -, Steven Schveighoffer
wrote:
Gah, I didn't cut out the right rules. I meant the two rules that
empty must be called b
On Wed, 26 Mar 2014 12:30:53 -, Steven Schveighoffer
wrote:
On Wed, 26 Mar 2014 08:29:15 -0400, Steven Schveighoffer
wrote:
On Wed, 26 Mar 2014 06:46:26 -0400, Regan Heath
wrote:
IMO the rules should be something like:
- r.empty WILL return false if there is more data available
On Tue, 25 Mar 2014 23:22:18 -, Walter Bright
wrote:
On 3/25/2014 2:29 PM, Andrei Alexandrescu wrote:
The range instance gets bigger and
more expensive to copy, and the cost of manipulating the flag and the
buffer is added to every loop iteration. Note that the user of a range
can trivia
On Tue, 25 Mar 2014 13:15:16 -, Timon Gehr wrote:
On 03/25/2014 02:08 PM, bearophile wrote:
Steve Teale:
The only place I have tended to use the comma operator is in ternary
expressions
bool universal;
atq = whatever? 0: universal = true, 42;
I classify that as quite tricky code, it'
On Mon, 24 Mar 2014 11:35:38 -, monarch_dodra
wrote:
On Monday, 24 March 2014 at 10:57:45 UTC, Regan Heath wrote:
On Sun, 23 Mar 2014 20:56:25 -, Andrei Alexandrescu
wrote:
Discuss: https://github.com/D-Programming-Language/dmd/pull/3399
Would it have any effect on:
int *p, q
On Sun, 23 Mar 2014 20:56:25 -, Andrei Alexandrescu
wrote:
Discuss: https://github.com/D-Programming-Language/dmd/pull/3399
Would it have any effect on:
int *p, q;
R
--
Using Opera's revolutionary email client: http://www.opera.com/mail/
On Mon, 24 Mar 2014 02:50:17 -, Adam D. Ruppe
wrote:
int a = something == 1 ? 1
: something == 2 ? 2
: (assert(0), 0);
FWIW I personally find this kind of code horrid. I would re-write to:
assert (something == 1 || something == 2);
int a = (something == 1 || something ==
On Thu, 20 Mar 2014 22:39:50 -, Walter Bright
wrote:
Currently we do it by throwing a UTFException. This has problems:
1. about anything that deals with UTF cannot be made nothrow
2. turns innocuous errors into major problems, such as DOS attack vectors
http://en.wikipedia.org/wiki/UTF-
On Tue, 18 Mar 2014 15:03:16 -, Dicebot wrote:
On Tuesday, 18 March 2014 at 14:57:30 UTC, Regan Heath wrote:
Why this fixation on "by"?
lines
allLines
eachLine
everyLine
R
range vs container. I expect file.lines to be separate fully allocated
entity that can be assigned
On Mon, 17 Mar 2014 12:38:23 -, bearophile
wrote:
Dmitry Olshansky:
f.lines?
There is already a lines in std.stdio (but I don't use it much), search
for:
foreach (string line; lines(stdin))
Here:
http://dlang.org/phobos/std_stdio.html
Does this do the same as byLine or does it
On Tue, 18 Mar 2014 14:09:05 -, Dicebot wrote:
On Tuesday, 18 March 2014 at 13:49:45 UTC, Steven Schveighoffer wrote:
On Sun, 16 Mar 2014 12:58:38 -0400, Andrei Alexandrescu
wrote:
A classic idiom for reading lines and keeping them is f.byLine.map!(x
=> x.idup) to get strings instead
On Sun, 16 Mar 2014 16:58:38 -, Andrei Alexandrescu
wrote:
A classic idiom for reading lines and keeping them is f.byLine.map!(x =>
x.idup) to get strings instead of the buffer etc.
The current behavior trips new users on occasion, and the idiom solving
it is very frequent. So what t
On Fri, 14 Mar 2014 14:46:33 -, 1100110 <0b1100...@gmail.com> wrote:
That's an awful lot of typo opportunities Quick! which one did I
change!?
Copy/paste.
R
--
Using Opera's revolutionary email client: http://www.opera.com/mail/
On Fri, 14 Mar 2014 10:22:40 -, 1100110 <0b1100...@gmail.com> wrote:
On 3/14/14, 4:58, Regan Heath wrote:
Maintenance is very slightly better too, IMO, because you
add/remove/alter a complete line rather than editing a set of || && etc
which can in some cases be a li
On Fri, 14 Mar 2014 11:37:07 -, Daniel Murphy
wrote:
"Walter Bright" wrote in message news:lfu74a$8cr$1...@digitalmars.com...
> No, it doesn't, because it is not usable if C introduces any virtual
> methods.
That's what the !final storage class is for.
My mistake, I forgot you'd s
On Thu, 13 Mar 2014 21:42:43 -, Walter Bright
wrote:
On 3/13/2014 1:09 PM, Andrei Alexandrescu wrote:
Also let's not forget that a bunch of people will have not had contact
with the
group and will not have read the respective thread. For them -- happy
campers
who get work done in D da
On Fri, 14 Mar 2014 08:51:05 -, 1100110 <0b1100...@gmail.com> wrote:
version (X86 || X86_64 || PPC || PPC64 || ARM || AArch64)
{
enum RTLD_LAZY = 0x1;
enum RTLD_NOW = 0x2;
enum RTLD_GLOBAL = 0x00100;
enum RTLD_LOCAL = 0x0;
}
On Thu, 06 Mar 2014 11:40:55 -, Kagamin wrote:
It can be a module pragma:
pragma(restrictImportTo,"core.sys.posix.ucontext")
module ports.linux.ucontext;
Good idea, then the platform specific modules can only define the platform
specific things.
But, it means when maintaining them yo
On Thu, 06 Mar 2014 11:17:36 -, Kagamin wrote:
On Wednesday, 5 March 2014 at 17:16:34 UTC, Regan Heath wrote:
It seems this will satisfy Walter without impacting Sean..
As I understand, the idea is that Sean get little trying to fix posix
standard: the only way to check if the code
On Wed, 05 Mar 2014 17:55:27 -, Iain Buclaw
wrote:
On 5 March 2014 17:16, Regan Heath wrote:
On Tue, 04 Mar 2014 00:09:46 -, Walter Bright
wrote:
This is an important debate going on here:
https://github.com/D-Programming-Language/druntime/pull/732
It has a wide impact, and so
On Tue, 04 Mar 2014 00:09:46 -, Walter Bright
wrote:
This is an important debate going on here:
https://github.com/D-Programming-Language/druntime/pull/732
It has a wide impact, and so I'm bringing it up here so everyone can
participate.
The disagreement here seems to boil down to
On Mon, 24 Feb 2014 17:58:51 -, Jesse Phillips
wrote:
On Monday, 24 February 2014 at 10:29:46 UTC, Regan Heath wrote:
No, not good enough. This should just work, there is no good reason
for it not to.
R
I have long since given up believing this should be in the language, I
On Fri, 21 Feb 2014 16:59:26 -, Justin Whear
wrote:
On Fri, 21 Feb 2014 10:02:43 +, Regan Heath wrote:
On Thu, 20 Feb 2014 16:30:42 -, Justin Whear
wrote:
On Thu, 20 Feb 2014 13:04:55 +, w0rp wrote:
More importantly, this gets in the way of behaviour which may be
On Fri, 21 Feb 2014 19:42:41 -, Jesse Phillips
wrote:
On Friday, 21 February 2014 at 16:41:00 UTC, Regan Heath wrote:
and make this possible too:
foreach([index, ]value; range) { }
I understand the user interface is simple, but you created 3 statements
about how it could be
On Fri, 21 Feb 2014 15:35:44 -, Jesse Phillips
wrote:
You've provided 3 schemes to support this feature. This suggest there
are several "right" ways to bring this into the language, while you
prefer 1 someone may prefer 3.
Ignore the 3 schemes they were just me thinking about how what
On Fri, 21 Feb 2014 14:29:37 -, Steven Schveighoffer
wrote:
On Fri, 21 Feb 2014 06:21:39 -0500, Regan Heath
wrote:
On Thu, 20 Feb 2014 17:09:31 -, Steven Schveighoffer
wrote:
On Thu, 20 Feb 2014 11:07:32 -0500, Regan Heath
wrote:
Only if the compiler prefers opApply to
On Thu, 20 Feb 2014 17:09:31 -, Steven Schveighoffer
wrote:
On Thu, 20 Feb 2014 11:07:32 -0500, Regan Heath
wrote:
Only if the compiler prefers opApply to range methods, does it?
It should. If it doesn't, that is a bug.
The sole purpose of opApply is to interact with foreac
em to think.
On Fri, 21 Feb 2014 02:34:28 -, Jesse Phillips
wrote:
On Thursday, 20 February 2014 at 11:15:14 UTC, Regan Heath wrote:
I am posting this again because I didn't get any feedback on my idea,
which may be TL;DR or because people think it's a dumb idea and they
On Fri, 21 Feb 2014 10:02:43 -, Regan Heath
wrote:
On Thu, 20 Feb 2014 16:30:42 -, Justin Whear
wrote:
On Thu, 20 Feb 2014 13:04:55 +, w0rp wrote:
More importantly, this gets in the way of behaviour which may be
desirable later, foreach being able to unpack tuples from
On Thu, 20 Feb 2014 16:30:42 -, Justin Whear
wrote:
On Thu, 20 Feb 2014 13:04:55 +, w0rp wrote:
More importantly, this gets in the way of behaviour which may be
desirable later, foreach being able to unpack tuples from ranges.
I would like if it was possible to return Tuple!(A, B) f
On Thu, 20 Feb 2014 13:04:55 -, w0rp wrote:
I don't think this is a good idea.
Which part? The initial solution to my initial problem, or one of the 3
schemes mentioned?
Say you have a class with range methods and add opApply later. Only the
opApply delegate receives a type other t
On Thu, 20 Feb 2014 12:56:27 -, Marc Schütz wrote:
IMO, any change needs to be both backwards-compatible (i.e., it should
not only "just work", as you phrased, but existing code should "just
keep working"), and forward-compatible, so as not to obstruct any
potential improvements of tup
I am posting this again because I didn't get any feedback on my idea,
which may be TL;DR or because people think it's a dumb idea and they were
politely ignoring it :p
My original thought was that things like this should "just work"..
auto range = input.byLine();
while(!range.empty)
{
rang
How many GC's do we get, if we build a D application linking it to a D
library statically, or dynamically, or by loading it at runtime?
It seems to me, that one thing people really want in this discussion is to
be able to select a single allocation strategy for their application,
regardless
On Wed, 29 Jan 2014 10:42:08 -, Dicebot wrote:
On Wednesday, 29 January 2014 at 10:13:44 UTC, Regan Heath wrote:
I will go and check in docs in most case if I have not encountered it
before. Check each time for every new aliases. I'd hate to have this
overhead.
Huh? Assumin
On Wed, 29 Jan 2014 06:49:30 -, Andrei Alexandrescu
wrote:
On 1/28/14 3:28 AM, Regan Heath wrote:
On Mon, 27 Jan 2014 16:19:54 -, Andrei Alexandrescu
wrote:
Walter doesn't like writing libraries so when he first defined Phobos'
string support he simply took the string fu
On Wed, 29 Jan 2014 09:52:01 -, Dicebot wrote:
On Tuesday, 28 January 2014 at 11:26:39 UTC, Regan Heath wrote:
No, you really don't.
If you're writing string code you will intuitively reach for
"substring", "contains", etc because you already know these
On Mon, 27 Jan 2014 16:19:54 -, Andrei Alexandrescu
wrote:
On 1/27/14 6:27 AM, Regan Heath wrote:
On Sat, 25 Jan 2014 10:15:28 -, Peter Alexander
wrote:
Special cases are pure evil. There's nothing special about strings in
this case.
This is a tangent to my suggestion.
On Mon, 27 Jan 2014 14:34:30 -, Dicebot wrote:
On Monday, 27 January 2014 at 14:27:42 UTC, Regan Heath wrote:
On Sat, 25 Jan 2014 10:15:28 -, Peter Alexander
wrote:
Special cases are pure evil. There's nothing special about strings in
this case.
This is a tangent
On Sat, 25 Jan 2014 10:15:28 -, Peter Alexander
wrote:
Special cases are pure evil. There's nothing special about strings in
this case.
This is a tangent to my suggestion.
I am arguing for domain specific language (aliases) where sensible, not
domain specific functions. If canFind ca
On Fri, 24 Jan 2014 08:36:07 -, Stanislav Blinov
wrote:
On Friday, 24 January 2014 at 08:21:12 UTC, Jacob Carlborg wrote:
On 2014-01-23 21:53, Andrei Alexandrescu wrote:
I would expect "contains" to take a element and check if it exists in
the range.
I think "canFind" is just a wei
On Thu, 23 Jan 2014 20:53:01 -, Andrei Alexandrescu
wrote:
On 1/23/14 8:06 AM, Regan Heath wrote:
This. Not my position. Rather I am suggesting we identify individual
omissions (like std.string.contains) and add an alias. So that people
don't have to struggle quite so much
On Fri, 24 Jan 2014 08:21:12 -, Jacob Carlborg wrote:
On 2014-01-23 21:53, Andrei Alexandrescu wrote:
Ionno. Just look at the current morass with
https://github.com/D-Programming-Language/phobos/pull/1875. We have two
names for the same function "canFind" and "any". Then we want to
deprec
On Wed, 22 Jan 2014 19:39:14 -, Andrei Alexandrescu
wrote:
On 1/13/14 4:53 AM, Regan Heath wrote:
On Fri, 10 Jan 2014 16:30:12 -, Andrei Alexandrescu
wrote:
The way I see it one learns a name for an algorithm (low cognitive
load) and then uses it everywhere. This is not Go.
Sure
On Fri, 17 Jan 2014 23:58:04 -, Marco Leise wrote:
Am Fri, 17 Jan 2014 21:38:18 +0100
schrieb Marco Leise :
Am Mon, 13 Jan 2014 11:40:19 -
schrieb "Regan Heath" :
> On Fri, 10 Jan 2014 19:47:07 -, H. S. Teoh
> wrote:
>
> > On Sat, Jan 11, 2014 at 02:
On Fri, 17 Jan 2014 05:29:05 -, H. S. Teoh
wrote:
Now, if we modify this sentinel to instead record the location of the
code that first initialized it (via __FILE__ and __LINE__ default
parameters perhaps), then we can set it up to print out this information
at a convenient juncture, so tha
On Mon, 13 Jan 2014 13:37:54 -, Olivier Pisano
wrote:
On Friday, 10 January 2014 at 14:02:13 UTC, Regan Heath wrote:
IIRC wchar_t is actually UCS-2 (called Multibyte by devenv and various
functions) which is a sub-set of UTF-16. So, calling a windows W
function with wchar[] could
On Fri, 10 Jan 2014 16:30:12 -, Andrei Alexandrescu
wrote:
On 1/10/14 6:07 AM, Regan Heath wrote:
On Fri, 10 Jan 2014 08:16:53 -, Andrei Alexandrescu
wrote:
On 1/9/14 11:56 PM, Jacob Carlborg wrote:
On 2014-01-10 02:34, Manu wrote:
Or just alias the functions useful for string
On Fri, 10 Jan 2014 19:47:07 -, H. S. Teoh
wrote:
On Sat, Jan 11, 2014 at 02:14:41AM +1000, Manu wrote:
[...]
One more, again here to reduce spam...
2 overloads exist:
void func(const(char)* str);
void func(const(char)[] str);
Called with literal string:
func("literal");
called with a
On Sat, 11 Jan 2014 10:04:44 -, Kagamin wrote:
On Friday, 10 January 2014 at 00:37:07 UTC, Adam D. Ruppe wrote:
I know there's other win32 bindings we can download, but for just the
common types, I like to use the built in aliases, and TCHAR, TSTR,
etc., are common in copy/pasted MSDN co
On Fri, 10 Jan 2014 09:56:45 -, Joseph Rushton Wakeling
wrote:
Can you recommend some good background reading for those of us who would
love to have some input (or at least insight) to this, but don't yet
have the theoretical understanding?
IMO, the Microsoft documentation for the C# G
On Fri, 10 Jan 2014 08:16:53 -, Andrei Alexandrescu
wrote:
On 1/9/14 11:56 PM, Jacob Carlborg wrote:
On 2014-01-10 02:34, Manu wrote:
Or just alias the functions useful for string processing...
I agree. It already has some aliases, converting to lower and uppercase.
I wouldn't want
On Thu, 09 Jan 2014 17:25:13 -, Manu wrote:
On 10 January 2014 03:17, Regan Heath wrote:
On Thu, 09 Jan 2014 17:15:41 -, Regan Heath
wrote:
In other words, why can't we alias or wrap the generic routines in
std.string
What I meant here is why can't we alias o
On Fri, 10 Jan 2014 00:37:06 -, Adam D. Ruppe
wrote:
Can we change this to alias wchar instead of char? While this would be a
breaking change, the ASCII Windows functions are arguably always wrong
to use with D since a D char* is NOT an ascii nor Windows encoded
string, so any code i
On Thu, 09 Jan 2014 14:07:36 -, Manu wrote:
This works fine:
string x = find("Hello", 'H');
This doesn't:
string y = find(retro("Hello"), 'H');
> Error: cannot implicitly convert expression (find(retro("Hello"),
'H'))
of type Result!() to string
Is that wrong? That seems to be how
On Thu, 09 Jan 2014 17:15:41 -, Regan Heath
wrote:
In other words, why can't we alias or wrap the generic routines in
std.string
What I meant here is why can't we alias or wrap the generic routines (from
std.range, std.algo.. into aliases/functions) in std.string.
R
On Sun, 05 Jan 2014 02:30:48 -, Manu wrote:
Hmm, so I jigged it so it's able to find mspdb100.dll, but now link.exe
complains: "The application was unable to start correctly (0xc07b)."
That's weird.
DLL load order on windows is a little weird. I suspec that that either
mspdb100.dll
On Mon, 30 Dec 2013 13:51:46 -, Jakob Ovrum
wrote:
On Monday, 30 December 2013 at 12:36:15 UTC, Regan Heath wrote:
Cue "empty vs null" theme music..
Empty vs null is not a factor here. It returns a string containing the
line terminator(s) for an empty line, but an em
On Sat, 28 Dec 2013 17:42:23 -, Jakob Ovrum
wrote:
On Saturday, 28 December 2013 at 17:23:30 UTC, Jeroen Bollen wrote:
Usually if you're working with a console though the input stream won't
exhaust and thus the blocking 'readln' would be a better option, no?
The blocking behaviour of
On Mon, 02 Dec 2013 13:27:32 -, Cooler wrote:
Stop hollywaring here.
Yeah, we're not. I am simply expressing an opinion and I'm not really
interested in the OP issue at this time.
R
On Sat, 30 Nov 2013 04:37:00 -, Peter Alexander
wrote:
On Friday, 29 November 2013 at 15:55:57 UTC, Regan Heath wrote:
On Fri, 29 Nov 2013 09:51:05 -, Peter Alexander
wrote:
On Friday, 29 November 2013 at 09:39:57 UTC, Cooler wrote:
On Friday, 29 November 2013 at 08:48:03 UTC
On Fri, 29 Nov 2013 09:51:05 -, Peter Alexander
wrote:
On Friday, 29 November 2013 at 09:39:57 UTC, Cooler wrote:
On Friday, 29 November 2013 at 08:48:03 UTC, Chris Cain wrote:
On Friday, 29 November 2013 at 08:32:12 UTC, Cooler wrote:
...
Try making fill array look more like this:
On Tue, 19 Nov 2013 03:29:48 -, Michel Fortin
wrote:
On 2013-11-18 23:42:13 +, "Jonathan M Davis"
said:
I understand this. The problem is that in some cases, in order to do the
check, you have to do all of the work that the function you're trying to
protect bad input from has to
On Tue, 12 Nov 2013 14:38:43 -, John Colvin
wrote:
On Tuesday, 12 November 2013 at 13:50:49 UTC, Jacob Carlborg wrote:
auto person = Person.where(e => e.name == "John");
Translates to:
select * from person where name = 'John'
for those of us entirely unfamiliar with linq, what is th
On Tue, 29 Oct 2013 20:38:08 -, Walter Bright
wrote:
https://news.ycombinator.com/item?id=6636811
I know that everyone is tired of hearing my airframe design stories, but
it's obvious to me that few engineers understand the principles of
failsafe design. This article makes that abund
point...
:)
On Fri, 25 Oct 2013 12:41:36 +0100, Kagamin wrote:
On Monday, 21 October 2013 at 10:33:01 UTC, Regan Heath wrote:
null strings are no different to null class references, they're not a
special case.
True. That's an implementation detail which has no meaning for business
1 - 100 of 475 matches
Mail list logo