We know that most of the time memory is allocated more than the
requested amount. Is there a way to take advantage of that extra
trailing space? (And potentially the pages that come after that.)
import core.memory;
void main()
{
const count = 1;
// I think there is extra capacity beyo
On Sunday, 18 May 2014 at 18:55:59 UTC, Tim wrote:
Hi everyone,
is there any chance to modify a char in a string like:
As you've seen, you cannot modify immutables (string is an
immutable(char)[]). If you actually do want the string to be
modifiable, you should define it as char[] instead.
Tim:
is there any chance to modify a char in a string like:
void main()
{
string sMyText = "Replace the last char_";
sMyText[$ - 1] = '.';
}
But when I execute the code above I'm always getting "cannot
modify immutable expression at sMyText[__dollar -1LU]". I
though D supported such mo
Hi everyone,
is there any chance to modify a char in a string like:
void main()
{
string sMyText = "Replace the last char_";
sMyText[$ - 1] = '.';
}
But when I execute the code above I'm always getting "cannot
modify immutable expression at sMyText[__dollar -1LU]". I though
D supported
On Sunday, 18 May 2014 at 07:37:33 UTC, Rikki Cattermole wrote:
My suggestion would be to go the direction of libvlc[0]. I did
find a forum post from SFML that may help you.
It is a c library so it shouldn't be too hard to create a
binding to. Perhaps something along the lines of
Derelict-Util[
For the compiler version, I've submitted a PR:
https://github.com/D-Programming-Language/dmd/pull/3558
Steffen Wenz:
Just noticed that using UFCS does not work for nested functions,
Right.
and was wondering whether that's intended, and what the
rationale behind it is:
Currently it's intended. Because doing otherwise causes other
problems with struct/class member functions. Perhaps there a
Hi,
Just noticed that using UFCS does not work for nested functions,
and was wondering whether that's intended, and what the rationale
behind it is:
class X {
void foo() {}
}
void main() {
// moving bar to module scope solves the error below
void bar(X x) {}
On 18/05/2014 7:10 p.m., Dmitry wrote:
Hi everyone!
I want to play video in my D-application (maybe WebM or Theora). However
didn't find any library for operation with video in D. I am a beginner
in D, experience of transfer of libraries with C/C++, certainly isn't
present.
Maybe somebody will pr
Meta:
You need to use the function array from std.array.
import std.array;
int[] source = [ ... ];
int[] sample = randomSample(source, 3).array();
In some cases it's also useful to use std.algorithm.copy:
void main() {
import std.stdio, std.algorithm, std.random, std.array,
Hi everyone!
I want to play video in my D-application (maybe WebM or Theora).
However didn't find any library for operation with video in D. I
am a beginner in D, experience of transfer of libraries with
C/C++, certainly isn't present.
Maybe somebody will prompt something?
P.S. My application
11 matches
Mail list logo