Threads for dvicente

    1. 1

      It looks super interesting, but I was so incredibly confused by the examples provided until I realized it was a reference to The Great British Bakeoff that I could not understand the point of the tool.

    2. 8

      I feel like I should hate it, but I don’t. This is so cool.

    3. 7

      I can’t put my finger on what I dislike about this story. What’s AWS supposed to do, mail him a cheque? Take him out for dinner?

      If (hypothetically) AWS deployed one of my open source projects right now I’m pretty sure I’d put it in the README and in my resume and feel like I got what I wanted out of it.

      1. 5

        Its not about what is legally required, but what is just nice and collaborative behavior. Nobody is forced by law to be nice to each other, but generally people are. If somebody is a dick there is no law preventing them from being one, but there are still a dick.

      2. 3

        Personally I think it’d be both sensible (nobody knows the code better) and polite (what better way to say thankyou) to offer the author a job working on the ‘as a service’ team.

      3. 3

        They’re supposed to credit him, at minimum. It’s in the article.

        There’s definitely a discussion to be had about what AWS could or should have done beyond that - for example, whether they have should paid him in some way is definitely a gray area since it’s open source and offered free of charge, and the author knew that. But they couldn’t even put the original author’s name anywhere in the product UI? Even if that wasn’t intentional, it’s a symptom of a larger company culture problem inside AWS that causes them to have a relationship with open source that is at times collaborative and what we would generally define as good open source citizenship (as Andi Gutmans points out) and is at other times frankly parasitic.

        Gutmans appears to be asserting that AWS contributes a lot to various upstreams and is a good open source citizen (probably true) and that therefore they couldn’t possibly be copying/stealing from different open source upstreams (probably false). This argument is a complete non sequitor. I mean, am I reading his argument incorrectly or unfairly? Someone correct me if so.

        1. 2

          They could easily pay author some kind of royalty per customer and both sides would be better off for it.

      4. 2

        About the only thing that most permissive licenses don’t allow you to do is claim you wrote someone else’s software. In a lot of locales, there’s a notion of ‘moral rights’ in copyright law (it’s per-state in the US and is a complete mess). In the copyright page for a book published in the UK, for example, you will find something like ‘the moral right of the author to be associated with this work has not been infringed’. This is something that’s been baked into copyright law for a long time: the understanding that even if someone else has bought or otherwise acquired the rights to profit from your work, you still retain the right to be credited.

        Amazon has fulfilled the letter of their obligation here by including something in the notices file but they’ve done so in the absolute minimal way possible. It wouldn’t have cost them any more to be a bit more public and say ‘this product is built on top of X, thanks to the author for their great work!’.

        Imagine if you’d written a book and the publisher put someone else’s name on the cover and yours in tiny text on the copyright page. It’s exactly equivalent from a legal and moral perspective: both are fine legally, but doing either without explicit approval from the author makes you a dick.

        1. 1

          Imagine if you’d written a book and the publisher put someone else’s name on the cover and yours in tiny text on the copyright page.

          I don’t buy it. The more appropriate analogy is if I put my book on a public book-sharing website, with a license that allowed people to do whatever they wanted with my book, and then complained when people did whatever they wanted with my book.

      5. 2

        Quoting the post:

        He said he hadn’t given the license for Headless Recorder a lot of thought because it’s just a browser extension full of client-side code

        I guess this is the issue. If it upsets you so much that a company uses your code with no upstream collaboration, you should actually give more thought to which license you choose for your project. There are licenses out there that prevent exactly this type of situation.

      6. 1

        The cloud protection license is a great development. But yes the article seems to be about people who’re grumpy they didn’t think of it earlier. Amazon isn’t really known to be an ethical company, you can’t expect them to treat you better than any of their employees out of politeness.

      7. 1

        If you’re making money out of someone else’s work, even if it is in public domain, with even no license at all, buy them a gift. It didn’t even need to be Amazon (the company). Members of the very team that built the service could have done so.

        Basic politeness and courtesy.

    4. 4

      I went through a similar epiphany with home-manager, the difference being that I think it does fit my purpose. Most of the people that start using it believe that it is just a convenient way to have a quick system to sort dotfiles, but its purpose is similar to NixOS: declaratively define an environment and being able to reproduce it quickly and reliably somewhere else. Yes, it is cumbersome to use a specific shell to test the changes to a configuration file, but that ensures that all generations include a working setup of your desktop. That is its value for me: being able to reproduce my (stupidly complex) setup easily and knowing it will work.

    5. 7

      Well, if we also look at what developers prefer to work with, Haskell and Scala are among the most loved programming languages.

      Source: https://insights.stackoverflow.com/survey/2020#most-loved-dreaded-and-wanted

      Haskell and Scala are #14 and #15 on the “most loved” list, and nowhere to be seen in the “wanted” list.

      1. 5

        Haskell and Scala are #14 and #15 on the “most loved” list, and nowhere to be seen in the “wanted” list.

        They actually are #17 and #18 in the “most wanted” list. Also, I find this a bit shocking, but both of these languages are actually ranking higher up the “most dreaded” languages list: #11 and #12.

        1. 2

          Meh. They’re over-selling the emotion there. The question was apparently more akin to “I use this language and I am / am not interested in continuing to use it.”

          When you said you used a language, If you reported you wanted to keep using it they labelled it “loved” and if not, they labelled it “dreaded.”

          I used to use Scala a lot. I was more than happy to keep using it, but that doesn’t mean I loved it. Once I started using Rust, I dropped Scala. That doesn’t mean I dread it.

    6. 2

      The post contains some gems like variable unpacking, the “bunch idiom” and not recommending functional idioms without a good reason (it is tough to visually parse non-trivial Python code that abuses map, filter and reduce). Still, there is a detail I disagree with:

      Using is None, is True or is False isn’t just about convention or improved readability though. It also improves performance, especially if you would use x is None instead of x == None inside loop.

      Yes, always check for None using x is None. However, I think that using is True and is False are just noise: if an expression is true or false, it already evaluates to true or false. Furthermore, Python has a set of values that are implicitly true or implicitly false, which is super useful to make terse condition checks. For example, assuming elements is a list; these two conditions are the same:

      if len(elements) == 0 is True:
          # do something
      
      if not elements:
          # do something
      

      I consider the latter to be much more pythonic and easy to read. However, this is just a bit of nitpicking - great work, and thanks for sharing!

    7. 6

      If anything, the Linux kernel should consider sourcehut. It’s probably the only platform that works well with open standards and decentralised systems.

      1. 11

        I think Sourcehut is an incredible product and speaks very well of Drew Devault’s technical and business acumen, but I’m not convinced that where Linux hosts its source code is its biggest problem to be worrying about.

        1. 13

          I don’t think it’s the most pressing matter right now, but it is important to keep in mind that it was once and it was solved. Due to the whole BitKeeper mess, Torvald’s started working on git as a means to perform distributed version control - and mail was the cornerstone. Now, GitHub is lobbying to drift apart from email and use their non-standard and close issue management system. It does look familiar.

      2. 17

        Alpine adopted sourcehut and it didn’t end well. Sourcehut’s extreme opinions on mail left package maintainers unable to send mail because Devault didn’t like the settings you sometimes couldn’t even change. After some developers left the project, they instead switched to GitLab.

          1. 14
        1. 2

          Alpine seems to be a bit all over the place at the moment… Their repos look to be self-hosted cgit, their mailing lists are Sourcehut, their bug tracker is GitLab and their wiki is self-hosted Mediawiki.

          Edit: ah, their cgit-hosted repos are a mirror of what’s in GitLab, so I guess that’s an interim measure.

        2. 3

          This is an extremely uninformed and shitty take on what happened with Alpine Linux which doesn’t map at all onto reality. Keep your slander to yourself.

          1. 8

            As someone with no stake in this, I went and had a look at the available evidence, and… maybe sourcehut needs to correct the record somewhere?

            After looking over the alpine mailing lists, I got the distinct impression that some widely-used mail clients can’t send mail to sourcehut and some alpine contributors have refused to use it on that basis.

            1. 20

              It never caused any developers to “leave the project”. The arguments were not being made in good faith, either. There was a subversive element with a personal vendetta against me who were pulling strings under the table to crank up the drama to 11. As a matter of fact, it was settled after an IRC discussion and the Alpine mailing lists (still running sourcehut) work fine with those mail clients now. All I pushed for was due consideration of the rationale behind the design decision, and during the discussion, a compromise was reached and implemented.

              And they didn’t “switch” to GitLab from sourcehut, either. They were never using more than the mailing list features of sourcehut, and there was never a plan to start using them. The sourcehut mailing lists are still in use today, and the GitLab migration was planned in advance of that and completed for unrelated reasons.

              There are persistent, awful comments from a handful of people who spread lies and rumors about what happened as if I attempted a hostile takeover of Alpine Linux. It’s complete horseshit, and incredibly offensive and hurtful, especially in light of how much time and effort I’ve devoted to improving Alpine Linux. I am a maintainer of many packages myself, and a contributor to many of their repositories!

              1. 8

                Thanks, I appreciate the reply - I can only imagine this has all been quite draining, especially while trying to get a new product off the ground.

    8. 2

      Ah, found some nice inspiration. Still, one thing I miss is to have justified text in variable-pitch-mode. If someone knows how to achieve that, I’d be grateful for a pointer. Enabling visual-line-mode does not really cut it for me, because it does not play well with lists (subsequent visual lines are not indended as they should be). So, instead I use auto-fill-mode currently. But it’s always only left-aligned.

      1. 1

        I am not sure how to enable it by default, but fill-paragraph receives an optional argument to justify the text. In case you have not modified it, C-u M-q should manually do what you want. If you find a way to override the default function that auto-fill-mode uses, setting it to something along the lines of (apply-partially fill-paragraph 1) should work.

        1. 1

          I am not sure how to enable it by default, but fill-paragraph receives an optional argument to justify the text. In case you have not modified it, C-u M-q should manually do what you want.

          I am aware of this function, but it does not do what I want. With prefix argument, it justifies the text for a monospace font. I am using variable-pitch-mode, i.e. a variable-width font. With variable-pitch-mode on, using fill-paragaraph with a prefix argument has nearly no visible effect.

          1. 1

            Oh, sorry, I completely misunderstood the question. I don’t use variable-pitch-mode a lot, so I have no clue if that can be achieved somehow.

    9. 8

      It seems important to note that this project’s source has not been released. Even though the article explicitly tries to mask it stating that they can be reach on GitHub, the repository that they link to merely collects a brief README and a bunch of release notes - no actual code (there is actually one issue already asking about this). This means that other editors that suports LSP will not benefit from this server implementation.

      1. 1

        So I did this.

        ls -al ~/.vscode/extensions/ms-python.vscode-pylance-2020.6.1/server/
        total 34520
        drwxr-xr-x   8 kghose  staff       256 Jul  1 07:59 .
        drwxr-xr-x  12 kghose  staff       384 Jul  1 07:58 ..
        drwxr-xr-x   7 kghose  staff       224 Jul  1 07:58 bundled-stubs
        -rw-r--r--   1 kghose  staff  15714756 Jul  1 07:59 libonnxruntime.1.3.1.dylib
        drwxr-xr-x   3 kghose  staff        96 Jul  1 07:58 native
        -rw-r--r--   1 kghose  staff    164804 Jul  1 07:59 onnxruntime_binding.node
        -rw-r--r--   1 kghose  staff   1757870 Jul  1 07:58 server.bundle.js
        drwxr-xr-x   6 kghose  staff       192 Jul  1 07:58 typeshed-fallback
        

        That onnxruntime lead me to this: https://github.com/microsoft/onnxruntime

        ONNX Runtime is a cross-platform inferencing and training accelerator compatible with many popular ML/DNN frameworks, including PyTorch, TensorFlow/Keras, scikit-learn, and more. aka.ms/onnxruntime
        
        Many users can benefit from ONNX Runtime, including those looking to:
        
        Improve inference performance for a wide variety of ML models
        Reduce time and cost of training large models
        Train in Python but deploy into a C#/C++/Java app
        Run on different hardware and operating systems
        Support models created in several different frameworks
        

        Not sure what to think of this all. It might be a very sophisticated language server, and they do point out that it is built on top of https://github.com/microsoft/pyright.

        Anyhow. I might revert to the old server.

    10. 3

      I mainly use org-brain, which allows to create a tree-like structure in your notes. I think it hits a sweet spot between both your options!

    11. 1

      I used Hugo some time ago, but last year I moved to pure org-mode. It is a weird step to take, since most of the features that one could take for granted in Hugo can turn in some yak-shaving in Lisp. However, since I didn’t use most of them, it works just fine for me and I learnt a lot about Emacs Lisp with it.

    12. 22

      The initial setup experience was another pleasant surprise. The Cortana-narrated process felt like someone from the Xbox team had done the design. Fresh, modern, fun, and reassuring. Apple could take some notes on that.

      Have we gone through the same setup procedure? The first thing I do when I install Windows 10 is rush for the mute key.

      1. 21

        The only environment where I found myself installing Windows was in my office, and Cortana shouting at me in the middle of it was not the user experience I was aiming for.

      1. 2

        I haven’t used Excel since we had an introduction to it in school, but to my knowledge you couldn’t really define your own functions, or is that just a intermediate/advanced trick I didn’t know of?

        1. 5

          In the purest sense, yes you can, it’s just that they’re all anonymous, and referenced by cell (or sheet/cell, etc).

          In the impure sense, yes you can, since VBA started being bundled with Excel about a quarter century ago.

          1. 1

            You can name cells pretty easily too, actually, though I’m not terribly used to seeing that.

        2. 1

          You can define functions using VBA or even Python if you use an add-on. At least that’s my understanding, I’ve never needed to do it.

      2. 1

        The use of Conditional Formatting in the Turing Machine example is so awesome!

    13. 2

      Shame, it was my main distro. I guess that thanks to Antergos now I’m comfortable enough to use Arch, but I always liked how convenient it was to install. I also could think of this as yet another sign from the gods to learn NixOS properly once and for all…

      1. 2

        Thankfully, if all you were doing was using Antergos as a friendly Arch install there are still a few of those distros around like ArchLabs, and ArcoLinux.

    14. 9

      Let’s look at the git ui…

         git [--version] [--help] [-C <path>] [-c <name>=<value>]
             [--exec-path[=<path>]] [--html-path] [--man-path] [--info-path]
             [-p|--paginate|-P|--no-pager] [--no-replace-objects] [--bare]
             [--git-dir=<path>] [--work-tree=<path>] [--namespace=<name>]
             [--super-prefix=<path>]
             <command> [<args>]
      

      ;)

      1. 14

        I prefer to use the one true git porcelain: https://magit.vc/

        Popup and dwim commands
         A Cherry-picking    b Branching         B Bisecting
         c Committing        d Diffing           D Change diffs
         e Ediff dwimming    E Ediffing          f Fetching
         F Pulling           l Logging           L Change logs
         m Merging           M Remoting          o Submodules
         O Subtrees          P Pushing           r Rebasing
         t Tagging           T Notes             V Reverting
         w Apply patches     W Format patches    X Resetting
         y Show Refs         z Stashing          ! Running
         & Magit-LFS         % Worktree
        
        Applying changes
         a Apply          s Stage          u Unstage
         v Reverse        S Stage all      U Unstage all
         k Discard
        
        Essential commands
         g     refresh current buffer
         TAB   toggle section at point
         RET   visit thing at point
         C-h m show all key bindings
        
      2. 3

        So you are saying we need a whole new set of porcelain

        1. 4

          It means that back in the day (when git alternatives were viable) the cohort of github users were self-selected for being willing to put up with shitty UI.

        2. 1

          I meant that I’d rather stick back to the raw pipes whenever some GUI is getting too much in our way.

    15. 11

      Hmm, reminds me a bit of “Pizza Hut”, which isn’t necessarily the best association.

      1. 37

        Oh?

        1. 8

          I actually liked that it reminded me of Pizza Hut. Hey, hackers love pizza!

          1. 2

            As an European, I can’t accept calling Pizza Hut’s produce “pizza”.

            1. 4

              As an American, I can’t accept calling Pizza Hut’s pizza “produce”.

        2. 4

          I got my sr.ht stickers in FOSDEM 4 days ago but I really want this now.

          1. 2

            @kragniz We’re counting on you to make this happen next fosdem. :)

            1. 1

              I’ll do my best

        3. 1

          i love it

        4. 1

          This is amazing, thanks

          1. 9

            Yes, you can unsee.

            When the iPad first came out, people thought it was a terrible name because of Maxi-pads.

            Proof that you can get used to almost anything.

            1. 2

              I to this day am amazed by the name, and cannot get used to it. I always try to call them iTablets.

            2. 2

              Oh no. You said it. Now I gotta link to it. The spoof. I swore I saw him load it up by accident on stage one time. Reaction was priceless. I just can’t find that link.

      2. 3

        What do you have against pizza?

        1. 1

          Nothing, it’s just so-called american “pizzas” I dislike.

          1. 3

            Italians love American pizza too!

            That’s why it’s called the pizza effect!

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

          2. 1

            You mean “creativity fuel”?

      3. 0

        you fuck right off with that

    16. 19

      I would also argue that it holds true for data as well: if some data is collected using public funds, it should be released as open data (as long as it does not contain sensitive and personal information of the population).

    17. 5

      Since two days ago, my single-user Mastodon instance!

    18. 1

      Funny, I wrote about how I crafted one for this year in my blog (which is not common, I don’t usually plan it). tl;dr:

      • The Pragmatic Programmer.
      • Clean Code.
      • Domain-Driven Design.
      • Growing Object-Oriented Software, Guided by Tests.
      • Functional Programming: Practice and Theory.
      • Continuous Delivery.
      • An Introduction to Statistical Learning.
      1. 2

        I never managed to make much of a dent in Evans’s DDD book. I don’t remember why exactly. I later ran across Patterns, Principles, and Practices of Domain-Driven Design which managed to keep my attention a little longer.

        1. 1

          I would recommend: https://pragprog.com/book/swdddf/domain-modeling-made-functional

          It made the whole DDD concept click for me, especially the implementation details.

    19. 6

      I am going all-in on learning GPU programming and re-learning C++ after 20 years of Java. I’ve got my web framework issues and continouous integration/best practices worked out and I see that there have been significant improvements in C++ standards. I want back in.

      1. 4

        Modern C++ is super fun. Some parts can be very Python like and with modern static analysis tools learning it while coding is very pleasant. Ping me for questions - I’m likely not to have answers but I like to hear the questions.

        1. 2

          Do you have any hints on how to learn modern C++? Books, blogs, tutorials, what to look for… I have found plenty resources to learn, but few of them seem to be up-to-date

          1. 2

            Hi @diegovincente I have “Effective modern c++” but in general my way of learning is to do a project and use the latest C++ (which is C++17). I use VS Code which has static analysis built in which helps a lot with understanding the new features.

            As I did this project I learned about and used the following aspects of C++17.

            • std::optional
            • structured bindings
            • typename in a template template parameter
            • [[maybe_unused]] attribute

            How I initially learned about them is an interesting question. It happened mostly organically.

            1. I read about std::optional on lobster.rs I think and read up further about it
            2. [[maybe_unused]] I learned by looking at warnings
            3. The other things I discovered very organically by reading answers on stackoverflow and following

            In short, my random walk in C++ has been by looking up answers on stackoverflow and the larger internet and then reading a keyword and saying “I wonder what that means?” and following it up. As far as C++ is concerned, the internet is truly an amazing library.

            Turning all all warnings (-Wall -Wextra -Wpedantic) allowed me to learn several things.

            Have fun!

            1. 2

              Organically is a good way to describe it. I go overboard with the warning flags in my Makefile. It forces me to really examine the language as I write code:

              NORMAL_WARNINGS=-Wall -Wextra -Weffc++
              EXTRA_WARNINGS=$(NORMAL_WARNINGS) -Wcast-align -Wcast-qual -Wctor-dtor-privacy -Wdisabled-optimization -Wformat=2 -Winit-self -Wlogical-op -Wmissing-declarations -Wmissing-include-dirs -Wnoexcept -Wold-style-cast -Woverloaded-virtual -Wredundant-decls -Wshadow -Wsign-conversion -Wsign-promo -Wstrict-null-sentinel -Wstrict-overflow=5 -Wswitch-default -Wundef -Wno-unused
              MAX_WARNINGS=$(EXTRA_WARNINGS) -Wabi -Waggregate-return -Wconversion -Winline -Winvalid-pch -Wmissing-format-attribute -Wno-long-long -Wnormalized=nfc -Wpadded -Wstack-protector -Wstrict-aliasing=3 -Wswitch-enum -Wunsafe-loop-optimizations -Wzero-as-null-pointer-constant
              
              CXXFLAGS=-g -O3 -m64 -ansi -std=c++11 -flto -march=native -mtune=native -pedantic $(MAX_WARNINGS)
              
          2. 1

            I learned C++ prior to standardization (1996), so I’m starting with coding to the C++11 standard and moving forward from there. I’ve found that the C++ Reference is the most helpful to me (it is up-to-date and tells you which standard(s) a particular feature is available in). Additionally, I have been heavily relying on StackOverflow for more specific questions (i.e., how to use feature x). I picked up used copies of The C++ Standard Library and the C++11 edition of Stroustrop. My advice is to start small, code to a specific standard, and use all of the error and warning flags when compiling.