Jump to page: 1 2 3
Thread overview
"I made a game using Rust"
May 10, 2017
JN
May 10, 2017
Stanislav Blinov
May 10, 2017
Atila Neves
May 10, 2017
Adam D. Ruppe
May 10, 2017
Ethan Watson
May 10, 2017
Adrian Matoga
May 10, 2017
Ethan Watson
May 10, 2017
Vladimir Panteleev
May 10, 2017
Ethan Watson
May 10, 2017
H. S. Teoh
May 10, 2017
Adam D. Ruppe
May 10, 2017
Adrian Matoga
May 10, 2017
Adam D. Ruppe
May 10, 2017
zetashift
May 11, 2017
rikki cattermole
May 11, 2017
JN
May 10, 2017
Joakim
May 10, 2017
Lewis
May 11, 2017
evilrat
May 11, 2017
Lewis
May 12, 2017
evilrat
May 12, 2017
Lewis
May 14, 2017
Marco Leise
May 11, 2017
Vadim Lopatin
May 11, 2017
evilrat
May 10, 2017
Interesting thread I got from Reddit, someone made a game for PC and mobiles fully in Rust.

https://michaelfairley.com/blog/i-made-a-game-in-rust/

"Last week, I released A Snake’s Tale on iOS, Android, Windows, Mac, and Linux.".

I wonder, would it be possible for D in the current state to achieve the same? I imagine iOS isn't possible yet and Android is just getting there?
May 10, 2017
On Wednesday, 10 May 2017 at 12:52:34 UTC, JN wrote:
> Interesting thread I got from Reddit, someone made a game for PC and mobiles fully in Rust.
>
> https://michaelfairley.com/blog/i-made-a-game-in-rust/
>
> "Last week, I released A Snake’s Tale on iOS, Android, Windows, Mac, and Linux.".
>
> I wonder, would it be possible for D in the current state to achieve the same? I imagine iOS isn't possible yet and Android is just getting there?

7700 lines of Rust. We need a language called Nine Inch Nails or something :D
May 10, 2017
On Wednesday, 10 May 2017 at 12:52:34 UTC, JN wrote:
> Interesting thread I got from Reddit, someone made a game for PC and mobiles fully in Rust.
>
> https://michaelfairley.com/blog/i-made-a-game-in-rust/
>
> "Last week, I released A Snake’s Tale on iOS, Android, Windows, Mac, and Linux.".
>
> I wonder, would it be possible for D in the current state to achieve the same? I imagine iOS isn't possible yet and Android is just getting there?

I'd like to know how it was packaged to run Rust on both iOS and Android.

Atila
May 10, 2017
On Wednesday, 10 May 2017 at 12:52:34 UTC, JN wrote:
> I wonder, would it be possible for D in the current state to achieve the same? I imagine iOS isn't possible yet and Android is just getting there?

Probably about the same, the author mostly complains about immature libraries for mobile and D is really in the same boat...


BTW:
"Add an icon to my .exe” don’t have ready-made solutions."

I'd be surprised if that is any different in Rust than it is in D... which is no different than it is in C.


And this is what jumps out at me:
"Holy cow are the compiler error messages generally fantastic."

Those of you on IRC know that I've been pushing hard for better error messages. I think that is *the* killer feature clang offered and I see it brought up again and again.

D used to do well. Now we're lagging behind. No language change needed to vastly improve error messages.
May 10, 2017
On Wednesday, 10 May 2017 at 13:22:22 UTC, Adam D. Ruppe wrote:
> Those of you on IRC know that I've been pushing hard for better error messages. I think that is *the* killer feature clang offered and I see it brought up again and again.
>
> D used to do well. Now we're lagging behind. No language change needed to vastly improve error messages.

I find it a very curious state of affairs myself that Microsoft's C++ compiler has significantly better error messages than DMD.
May 10, 2017
On Wednesday, 10 May 2017 at 14:00:08 UTC, Ethan Watson wrote:
> On Wednesday, 10 May 2017 at 13:22:22 UTC, Adam D. Ruppe wrote:
>> Those of you on IRC know that I've been pushing hard for better error messages. I think that is *the* killer feature clang offered and I see it brought up again and again.
>>
>> D used to do well. Now we're lagging behind. No language change needed to vastly improve error messages.
>
> I find it a very curious state of affairs myself that Microsoft's C++ compiler has significantly better error messages than DMD.

Would you mind giving some examples?
May 10, 2017
On Wednesday, 10 May 2017 at 14:02:38 UTC, Adrian Matoga wrote:
> Would you mind giving some examples?

My biggest bugbear with DMD is internal compiler errors giving me no meaningful information.

Excepting one or two edge cases with SSE types and the .NET compiler, I can get a meaningful error message and an error code from MSVC. And you can search them all through the MSDN documentation.

