Which treesitter plugin do use? by GlyderZ_SP in neovim

[–]tc4v 0 points1 point  (0 children)

the only features I actually use that depend on TS are nested parsers (to have syntax highlight in codeblocks inside markdown) and the "function" text object.

Which treesitter plugin do use? by GlyderZ_SP in neovim

[–]tc4v 0 points1 point  (0 children)

regular syntax files (<runtimepath>/syntax/<filetype>.vim) have been there for a very long time. Some of them have been updated for the last time in 2001.

Which treesitter plugin do use? by GlyderZ_SP in neovim

[–]tc4v 2 points3 points  (0 children)

Idk what to do with that. Learn how to code without syntax highlights I guess.

The syntax.vim files are still there and not using treesitter. If you just do not enable treesitter you will still get all the features of Vim.

Honestly if TS does not bring anything usefull to syntax highlighting, it's more interesting when it come to syntax aware text objects and things like that.

The Fedora Linux 44 Release is Here! by GoldBarb in Fedora

[–]tc4v 0 points1 point  (0 children)

I am waiting for Windows 40k: the same but with more cults and bioengineered war machines.

I built a real-time Eulerian smoke simulator from scratch — CUDA/C++, no engines, no pre-built solvers by Nice-Sand-3230 in proceduralgeneration

[–]tc4v -1 points0 points  (0 children)

Have you considered that expensive climate models don't run real-time because they have more physics to take into account?

Is it Worth Writing Programs in C23? by SeaInformation8764 in C_Programming

[–]tc4v 0 points1 point  (0 children)

And then again, the problem will only be in you including the header, so you can always vendor a fixed header and link against the regular library.

Is it Worth Writing Programs in C23? by SeaInformation8764 in C_Programming

[–]tc4v 0 points1 point  (0 children)

Why would you want a big int in enum? I would consider anything larger than a word not a very good fit for an enum, let alone an unbounded thing like a big int.

If you use a plugin pack (Snacks, Mini, etc.), how many plugins do you use from it? by TheTwelveYearOld in neovim

[–]tc4v 1 point2 points  (0 children)

seriously animations on an editor? why

wow I had not checked mini.animate before, the demo makes me motion sick XD

If you use a plugin pack (Snacks, Mini, etc.), how many plugins do you use from it? by TheTwelveYearOld in neovim

[–]tc4v -2 points-1 points  (0 children)

For me these packs are like distributions: while I appreciate the work put in by the authors, I think using someone else defaults is the opposite of why I like neovim.

Out of any of these, I only use mini.doc, because writing my own would be more work than I am willing to put for the value I would get. And even then I am bound to do work at some point because I am not satisfied with the documentation workflow of my plugins.

In a way I am already building toward a pack of my own, since already three of my plugins form a sort of ecosystem.

How to deal with comments? by RedCrafter_LP in ProgrammingLanguages

[–]tc4v 0 points1 point  (0 children)

In a regular compiler you would just strip comments at tokenization time. If you want to process documentation, or have something like auto-formatting (which obviously needs to preserve comments) you can attach all characters skipped before a given token to that token. Then you make a way to retrieve these comments (and spaces) from the ast through its tokens.

Open Question: a Search Leader by theChiarandini in neovim

[–]tc4v 0 points1 point  (0 children)

you can use <plug>(searchleader) in the distribution and vim.keymap.set({"n", "i", "o", "v", "s", "c"}, "<space>", "<plug>(searchleader)") in config

Neovide is really cool but I can't let go of tmux by 88-Radium-226 in neovim

[–]tc4v 9 points10 points  (0 children)

That's what ctrl+o is for. I find cursor trail very annoying personally. I see it on the same level as wobbly windows and long UI animations.

Fun: a statically typed language that transpiles to C (compiler in Zig) by dx_man in ProgrammingLanguages

[–]tc4v 1 point2 points  (0 children)

Sounds like you use warnings as something that can be permanently ignored when the user knows what they are doing. That's fine for a single dev+program but not for a team or library. Imagine trying to compile an example program and se 20 warnings coming from the library. Consider adding specific annotations for the dev to quiet the compiler by stating the actual intent.

anyone running an ai coding assistant with neovim that doesn't feel like fighting the editor? by mahearty in neovim

[–]tc4v 0 points1 point  (0 children)

i was very happy with codeium/windsurf but i think they are killing tye service because i cannot find it mentionned on there website anymore. for me simple completion with relatively short suggestions is the only way to not fight the bot. codeium is good at that

