Xavier Wang

Results 149 comments of Xavier Wang

> When optimization is enabled and `-target x86_64-windows-msvc`, zig cc will link to release version of UCRT. Or it will choose the debug version of UCRT (although no `-g` specified)....

So Is there any work around for the unexpected errors for `profile.release`?

@alerque new rockspecs updated (and tidy old versions)

It seems that you are the maintainer of the Arch Linux packet of this module? So do you want a operation rights for manipulate this repo?

> > new rockspecs updated (and tidy old versions) > > @starwing , rockspecs have a error in https://github.com/starwing/luautf8/blob/master/rockspecs/luautf8-scm-1.rockspec#L20 : it should be `["utf8"] = "lutf8lib.c"` as per https://github.com/starwing/luautf8/blob/master/lutf8lib.c#L2212 >...

> It can't be utf8, thus will make Lua not load the module, because Lua already had a utf8 module, you should build a lua-utf8.so, and Lua will load its...

> > > 可以看看这个 https://github.com/cloudfreexiao/lua-protobuf > > > > > > 请教下,我不太明白,那问题的关键是从哪里入手处理呢 > > > > 你diff一下,没改多少。 提一个pr?

> lua 5.3.4 > > ubuntu 22 > > 下载代码并生成pb.so,我服务器的skynet的agent服务,lua代码加载pb模块,然后pb去loadfile XXX.pb文件后能解析protobuf协议,但是agent退出时导致主进程崩溃,屏蔽了loadfile之后,agent退出就没问题,这个pb是不是需要释放资源? 另外能给一个崩溃的堆栈吗?理论上这个库应该单线程使用,如果有多个Lua状态也是可以的,但是如果你多线程使用了同一个状态那可能的确会有点问题,具体情况要看堆栈。不过多线程其实也能用,你要看看unsafe模块,它提供了“多个状态共享载入数据”的功能。

> https://github.com/cloudfreexiao/lua-protobuf/tree/pr @cloudfreexiao @hanxi 你好,这个分支,skynet 多个服务同时使用是安全的吗,现在我们每个服务都去加载protobuf的pb文件,导致cmem会占1.7M。我刚刚试了下这个可以用,如果是安全的,会给我们节省很多内存。如果可以用,那效率不知道和不共享lua state,会不会有差别 你好,官方目前已经支持了全局的state,具体请看pb.state()函数。另外unsafe.use "global"允许你使用“上次成功load协议”的State。你可以在代码里搜索global_state看看实现(共7个地方)。如果这个功能在skynet有bug,请提交issue,我来修。

> @starwing 程序启动时 > local protobuf = require "pb" > protobuf.loadfile() ,加载了一批pb文件 > > 然后调用 > local protobuf_unsafe = require "pb.unsafe" > protobuf_unsafe.use("global") > > 后面的新建服务使用 > local protobuf =...