Salta al contenuto
0
  • Home
  • Piero Bosio
  • Blog
  • Mondo
  • Fediverso
  • News
  • Categorie
  • Old Web Site
  • Recenti
  • Popolare
  • Tag
  • Utenti
  • Home
  • Piero Bosio
  • Blog
  • Mondo
  • Fediverso
  • News
  • Categorie
  • Old Web Site
  • Recenti
  • Popolare
  • Tag
  • Utenti
Skin
  • Chiaro
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Scuro
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Predefinito (Nessuna skin)
  • Nessuna skin
Collassa

Piero Bosio Social Web Site Personale Logo Fediverso

Social Forum federato con il resto del mondo. Non contano le istanze, contano le persone
  1. Home
  2. Categorie
  3. Technical Discussion
  4. NodeBB <> Lemmy federation issue (re: nullable image/icon)

NodeBB <> Lemmy federation issue (re: nullable image/icon)

Pianificato Fissato Bloccato Spostato Technical Discussion
lemmynodebbactivitypub
26 Post 4 Autori 154 Visualizzazioni
  • Da Vecchi a Nuovi
  • Da Nuovi a Vecchi
  • Più Voti
Rispondi
  • Risposta alla discussione
Effettua l'accesso per rispondere
Questa discussione è stata eliminata. Solo gli utenti con diritti di gestione possono vederla.
  • trwnh@mastodon.social trwnh@mastodon.social

    @julian there's no difference on the consuming side (and in many programming languages you can check for truthiness with something like `if x.get("totalItems")` which defaults to returning null if missing anyway)

    functionally, you either have the information, or you don't

    julian@activitypub.space
    julian@activitypub.space
    julian@activitypub.space
    scritto su ultima modifica di
    #21

    trwnh@mastodon.social as someone working on the consuming side, that is not correct.

    If my AP lib automatically assumed null when requesting an object property that didn't exist I'd consider that a bug.

    1 Risposta Ultima Risposta
    0
    • trwnh@mastodon.social
      trwnh@mastodon.social
      trwnh@mastodon.social
      scritto su ultima modifica di
      #22

      @julian this wouldn't be your AP lib, it would be your programming language itself

      julian@activitypub.space 1 Risposta Ultima Risposta
      0
      • trwnh@mastodon.social trwnh@mastodon.social

        @julian this wouldn't be your AP lib, it would be your programming language itself

        julian@activitypub.space
        julian@activitypub.space
        julian@activitypub.space
        scritto su ultima modifica di
        #23

        trwnh@mastodon.social I'm coding in js, which has all sorts of footguns, but even that won't return null when I attempt to access the non-existent property of an object... 😛

        1 Risposta Ultima Risposta
        0
        • trwnh@mastodon.social
          trwnh@mastodon.social
          trwnh@mastodon.social
          scritto su ultima modifica di
          #24

          @julian what does js return instead? in most cases i'm familiar with, programming languages use null or nil or None for anything that doesn't have a value, or any reference which doesn't point anywhere. hence a null pointer exception when you try to dereference a null. if you try to get a value for a key that isn't in the dictionary, you get null by default because there is no value for a missing key. how would you consume a null value? if you have nothing to say, why say anything?

          julian@activitypub.space 1 Risposta Ultima Risposta
          0
          • trwnh@mastodon.social trwnh@mastodon.social

            @julian what does js return instead? in most cases i'm familiar with, programming languages use null or nil or None for anything that doesn't have a value, or any reference which doesn't point anywhere. hence a null pointer exception when you try to dereference a null. if you try to get a value for a key that isn't in the dictionary, you get null by default because there is no value for a missing key. how would you consume a null value? if you have nothing to say, why say anything?

            julian@activitypub.space
            julian@activitypub.space
            julian@activitypub.space
            scritto su ultima modifica di
            #25

            trwnh@mastodon.social undefined and perhaps that's why we're disagreeing on our interpretations of how these values should be handled.

            null in JavaScript is very explicitly a declaration that there is no value or "intentionally empty".

            null and undefined are two separate things here at least.

            1 Risposta Ultima Risposta
            0
            • trwnh@mastodon.social
              trwnh@mastodon.social
              trwnh@mastodon.social
              scritto su ultima modifica di
              #26

              @julian that might be it, yeah. languages outside of javascript generally don't make a distinction between null and undefined, and even in javascript these are used inconsistently. for example localStorage.getItem will return null for a missing key. practically speaking, the "intentionally" distinction is a distinction without a difference in most processing contexts.

              1 Risposta Ultima Risposta
              0

              Ciao! Sembra che tu sia interessato a questa conversazione, ma non hai ancora un account.

              Stanco di dover scorrere gli stessi post a ogni visita? Quando registri un account, tornerai sempre esattamente dove eri rimasto e potrai scegliere di essere avvisato delle nuove risposte (tramite email o notifica push). Potrai anche salvare segnalibri e votare i post per mostrare il tuo apprezzamento agli altri membri della comunità.

              Con il tuo contributo, questo post potrebbe essere ancora migliore 💗

              Registrati Accedi
              Rispondi
              • Risposta alla discussione
              Effettua l'accesso per rispondere
              • Da Vecchi a Nuovi
              • Da Nuovi a Vecchi
              • Più Voti


              • 1
              • 2
              Feed RSS
              NodeBB <> Lemmy federation issue (re: nullable image/icon)
              @pierobosio@soc.bosio.info
              NodeBB Contributors
              • Accedi

              • Accedi o registrati per effettuare la ricerca.
              • Primo post
                Ultimo post