Re: T[] opIndex() Error: .. signal 11

2023-10-04 Thread ag0aep6g via Digitalmars-d-learn
On 03.10.23 20:26, Paul Backus wrote: Naturally, this lowering is completely absent from [the language spec's section on `foreach`.][1] According to the spec, the only ways to iterate over a `struct` type are `opApply` and the input range interface. I think it would probably be less confusing

Re: macOS Sonoma Linker Issue

2023-10-04 Thread confuzzled via Digitalmars-d-learn
On Wednesday, 4 October 2023 at 11:01:08 UTC, Johan wrote: Try passing `-ld_classic` to the linker. (`dmd -L-ld_classic`) https://github.com/ldc-developers/ldc/issues/4501#issuecomment-1738295459 -Johan Thanks. This did the trick.

Re: macOS Sonoma Linker Issue

2023-10-04 Thread Tuna Celik via Digitalmars-d-learn
On Wednesday, 4 October 2023 at 07:47:05 UTC, Paolo Invernizzi wrote: On Wednesday, 4 October 2023 at 07:43:29 UTC, Tuna Celik wrote: On Tuesday, 3 October 2023 at 23:55:05 UTC, confuzzled wrote: [...] I'm also suffering from the same problem. It seems to be an Xcode 15 issues, everything w

Re: macOS Sonoma Linker Issue

2023-10-04 Thread Johan via Digitalmars-d-learn
On Tuesday, 3 October 2023 at 23:55:05 UTC, confuzzled wrote: Any known workaround for this most recent issue on macOS Sonoma? The file I'm compiling contains a blank main() without any imports but this error shows up on everything I've attempted to compile since upgrading to Sonoma. (dmd-2.1

Re: Straight Forward Arrays

2023-10-04 Thread dhs via Digitalmars-d-learn
On Monday, 2 October 2023 at 02:56:33 UTC, Steven Schveighoffer wrote: FWIW, there is a cache that makes this decently fast, so it doesn't have to go all the way into the GC to get all the information for every append. But it *most definitely* not going to be as fast as reading a local "cap

Re: Error: none of the overloads of template `once.main.each!((l)

2023-10-04 Thread Rene Zwanenburg via Digitalmars-d-learn
On Wednesday, 4 October 2023 at 08:11:12 UTC, Joel wrote: What am I missing? Splitter returns a forward range so you can't slice the result. You can use take() and drop() instead. Also, converting a string range to int[] doesn't seem to work, but I don't know if it should. Here is a version

Error: none of the overloads of template `once.main.each!((l)

2023-10-04 Thread Joel via Digitalmars-d-learn
What am I missing? ```d import std; void main() { struct DateRem { Date date; string rem; string toString() const => text(date.toSimpleString, " ", rem); } DateRem[] daterem; data .splitter('\n') .filter!(l => l.length && l[0].isDigit)

Re: macOS Sonoma Linker Issue

2023-10-04 Thread Paolo Invernizzi via Digitalmars-d-learn
On Wednesday, 4 October 2023 at 07:43:29 UTC, Tuna Celik wrote: On Tuesday, 3 October 2023 at 23:55:05 UTC, confuzzled wrote: [...] I'm also suffering from the same problem. It seems to be an Xcode 15 issues, everything works fine with 14

Re: macOS Sonoma Linker Issue

2023-10-04 Thread Tuna Celik via Digitalmars-d-learn
On Tuesday, 3 October 2023 at 23:55:05 UTC, confuzzled wrote: Any known workaround for this most recent issue on macOS Sonoma? The file I'm compiling contains a blank main() without any imports but this error shows up on everything I've attempted to compile since upgrading to Sonoma. (dmd-2.1