thautwarm / Site-32

thautwarm's blog page.
https://thautwarm.github.io/Site-32/
7 stars 1 forks source link

some hints #11

Open thautwarm opened 3 years ago

thautwarm commented 3 years ago
  1. (dataclasses)inline cache field that doesn't matter ordering and equality.
thautwarm commented 2 years ago

dotnet publish -c Release -o publish -p:PublishReadyToRun=true -p:PublishSingleFile=true -p:PublishTrimmed=true --self-contained true -p:IncludeNativeLibrariesForSelfExtract=true

thautwarm commented 2 years ago

.NET languages are F# is incapable of implementing comparators using object identities. obj.ReferenceEquals is not enough. The implication is you cannot implement structural comparisons (like those used for Map keys) for algebraic data types when a field has a reference type and is intentionally compared using its identity.

C# can use System.Collections.Generic.EqualityComparer<_>.Default, but F# Maps uses binary tree implementation which asks an explicit impl of System.IComparable (partial ordered compare). Many reference types do not support this.

thautwarm commented 2 years ago

.net没有支持serialize interface property的办法。 newtonsoft.json的typehandling.all不实用因为数据结构协议依赖.net,并且没有办法自定义serialization的协议(typehandling.auto+serializationbinder不识别interface field)

.net至今不支持完整的json(反)序列化,正是因为起羸弱的反射系统或者静态类型系统。强健的反射和静态trait+derive都可以结束这个问题

thautwarm commented 2 years ago

.net没有支持serialize interface property的办法。 newtonsoft.json的typehandling.all不实用因为数据结构协议依赖.net,并且没有办法自定义serialization的协议(typehandling.auto+serializationbinder不识别interface field)

.net至今不支持完整的json(反)序列化,正是因为起羸弱的反射系统或者静态类型系统。强健的反射和静态trait+derive都可以结束这个问题

simplejson+reflection完美解决,newtonsoft.json纯纯cjb

thautwarm commented 2 years ago

用antlr在vscode里搭一个解释器,把vscode当操作系统用

thautwarm commented 2 years ago

mp4 跨平台: https://www.openh264.org/

thautwarm commented 2 years ago

音乐编程:https://dimasamoz.github.io/docs/reports/part-2-dissertation.pdf