On Thursday, 3 February 2022 at 03:25:39 UTC, H. S. Teoh wrote:
On Thu, Feb 03, 2022 at 02:01:34AM +, forkit via
Digitalmars-d-learn wrote: [...]
would be nice if the compiler told me something though :-(
i.e. "hey, dude, you really wanna to that?"
Mark your function @safe, and the compil
On Thu, Feb 03, 2022 at 02:01:34AM +, forkit via Digitalmars-d-learn wrote:
[...]
> would be nice if the compiler told me something though :-(
>
> i.e. "hey, dude, you really wanna to that?"
Mark your function @safe, and the compiler will stop you from unsafe
casts of this nature. That's part
On Wednesday, 2 February 2022 at 23:21:52 UTC, forkit wrote:
Any reason why compiling this with ldc would cause the exe to
crash?
Compiling with DMD (using either declaration of palindrome
works just fine though)
//
module test;
import std;
void main()
{
char[] palindrome = cast
On Saturday, 29 January 2022 at 00:52:10 UTC, H. S. Teoh wrote:
Trying out what I suggested on different OS's and toolchains
will give you a good idea of what's actually out there.
I will just reply with a quote from
https://forum.dlang.org/post/mailman.400.1643853436.20251.digitalmars-d-le...
On Thursday, 3 February 2022 at 01:57:12 UTC, H. S. Teoh wrote:
would be nice if the compiler told me something though :-(
i.e. "hey, dude, you really wanna to that?"
On Thu, Feb 03, 2022 at 01:39:33AM +, forkit via Digitalmars-d-learn wrote:
> On Wednesday, 2 February 2022 at 23:30:50 UTC, H. S. Teoh wrote:
> > On Wed, Feb 02, 2022 at 11:21:52PM +, forkit via Digitalmars-d-learn
> > wrote: [...]
> > > char[] palindrome = cast(char[])"able was I ere
On Thursday, 3 February 2022 at 01:51:34 UTC, Basile B. wrote:
On Thursday, 3 February 2022 at 01:39:33 UTC, forkit wrote:
On Wednesday, 2 February 2022 at 23:30:50 UTC, H. S. Teoh
wrote:
[...]
that explains ldc perhaps (although i don't really get it.
It's cast to mutable and being assigned
On Thursday, 3 February 2022 at 01:39:33 UTC, forkit wrote:
oops! forgot the .dup
char[] palindrome = cast(char[])"able was I ere I saw elba".dup;
;-)
On Thursday, 3 February 2022 at 01:39:33 UTC, forkit wrote:
On Wednesday, 2 February 2022 at 23:30:50 UTC, H. S. Teoh wrote:
[...]
that explains ldc perhaps (although i don't really get it. It's
cast to mutable and being assigned to mutable.
in any case... ldc doesn't like it, but dmd is fi
On Wednesday, 2 February 2022 at 23:30:50 UTC, H. S. Teoh wrote:
On Wed, Feb 02, 2022 at 11:21:52PM +, forkit via
Digitalmars-d-learn wrote: [...]
char[] palindrome = cast(char[])"able was I ere I saw
elba";
String literals are immutable by default. Casting immutable to
mutable
is UB
On Wed, Feb 02, 2022 at 11:21:52PM +, forkit via Digitalmars-d-learn wrote:
[...]
> char[] palindrome = cast(char[])"able was I ere I saw elba";
String literals are immutable by default. Casting immutable to mutable
is UB (Undefined Behaviour).
[...]
> writeln(palindrome.reverse);
E
Any reason why compiling this with ldc would cause the exe to
crash?
Compiling with DMD (using either declaration of palindrome works
just fine though)
//
module test;
import std;
void main()
{
char[] palindrome = cast(char[])"able was I ere I saw elba";
//char[] palindrome =
On Wednesday, 2 February 2022 at 19:03:35 UTC, Steven
Schveighoffer wrote:
On 2/2/22 1:42 PM, Vijay Nayar wrote:
Dub is kind of a hot mess in terms of the dependency resolution
and ways to specify projects. I would love to see it cleaned
up/reimplemented.
-Steve
For your larger more compl
On 2/2/22 1:42 PM, Vijay Nayar wrote:
I made this change and it did indeed work correctly, thank you for that!
Truthfully, it was not entirely clear to me how dub was deciding where
to go to build. I had assumed that this was being done via the
`subPackage` lines.
Like many things in dub,
On Wednesday, 2 February 2022 at 14:07:08 UTC, Steven
Schveighoffer wrote:
On 2/2/22 5:14 AM, Vijay Nayar wrote:
If you have them in the same repository, my recommendation is
to use path dependencies instead of versions.
So, e.g.:
```sdl
dependency "funnel:proto" path="./proto" // in main dub
On 2/2/22 5:14 AM, Vijay Nayar wrote:
Greetings folks,
In my project, I have a parent package with several sub-packages, each
of which builds into either a library or an executable.
I first started observing odd problems when I was running `dub build`,
it would complain about different versi
On Wednesday, 2 February 2022 at 10:14:25 UTC, Vijay Nayar wrote:
Greetings folks,
In my project, I have a parent package with several
sub-packages, each of which builds into either a library or an
executable.
[...]
I should point out there is 1 exception to subPackages not being
recursiv
Greetings folks,
In my project, I have a parent package with several sub-packages,
each of which builds into either a library or an executable.
I first started observing odd problems when I was running `dub
build`, it would complain about different versions of vibe-d
present, and it suggeste
18 matches
Mail list logo