On Sunday, 14 August 2022 at 02:30:43 UTC, Paul Backus wrote:
On Sunday, 14 August 2022 at 02:07:05 UTC, Ali Çehreli wrote:
This automatic "combining" of exceptions happens for cleanup
code like scope(exit). (I remember bug(s) for scope(failure).):
To be precise, an exception thrown inside
On Monday, 14 September 2020 at 09:08:01 UTC, Seb wrote:
You likely want to get involved / raise your support here:
https://github.com/dlang/phobos/pull/7600
Oh this is great, thank you!
-
import std.range;
import std.stdio;
void main ()
{
auto range = sequence!((a, n) => n);
// works, but the chunks are all the same length
auto rngs = range.chunks(4);
writeln(rngs[0]);
writeln(rngs[1]);
writeln(rngs[2]);
// want this
auto ranges =
On Friday, 28 August 2020 at 12:35:26 UTC, Steven Schveighoffer
wrote:
It's trying to look up the local timezone at compile time.
You need to specify a time zone:
static time =
SysTime(DateTime.fromISOString("20220101T00"),
UTC()).toUnixTime;
-Steve
Aw, thanks Steve!
On Friday, 28 August 2020 at 01:54:02 UTC, Andrej Mitrovic wrote:
-
import std.datetime;
void main ()
{
static time =
SysTime(DateTime.fromISOString("20220101T00")).toUnixTime;
}
-
I think I'm supposed to use MonoTime here, right?
-
import std.datetime;
void main ()
{
static time =
SysTime(DateTime.fromISOString("20220101T00")).toUnixTime;
}
-
-
/Library/D/dmd/src/phobos/std/concurrency.d(2574): Error: static
variable lock cannot be read at compile time
On Wednesday, 5 August 2020 at 16:13:19 UTC, Andrej Mitrovic
wrote:
```
C:\dev> rdmd -m64 --eval="import core.stdc.time;
writeln(time_t.sizeof);"
4
```
According to MSDN this should not be the case:
https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/time-time32-t
On Wednesday, 5 August 2020 at 16:13:19 UTC, Andrej Mitrovic
wrote:
```
C:\dev> rdmd -m64 --eval="import core.stdc.time;
writeln(time_t.sizeof);"
4
```
According to MSDN this should not be the case:
https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/time-time32-t
```
C:\dev> rdmd -m64 --eval="import core.stdc.time;
writeln(time_t.sizeof);"
4
```
According to MSDN this should not be the case:
https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/time-time32-time64?view=vs-2019
time is a wrapper for _time64 and **time_t is, by default,
From:
https://github.com/dlang/phobos/blob/10b9174ddcadac52f6a1ea532deab3310d3a8c03/std/concurrency.d#L1913-L1916:
-
///
final @property bool isClosed() @safe @nogc pure
{
synchronized (m_lock)
{
return m_closed;
}
}
-
I don't understand the purpose of this lock.
On Monday, 22 April 2019 at 04:12:11 UTC, Andrej Mitrovic wrote:
Or perhaps for any other editor so I could adapt it and have
syntax highlighting in Sublime when viewing .dt files.
In the meantime I found this:
https://packagecontrol.io/packages/Pug
It seems to work fairly well.
Or perhaps for any other editor so I could adapt it and have
syntax highlighting in Sublime when viewing .dt files.
On 6/9/16, Joerg Joergonson via Digitalmars-d-learn
<digitalmars-d-learn@puremagic.com> wrote:
> Why would bindings have any issues with licensing?
Just to show that I'm not full of shit, here's the e-mail chain:
On 6/3/11, Andrej Mitrovic <andrej.mitrov...@gmail.com> wrote:
&
I do have (Steinberg) ASIO binding in D.
The problem is I couldn't release the bindings. I've asked Steinberg
if it was OK to release D bindings and they were strongly against it
unfortunately (and this was over 3 years ago..).
Any kind of direct use of ASIO requires their approval first..
On Thursday, 2 June 2016 at 13:04:00 UTC, ciechowoj wrote:
and found that an assert from `std/path.d:3168` (`globMatch`)
contributes a major amount to the running time of dub.
```
assert(balancedParens(pattern, '[', ']', 0));
assert(balancedParens(pattern, '{', '}', 0));
```
Hmm..
On 6/5/16, Anonymous via Digitalmars-d-learn
wrote:
> Should I report this as a dmd bug then? Not sure where / how to
> do that.
You can report it here: https://issues.dlang.org
> I think I'll just let it go; I was able to work passed it anyway
> using "static
On 6/5/16, Anonymous via Digitalmars-d-learn
wrote:
> static Note[0] empty;
>
> Note[] getNotes(string id)
> {
> return (id in store) ? store[id] : empty;
> }
It's likely an accepts-invalid bug, meaning it
On 8/1/15, DLearner via Digitalmars-d-learn
digitalmars-d-learn@puremagic.com wrote:
D is a C derivative, so it seems a shame not to identify causes
of bugs in C,
and design them out in D.
This has already been done! D defines an array to be a struct with a
pointer and a length. See this
On 4/6/15, Jonathan via Digitalmars-d-learn
digitalmars-d-learn@puremagic.com wrote:
What's the best way to do this? I'm assuming this should be best
practice:
http://dlang.org/traits.html#isSame
struct S { }
writeln(__traits(isSame, S, S));
I'm not even sure when or why this trait was
On 1/1/15, Peter Alexander via Digitalmars-d-learn
digitalmars-d-learn@puremagic.com wrote:
The order is unspecified, but an iteration must iterate in *some*
order. The question (if I've understood it correctly), is whether
that order of iteration changes when the keys aren't changed.
Hmm
On 1/1/15, Idan Arye via Digitalmars-d-learn
digitalmars-d-learn@puremagic.com wrote:
If I have an associative array and I only modify it's values,
without changing the keys, can I assume that the order won't
change?
Associative arrays are not ordered at all.
See the first note here:
On 1/1/15, H. S. Teoh via Digitalmars-d-learn
digitalmars-d-learn@puremagic.com wrote:
If you need consistent ordering of values, you probably want a different
data structure, like an ordered map
This one works nicely on D1, I'd imagine the D2 port works just the same:
On 1/1/15, Tobias Pankrath via Digitalmars-d-learn
digitalmars-d-learn@puremagic.com wrote:
You could implement an OrderedMap!(Key, Value) via
RedBlackTree!(Tuple!(Key, Value), (a,b) = a[0] b[0]).
We could add this as an alias into Phobos or perhaps as just a
documentation line on the website.
On Nov 5, 2014 12:10 PM, Bauss via Digitalmars-d-learn
digitalmars-d-learn@puremagic.com wrote:
Is there any way to track down access violations, instead of me having to
look through my source code manually.
Whenever you don't get a stack trace on Windows, it's 99% guaranteed you're
calling a
On 8/29/14, Robin Schroer via Digitalmars-d-learn
digitalmars-d-learn@puremagic.com wrote:
I definitely reload after setting the context and before trying
to render.
Typically these kinds of errors happen when a null function pointer is
called. I'd add a few checks in some places to see what
On 7/9/14, Mike Parker via Digitalmars-d-learn
digitalmars-d-learn@puremagic.com wrote:
Is it safe to assume that __VERSION__ is the same among DMD, LDC and GDC
when using the equivalent front-end?
Yes, but not all future compilers might implement this (although I
hope they will). I think
On Saturday, June 21, 2014, Paul via Digitalmars-d-learn
digitalmars-d-learn@puremagic.com wrote:
IS there such method get(key, default) for associative arrays, like in
Python?
I think it's named getDefault, try that.
On Saturday, June 21, 2014, Paul D Anderson via Digitalmars-d-learn
digitalmars-d-learn@puremagic.com wrote:
Does enum have any effect on functions?
I think that's just a parser bug.
This has been asked so many times, is this info not on the website? We
should have an article on the site explaining this in depth. OT: Sorry for
top-quoting and over-quoting.
On Friday, May 30, 2014, monarch_dodra via Digitalmars-d-learn
digitalmars-d-learn@puremagic.com wrote:
On Friday, 30
On 5/24/14, Vlad Levenfeld via Digitalmars-d-learn
digitalmars-d-learn@puremagic.com wrote:
Any attempt to set callbacks in GLFW returns a null and the
callback doesn't work.
The first enforcement fails in this example:
DerelictGLFW3.load ();
enforce (glfwSetErrorCallback (error_callback));
On 5/6/14, bearophile via Digitalmars-d-learn
digitalmars-d-learn@puremagic.com wrote:
There is now std.traits.isInstanceOf that could do what you need.
Someone resurrected a thread from 2011. Of course there's isInstanceOf
when I added it myself at the end of 2012.
On 5/2/14, ref2401 via Digitalmars-d-learn
digitalmars-d-learn@puremagic.com wrote:
class MyClass {
Appender!string _stringBuilder;
this() {
_stringBuilder = Appender!string(null);
_stringBuilder.clear();
Ouch, ouch, ouch! What's happening is that the
On 4/29/14, Dicebot via Digitalmars-d-learn
digitalmars-d-learn@puremagic.com wrote:
The fact that call to base constructor is not inserted into
templated this()() looks like a bug to me.
Just found this, and it might be related:
https://issues.dlang.org/show_bug.cgi?id=5770
On Monday, 28 April 2014 at 13:52:52 UTC, ParticlePeter wrote:
DMD tells me Error: variable m cannot be read at compile
time, but why ?
Because 'static foreach' is not an explicit feature yet, so it
depends on the context. When you wrap the trait via:
[__traits(allMembers, MyStruct)]
On 4/28/14, ParticlePeter via Digitalmars-d-learn
digitalmars-d-learn@puremagic.com wrote:
I found the code with parenthesis in the dlang __traits docs and
also Philippe Sigauds D Templates, and I haven't seen any other
example which works without them. So, when to use which syntax (
for which
On 4/27/14, Damian Day via Digitalmars-d-learn
digitalmars-d-learn@puremagic.com wrote:
So I have this procedure.
Have a look at std.exception.assumeWontThrow:
http://dlang.org/phobos/std_exception.html#.assumeWontThrow
On 4/26/14, Jonathan M Davis via Digitalmars-d-learn
digitalmars-d-learn@puremagic.com wrote:
No. That's expected.
I wonder whether a better diagnostic could help. But then again, maybe
the hiding would be intentional and the diagnostic would be
spurious/invalid. Not sure..
On 4/24/14, monarch_dodra via Digitalmars-d-learn
digitalmars-d-learn@puremagic.com wrote:
*That* creates a conflict though :/
Are you sure? I can't reproduce.
On 4/22/14, Tim Holzschuh via Digitalmars-d-learn
digitalmars-d-learn@puremagic.com wrote:
What does (inout int = 0) mean/affect here?
This was asked recently, see my reponse here:
http://forum.dlang.org/post/mailman.102.1396007039.25518.digitalmars-d-le...@puremagic.com
On Tuesday, 22 April 2014 at 15:19:55 UTC, Andre wrote:
Is the cast really needed?
It's a known issue and a filed bug report. I don't have the Issue
number at hand though, someone else will likely provide it.
On 4/22/14, Steven Schveighoffer via Digitalmars-d-learn
digitalmars-d-learn@puremagic.com I think this can be fixed a
different way.
Feel free to file a bug / make a pull. :
On 4/18/14, monarch_dodra via Digitalmars-d-learn
digitalmars-d-learn@puremagic.com wrote:
Yeah... static assert(void.sizeof == 1); passes :/
Note that you can even have static void arrays. E.g.:
https://issues.dlang.org/show_bug.cgi?id=9691
I'm not sure whether this is an oversight
On 4/19/14, Lars T. Kyllingstad via Digitalmars-d-learn
digitalmars-d-learn@puremagic.com wrote:
Say I have two structs, defined like this:
struct A { /* could contain whatever */ }
struct B { A a; }
My question is, is it now guaranteed that A.sizeof==B.sizeof?
The best thing to
On 4/19/14, matovitch via Digitalmars-d-learn
digitalmars-d-learn@puremagic.com wrote:
This won't compile :
import std.stdio;
void main()
{
Test t;
t.data = [152, 32, 64, 28, 95];
float b = t.get;
writefln(%s, b);
}
Because it's probably overkill. At some point
On 4/15/14, Artur Skawina art.08...@gmail.com wrote:
It *is* true. Classes are /reference types/, not references to classes.
I meant the part where he said you can't cast a reference to a pointer. You can.
On 4/15/14, Dicebot pub...@dicebot.lv wrote:
In general .stringof output is not defined by spec and is not
guaranteed to stay same between releases.
The spec mentions this as well:
http://dlang.org/property.html#stringof
Quote:
-
Note: Using .stringof for code generation is not
On 4/15/14, Artur Skawina art.08...@gmail.com wrote:
He obviously meant that you can't get a pointer to the object, that the
reference points to, just by casting and w/o address-of.
Ah right. I don't do this often so I forgot. The proper code would be:
int* f(ref int r) { return r; }
On Monday, 14 April 2014 at 17:48:31 UTC, Adam D. Ruppe wrote:
On Monday, 14 April 2014 at 17:45:52 UTC, Ryan Voots wrote:
src/yage/core/misc.d(164): Error: e2ir: cannot cast this of
type S to type void*
Try taking the address of this before casting it. So more like
cast(void*)this
IIRC
On Monday, 14 April 2014 at 17:45:52 UTC, Ryan Voots wrote:
/**
* Convert any function pointer to a delegate.
* _ From: http://www.digitalmars.com/d/archives/digitalmars
You can replaced it with std.functional.toDelegate.
As for its use-case, if some API or function supports only
delegates
On Thursday, 27 March 2014 at 00:46:33 UTC, Etienne wrote:
Hi,
I'm trying to send a delegate to a modified version of
druntime's GC as follows:
struct GC {
static void onCollect(void* dg)
{
gc_onCollect(cast(void*)dg);
}
There isn't enough
On Monday, 10 March 2014 at 22:45:36 UTC, Pasqui23 wrote:
Hi.
I was editing std.string,but when I tried to compile it it game
me this error:
One of the errors in git-head is:
test.d(553): Error: undefined identifier S
Check your constraints, isSomeString!S should have been
isSomeString!S1 or
On Sunday, 9 March 2014 at 12:14:43 UTC, bioifornatics wrote:
Firstly build way describe at
https://github.com/CyberShadow/DustMite/wiki/Building-DustMite
seem to be wrong as dsplit.d was rename as splitter.d
Anyone can edit the wiki. But this was fixed now.
Secondly build fail take a look
On Friday, 7 March 2014 at 09:26:27 UTC, Cooler wrote:
import std.process;
int main(string[]){
// Next line will generate error message from cmd.exe
spawnProcess([cmd.exe, /C, echo]).wait();
return 0;
}
I'm not sure, but maybe file a bug so this gets some attention:
On 4/12/14, user u...@user.com wrote:
Never mind, just discovered __PRETTY_FUNCTION__.
Yes and there's also __FUNCTION__.
Philippe Sigaud's book[1] had a nice trick of extracting the current
function name with a single template instantiation, but I can't find
it in his template book. There's a
On 4/12/14, monarch_dodra monarchdo...@gmail.com wrote:
I know you can workaround it by putting
your functions a static members of a dummy struct
You can also use a mixin template:
class A {}
class B {}
mixin template M()
{
void func2(A a) { }
void func2(B b) { }
}
void main()
{
On 4/4/14, Meta jared...@gmail.com wrote:
alias TemplateArgs(T: Foo!U, U) = U;
It's also in std.traits, TemplateArgsOf, which is more complete.
On 4/2/14, Dicebot pub...@dicebot.lv wrote:
D main != C main, latter is implemented in D runtime to call the
former. 0 will be also returned by latter, not the former.
Actually, the compiler injects a return statement in D's main.
It generates the actual C main function (unless WinMain/DllMain
On 3/27/14, Atila Neves atila.ne...@gmail.com wrote:
Why the (inout int = 0) instead of an empty parameter list?
Try removing it and compile std.range with -unittest. Here's what happens:
std\range.d(546): Error: static assert (isInputRange!(inout(int)[])) is false
The reason it's false is
On 3/26/14, ketmar nobodyherethismailsu...@gmail.com wrote:
is there any trait to check if variable is __gshared? typeof()
for '__gshared int' returns just 'int', whereas for 'shared int'
it returns 'shared(int)'. can i check for __gshared storage class
somehow?
Please file this as an
On 3/26/14, Andrej Mitrovic andrej.mitrov...@gmail.com wrote:
Please file this as an enhancement request to bugzilla[1]. Thanks!
[1] : https://d.puremagic.com/issues/enter_bug.cgi?product=D
Ok filed as:
https://d.puremagic.com/issues/show_bug.cgi?id=12474
On Tuesday, 25 March 2014 at 14:43:18 UTC, Spacen Jasset wrote:
I caught a FileException, and want to print out the descriptive
error, but not the stacktrace.
Try writing the exception's 'msg' field (it's a string).
There is also 'file' and 'line'. See the class Throwable (in
object.d or
On 3/23/14, Uranuz neura...@gmail.com wrote:
I have a question how I could combine template parameters
deduction with setting default values for template parameters. I
will start directly from a piece of code.
You can use eponymous templates for this. E.g.:
-
template
On 3/23/14, Philippe Sigaud philippe.sig...@gmail.com wrote:
But this is not accepted by the grammar right now, because of __traits()
Pretty sure it's because you're using 'alias' instead of 'enum'. This works:
-
enum isSomething(T) = __traits(compiles,
{
int up;
On 3/23/14, Philippe Sigaud philippe.sig...@gmail.com wrote:
Now, if only __traits could be beautified somewhat... I mean: everyone
is using it, it's time to make it more palatable.
That's what std.traits is for, to hide the __traits and is() uglyness.
On 3/19/14, Adam D. Ruppe destructiona...@gmail.com wrote:
Is there anything we can do with static if to identify it as a
template?
https://github.com/D-Programming-Language/dmd/pull/3380
And after we determine it is a template, can we extract the
required arguments list like we can with a
On 3/16/14, Sergei Nosov sergei.no...@gmail.com wrote:
Thx! That's better, but I think -main switch could be made to
work like 'add or replace main by stub' instead of just 'add'. I
don't think it'll hurt anybody, what do you think?
It can't work, because main could be stored in a pre-built
On 3/16/14, PhilE theotherp...@hotmail.com wrote:
When using both simpleimage and DWT my program crashes with
core.exception.InvalidMemoryOperationError
It's likely something is trying to allocate in a destructor.
On 2/24/14, bearophile bearophileh...@lycos.com wrote:
The OP wants minimallyInitializedArray. uninitializedArray is
only for special situations.
There needs to be a ddoc-ed sample demonstrating *exactly* what the
difference between minimallyInitializedArray and uninitializedArray
is.
-
import std.math;
import std.stdio;
void main()
{
writefln(nextUp of %a is %a, 1.0, 1.0.nextUp());
real num = 1.0;
writefln(nextUp of %a is %a, num, num.nextUp());
}
-
This prints:
nextUp of 0x1p+0 is 0x1.1p+0
nextUp of 0x1p+0 is 0x1.0002p+0
Any
On 2/16/14, Andrej Mitrovic andrej.mitrov...@gmail.com wrote:
Any idea why the results are different?
Interestingly the literal versions end up calling nextUp which takes a
double rather than a real. So nextUp(1.0) calls the double overload,
nextUp(num) calls the real overload. Mystery solved.
On Sunday, 2 February 2014 at 17:40:47 UTC, TheFlyingFiddle wrote:
Why is std.array litered with @trusted delegates?
IIRC these were added in the last few releases to make code
CTFE-able or to allow pure code to call such functions. A lot of
array/string-processing code wasn't usable from
On 2/2/14, Jesse Phillips jesse.k.phillip...@gmail.com wrote:
Pretty sure @trusted only affect the use of @safe and never makes
CTFE work.
This is what I remember, it has a huge diff and has lots of these
trusted lambdas in it:
https://github.com/D-Programming-Language/phobos/pull/1337/files
On Saturday, 1 February 2014 at 22:47:54 UTC, deed wrote:
Docs say:
- std.stdio.byLine returns an input range
- std.array.array takes an input range
Docs also say:
/**
Note:
Each $(D front) will not persist after $(D
popFront) is called, so the caller must copy its contents (e.g. by
calling
On 1/31/14, Meta jared...@gmail.com wrote:
You might want to file a bug report as well about the utterly
obtuse error message.
Yes, please file this as a bug. Thanks!
On Thursday, 30 January 2014 at 21:28:08 UTC, Martijn Pot wrote:
Error 42: Symbol Undefined
_D1a14Transmogrifier12transmogrifyMFZv (void
a.Transmogrifier.transmogrify())
Typically that means the function isn't implemented, e.g. this:
void transmogrify();
instead of this:
void
On 1/30/14, Martijn Pot martijnpo...@gmail.com wrote:
Indeed, making them public solved the problem. Is there more
stuff in the book that isn't working?
Check the errata page[1], which coincidentally seems to be down. I'll CC Andrei.
[1]: http://erdani.com/tdpl/errata/index.php?title=Main_Page
On 1/30/14, Andrej Mitrovic andrej.mitrov...@gmail.com wrote:
On 1/30/14, Martijn Pot martijnpo...@gmail.com wrote:
Indeed, making them public solved the problem. Is there more
stuff in the book that isn't working?
Check the errata page[1], which coincidentally seems to be down. I'll CC
On 1/29/14, Jakob Ovrum jakobov...@gmail.com wrote:
On a related note, I would like the body of a template to be able
to access aliases introduced in IsExpression's in the template's
constraints.
Me too, but I can't remember if this was filed in bugzilla.
On 1/28/14, Chris wend...@tcd.ie wrote:
Is there a simple way to trick the compiler (e.g. with alias), if
a keyword conflicts with a function/method, e.g. as in a HTML
document:
auto docBody = document.body;
body is probably the most frequent issue I run into when porting
C/C++ code to D.
I
On 1/16/14, Philippe Sigaud philippe.sig...@gmail.com wrote:
The thing is, an array is a reference type
Actually it's not, let's not confuse people with the terminology here.
To recap for people new to arrays: an array in D is really just a
struct, e.g.:
struct Array
{
int* data;
size_t
On 1/7/14, Craig Dillabaugh cdill...@cg.scs.carleton.ca wrote:
In other words while:
auto range = aa.byKey.map!(a = chain(a.only, aa[a].only));
string[] array = range.join;
Saves a few lines of code, and looks cooler, it seems that the
trivial foreach loop version is very easy:
On Friday, 3 January 2014 at 17:38:16 UTC, Gary Willoughby wrote:
I know it can be done via a loop, but is there a more idiomatic
way to achieve this?
import std.algorithm;
import std.range;
import std.stdio;
void main()
{
auto aa = [one:1, two:2];
auto range = aa.byKey.map!(a =
On Friday, 3 January 2014 at 17:47:43 UTC, bearophile wrote:
string[] r = aa.byKey.map!(k = [k, aa[k]]).join;
However the [k, aa[k]] expression will allocate an array for each
key you iterate over regardless if you use join or joiner. I
posted a solution with only, hope that works. :)
On 12/26/13, bearophile bearophileh...@lycos.com wrote:
You have to explain such things in the main D newsgroup. D.learn
newsgroup is not fit for such requests.
There have already been a million of these threads, it's worth doing a
search as there's probably lots of answers there.
On 12/20/13, Jacob Carlborg d...@me.com wrote:
You cannot overload a standard function with a template
function, or has that been fixed?
That was fixed in 2.064+
On 12/20/13, kdmult kdm...@ya.ru wrote:
But why the order of the
declarations has an effect on the compilation result.
I think you should file this as a bug.
On 12/20/13, Jacob Carlborg d...@me.com wrote:
On 2013-12-20 09:42, Andrej Mitrovic wrote:
That was fixed in 2.064+
Cool, finally :)
Yeah, it caused many headaches. Fixed thanks to Kenji, of course (who else?).
On 12/17/13, Leandro Motta Barros l...@stackedboxes.org wrote:
Is there any documentation describing the expected to behavior in regard to
the fully-qualified names of the publicly imported symbols in package.d?
It might have been an oversight, but we'll have to wait for (I think
Kenji) to
I'm reading through http://www.regular-expressions.info, and there's a
feature that's missing from std.regex, quoted:
-
All the characters between the \Q and the \E are interpreted as
literal characters. E.g. \Q*\d+*\E matches the literal text *\d+*. The
\E may be omitted at the end of the
On 12/18/13, Dmitry Olshansky dmitry.o...@gmail.com wrote:
By the end of day any feature is interesting as long as we carefully
weight:
- how useful a feature is
- how widespread the syntax/how many precedents in other libraries
against
- how difficult to implement
- does it affect
On 12/18/13, Dmitry Olshansky dmitry.o...@gmail.com wrote:
P.S. This reminds me to put a roadmap of sorts on where std.regex is
going and what to expect.
Btw one thing I'm not fond of is the format specifiers, in particular:
$` part of input preceding the match.
$' part of input
On 12/18/13, Dmitry Olshansky dmitry.o...@gmail.com wrote:
The precedent is Perl. A heavy influencer on the (former) std.regex design.
http://perldoc.perl.org/perlre.html#Capture-groups
(grep for $')
Ah, classic Perl. Write once - don't bother to read ever again. :p
On 12/17/13, monarch_dodra monarchdo...@gmail.com wrote:
Didn't I reply to this already?
dlang.org was down recently, maybe the forum was as well. :)
Anyways... what I said is that we can add the test in
non-release, but I see it as assertive code, so it can be removed
in release.
Sure:
Here's some improper code that is not checked properly by SList
(meaning no assertions, not even in debug mode):
-
import std.stdio;
import std.container;
void main()
{
auto s1 = SList!string([a, b, d]);
auto s2 = SList!string([a, b, d]);
// note the s1[] instead of s2[]!
On 12/15/13, Philippe Sigaud philippe.sig...@gmail.com wrote:
http://dlang.org/phobos/std_math.html#.pow
See the fourth overload: `if (isFloatingPoint!F isFloatingPoint!G)`.
Is there any difference between using `a ^^ b` and `pow(a,b)`?
Depends on whether the arguments are known at
On 12/15/13, Ross Hays t...@gmail.com wrote:
Am I doing something wrong here?
You're likely not loading the function pointers first. Try calling
DerelictGL.reload() first.
On 11/17/13, Ali Çehreli acehr...@yahoo.com wrote:
It allows changing the actual object that the caller had.
Technically no, it changes the reference in the caller, not the actual
object itself. That object is likely still alive until collected if
there are no other references to it.
On 11/14/13, Philippe Sigaud philippe.sig...@gmail.com wrote:
- I'd greatly like for those sets or hash tables to be
CTFE-compatible.
Well if it's only used in CTFE, I'd imagine a simple struct wrapping
an array and doing !canFind when adding elements would do the job,
no?
On 11/13/13, Adam D. Ruppe destructiona...@gmail.com wrote:
On Wednesday, 13 November 2013 at 08:16:34 UTC, Tor Einar
Tønnessen wrote:
void writeln(string a0, int a1, string a2, int[new] a3) {
Around the time the book was written, there was a debate as to if
we should make dynamic arrays and
On 11/13/13, Jeroen Bollen jbin...@gmail.com wrote:
I feel there is a lack of resources/documentation on array
definitions. I cannot believe the official documentation tries to
explain how D handles arrays without defining an array a single
time.
http://dlang.org/arrays.html
See if this
1 - 100 of 1449 matches
Mail list logo