1. 2

    I wasn’t aware of the split with ReasonML… what caused it? In the meantime I found this issue that gives some context: https://github.com/reasonml/reason/issues/2634

      1. 3

        See also: https://rescript-lang.org/blog/bucklescript-is-rebranding

        Honestly, I don’t quite get it. I get that ocaml is a great language, and being able to target native, nodejs and browsers sound great. I also get that reasonml was a slightly nicer syntax (it felt a bit more consistent and simple, much like I prefer standard ml to ocaml).

        Apparently everyone working on the bucklescript (now ReScript) side just wanted some js tooling, and didn’t want to change over to typescript. So they dropped ocaml compatability and native as a target. So no sharing of business logic between a native ocaml service and a js front end.

        I have very limited experiencewwith both ReScript and typescript so I can’t really comment - but even with a better type system I don’t really see a great reason to walk aaway from mainstream. Unlike, say, Elm.

        But I might be wrong, maybe ReScript is that much better.

        1. 4

          ReScript is really nice and the JS inter-op quite nice. There’s no async/await yet and dealing with promises doesn’t look that elegant.

          The JS tooling is great, despite having to deal with npm.

      1. 0

        Uh, I stopped reading very soon. I’ve found the word spacing… frustrating… I’m sorry

        1. 6

          To quote a user on #lobsters who seemed to be having the same issue:

          19:49 <Stekke> I don't have an account, but to comment about some confusing user azazel / johnaj is having in the "Introducing Dawn" story: the weird font spacing is caused by the 'Noto Color Emoji' font on Firefix / Linux, it doesn't happen with Chromium on the same system
          19:50 <Stekke> just removing that font from the CSS makes the spacing normal for me
          
          1. 2

            Really? Looks like any other article I’ve seen. Maybe try reader view in your browser.

            1. 4

              Yes, It looks like this without the suggested “fix”:

              1. 3

                I see what you mean. I’d have a hard time reading that too. It seems not every browser has this issue. Which do you use? Maybe the author can address it.

                1. 3

                  I’ve uploaded a modified stylesheet that hopefully fixes the issue! If it doesn’t, I would greatly appreciate it if you would let me know!

                  1. 1

                    Hmm. It looks like the stylesheet didn’t load? If you can point me in the right direction, I can try to fix it.

                    1. 3

                      See the sibling comment: if you remove “Noto Color Emoji’” it will be fixed for Firefox users

                2. 1

                  Do you mean the text or the code? The text uses the system font, without any custom word-spacing. In the code, the spaces separate one item on the stack from another.

                  1. 2

                    The text, If you use the dev tools to remove the reference to the mentioned font, it suddendly becomes more readable. I don’t know why for sure

                    1. 2

                      Hm, might want to report a bug at https://github.com/kognise/water.css, that’s the stylesheet that the site uses.

                      1. 1

                        Thanks for the suggestion.

                        I’ve filed a bug report: https://github.com/kognise/water.css/issues/249

                1. 8

                  I find it a bit underwhelming that this article is from 10 months ago, but that flakes are still not available in a main release of nix. This leads to a situation where one part of the community is invested in it, and uses it, while another considers it unusable for now, and continues using other tools for pinning and importing.

                  1. 2

                    Very good observation. Just because I have to enable flakes, I’m actively avoiding them. Sticking to niv until flakes are official, maybe.

                    1. 3

                      I had the same opinion of yours, but then I took the time to look at the material that’s available around like the nice nixos wiki page maintained by Mic92 and the yet unstable manual of the Nix that will be. That together with the fact that it’s possible to let collaborators start using Nix by directly installing the flake-enabled version convinced me to start using it. It think that as a community we should contribute at least by using it and giving feedback. What would be of projects like Linux or Debian if all their users installed the “stable” releases?

                      1. 2

                        It looks like the flakes branch was merged into master back in July. Do I still need to use a special flakes-enabled version of Nix, or is the feature included by default in recent releases?

                        1. 4

                          It is included by default in recent unstable releases. I.e. the nixUnstable attribute in nixpkgs.

                          1. 3

                            On my NixOS unstable updated a week ago the stock Nix release is still 2.3.10, not 2.4

                    1. 10

                      Why use powershell on Linux? Don’t get me wrong, I like a lot of the ideas behind PS, and on windows systems I imagine it is invaluable, as it exposes all of the Windows APIs that were previously behind GUIs, but on Linux we have bash, and if you need more complicated stuff, you can use Python, with it’s excellent subprocess module, or ruby, or another language that you’re familiar with. Then you don’t have to deal with PS’s insanely wordy syntax.

                      1. 6

                        I think the article adequately explains why to use pwsh over bash, especially if you’ve written much bash. On the other hand, I think the article also seems less compelling at first glance if you have written a lot of bash, as I have, and as I’m sure you have. Experienced bash users are necessarily experienced in dealing with piping text between programs in lieu of a richer data model.

                        I personally find shell scripts invaluable, and prefer them for system-level tasks over Python or Ruby. And I disagree about Python’s subprocess module—I think it’s clunky and verbose. Sure, pwsh has long command names, but for shell-like tasks it’s still more concise and clear than equivalent Python. And for interactive use, pwsh has many built in aliases similar to common UNIX commands.

                        That all said, I’m hardly an experienced pwsh user compared to my bash, Python, or Ruby. But every experience I’ve had with pwsh has been pleasant and resulted in readable code. There’s only one reason I haven’t switched: pure momentum. I’m so used to bashisms that I have little reason to invest time in anything else. But if I could go back and choose where to invest my time—and if pwsh were available on Linux much earlier—I would choose pwsh.

                        1. 4

                          pwsh has long command names

                          I think long command names are better than shorter command names. There is absolutely no reason that in $current_year we should use, document in, and most importantly teach (whether schools or documentation or books or blogs) what look like incantations to summon the prince of darkness.

                          There was a time when cd was better than Set-Location. That has not been the case for decades. I’d argue if we are writing something that will be run more than once, you MUST write it in as verbose language as possible.

                          1. 3

                            There was a time when cd was better than Set-Location. That has not been the case for decades.

                            There is an important case for shorter names: interactive use. sls is a lot easier to type than Select-String!

                            1. 2

                              I hate the fact that PowerShell is verb-noun, but with tab completion typing a short name that you’re very familiar with is a bit faster than typing a long well-namespaced name (e.g. String-Select) but it’s a lot faster to type a long well-namespaced name that you aren’t familiar with than it is to type the short one.

                              For example, there’s a standard UNIX tool with a two- or three-letter name for printing a specific column of a stream and I never remember what it’s called, so I either spend a few minutes in man pages or just use awk and type more. Typing something like Column-Select would be 4-5 characters with tab completion and would save me a lot of time.

                              I mostly use PowerShell for Azure admin things and I do that sufficiently rarely that the commands are never in muscle memory for me. Tab-completion works pretty well for helping me find things (though with noun-verb it would be much better).

                              1. 2

                                For example, there’s a standard UNIX tool with a two- or three-letter name for printing a specific column of a stream and I never remember what it’s called

                                cut? I suppose I understand what you mean - but it does have mnemonic name - it allows you to cut out fields and columns?

                              2. 1

                                When writing things that I’ll need to write again, like api endpoints, or shell scripts, I favor shorter names. When writing functions I’ll be reading more times than I’ll be writing, I favor longer names. Coupling this guidance with a soft goal of lines under 80 characters, and I get what seems like a nice result to me.

                              3. 1

                                Powershell also has a bevy of shorter name aliases, designed for interactive use.

                              4. 3

                                Agree about shellscripts, but

                                And I disagree about Python’s subprocess module—I think it’s clunky and verbose.

                                Have you tried subprocess.check_call and subprocess.check_output? I ask because I used Popen for a long time and only last year thought to check for simple synchronous versions that are what I need a good 90% of the time.

                                I do agree that Popen can’t really compete with the ease of bash piping, though; for large volumes of data, you need to use a subprocess.PIPE to process it (which you get for free with bash) and i’m not familiar with any idioms that make that painless.

                                1. 3

                                  I kind of agree with the first response. subprocess is clunky, and frankly weird at times, but it’s really flexible, and for me, when I’m trying to structure data into arrays or dicts, I find bash even clunkier. Structured data is usually where I go from using bash to an actual programming language like python or ruby.

                                  1. 2

                                    For me it’s just a matter of readability; something like grep foo file.txt | cut -d : -f 2 | tr -s ' ' is a lot more work in subprocess (or native Python).

                                    This is like the old McIlroy vs. Knuth story, where Knuth had written a long Pascal program and McIlroy did the same with a fairly simple shell pipeline.

                                    I think there was some library that tries to abstract a lot of the syntax around this, which might be a nice middle ground, and of course using Python brings many other advantages too.

                                    1. 2

                                      Right, and IMO it’s not entirely a subprocess issue; python generally solves different problems, and Popen doesn’t get in my way when I need something more complex than a short bash script. But It’s pretty hard to beat |, 2>&1, >>foo, &, etc. for concision, and sometimes I just wish it were as mindlessly easy to do pipes in python as it is to strictly evaluate a generator ([*foo]) or unpack a nested iterable (x, (y, *z) = bar). I’d probably set the threshold lower for when to use python vs. bash if that were the case.

                                      arp242 mentions below that libraries exist for this sort of thing, and I’ve used plumbum for this in one project, but then you have to worry about portability, version management, bloat, etc, which is again a hindrance.

                                  2. 2

                                    … And I disagree about Python’s subprocess module—I think it’s clunky and verbose.

                                    I find it to be clunky as well, fortunately Python has Xonsh shell, which is pretty amazing ;-)

                                1. 1

                                  The obvious takeaway is: “Don’t forget to make backups”. Syncing things with multiple devices is not a replacement for backups…

                                  1. 1

                                    That ascii drawing mode seems very useful. Thanks!

                                    1. 1

                                      Maybe it’s just me, but last time I tried artist-mode I found it leaves much to be desired. When using the mouse, movement is rather jerky and erratic, so getting lines to appear where you want them can be quite a hassle. Using the keyboard on the other hand isn’t that big of a win over just typing things out.

                                      1. 2

                                        Using the keyboard on the other hand isn’t that big of a win over just typing things out.

                                        really? Try to draw a box, a circle or a fill-in by typing and measure the time it takes… it think it’ll be much greater then using artist-mode ;-)

                                        Very nice post by the way, thanks!

                                    1. 1

                                      Does it comes free with the standard library of a language that does many other things or do I have to install it explicitly? :-)

                                      1. 2

                                        This slightly modified version:

                                        def fibTCO(n, a=0, b=1):
                                            if n == 1:
                                                return b
                                            else:
                                                return fibTCO(n - 1, b, a + b)
                                        

                                        gives me:

                                        Py3 Computed fibTCO(47)=2971215073 in 0.00 seconds
                                        
                                        1. 1

                                          Ah, the original implementation gives me:

                                          Py3 Computed fib(47)=2971215073 in 552.15 seconds
                                          
                                          1. 1

                                            That’s neat - I’ve never seen that version of Fibonacci before.

                                          1. 8

                                            Not at all what I expected as a post. I figured there would be much more political argument clarifying the title. Oh well.

                                            1. 15

                                              I am working on a larger rant on cargo culting Google, but I have to build up more satire juice to get on the level of this

                                              1. 3

                                                That article is a thing of beauty 😂

                                              2. 4

                                                Yeah, the subtitle was a 180 for me. At least it was there to let me know what it was actually about, though.

                                                1. 4

                                                  Same. I want a reason to hate it, I have an irrational distaste towards it for some reason

                                                  1. 4

                                                    For me it’s all the yaml.

                                                    1. 1

                                                      Look at the bright side, at least it isn’t a clickbait.

                                                      1. 3

                                                        It is a headline bait though, the twitterverse likes to only read headlines and judge things on that. I intentionally chose the title so that people on Twitter taking it out of context would look ridiculous.

                                                        1. 2

                                                          Yes, so much I understood, but don’t you think that with a title like that your’re somewhat betraying the reader. Probably the next time you post, I’ll not so eager read your post. Just my two cents.

                                                  1. 2

                                                    I absolutely agree with the default search engine problem. It’s very difficult to “sell” Firefox as a privacy respecting browser when Google is the default search provider.

                                                    I wonder what are the issues with the fonts, could you elaborate more?

                                                    I also don’t know they stopped innovating the browser giving the chance to move the horizontal tabs to a sidebar out of the box, for example.

                                                    1. 1

                                                      As for the fonts, I’m not entirely certain whether it’s an issue with me or an issue with Firefox (or if it’s working as intended). I have quite a few fonts installed, so when a website requests a font there’s often multiple options that could be good fits. When GitHub requests SFMono-Regular,Consolas,Liberation Mono,Menlo,monospace, Firefox chooses a really ugly monospace font that it thinks fits the metrics of one of the other options even though it’s not the fontconfig default monospace or the Firefox default monospace. Chromium sees that it doesn’t have any of those fonts installed and falls back to the system monospace, which I intentionally chose to look nice. My solution to this problem was to define Consolas as an alias for the system monospace, but that feels like quite the hack to get a single website looking acceptable.

                                                      Also, not completely related, but if you visit the homepage of my website and hover over a link, Chromium’s underline has breaks for descenders while Firefox just draws a straight line right through the bottom of some letters.

                                                      Both issues are pretty minor, but detract from the polish of Firefox and would certainly make any of my designer friends completely uninterested. Maybe the first issue is better on macOS or Windows where there’s a more standard set of default fonts?

                                                      1. 4

                                                        An intern of ours on the Layout team just (a couple of weeks ago) finished their implementation of text-decoration-skip-ink in Firefox. If you run Nightly you should already see underlines skipping ink by default. It’ll ship in Firefox 70.

                                                        1. 2

                                                          When GitHub requests SFMono-Regular,Consolas,Liberation Mono,Menlo,monospace, Firefox chooses a really ugly monospace font that it thinks fits the metrics of one of the other options even though it’s not the fontconfig default monospace or the Firefox default monospace

                                                          Your fontconfig might have an alternative set for one of the requested fonts e.g.

                                                                  <match target="pattern">                                                                                                                      
                                                                          <test qual="any" name="family"><string>Arial</string></test>
                                                                          <edit mode="assign" binding="same" name="family"><string>Fira Sans</string></edit>
                                                                  </match>
                                                          
                                                          1. 1

                                                            This is highly subjective, but to me the broken underline looks horrible. I hope FF never copies it. Chrome also still doesn’t support hyphenation. At least now that @supports work, the workaround for Chrome is much easier than IE-era workaround.

                                                            1. 6

                                                              I just did a little more research and found out that they’re called skip-ink underlines. For anyone else interested in a quick comparison of three ways to underline text, see this image and the others on this article.

                                                              The typographically correct thing to do is not to use underlines at all, but the broken underlines are potentially more readable. Of course, it’s pretty much purely subjective.

                                                        1. 2

                                                          Interesting… I’ve still to understand the “model” of their platform thoug. The client is open source but the server environment, if there’s one, is not? Am I right?

                                                          1. 1
                                                          1. 19

                                                            “Privacy is paramount to us, in everything we do”… The fact that these are the opening words make it very surreal