The Bard's Lemmy
  • Communities
  • Create Post
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
Thelie@sh.itjust.works to Programmer Humor@programming.devEnglish · 2 years ago

Programming as a hobby means I can do whatever I want!

sh.itjust.works

message-square
16
link
fedilink
180

Programming as a hobby means I can do whatever I want!

sh.itjust.works

Thelie@sh.itjust.works to Programmer Humor@programming.devEnglish · 2 years ago
message-square
16
link
fedilink
alert-triangle
You must log in or # to comment.
  • PoolloverNathan@programming.dev
    link
    fedilink
    arrow-up
    52
    arrow-down
    1
    ·
    2 years ago

    A MONAD IS A MONOID IN THE CATEGORY OF ENDOFUNCTORS

    • Thelie@sh.itjust.worksOP
      link
      fedilink
      arrow-up
      10
      arrow-down
      1
      ·
      2 years ago

      Wow you sound so smart!

  • embed_me@programming.dev
    link
    fedilink
    arrow-up
    29
    ·
    2 years ago

    Typical Computer science vs typical computer engineering

    • Thelie@sh.itjust.worksOP
      link
      fedilink
      arrow-up
      8
      ·
      2 years ago

      Inside me are two wolves I guess…

      • gravitas_deficiency@sh.itjust.works
        link
        fedilink
        English
        arrow-up
        5
        ·
        2 years ago

        Chief O’Brien:

        Sorry about that transporter malfunction, sir! Won’t happen again!

  • Black616Angel@discuss.tchncs.de
    link
    fedilink
    arrow-up
    13
    ·
    2 years ago

    Rust mentioned!

  • RagingHungryPanda@lemm.ee
    link
    fedilink
    arrow-up
    6
    ·
    2 years ago

    At least the code on the bottom is actual code and not just signatures

  • anton@lemmy.blahaj.zone
    link
    fedilink
    arrow-up
    4
    ·
    2 years ago

    Instead of

    if let Some(a_) = a{
        ()
    } else if let Some(b_)=b{
        ()
    } else {
        dostuff 
    }
    

    you could just use

    if a.isNone()&&b.isNone(){
        dostuff
    }
    

    Also if you don’t use the value in a match just use _

    • Thelie@sh.itjust.worksOP
      link
      fedilink
      arrow-up
      1
      ·
      2 years ago

      That’s a good point, thanks. Maybe I’ll go without the if entirely, the (janky) code is still very much in flux ;)

  • 82cb5abccd918e03@lemmygrad.ml
    link
    fedilink
    arrow-up
    3
    ·
    2 years ago

    Doesn’t that construction only work in categories that also contain their own morphisms as objects since a profunctor maps (Cᵒᵖ × C) → Set and not the same like (Cᵒᵖ × C) → C? Since the category of Haskell types special, containing its own morphisms, so the profunctor could be like (haskᵒᵖ × hask) -> hask? or I just don’t understand it.

    • Kogasa@programming.dev
      link
      fedilink
      arrow-up
      1
      ·
      2 years ago

      Hom functors exist for locally small categories, which is just to say that the hom classes are sets. The distinction can be ignored often because local smallness is a trivial consequence of how the category is defined, but it’s not generally true

  • 6mementomori@lemmy.world
    link
    fedilink
    arrow-up
    1
    ·
    2 years ago

    I don’t nearly know enough to understand this but is anyone willing to help me get the thing on the top :>

    • Thelie@sh.itjust.worksOP
      link
      fedilink
      arrow-up
      2
      ·
      1 year ago

      To first give you some context, the thing on the top is from The “Representable Functors” chapter of Category Theory for Programmers. So technically, you only need to read 230 Pages of a maths textbook to get it ;)

      But this isn’t exactly what you asked for, so I’ll try to help you get it as best I can with my limited understanding of the subject. First of all it would be helpful to know what your prior knowledge in Maths, especially Set theory, is?

  • fsxylo@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    1
    ·
    2 years ago

    deleted by creator

  • hswolf@lemmy.world
    link
    fedilink
    arrow-up
    1
    ·
    2 years ago

    is this a section of a discord api implementation?

    • Thelie@sh.itjust.worksOP
      link
      fedilink
      English
      arrow-up
      1
      ·
      2 years ago

      Almost, but not quite. It’s built against Presage

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.

  • 501 users / day
  • 2.08K users / week
  • 3.67K users / month
  • 9.99K users / 6 months
  • 1 local subscriber
  • 28.2K subscribers
  • 1.45K Posts
  • 26.1K Comments
  • Modlog
  • mods:
  • Feyter@programming.dev
  • adr1an@programming.dev
  • BurningTurtle@programming.dev
  • Pierre-Yves Lapersonne@programming.dev
  • BE: 0.19.14
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org