!HCjHPBLFfoFpYNgwdE:matrix.org

Neovim dev

210 Members
Discussion about Neovim development and adjacent topics14 Servers

Load older messages


SenderMessageTime
7 Nov 2024
@shadowwolf_01:matrix.orgsmolckthe issue is that this would just re-introduce vtables wouldn't it? hrmmmmm21:44:42
@bfredl:matrix.orgbfredleither vtables, or it would be tempting to make a static lib just with undefined symbols in place of the TUI callbacks.. 21:45:21
@bfredl:matrix.orgbfredlas any embedding UI will typically make do with one set of callbacks for the ui client21:45:46
@shadowwolf_01:matrix.orgsmolck
In reply to @bfredl:matrix.org
either vtables, or it would be tempting to make a static lib just with undefined symbols in place of the TUI callbacks..
that sounds like the best choice, no?
21:46:43
@shadowwolf_01:matrix.orgsmolcknot sure exactly the details of it, but that feels more performant and avoids the vtable BS21:47:15
@shadowwolf_01:matrix.orgsmolckwhich would you suggest I do?21:49:18
@bfredl:matrix.orgbfredl
In reply to @shadowwolf_01:matrix.org
which would you suggest I do?
the latter is probably easier actually. Can mostly change the generator to use a generic name instead of tui_{event_name} when compiling as a library
21:52:45
@shadowwolf_01:matrix.orgsmolck
In reply to @bfredl:matrix.org
the latter is probably easier actually. Can mostly change the generator to use a generic name instead of tui_{event_name} when compiling as a library
alrighty, got some files to get me started? probably not gonna work on it much today, but I'll see about chipping away at it as I have time
21:53:38
@shadowwolf_01:matrix.orgsmolcklike links to where in the code to go, to clarify21:54:27
@bfredl:matrix.orgbfredlui_client.c and generators/gen_api_ui_events.lua 21:54:29
@shadowwolf_01:matrix.orgsmolckty ty21:54:36
@shadowwolf_01:matrix.orgsmolckah the ol' generators21:54:43
@shadowwolf_01:matrix.orgsmolckfuckin' C21:54:47
@moonglade:matrix.orgFamiu
In reply to @shadowwolf_01:matrix.org
ah the ol' generators
Those are what I've been working with recently for options
21:56:21
@moonglade:matrix.orgFamiuPretty darn cool21:56:26
@shadowwolf_01:matrix.orgsmolckit's both cool and confusing af at times haha21:56:38
@shadowwolf_01:matrix.orgsmolckthe question is, is it better than using Jinja for metaprogramming? :P21:56:57
@moonglade:matrix.orgFamiuIt was confusing at first then it became cool and now I feel like ZyX-at-home21:57:00
@shadowwolf_01:matrix.orgsmolck"mom I want proc macros"21:57:41
@shadowwolf_01:matrix.orgsmolck"we have proc macros at home"21:57:45
@shadowwolf_01:matrix.orgsmolck proc macros at home 21:57:47
@shadowwolf_01:matrix.orgsmolck
      output:write(
        'ui_client_dict2hlattrs(args.items['
          .. (j - 1)
          .. '].data.dict, '
          .. (hlattrs_args_count == 0 and 'true' or 'false')
          .. ');\n'
      )
21:58:01
@shadowwolf_01:matrix.orgsmolck
In reply to @bfredl:matrix.org
the latter is probably easier actually. Can mostly change the generator to use a generic name instead of tui_{event_name} when compiling as a library
the only thing I'm unsure about is how to do the undefined symbols thing, would it just be like, some header file forward declares these functions and either they're defined in the case of neovim itself or you have to define them in your own project to use them?
22:01:17
@shadowwolf_01:matrix.orgsmolckstill not sure how that would look . . .22:01:21
@shadowwolf_01:matrix.orgsmolckis this even like a thing that people do?22:01:48
@shadowwolf_01:matrix.orgsmolck"hey here's a library, won't compile until you implement these functions . . ."22:02:02
@bfredl:matrix.orgbfredlyea, you would need header declarations for the unimplemented functions22:02:23
@bfredl:matrix.orgbfredl
In reply to @shadowwolf_01:matrix.org
"hey here's a library, won't compile until you implement these functions . . ."
on a low level, this is how all static libraries work
22:02:37
@bfredl:matrix.orgbfredl(static libraries aren't real, they are just a bunch of .o files smashed together with duct tape)22:03:11
@shadowwolf_01:matrix.orgsmolckinteresting22:03:21

Show newer messages


Back to Room ListRoom Version: 10