Hacker News new | past | comments | ask | show | jobs | submit | tored's comments login

The painful part of that setup is that all the tools you want to use on the source code must either run on the server itself, thus installed somehow, or some slow remote mounted filesystem, this severely limits the tools you may want to use.

What tools don't run on Linux? Modern tooling almost assumes Linux in most cases now. As a Windows user I feel like I hit this wall way more often than any other.

Running an IDE over ssh or samba is just an awful experience, but generally if I want a command line tool to be installed I need to be either root or I need to ask the administrator of the server to install it, on my own machine I can install whatever I want and I can run whatever operating system or distro I want.

And if I'm traveling I can bring my laptop with me, can't do that with a server.


Oh right sorry I did forget about that aspect. I haven't done that for a while with a big codebase with, say, VS Code, and not on anything that wasn't very low latency (sub 10ms, so local LAN). I am mostly editing directly on the server when I do it these days but that wouldn't fly for anything other than the light hacking I do.

These days with many working on remote location you also need to include the VPN latency.

Fully agree, the default should be strict, jQuery based code requires every developer to be aware of every selector used in the project and remember to update it when the DOM changes. That is of course impossible.

I think it is possible to replace the jQuery init function with your own implementation that enforces length.


Enjoy!

    <html>
    <head>
        <script src="https://code.jquery.com/jquery-4.0.0-beta.2.js"></script>
    </head>
    <body>
    <ul id="list">
        <li>foo</li>
        <li>bar</li>
        <li>gnord</li>
    </ul>
    <script>
        (function ($) {
            "use strict";

            if ("development") {
                // jQuery strict mode, logs errors on empty selectors if not opting out
                const getStackTrace = function (error) {
                    const stack = error.stack || '';
                    return stack
                        .split('\n')
                        .map(function (line) {
                            return line.trim();
                        })
                        .filter(function (line) {
                            return !!line;
                        });
                };

                // by calling try() we silence selectors that returns empty
                // problem is that this function runs after the selector
                $.fn.try = function () {
                    this.__store.try = true;
                    return this;
                };

                // thus we use the GC to check when the jQuery object is destroyed
                const registry = new FinalizationRegistry((store) => {
                    if (!store.try) {
                        console.error(
                            'Empty result for selector "' + store.selector + '"',
                            getStackTrace(store.error)
                        );
                    }
                });

                // override the init method
                const jQueryInit = $.fn.init;
                $.fn.init = function (selector, context) {
                    const result = new jQueryInit(selector, context);
                    if (selector && result.length === 0) {
                        const store = {selector: selector, try: false, error: new Error()};
                        result.__store = store;
                        registry.register(result, store);
                    }
                    return result;
                };
            } else {
                $.fn.try = function () {
                    return this;
                };
            }
        })(jQuery);

        // normal usage, have result, no error
        $("#list li").each(function (i, el) {
            console.log(el);
        });

        // empty result, triggers error log
        $("#nolist li").each(function (i, el) {
            console.log(el);
        });

        // empty result but with try, no error
        $("#trylist li").try().each(function (i, el) {
            console.log(el);
        });
    </script>
    </body>
    </html>

Sure, but can you realistically run an up-to-date server today without systemd? Especially for these organisation that runs stuff like CrowdStike.


Devuan? Void? MX? Guix?


Do sysadmins actually run any of them for large systems like stores, hospitals, airports etc?


The point is that they can if they have the want/need to.

Sysadmins at the places you listed use windows because that’s where the software support is and Active Directory exists.


Alpine Linux. I'm sure they do run that one.


I left Alpine off of my list because the only place I've ever seen it used is inside of containers, which usually don't run their distro's init system at all.


Them branches go round and round this year.


I added

  "update_check": false
to my Preferences.sublime-settings for ST3, seems to have solved it.


I use WinMerge for that, unfortunately, as the name implies, Windows only.


I don't think WinMerge supports proper 3 way merge..


Probably the best option for the author, bit surprised that this was not listed as option, especially since he considered writing HTML/CSS for Sciter.


A. PureBasic

B. PureBasic


Tested Geany Editor on Windows the other day, it uses GTK, great editor but horribly slow on Windows, just scrolling a small file (less than 100 lines) was sluggish.


It exist cross platform GUI frameworks that is maintained by much smaller organizations than Microsoft, if they can do it, Microsoft can do it too.


Unfortunately Microsoft has too many Web devs taking over the old Windows development culture, when it isn't Electron, it is Webviews all over the place.

See all those efforts with Blazor integration across all desktop stacks, MAUI (!), and the use of React Native in WinUI, Office and XBox.


Consider applying for YC's W25 batch! Applications are open till Nov 12.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: