1.  

    What’s the problem with the setjmp/longjmp-based variant of the implementation, that it needs a warning?

    1.  

      It employs undefined behaviour, and tends to have problems. Working on it…

    1. 1

      Looking at the source, does this need GNU C extensions? Because it looks like the header is wrapped in a #ifdef __GNUC__

      1. 2

        No. There is a version which uses gnu computed goto, but also a version which uses standard setjmp/longjmp.

      1. 0

        I would implement this with C++, where it’s a trivial RAII class with some macros as syntactic sugar.

        Then it’s just a matter of compiling your C code as C++ with a compiler flag. You can still write in C, you just have access to more features if you want them.

        1. 6

          Some projects may not want C++ as a dependency.

          1. 6

            I wrote about this on reddit.

            1. 6

              The problem with C++ is that my colleagues have access to features I don’t want. 😉

              1.  

                But then your compile times will be inflated by a factor of 10.

                1.  

                  Which is still a factor of ten faster than trendy languages like Rust and Swift, amirite?

                2. 3

                  Just a little while ago I took a take on it with C++. The post is in German, but the code should be understandable (the second code block is the implementation, the third code block shows the usage). Try your favourite translator for the explanation of how it works :-)

                  1. 1

                    I recommend using __COUNTER__ over __LINE__, where supported, because that way you can have multiple deferred things on the same line.

                1. 4

                  Weird, I remember reading that GCC has deferrals as an extension, I don’t remember where, but it was as simple as putting an attribute on something

                  1. 5

                    Correct:

                    cleanup (cleanup_function)

                    The cleanup attribute runs a function when the variable goes out of scope. This attribute can only be applied to auto function scope variables; it may not be applied to parameters or variables with static storage duration. The function must take one parameter, a pointer to a type compatible with the variable. The return value of the function (if any) is ignored.

                    If -fexceptions is enabled, then cleanup_function is run during the stack unwinding that happens during the processing of the exception. Note that the cleanup attribute does not allow the exception to be caught, only to perform an action. It is undefined what happens if cleanup_function does not return normally.

                    1. 4

                      This doesn’t require GCC extensions (although it can take advantage of them for a speedboost). It also lets you defer straight expressions; the GCC extension makes you call a function, which means you have to make a nested function that possibly doesn’t close over local variables. Big mess.

                    1. 3

                      Who are the users? In which toolkits are written their applications? What are your priorities?

                      • Best integration with their desktops and native look and feel?
                      • Best integration with rest of your application (backend, libraries) or your knowledge (languages you already know)?
                      • Best UX (regardless the desktop and rest of your application) or some unique GUI features/widgets?

                      How much time do you have? Could you afford learning a new technology? Is there a boss or customer requesting the finished product before deadline?

                      For most/mainstream applications, I would recommend Qt. But if your users have desktops based on GTK, then GTK(mm) would be probably a better option (however Qt also does not look bad in Gnome). For some people Qt is too heavy, has too much legacy and „we can write a better GUI toolkit without reusing 20+ years old code“ – there are use cases where something lighter than Qt would be better. Such frameworks exist (however their GUI usually look worse or sometimes ugly or outdated… but it is light and sometimes the best option).

                      It is also possible write the application in multiple languages, separate the backend and frontend, connect them through D-Bus, SOAP or other protocol over STDIO or socket, C function API or something else. You can even write multiple frontends e.g. Qt and GTK to fit most desktops…

                      But if you are asking for a solution that brings the least amount of work, then just take the language you are most familiar with and look for its best practices for GUI (nothing bleeding-edge, rather mature solution that is battle-tested and also seems to be supported in future). It would not give you the coolest-looking GUI or extremely low complexity (library/toolkit lines of code) but it will allow you to get the job done and finish the project before deadline.

                      1. 2

                        Who are the users?

                        Primarily me.

                        What are your priorities?

                        Development experience and application UX. I don’t really care about look and feel/integration.

                        Time is unlimited; it’s a hobby project.

                        Network protocol is a good idea; I will look into it. That could be the most flexible solution, so I can build the presentation logic separate from the actual GUI display.

                      1. 30

                        One thing that is not specified is the language choice. E.g. if the language is Java, you are probably limited to JavaFX, SWT, AWT, or Swing.

                        But generally speaking: Qt. Has matured over 2.5 decades. Has a reasonable look & feel on macOS and Windows, is native to Linux (at least KDE). Has a large set of traditional widgets. Has a GUI builder (Qt Designer) where you can just drag and drop widgets. You can generate a class from the Qt Designer .ui files. The Qt with C++ learning curve is quite steep if you don’t know C++, but there are two awesome Python bindings (PyQt and PySide). The Python bindings also have the benefit that they integrate with things like matplotlib (which has a Qt backend). In contrast to all web solutions, Qt applications can be lean.

                        Background: I have used both Gtk+ and Qt for applications. I prefer Qt by a large margin, it’s better in almost every aspect: better widgets, better documentation, more logical, better look & feel in Windows and macOS. The big thing that Gtk+ has going for it is that it has bindings for more languages (since Gtk+ is written in C, it is easier to bind). So, for Rust applications I use Gtk+.

                        I absolutely hate Electron/web apps. But you should probably consider it, given the amount of documentation and the size of the communities.

                        1. 3

                          Totally agree about Qt. Qt also comes with networking and core library with regexp, etc. support.

                          1. 1

                            One thing that is not specified is the language choice. E.g. if the language is Java, you are probably limited to JavaFX, SWT, AWT, or Swing

                            Like I said in the title, I don’t care that much about language, I just want the best gui creation experience.

                            1. 1

                              Isn’t the licensing around Qt super complex though? It might work if OP is making a FOSS desktop app, but for any other situation I’d be extremely worried about licensing stuff.

                              1.  

                                Complex and constantly shifting, as they keep trying new (often shady-seeming) ways to monetise.

                                1.  

                                  If you’re doing it for money you might be in a position to pay for a licence (and get the less-buggy edition to boot).

                                2. 0

                                  what about cairo?

                                  1. 4

                                    Isn’t that more of a graphics primitive library (can draw shapes, curves, etc.) than a gui library?

                                    1.  

                                      Yes, it’s just an immediate-mode API to draw things on a surface. It is an excellent base on which to build a gui library, but there’s a lot of work between those two places.

                                1. 3

                                  Depending on how complex it has to be you can get pretty far with Racket’s racket/gui. It starts becoming kind of a pain when you need non-standard controls (DrRacket probably already has what you need but you’ll have to search for it), but especially for distributing it’s great, because it’s all in the standard library so you just need to install DrRacket to be able to use it, and you can easily generate a self-contained executable. And it works cross-platform!

                                  1. 2

                                    How is the performance? I have heard racket is slow, but that may be out of date.

                                    1. 3

                                      It’s probably out of date; Racket has been doing JIT compiling in their VM for a while now. They’re in the middle of porting to the Chez Scheme runtime which can have significant performance improvements: https://docs.racket-lang.org/guide/performance.html#%28part._virtual-machines%29

                                      As far as the API goes, Racket is by far the most pleasant way to code a conventional desktop GUI that I’ve ever seen.

                                      1. 3

                                        Is it compatible with accessibility tools?

                                  1. 1

                                    I think it depends on what your going to be most productive with. If it’s Java, then do JavaFX, if web languages then electron, etc.

                                    There are a lot of people who love to hate on tools they don’t like (particularly electron), but at the end of the day you should spend your time focusing on building your tool with the languages you know best.

                                    Perfect example is Minecraft. It has gotten tons of hate over the years because it’s written in Java. But at the end of the day, it got built and sold and used.

                                    1. 1

                                      I am not particularly biased towards any language. I don’t especially like javascript or java, but there is typescript and other jvm languages with good interop, so it doesn’t really matter.

                                    1. 5

                                      If you’re looking for something a little different and a lot of fun, might I recommend GNUstep?

                                      It might also be interesting to play with one of the less mainstream paradigms, like immediate mode GUIs.

                                      1. 3

                                        imgui is not suitable for people who require accessibility features.

                                        1. 4

                                          True. A11y and, to a lesser extent, i10n are often completely ignored in the smaller or lesser-known toolkits. Electron and things built on it seem to be an a11y nightmare from what I can tell.

                                          My comment was more a “here’s some fun things you can mess around with that you may not have considered.”

                                        2. 2

                                          I did think about imgui a bit. I think that for my purposes it will require me to keep a lot of extra state, though. Also, re-render every frame is a bit expensive. I will take a look at gnustep.

                                          1. 2

                                            The “re-render every step” semantics aren’t meant to imply that that’s the implementation. That’s just the mental model for working with it, and libraries like Conrod work to only re-render the things that have changed.

                                            1. 1

                                              I mean like, you have to rebuild the tree every frame.

                                              Remember that imgui was created by a game developer; games tend not to have super complex UIs, and have to re-render every frame anyway.

                                              1. 2

                                                imgui was created really for game development tools, not even real game UIs. It’s meant to be quick and easy debug UIs, asset editors, etc. The kinds of things you get loads and loads of in game development. I think almost all commercial games just do their UIs from scratch.

                                                1. 2

                                                  AAA game dev here. We used Coherent UI for our most recent project which is WebKit based. It’s just easier to find people who write HTML/CSS. Previous project was ScaleForm but no one would recommend that anymore as it’s Flash based.

                                          2. 1

                                            might I recommend GNUstep

                                            Is objective-c still a thing? IIRC GCC’s support for it has diminished, which is rather ironic for a project that includes ‘GNU’ in the name.

                                            1. 1

                                              Afaik, clang still has good support.

                                          1. 4
                                            • HTML is the most universal if you have a solution for the backend
                                            • Qt if licensing is acceptable and up for a huge learning curve
                                            • WxWidgets
                                            1. 8

                                              Re. html, the overhead of a browser engine is pretty high. This would only really make a sense to run as a standalone desktop app, with some native glue for talking to the OS, so the universality isn’t much of an asset.

                                              How much of a learning curve are we talking with Qt? Is the python API (or any of the others) meaningfully different from the c++ API in context of that?

                                              1. 6

                                                How much of a learning curve are we talking with Qt? Is the python API (or any of the others) meaningfully different from the c++ API in context of that?

                                                Qt is much more than just a “GUI library”, it’s more of an “application framework”. Whether that’s a good or bad thing depends on your tastes and what you want to do.

                                                I always used the C++ docs when writing Qt in Python, the API is pretty similar and AFAIK there are no good docs for just Python. It works but you do need to make a mental translation.

                                                Personally I liked working with Python/Qt (more than e.g. GTK), but I found it does have a bit of a learning curve.

                                                1. 1

                                                  What is the Python’s added value then? Is it only a binding (i.e. if I already have Python code, I can easily add GUI using the same language)? I used Qt only directly from C++ and it was relatively comfortable (including the memory management).

                                                  1. 4

                                                    For many people programming in Python instead of C++ is a huge added value. I’m not interested in starting a “C++ vs. Python”-debate, but a lot of people simply prefer Python over C++ for all sorts of reasons (whereas others prefer C++, so YMMV).

                                                    1. 1

                                                      Then I understand is just as a binding. Which is perfectly OK. My intention was not to start another useless flamewar. I just wanted to know, whether the Qt+Python combination can offer something more than Qt itself when the developer is not much interested in Python nor C++ and both languages are for him just the way to create a Qt GUI layer of an application.

                                                      1. 1

                                                        Yah, I know you didn’t want to start a flamewar, just wanted to make it explicit :-)

                                                        And yeah, PyQt doesn’t really offer anything over C++ Qt other than the Python environment. So if you’re happy with that, then there’s little reason to switch (other than, perhaps, making external contributions a bit easier).

                                                        1. 1

                                                          Yep, that’s about what I was interested in knowing too. They said there’s a high learning curve, and I wanted to know if that only applied to the c++ api.

                                                  2. 1

                                                    For how much, read one of the tutorials and see. People’s opinions differ. There’s much more, for example including a HTML displayer with the properties and javascript integration you want is orthogonal, but reading that will give you a feeling for the learning curve.

                                                    In my opinion, the other APIs are different but not meaningfully so.

                                                1. 7

                                                  Please don’t use JavaFX, Swing, Tk, FLTK — anything without Wayland support. Just don’t.

                                                  I would prefer GTK 3 (or even the very exciting WIP 4.x branch of GTK, which brings GPU rendering to all the classic widgets we know and love, unlike Qt which created a whole new world (QML) for this) but here’s some more options:

                                                  wxWidgets, libui, Eto are there for abstracting over native toolkits. (btw, since you mentioned IDE-like things, this Eto project uses various native code editor components)

                                                  If you go with the web route, there are better ways to do it than Electron. web-view uses GTK/Cocoa native WebKit and EdgeHTML on Windows — tiny executables without dragging a whole Chromium copy around, automatic Wayland support (due to GTK), etc. Tauri is a higher-level thingy around web-view.

                                                  1. 8

                                                    Please don’t use […] anything without Wayland support. Just don’t.

                                                    I have no interest in supporting wayland. And for people who want to use it, xwayland is good-enough.

                                                    Someone else mentioned libui is not feature-complete yet. Eto is interesting, I will take a look at it.

                                                    1. 1

                                                      xwayland is good-enough

                                                      No. Most importantly it does not support HiDPI. It’s legacy cruft, I usually keep it off. I’d like to eventually get rid of all X11 libraries on my system completely.

                                                      1. 3

                                                        You’re free to do that, of course. But X11 is not ‘legacy’. It’s a standard across a wide range of Unix-like systems. It’s not going anywhere any time soon. Wayland still doesn’t have a standardised way to do basic desktop things like take screenshots.

                                                        1. 2

                                                          I don’t think the question of “Is X11 legacy cruft?” is interesting; it is what it is, and it’ll stay with us for a while. However, the problems with XWayland are very real. It doesn’t support HiDPI, input is sometimes wonky, features which expect there to be one X server used by all clients don’t work, etc.

                                                          Wayland desktops have protocols for most things, they’re mostly at feature parity with X11. You’re right that many of those protocols aren’t standard though, which sucks. There’s a lot of protocols which aren’t standard but still implemented by every serious Wayland desktop - except for Gnome.

                                                          Gnome usually just implement their own completely different protocols, and Gnome is one of the biggest obstacles to Wayland adoption imo. Lots of Wayland software either works only on Gnome, or on everything other than Gnome.

                                                          1. 1
                                                            1.  

                                                              That’s very nice for Android phones but they have nothing to do with desktop systems.

                                                              1.  

                                                                I think you will find plenty of folk use or will use an ARM SBC for a desktop system.

                                                    1. 5

                                                      What kind of gui? What controls you need? Where will it run?

                                                      1. 4

                                                        Notebook/REPL/IDE-type thing. Desktop platforms (linux primarily, but should work with all three).

                                                        1. 5

                                                          If you don’t mind non-native widgets, I’d suggest looking at ReveryUI. Check out OniVim for an example application built with it.

                                                          1. 2

                                                            I thought (without having any experience with Revery) that a large part of the appeal was that it compiled to native code? Or by “non-native widgets”, do you mean something else?

                                                            I’ve been looking at Revery for a project I’ve been sketching out; it seems like a very nice option. If you have any experience building things with it, I’d be interested to hear what you think - one small downside to adopting the framework now is that it seems not much other than Oni2 has been built with it yet (and so there’s more concern about documentation, stability, etc.)

                                                            1.  

                                                              I thought (without having any experience with Revery) that a large part of the appeal was that it compiled to native code? Or by “non-native widgets”, do you mean something else?

                                                              You’re right that it does compile to native code and that’s one of it’s great benefits.

                                                              Some people prefer their apps to have a “native” feel, by which I mean, buttons, input, windows, and other UI elements have the Operating System’s design. This is not what you get with Revery, each app will mostly look the same on each platform.

                                                              I’ve been looking at Revery for a project I’ve been sketching out; it seems like a very nice option. If you have any experience building things with it, I’d be interested to hear what you think.

                                                              At the moment I’ve been mostly playing around with tiny projects while I learn ReasonML. I do really like it, but I have not got the experience with a large project, releasing, or long term maintenance to give all the disadvantages.

                                                              One negative I can give is that I feel I’ve had to learn React to learn ReactReason and Revery. As someone who mostly used Vue before rather than React this has added an extra hurdle.

                                                            2. 1

                                                              ReasonML is an absolute pain to setup on a new machine. I wish you luck if you follow that path.

                                                              1. 3

                                                                What setup are you using? It seems to be as easy as doing:

                                                                sudo apk add reason

                                                                on alpine

                                                                1. 3

                                                                  I didn’t come across any issues when I did it a few months ago. Granted, I’m on MacOS so I couldn’t say if this experience is different on Linux.

                                                                  1.  

                                                                    Maybe I should try again. Last time I tried to install anything with ML on the bottom, it left junk all over my computer.

                                                                  2. 1

                                                                    Can you say more? I’ve been playing around with ReasonML and haven’t had any trouble getting going (at least, on Linux - I can’t speak to other OSes).

                                                            1. 4

                                                              And here I thought the real objection to SPIR-V was entirely nontechnical. From the 2019-12-09 meeting minutes:

                                                              Apple is not comfortable working under Khronos IP framework, because of dispute between Apple Legal & Khronos which is private. Can’t talk about the substance of this dispute. Can’t make any statement for Apple to agree to Khronos IP framework.

                                                              I’m not a lawyer, but given the fact that the Khronos IP framework amounts to “you agree not to sue/press copyright against people who implement this spec, and gain the same benefit”, and given that Apple is apparently fine with the standard being owned by W3C which has basically the same IP provisions… I can only conclude that this whole damn pile of BS is happening because Apple is already in the process of suing/threatening to sue Khronos over something in or related to SPIR-V.

                                                              1. 1

                                                                Ohhhhh- that explains a lot. I was wondering what the value of a language strictly isomorphic to spir-v was, over just spir-v. Sucks that it has to go that way, but it’s probably the best option then.

                                                              1. 2

                                                                One thing that I like about Go is that it has a specification and multiple implementations. This makes me a little sad, even if it was implementing a much older version.

                                                                I’m starting to do some work in Rust and I feel like it would do well to have a specification. It constantly feels like a moving target, IMHO.

                                                                1. 2

                                                                  That’s part of the reason I like d.

                                                                1. 5

                                                                  Do you also have a otf or ttf version available? I am working on a project where this font could be really usefull :)

                                                                  1. 2

                                                                    It’s a bitmap.

                                                                    1. 6

                                                                      You can wrap bitmap fonts in a TTF, so the actual bitmap is used at specific point sizes, and the other sizes are naively scaled. I don’t know, myself, how to do this, but I’ve seen it done.

                                                                      1. 3

                                                                        The tools Tilman made for Terminus TTF might be useful.

                                                                  1. 4

                                                                    What is MorphOS? Not entirely clear.

                                                                    1. 1

                                                                      Whatever phone I get I’d need to be “officially supported” by apps like Netflix, my bank’s app, my airline’s app, and so on.

                                                                      It seems the only option if I don’t want Google is an iPhone

                                                                      Given that first constraint, your assumption is correct. The iPhone 8 or newer should be supported for a while yet. There’s an unpatchable bootrom exploit in everything up to and including the X, so you should be able to jailbreak those forever if that’s something you’re interested in. If you’d rather have a more secure phone at the expense of a little bit of customization, you’ll need an XS or newer.

                                                                      1. 1

                                                                        Also, if you want to use 3-d touch/force touch (which, imo, is amazing), don’t get the XR or anything newer than the XS.

                                                                        1. 2

                                                                          iOS 13 made force touch significantly less useful (many things are activated by long press instead of force touch now). Kinda annoying how they took away a feature in an OS “upgrade”…

                                                                      1. 2

                                                                        It’s invite only

                                                                        Interestingly, not 100% true. I registered without an invitation during the april 1st phpBB prank. I wonder how many other people did that, too…

                                                                        1. 3

                                                                          28, they appear in the invite tree as invited by me. If you click from your user profile to the invite tree it’s sorted temporally, so it’s the names directly above and below yours.

                                                                          Four were banned within a month. Three of them were phpBB spambots (Google turned up their spam messages on real phpBB forums) and one was an aggressive content marketer who registered several sockpuppets to push his work to the front page. He was so delighted by the traffic that he pretended to be a new user seeking an invite on Twitter, created a new voting ring, was banned again for it, then repeated that process once.He tried unsuccessfully to convince me via Twitter DM that it was someone else’s fault, that he wouldn’t do it again, etc. but after a while accepted that he’d just get banned again and wandered off.

                                                                          1. 1

                                                                            april 1st phpBB prank

                                                                            I never heard of this, do you have a link or can explain what it was? Would really appreciate it!

                                                                            1. 2

                                                                              I think it was two years ago where as an April fools prank lobste.rs was re-themed into a phpBB board, and as it seems, it was possible to get free invites this way.

                                                                              Edit: Here’s a screenshot of how it looked like.

                                                                              1. 3

                                                                                I really miss the days of proper forums instead of these threaded-upvote-downvote link aggregators and social media websites dominating.

                                                                                1. 3

                                                                                  We are actually running a political party on one of these: https://forum.pirati.cz/ :-D

                                                                                  It’s not ideal, the threaded discussions tend to move the most frequent opinions upwards, which leads to a more proportional representation.

                                                                                2. 1

                                                                                  Ah, very cool! I thought they had added implemented some phpBB security flaw that let visitors escalate their privileges … :-)

                                                                            1. 14

                                                                              Submitted title editorializes, the original title is “30 Days in the Hole”.

                                                                              I’d prefer a more neutral title, such as “Eric Raymond writes about how he refactored the GCC Git repository”.

                                                                              1. 5

                                                                                I don’t think ‘refactored’ is quite the right word; maybe ‘…about the challenges of converting GCC’s source repository from svn to git’?

                                                                              1. 8

                                                                                This might be a good place to ask:

                                                                                • What is the BSD equivalent of the ArchWiki?
                                                                                • What is the usability tradeoff between Docker and Jails?
                                                                                • In what ways (if at all) can users contribute their own ports and make them available to other users?
                                                                                • How is BSD for gaming these days?

                                                                                These are genuine questions because I have pretty little clue about the BSD world. Would be cool if somebody with experience could share some insight. :)

                                                                                1. 6

                                                                                  What is the BSD equivalent of the ArchWiki?

                                                                                  The handbook (which, incidentally, is very good).

                                                                                  In what ways (if at all) can users contribute their own ports and make them available to other users?

                                                                                  There’s not terribly good tooling for unofficial ports. They can be done, and have been done, but generally this will take the form of a whole alternate ports tree with a couple of changes.

                                                                                  How is BSD for gaming these days?

                                                                                  The main person working on this is myfreeweb (actually, I think he uses lobsters, so maybe he can say better than I can)–see here. The answer is ‘not great’, but also close to ‘quite good’. There is excellent driver support for nvidia and AMD GPUs. You can run most emulators natively. However, if you want to use wine, you will probably have to compile it yourself, because the versions in ports come in 32-bit-only and 64-bit-only varieties (no, they can’t co-exist), and you almost certainly want the version that can run both 32-bit and 64-bit apps. There is a linux emulator, but it can’t run steam (I did some work to try to get it running a while back, but it needs some work on the kernel side, which is too much commitment so I gave up on it), limiting its usefulness.

                                                                                  1. 2

                                                                                    Thanks! Do you know if there’s an easier way to contribute to the handbook than to write suggestions to the mailing list? Do you know if small user-to-user tips (for instance for rather specific hardware fixes) are allowed on the handbook? If not, where would those end up?

                                                                                    1. 2

                                                                                      @myfreeweb tags them with an email notification. If you’re replying to that person, leave off the @ so they don’t get hit with two emails for reply and @ mention notifications.

                                                                                      1. 1

                                                                                        I’m not really working on gaming all that much, the last really “gaming” thing I did was a RetroArch update (that still didn’t land in upstream ports…) For gaming, I usually just reboot into Windows.

                                                                                      2. 2

                                                                                        How is BSD for gaming these days?

                                                                                        I’d say the biggest effort is being undertaken by the openbsd_gaming community. A good starting point is the subreddit, then you can follow the most active members on Twitter or Mastodon to get more updates

                                                                                        1. 2

                                                                                          In what ways (if at all) can users contribute their own ports and make them available to other users?

                                                                                          1. You can submit a new port, e.g. https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=238584
                                                                                          2. You can update an existing port, e.g. https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=241769
                                                                                          3. You can set up a custom category that contains your additions to the ports tree (I have not tried this…), e.g. https://www.amoradi.org/2019/11/12/maintaining-port-modifications-in-freebsd.html
                                                                                          4. You can set up a poudriere build system to build your own packages from the ports tree, e.g. with non-standard settings (it’s harder to pronounce than do…), e.g. https://www.digitalocean.com/community/tutorials/how-to-set-up-a-poudriere-build-system-to-create-packages-for-your-freebsd-servers then use portshaker to merge it with the standard tree within the poudriere hierarchy, e.g. https://github.com/hartzell/freebsd-ports.

                                                                                          I’ve found building packages for the ports that I want, the way that I want and then installing/upgrading them with pkg is a much smoother experience than trying to install directly from ports and then upgrade using one of the ports management tools.

                                                                                          1. 1

                                                                                            Thanks for the answer. You seem quite knowledgeable. How do people share build scripts for software that may not be shipped in binary form but that you can build yourself locally if you have the data? I’m thinking about some NVIDIA projects (like OptiX) or some games. Basically, is there an AUR for FreeBSD anywhere? I checked your links and obviously ports can be shared amongst users but I’m just curious whether there’s an index for those user-contributed ports anywhere.

                                                                                            1. 2

                                                                                              Sorry for the delay, missed your reply/question.

                                                                                              I’m not familiar with AUR, but assume you mean the Archlinux User Repository.

                                                                                              I don’t know of anything similar in the BSD world. At the least-automatically-shared end, people write software that works on the BSD’s and distribute it with instructions on what it needs. At the most-automatically-shared end, people contribute “ports” to the FreeBSD Ports tree. Automation oriented folks like me end up with their own collection of ports that explicitly rely on the FreeBSD Ports tree. I don’t know of anything that formalizes either the discovery of, or dependence on, other people’s personal ports. It hasn’t ever been an issue for me.

                                                                                              1. 1

                                                                                                Alright, makes sense. Thanks

                                                                                          2. 1

                                                                                            I ran into a thing just yesterday - jails (can) get an IP of their own, which seems to be automatically added to the host’s interface, but they do not (and afaik cannot) get their own MAC. This is FreeNAS for me (with iocage) and this is a little annoying because my fritzbox router seems to have a problem with port forwards now. But maybe I’m wrong and just haven’t solved in properly.

                                                                                            In this case with docker at least would be possible to just use PORTS/EXPOSE and use the host’s main ip.

                                                                                            Apart from that I’ve never encountered problems with jails and found them really smooth to work with.

                                                                                            1. 2

                                                                                              You can give a jail a whole virtual network interface (epair/vnet) and then bridge it or whatever. You can also just use the host’s networking if you don’t need to isolate networking at all for that jail.

                                                                                              1. 1

                                                                                                thanks, that’s a good term to search for. I’m just a little surprised it (suddenly) doesn’t work anymore in my setup. My research so far has proven inconclusive with a lot of people saying that it can’t be done (in version X)