lukstru

joined 10 months ago
[–] [email protected] 1 points 6 days ago* (last edited 6 days ago)

Yes I cheated. To be fair, I used each of those languages at one point and knew how to do it but was to lazy to look it up again.

Edit: except Fortran

[–] [email protected] 1 points 6 days ago

Yes, that was on purpose

[–] [email protected] 66 points 1 week ago (10 children)

1. Python

for i in range(11):
    print(i)

2. R

for (i in 0:10) {
  print(i)
}

3. C/C++

#include <iostream>

int main() {
  for (int i = 0; i <= 10; ++i) {
    std::cout << i << std::endl;
  }
  return 0;
}

4. Java

public class CountToTen {
  public static void main(String[] args) {
    for (int i = 0; i <= 10; i++) {
      System.out.println(i);
    }
  }
}

5. Lua

for i = 0, 10 do
  print(i)
end

6. Bash (Shell Script)

for i in $(seq 0 10); do
  echo $i
done

7. Batch (Windows Command Script)

@echo off
for /l %%i in (0,1,10) do (
  echo %%i
)

8. Go

package main

import "fmt"

func main() {
  for i := 0; i <= 10; i++ {
    fmt.Println(i)
  }
}

9. Rust

fn main() {
  for i in 0..=10 {  // 0..=10 includes 10
    println!("{}", i);
  }
}

10. Zig

const std = @import("std");

pub fn main() !void {
    var i: i32 = 0;
    while (i <= 10) {
        std.debug.print("{}\n", .{i});
        i += 1;
    }
}

11. Scala

for (i <- 0 to 10) {
  println(i)
}

12. Fortran

program count_to_ten
  implicit none
  integer :: i

  do i = 0, 10
    print *, i
  end do

end program count_to_ten

13. Haskell

main :: IO ()
main = mapM_ print [0..10]

14. Julia

for i in 0:10
    println(i)
end
[–] [email protected] 10 points 3 weeks ago (3 children)

PeerTube isn’t bad, it just has no content

[–] [email protected] 2 points 3 weeks ago

You are completely right

[–] [email protected] 4 points 1 month ago (2 children)

I‘d say fatherfucker is still derogatory - after all, it’s still incest. Fatherhugger? Manhugger?

[–] [email protected] 2 points 1 month ago

You mean that zeppelin was high in the clouds and motorhead are oil heads?

[–] [email protected] 6 points 1 month ago (1 children)

Do you just let it happen when the time comes?

[–] [email protected] 9 points 1 month ago

Wasn’t it actually apple with the adhesive strips that can easily be removed when a current is applied? Such tech would be awesome if more generally available

[–] [email protected] 2 points 1 month ago

There’s a difference between waterproof and rainproof. The Fairphone (just has a clip on back panel for easy access to the battery) is rain proof

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

Currently only have pictures and documents stored, so everything easily fits on 1tb. One copy on my homeserver (unencrypted), one copy on my laptop (Luks encrypted), and one copy with rsync and a raspi at my parents (unencrypted). Might change encryption strategies to all luks.

[–] [email protected] 35 points 2 months ago (3 children)

The cybertruck was a douchebag car from the beginning

 

Currently printing with 5% infill and grid pattern. Why are some of the outer triangles filled in with just one layer? Doesn’t seem to be doing anything.

Sliced with orca slicer

751
Yes (lemmy.world)
 
 

I just saw this post about landlords being parasitic. While I agree in some points - mainly that by owning more property than you need for yourself, you’re driving up the price for others who want to buy a property. However, I don’t want to buy property when I move. I don’t have the funds for it, and I’m happy with a rented flat. Sure I want to get my own property at some point, however I’m also sure I want to move at least two more times in my life. Buying and selling each time sounds like a lot of hassle. Also, I live in a shared flat, that just sounds like a legal nightmare if the ownership changed every time someone moved out. How does this fit together? Are there solutions to this that don't require landlords to exist?

14
Weird extrusions (lemmy.world)
submitted 5 months ago* (last edited 5 months ago) by [email protected] to c/[email protected]
 

I just stopped a failing print and noticed some weird extrusions happening (not english native speaker, also I'm a 3d printing noob, don't know whether that's the right word). You can see it in the image. Any tips to improve printing quality?

I'm printing on an Ender 3 V3 SE. This print was with standard settings.

EDIT: as a clarification, this isn't why I stopped the print. It failed to adhere to the print plate at some spots. Redid my z offset and hopefully that solved it.

 
 
96
Carcans Plage [OC] (lemmy.world)
submitted 7 months ago* (last edited 7 months ago) by [email protected] to c/[email protected]
 
 

Ignore the dirty window lol. Had them in our house for over a week in that spot now, but this is the first time they turned around. I find the legs mesmerizing

 

Hi! I rarely see photos that look good by introducing (either a lot or just a little) tilt. Granted, I don’t look at a lot of professional photos, and I’m more talking about typical amateur photos. So my question is: is there a situation where introducing tilt is beneficial? Or am I right in my intuition to just avoid tilt when taking photos?

425
yarr (lemmy.world)
 
 
view more: next ›