Threads for hendi

  1. 1

    (Heavy IHP and Django user here)

    Just yesterday we shipped a bug into prod that our tests haven’t cought. It took a while to trigger but resulted in wrong data in the DB which was a PITA to correct manually. That was with Python. I’ve checked, and that particular error wouldn’t have happened with Haskell.

    Can’t wait till IHP gets a simple admin area similar to Django’s, I’d use it for new internal products in a heartbeat. (For now we “only” use it for important user facing parts, where its safety and JSX-like templates are key)

    1. 10

      I’ve been using IHP since last year, first simply for becoming more familiar with Haskell and some toy applications. Since this year my company is building two new projects with it (one is about to launch) and I couldn’t be happier. Working with remote devs is easier than ever (compared to our previous projects built with Django and Python) due to the strict type checking in the compiler and the fact that IHP encourages certain conventions (so a. no discussions between devs, and b. similar to Rails and Django you know instantly where to look for stuff)

      Compared with other Haskell web libraries like Servant or Yesod IHP removes lots of boilerplate is more “stack” or “framework” than library. Perfect for us who ascribe to Django’s “The web framework for perfectionists with deadlines” mantra.

      Not everything is perfect (yet) of course, but the community and maintainers are available in the Slack (accessible via IRC bridge!) and quickly help out with helpful comments / point you in the right direction for a fix / PR to IHP or put it on their todo list.

      1. 2

        Sorry, but what kind of “review” is this? It’s a reskin of Ubuntu, using Gnome Shell with some (admittedly cool!) extensions. You could do a deep dive and review what sets Pop#/OS’ apart, but this piece is just fluff.

        1. 2

          If you have to inspect the port and put a sticker on it first, I would not call that inserting “correctly the first time”. It seems the author lacks understanding of the variety of real world use cases. Just as one example, what about when you do not own the device you are plugging into? Should we be putting stickers on other peoples’ equipment? I think not. It’s very tempting to generalize from this article to draw conclusions about Microsoft attitudes and practices as a whole.

          1. 2


            1. 1

              The Microsoft mouse I own has both the USB logo and a little raised nubbin on the “top” side, so I don’t think it’s fair to rag on Microsoft for not following the standard.

            1. 31

              This is what has kept me busy the past 18 months. Ask me anything :-)

              1. 12

                I’ve been using the preview for a while, and I like it a lot. Thanks to you and everyone at Mozilla.

                Moving the address / tool bar to the bottom of the screen is, imho, a very clever decision that made my huge phablet phone a bit less painful to use.

                1. 7

                  After using Firefox on Android for as long as I can remember, I have changed browsers.

                  Every time I start the new version my screen flashes. I perceive no performance improvements or “experience” benefits. On the contrary my favorite extensions no longer work.

                  My question is, why should I use/return to this new version?

                  1. 6

                    Same here, even on my latest Google Pixel, the Firefox performance was awful, the browser experience was not good. But now I’m very happy with the latest version, I can see real good improvements, the browser experience is great and it’s not resource hungry as the oldest version. I would like to congratulate the Mozilla team for the great job!

                  2. 7

                    I… hated it. Especially I feel like there wasn’t enough testing with the bar configured on top. I wrote a rant with the issues I have, which will probably read as too angry for a comment but allowed me to vent my frustration.

                    For now I set the bar on the bottom, which I don’t really like but solves 2 issues (buggy sites, and the new tab button being too far).

                    Still thank you for your work. I couldn’t get anything done without firefox in my pocket.

                    1. 9

                      Another issue not listed: I will sometimes come back to firefox to find an old tab is now completely blank. Reloading will not help: I have to close the tab and open it again. I’ve had this happen with both a lobsters tab and a completely unrelated site… I will have to try and find a reproducible way to trigger it, could be hard.

                      1. 3

                        I’ve had that issue on desktop firefox. If the site is bookmarked, I click it (helpful especially if it was a container tab)

                    2. 6

                      Lots of users hate the new tab drawer (vs. the original tab page in earlier Firefox Preview builds). I don’t think it matters whether it’s a drawer or a full screen page, but the fact that scrolling to the top of the list continues into closing the drawer is extremely annoying. I do not ever want to close the drawer by moving my finger down on the list of tabs!! Please make an option to only have the header draggable for closing.

                      1. 5

                        Any plans for completing the bookmark feature?

                        1. 4

                          Will it it be made available on F-Droid? Soon? Ever?

                          How does this release relate to these:

                          Getting Firefox via F-Droid has always confused me, so I’ve stayed away, but I’m always on the lookout for a good browser for Android.

                          1. 2

                            No idea about Klar, but Fennec is similar to IceCat: Firefox with the proprietary blobs removed. I think F-Droid doesn’t like vanilla Firefox for the reason that it contains blobs.

                            1. 2

                              My recollection is that F-Droid’s Fennec build is just Firefox with the trademarks removed, not proprietary blobs. The new Firefox for Android, Fenix, doesn’t get packaged because its standard build system involves downloading pre-compiled copies of other Mozilla components, like the GeckoView widget, rather than building absolutely everything from source. F-Droid does allow apps that download pre-compiled copies of things, but only if they’re obtained from a blessed list of Maven repositories, and Mozilla’s CI system is not on the list.

                              Also, there may be something about requiring the Play Store to support notifications, but I don’t think it’s the only or even the biggest blocker.

                              1. 3

                                Ah, sounds like you know a more about this than me - I stand corrected. Thanks for the information!

                          2. 4

                            why block about:config? why no arbitrary extensions on your own risk? I would love a split screen or dual window feature.

                            1. 3

                              One thing I would absolutely love is socks5 proxy support. Any plans for that? Also, I use ^L and ^K a freakton in the desktop browser. I’d love to see support for that when using Firefox for Android on ChromeOS.

                              1. 3

                                How can I downgrade without losing my settings and open tabs?

                                1. 2

                                  Hi @st3fan,

                                  In general I’m pretty happy with the new version of Firefox. The one big mistake Mozilla made however was to pull important features out.

                                  For example I miss “custom search keywords”. I have a carefully crafted list of custom search keywords, and I use Firefox on top of iOS too because of it (otherwise I’ve got no reason to not switch to Safari). And it seems that this particular feature is not coming back on Android, due to some unification with the search engines, which don’t even synchronize. And this made me a little sad.

                                  Also the new engine has some issues with some animations on some websites, as when scrolling such pages I sometimes get lag. I also hope that you’ll improve Android’s UI for tablets, as some of the UI elements are a little small on top of my Galaxy Tab S7.

                                  Otherwise I’m happy to see Firefox improve, and the few add-ons I relied on still working. For me Android is not usable without Firefox ❤️

                                  Keep up the good work.

                                  1. 2

                                    Great work! It sounds like there’s been a lot of work going on under the hood for this release, and there’s mentioning of it now being easier to make new features in the product. Are there any blog posts - or could you talk a bit about what changes that has been made which now unlocks this extra velocity?

                                    1. 2

                                      I use Android with a keyboard.

                                      Do you know of any keyboard-driven browsing solutions like Vimium on Android at this time?

                                      1. 2

                                        Any way to display your bookmarks on startup or something like this ? I’m used to switching through my bookmarks, now I’ve got to add them all to this “collection”(? german word is “Sammlung”) and that is collapsed every time I create a new tab. “Add to start screen” doesn’t do anything.

                                        1. 1

                                          Finally found the option to add it as part of the start screen. The new Bookmarks view is hard for me to grasp, like everything looks the same.

                                        2. 1

                                          This is the version that finally made me rate Firefox in Play store: to 1 star! Why did you (plural) make it this bad?

                                          Things that broke:

                                          • setting DuckDuckGo up a default search engine was simple in the past as I remember. It was auto-discovered, I think, I installed Firefox quite a time ago. Now I had to manually edit a search string.
                                          • The text selection menu is totally useless. I used to have “copy to clipboard” and “search <default search provider” there. Now I have to push “…” and scroll a tiny list with useless items populated by some incomprehensible logic, containing apps installed on my phone eg. a “pdf reader”, “encrypt”, “private search”, “Firefox search”, “new task”. Lot of useless crap instead of a single simple workflow. The “Firefox Search” option is the functional equivalent of the old operation, but it is at the bottom of the list, so it is a pain to use.
                                          • icons in the start page are smaller, and the workflows on their manipulation are not intuitive.
                                          • tab selection is terrible. The tabs opened in the background are at the top of the tab stack, but the current tab is at the top of the screen, and there are no visual cues that there may be other tabs above, you need to scroll both ways to find what you are looking for…

                                          The whole UX suggest that the developers don’t use Firefox for daily browsing. The feature are there, the UX is terrible, and is a regression in every possible aspect.

                                          The single good thing is the address bar in the bottom. I’d prefer to downgrade to an older version actually, as the previously advertised speed benefits are not noticable.

                                          The PR page states:

                                          User experience is key, in product and product development

                                          Maybe I’m not the target audience?

                                          I know this is not your (singular) fault, more likely a project management issue, but I think the direction is not the right one.

                                          1. 1

                                            Hi Stefan, please take a look at brave on mobile. I was eagerly waiting for Brave UX in firefox and chrome. Fantastic news that firefox.

                                            One suggestion - After clicking on tab number at right bottom corner to open new tab, is it possible to slide to normal window to incognito windows by sliding on screen rather than click on each icon. This will be especially helpful for mobile or tablet with big screens.

                                            Again, big thanks making such huge change possible.

                                            1. 1

                                              Just got the update. Really liking the bar on the bottom.

                                            1. 15

                                              IHP is supposed to become the Django/Rails/Phoenix of Haskell.

                                              I’ve been using Django professionally for since 2013, but have started using IHP a couple of weeks ago. It’s still quite early but with surprisingly few rough edges, i.e. the developer ergonomics are much better than I expected. It has great documentation that is improving rapidly (as opposed to many other Haskell libraries, which provide little more than API docs or even just the typed function definitions) and offers a refreshing take on database management and migrations.

                                              Some of its killer features:

                                              • HSX, a JSX-like template language that looks like HTML while providing type safety
                                              • Auto live reloading without the need to setup anything
                                              • Documentation with examples: it lets you query the database without learning about monads
                                              • it defines |> for you ;-)
                                              • type-safe, composable SQL queries:
                                              projects <- query @Project
                                                |> filterWhere (#userId, userId)
                                                |> filterWhere (#deleted, False)
                                                |> orderBy #createdAt
                                                |> fetch
                                              1. 1

                                                it defines |> for you


                                                  1. 1

                                                    See here for its implementation.

                                                    I prefer my code snipped from above to using & or . for composition for this specific use case.

                                                1. 4

                                                  Good one. The joys of git add . without setting up .gitignore…

                                                  1. 2

                                                    We should also do a better job of educating devs to review all staged changes prior to committing. It’s not enough to git add ., you also need to check it to ensure you agree that everything being committed is absolutely necessary.

                                                    1. 2

                                                      I’ve disabled git commit‘s -a parameter on all my machines. It’s just too dangerous/too easy to screw things up with it. git add $dir is in the same category, IMHO.

                                                      1. 1

                                                        How do you disable the -a parameter?

                                                        1. 2

                                                          I’ve put this into my .bashrc:

                                                          git() {
                                                          	for arg
                                                          		if [[ $arg == -a* || $arg == -[^-]*a* ]]
                                                          			echo "DO NOT USE -a!"
                                                          			beep -l 350 -f 392 -D 100 -n -l 350 -f 392 -D 100 -n -l 350 -f 392 -D 100 -n -l 250 -f 311.1 -D 100 -n -l 25 -f 466.2 -D 100 -n -l 350 -f 392 -D 100 -n -l 250 -f 311.1 -D 100 -n -l 25 -f 466.2 -D 100 -n -l 700 -f 392 -D 100 -n -l 350 -f 587.32 -D 100 -n -l 350 -f 587.32 -D 100 -n -l 350 -f 587.32 -D 100 -n -l 250 -f 622.26 -D 100 -n -l 25 -f 466.2 -D 100 -n -l 350 -f 369.99 -D 100 -n -l 250 -f 311.1 -D 100 -n -l 25 -f 466.2 -D 100 -n -l 700 -f 392 -D 100
                                                          			return 1
                                                          	command git "$@"

                                                          The beep invocation is of course entirely optional ;-)

                                                    1. 7

                                                      We haven’t jumped on the microservices/microservers/virtualization/layers-upon-layers-of-abstraction bandwagon. Instead we use a couple of beefy servers, like we did aeons ago.

                                                      The servers are named appropriately: chtulhu, azathoth, yog-sothoth, shub-niggorath

                                                      1. 3

                                                        I’ve used an X61s as my daily driver till 2018. I briefly used an X230 but couldn’t stand its keyboard, so quickly downgraded to an X201, until my “X210“ arrived. That’s a modded X201 with a better screen, NVME-SSD support an an i7 processor from 2018, and o out 32GB of RAM into it. I love it, and plan to use it till at least 2028!

                                                        I’ve just ordered an “X2100”, which is similar to the “X210” but with a larger screen (higher resolution. smaller bezels [so small they had to remove the webcam… Yay!] and a 3:2 ratio!) and a gen10 CPU from 2019. That should be good enough till 2030 for me.

                                                        I can only recommend that you buy one yourself as long as they’re still available. It involves wiring money to China to “some guy” who then ships you the laptop a couple of months later. It’s so much worth it, and I wouldn’t buy any other laptop. I completely agree with you, every laptop today sucks, and even Lenovo’s X-series went downhill (started with the X230 keyboard, but become complete shit with lady year’s refresh making the X series basically an X1 clone with soldered RAM and battery and crap like that. No thanks!)

                                                        1. 1

                                                          Holy shit, a 3:2 ratio? Sounds too good to be true.

                                                          Edit: apparently it has a glossy screen, so yeah; too good to be true. what a tragedy.

                                                          What do you do about the battery?

                                                          1. 1

                                                            Right, it’s glossy :-/ I’ll see whether I’ll use the X210 or the X2100 more (the other is a backup in case the main one breaks).

                                                            Battery is no problem, you can buy some pretty good used ones. With “used” I mean lightly used with still >80% capacity which is good for at least 6h. That’s not much by today’s standards, but I’ve never needed more than 4h without power supply available.

                                                            Why used? Because “new” ones are often crappy fakes.

                                                            1. 1

                                                              Huh; I assumed since it’s no longer possible to get batteries for the X300 that the same would be true of the X210, but I guess the downside of the X300 being the premium line was that a lot fewer were produced.

                                                        1. 3

                                                          Nim is great.

                                                          I’ve built a custom file uploading CLI tool for a customer with Nim 0.x in 2016. Why Nim? The backend was written in Python, as well as a prototype for the uploading logic (prioritization, chunking, hashing, access control) and getting from there to a single executable meant Nim was an obvious choice. Well, as “obvious” as 0.x niche languages can get :-)

                                                          Recently I was tasked to port the tool to Windows and jumped at porting the code over to 1.0 (or rather 0.22). I’ve had to do a couple of small updates to the code to fix some deprecation warnings and some smallish changes to the nim language, but could also remove a lot of code (Nim now has sha1 hashing in its stdlib, so I could remove my hand-crafted sha1.nim code). After that, the only change I had to make in order to make it run on Windows was changing the way how I read file. For some reason, Windows didn’t like my way of opening large files, but that was trivially fixed with a three-liner.

                                                          I know have a .exe, and the hardest part was getting a dev environment setup on Windows, and coping with Window’s idiosyncrasies, its badbadbad cmd.exe and DLLs: turns out Windows loads DLLs from its path m(

                                                          [Somewhat related, I’ve also ported a GUI app written in Rust to Windows in the last days. Overall a similar experience regarding “code once, run anywhere”.]

                                                          1. 3

                                                            I can only but recommend giving Nim a try. It features a Python-like syntax that compiles to C to binary, and is so easy to get started with. And once you dig deeper there’s a lot of amazing stuff to discover there!

                                                            (I also filled out the survey)

                                                            1. 1

                                                              I’ve been hearing a lot about Nim lately. As a fan of Python and someone who does a lot of embedded C/C++ development, I’m quite intrigued!

                                                              1. 1

                                                                If that’s your background, do check it out cuz people like you are a good test of its claims. I’m especially interested in how much it can or can’t improve on how you use C and/or C++.

                                                            1. 3

                                                              This looks interesting, and makes good use of typing. It also looks similar to Apistar, which is another python framework for APIs that also uses typing. Could you please describe the differences between these two? I’ve been using Apistar for a project for a while and it works great so far.

                                                              1. 3

                                                                Thanks! I tried to do that on the motivation page. Basically, I wanted more control over the component lifecycle (molten lets you define which components are cacheable (reused during a single request) and which are singletons), I think apistar’s hooks are super clunky and, as an apistar user myself, this announcement kind of scared me, especially after the huge 0.3 to 0.4 transition.

                                                                1. 3

                                                                  I’m sorry, I was so amazed by all the examples on the homepage that I’ve missed the “motivation” link.

                                                                  That explains it to me, thank you. I also wasent aware of the change of focus re. Apistar, I’m still running 0.3 but I share your concern.

                                                                  I’ll definitively have a thorough look at Molten and will give porting my API over to it a try.

                                                              1. 2

                                                                I played around with it and molten is awesome. Still not sure, whether type hints are pythonic or not, but this gave me another tilt towards finding it perfectly suitable, especially for the web dev use case.

                                                                1. 1

                                                                  This specific usage of the type annotations is nice in terms of visual clutter, but I think that it will require extra cognitive work to understand and write the code.

                                                                  1. 4

                                                                    I disagree, type hints are awesome especially for things like this.

                                                                    Usually, when your route takes e.g. a user_id you either have to use the right regex (in Django’s or remember to validate it yourself in every route. Screw up once -> boom.

                                                                    Molten, similar to Rocket for Rust, makes sure that you’re handler is only called when the passed user_id is a valid integer (assuming user_id: int).

                                                                    This becomes even more valuable with more complex types.

                                                                    1. 1

                                                                      I agree that type hints can be useful to make sure that these kinds of bugs are taken care of easily. But the way it is used in the Todo example is that the TodoManager class is passed as an annotation in the methods “list_todos” and “get_todos” . Why not just use a keyword argument for this?

                                                                      1. 1

                                                                        Why not just use a keyword argument for this?

                                                                        That “just” makes the problem seem less complicated than it really is! :D

                                                                        Let’s say you’re using a framework like falcon that doesn’t provide DI support out of the box. Assuming you wanted to

                                                                        1. be able to swap out the implementation of todo manager easily in your tests and
                                                                        2. avoid global state and mocking,

                                                                        then your API might look something like this:

                                                                        from falcon import API
                                                                        # Define Database and TodoManager here...
                                                                        class TodosResource:
                                                                          def __init__(self, todo_manager):
                                                                            self.todo_manager = todo_manager
                                                                          def on_get(self, req, resp):
                                                                   = self.todo_manager.get_all()
                                                                        def setup_app(db_impl=Database, todo_manager_impl=TodoManager):
                                                                            db = db_impl()
                                                                            todo_manager = todo_manager_impl(db)
                                                                            app = API()
                                                                            app.add_route("/todos", TodosResource(todo_manager))
                                                                            return app
                                                                        # In your entrypoint:
                                                                        app = setup_app()
                                                                        # In your tests:
                                                                        app = setup_app(db_impl=StubDatabase)

                                                                        This isn’t bad and it’s explicit, but manually configuring the dependency tree can get quite hairy over time and when a particular component’s dependencies change, rather than only changing that component’s code to depend on different deps, you’ll have to also change all of the places where the dependency tree is constructed (not a huge deal if you have this sort of setup_app function like I’ve got above, but not a particularly fun thing to do either way). Another downside here is that it’s not immediately clear what components the TodosResource.get method relies on from its header.

                                                                        If, instead, you use type annotations to do the wiring for you then you get the best of all worlds in exchange for a little bit of magic (that, in my experience, people get used to fairly quickly).

                                                                        I hope that makes sense!

                                                                      2. 1

                                                                        Yeah, I was reminded a lot of Rocket when I was reading the examples. Which is a good thing. There are a lot of things in Rocket I wish I was able to do more transparently in Django.