On Tuesday, 21 March 2023 at 16:57:49 UTC, monkyyy wrote:
My current method of making videos of using raylib to generate
screenshots, throwing those screenshots into a folder and
calling a magic ffmpeg command is ... slow.
Why not use ffmpeg as a library? Here are the
I’ve read this [series if
articles](https://www.gamedeveloper.com/design/decision-modeling-and-optimization-in-game-design-part-1-introduction) about using Excel Solver for all kinds of optimization problems. This is very neat, but of course, I would prefer to write models with code instead,
On Thursday, 29 September 2022 at 12:49:06 UTC, Riccardo M wrote:
On Thursday, 29 September 2022 at 11:13:15 UTC, Ogi wrote:
So it turns out that D's structs are a much better match for
C++'s classes in this case. But why is this? Can you elaborate?
It must have to do with the fact that D
On Wednesday, 28 September 2022 at 19:57:10 UTC, Riccardo M wrote:
I think I am stuck in the easiest of the issues and yet it
seems I cannot get around this.
I have a C++ file:
```
class MyClass {
public:
int field;
MyClass(int a) : field(a) {}
int add(int asd) {
return asd
On Wednesday, 17 August 2022 at 10:38:33 UTC, Dennis wrote:
I had the same problem, and came up with the following trick:
```D
enum itoa(int i) = i.stringof;
enum major = 3;
enum minor = 2;
enum patch = 1;
enum versionString = itoa!major ~ "." ~ itoa!minor ~ "." ~
itoa!patch;
static
It’s 2022 already and BetterC still imposes limits at compile
time and makes things awkward.
I have 3 integer enums that represents my library version. And I
want to generate a "1.2.3" enum from them. This is a trivial
thing to do in standard D but I can’t find a way to do it with
BetterC
On Friday, 10 July 2020 at 19:23:57 UTC, Steven Schveighoffer
wrote:
It's not linear over the size of the list, it's linear over the
size of the range.
If you are always removing 1 element, it's effectively O(1).
-Steve
I see. Thanks!
auto list = DList!int([1, 2, 3, 4]);
list.remove(list[].find(2).take(1));
Error: function
std.container.dlist.DList!int.DList.remove(Range r) is not
callable using argument types (Take!(Range))
It works if I replace `remove` with `linearRemove`, but that
defeats the whole purpose of using a
struct R {}
int front(R r) { return 42; }
void popFront(R r) {}
bool empty(R r) { return false; }
void main() {
import std.range.primitives : isInputRange;
static assert(isInputRange!R);
}
Error: static assert: `isInputRange!(R)` is false
Whats really weird is that if I replace
If your goal is to debug your @nogc code, you can use writeln in
debug statement:
@nogc void main() {
debug writeln("hello, debug world!");
}
10 matches
Mail list logo