https://www.youtube.com/watch?v=d2VRuZo2pdA
About 50% of it is inadvertent praise for D. The rest is ARC and C++ interop.
Thread overview | ||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
October 17, 2021 Nim Nuggets: Nim talk at Strange Loop 2021 | ||||
---|---|---|---|---|
| ||||
https://www.youtube.com/watch?v=d2VRuZo2pdA About 50% of it is inadvertent praise for D. The rest is ARC and C++ interop. |
October 17, 2021 Re: Nim Nuggets: Nim talk at Strange Loop 2021 | ||||
---|---|---|---|---|
| ||||
Posted in reply to jfondren | On Sunday, 17 October 2021 at 04:17:38 UTC, jfondren wrote: >https://www.youtube.com/watch?v=d2VRuZo2pdA About 50% of it is inadvertent praise for D. The rest is ARC and C++ interop. Ha, good one. So where is D's hygienic AST macro system that lets you reflect over types? No, string mixins and experimental std.reflection in some offside branch don't count. |
October 17, 2021 Re: Nim Nuggets: Nim talk at Strange Loop 2021 | ||||
---|---|---|---|---|
| ||||
Posted in reply to jfondren | On Sunday, 17 October 2021 at 04:17:38 UTC, jfondren wrote: >https://www.youtube.com/watch?v=d2VRuZo2pdA About 50% of it is inadvertent praise for D. The rest is ARC and C++ interop. If you mean compile time evaluation, D wasn't the first with such features and it is quite far from what Common Lisp is capable of. |
October 17, 2021 Re: Nim Nuggets: Nim talk at Strange Loop 2021 | ||||
---|---|---|---|---|
| ||||
Posted in reply to Araq | On Sunday, 17 October 2021 at 05:26:25 UTC, Araq wrote: >On Sunday, 17 October 2021 at 04:17:38 UTC, jfondren wrote: >https://www.youtube.com/watch?v=d2VRuZo2pdA About 50% of it is inadvertent praise for D. The rest is ARC and C++ interop. Ha, good one. So where is D's hygienic AST macro system that lets you reflect over types? No, string mixins and experimental std.reflection in some offside branch don't count. D may not have an AST macro system but has had |
October 17, 2021 Re: Nim Nuggets: Nim talk at Strange Loop 2021 | ||||
---|---|---|---|---|
| ||||
Posted in reply to jfondren | On Sunday, 17 October 2021 at 04:17:38 UTC, jfondren wrote: >https://www.youtube.com/watch?v=d2VRuZo2pdA About 50% of it is inadvertent praise for D. The rest is ARC and C++ interop. Does it mention D anywhere? |
October 17, 2021 Re: Nim Nuggets: Nim talk at Strange Loop 2021 | ||||
---|---|---|---|---|
| ||||
Posted in reply to Paulo Pinto | On 10/16/2021 11:05 PM, Paulo Pinto wrote:
> On Sunday, 17 October 2021 at 04:17:38 UTC, jfondren wrote:
>> https://www.youtube.com/watch?v=d2VRuZo2pdA
>>
>> About 50% of it is inadvertent praise for D. The rest is ARC and C++ interop.
>
> If you mean compile time evaluation, D wasn't the first with such features and it is quite far from what Common Lisp is capable of.
Lisp is fundamentally different. It started out as an interpreter and later added native code generation. There never really was a difference between compile time and runtime for Lisp.
Nobody even thought of compile time function evaluation for C and C++ until D did it.
Nobody.
As evidence, when people discovered that C++ templates could be used to evaluate things at compile time, everyone was completely agog over it. I never heard *anyone* suggest that maybe ordinary functions could do this, too.
Now everyone does it. Even C is considering adding it.
|
October 17, 2021 Re: Nim Nuggets: Nim talk at Strange Loop 2021 | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | On Sunday, 17 October 2021 at 08:15:26 UTC, Walter Bright wrote:
> On 10/16/2021 11:05 PM, Paulo Pinto wrote:
>> On Sunday, 17 October 2021 at 04:17:38 UTC, jfondren wrote:
>>> https://www.youtube.com/watch?v=d2VRuZo2pdA
>>>
>>> About 50% of it is inadvertent praise for D. The rest is ARC and C++ interop.
>>
>> If you mean compile time evaluation, D wasn't the first with such features and it is quite far from what Common Lisp is capable of.
>
> Lisp is fundamentally different. It started out as an interpreter and later added native code generation. There never really was a difference between compile time and runtime for Lisp.
>
> Nobody even thought of compile time function evaluation for C and C++ until D did it.
>
> Nobody.
>
> As evidence, when people discovered that C++ templates could be used to evaluate things at compile time, everyone was completely agog over it. I never heard *anyone* suggest that maybe ordinary functions could do this, too.
>
> Now everyone does it. Even C is considering adding it.
And still, in 2021 using C++20, compile time features are severely crippled.
I tried just some days ago doing some simple math pow stuff and the answer I got from the C++ community was "eh, well you'd have to use a constexpr compatible library for that"
|
October 17, 2021 Re: Nim Nuggets: Nim talk at Strange Loop 2021 | ||||
---|---|---|---|---|
| ||||
Posted in reply to Imperatorn | On Sunday, 17 October 2021 at 08:20:24 UTC, Imperatorn wrote: > And still, in 2021 using C++20, compile time features are severely crippled. How so? Anyway, what Walter said was not accurate. Languages are usually defined in a way where compile-time optimizations are optional and an implementation detail. Compile time evaluation of functions is nothing new, and a common optimization. > I tried just some days ago doing some simple math pow stuff and the answer I got from the C++ community was "eh, well you'd have to use a constexpr compatible library for that" Because pow may be system specific at runtime. A compile time optimization should not lead to a different outcome. |
October 17, 2021 Re: Nim Nuggets: Nim talk at Strange Loop 2021 | ||||
---|---|---|---|---|
| ||||
Posted in reply to Araq | On Sunday, 17 October 2021 at 05:26:25 UTC, Araq wrote: >Ha, good one. So where is D's hygienic AST macro system that lets you reflect over types? No, string mixins and experimental std.reflection in some offside branch don't count. Why do people call it "hygienic macros"? It feels like sales pitch trying to sell something that is the exact opposite. |
October 17, 2021 Re: Nim Nuggets: Nim talk at Strange Loop 2021 | ||||
---|---|---|---|---|
| ||||
Posted in reply to Araq | On Sunday, 17 October 2021 at 05:26:25 UTC, Araq wrote: >On Sunday, 17 October 2021 at 04:17:38 UTC, jfondren wrote: >https://www.youtube.com/watch?v=d2VRuZo2pdA About 50% of it is inadvertent praise for D. The rest is ARC and C++ interop. Ha, good one. So where is D's hygienic AST macro system that lets you reflect over types? No, string mixins and experimental std.reflection in some offside branch don't count. I agree that D's meta-programming isn't where it should be. I think apart from views on significant whitespace NIM and D shouldn't be too far apart. |