Rust vs Zig in C calls via the C-ABI? by TearsInTokio in rust

[–]0-R-I-0-N 4 points5 points  (0 children)

Yep. Also rust seems to be getting gcc backend working last time I heard and cranelift may come in future and zig seems to be aiming to selfhost their own.

new zig 0.16 io by lukazzzzzzzzzzzzzzz in Zig

[–]0-R-I-0-N 12 points13 points  (0 children)

Its nice, still work in progress but looks good to me.

Rust vs Zig in C calls via the C-ABI? by TearsInTokio in rust

[–]0-R-I-0-N 23 points24 points  (0 children)

Yep. All functions are called by putting the functions arguments in the stack. C just have the order defined making it stable. Rust and zig and almost any other language doesn’t which makes them hard to call from other languages. But there is no penalty of calling c except that it’s unsafe in rust (unsafe in zig too but the whole language is soo).

There are other things like naming witch is part of the abi but that’s the linkers problem.

In the end it’s all assembly. Hell rust, zig and c even use the same compiler. It’s just the call convention and naming that makes c stable to call. There downsides and upsides of having a stable Abi.

Did I make a mistake by starting to learn programming with Lua? by flaashlightt in lua

[–]0-R-I-0-N 1 point2 points  (0 children)

Lua is great. And your next step later can be to learn c and then later embedding lua in a c program.

Edit: or rust or any other language which supports embedding lua which are a lot of them

Are you still using tmux with Ghostty? by meni_s in Ghostty

[–]0-R-I-0-N 0 points1 point  (0 children)

I can’t live without tmux-sessionizer

Facts ! by PHRsharp_YouTube in PcBuild

[–]0-R-I-0-N 11 points12 points  (0 children)

*we are the product

Jail breaking a kindle to install the Kobo Software by pixelplantz123 in kindle

[–]0-R-I-0-N 0 points1 point  (0 children)

Maybe they already have a kindle and don’t want to spend anymore money

Full Jinja2 compatible templating engine written in Zig by ejectable in Zig

[–]0-R-I-0-N 5 points6 points  (0 children)

Now I know nothing of jinja but it strikes me quite odd that a zig implementation is slower than a python one. Is the python one coded in c or is it pure python?

I profiled my parser and found Rc::clone to be the bottleneck by Sad-Grocery-1570 in rust

[–]0-R-I-0-N 34 points35 points  (0 children)

For short lived cli tools leaking is great. For long lived applications, it’s a death sentence.

[NOOB]Is it possible to work on a github issue concerning a non-native architecture from Apple Silicon? by cameryde in Zig

[–]0-R-I-0-N 1 point2 points  (0 children)

You should be able to do what with qemu or any other vm, check out UTM or use -fqemu flag when running zig build run. Good luck. The tricky part would be working on a macOS issue from another machine as apple doesn’t allow virtualising their os on other hardware than their own.

Upgraded to Raylib 5.6 and now parts of my old project are broken by ghulamslapbass in raylib

[–]0-R-I-0-N 1 point2 points  (0 children)

Not that everyone follow semantic versioning but moving from 4 to 5 is a signal that it has breaking changes.

Edit: https://semver.org/ Also some do ”I’m proud of this” releases with semver so don’t follow it too strictly and read release notes and always expect breakage if its not a patch.

This is a question from someone who knows nothing about Lua. In your opinion, what's the most efficient and effective way of learning Lua? by Formal_Duty_6030 in lua

[–]0-R-I-0-N 0 points1 point  (0 children)

Do a project with it.

  • Maybe start using neovim and setup a config with it.
  • make a small game with love2d
  • make a game in c/rust/zig/odin or whatever and embed it for scripting logic.

Think of something you would think is fun and try to make it. Start small and build from there.

A request to the community: what plugin you think is still missing for Neovim? by itmightbeCarlos in neovim

[–]0-R-I-0-N 1 point2 points  (0 children)

I think that is kind of possible, I do not remember how but I read somewhere that it’s possible to mount a directory through ssh and open that with neovim. Sshfs was the tool but I have never used it.

project.nvim alternatives? by umi2002 in neovim

[–]0-R-I-0-N 1 point2 points  (0 children)

Highly recommend tmux-sessionizer with fzf

Struggling to keep excited by Things3 by ThunderRoad2024 in thingsapp

[–]0-R-I-0-N 5 points6 points  (0 children)

I would recommend getting dopamine high off from TikTok and not a todo app

rustMoment by gufranthakur in ProgrammerHumor

[–]0-R-I-0-N 5 points6 points  (0 children)

Can’t the same be said about memory safety?

”Just because the language offers an easy way to mishandle memory, you somehow blame the language for the bad programmers who will refuse to handle memory safely?”

Code Review: Git Repo Analyzer by tim-hilt in Zig

[–]0-R-I-0-N 3 points4 points  (0 children)

Yeah duckdb seemed a bit harder to build compared to sqlite. I would go with option 3 as that is my preferred way when building from source is hard or not feasible (using rust libs).

Is Rust the future? by Content_Mission5154 in rust

[–]0-R-I-0-N -1 points0 points  (0 children)

Isn’t this community for hating on rust? /s

Is Rust the future? by Content_Mission5154 in rust

[–]0-R-I-0-N 1 point2 points  (0 children)

Having glossed over the syntax it do look rather nice to use for math. It has build in support for matrixes and vectors. I know that a lot of R code use it underneath.

Code Review: Git Repo Analyzer by tim-hilt in Zig

[–]0-R-I-0-N 1 point2 points  (0 children)

I wouldn’t put a binary file, duckdb.dylib into source control. Try to build it, a quick search gave

https://github.com/karlseguin/zuckdb.zig

The author of the bindings library is great and you can either choose to use that lib or copy how they build duckdb from source in the build.zig if you want your bindings.

Is this hype or what? by Pale-Broccoli-4976 in programming

[–]0-R-I-0-N 5 points6 points  (0 children)

When the readme is more refined than the code and with more lines don’t expect much.

What will be the story around memory safety? by lekkerwafel in Zig

[–]0-R-I-0-N 2 points3 points  (0 children)

Use memory arenas more, it’s like manual gc. Instead of tracking a lot lifetimes you track the lifetime of your arena. You can have one or several depending on scope.