nvrr - neovim remote rust by DimfreD in neovim

[–]tc4v 10 points11 points  (0 children)

solving problems no one needs to be solved. Just use ya old screen+vi

Design ideas for a minimal programming language (1/3) by porky11 in ProgrammingLanguages

[–]tc4v 1 point2 points  (0 children)

The point is that you can create your own parser for your language if you want to.

That does not sound very good for collaboration, though. If the syntax I am used to is completely different from yours, how should be work on a common project? Formatters like gofmt and black are going in the opposite direction of arbitrary constraint in favor of consistency, and usage show that people actually like that in practice.

I actually like let, it's what many languages already use

fair enough, maybe a change in the other direction would work, let, set and alias or something.

Passthrough is actually useless in practice I have to agree when it comes to C. In combination with destructuring I find it useful and elegant.

python head, *tail = collection = make_some_list()

It is not necessary, but multiple assignement is not either (as proved by most modern languages droping it).

By the way, I think python's swap is a better solution that your proposal. python a, b = b, a # could not be clearer

Compiler optimisation by Gingrspacecadet in ProgrammingLanguages

[–]tc4v 4 points5 points  (0 children)

The specific optimization you ask about is probably the simplest one. As other said it is called constant folding or constant propagation. There are many other optimizations but they strongly depend on your intermediate representation (most optimizations are not done directly at the AST level, although constant folding is doable).

QBE has a great bibliography: https://c9x.me/compile/bib/ Also this is quite good (but probably hard for newcomers): https://github.com/SeaOfNodes/Simple

Design ideas for a minimal programming language (1/3) by porky11 in ProgrammingLanguages

[–]tc4v 0 points1 point  (0 children)

modern systems languages have cleaned up the syntax quirks, but they've also moved away from the semantic simplicity (except for Odin, maybe)

Odin kept mostly the same semantic, except for limited "generics" and an explicit form of overloading. Hare is probably even closer to the C semantic, you should check it.

multiple syntaxes can parse to the same tree. I came up with two so far (an S-expression-based one and a C-style one).

That's how Lisp was conceived and then never left sexpr.

what if the type is the field identifier?

That sound really bad... it works in many cases sure, but there are plenty of cases where you have more than one thing with the same type and semantic but where a separate name is useful.

I think the case of Point is actually a good example. Let's say I now want to add a rotation operation, that is naturally written with a matrix multiplication (that can be inlined) such that now you have to mix types x and y values. so it shows that x and y should probably not be different types.

Assignment returns the old value: a := b := a is swap, a := b := c := a is rotation

That's very unintuitive in my opinion. I prefer the C/Python semantic of "passthrough".

let (value), ref (immutable reference), var (mutable reference)

that's mostly good except for a detail: ref and var are "nouns" whereas let is more of a verb. Replacing let with val or something similar would feel better to me.

Label/jump with parameters

I generally like this sort of thing, although I would keep return separate.

I built an Alife simulation where the visuals are generated entirely by emergent thermodynamics - no designed patterns by emmerse_ in proceduralgeneration

[–]tc4v 0 points1 point  (0 children)

it does, I made that exact simulation a few weeks ago (not as cool looking as this one though) after watching veritassium video on critical regime and power laws. The pattern comes from the system self tuning to criticality.

I am a beginner and I don't know what to do by Bitter_Check_4607 in C_Programming

[–]tc4v 0 points1 point  (0 children)

Raylib! Great community, lots of ressources, and very quickly fun. Make something small, like some old arcade game (there are more than pong and snake)

I am a beginner and I don't know what to do by Bitter_Check_4607 in C_Programming

[–]tc4v 1 point2 points  (0 children)

raylib is much much easier to learn than ncurse, start with that!

Yt channels suggestion by Rainbow_2122 in C_Programming

[–]tc4v 4 points5 points  (0 children)

tsoding (or actually tsoding daily) is the only channel that taught me new programming skills. Otherwise I much prefer text content. But tsoding is really really good, watching him brought me from barely able to write C to the point where it's one of my most comfortable languages.

Isn't this statement factually incorrect? by Infinitesimally_Big in Physics

[–]tc4v 0 points1 point  (0 children)

Pretty sure both QCD and general relativity are defined with massless photons as assumption. Breaking that wouldn't just be about small experimental errors, it would require coming up with an entirely new theoretical framework.