digitalmars.D - Inside of =?UTF-8?B?ROKAmXM=?= GC in Russian
- Dmitry Olshansky (9/9) Apr 21 You never asked for this but I’ve slowly started translating my
- Serg Gini (2/4) Apr 21 Btw how many milestones from this old post were implemented?
- Dmitry Olshansky (8/13) Apr 21 In the upstream, none as far as I know.
- Dmitry Olshansky (3/12) Apr 21 And here is the second one:
- Kagamin (18/18) Apr 23 One time I wanted `inout` in C#, that uses wrapper types for
- Dmitry Olshansky (4/22) Apr 24 Have Span be a subtype of ReadOnlySpan, either through interfaces
- Kagamin (3/3) Apr 25 Looks like the compiler here can't simultaneously do template
- Dmitry Olshansky (11/14) Apr 25 I’ve been doing a bit of Kotlin -> C# lately and found its type
- Kagamin (28/28) Apr 25 Running on jvm, Kotlin presumably handles everything with GC
- Dmitry Olshansky (3/5) Apr 25 Naturally my code is ported with the same hierarchy, still
- Walter Bright (2/4) Apr 21 It's a fine thing to do. Thank you!
- Dmitry (2/11) May 02 Nice! Thank you!
You never asked for this but I’ve slowly started translating my posts to my native tongue. https://sponsr.ru/glow/31355/Vnutri_sborshchika_musora_D Hope it could be useful for my fellow citizens and if anything rereading my prose gives me new insights. — Dmitry Olshansky CEO Glowlabs https://olshansky.me
Apr 21
On Sunday, 21 April 2024 at 15:34:37 UTC, Dmitry Olshansky wrote:Hope it could be useful for my fellow citizens and if anything rereading my prose gives me new insights.Btw how many milestones from this old post were implemented?
Apr 21
On Sunday, 21 April 2024 at 16:41:07 UTC, Serg Gini wrote:On Sunday, 21 April 2024 at 15:34:37 UTC, Dmitry Olshansky wrote:In the upstream, none as far as I know. As to "Raven GC" I had in the works pretty much all of them, but the project got stagnated. I might be able to recover it though. -- Dmitry Olshansky CEO Glowlabs https://olshansky.meHope it could be useful for my fellow citizens and if anything rereading my prose gives me new insights.Btw how many milestones from this old post were implemented?
Apr 21
On Sunday, 21 April 2024 at 15:34:37 UTC, Dmitry Olshansky wrote:You never asked for this but I’ve slowly started translating my posts to my native tongue. https://sponsr.ru/glow/31355/Vnutri_sborshchika_musora_D Hope it could be useful for my fellow citizens and if anything rereading my prose gives me new insights.And here is the second one: https://sponsr.ru/glow/54932/Samaya_bolshaya_oshibka_D/— Dmitry Olshansky CEO Glowlabs https://olshansky.me
Apr 21
slices. How would you design it without `inout`? ``` Span<T> Shrink<T>(Span<T> s, int length) { if (s.Length > length) return s.Slice(0, length); return s; } ReadOnlySpan<T> Shrink<T>(ReadOnlySpan<T> s, int length) { if (s.Length > length) return s.Slice(0, length); return s; } void test(byte[] a) { //var b = Shrink(a, 2); //can't infer type var b2 = Shrink<byte>(a, 2); }
Apr 23
On Tuesday, 23 April 2024 at 13:38:41 UTC, Kagamin wrote:slices. How would you design it without `inout`?Have Span be a subtype of ReadOnlySpan, either through interfaces and dynamic dispatch or through alias this and implicit conversion.``` Span<T> Shrink<T>(Span<T> s, int length) { if (s.Length > length) return s.Slice(0, length); return s; } ReadOnlySpan<T> Shrink<T>(ReadOnlySpan<T> s, int length) { if (s.Length > length) return s.Slice(0, length); return s; } void test(byte[] a) { //var b = Shrink(a, 2); //can't infer type var b2 = Shrink<byte>(a, 2); }
Apr 24
Looks like the compiler here can't simultaneously do template inference, overload resolution and implicit conversion. I guess C++ somehow copes with that?
Apr 25
On Thursday, 25 April 2024 at 09:09:10 UTC, Kagamin wrote:Looks like the compiler here can't simultaneously do template inference, overload resolution and implicit conversion. I guess C++ somehow copes with that?inference lacking. Things that are easily deduced by Kotlin converting monadic parser code that uses a variation of Result monad. Lack of bottom type also hurts, plus had to introduce my own unit type. — Dmitry Olshansky CEO Glowlabs https://olshansky.me
Apr 25
Running on jvm, Kotlin presumably handles everything with GC such design, this compiles: ``` class A<T> { } class B<T> : A<T> { } class C<T> : B<T> { } void test1<T>(A<T> a, int b) { } void test1<T>(B<T> a, int b) { } void test2(A<int> a, B<int> b, C<int> c) { test1(a, 0); test1(b, 0); test1(c, 0); } ``` `Memory` doesn't implicitly convert to `Span`, but it's not in D tradition and it doesn't look like something prevents it, then type hierarchy would look like this: ``` class Memory<T> : ReadOnlyMemory<T>, Span<T> class ReadOnlyMemory<T> : ReadOnlySpan<T> class Span<T> : ReadOnlySpan<T> ``` i.e. the diamond pattern with multiple inheritance, I think this will be challenging to disambiguate, and it happens merely due to proliferation of wrapper types.
Apr 25
On Thursday, 25 April 2024 at 14:35:17 UTC, Kagamin wrote:Running on jvm, Kotlin presumably handles everything with GC allocated classes and single inheritance.Naturally my code is ported with the same hierarchy, still inference fails at times.
Apr 25
On 4/21/2024 8:34 AM, Dmitry Olshansky wrote:You never asked for this but I’ve slowly started translating my posts to my native tongue.It's a fine thing to do. Thank you!
Apr 21
On Sunday, 21 April 2024 at 15:34:37 UTC, Dmitry Olshansky wrote:You never asked for this but I’ve slowly started translating my posts to my native tongue. https://sponsr.ru/glow/31355/Vnutri_sborshchika_musora_D Hope it could be useful for my fellow citizens and if anything rereading my prose gives me new insights. — Dmitry Olshansky CEO Glowlabs https://olshansky.meNice! Thank you!
May 02