On Monday, 25 November 2019 at 10:16:47 UTC, Vijay Nayar wrote:
On Sunday, 24 November 2019 at 16:34:35 UTC, Dgame wrote:
Maybe some of you know Dgame (https://github.com/Dgame/Dgame),
it was my biggest project using D and was a lot of fun at that
time. But since I don't use D anymore, I have
Maybe some of you know Dgame (https://github.com/Dgame/Dgame), it
was my biggest project using D and was a lot of fun at that time.
But since I don't use D anymore, I have neither the time nor the
desire and even less the knowledge to take care of it anymore.
So, if anyone wants to keep it
On Thursday, 24 January 2019 at 07:18:58 UTC, Mike Parker wrote:
fun(10)
==>
{
T __temp0 = void;
fun(__temp0 := 10);
}
The first problem the Language Maintainers identified with this
approach is that the rewrite is from an expression to a
statement, rendering it invalid.
The expression
On Friday, 11 January 2019 at 14:46:36 UTC, Andrey wrote:
Hi,
In C++ you can create a fixed array on stack:
int count = getCount();
int myarray[count];
In D the "count" is part of type and must be known at CT but in
example it is RT.
How to do such thing in D? Without using of heap.
You
On Thursday, 13 December 2018 at 18:29:39 UTC, Adam D. Ruppe
wrote:
The attribute spam is almost longer than the function itself.
I often wished for something like
module foo.bar;
default(@safe, pure);
function foo() { } // is annotated with @safe & pure
@deny(pure) // or pure(false)
On Monday, 20 August 2018 at 15:55:54 UTC, Kagamin wrote:
On Monday, 20 August 2018 at 13:02:23 UTC, Atila Neves wrote:
On Monday, 20 August 2018 at 12:56:42 UTC, Kagamin wrote:
You need `return` attribute there, not `scope`:
struct MyStruct
{
import core.stdc.stdlib;
int* ints;
On Friday, 20 July 2018 at 10:31:48 UTC, Seb wrote:
On Friday, 20 July 2018 at 10:08:03 UTC, Dgame wrote:
On Friday, 20 July 2018 at 09:39:47 UTC, Nicholas Wilson wrote:
On Friday, 20 July 2018 at 09:03:18 UTC, Dukc wrote:
appending something (like .byRef or byRef!long, the latter
making an
On Friday, 20 July 2018 at 09:39:47 UTC, Nicholas Wilson wrote:
On Friday, 20 July 2018 at 09:03:18 UTC, Dukc wrote:
appending something (like .byRef or byRef!long, the latter
making an implicit type conversion)
That can't work: either it returns an expired stack temporary
(*very* bad), or
On Thursday, 10 May 2018 at 20:38:12 UTC, Vladimir Panteleev
wrote:
On Thursday, 10 May 2018 at 20:32:11 UTC, Dgame wrote:
immutable size_t len = s1.length + s2.length;
percent = (len - distance) * 100.0 / len;
Note that this formula will give you only 50% similarity for
"abc" and
On Thursday, 10 May 2018 at 20:13:49 UTC, Vladimir Panteleev
wrote:
On Thursday, 10 May 2018 at 20:08:04 UTC, Dgame wrote:
void similar_text_similar_str(char* txt1, size_t len1, char*
That looks like an implementation of Levenshtein distance. We
have one in Phobos:
I'm in need for some sort of string similarity comparision. I've
found soundex but that didn't solved my needs. After some search
I found a C implementation of similar_text, but that is quite
ugly... I was able to let it work in D but it's still somewhat
messy. Is there any D implementation of
On Wednesday, 2 May 2018 at 00:01:42 UTC, Nick Sabalausky wrote:
Now, all that said, using auto for a function signature's
return type shouldn't usually be done, except in very careful,
specific "voldemort type" kinds of situations (and even then, I
dont see a real big point).
I do it all
On Sunday, 29 April 2018 at 14:01:10 UTC, Gerald wrote:
A new version of tilix has been released. For those not
familiar with it, Tilix is a terminal emulator for Linux
written in D using GTK. The list of changes is available here:
https://gnunn1.github.io/tilix-web/2018/04/28/release-1-7-9
It's really fun playing around:
char[int.max - 1] c;
results in
Internal error: dmd/backend/cgcod.c 634
with DMD 2.079. Guess I or somebody else should report this.
On Monday, 23 April 2018 at 13:48:07 UTC, Steven Schveighoffer
wrote:
On 4/23/18 9:32 AM, Dgame wrote:
char[-1] c;
results in
Error: char[18446744073709551615LU] size 1 *
18446744073709551615 exceeds 0x7fff size limit for static
array
Should we fix that? A negative index should be IMO
char[-1] c;
results in
Error: char[18446744073709551615LU] size 1 * 18446744073709551615
exceeds 0x7fff size limit for static array
Should we fix that? A negative index should be IMO detected
sooner/with a cleaner error message.
On Tuesday, 17 April 2018 at 11:38:17 UTC, Jonathan M Davis wrote:
On Sunday, April 15, 2018 17:59:01 Dgame via
Digitalmars-d-learn wrote:
How am I supposed to insert a struct with immutable members
into an assoc. array?
Reduced example:
struct A {
immutable string name;
}
A[string
On Tuesday, 17 April 2018 at 11:01:21 UTC, Nicholas Wilson wrote:
On Tuesday, 17 April 2018 at 10:17:56 UTC, Dgame wrote:
Ah, I found the msvcEnv.bat and I told me that I have to VSC
installation. Solved!
You should also be able to use -link-internally /LLMV's lld if
you don't want to
On Tuesday, 17 April 2018 at 09:42:01 UTC, Dgame wrote:
I'm trying to use Ldc on Windows, but I get these linker errors:
OPTLINK (R) for Win32 Release 8.00.17
Copyright (C) Digital Mars 1989-2013 All rights reserved.
http://www.digitalmars.com/ctg/optlink.html
OPTLINK : Warning 9:
I'm trying to use Ldc on Windows, but I get these linker errors:
OPTLINK (R) for Win32 Release 8.00.17
Copyright (C) Digital Mars 1989-2013 All rights reserved.
http://www.digitalmars.com/ctg/optlink.html
OPTLINK : Warning 9: Unknown Option : OUT
OPTLINK : Warning 9: Unknown Option :
How am I supposed to insert a struct with immutable members into
an assoc. array?
Reduced example:
struct A {
immutable string name;
}
A[string] as;
as["a"] = A("a"); // Does not work
On Thursday, 29 March 2018 at 20:05:48 UTC, Rubn wrote:
On Thursday, 29 March 2018 at 19:11:30 UTC, Dgame wrote:
Just to be sure it does not got los: You know that you can
avoid the temp/copy if you add one method to your struct, yes?
import std.stdio;
struct Big {
string name;
Just to be sure it does not got los: You know that you can avoid
the temp/copy if you add one method to your struct, yes?
import std.stdio;
struct Big {
string name;
float[1000] values;
this(string name) {
this.name = name;
}
@disable
this(this);
ref
On Sunday, 25 March 2018 at 19:24:00 UTC, Rubn wrote:
On Sunday, 25 March 2018 at 14:28:30 UTC, Andrei Alexandrescu
wrote:
On 3/25/18 9:40 AM, Rubn wrote:
On Saturday, 24 March 2018 at 12:51:07 UTC, Andrei
Alexandrescu wrote:
Filing a DIP is like filing a police report: once it's in
the
Here is what I've used if I had to:
https://p0nce.github.io/d-idioms/#Rvalue-references:-Understanding-auto-ref-and-then-not-using-it
On Monday, 5 February 2018 at 00:56:20 UTC, welkam wrote:
On Sunday, 4 February 2018 at 22:05:45 UTC, Dgame wrote:
I want to use a language and if I see problems which are
ignored I move on. That is how it is, no offense.
So you see a problem and do not work on fixing it then complain
that
On Sunday, 4 February 2018 at 12:02:25 UTC, psychoticRabbit wrote:
On Sunday, 4 February 2018 at 10:31:17 UTC, Dgame wrote:
On Sunday, 4 February 2018 at 01:46:34 UTC, psychoticRabbit
wrote:
Your suggestions are welcome. Just don't tell people that if
they don't listen to them, then their
On Sunday, 4 February 2018 at 01:46:34 UTC, psychoticRabbit wrote:
Your suggestions are welcome. Just don't tell people that if
they don't listen to them, then their community is bad. That's
not how an open source community works.
I've never said that the community is bad. :)
On Saturday, 3 February 2018 at 23:45:21 UTC, bachmeier wrote:
On Saturday, 3 February 2018 at 23:39:00 UTC, Dgame wrote:
On Saturday, 3 February 2018 at 23:29:58 UTC, Christof Schardt
wrote:
On Saturday, 3 February 2018 at 22:59:06 UTC, Dgame wrote:
I congratulate you on your decision. I also
On Saturday, 3 February 2018 at 23:25:09 UTC, welkam wrote:
On Saturday, 3 February 2018 at 22:59:06 UTC, Dgame wrote:
This could be used to improve D
So when will you start working on issues he described?
And when will you? I already tried in the past as you can see.
On Saturday, 3 February 2018 at 23:29:58 UTC, Christof Schardt
wrote:
On Saturday, 3 February 2018 at 22:59:06 UTC, Dgame wrote:
I congratulate you on your decision. I also changed to another
language and I've never regretted it.
Which is...? (just out of curiousity, btw I'm currently
watching
This is a nice, refreshing post. You state problems and why you
switched to Go. You give a ton of informations (here and in your
prior posts) why you did what you did and what problems you've
seen. This could be used to improve D. But the regular reply you
will get if you criticize D even a
On Saturday, 27 January 2018 at 17:55:06 UTC, H. S. Teoh wrote:
On 1/26/18 5:50 PM, Dgame wrote:
[...]
> My impression so far is that most of the D users love to
> program in a tiny editor without the features which modern
> IDE's gives you. That's impressive, but outdated and even a
> bit
On Saturday, 27 January 2018 at 00:13:51 UTC, Benny wrote:
On Saturday, 27 January 2018 at 00:08:17 UTC, Benny wrote:
* Rust: Jetbrain IntelliJ + Rust plugin.
It looks like it has become a official supported plugin by
Jetbrain. Works perfectly out of the box. Impressive results
and issue
On Thursday, 25 January 2018 at 15:20:15 UTC, Benny wrote:
After months doing a different project, i need a programming
language for a new client with specific needs. D comes to mind.
As usual that involves downloading the compiler (dmd and ldc).
So, lets install Visual Studio Code:
* Code-D
On Wednesday, 10 January 2018 at 14:41:21 UTC, Steven
Schveighoffer wrote:
On 1/10/18 3:08 AM, Dgame wrote:
On Wednesday, 10 January 2018 at 01:56:02 UTC, Steven
Schveighoffer wrote:
But current auto ref is what we have, so I would recommend
using it.
I would recommend to ignore auto ref for
On Wednesday, 10 January 2018 at 01:56:02 UTC, Steven
Schveighoffer wrote:
But current auto ref is what we have, so I would recommend
using it.
I would recommend to ignore auto ref for rvalue references. It
generates 2^N functions where N is the amount of auto ref
parameters. That the most
On Thursday, 4 January 2018 at 11:04:51 UTC, Ola Fosheim Grøstad
wrote:
On Thursday, 4 January 2018 at 10:49:49 UTC, Dgame wrote:
On Thursday, 4 January 2018 at 10:40:33 UTC, Ola Fosheim
Grøstad wrote:
However, Rust won't fare well in a head-to-head comparison
either, because of the issues
On Thursday, 4 January 2018 at 10:40:33 UTC, Ola Fosheim Grøstad
wrote:
However, Rust won't fare well in a head-to-head comparison
either, because of the issues with back-pointers.
Could you explain this?
On Friday, 22 December 2017 at 16:17:33 UTC, Dan Partelly wrote:
Why should we settle for this ? D code (efortless) is easier to
read then Rust.
Such statement is highly controversial, since it can be said
about C/C++, D and most other languages as well.
On Wednesday, 20 December 2017 at 17:05:41 UTC, Tony wrote:
I have heard with regard to reference counting as is done in
Python, that if two objects each have a reference to the other,
that they will never be deleted, even if neither is used
elsewhere in the program. Garbage collection is not
On Tuesday, 19 December 2017 at 15:19:53 UTC, Marc wrote:
On Tuesday, 19 December 2017 at 00:01:00 UTC, Ali Çehreli wrote:
On 12/18/2017 03:54 PM, Ali Çehreli wrote:
On 12/18/2017 02:58 PM, Marc wrote:
Here's another experiment:
template FirstOf(T...) {
template otherwise(D) {
On Friday, 15 December 2017 at 12:56:41 UTC, Jonathan M Davis
wrote:
On Friday, December 15, 2017 11:10:42 Dgame via Digitalmars-d
wrote:
On Friday, 15 December 2017 at 09:18:23 UTC, Seb wrote:
> [...]
Since scope was revived with DIP-1000 we will see about that.
I doubt that the deprecat
On Friday, 15 December 2017 at 09:18:23 UTC, Seb wrote:
On Thursday, 14 December 2017 at 16:40:33 UTC, Petar Kirov
[ZombineDev] wrote:
```
scope foo = new Foo();
```
That's about to be deprecated in favor of scoped!Foo:
On Thursday, 14 December 2017 at 16:40:33 UTC, Petar Kirov
[ZombineDev] wrote:
On Thursday, 14 December 2017 at 16:10:17 UTC, Jonathan Marler
wrote:
On Thursday, 14 December 2017 at 14:45:51 UTC, Dgame wrote:
Strongly reminds me of scoped
Declaring a variable as `scoped` prevents that
On Thursday, 14 December 2017 at 14:31:33 UTC, Jonathan Marler
wrote:
Thought I would share this little nugget. It's a simple module
to enable "classes by value". A good demonstration of the
power of "alias this". I had originally implemented this using
"opDispatch" and only after I was done
On Wednesday, 6 December 2017 at 09:25:20 UTC, Biotronic wrote:
On Wednesday, 6 December 2017 at 08:59:09 UTC, Fredrik Boulund
wrote:
string word = "longword";
writeln(sort(word));
But that doesn't work because I guess a string is not the type
of range required for sort?
Yeah, narrow
On Friday, 13 October 2017 at 12:08:00 UTC, Jack Applegame wrote:
On Friday, 13 October 2017 at 12:03:55 UTC, Dgame wrote:
Interesting. If you remove the CTor in Foo it works again.
If you remove DTor it works again too. :)
That's one of these times where it would be helpful to see the
On Friday, 13 October 2017 at 10:35:56 UTC, Jack Applegame wrote:
If you don't want to get the great PITA, never create temporary
objects in function parameters.
I recently spent a whole day digging through my reference
counted containers library. But nasty bug was not there, but in
the
On Wednesday, 20 September 2017 at 14:15:30 UTC, Steven
Schveighoffer wrote:
On 9/20/17 3:12 AM, Dgame wrote:
http://p0nce.github.io/d-idioms/#@nogc-Array-Literals:-Breaking-the-Limits
This is plain stack corruption, you should fix that. The s
template seems useful, but still I can't get
On Wednesday, 20 September 2017 at 08:33:34 UTC, Nordlöw wrote:
On Wednesday, 20 September 2017 at 07:38:00 UTC, Jonathan M
Davis wrote:
T[n] s(T, size_t n)(auto ref T[n] array) pure nothrow @nogc
@safe
{
return array;
}
What about adding `s` to std.array in the meanwhile? I wonder
what
On Wednesday, 20 September 2017 at 05:36:43 UTC, Andrei
Alexandrescu wrote:
On 9/19/17 8:47 PM, Steven Schveighoffer wrote:
This needs to happen.
e.g.:
char[$] arr = "hello"; // syntax up for debate, but I like
this.
I can't think of a correct way to do this that doesn't
heap-allocate and
On Saturday, 12 August 2017 at 17:25:36 UTC, bitwise wrote:
On Saturday, 12 August 2017 at 08:16:56 UTC, Temtaime wrote:
Collect - is a hint to the GC, not an order. It can ignore
this request.
If this is the case, then D's GC should have an option to force
collection like C#'s GC:
On Monday, 7 August 2017 at 08:01:26 UTC, Shachar Shemesh wrote:
It is often desired to have a struct with an extra parameter.
The common way to do this is like so:
struct S(T) {
T param;
void initialize(T param) {
this.param = param;
// Other
Consider reference counting with cycles. The proposal from
Walter/Andrei is to do reference counting to clean up
everything but cycles. For cycles, the GC will take care of it.
That is the PHP way to do things. :) It's neat but I still think
the only real thing to deal with resources is
On Wednesday, 26 July 2017 at 20:02:02 UTC, Moritz Maxeiner wrote:
On Wednesday, 26 July 2017 at 19:18:48 UTC, Dgame wrote:
Alright, thanks for the clarification. I've briefly hoped for
some sort of miracle such as deterministic object lifetime
without manual interaction. :)
I'm not sure
On Wednesday, 26 July 2017 at 18:33:58 UTC, Moritz Maxeiner wrote:
On Wednesday, 26 July 2017 at 17:38:28 UTC, Dgame wrote:
I don't get it. The GC collects the objects which aren't in
use anymore. The order in which this is currently happening is
not specified. So, how are the destructors
I don't get it. The GC collects the objects which aren't in use
anymore. The order in which this is currently happening is not
specified. So, how are the destructors supposed to be called in
the right order? Manually? ARC? As far as I understand it, the GC
can't do it, otherwise we wouldn't
On Monday, 24 July 2017 at 18:15:20 UTC, Steven Schveighoffer
wrote:
On 7/24/17 1:29 PM, Dgame wrote:
Why isn't the compiler able to deduce S[] => I[]? Or is it
just me?
I've tried dmd 2.075
I know you got the explanation already, but just in case you
actually need to call something like
On Monday, 24 July 2017 at 17:33:48 UTC, Adam D. Ruppe wrote:
On Monday, 24 July 2017 at 17:29:55 UTC, Dgame wrote:
S[] ss = [new S()];
test1(ss); // Fails
Why isn't the compiler able to deduce S[] => I[]? Or is it
just me?
This is exactly because of polymorphism. Consider
I may be just tired, but could somebody explain this behaviour to
me? It seems odd to me:
interface I
{
}
class S : I
{
}
void test1(I[])
{
}
void test2(I)
{
}
void main()
{
test1([new S()]); // Works
test2(new S()); // Works
I i = new S();
On Tuesday, 11 July 2017 at 08:23:02 UTC, Miguel L wrote:
I need to create a non-dynamic array like this
void f(int x)
{
int[x] my_array;
...
this does not compile as x value needs to be known at compile
time. The closest to this I can get is:
void f(int x)
{
int[] my_array;
On Saturday, 1 July 2017 at 21:00:14 UTC, Ecstatic Coder wrote:
Whatever the object oriented language you use, you can keep
exactly the same global game architecture, using more or less
the same classes for your game subsystems and gameplay elements.
Therefore, as an old game industry
On Saturday, 1 July 2017 at 14:40:36 UTC, ketmar wrote:
Dgame wrote:
Which impact would have D on the software-architecture, if it
would be choosen for a 2D game instead of C/C++?
i can actually finish 'em. most of the time when i'm working
with D, i feel that compiler tries to help me. EVERY
If you haven't watched it yet, Walter's dconf keynote this year
is a good place to start as are the discussion on dip1000 and
the dip itself.
Thanks, that's a good hint, I'll definitely watch it. :)
But as Rikki said the fact that all arrays carry they length
means that we have array bounds
Hi there. I hope that is the right place for this topic.
I'm currently writing my master thesis and just like in my
bachelor thesis, D will play a significant role in my master
thesis. My thesis will discuss the impact of software engineering
concepts of security-oriented programming languages
On Tuesday, 6 September 2016 at 09:42:12 UTC, Martin Tschierschke
wrote:
Hi All,
anybody interested to meet in Hamburg, Germany?
Time and location will be found!
Regards mt.
Yes, I would be interested.
67 matches
Mail list logo