https://msdn.microsoft.com/en-us/library/8x5x43k7.aspx

If I find the message isn't that helpful, googling for the error code usually brings up discussions on stackoverflow about it.

Even user-inserted #errors have an error code.

https://msdn.microsoft.com/en-us/library/y0tzt8e0.aspx
May 10, 2017
On Wednesday, 10 May 2017 at 14:13:37 UTC, Ethan Watson wrote:
> On Wednesday, 10 May 2017 at 14:02:38 UTC, Adrian Matoga wrote:
>> Would you mind giving some examples?
>
> My biggest bugbear with DMD is internal compiler errors giving me no meaningful information.

Internal compiler errors (ICEs) are bugs which are generally treated as high priority. Please report them.

May 10, 2017
On Wednesday, 10 May 2017 at 14:31:28 UTC, Vladimir Panteleev wrote:
> Internal compiler errors (ICEs) are bugs which are generally treated as high priority. Please report them.

See my previous rant on this subject.

http://forum.dlang.org/post/qkxyfiwjwqklftcwtcik@forum.dlang.org

tl;dr - Sure, we'll submit bugs, but if someone literally has to stop work for a day because they can't tell at a glance what's gone wrong when compiling code then that's a massive failure of the compiler.
May 10, 2017
On Wednesday, 10 May 2017 at 14:02:38 UTC, Adrian Matoga wrote:
> Would you mind giving some examples?

What bothers me on a regular basis is overloading. Basic case:

$ dmd lll
lll.d(6): Error: none of the overloads of 'foo' are callable using argument types (int, double), candidates are:
lll.d(1):        lll.foo(int a, int a)
lll.d(2):        lll.foo(int a, string s)

Contrast that to g++:

$ g++ lll.cpp
lll.cpp: In function ‘int main()’:
lll.cpp:7:14: error: no matching function for call to ‘foo(int, Foo)’
  foo(0, Foo());
              ^
lll.cpp:7:14: note: candidates are:
lll.cpp:1:6: note: void foo(int, char*)
 void foo(int a, char* b);
      ^
lll.cpp:1:6: note:   no known conversion for argument 2 from ‘Foo’ to ‘char*’
lll.cpp:2:6: note: void foo(int, float)
 void foo(int a, float b);
      ^
lll.cpp:2:6: note:   no known conversion for argument 2 from ‘Foo’ to ‘float’



The g++ example isn't great either... but is better because of this: "no known conversion for argument 2 from ‘Foo’ to ‘float’"


It actually told me which argument didn't match! clang is similar:

$ clang lll.cpp
lll.cpp:7:2: error: no matching function for call to 'foo'
        foo(0, Foo());
        ^~~
lll.cpp:1:6: note: candidate function not viable: no known conversion from 'Foo' to 'char *' for 2nd argument
void foo(int a, char* b);
     ^
lll.cpp:2:6: note: candidate function not viable: no known conversion from 'Foo' to 'float' for 2nd argument
void foo(int a, float b);



With the dmd one, especially on a long function, it is hard to tell just which argument is giving trouble. The C++ errors just flat out tell me which argument didn't match for each candidate.



Templates with constraints are even worse.

lll.d(3): Error: template std.algorithm.sorting.sort cannot deduce function from argument types !()(int), candidates are:
/home/me/d/dmd2/linux/bin32/../../src/phobos/std/algorithm/sorting.d(1830):        std.algorithm.sorting.sort(alias less = "a < b", SwapStrategy ss = SwapStrategy.unstable, Range)(Range r) if ((ss == SwapStrategy.unstable && (hasSwappableElements!Range || hasAssignableElements!Range) || ss != SwapStrategy.unstable && hasAssignableElements!Range) && isRandomAccessRange!Range && hasSlicing!Range && hasLength!Range)


What a mess! Just formatting that output might help, but I'd especially love it if it told me which individual boolean elements failed, passed, and were short-circuited. The compiler knows this, it had to evaluate that to figure out it didn't match, but it doesn't tell me.

At a glance, can you even tell what I passed to the function?

Bonus points would be it telling me why, for example, `isInputRange` failed, but I understand that is an even bigger problem to solve.

Of course, C++ doesn't have constraints so there's no comparison there.


Lastly, check this out:

lll.d(5): Error: function lll.foo (Color c) is not callable using argument types (Color)

WTF, right? Well, I have a locally defined `struct Color` and an imported one. Same name, but different type. The error message doesn't tell me which one is which.




These are the top 3 dmd error messages that bother me regularly. At runtime, little drives me more nuts than RangeError not telling me the index and the length. Again, it knows, the code checked it, but it didn't report it.
« First   ‹ Prev
1 2 3