Skip to content
DevMeme
7080 of 7590
DevCommunities Post #7763 · source on Telegram

Outnerded by a 12-Year-Old: Dad Is 'Source Code', Mom Is 'Data Compiler'

Description

A dark-background social media post reading: 'My son has outnerded me. Look how he has me in his phone. (laughing-crying emoji) (he is 12). Had to find what he called my wife too.' Below are two side-by-side phone screenshots of Android contact pages. The left contact, with a cartoonish red monster avatar, is saved as 'Source Code (Dad)' with Call/Text/Set up buttons. The right contact, with a photo of a dark-haired woman, is saved as 'Data Compiler (Mom)' with Call/Text/Set up/Email buttons. The joke: the kid encoded biology in CS terms - dad supplies the source code, mom compiles it into a running build

Comments

68
Anonymous ★ Top Pick Twelve years post-release and the kid already understands the build pipeline better than most onboarding docs
  1. Anonymous ★ Top Pick

    Twelve years post-release and the kid already understands the build pipeline better than most onboarding docs

  2. Anonymous

    The build artifact has been running for 12 years and has started documenting its own toolchain.

  3. @Nocturn_le_chat 5mo

    Like his mother didn't contain any source code. F for biology.

    1. @L33TGraceful 5mo

      when you compile a program, your compiler does not use only the code you provided, but also its own /usr/include/gcc or something, and also it adds its own debugging info into the binary so with the same src you will get different binaries from different compilers 🤓

      1. @Nocturn_le_chat 5mo

        Fair enough

      2. @Agent1378 5mo

        With c/c++ you can probably even get different binaries for the same code and same compiler. See UB for reference😁

        1. @feedable 5mo

          ub is not a c or c++ thing bruh

          1. @Agent1378 5mo

            https://en.cppreference.com/w/c/language/behavior.html

            1. @feedable 5mo

              it's a general thing, it's not only for c and c++

              1. @Agent1378 5mo

                Most sane languages dont have it.

                1. @feedable 5mo

                  not true

                  1. @feedable 5mo

                    the majority of languages and protocols have it

                    1. @Agent1378 5mo

                      Well thats mostly is a compiler/interpreter bug. I doubt that it is in language spec that often. Maybe in some of C-like languages if cursed syntax is available, but I doubt its i many

                      1. @feedable 5mo

                        ub is not a syntax thing, and it's not a bug, it's a spec thing. It's an admission that the protocol may not describe the entire reality so cannot make predictions for everything

                        1. @Agent1378 5mo

                          I would argue that a language must not have a possibility for the syntax that can produce UB. It can be done by prohibiting certain syntaxes or by specifying exactly what code will do in such a cases. If specs are conflicting such that there possible a construct that leads to UB - thats a cursed syntax and/or cursed specs.

                          1. @feedable 5mo

                            again, ub is *not* a syntax thing, and cannot be caught with a syntax check

                            1. @feedable 5mo

                              it's a common mistake to assume it is, and it's also wrong

                              1. @Agent1378 5mo

                                Ok, give me an example of UB where its not syntax.

                                1. @feedable 5mo

                                  https://wayland.app/protocols/xdg-shell#xdg_positioner:request:set_parent_size for example in wayland if you submit a wrong future size for the popup's parent window, it's UB where is that syntax?

                                  1. @Agent1378 5mo

                                    Well, why can't wayland look at the actual parent size the moment it needs it, why would it require it to be told him in advance? But actually I wanted an example in language, not protocol.

                                    1. @feedable 5mo

                                      no it can't because that's too late

                                      1. @Agent1378 5mo

                                        Well, thats strange but I'll accept it, no will to dive deep in there😁

                                    2. @feedable 5mo

                                      in rust, forming one mutable rust-reference to a memory location, but forming two of them is ub

                                      1. @feedable 5mo

                                        you cannot forbid taking rust-references, because taking one is perfectly valid, but you also cannot forbid taking 2 syntactically, because that's a property of evaluation

                                      2. @azizhakberdiev 5mo

                                        I'm not proficient in rust but wtf?

                                        1. @feedable 5mo

                                          uuh that's one of the first things you learn when actually trying to implement a data structure yourself in rust

                            2. @Agent1378 5mo

                              Again that only means that language is cursed if such is allowed. It's not hard to remove ambiguous constructs or to specify everything so there is no UB.

                              1. @feedable 5mo

                                yes, it's not hard, it's impossible

                              2. _ 5mo

                                UB is mostly about performance, by allowing optimisations based on what you know can't happend. C went somewhat overboard with it thought. If you want to learn more read https://blog.sigplan.org/2021/11/18/undefined-behavior-deserves-a-better-reputation/

                                1. @feedable 5mo

                                  no and it never was

                                  1. _ 5mo

                                    Maybe it wasn't, but now it clearly is

                                    1. @feedable 5mo

                                      neither it is now

                                      1. @feedable 5mo

                                        performance is only a small aspect of it

                                2. @azizhakberdiev 5mo

                                  that being said, generalizing every situation where unknown occurrence can happen into a UB is quite wrong. It's pretty subjective, and if you are strict enough even the RNG can be a UB

                                  1. _ 5mo

                                    In my definition, UB means that *anything* could happend at that point, not just that there are multiple possible outcomes. So yes to you first sentence. But also I don't see how it's subjective and I think that explain why a RNG is not UB in my view

                                    1. @azizhakberdiev 5mo

                                      For example the range of input is larger than range of int, however it's very unlikely that it will cause an error Practical example: repetition of UUID

                                    2. @feedable 5mo

                                      neither it is in the C++ standard's, btw for those things there is unspecified behaviour

                                      1. @azizhakberdiev 5mo

                                        as long as reading input from an I/O device isn't, neither is rng

                                        1. @azizhakberdiev 5mo

                                          but the point I want to make that rng can involve integer overflow which is often treated as UB, yet does nothing harmful in practice

                                          1. @feedable 5mo

                                            huh? how

                                            1. @azizhakberdiev 5mo

                                              Simple rng is just seeding it with current time and using arithmetic operations with large numbers to make it non deterministic enough

                                              1. @feedable 5mo

                                                yeah but you can just do that unsigned? which is well-defined?

                                                1. @azizhakberdiev 5mo

                                                  you can do it either way. As long as the bits written there are random

                                          2. _ 5mo

                                            Signed overflow is UB and can cause problems in practice. For example some bound checks could be optimized out because they can't fail without overflow. Then when an overflow happend you have a value that pass the bound check yet is outside the expected range

        2. @L33TGraceful 5mo

          ub is a property of a compiled binary, same compiler will not produce different binaries from time to time just bcz code has ub. however. gcc 14 will not compile certain binaries after 2038 unless patched. so yeah, you can kinda get different binaries from same compiler, compiler flags, environment and same code.

          1. @callofvoid0 5mo

            2038 the year...?

            1. @L33TGraceful 5mo

              yes. thou, only on 32bit systems i suppose. or maybe not. we dont know much about gcc, like pacific ocean its only 10% explored

          2. @Agent1378 5mo

            Thats interesting.

    2. @callofvoid0 5mo

      Compiler + stdlib

  4. @Nocturn_le_chat 5mo

    Also why is his dad a damn CoolAid jug?

  5. @palaueb 5mo

    Technically incorrect, also funny as fuck

  6. @Agent1378 5mo

    Same with protocols

  7. @Agent1378 5mo

    Nope

  8. @Agent1378 5mo

    Compiler error

  9. @feedable 5mo

    https://play.rust-lang.org/?version=stable&mode=debug&edition=2024&gist=039770fb596976e2b32e429ced58e065

    1. @feedable 5mo

      again, calling the fn once is perfectly fine, and only twice is ub

    2. @feedable 5mo

      ('static there is also wrong, but that's besides the point)

    3. @Agent1378 5mo

      Well you are using unsafe so its like rust way of telling you you're doing something wrong. It's probably just made so c/c++ would migrate to rust at all. And secondly Rust seems broken and cursed.

      1. @feedable 5mo

        does not matter. ub is ub

      2. @feedable 5mo

        False

      3. @feedable 5mo

        every protocol (and language is just another protocol) that intends to describe a substantial problem will have that, because that's just how reality goes

  10. @Agent1378 5mo

    Well, maybe, but it seems that in some languages UB is way less easier to get than in another

    1. @feedable 5mo

      True, c and c++ are very lenient, and define way more behaviour than, for example, rust

      1. @feedable 5mo

        namely you can have as many mutable references to an object as you want, and even perform writes through all of them, as long as the writes are ordered

      2. @feedable 5mo

        (technically speaking, rust defines no behaviour, so it's all ub there, so the comparison isn't even valid)

  11. @Mahyar_1561 5mo

    Then what are you suppose to call your siblings or friends??

  12. @RiedleroD 5mo

    why is there wifi in one and LTE in the other

    1. @azizhakberdiev 5mo

      someone flying outta house after a missed call from dad

Use J and K for navigation