Re: Some questions with D and webassembly

2023-03-03 Thread TheZipCreator via Digitalmars-d-learn
On Friday, 3 March 2023 at 13:42:55 UTC, ryuukk_ wrote: On Friday, 3 March 2023 at 03:32:37 UTC, TheZipCreator wrote: [...] https://discourse.llvm.org/t/rfc-webassembly-reference-types-in-clang/66939 it says it is an opaque type, maybe just need to be ``void*``? Also there are new

Some questions with D and webassembly

2023-03-02 Thread TheZipCreator via Digitalmars-d-learn
In webassembly, there's a type called `externref`, which opaquely represents a javascript object. So, you could do this for example, with this javascript: ```js class Foo { constructor(x) { this.x = x; } } const imports = { env: { fooNew:

Re: Coding Challenges - Dlang or Generic

2023-01-14 Thread TheZipCreator via Digitalmars-d-learn
On Tuesday, 10 January 2023 at 00:17:18 UTC, Paul wrote: Greetings Dlang-ers I was wondering if anyone knew of any coding challenges available where the input and output are specified and its left to the programmer to find a solution? Free would be nice but even paid services would be worth

Re: Mixin helper help

2023-01-14 Thread TheZipCreator via Digitalmars-d-learn
On Thursday, 12 January 2023 at 08:03:34 UTC, John Chapman wrote: I'm obviously doing something wrong, but don't quite understand. ```d mixin template helper() { mixin("writeln(12);"); } struct Foo { void opDispatch(string name)() { import std.stdio; mixin helper!();

GDC binary for windows?

2022-12-15 Thread TheZipCreator via Digitalmars-d-learn
is there a compiled binary of GDC anywhere? I looked at https://www.gdcproject.org/downloads, and the link there goes to winlibs, but after downloading the archive I couldn't find gdc anywhere in it. I did some research and [it appears they removed

Re: Seeking in arsd.simpleaudio?

2022-11-20 Thread TheZipCreator via Digitalmars-d-learn
On Sunday, 20 November 2022 at 23:03:49 UTC, Adam D Ruppe wrote: Here's the patch for ogg, you can download those two files off git master too works great! thanks

Re: Seeking in arsd.simpleaudio?

2022-11-20 Thread TheZipCreator via Digitalmars-d-learn
On Sunday, 20 November 2022 at 21:57:03 UTC, Adam D Ruppe wrote: On Sunday, 20 November 2022 at 20:34:44 UTC, Adam D Ruppe wrote: i'll get back to you in a lil i went overbudget lol. but yeah the seek function in the underlying lib fails and idk why it is so hard to even trace what error

Seeking in arsd.simpleaudio?

2022-11-20 Thread TheZipCreator via Digitalmars-d-learn
I'm currently making a library to do programmatic animation (akin to [manim](https://www.manim.community/) but for D and a different style) and for audio arsd.simpleaudio seems like the only real option (all the others I could find are too low-level for my taste) but if I want to skip to a

Re: How do I get line numbers using pegged?

2022-08-15 Thread TheZipCreator via Digitalmars-d-learn
On Monday, 15 August 2022 at 23:38:09 UTC, Paul Backus wrote: On Monday, 15 August 2022 at 22:55:30 UTC, TheZipCreator wrote: [...] It looks like the parse tree in pegged stores the start and end byte indices of the portion of the input text it corresponds to:

How do I get line numbers using pegged?

2022-08-15 Thread TheZipCreator via Digitalmars-d-learn
So I've looked at the [pegged library](https://github.com/PhilippeSigaud/Pegged) and used it a little bit and it seems really good. But there doesn't seem like there's a built-in way to get line numbers of nodes in the parse tree (or maybe I'm missing something). This would useful because if

Interfacing with user-supplied binary or obj file

2022-07-31 Thread TheZipCreator via Digitalmars-d-learn
So I'm making an interpreter for my custom scripting language and I want to allow users to write libraries in languages other than said scripting language (for efficiency). For example, you should be able to write a mathematics library in D, compile it, then write a simple wrapper in my