Brdsnest Lemmy
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
maris@lemmy.world to Programmer Humor@programming.dev · 4 days ago

Gambling with Lain

lemmy.world

message-square
33
fedilink
339

Gambling with Lain

lemmy.world

maris@lemmy.world to Programmer Humor@programming.dev · 4 days ago
message-square
33
fedilink
  • r00ty@kbin.life
    link
    fedilink
    arrow-up
    5
    ·
    3 days ago

    Oh right. I thought it might work the same as range etc in python, where is does one less than you specify… Coming from, well every other language this really threw me off on my first python excursion.

    • shape_warrior_t@programming.dev
      link
      fedilink
      English
      arrow-up
      1
      ·
      3 days ago

      You can get the exclusive behaviour with random.randrange. (Relevant Stack Overflow question with a somewhat interesting answer)

    • ChaoticNeutralCzech@feddit.org
      link
      fedilink
      English
      arrow-up
      1
      ·
      3 days ago

      Any language… except MATLAB. Fuck MATLAB.

      (Their arrays even start at 1, what the fuck?!)

      • wheezy@lemmy.ml
        link
        fedilink
        arrow-up
        2
        arrow-down
        1
        ·
        edit-2
        3 days ago

        Lua starts at 1 too. It’s infuriating. I believe for the same historical reason Matlab does.

        Both meant for non CS people.

Programmer Humor@programming.dev

programmer_humor@programming.dev

Subscribe from Remote Instance

Create a post
You are not logged in. However you can subscribe from another Fediverse account, for example Lemmy or Mastodon. To do this, paste the following into the search field of your instance: !programmer_humor@programming.dev

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

  • Keep content in english
  • No advertisements
  • Posts must be related to programming or programmer topics
Visibility: Public
globe

This community can be federated to other instances and be posted/commented in by their users.

  • 918 users / day
  • 3.93K users / week
  • 7.68K users / month
  • 19.9K users / 6 months
  • 1 local subscriber
  • 25.1K subscribers
  • 1.24K Posts
  • 30.1K Comments
  • Modlog
  • mods:
  • Feyter@programming.dev
  • adr1an@programming.dev
  • BurningTurtle@programming.dev
  • Pierre-Yves Lapersonne@programming.dev
  • BE: 0.19.5
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org