重归混沌的BLOG

Added mutex for silly

Original link: https://blog.gotocoding.com/archives/1803?utm_source=rss&utm_medium=rss&utm_campaign=%25e4%25b8%25basilly%25e5%25a2%259e%25e5%258a%25a0%25e4%25ba%2586%25e4% 25ba%2592%25e6%2596%25a5%25e9%2594%2581 Silly is a high-concurrency network framework implemented based on the Coroutine mechanism of the Lua language. Its coroutine scheduling mechanism is very simple. All functions are wrapped in coroutine and executed. When the code calls socket.read\/core.sleep and other specified APIs, the current coroutine will hang until socket.read\/core.sleep until the result is

Added mutex for silly Read More »

Closures in Go Language

Original link: https://blog.gotocoding.com/archives/1786?utm_source=rss&utm_medium=rss&utm_campaign=go%25e8%25af%25ad%25e8%25a8%2580%25e4%25b9%258b%25e9%2597%25ad%25e5 %258c%2585%25e7%25af%2587 Among the languages ​​​​with GC and closure implementation, I am most familiar with Lua language. Therefore, when using the Go language, when encountering unfamiliar details, it will always be compared with the Lua mechanism. However, due to the difference between dynamic language and static language (static language always has more optimization

Closures in Go Language Read More »

Memory in Go language

Original link: https://blog.gotocoding.com/archives/1775?utm_source=rss&utm_medium=rss&utm_campaign=go%25e8%25af%25ad%25e8%25a8%2580%25e4%25b9%258b%25e5%2586%2585%25e5 %25ad%2598%25e7%25af%2587 TL;DR: This article does not discuss three-color garbage collection, read-write barriers, or memory allocation strategies. Just abstracts a simple barrier from a memory perspective. In order to know the boundaries of the language when writing the Go language, so that the previous experience of C/C++ can be reused. In the last

Memory in Go language Read More »

Getting to know the Go language

Original link: https://blog.gotocoding.com/archives/1767?utm_source=rss&utm_medium=rss&utm_campaign=%25e5%2588%259d%25e8%25af%2586go%25e8%25af%25ad%25e8%25a8%2580 In fact, strictly speaking, it is not a first acquaintance. About 15 years ago, I learned the grammar of Go language once. Due to the poor reputation of Go language GC at that time, I didn’t study it too seriously, but I just learned the syntax roughly. The impression of Go is

Getting to know the Go language Read More »

Re-abstract graphics API

Original link: https://blog.gotocoding.com/archives/1760?utm_source=rss&utm_medium=rss&utm_campaign=%25e9%2587%258d%25e6%2596%25b0%25e6%258a%25bd%25e8%25b1%25a1%25e5% 259b%25be%25e5%25bd%25a2api In this abstraction, I almost completely rejected the previous abstraction . Originally, the abstraction of RHI has been basically completed, and you can happily write basic lighting and shadowing functions. However, I accidentally saw the big guys talking about bindless in the QQ group, and then went to check the information,

Re-abstract graphics API Read More »

Implemented a math library for Lua

Original link: https://blog.gotocoding.com/archives/1743?utm_source=rss&utm_medium=rss&utm_campaign=%25e7%25bb%2599lua%25e5%2586%2599%25e4%25ba%2586%25e4%25b8%2580%25e4% 25b8%25aa%25e6%2595%25b0%25e5%25ad%25a6%25e5%25ba%2593 My toy engine plans to use Lua as the first business language. After the engine can load a scene, I need a camera controller to receive user input to move and rotate the camera to walk the scene. I’m going to use Lua to write this logic. When calculating the Transform

Implemented a math library for Lua Read More »

Talk about abstraction of cross-platform graphics API

Original link: https://blog.gotocoding.com/archives/1737?utm_source=rss&utm_medium=rss&utm_campaign=%25e8%25b0%2588%25e8%25b0%2588%25e8%25b7%25a8%25e5%25b9%25b3%25e5% 258f%25b0%25e5%259b%25be%25e5%25bd%25a2api%25e7%259a%2584%25e6%258a%25bd%25e8%25b1%25a1 Originally, according to the plan in March, the basic mode of King Glory was copied first , and based on this, a set of general client framework based on Lua was abstracted, and then slowly optimized according to the needs. However, at the end of March, the GAMES series released a

Talk about abstraction of cross-platform graphics API Read More »