Off Topic
    • Categories
    • Tags
    • Users
    • Groups
    • Amazon
    • OT Fundraiser
    • Register
    • Login

    The OFFICIAL programming thread

    Tech
    22
    1.4k
    10.4k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • rote7R
      rote7
      last edited by

      Work continues in this area. – DEC’s SPR-Answering-Automaton

      fffg

      1 Reply Last reply Reply Quote 0
      • Lob12L
        Lob12
        last edited by

        https://media0.giphy.com/media/A40fNMnNPd9yU/200.gif

        [IMG] https://image.ibb.co/nhhF0Q/new_sig_lob12.jpg [/IMG]

        KilemallK 1 Reply Last reply Reply Quote 2
        • KilemallK
          Kilemall Careful, railroad agent @Lob12
          last edited by

          @lob12 said in The OFFICIAL programming thread:

          https://media0.giphy.com/media/A40fNMnNPd9yU/200.gif

          Ya, like lawyers are a barrel of fun.

          You have execution rules, but you don’t know how your argument ‘scripts’ will run in the court CPU, and you have judges with fidgety non-determinative decision branches that can vary from case to case.

          As a coding enviornment, law is a freaking disaster.

          https://i.imgur.com/hX2CMMZ.jpg

          Never go full Lithu-
          Twain

          No editing is gonna save you now-
          Wingmann

          http://s3.amazonaws.com/rrpa_photos/72217/DSC_2528.JPG

          http://s3.amazonaws.com/rrpa_photos/20416/PTOB 101_resize.jpg

          1 Reply Last reply Reply Quote 0
          • Lob12L
            Lob12
            last edited by

            Thats why we have a Code civil here. Thank you, Napoleon!

            [IMG] https://image.ibb.co/nhhF0Q/new_sig_lob12.jpg [/IMG]

            KilemallK 1 Reply Last reply Reply Quote 0
            • KilemallK
              Kilemall Careful, railroad agent @Lob12
              last edited by

              @lob12 said in The OFFICIAL programming thread:

              Thats why we have a Code civil here. Thank you, Napoleon!

              Not English common law? Frenchie code, where the lawyer is a full officer of the court?

              https://i.imgur.com/hX2CMMZ.jpg

              Never go full Lithu-
              Twain

              No editing is gonna save you now-
              Wingmann

              http://s3.amazonaws.com/rrpa_photos/72217/DSC_2528.JPG

              http://s3.amazonaws.com/rrpa_photos/20416/PTOB 101_resize.jpg

              Lob12L 1 Reply Last reply Reply Quote 0
              • Lob12L
                Lob12 @Kilemall
                last edited by Lob12

                @kilemall said in The OFFICIAL programming thread:

                @lob12 said in The OFFICIAL programming thread:

                Thats why we have a Code civil here. Thank you, Napoleon!

                Not English common law? Frenchie code, where the lawyer is a full officer of the court?

                Its kind of a long story but one of the concessions the British made to dissuade us from joining the American revolution was to let us keep our Civil law tradition. So in Quebec for all matters that fall into provincial jurisdiction (i.e. pretty much everything except criminal law), the 3000+ articles long Code civil applies (unless a specific law about specific situations say something else, like the Labour Code for matters that concern labour, per example). The modern version has been rewritten 2-3 times in the last 150 +/- years and it was heavily influenced by France’s Code Napoleon.

                In practice though the Court system looks very similar to other commonwealth countries and you can even still plead common law concepts, unless there is a provision of the Code that specifically prohibits it.

                Rest of Canada is 100% Common law.

                [IMG] https://image.ibb.co/nhhF0Q/new_sig_lob12.jpg [/IMG]

                StuS 1 Reply Last reply Reply Quote 1
                • Lob12L
                  Lob12
                  last edited by

                  The Code civil du Québec :

                  http://www.studenthousingguide.co.uk/wp-content/uploads/2017/08/Room.jpg

                  Now, the Criminal Code of Canada :

                  http://www.personal.psu.edu/afr3/blogs/siowfa13/RCAT-100MessyRoom.jpg

                  [IMG] https://image.ibb.co/nhhF0Q/new_sig_lob12.jpg [/IMG]

                  JamJ 1 Reply Last reply Reply Quote 3
                  • WingmannW
                    Wingmann Gold
                    last edited by

                    Québec is Canada.

                    Mwahahaha.

                    -= Ez dut galduko itxaropena =-

                    KilemallK 1 Reply Last reply Reply Quote 1
                    • KilemallK
                      Kilemall Careful, railroad agent @Wingmann
                      last edited by

                      @wingmann said in The OFFICIAL programming thread:

                      Québec is Canada.

                      Mwahahaha.

                      Just like Catalan is Spain?

                      https://i.imgur.com/hX2CMMZ.jpg

                      Never go full Lithu-
                      Twain

                      No editing is gonna save you now-
                      Wingmann

                      http://s3.amazonaws.com/rrpa_photos/72217/DSC_2528.JPG

                      http://s3.amazonaws.com/rrpa_photos/20416/PTOB 101_resize.jpg

                      WingmannW 1 Reply Last reply Reply Quote 1
                      • WingmannW
                        Wingmann Gold @Kilemall
                        last edited by

                        @kilemall said in The OFFICIAL programming thread:

                        @wingmann said in The OFFICIAL programming thread:

                        Québec is Canada.

                        Mwahahaha.

                        Just like Catalan is Spain?

                        Catalan is a language, but yes, Catalunya is Spain.

                        -= Ez dut galduko itxaropena =-

                        Gators1G 1 Reply Last reply Reply Quote 0
                        • Gators1G
                          Gators1 @Wingmann
                          last edited by

                          @wingmann said in The OFFICIAL programming thread:

                          @kilemall said in The OFFICIAL programming thread:

                          @wingmann said in The OFFICIAL programming thread:

                          Québec is Canada.

                          Mwahahaha.

                          Just like Catalan is Spain?

                          Catalan is a language, but yes, Catalunya is Spain.

                          And even they want out. Nobody likes you guys. Maybe they become little Puerto Rico?

                          alt text

                          1 Reply Last reply Reply Quote 0
                          • JamJ
                            Jam @Lob12
                            last edited by

                            @lob12 said in The OFFICIAL programming thread:

                            The Code civil du Québec :

                            http://www.studenthousingguide.co.uk/wp-content/uploads/2017/08/Room.jpg

                            Now, the Criminal Code of Canada :

                            http://www.personal.psu.edu/afr3/blogs/siowfa13/RCAT-100MessyRoom.jpg

                            So English Common Law is a bit messy like a college kids room, but Code Civil du Quebec is like a girl’s bedroom?

                            "laissez les bons temps rouler!"

                            Lob12L 1 Reply Last reply Reply Quote 1
                            • Lob12L
                              Lob12 @Jam
                              last edited by Lob12

                              @jam said in The OFFICIAL programming thread:

                              @lob12 said in The OFFICIAL programming thread:

                              The Code civil du Québec :

                              http://www.studenthousingguide.co.uk/wp-content/uploads/2017/08/Room.jpg

                              Now, the Criminal Code of Canada :

                              http://www.personal.psu.edu/afr3/blogs/siowfa13/RCAT-100MessyRoom.jpg

                              So English Common Law is a bit messy like a college kids room, but Code Civil du Quebec is like a girl’s bedroom?

                              Tidy as fuck.

                              I googled “tidy rooms” and all I got was girlie rooms :/

                              [IMG] https://image.ibb.co/nhhF0Q/new_sig_lob12.jpg [/IMG]

                              KilemallK 1 Reply Last reply Reply Quote 2
                              • KilemallK
                                Kilemall Careful, railroad agent @Lob12
                                last edited by

                                @lob12 said in The OFFICIAL programming thread:

                                @jam said in The OFFICIAL programming thread:

                                @lob12 said in The OFFICIAL programming thread:

                                The Code civil du Québec :

                                http://www.studenthousingguide.co.uk/wp-content/uploads/2017/08/Room.jpg

                                Now, the Criminal Code of Canada :

                                http://www.personal.psu.edu/afr3/blogs/siowfa13/RCAT-100MessyRoom.jpg

                                So English Common Law is a bit messy like a college kids room, but Code Civil du Quebec is like a girl’s bedroom?

                                Tidy as fuck.

                                I googled “tidy rooms” and all I got was girlie rooms :/

                                Google understands.

                                Everything you were up to.

                                https://i.imgur.com/hX2CMMZ.jpg

                                Never go full Lithu-
                                Twain

                                No editing is gonna save you now-
                                Wingmann

                                http://s3.amazonaws.com/rrpa_photos/72217/DSC_2528.JPG

                                http://s3.amazonaws.com/rrpa_photos/20416/PTOB 101_resize.jpg

                                GustafG 1 Reply Last reply Reply Quote 0
                                • GustafG
                                  Gustaf @Kilemall
                                  last edited by

                                  @kilemall said in The OFFICIAL programming thread:

                                  @lob12 said in The OFFICIAL programming thread:

                                  @jam said in The OFFICIAL programming thread:

                                  @lob12 said in The OFFICIAL programming thread:

                                  The Code civil du Québec :

                                  http://www.studenthousingguide.co.uk/wp-content/uploads/2017/08/Room.jpg

                                  Now, the Criminal Code of Canada :

                                  http://www.personal.psu.edu/afr3/blogs/siowfa13/RCAT-100MessyRoom.jpg

                                  So English Common Law is a bit messy like a college kids room, but Code Civil du Quebec is like a girl’s bedroom?

                                  Tidy as fuck.

                                  I googled “tidy rooms” and all I got was girlie rooms :/

                                  Google understands.

                                  Everything you were up to.

                                  Pedo-Lob

                                  "Let's give it a week! Still a disaster? Let's give it another week…" -Tazz

                                  1 Reply Last reply Reply Quote 0
                                  • StuS
                                    Stu @Lob12
                                    last edited by

                                    @lob12 said in The OFFICIAL programming thread:

                                    The modern version has been rewritten 2-3 times in the last 150 +/- years and it was heavily influenced by France’s Code Napoleon.

                                    I understand Napoleonic Code leans towards a “guilty until proven innocent,” view. Does Quebec’s civil code also do that?

                                    It is easy to do justice - very hard to do right

                                    Lob12L 1 Reply Last reply Reply Quote 1
                                    • Lob12L
                                      Lob12 @Stu
                                      last edited by Lob12

                                      @stu said in The OFFICIAL programming thread:

                                      @lob12 said in The OFFICIAL programming thread:

                                      The modern version has been rewritten 2-3 times in the last 150 +/- years and it was heavily influenced by France’s Code Napoleon.

                                      I understand Napoleonic Code leans towards a “guilty until proven innocent,” view. Does Quebec’s civil code also do that?

                                      No, but the presumption of innocence is more of a criminal law concept anyway. I don’t know French criminal law at all tbh but I’m quite sure they have something that is very similar. Here is a quote from wiki :

                                      “In France, article 9 of the Declaration of the Rights of Man and of the Citizen of 1789, which has force as constitutional law, begins: “Any man being presumed innocent until he has been declared guilty …” The Code of Criminal Procedure states in its preliminary article that “any person suspected or prosecuted is presumed innocent for as long as their guilt has not been established”[6] and the jurors’ oath repeats this assertion (article 304; note that only the most serious crimes are tried by jury in France). However, there exists a popular misconception that under French law, the accused is presumed guilty until proven innocent.”

                                      In Canada, presumption of innocence in criminal matters is guaranteed by section 11(d) of the Canadian Charter of Rights and Freedoms.

                                      Like I said before, the Code civil applies to non-criminal matters (i.e. tort, contract laws) where the burden of proof basically always falls (unless you were able to demonstrate the existence of a legal presumption) to the party who is making the allegations. Example : Jam pushed me down the staircases and I’m suing him for damages (classic tort case). Well I have to prove that Jam pushed me down the staircase and demonstrate the damages I suffered. The burden of proof I have to satisfy here is not “beyond a reasonable doubt” but more according to a “balance of probabilities”.

                                      What you do find a lot in the civil code is the notion of Good faith vs Bad faith. And one of the first articles of the Book of Evidence states that “Good faith is always presumed, unless the law expressly requires that it be proved.” So if you’re accusing someone of being a lying scumbag in any kind of litigation, or if you pretend that someone’s actions were purposely designed to hurt you in any way, well its up to you to prove it.

                                      [IMG] https://image.ibb.co/nhhF0Q/new_sig_lob12.jpg [/IMG]

                                      1 Reply Last reply Reply Quote 1
                                      • KilemallK
                                        Kilemall Careful, railroad agent
                                        last edited by

                                        I don’t think Canadian OT boards would be fun at all with that kind of proof required!

                                        https://i.imgur.com/hX2CMMZ.jpg

                                        Never go full Lithu-
                                        Twain

                                        No editing is gonna save you now-
                                        Wingmann

                                        http://s3.amazonaws.com/rrpa_photos/72217/DSC_2528.JPG

                                        http://s3.amazonaws.com/rrpa_photos/20416/PTOB 101_resize.jpg

                                        1 Reply Last reply Reply Quote 0
                                        • ?
                                          A Former User
                                          last edited by A Former User

                                          My Dad tried to get me interested in machine code / assembly programming when I was grade school. He’d bought this thing called the Microprofessor and was happily learning about how setting bits in code translated directly to the hardware.

                                          d3eb8fa3-489b-4798-aab5-306b9818c65c-image.png

                                          It wasn’t too long before he was building custom hardware and programming eeproms to control lighting for productions at the theatre where he was the Technical Director.

                                          Anyway, I listened dutifully to every he excitedly tried to teach me on the subject but really had zero interest in it myself. However, just now, 4 decades later, I had a requirement to store cartesian coordinates as a single unsigned integer and boy I’m glad I understood enough of what he taught me to not be put off by things like two’s-complement and bit shifting/masking.

                                          const BITS_PER_DIMENSION = 2
                                          const MAX_EXTENT = 1 << (BITS_PER_DIMENSION - 1)
                                          
                                          func _ready():
                                          	print("Bits per dimension: %d, Max extent: %d" % [BITS_PER_DIMENSION, MAX_EXTENT])
                                          	var ids = []
                                          	for col in range(-MAX_EXTENT, MAX_EXTENT):
                                          		var col_normalized = col + MAX_EXTENT
                                          		var col_shifted = col_normalized << BITS_PER_DIMENSION
                                          		for row in range(-MAX_EXTENT, MAX_EXTENT):
                                          			var row_normalized = row + MAX_EXTENT
                                          			var id = col_shifted + row_normalized
                                          			ids.push_back(id)
                                          			print("col: %4d, row: %4d, id: %4d" % [col, row, id])
                                          	
                                          	print("**************** Reversed **************")
                                                  var mask_high = (1 << BITS_PER_DIMENSION) - 1
                                          	print("mask high: %d" % mask_high)
                                          	for id in ids:
                                          		var row_normalized = id & mask_high
                                          		var row = row_normalized - MAX_EXTENT
                                          		var col_normalized = id >> BITS_PER_DIMENSION
                                          		var col = col_normalized - MAX_EXTENT
                                          		print("col: %4d, row: %4d, id: %4d" % [col, row, id])
                                          

                                          Result:

                                          --- Debugging process started ---
                                          Godot Engine v3.3.2.stable.official - https://godotengine.org
                                          OpenGL ES 2.0 Renderer: GeForce 940MX/PCIe/SSE2
                                          OpenGL ES Batching: ON
                                           
                                          Bits per dimension: 2, Max extent: 2
                                          col:   -2, row:   -2, id:    0
                                          col:   -2, row:   -1, id:    1
                                          col:   -2, row:    0, id:    2
                                          col:   -2, row:    1, id:    3
                                          col:   -1, row:   -2, id:    4
                                          col:   -1, row:   -1, id:    5
                                          col:   -1, row:    0, id:    6
                                          col:   -1, row:    1, id:    7
                                          col:    0, row:   -2, id:    8
                                          col:    0, row:   -1, id:    9
                                          col:    0, row:    0, id:   10
                                          col:    0, row:    1, id:   11
                                          col:    1, row:   -2, id:   12
                                          col:    1, row:   -1, id:   13
                                          col:    1, row:    0, id:   14
                                          col:    1, row:    1, id:   15
                                          **************** Reversed **************
                                          mask high: 3
                                          col:   -2, row:   -2, id:    0
                                          col:   -2, row:   -1, id:    1
                                          col:   -2, row:    0, id:    2
                                          col:   -2, row:    1, id:    3
                                          col:   -1, row:   -2, id:    4
                                          col:   -1, row:   -1, id:    5
                                          col:   -1, row:    0, id:    6
                                          col:   -1, row:    1, id:    7
                                          col:    0, row:   -2, id:    8
                                          col:    0, row:   -1, id:    9
                                          col:    0, row:    0, id:   10
                                          col:    0, row:    1, id:   11
                                          col:    1, row:   -2, id:   12
                                          col:    1, row:   -1, id:   13
                                          col:    1, row:    0, id:   14
                                          col:    1, row:    1, id:   15
                                          
                                          Gators1G rote7R 2 Replies Last reply Reply Quote 3
                                          • Gators1G
                                            Gators1 @A Former User
                                            last edited by

                                            @hog said in The OFFICIAL programming thread:

                                            My Dad tried to get me interested in machine code / assembly programming when I was grade school. He’d bought this thing called the Microprofessor and was happily learning about how setting bits in code translated directly to the hardware.

                                            d3eb8fa3-489b-4798-aab5-306b9818c65c-image.png

                                            It wasn’t too long before he was building custom hardware and programming eeproms to control lighting for productions at the theatre where he was the Technical Director.

                                            Anyway, I listened dutifully to every he excitedly tried to teach me on the subject but really had zero interest in it myself. However, just now, 4 decades later, I had a requirement to store cartesian coordinates as a single unsigned integer and boy I’m glad I understood enough of what he taught me to not be put off by things like two’s-complement and bit shifting.

                                            const BITS_PER_DIMENSION = 2
                                            const MAX_EXTENT = 1 << (BITS_PER_DIMENSION - 1)
                                            
                                            func _ready():
                                            	print("Bits per dimension: %d, Max extent: %d" % [BITS_PER_DIMENSION, MAX_EXTENT])
                                            	var ids = []
                                            	for col in range(-MAX_EXTENT, MAX_EXTENT):
                                            		var col_normalized = col + MAX_EXTENT
                                            		var col_shifted = col_normalized << BITS_PER_DIMENSION
                                            		for row in range(-MAX_EXTENT, MAX_EXTENT):
                                            			var row_normalized = row + MAX_EXTENT
                                            			var id = col_shifted + row_normalized
                                            			ids.push_back(id)
                                            			print("col: %4d, row: %4d, id: %4d" % [col, row, id])
                                            	
                                            	print("**************** Reversed **************")
                                            	var mask_high = 2 ^ BITS_PER_DIMENSION - 1
                                            	print("mask high: %d" % mask_high)
                                            	for id in ids:
                                            		var row_normalized = id & mask_high
                                            		var row = row_normalized - MAX_EXTENT
                                            		var col_normalized = id >> BITS_PER_DIMENSION
                                            		var col = col_normalized - MAX_EXTENT
                                            		print("col: %4d, row: %4d, id: %4d" % [col, row, id])
                                            

                                            Result:

                                            --- Debugging process started ---
                                            Godot Engine v3.3.2.stable.official - https://godotengine.org
                                            OpenGL ES 2.0 Renderer: GeForce 940MX/PCIe/SSE2
                                            OpenGL ES Batching: ON
                                             
                                            Bits per dimension: 2, Max extent: 2
                                            col:   -2, row:   -2, id:    0
                                            col:   -2, row:   -1, id:    1
                                            col:   -2, row:    0, id:    2
                                            col:   -2, row:    1, id:    3
                                            col:   -1, row:   -2, id:    4
                                            col:   -1, row:   -1, id:    5
                                            col:   -1, row:    0, id:    6
                                            col:   -1, row:    1, id:    7
                                            col:    0, row:   -2, id:    8
                                            col:    0, row:   -1, id:    9
                                            col:    0, row:    0, id:   10
                                            col:    0, row:    1, id:   11
                                            col:    1, row:   -2, id:   12
                                            col:    1, row:   -1, id:   13
                                            col:    1, row:    0, id:   14
                                            col:    1, row:    1, id:   15
                                            **************** Reversed **************
                                            mask high: 3
                                            col:   -2, row:   -2, id:    0
                                            col:   -2, row:   -1, id:    1
                                            col:   -2, row:    0, id:    2
                                            col:   -2, row:    1, id:    3
                                            col:   -1, row:   -2, id:    4
                                            col:   -1, row:   -1, id:    5
                                            col:   -1, row:    0, id:    6
                                            col:   -1, row:    1, id:    7
                                            col:    0, row:   -2, id:    8
                                            col:    0, row:   -1, id:    9
                                            col:    0, row:    0, id:   10
                                            col:    0, row:    1, id:   11
                                            col:    1, row:   -2, id:   12
                                            col:    1, row:   -1, id:   13
                                            col:    1, row:    0, id:   14
                                            col:    1, row:    1, id:   15
                                            

                                            ???

                                            Next time please post tits.

                                            alt text

                                            ? 1 Reply Last reply Reply Quote 5
                                            • First post
                                              Last post