mac

joined 1 year ago
14
This Week in Rust 557 (this-week-in-rust.org)
 
[–] mac@programming.dev 19 points 9 months ago* (last edited 9 months ago)

https://boost.lemy.lol <- link to it, doesnt work for instances not connected to it like lemmy.world but theres still ~ 26 major ones

[–] mac@programming.dev 5 points 9 months ago (1 children)

The modlogs public to see removed comments. Just a bit difficult to navigate through currently

[–] mac@programming.dev 17 points 9 months ago* (last edited 9 months ago) (25 children)

Instances are the ones hosting the data on their servers + things not having mods can devolve very quickly with things like the nazi bar problem or the scam links that have been getting posted and removed in some communities. This is a different thing than whats in the post though, the post is talking about all communities needing to be fetched manually the first time theyre viewed

[–] mac@programming.dev 3 points 9 months ago (2 children)

Code blocks got updated in 0.19, lemmy.world is still on a 0.18 version

[–] mac@programming.dev 4 points 9 months ago* (last edited 9 months ago)

Subreddit had 3 posts within the last month so not that far off tbh

I can look for some post sources to give the community here some more activity

[–] mac@programming.dev 18 points 9 months ago (1 children)

Theres a community for it over at !bevy@programming.dev for anyone interested in it :)

[–] mac@programming.dev 2 points 9 months ago* (last edited 9 months ago)

Converting ampersands to say amp instead is a bug that got fixed in version 0.19, world hasnt upgraded yet though

[–] mac@programming.dev 7 points 9 months ago

Active is a combination of that and hot but is essentially hard capped at 2 days. Things past that wont show up

Theres the new comments sort which works like that though

[–] mac@programming.dev 3 points 10 months ago

Currently theres also mbin (fork of kbin) and lotide that have instances running them

Also some others in development but nobody running them yet

[–] mac@programming.dev 5 points 10 months ago* (last edited 10 months ago)

When the draw function calls itself it yields control to that new function its calling. When that function ends it takes back control and continues doing what it was doing.

This means all of the for loops in all of the functions will execute. Draw(1) will do the for loop and then return as it hits the end of the function (standard behaviour when you reach the end of a function even if theres no return statement). Then draw(2) will do the for loop as it gets back control now that draw(1) is done and then return, etc. all the way up

All parts of a function are recursive, theres no such thing as a non recursive part

[–] mac@programming.dev 0 points 10 months ago* (last edited 10 months ago) (1 children)

Didnt say to go anywhere, just said that people on .world cant see content from hexbear on lemmy.ml posts shown by those comment counts above even though lemmy.ml federates with hexbear. (hexbear used since its the best example of a large blocked instance that can showcase this well. Could have also used .world, .ml and beehaw and same point stands)

Same logic would apply to .world federating with threads. People on lemmy.dbzer0 for example wont see content from threads on .world posts or communities even if .world federates with threads

Just wanted to put a counterpoint to you saying people would need to deal with it indirectly which isnt true proven by the above. You dont need to strawman it by making it a different point

[–] mac@programming.dev 8 points 10 months ago* (last edited 10 months ago) (6 children)

This code has a recursive call (function calls itself) within the function so that has to be taken into account when tracing it

This would make the function execute multiple times so the for loop would end up executing multiple times.

Lets say main calls draw with a height value of 10 (draw(10)). First it sees that n is greater than 0 so it keeps going. Then it calls the draw function with a value of 10 - 1 aka 9. Now its executing in the draw(9) function. Greater than 0 so continues and calls draw(8). etc. all the way down to draw(0) where it sees that n is equal to 0 so returns out of the function due to the return statement.

Now that draw(0) finished executing draw(1) can keep going and goes to the for loop. Here it prints 1 # and then prints a new line (and then returns since it hit the end of the function). Now that draw(1) is done draw(2) can keep going and prints 2 #'s and then prints a new line (and then returns). This keeps going all the way up to the initial draw call, draw(10) which prints 10 #'s and then a new line, returns, and then the main function keeps going but theres nothing after that so it returns and the execution ends.

The effect from coming back after the recursive calls makes it seem like n is increasing but its just different calls to the same function. i is taken into account for but printing the amount of #'s since thats whats within that loop

view more: ‹ prev next ›