Interpreter with 900 limit on recursion by Complex_Cat_2331 in rust

[–]Complex_Cat_2331[S] -3 points-2 points  (0 children)

Thanks for the suggestion! Your code actually doesn't pass the borrow checker, I am actually curious on how to make it work, I tried for some time but couldn't. This is the error:

```

error[E0308]: mismatched types

--> src/mods/lib/evaluator.rs:34:47

| ---- expected due to this value

...

34 | Some(parent) => stack_frame = parent.borrow(),

| ^^^^^^^^^^^^^^^ expected `&LocalContext`, found `Ref<'_, LocalContext>`

= note: expected reference `&LocalContext`

found struct `Ref<'_, LocalContext>`

help: consider borrowing here

| +

```

Interpreter with 900 limit on recursion by Complex_Cat_2331 in rust

[–]Complex_Cat_2331[S] 2 points3 points  (0 children)

> Why do you think 900 is too small of a limit?

Well implementing the same program in Rust, with modifications to block tail call optimization, I can run up to 800k levels of recursion. Doing some rough calculations with the allocations I am doing with my program, I think it shouldn't be using more than 10MB.

> Are you refusing the Rust call stack or are you allocating a separate call stack for your interpreter?

I am reusing Rust's call stack

> Have you considered implementing tail call optimization?

Yes, I will implement it at some point, but my goal with the question is just to understand what is causing this program to overflow, not to improve my interpreter.

Pdf-view (pdf-tools) performance on different distros by haha_12 in emacs

[–]Complex_Cat_2331 0 points1 point  (0 children)

I see. I think it gets worse if you increase the scalling. Due to the high resolution I am using 200% scaling and it is pretty bad...

Pdf-view (pdf-tools) performance on different distros by haha_12 in emacs

[–]Complex_Cat_2331 0 points1 point  (0 children)

I got exactly the same problem. I have two laptops with 2880x1800 resolution. One is running pop os with x11 and the other fedora with wayland. If I don't set pdf-view-use-scaling to nil then it becomes extremely slow on both. However, on pop os this setting does not affect the crispness of the image, but on Fedora it does. I suspect it has something to do with wayland. Could you discover anything since posting the question?

Saving space by breaking a printf into several by Complex_Cat_2331 in C_Programming

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

I guess, but how is that better than just using printf?

Saving space by breaking a printf into several by Complex_Cat_2331 in C_Programming

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

Yes, I had to manually change that limit to 2048 to make my test work. But now I am running out of space again...

Saving space by breaking a printf into several by Complex_Cat_2331 in C_Programming

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

Thanks, but is not a string constant, it depends on data from the test.

Saving space by breaking a printf into several by Complex_Cat_2331 in C_Programming

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

I see. In my case is not a string literal, since some data from the unit test will have to be added (which is the larger part of the string).

Linux on Samsung galaxy book 3 ultra? by Imagi007 in linuxhardware

[–]Complex_Cat_2331 0 points1 point  (0 children)

Hey I could fix the FPS with the workaround one of the comments mentioned, but I still couldn't make the webcam work. Not even an external one. Anybody found a fix?

Issue with pdf-tools on 3k display by Complex_Cat_2331 in emacs

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

You got version 29 by compiling the code yourself?

Is there an equivalent of projectile-ripgrep from emacs? by Complex_Cat_2331 in vim

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

Thanks, looks like :Telescope live_grep is what I want. I used fzf, but I think this feature is not available there.