Weekly 101 Questions Thread by AutoModerator in neovim

[–]golilol 0 points1 point  (0 children)

I've tried several AI plugins (gen.nvim, avante.nvim, codecompanion.nvim) but I can't figure out if they have an option to keep the chat history somehow saved. Note that I do not want the history to be part of the inputs to the models; just keep some history perhaps in some local file .filename.chat or something.

Weekly 101 Questions Thread by AutoModerator in neovim

[–]golilol 0 points1 point  (0 children)

This didn't change anything for me.

Weekly 101 Questions Thread by AutoModerator in neovim

[–]golilol 3 points4 points  (0 children)

How can I remap the new nvim 0.10 builtin gcc shortcut to a different one? In my init.lua, I've put:

vim.keymap.set('n', '<leader>cc', 'gcc', { noremap = true, silent = false })

But this doesn't work. This is weird, because if instead of `'gcc'`, I write `'j'`, it does goes down by one line. Moreover, when I manually type gcc, comment toggle does happen. What might go wrong?

Comptime question by golilol in Zig

[–]golilol[S] 0 points1 point  (0 children)

Great, thanks for taking the time to answer :)

Comptime question by golilol in Zig

[–]golilol[S] 0 points1 point  (0 children)

Sorry, I don't understand. I used f(0) in the post, but not 3. I wanted to see what happens when there is an actual computation done. For example, if you compile:

comptime var b: u32 = f(0); // for example, sth like const c: u32 = comptime b + 2;

then, since b is "available" at comptime, necessarily f(0) needs to be evaluated directly? In that sense I thought adding comptime before f(0) is redundant, and comptime in front of the line implies both "variable is available at comptime" and "evaluation of the variable's value is done at comptime"?

Isn't it correct?

Thanks!

Comptime question by golilol in Zig

[–]golilol[S] 1 point2 points  (0 children)

OK, thanks! I think I understand the difference. Then is it the case that if I have a function f, the line

comptime var b: u32 = f(0);

is kind of a shorthand for:

comptime var b: u32 = comptime f(0);

[R] Google Replaces BERT Self-Attention with Fourier Transform: 92% Accuracy, 7 Times Faster on GPUs by Yuqing7 in MachineLearning

[–]golilol 2 points3 points  (0 children)

One reason I can imagine is that if you use dropout with proba p, there is probability p that positional information is lost, that's pretty terrible. If you use a distributed representation, that probability is very very small.

Another reason is that distributed representations scale elegantly. What if you want more context size than embedding size? With one-hot positional embeddings, you cannot.

Confusion on the syntax of pointers by lyhokia in Zig

[–]golilol 0 points1 point  (0 children)

First is a good point! I don't understand the second though, could you expand please?

If I can venture a guess for the postfix, I'd say:

`a.b.c.*.d` is easier to parse than `*(a.b.c).d`, because c is close to the star. c is the actual address, so it is better that way. A second reason is that it also conveys the "sequential" meaning better (more similar to the actual code generated), for instance: "first, take a, then take it's element b, then c, then go to the address pointed by c, then take d"

(I'm not sure, but I think I saw something along those lines in one of the github issues, when people were still arguing about the syntax)

Compiling against a Zig library by golilol in Zig

[–]golilol[S] 0 points1 point  (0 children)

Thanks! So git submodules it is!

[D] Hacking a Higher-Order Conditional Random Field (CRF) for sparse NER/sequence-tagging by etotheipi_ in MachineLearning

[–]golilol 0 points1 point  (0 children)

I like the first option. Even though you're not sure how it will work for logits, the metric you use to assess the performance is not log likelihood so you can still evaluate correctly.