1. 2

    @pushcx, or whomever it applies, I wonder how much memory Lobsters is using?

    1. 3
      USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
      lobsters 30353  0.7  3.0 399412 124800 ?       Sl   00:00   6:20 unicorn_rails worker[7] -c config/unicorn.conf.rb -E production -D config.ru
      lobsters 30359  0.8  4.2 449504 173164 ?       Sl   00:00   6:39 unicorn_rails worker[10] -c config/unicorn.conf.rb -E production -D config.ru
      lobsters 30364  0.7  3.0 396484 122156 ?       Sl   00:00   6:24 unicorn_rails worker[4] -c config/unicorn.conf.rb -E production -D config.ru
      lobsters 30368  0.7  3.0 398528 123688 ?       Sl   00:00   6:16 unicorn_rails worker[3] -c config/unicorn.conf.rb -E production -D config.ru
      lobsters 30372  0.7  3.1 400852 126092 ?       Sl   00:00   6:15 unicorn_rails worker[0] -c config/unicorn.conf.rb -E production -D config.ru
      lobsters 30376  0.7  3.0 397540 123052 ?       Sl   00:00   6:19 unicorn_rails worker[8] -c config/unicorn.conf.rb -E production -D config.ru
      lobsters 30380  0.7  4.6 465020 189584 ?       Sl   00:00   6:25 unicorn_rails worker[1] -c config/unicorn.conf.rb -E production -D config.ru
      lobsters 30384  0.7  3.0 398656 122660 ?       Sl   00:00   6:15 unicorn_rails worker[6] -c config/unicorn.conf.rb -E production -D config.ru
      lobsters 30388  0.8  3.0 399388 124456 ?       Sl   00:00   6:33 unicorn_rails worker[9] -c config/unicorn.conf.rb -E production -D config.ru
      lobsters 30392  0.7  3.0 399352 124268 ?       Sl   00:00   6:05 unicorn_rails worker[5] -c config/unicorn.conf.rb -E production -D config.ru
      lobsters 30396  0.8  3.0 396560 122720 ?       Sl   00:00   6:35 unicorn_rails worker[2] -c config/unicorn.conf.rb -E production -D config.ru
      lobsters 30422  0.7  3.0 400140 124288 ?       Sl   00:00   6:23 unicorn_rails worker[11] -c config/unicorn.conf.rb -E production -D config.ru
      lobsters 32327  0.0  2.4 235416 97696 ?        Sl   Jan10   0:12 unicorn_rails master -c config/unicorn.conf.rb -E production -D config.ru
      

      It’s been two weeks since the service was bounced, so this is stable usage. I know there are issues with ps; if you have a preferred alternate measurement I can check it.

      1. 1

        I don’t know what specific problem of ps you are referring to, but if you want to check real memory cost of process (USS/PSS) under linux smem might be good tool.

    1. 2

      In what other languages would it be possible?

      I guess everything with properties (functions disguised as fields) so D, C#, etc.

      Afaik not with C, C++, or Java.

      1. 26
        #define a (++i)
        int i = 0;
        
        if (a == 1 && a == 2 && a == 3)
            ....
        
        1. 1

          Isn’t that undefined behavior? Or is && a sequence point?

          1. 3

            && and || are sequence points. The right expression may never happen depending on the result of the left, so it would make things interesting if they weren’t.

        2. 10

          This is very easy to do in C++.

          1. 5

            You can also do it with Haskell.

            1. 3

              Doable with Java (override the equals method), and as an extension, with Clojure too:

              (deftype Anything []
                Object
                (equals [a b] true))
              
              (let [a (Anything.)]
                (when (and (= a 1) (= a 2) (= a 3))
                  (println "Hello world!")))
              

              Try it!

              Or, inspired by @zge above:

              (let [== (fn [& _] true)
                    a 1]
                (and (== a 1) (== a 2) (== a 3)))
              
              1. 3

                Sort of. In Java, == doesn’t call the equals method, it just does a comparison for identity. So

                 a.equals(1) && a.equals(2) && a.equals(3); 
                

                can be true, but never

                 a == 1 && a == 2 && a == 3;
                
              2. 3

                perl can do it very simply

                my $i = 0;
                sub a {
                	return ++$i;
                }
                
                if (a == 1 && a == 2 && a == 3) {
                	print("true\n");
                }
                
                1. 2

                  Here is a C# version.

                  using System;
                  
                  namespace ContrivedExample
                  {
                      public sealed class Miscreant
                      {
                          public static implicit operator Miscreant(int i) => new Miscreant();
                  
                          public static bool operator ==(Miscreant left, Miscreant right) => true;
                  
                          public static bool operator !=(Miscreant left, Miscreant right) => false;
                      }
                  
                      internal static class Program
                      {
                          private static void Main(string[] args)
                          {
                              var a = new Miscreant();
                              bool broken = a == 1 && a == 2 && a == 3;
                              Console.WriteLine(broken);
                          }
                      }
                  }
                  
                  1. 2

                    One of the ‘tricks’ where all a’s are different Unicode characters is possible with Python and Ruby. Probably in Golang too.

                    1. 7

                      In python, you can simply create class with __eq__ method and do whatever you want.

                      1. 4

                        Likewise in ruby, trivial to implement

                        a = Class.new do
                          def ==(*)
                            true
                          end
                        end.new
                        
                        a == 1 # => true
                        a == 2 # => true
                        a == 3 # => true
                        
                    2. 2

                      In Scheme you could either take the lazy route and do (note the invariance of the order or ammount of the operations):

                      (let ((= (lambda (a b) #t))
                             (a 1))
                        (if (or (= 1 a) (= 2 a) (= 3 a))
                            "take that Aristotle!"))
                      

                      Or be more creative, and say

                      (let ((= (lambda (x _) (or (map (lambda (n) (= x n)) '(1 2 3)))))
                              (a 1))
                          (if (or (= 1 a) (= 2 a) (= 3 a))
                              "take that Aristotle!"))
                      

                      if you would want = to only mean “is equal to one, two or three”, instead of everything is “everything is equal”, of course only within this let block. The same could also be done with eq?, obviously.

                      1. 1

                        Here is a Swift version that uses side effects in the definition of the == operator.

                        import Foundation
                        
                        internal final class Miscreant {
                            private var value = 0
                            public static func ==(lhs: Miscreant, rhs: Int) -> Bool {
                                lhs.value += 1
                                return lhs.value == rhs
                            }
                        }
                        
                        let a = Miscreant()
                        print(a == 1 && a == 2 && a == 3)
                        
                      1. 9

                        Harry Potter nad the Methods of Rationality - fiction and the title says it all.

                        Unsong - fiction which is quite hard to describe without spoiling it.

                        Gödel, Escher, Bach: An Eternal Golden Braid - explores how recursion and self reference can create complex behaviour.

                        And I also highly recommended Metamorphosis of prime intellect mentioned by Hobbes.

                        1. 4

                          I would also recommend Unsong (United Nations Subcommittee On the Names of God). The premise is that the arcane rules of the Kabbalah system of Jewish mysticism became manifest in the world in 1968, when the members of the Apollo 8 mission read from scripture while orbiting the moon. In the present day, there are various groups seeking to use or abuse Kabbalistic mechanisms as the laws of physics slowly collapse around them. Would recommend to anyone with a programmer’s appreciation of rule systems, or anyone who likes Jewish thought.

                          1. 2

                            YAY GEB: The Eternal Golden Braid! I’m 3/4 of the way through it now. What a ride!

                            1. 1

                              I spent about a month reading it (I was out of work and did little else for the month). I could split my life experience into the time before, and the time after, reading GEB.

                          1. 3

                            Maybe there should be lobsters instance?

                            1. 4

                              Lobstodon!

                              1. 1

                                You could just about get the current lobste.rs codebase talking OStatus (to federate comments here to the fediverse)…

                            1. 12

                              eliminating all heap allocations

                              Rust isn’t heap allocating anything.

                              1. 11

                                And C isn’t either.

                                I haven’t had the time to dig into the codegen, but I posted it to /r/rust; we’ll see what they say :)

                                EDIT:

                                Looks to me like the use of signed integers is inhibiting some optimizations.

                                https://www.reddit.com/r/rust/comments/7m99wo/outperforming_rust_with_functional_programming/drsbori/

                                1. 6

                                  I doubt that, this are unmodified results (on my machine):

                                  test bench_collatz_106239 ... bench:         467 ns/iter (+/- 18)
                                  test bench_collatz_10971  ... bench:         367 ns/iter (+/- 12)
                                  test bench_collatz_2223   ... bench:         229 ns/iter (+/- 7)
                                  

                                  And here is after replacing i64 with u64:

                                  test bench_collatz_106239 ... bench:         509 ns/iter (+/- 4)
                                  test bench_collatz_10971  ... bench:         388 ns/iter (+/- 3)
                                  test bench_collatz_2223   ... bench:         267 ns/iter (+/- 10)
                                  
                                  1. 12

                                    Yeah, there’s a bunch of different speculation going on in that thread.

                                    Regardless, sometimes Rust will not be literally the fastest possible thing. That’s okay, as long as it’s close. I find these little examples interesting, regardless of who “wins”.

                                    1. 11

                                      I really like how the Rust community is approaching this as “how can we do better?”

                              1. 8

                                Good article. I think I can sum up its main points as:

                                1. Non-AMM (automatic memory managed) languages (C, Rust) are good for a particular class of problems. Outside that class, and with increased complexity, they become unmanageable.
                                2. The space of systems programming used to be just C, but now AMM languages are moving into systems programming because of availability and maturity.
                                3. The systems space will bifurcate into hard realtime (handled by Rust and C) and “other” which will be Go and other AMM systems programming languages.

                                Seems like a decent prediction.

                                1. 6

                                  my take is memory management is a lot more automatic in rust than in C

                                  1. 4

                                    I’ve seen it referenced as compile-time garbage collection in papers.

                                    1. 2

                                      That’s a really neat way of putting it. I’ll have to think on that more if I learn Rust later.

                                      1. 1

                                        Which is not correct, since rust still provides ref counted pointers Rc/Arc.

                                        1. 5

                                          As /u/singpolyma writes correctly, Rc and Arc are strictly library concerns outside of the language core. Several pieces of software (e.g. Servo) use their own versions of them.

                                          The interesting thing here is that both Rc and Arc are managed through Rusts static memory management (they are handles, which work through ownership and dropping).

                                          Data sharing is always a concern of any programming environment, be it manually or automatically managed. What Rcs are there for in Rust is multiple immutable ownership.

                                          1. 1

                                            what is the version used by servo exactly (is there some documentation somewhere ?)

                                          2. 3

                                            “provides” in a library

                                            1. 1

                                              Sure, but does it change anything? Shared ownership of memory is not handled by borrow checker/at compile time. Don’t get me wrong - I like rust and use it but calling it “compile-time garbage collection” is not correct - but might be nice PR move ;)

                                              1. 3

                                                Yes, it is. The potential allocation and de-allocation points are quite precise and handled by Ownership. Any situation of shared ownership must be dynamic and thus be evaluated at runtime, but the language handles acquiring and removing handles from memory for you transparently.

                                                One of the issues here is that “garbage collection” isn’t a rigorously defined term, so anyone claiming that there is such a thing as static garbage collection is just as right as people that say such a thing doesn’t exist.

                                                1. 1

                                                  Deallocation points are handled by runtime tracked reference count. Almost exactly like raii in c++.

                                                  I can agree that term “garbage collection” is vague. But this means that using it is pointless and devoid of any clear meaning.

                                                  1. 2

                                                    Deallocation points are handled by runtime tracked reference count. Almost exactly like raii in c++.

                                                    I wrote about potential points, and those are static.

                                                    Also, they happen at runtime, but not through a linked runtime system, which is usually what people care about.

                                                    Hand-rolled ref-counted pointers in C have very similar semantics.

                                                    I can agree that term “garbage collection” is vague. But this means that using it is pointless and devoid of any clear meaning.

                                                    With most people using it and attaching meaning to it in some form or the other, I couldn’t care less about that distinction.

                                                    1. 1

                                                      With most people using it and attaching meaning to it in some form or the other, I couldn’t care less about that distinction.

                                                      You don’t care about what you mean when you say that rust has “compile-time garbage collection”? What is this - Rust Evangelism Strike Force? ;)

                                                      If we are talking about compile time guarantees for resource reclamation than there is very little difference between rust and modern c++ and I don’t see people saying that c++ has “compile time garbage collection”. Moreover just like in c++, you can easily leak memory in rust. In fact it is considered safe to leak memory (either via (A)Rc cycles or mem::forget) in safe rust.

                                        2. 1

                                          I had that issue with his terminology too.

                                        3. 5

                                          Dont forget Ada and Real-Time Java used in embedded scene for some time now. Groups like Aonix supplied JVM’s and such for hard, real time. On both ends, they had “profiles” that constituted different levels of functionality so one could trade determinism against power/performance.

                                          1. -2

                                            You should not donate to charities.

                                            Like they say, give a man a fish, he becomes dependent on handout for the rest of his life; teach a man to fish, he becomes dependent on foreign expertise for the rest of his life; do nothing, and a man must learn to fish for himself or die, thus making available more land and other resources for other men who figured out how to fish thus creating a self-developing independent and thriving society.

                                            1. 4

                                              Minor PSA: This comment, while I don’t agree with it, is neither uncivil nor off-topic. Please don’t downvote things just because you don’t agree with them.

                                              1. 4

                                                I don’t know… it looks to be off-topic to me. Reading this thread I expected to see links to charities and discussions about them. I did not expect posts claiming that donating is pointless - it might be, but this is not a topic (or imho site) to discuss this.

                                                1. 2

                                                  Yeah I’m not sure how I feel about it. I spent a bunch of time thinking about whether I should reply asking whether it’s sarcastic (it’s hard to fathom that anyone could mean it seriously, though I ultimately concluded it probably is serious), but I ultimately think not engaging is better.

                                                  I hardly blame anyone else for downvoting though.

                                                2. 3

                                                  So what do you recommend some person/organization to do instead donating to charity for say, attempting to prevent malaria?

                                                  1. 3

                                                    Yeah, Johnny! You muscle through that cancer and pull yourself up by your bootstraps! The free market will evaluate your worth! /s

                                                    1. 1

                                                      You got where you are because people helped you. If your mother had not helped you as an infant you would have starved to death in a month. You want to deprive others because you have all that you need. If everyone had your attitude you never would have lived. It’s such a stupid, idiotic, uninformed, self-serving attitude that will one day leave you destitute.

                                                    1. 2

                                                      Step 0: Stop burying content in PDF.

                                                      1. 1

                                                        Eh, I’m ambivalent about PDF, but of status quo ways of distributing text online it’s one of the better ones. Not as good as plain text or plain HTML, but at least better than most blog posts (esp. those at places like Medium or Blogger). You can reliably save it for offline usage, it doesn’t have javascript doing weird things while you’re trying to read it, etc.

                                                        1. 3

                                                          I have some longer thoughts on this which I had planned on writing up, but apparently didn’t, along similar lines. A lot of sites, lobsters included, tag PDF content which I think is mostly a holdover from days when it was a yucky format. omg, I have to run another program? But honestly, when I click a PDF link these days I can do so without worrying that I’m going to be greeted by some autoplay video, or some live discussion comment system sending pingbacks every ten seconds, that the content will most likely be formatted in some way recognizable to a literate human, etc, etc. At this point, it’s more like a badge of convenience. One click download and read later.

                                                          If I were to start a new blog today, I might just make it PDFs on an FTP site.

                                                          1. 2

                                                            If I were to start a new blog today, I might just make it PDFs on an FTP site.

                                                            Plain text files over ftp might be even better idea :)

                                                            1. 1

                                                              Or even over HTTP, since in the “serving files” case it’s even simpler than FTP.

                                                              Or, if you do want fancy, IPFS

                                                            2. 2

                                                              PDF is a terrible format for on-screen since it’s intended for print layout and so doesn’t re-layout to fit screen size.

                                                              1. 3

                                                                Doesn’t constantly muck with the layout? Doesn’t lock the viewport? Doesn’t hijack scrolling? Sign me up!

                                                                1. 3

                                                                  If PDF works for you, then who am I to interfere? But for me, it’s an unreadable, useless format from a time when the way to read things was to print them out.

                                                                  Constantly scrolling horizontally or zooming out to fit a whole sentence on my screen is not my idea of usable :P

                                                                  1. 3

                                                                    yes it’s frankly obnoxious because computer screens aren’t paper shaped. Can we at least get pdfs that are formatted like a screen?

                                                                2. 2

                                                                  I personally don’t like 2-column PDFs on screens…

                                                                3. 1

                                                                  Yeah that’s exactly how I use it on lobsters. Quality tag indicating there won’t be an autoplay video, a popup begging for subscription, text reflowing while I’m trying to read it, etc. I browse the PDF tag fairly often too.

                                                                4. 3

                                                                  it doesn’t have javascript doing weird things while you’re trying to read it, etc.

                                                                  Are you sure about that? It looks like PDF already supports JS scripting.

                                                                  1. 2

                                                                    Time to replace jwz’s adage “all systems expand until they can send email” to “all systems expand until they can creepily track people over the internet”.

                                                                    1. 1

                                                                      For the most part I think pdf is pretty restricted about external resources and requests. The surveillance capital nightmare wouldn’t be possible if all scripts were restricted to a same origin policy.

                                                                      1. 1

                                                                        I don’t think most readers other than Adobe® Acrobat even execute that kind of stuff. Firefox’s PDF.js deliberately doesn’t run embedded Javascript, even though PDF.js itself is implemented in Javascript so could presumably do so if it really wanted to. And most other third-party PDF readers don’t build against a JS engine at all (e.g. Evince doesn’t).

                                                                        In practice those features are almost never used in PDFs intended as documents, so disabling support errs on the safe side without causing any real problems. The only legitimate usage I’ve personally run across is in fillable forms, where an embedded script might do field validation and spreadsheet-style data propagation, so I use Adobe Acrobat for those.

                                                                        1. 2

                                                                          That is all true. But I think it’s mostly due to the fact that noone is using pdf documents this way. The moment it starts to be popular to publish as pdf (instead of html) I expect we would see the same exact js crap that we see on the ‘modern’ web today.

                                                              1. 3
                                                                import java.util.stream.*;
                                                                
                                                                public class Triangle {
                                                                    public static String triangle(int rows) {
                                                                        return IntStream
                                                                                .rangeClosed(1, rows)
                                                                                .boxed()
                                                                                .map((row) -> Stream.iterate(row % 2, (n) -> n == 0 ? 1 : 0)
                                                                                                    .map(Object::toString)
                                                                                                    .limit(row)
                                                                                                    .collect(Collectors.joining(" ")))
                                                                                .collect(Collectors.joining("\n"));
                                                                    }
                                                                
                                                                    public static void main(String[] args) {
                                                                        System.out.println(triangle(4));
                                                                    }
                                                                }
                                                                

                                                                Yes, it looks much uglier than Haskell version, but constructs are almost the same.

                                                                (I’m not arguing that you can avoid imperativeness in Java, you almost can’t, and even Streams are imperative but somewhat composable)

                                                                1. 5

                                                                  to be fair, java 8 (and streams) had only been out in the wild for 5 months when this was written.

                                                                  1. 3

                                                                    But are those features of Java actually taught at university? Because they sure don’t spend time on them where I’m at.

                                                                    1. 2

                                                                      I haven’t run across it, though I could imagine some contexts where they might be. I might even consider doing it in the future, given the right circumstances. But I think they’re not that likely circumstances. Usually university courses are trying to teach at least two things with a programming language (or language construct): the language itself, and some broader principle, which students will hopefully retain long-term and be able to apply even when languages inevitably change over. So typically Java has been used either as “generic intro-level language” or “OO language”, which Java 8+ streams don’t fit that well into.

                                                                      In universities where Java’s used as the standard intro-level language, there’s some advantage to continuing to scaffold atop it for further things, because you can assume everyone already knows the basics. But it’s falling out of favor for intro-level classes in favor of Python. So I think you will either see people introducing this “streams” style of programming in Python if the circumstances fit, or else they’ll stick with a more traditional introduction to sequence filtering/mapping/etc. in the context of an introducion to functional programming, in Haskell or ML or maybe some Lisp dialect.

                                                                      1. 1

                                                                        So I think you will either see people introducing this “streams” style of programming in Python if the circumstances fit, or else they’ll stick with a more traditional introduction to sequence filtering/mapping/etc. in the context of an introducion to functional programming, in Haskell or ML or maybe some Lisp dialect.

                                                                        I’m aware of some libraries that provide special syntax for that in Python, but I don’t think anything other than list comprehensions (and maybe higher-order functions) for this kind of stuff is considered “Pythonic”.

                                                                  2. 3

                                                                    I did much the same but tried to introduce names in the same places as in the original; as relatively idiomatic Java that’s:

                                                                    public class Triangles {
                                                                        public static void main( String[] args ) {
                                                                            System.out.println( triangle( 4 ) );
                                                                        }
                                                                    
                                                                        public static String triangle( int n ) {
                                                                            return IntStream.rangeClosed( 1, n ).mapToObj( Triangles::line ).collect( Collectors.joining( "\n" ) );
                                                                        }
                                                                    
                                                                        public static String line( int n ) {
                                                                            return alternating( n ).limit( n ).mapToObj( Integer::toString ).collect( Collectors.joining( " " ) );
                                                                        }
                                                                    
                                                                        public static IntStream alternating( int start ) {
                                                                            return IntStream.iterate( start, i -> i + 1 ).map( i -> i % 2 );
                                                                        }
                                                                    }
                                                                    

                                                                    You can also go totally crazy, but I wouldn’t recommend it:

                                                                    public class Triangles {
                                                                        public static void main( String[] args ) {
                                                                            IntFunction<IntStream> alternating = i -> IntStream.iterate( i, n -> n + 1 ).map( n -> n % 2 );
                                                                            IntFunction<String> lines = l -> alternating.apply( l ).limit( l ).mapToObj( Integer::toString ).collect( Collectors.joining( " " ) );
                                                                            IntFunction<String> triangle = n -> IntStream.rangeClosed( 1, n ).mapToObj( Triangles::line ).collect( Collectors.joining( "\n" ) );
                                                                    
                                                                            System.out.println( triangle.apply( 4 ) );
                                                                        }
                                                                    }
                                                                    
                                                                    1. 2

                                                                      Great, now I want to my own version but I have to work…

                                                                      1. 5

                                                                        I wrote mine too! ;)

                                                                        Funny how similar Rust and Haskell are in those small examples.

                                                                    1. 4

                                                                      In terms of selecting an appropriate vocabulary for discussion or writing, it is imperative to understand your audience. “Bigger” words or technical language often exist to communicate ones ideas more fully and exist as useful abstractions in the right context. The author’s concerns are valid, but it is also worth not limiting yourself to the most simple forms of programming or communication as an absolute rule.

                                                                      Higher level languages and techniques are inherently more complex, but the benefit of this abstraction is being able to focus on solving a problem by communicating your intent in terms that more closely match your understanding of the problem.

                                                                      The term “simple” can also mean a lot of different things. C and Ruby are both simple in some ways and complex in others.

                                                                      1. 3

                                                                        Higher level languages and techniques are inherently more complex

                                                                        No. The implementation of high-level languages on machines designed to run Fortran and C might be involved, but their semantics of high-level languages can be quite simple, actually. Not that simple low-level languages cannot possibly exist, of course.

                                                                        1. 2

                                                                          Completely agree. My perspective is very biased towards current implementations of high level languages on top of machines designed to be operated at a lower level.

                                                                        2. 2

                                                                          The term “simple” can also mean a lot of different things. C and Ruby are both simple in some ways and complex in others.

                                                                          C is simple, while Ruby is easy… is what I wanted to write immediately after reading last paragraph - which might just prove your point ;)

                                                                          1. 1

                                                                            If this is a reference to the well known Rich Hickey talk “Simple Made Easy”, which nails down the definition of simple to something more objective and less squishy than its normal usage, then neither C nor Ruby would be simple in that sense.

                                                                            Are either of them easy? Well, how familiar are you with them? At one point during college o had written so much C for different systems classes that it was easy. Now, no way. In this sense, simple is an intimrinstic property of the design, ease is a property of the subject answering (in this case, me).

                                                                            1. 1

                                                                              Rich Hickey does not give a technically precise definition of “simple”. I have in the past proposed two measures of simplicity:

                                                                              • The size of a formal semantics for the language in question.
                                                                              • The size of the proofs of correctness for benchmark programs written in the language in question.

                                                                              But most other people were at best indifferent to my suggestion. At worst they were made very angry.

                                                                              EDIT: Fixed typo.

                                                                              1. 1

                                                                                I can see both your point and some other peoples’ objections.

                                                                                For the record, I didn’t say technically precise. His definition is more philosophically or conceptually well founded, if you want me to get specific. It won’t give a snippet of code or a program a “complexity score”, but it is useful for reasoning how relatively complex/simple two concepts, approaches, or solutions are.

                                                                                And that’s a big improvement over “I feel like closures are complex”, “oh yeah well I feel like they’re simple!”.

                                                                                Falling short of full technical precision does not delegitimize the his definition, or the conversations that can be had using that definition.

                                                                                1. 1

                                                                                  I can see both your point and some other peoples’ objections.

                                                                                  I can see their objections too: “How dare you! A formal semantics would expose the complexity of what I’m trying to sell as simple! You damn little…!”

                                                                                  His definition is more philosophically or conceptually well founded, if you want me to get specific.

                                                                                  Philosophy is useful when it guides technical work, but it’s the latter that ultimately we need to get done. If “simplicity” is to become a software quality criterion, we need to abstract, quantify and measure it.

                                                                                  Falling short of full technical precision does not delegitimize the his definition, or the conversations that can be had using that definition.

                                                                                  Without a formal definition, his idea of “simplicity” is just a proxy for his aesthetics.

                                                                        1. 3

                                                                          We use C++ at Google and have managed to have many thousands of engineers working on the same codebase for many years without letting it go to hell. Here are the methods we’ve used to accomplish this:

                                                                          1. company-wide language style guidelines that strictly prohibit usage of certain C++ features;
                                                                          2. a readability process to ensure that new engineers must get their code reviewed by veterans before committing;
                                                                          3. static linters that run automatically when a change is sent out for review;
                                                                          4. tools to automate large-scale code changes when we decide to adopt new features that clean up code.

                                                                          So it’s certainly possible but not easy.

                                                                          1. 2

                                                                            I’m curious - which features are forbidden?

                                                                            1. 2

                                                                              I haven’t used C++ at Google in ~4 years so I couldn’t tell you off the top of my head but the guide itself it publicly available at https://google.github.io/styleguide/cppguide.html

                                                                              1. 1

                                                                                I’m aware of that document - I was hoping for some additional info ;)

                                                                                1. 2

                                                                                  For example (from the style guide):

                                                                                  • “Do not use inline namespaces.”
                                                                                  • “Avoid virtual method calls in constructors, and avoid initialization that can fail if you can’t signal an error.”
                                                                                  • “Do not define implicit conversions. Use the explicit keyword for conversion operators and single-argument constructors.”

                                                                                  Personally, I find all of these to be features which are a bad idea to begin with, from a maintainability and debuggability perspective. I’ve never wanted to do anything clever that I couldn’t find some other way to do.

                                                                          1. [Comment removed by author]

                                                                            1. 8

                                                                              Somehow, I was able to program without Google and Stackoverflow for twenty years or so. And perhaps you went to a better college than I did, but the assembly taught there was minimal and we never did learn low-level network details and compiler writing was a graduate level course (and as an undergrad, I helped a few grads with their compilers for that class).

                                                                              In fact, I’ve learned more on my own than I ever did in college (Programming 101 for me was in Fortran).

                                                                              1. 7

                                                                                As a person who switched into CS from Physics, I don’t feel like not having a formal grounding has been a huge problem. Most of that you can learn in books and essays. Looking back, the most helpful classes were in the humanities. That’s where I learned a lot of important soft skills:

                                                                                • Editing and proofreading things I wrote
                                                                                • Making (somewhat more) watertight arguments
                                                                                • Finding obscure or missing primary sources
                                                                                • Detecting bias, agendas, or holes in secondary sources
                                                                                • Identifying That Kids
                                                                                • Ruining discussions by appealing to Wittgenstein

                                                                                But, if one’s a js dev, one should have enough problems with the mataphysical concept of equality, to bother with actual equations /s.

                                                                                Don’t be rude. Knowing a harder language doesn’t make you smarter than a person who uses JavaScript. It just makes you a person who knows a harder language.

                                                                                1. 4

                                                                                  Don’t be rude. Knowing a harder language doesn’t make you smarter than a person who uses JavaScript. It just makes you a person who knows a harder language.

                                                                                  It helps to know “harder” languages, as you gain understanding what happens at the lower levels (with C for example). It also helps with creative thinking if you know a broad spectrum of languages (and maybe some of the things about languages and compilation), as it exposes you to different ways of thought.

                                                                                  1. 3

                                                                                    Oh, I definitely agree! Learning harder languages can stretch your mind and expand your skills. I was objecting to the idea that being s js dev means you’re not smart or don’t understand programming. You can’t just a person’s ability just by how many languages they know.

                                                                                    1. 2

                                                                                      So should I learn Malboge? ;)

                                                                                      1. 5

                                                                                        Learning Malbolge definitely counts as exposure, but I think it’s measured in Sievert.

                                                                                        1. 1

                                                                                          the ternary number system sounds interesting enough ;)

                                                                                          not that i’m in any position to give advice:

                                                                                          • knowing a bit C has helped me
                                                                                          • (ba)sh, together with other classic tools is sometimes exactly the right tool.
                                                                                          • a general purpose scripting language. i like python for this.
                                                                                          • any modern compiled language like go or rust. i still have to give rust a look.
                                                                                          • something functional is always nice for the different approach to problems. i never used one for anything of relevance, but worked through a few tutorials.

                                                                                          related: https://pragprog.com/book/btlang/seven-languages-in-seven-weeks

                                                                                  1. 1

                                                                                    [Update: So, I posted this before reading the scale, by this scale it’s Average. However I question whether the arbitrary limits are actually realistic.]

                                                                                    Quite good actually. I work for Amazon, and what I’ve found is that you are the master of your work/life balance for the most part. The company expects a lot out of me, but also gives me tremendous flexibility in exchange.

                                                                                    The biggest challenge is defeating your own internal chorus that tells you working 24/7 is a great idea :) For me, being married helps a bunch with that.

                                                                                    1. 1

                                                                                      The biggest challenge is defeating your own internal chorus that tells you working 24/7 is a great idea

                                                                                      Don’t take it the wrong way, but I never could understand people who feel this way while working for someone else.

                                                                                      1. 2

                                                                                        So, yeah, I can understand that, and I admire your attitude.

                                                                                        I’m working for someone else, but for me that’s a desirable state of affairs because being brutally honest with myself I have some social rough edges that would make it difficult for me to run a consultancy with any degree of success. I’m not a troglodyte or a troll or anything, in fact I get along with pretty much anybody, but learning to say no has been something I’ve needed to grow into and asserting my authority over others is something I’ve only recently become comfortable with.

                                                                                        1. 1

                                                                                          You misunderstood me - I also work for someone else. I just can’t imagine feeling that I should work more than my contract requires me to. Sure, I work as best as I can, but always for the time agreed in contract :)

                                                                                          1. 1

                                                                                            That’s the big difference between contract work and full time. I’m full time, so the company gets an all you can eat buffet of my time in exchange for some notion of a more permanent arrangement.

                                                                                    1. 1
                                                                                      1. 60

                                                                                        I’m pretty uncomfortable with calling software “sexy”.

                                                                                        1. 27

                                                                                          Agreed. And going to a website promoting ostensibly professional software only to see “sexy” in large type multiple times just doesn’t feel work appropriate.

                                                                                          “the little sweet and sexy” is just not a phrase you should be using to describe software. It’s off-putting to people, and it’s generally (at least in pop culture) used by leachers old men.This feels like yet another example of how tone deaf men in tech can be.

                                                                                          1. -5

                                                                                            Glad to you took the time to insult and signal how much better you are than those leacher, tone deaf old men who wrote some free software for you. It’s really a great way to earn friends and show them the errors of their ways by shaming people publicly. /s

                                                                                            p.s. I agree with the sentiment, and hwayne’s comment is far more appropriate than some of the others I have seen. He expresses his own opinion, not theoretical opinions of others, and doesn’t shame anyone.

                                                                                            p.p.s The funny thing Is rereading my own comment, I see I am not even following my own advice! A better comment would be something like:

                                                                                            I do not agree with calling potentially well meaning people “tone deaf”.

                                                                                          2. 5

                                                                                            Same for me, but that’s probably the sign of times. I have also the same feeling when people say that they love this company or that software.

                                                                                            Of course when old established projects use such a lingo it may sound like when old people say something in teenage slang. It will feel off for teenagers and alien to other old people. Sort of uncanny valley?

                                                                                            1. 3

                                                                                              At some point you are reading way too far into things… It just means ‘stronger than like’ in that context.

                                                                                              I love my pet dogs. I love good food. I love good software.

                                                                                              1. 5

                                                                                                It may be because I’m not a native English speaker. In my language love is mostly reserved to the top emotion. Then if you love something (your work or music genere) it means that it can literally compete with the feeling you have to e.g. your spouse. I guess it’s something that I can’t get over. Especially regarding purely profit motivated endeavours.

                                                                                                1. 4

                                                                                                  Almost certainly a native/non-native speaker thing. In American English at least, ‘love’ is a pretty tame word that gets thrown around for everything. There really isn’t a specific word distinct for, e.g., the feeling one feels about their spouse; about their kids; etc. Usually ‘love’ is used there too, and context determines the level of effect.

                                                                                                  Occasionally you might see modifiers like, “brotherly love”, “fatherly love”, “familial love”, etc. That’s not super common though, mostly just context to delineate the quality of the usage.

                                                                                                  What is your native language? I know Greek has a few different words for different classes of ‘love’, and I imagine it’s not super uncommon, but I’m always curious about language related topics and the different quirks various languages have.

                                                                                                  1. 3

                                                                                                    I’m Polish. We say something like “brotherly love” or “fatherly love”. One can love their work, hobby and certainly their pet. But when someone says that he loves food or a thing it sound strange. “Like” is “lubić”. “Love” is “kochać”. “Love” in context of things would be more commonly translated to “uwielbiać”. It literally means “worship”, but in this context it is really more like “love” used as “stronger than like”. So maybe it is more crazy then in English.

                                                                                                    Love as a verb is “kochać”. But love as a noun is “miłość”. So “kochać” means that you feel “miłość” to somebody.

                                                                                                    I heard people from more pop part of younger generation saying such things, but it sounds for me like a literal translation from English. I heard it in movies and especially children movies. It almost always sounded off to me, but next generation is learning this foreign use. So I guess I’m doomed thanks to globalization ;).

                                                                                                    1. 1

                                                                                                      I’m also Polish and to be honest I find nothing strange in usage of “love” in context of “food or a thing” (both in Polish and in English). Considering that it seems from your linkedin profile that I’m older (32) than you I think your generalizations about younger generation is wrong :)

                                                                                            2. 3

                                                                                              Yes. Also: laptops, companies, fields of study, consumer electronics, genres of literature, fonts, cooking techniques…

                                                                                              Unless you are literally indicating sexual attractiveness, please use a word such as “exciting”, “sleek”, or “fashionable”.

                                                                                              1. 2

                                                                                                I don’t think I have a problem with the sexy part, I have a problem with the screenshots make it not even look all that great. Those fonts are terrible. There’s nothing in the feature list that really even makes me want to try it out over the editors/IDEs I currently use.

                                                                                                1. 3

                                                                                                  I filed an issue. Please consider +1

                                                                                                  https://github.com/geany/geany/issues/1672

                                                                                                  1. 10

                                                                                                    Is not “sexy” a gender neutral word, that can be used about both genders?

                                                                                                    1. 14

                                                                                                      It’s not about whether it’s gender neutral. It’s just kinda weird.

                                                                                                      1. 6

                                                                                                        Agree, but linked issue mentions women as if word “sexy” offends women more than men.

                                                                                                        1. 9

                                                                                                          Yes, sexy is gender neutral. What makes it potentially offensive to women is the association with exploitation and objectification.

                                                                                                          The word itself isn’t offensive. I can say that I find my wife to be drop dead sexy, but that’s because in that context it’s entirely appropriate.

                                                                                                          1. 4

                                                                                                            I completely agree that sexy in context of software sounds strange at best. I just don’t think that mentioning one particular gender in that issue was needed.

                                                                                                            1. -2

                                                                                                              Stop taking offense on behalf of others.

                                                                                                              1. 10

                                                                                                                Fascinating that you see it that way. When there is a gigantic groundswell of people saying “your behavior makes me uncomfortable” I try to change that behavior.

                                                                                                                I for one value women in tech. I find their presence in my day to day working life improves my productivity and the productivity of the teams I work on, as does a diversity of backgrounds, opinions and characteristics.

                                                                                                                So, for me this isn’t about offense, it’s about trying to make the industry I care deeply about a more welcoming place for a group of people I also care deeply about.

                                                                                                                1. 10

                                                                                                                  Folks can play dumb about “sexy” alone, but when you address the complete phrase, “little, sweet, and sexy,” someone’s gotta be pretending to be reeeal oblivious to show up and say oh that’s neutral we’re not talking about software like we wanna talk about women.

                                                                                                                  Anyway keep speaking up, because yeah it’s not “taking offense on behalf of others” its paying attention to them and having consideration without them having to speak every time. And I sure as heck don’t like to wade directly into this kind of talk on lobsters very often, it’s rarely worth it.

                                                                                                                  1. 2

                                                                                                                    Thanks. I think that’s why it’s important for people in privileged situations like myself to at least try and raise awareness. I don’t let the negative comments get to me - I was donning my asbestos underwear and wading into email/USENET threads before most of these people were born :)

                                                                                                                    1. 1

                                                                                                                      I can’t imagine people talking about women that way. Would be super creepy to use a phrase like “sweet and sexy” about a person instead of a thing…

                                                                                                                      1. -1

                                                                                                                        Maybe you are (or someone reading this is) not aware of the counter argument so I thought I’d share: the implication in your comment is that sex necessarily exploits women, which is false. The idea that sex necessarily exploits women reinforces the belief that we must protect women from sex as we do children. This is a defining aspect of anti-sex, Third Wave feminism, which I believe runs counter to the feminist goals of dismantaling fascist and patriarchal structures in society.

                                                                                                                      2. 6

                                                                                                                        I am very rarely seeing a groundswell of people saying “Your behavior makes me uncomfortable”.

                                                                                                                        What I actually see is people saying “I assume your behavior is making somebody else uncomfortable, and I am taking the credit for ‘fixing’ you”. I far prefer the original comment from hwayne where he was talking about his own opinions, rather than imagining those of other people.

                                                                                                                        1. 6

                                                                                                                          My upvotes usually mean “you speak for me also”. It’s quite a time saver. :) So, to clarify, I myself personally was made uncomfortable by someone describing software as “sweet and sexy”. So much so that I only skimmed the first page or so and closed the tab.

                                                                                                                          I assume they had good intentions. If I were the author, I’d work a bit more to come up with some way to express my excitement at having written something cool, without sounding creepy.

                                                                                                                          1. 4

                                                                                                                            And I’d like to be very clear, I don’t disagree with the argument, I disagree with some of the methods used to enforce them.

                                                                                                                          2. 3

                                                                                                                            I for one value women in tech. I find their presence in my day to day working life improves my productivity and the productivity of the teams I work on, as does a diversity of backgrounds, opinions and characteristics.

                                                                                                                            Non-native English speaker here. How does the term sexy offend only women and make them unwelcome to OSS? I mean, I understand the top comment (by hwayne) here saying how it would make someone uncomfortable, but why I don’t understand why it is only limited to women.

                                                                                                                            1. 5
                                                                                                                              Quoting a woman who’s a friend of mine from another context, unattributed at her request:

                                                                                                                              The word “sexy” when used to mean that something is sexually attractive, is what it is. You may or may not be expressing something offensive when you use it. The word “sexy” when used to describe something that is not sexual - a car, an algorithm, a user interface - still evokes the idea of sex. It implies that you should feel sexually “turned on” by it, even if it is not literally a thing with which you would have sex. Given the cultural and historical context of our times, a professional environment where people are expected to feel sexually “turned on” by things, or where the idea of sex is constantly referred to when it is not technically relevant, is not an environment where many women will assume they are respected or even safe. You personally might go ahead and assume you are safe and respected. Many women won’t. This reduces the pool of women who are interested in applying for jobs at your company, or interested in staying once they have experienced it for awhile. The people who create the culture of a company either care about that, or they don’t.

                                                                                                                        2. -1

                                                                                                                          But you are the one drawing associating between “sex” and “exploitation” and “women”.

                                                                                                                  2. 7

                                                                                                                    For those who are about to read: note that geany.sexy is not managed by the maintainers of the Geany IDE, so the issue didn’t end up going anywhere.

                                                                                                                    1. 7

                                                                                                                      This seems like a silly thing to even care about. It’s like the whole master/slave IDE cable debate. Seriously, it doesn’t need to be a big deal. It’s not even the editors official site. There are more important things to spend time on.

                                                                                                                    2. -2

                                                                                                                      Are you uncomfortable with sexuality in general?

                                                                                                                    1. 11

                                                                                                                      This article right here in a nutshell is the good, bad and ugly of the web application platform:

                                                                                                                      Good: Browsers can implement whatever the heck they like, with amazing innovative results

                                                                                                                      Bad: Other Browsers don’t support these things out of the gate, so it is left as an exercise for the developer (or they just give up and only support one browser - a highly popular approach in the late 90s and early 00s)

                                                                                                                      Ugly: Stuff just breaks all the time and there is no accountability. Standards are skirted and ignored. Committees are formed and deemed too slow/unfriendly to innovation, creating rival committees (W3C vs WhatWG, etc).

                                                                                                                      If you read this far, I hope you weren’t expecting a proposal to fix it? ;)

                                                                                                                      1. 9

                                                                                                                        That is why I never use $MOST_POPULAR_BROWSER_ENGINE. I hope it will help avoiding monopolisation.

                                                                                                                        1. 3

                                                                                                                          Well, to be honest, WhatWG was the right thing to do to jolt W3C out of its self-induced XHTML 2 coma.

                                                                                                                          1. 2

                                                                                                                            I was an XHTML2 believer back when I thought the W3C was still a real thing. Now they just whitewash stuff vendors have already shipped.

                                                                                                                            1. 11

                                                                                                                              If you rephrase it as “they standardize proven implementations” it becomes more palatable. And history actually shows that it’s the only way to produce useful, usable standards. You can’t invent a spherical XHTML in a vacuum and expect it to be implementable.

                                                                                                                        1. [Comment removed by moderator pushcx: If you don't like a post or source, say why, don't just post vulgar insults.]

                                                                                                                          1. 4

                                                                                                                            Why did you make that comment? It has no value. I think it’s enough to flag that as off-topic and hide it. There is certainly no need to insult the author, right? :)

                                                                                                                          1. 5

                                                                                                                            There is some value to what she’s saying, but it would be better without the annoying tone. It smells of attention-seeking and it’s the worst part of twitter.

                                                                                                                            1. 14

                                                                                                                              I wouldn’t say it’s attention-seeking, she’s just not trying to be serious. Which she admits:

                                                                                                                              These aren’t even facts anymore I’m just shitposting. But anyway,,,

                                                                                                                              1. 2

                                                                                                                                Which begs the question why would anyone think that this is a good fit for lobsters?

                                                                                                                                1. 9

                                                                                                                                  Oh I’m not arguing whether it’s fit for Lobsters, I just think attention-seeking is an unfair insult.

                                                                                                                                  1. 2

                                                                                                                                    should be a good test case for our new “we delete trolls policy ;)

                                                                                                                                    For real though it seems pointlessly inflammatory.

                                                                                                                                    1. 2

                                                                                                                                      Agreed on that, it’s a fun twitter exercise, but not much more then that. Definitely needs a satire tag, at least.

                                                                                                                                      1. 1

                                                                                                                                        Agreed on that, it’s a fun twitter exercise, but not much more then that. Definitely needs a satire tag, at least.

                                                                                                                                        1. 1

                                                                                                                                          The first 15-20 or so are relevant facts amusingly phrased. I agree the later points are a lot less good, but those first points make the thread worth posting, to me.

                                                                                                                                    1. 19

                                                                                                                                      This is a fantastic and insightful analysis. You could debate it, of course, but the fact that Lisp emerged when the alternatives were so low-level is amazing; the comparison to calculus is a good one.

                                                                                                                                      1. 3

                                                                                                                                        Following the Maxwell equations analogy: if Lisp is analogous to vector calculus, today we have programming language analogues of tensor calculus, differential geometry, de Rham cohomology, etc.

                                                                                                                                        1. 3

                                                                                                                                          Which languages are they? Almost all currently-used languages I can think of come from the Algol stable, rather than Lisp; to use the analogy they are built from counting pebbles rather than vector calculus. Clojure and Elixir seem like the only counterexamples I can recall.

                                                                                                                                          1. 6

                                                                                                                                            Tensor calculus makes finer distinctions that vector calculus (at least as taught to engineers) totally glosses over: contravariant vs. covariant indices, tensors vs. pseudotensors vs. tensor densities, etc. These distinctions are useful, because they prevent you from wasting time saying things that are geometrically and physically nonsense. Does this remind you of a certain language feature that causes endless online debates, and neither Clojure nor Elixir has?

                                                                                                                                            If Lisp is analogous to a tool that was good enough to formulate classical electrodynamics, then we today have analogues of tools that are good enough to formulate general relativity, quantum mechanics, etc.

                                                                                                                                            1. 2

                                                                                                                                              Does this remind you of a certain language feature that causes endless online debates, and neither Clojure nor Elixir has?

                                                                                                                                              Wait, I thought Clojure does have contracts

                                                                                                                                              1. 3

                                                                                                                                                Runtime-enforced contracts at best distinguish wanted from unwanted meanings. They don’t distinguish the presence from the absence of a meaning (i.e., nonsense). For if there were no meaning, there would be no program to run.

                                                                                                                                                1. 2

                                                                                                                                                  The way I think of it is that runtime-enforced contracts allow you to fail quickly in response to bad data. Check a POST body against a JSON schema and return 400 if it doesn’t match, and the like. Compile-time “contracts” (i.e. types) allow you to be certain that the data you are handling in a given function or module is valid.

                                                                                                                                                  Runtime contracts could be seen as protecting against defects in the type system. “Integer” may be the most limiting type expressible in a given language, but a contract can say “this value is between 0 and 9.”

                                                                                                                                                  1. 1

                                                                                                                                                    Compile-time “contracts” (i.e. types)

                                                                                                                                                    “Compile-time contracts” needn’t be types. It could be something you proved on your own the traditional way, i.e., using paper and pen. Why limit yourself to the subset of mathematics that one specific tool (a type checker) can handle?

                                                                                                                                                    Runtime contracts could be seen as protecting against defects in the type system. “Integer” may be the most limiting type expressible (…)

                                                                                                                                                    This is a virtue, not a defect. At some point you start hitting diminishing returns when you try to prove everything with types. Other mathematical tools are more flexible and scale better to more complex scenarios.

                                                                                                                                                    1. 4

                                                                                                                                                      To be frank, I don’t trust paper and pen proofs. You can prove something ten ways from Sunday, and then get a NULL pointer where you don’t expect it and blow up. I think of the Knuth quote, “Beware of bugs in the above code; I have only proved it correct, not tried it.” That’s not to say that verification and proof outside of the code is valueless (certainly not), but if I’m relying on it I would also encode my assumptions in runtime contracts if they exceed the power of the type system to encode.

                                                                                                                                                      1. -4

                                                                                                                                                        To be frank, I don’t trust paper and pen proofs.

                                                                                                                                                        This is only natural if you don’t know mathematics. The fix is obvious: learn mathematics.

                                                                                                                                                        1. 9

                                                                                                                                                          I’ve got a PhD in mathematics and therefore the number of mistakes I’ve made in so-called “proofs” is staggering.

                                                                                                                                                          1. 6

                                                                                                                                                            There’s a reason we left pen and paper proofs for mechanically-checked proofs with minimal TCB’s. People were screwing up too much. You should thoroughly read this paper by Guttman:

                                                                                                                                                            http://www.cypherpunks.to/~peter/04_verif_techniques.pdf

                                                                                                                                                            Key except illustrating the problem:

                                                                                                                                                            “The problems inherent in relying purely on a correctness proof of code may be illustrated by the following example. In 1969, Peter Naur published a paper containing a very simple 25-line, text-formatting routine which he informally proved correct. When the paper was reviewed in Computing Reviews, the reviewer pointed out a trivial fault in the code which, had the code been run rather than proven correct would have been quickly detected. Subsequently, three more faults were detected, some of which again would have been quickly noticed if the code had been run on test data.

                                                                                                                                                            The author of the second paper presented a corrected version of the code and formally proved it correct (Naur’s paper only contained an informal proof). After it had been formally proven correct, three further faults were found which, again, would have been noticed if the code had been run on test data.

                                                                                                                                                            This episode underscores three important points made earlier. The first is that even something as apparently simple as a 25-line piece of code took some effort (which eventually stretched over a period of five years) to fully anaylse. The second point is that, as pointed out by DeMillo et al, the process only worked because it was subject to scrutiny by peers. Had this analysis by outsiders not occurred, it’s quite likely that the code would’ve been left in its original form, with an average of just under one fault for every three lines of code, until someone actually tried to use it. Finally and most importantly, the importance of actually testing the code is shown by the fact that four of the seven defects could have been found immediately simply by running the code on test data.”

                                                                                                                                                            Mathematics alone won’t help if one is verifying algorithms and/or code. There’s many ways to screw up. The correct solution might have to take a heavy amount of proofs that are then thoroughly checked by human minds and/or tools. Most people working alone on pencil and paper might be making serious mistakes that will end up in the codebase.

                                                                                                                                                            See also my submission Don’t Trust the Math:

                                                                                                                                                            https://pastebin.com/zz7YZZUk

                                                                                                                                                            1. 2

                                                                                                                                                              These are different problems. Paper and pencil proofs are to convince people and to understand the principles. Mechanical proofs are for details - but they can be wrong on bigger issues. The big limitation right now is we don’t have good ways of thinking about complex state systems mathematically.

                                                                                                                                                            2. 6

                                                                                                                                                              I majored in mathematics and don’t think it obviates the need for careful testing.

                                                                                                                                                              1. 5

                                                                                                                                                                “Mathematics” does not govern software. Software and hardware do. There are edge cases that writing a mathematical proof (on paper!) does not cover. Many of them. That’s the meaning of the Knuth quote I included above. Unless you think he doesn’t know math, either.

                                                                                                                                                                1. 2

                                                                                                                                                                  I’d argue that people govern software - people, in all their irrational, legally mandated requirements that have to be satisfied before they’ll sign the functional acceptance agreement!

                                                                                                                                                                2. 5

                                                                                                                                                                  Condescension is not knowledge. Real mathematicians know that proofs can be wrong. Real engineers/scientists know that correct proofs may be for mathematical models that miss some aspect of the physics. Being able to use some terms from category theory doesn’t make you qualified to be in either one of those categories.

                                                                                                                                                    2. 6

                                                                                                                                                      Lambda functions are fairly widely implemented in most mainstream languages by now (C#, C++ IIRC, Rust, PHP)

                                                                                                                                                      While they are still mostly Algol-like, I believe that a lot of the things LISP invented/discovered have slowly bled into other languages we use today.

                                                                                                                                                      1. 4

                                                                                                                                                        I believe that a lot of the things LISP invented/discovered have slowly bled into other languages we use today.

                                                                                                                                                        What did you had in mind? As far as I can tell most of the languages we use today lack those iconic lisp traits:

                                                                                                                                                        • homoiconicity
                                                                                                                                                        • hygienic macros
                                                                                                                                                        • interactive development - here I’m referring to the situation where there is runtime error and lisp system stops, lets you fix the code, recompile only the changed parts and continue instead of forcing you to fix and restart whole interaction
                                                                                                                                                        1. 1

                                                                                                                                                          Maybe ultra-high-level programming, memory safety, garbage collection, and DSL’s could be on the list of what went mainstream. If looking at LISP machines, keeping your whole stack in high-level languages as much as possible. There’s containers and VM’s for that now. They were also among earliest IDE’s with interactive development and debugging. Just a few ideas that popped into my head rather than solid since the lineage of programming languages is wide enough for me to forget or just not know something in a quick post. :)

                                                                                                                                                      2. 1

                                                                                                                                                        Odd then that not only has the vast majority of scientific computing bypassed Lisp, but the higher level mathematical tools are mostly built on Algol descended languages.

                                                                                                                                                    3. 1

                                                                                                                                                      The other one that came out a few years after McCarthy was META II:

                                                                                                                                                      https://en.wikipedia.org/wiki/META_II

                                                                                                                                                      He liked that language for similar reasons in terms of DSL building or just expressing transformations. Kay ended up merging LISP variants and META successors in his later work in STEPS project.

                                                                                                                                                      http://www.vpri.org/pdf/tr2007008_steps.pdf