Re: std.int128 not working with -betterC enabled

2023-12-22 Thread Richard (Rikki) Andrew Cattermole via Digitalmars-d-learn
On 23/12/2023 11:41 AM, Matheus Catarino wrote: Would there be any reason not to use |core.int128|? Currently, I used it to make a TigerbeetleDB client (Zig database) in D (betterC). https://github.com/batiati/tigerbeetle-clients-benchmarks/blob/f86216834bd04e1e06bede2a2e31b64df0dc98f1/d/modul

Re: std.int128 not working with -betterC enabled

2023-12-22 Thread Matheus Catarino via Digitalmars-d-learn
On Wednesday, 20 December 2023 at 18:16:00 UTC, Renato wrote: I wanted to write a small program using betterC that needs to use int128. This simple program works without -betterC: ```d module dasc; import std.int128; import core.stdc.stdio; extern (C): int main() { auto n = Int128(128, 12

Re: D is nice whats really wrong with gc??

2023-12-22 Thread H. S. Teoh via Digitalmars-d-learn
On Fri, Dec 22, 2023 at 09:40:03PM +, bomat via Digitalmars-d-learn wrote: > On Friday, 22 December 2023 at 16:51:11 UTC, bachmeier wrote: > > Given how fast computers are today, the folks that focus on memory > > and optimizing for performance might want to apply for jobs as > > flooring inspe

Re: D is nice whats really wrong with gc??

2023-12-22 Thread bomat via Digitalmars-d-learn
On Friday, 22 December 2023 at 16:51:11 UTC, bachmeier wrote: Given how fast computers are today, the folks that focus on memory and optimizing for performance might want to apply for jobs as flooring inspectors, because they're often solving problems from the 1990s. *Generally* speaking, I d

Re: macOS Sonoma Linker Issue

2023-12-22 Thread Renato via Digitalmars-d-learn
On Friday, 22 December 2023 at 17:50:47 UTC, Johan wrote: Some general advice: 1 - use `dub` from LDC's package (this may solve some arm64 vs x86 issues when on Apple Silicon CPU) ``` ▶ which dub /Users/renato/dlang/ldc-1.35.0/bin/dub (ldc-1.35.0) ``` 2 - when you use a new or different com

Re: D is nice whats really wrong with gc??

2023-12-22 Thread H. S. Teoh via Digitalmars-d-learn
On Fri, Dec 22, 2023 at 07:22:15PM +, Dmitry Ponyatov via Digitalmars-d-learn wrote: > > It's called GC phobia, a knee-jerk reaction malady common among > > C/C++ programmers > > I'd like to use D in hard realtime apps (gaming can be thought as one > of them, but I mostly mean realtime dynami

Re: Behaves different on my osx and linux machines

2023-12-22 Thread Christian Köstlin via Digitalmars-d-learn
On Friday, 22 December 2023 at 15:02:42 UTC, Kagamin wrote: Add more debugging? ``` bool done = false; while (!done) { writeln(1); auto result = ["echo", "Hello World"].execute; if (result.status != 0) { writeln(2); throw new

Re: D is nice whats really wrong with gc??

2023-12-22 Thread Dmitry Ponyatov via Digitalmars-d-learn
It's called GC phobia, a knee-jerk reaction malady common among C/C++ programmers I'd like to use D in hard realtime apps (gaming can be thought as one of them, but I mostly mean realtime dynamic multimedia and digital signal processing). So, GC in such applications commonly supposed unaccep

[vibe] what's wrong with linking time of vibe applications?

2023-12-22 Thread Dmitry Ponyatov via Digitalmars-d-learn
D lang noted as having a very fast compilation time. Playing with tiny web-interface apps I found that modern versions of dmd & vibe has such a fast compiling but a very long executable linking time. Something like 2-3 seconds of compiling stage (with vibe prebuilt), and 24 seconds of total

Re: macOS Sonoma Linker Issue

2023-12-22 Thread Sergey via Digitalmars-d-learn
On Friday, 22 December 2023 at 17:45:27 UTC, Renato wrote: I'm afraid I've lost interest to make it work at this point :( Did you add "-L-ld_classic"?

Re: macOS Sonoma Linker Issue

2023-12-22 Thread Johan via Digitalmars-d-learn
Some general advice: 1 - use `dub` from LDC's package (this may solve some arm64 vs x86 issues when on Apple Silicon CPU) 2 - when you use a new or different compiler, you have to rebuild _all_ packages. So clear your dub cache. I think point 2 is causing your issues. -Johan

Re: macOS Sonoma Linker Issue

2023-12-22 Thread Renato via Digitalmars-d-learn
On Friday, 22 December 2023 at 12:49:35 UTC, Guillaume Piolat wrote: On Thursday, 21 December 2023 at 23:25:55 UTC, Renato wrote: ld: symbol(s) not found for architecture x86_64 Make sure you're using the "osx-universal" package in order to have both arch. https://github.com/ldc-developers/l

Re: macOS Sonoma Linker Issue

2023-12-22 Thread Renato via Digitalmars-d-learn
On Friday, 22 December 2023 at 12:49:35 UTC, Guillaume Piolat wrote: On Thursday, 21 December 2023 at 23:25:55 UTC, Renato wrote: ld: symbol(s) not found for architecture x86_64 Make sure you're using the "osx-universal" package in order to have both arch. https://github.com/ldc-developers/l

Re: D is nice whats really wrong with gc??

2023-12-22 Thread bachmeier via Digitalmars-d-learn
On Friday, 22 December 2023 at 12:53:44 UTC, bomat wrote: If you use (or even feel tempted to use) a GC, it means that you don't care about your memory. Neither about its layout nor its size, nor when chunks of it are allocated or deallocated, etc. And if you don't care about these things, you

Re: Behaves different on my osx and linux machines

2023-12-22 Thread Kagamin via Digitalmars-d-learn
Add more debugging? ``` bool done = false; while (!done) { writeln(1); auto result = ["echo", "Hello World"].execute; if (result.status != 0) { writeln(2); throw new Exception("echo failed"); } writeln(result

Re: D is nice whats really wrong with gc??

2023-12-22 Thread Bkoie via Digitalmars-d-learn
On Friday, 22 December 2023 at 12:53:44 UTC, bomat wrote: I think the problem most "old school" programmers have with automatic garbage collection, or *any* kind of "managed" code, really, is not the GC itself, but that it demonstrates a wrong mindset. If you use (or even feel tempted to use)

Re: D is nice whats really wrong with gc??

2023-12-22 Thread bomat via Digitalmars-d-learn
On Monday, 18 December 2023 at 16:44:11 UTC, Bkoie wrote: but what is with these ppl and the gc? [...] I'm a C++ programmer in my day job. Personally, I have no problem with a GC, but one of my colleague is a total C fanboy, so I feel qualified to answer your question. :) I think the proble

Re: macOS Sonoma Linker Issue

2023-12-22 Thread Guillaume Piolat via Digitalmars-d-learn
On Thursday, 21 December 2023 at 23:25:55 UTC, Renato wrote: ld: symbol(s) not found for architecture x86_64 Make sure you're using the "osx-universal" package in order to have both arch. https://github.com/ldc-developers/ldc/releases/tag/v1.35.0 That said, for consumer software it may be a