mac

joined 1 year ago
[–] [email protected] 5 points 11 months ago* (last edited 11 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

[–] [email protected] 0 points 11 months ago* (last edited 11 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

[–] [email protected] 8 points 11 months ago* (last edited 11 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

[–] [email protected] 1 points 11 months ago* (last edited 11 months ago) (3 children)

Instances that defederate with threads wont see content from threads even on other instances that may federate with them.

As an example here lemmy.ml federates with hexbear and world but hexbear and world dont federate with each other. On lemmy.ml posts world users cant see any comments made from people on hexbear and vice versa

So they wont have to deal with them indirectly

[–] [email protected] 1 points 11 months ago (1 children)

oops didnt see that header

will keep them in the description there just in case people dont know what 3.11 added since I dont believe theres been a 3.11 post here before

[–] [email protected] 4 points 11 months ago* (last edited 11 months ago) (1 children)

Letting you know, the download and github links on the git.rela.dev site navbar dont work

Its probably set as a private repository

[–] [email protected] 21 points 11 months ago* (last edited 11 months ago) (7 children)

who needs modulo when you can get less characters out of

while (number > 1) {
  number -= 2;
}
return number;

very efficient

edit: or theres the trusty iseven api

[–] [email protected] 3 points 11 months ago

I havent used nvchad before but im assuming theres a mapping set to make that behaviour happen

Would be in a core/mappings file if its from nvchad or a custom/mappings file if its not (inside where you cloned the repo to)

https://nvchad.com/docs/config/mappings

[–] [email protected] 11 points 11 months ago* (last edited 11 months ago) (1 children)

Yeah active is currently the default sort in programming.dev until scaled sort comes out so commenting helps the most out of everything here

[–] [email protected] 119 points 11 months ago (1 children)

Triggered due to incorrect handling of LaTeX. Original answer on the page was 10^80 which ended up getting the exponentiation ignored by google

[–] [email protected] 3 points 11 months ago

nah not me, just like watching vids from this youtuber. Afaik this isnt part of any larger thing and is just a feature study. (Its the first video they've posted in 3 months, before that they had a bunch of videos for a series called godot fundamentals)

[–] [email protected] 2 points 11 months ago

From one of the past intellij blog posts

  • Full support for Java 21 features
  • Run to Cursor inlay option in the debugger
  • Floating toolbar with code editing actions
  • Support for GitLab snippets
  • All-in-one diff viewer
  • Improvements for both Maven and Gradle import
  • Visual editing for OpenAPI specifications
  • Enhancements for Quarkus and Micronaut
  • Spring 6.1 feature support
  • Spring for GraphQL support
  • Kubernetes tooling available out of the box
  • Extended Dev Containers support
  • HTTP Client improvements
view more: ‹ prev next ›