Can I borrow an apology?


  • Notification Spam Recipient

    @Gustav said in Can I borrow an apology?:

    into this

    Also, that looks horrific, I wonder what a concrete example of that looks like.


  • Discourse touched me in a no-no place

    @Gustav said in Can I borrow an apology?:

    You're not making a good case for Tk.

    Gridding can do much more complex layouts where you want things to have uniform widths except in several groups and so on. That's great when you need it. This particular example though is just enough messy to be rather verbose to write; it's better served by the packer's model of slicing bits off the edge of a central space.


  • Banned

    @Tsaukpaetra said in Can I borrow an apology?:

    @Gustav said in Can I borrow an apology?:

    into this

    Also, that looks horrific

    It wasn't meant as a real thing, it was an example to demonstrate the concept.

    I wonder what a concrete example of that looks like.

    Whatever you want it to be. DockPanel is super flexible and easy to use, to the point I never feel the need to write the "I didn't test this code" disclaimer.


  • Discourse touched me in a no-no place

    @Gustav said in Can I borrow an apology?:

    DockPanel is super flexible and easy to use, to the point I never feel the need to write the "I didn't test this code" disclaimer.

    But "super flexible" is definitely not compatible with non-testing. At the very least, you'll need more information to say which side to stick to next; that order is critical for the layout. It's probably assuming also that components must fully occupy the space that they are given, which is... not always required. If you hard-code choices for these things then you end up having to have lots of layouts that do almost the same thing except for different hard-coded choices. Is that a win? I don't think so.

    Yet if you make things more flexible then you enable people to make wrong choices. They'll typically be obviously wrong as soon as they do any manual testing, and the code will run fine otherwise; we're not in the realm of type errors, but rather of "this doesn't look like how I wanted it to".


  • Notification Spam Recipient

    @dkf said in Can I borrow an apology?:

    but rather of "this doesn't look like how I wanted it to".

    This was my experience with anything WPF related to the point where I might as well have just done DIV-hell instead for anything that wasn't a toy.


  • Banned

    @dkf said in Can I borrow an apology?:

    @Gustav said in Can I borrow an apology?:

    DockPanel is super flexible and easy to use, to the point I never feel the need to write the "I didn't test this code" disclaimer.

    But "super flexible" is definitely not compatible with non-testing.

    Complicated and highly configurable is not compatible with non-testing. DockPanel is very simple and has barely any configuration. Simple enough and non-configurable enough that you can be very confident your napkin code will work fine. But it's flexible in the sense you can use just this one tool to easily achieve a huge variety of layouts.

    At the very least, you'll need more information to say which side to stick to next; that order is critical for the layout.

    Not sure I get what you mean. The children are ordered. The "next side to stick to" is defined by the next child, if one exists.

    It's probably assuming also that components must fully occupy the space that they are given, which is... not always required.

    The elements are allowed to be smaller than the size allocated to them. They do by default, even. There's also margins and padding (I don't count this as part of DockPanel because these are universal concepts applicable to all elements regardless of layout).

    If you hard-code choices for these things then you end up having to have lots of layouts that do almost the same thing except for different hard-coded choices. Is that a win? I don't think so.

    It's a good thing it didn't do that then, right?

    Yet if you make things more flexible then you enable people to make wrong choices. They'll typically be obviously wrong as soon as they do any manual testing, and the code will run fine otherwise; we're not in the realm of type errors, but rather of "this doesn't look like how I wanted it to".

    Due to how dead simple and unconfigurable (yet flexible!) DockPanel is, it has very low potential for not looking how the dev wanted to. Even window resizing works right out of the box in 99% of cases. Oh my god, I don't miss manually specifying anchored edges on every single thing at all.

    @Tsaukpaetra said in Can I borrow an apology?:

    @dkf said in Can I borrow an apology?:

    but rather of "this doesn't look like how I wanted it to".

    This was my experience with anything WPF related to the point where I might as well have just done DIV-hell instead for anything that wasn't a toy.

    Really? For me it was the exact opposite. WPF was the first - and the last - time I didn't have to spend 4x more time doing tiny corrections after I was already done with the layout itself.



  • @Gustav said in Can I borrow an apology?:

    its infamous long and hard learning curve

    Are you truly claiming, with a straight face, that Rust is not infamous for its intensely difficult learning curve?


  • Banned

    @Mason_Wheeler No, I know very well Rust is infamous for intensely difficult learning curve. I'm claiming that Rust does not have intensely difficult learning curve.



  • @Gustav said in Can I borrow an apology?:

    @Mason_Wheeler No, I know very well Rust is infamous for intensely difficult learning curve. I'm claiming that Rust does not have intensely difficult learning curve.

    It’s infamous for a thing it doesn’t have?

    I think you don’t realise how much smarter you are than many of your cohort who would find Rust unlearnably complicated.


  • Notification Spam Recipient

    @Gustav said in Can I borrow an apology?:

    @Tsaukpaetra said in Can I borrow an apology?:

    @dkf said in Can I borrow an apology?:

    but rather of "this doesn't look like how I wanted it to".

    This was my experience with anything WPF related to the point where I might as well have just done DIV-hell instead for anything that wasn't a toy.

    Really? For me it was the exact opposite. WPF was the first - and the last - time I didn't have to spend 4x more time doing tiny corrections after I was already done with the layout itself.

    Yes. It's too bad I don't have the Hypatia systems working at the moment or I'd show you the abominations that are present in the WPF version of the Master Server main window, which includes four sections (VM list, active levels list, players list, and action log), with a few action buttons/controls in each section to manipulate things in each area.

    Utter nightmare, compounded by the fucking Observable shit that wreaked havoc due to shit reaching into the main thread from other threads because UI. I was so happy I rewrote most of it to throw stuff over sockets and swept the UI into a webpage. (which kinda highlights my WTF experience)



  • @dkf said in Can I borrow an apology?:

    The authors of Go, for all that the language is nasty, have at least demonstrated that they're properly read about the literature on language design.

    Really? One of the strongest and most thorough critiques I've seen of Go claims precisely the opposite.

    In Less is exponentially more, Rob Pike explains that Go was meant to replace C and C++ at Google, and that its precursor was Newsqueak, a language he wrote in the 80's.

    ...

    Go creators deserve a lot of respect, but it looks like Go's design happened in a parallel universe (or their Plan9 lab?) where most of what happened in compilers and programming language design in the 90's and 2000's never happened. Or that Go was designed by system programmers who were also able to write a compiler.

    Functional programming? No mention of it. Generics? You don't need them, look at the mess they produced in C++! Even if slice, map and channels are generic types as we'll see below.

    Go's goal was to replace C and C++, and it's apparent that its creators didn't look much elsewhere.

    -- Go: the Good, the Bad and the Ugly


  • Banned

    @Tsaukpaetra said in Can I borrow an apology?:

    Hypatia

    Oh. That explains a lot.


  • Banned

    @Arantor said in Can I borrow an apology?:

    @Gustav said in Can I borrow an apology?:

    @Mason_Wheeler No, I know very well Rust is infamous for intensely difficult learning curve. I'm claiming that Rust does not have intensely difficult learning curve.

    It’s infamous for a thing it doesn’t have?

    Not the first time, not the last. Have you seen how much shit Rust gets for the existence of unsafe keyword? "Oh yeah, it's such a good language you need to drop back to C to do anything useful with it! Safety my ass!" Nevermind that unsafe doesn't even work that way.

    I think you don’t realise how much smarter you are than many of your cohort who would find Rust unlearnably complicated.

    I thought so too, until I read that article about some uppity college teacher pulling a fast one on a class of Programming Fundamentals 101 students and switching mid-semester from Python to Rust. To my great surprise, the students didn't have much problem with the change.


  • Notification Spam Recipient

    @Gustav said in Can I borrow an apology?:

    @Tsaukpaetra said in Can I borrow an apology?:

    Hypatia

    Oh. That explains a lot.

    To be fair to me, it wasn't my code, I just came in and had to try fixing it so it actually worked as intended. Which I mostly succeeded!


  • Notification Spam Recipient

    @Gustav said in Can I borrow an apology?:

    Programming Fundamentals 101

    I wouldn't expect anything serious from such a class, at that point you're still teaching things like "This is how maths is written in computer land", so it's extremely unlikely anyone will notice hardships with any programming language.

    Well, maybe VHDL would be challenging.


  • Banned

    @Tsaukpaetra said in Can I borrow an apology?:

    @Gustav said in Can I borrow an apology?:

    Programming Fundamentals 101

    I wouldn't expect anything serious from such a class, at that point you're still teaching things like "This is how maths is written in computer land", so it's extremely unlikely anyone will notice hardships with any programming language.

    Rust is fabled to be the most difficult exactly in this particular setting.


  • Notification Spam Recipient

    @Gustav said in Can I borrow an apology?:

    @Tsaukpaetra said in Can I borrow an apology?:

    @Gustav said in Can I borrow an apology?:

    Programming Fundamentals 101

    I wouldn't expect anything serious from such a class, at that point you're still teaching things like "This is how maths is written in computer land", so it's extremely unlikely anyone will notice hardships with any programming language.

    Rust is fabled to be the most difficult exactly in this particular setting.

    Stop tempting me to look! I don't have time for that shit!


  • Discourse touched me in a no-no place

    @Tsaukpaetra said in Can I borrow an apology?:

    @Gustav said in Can I borrow an apology?:

    Programming Fundamentals 101

    I wouldn't expect anything serious from such a class, at that point you're still teaching things like "This is how maths is written in computer land", so it's extremely unlikely anyone will notice hardships with any programming language.

    For teachability, what you really want is for there to only be a small number of symbols, and for those symbols to have very few meanings. At least in the subset being taught. Things like operator overloading, polymorphism, and context-sensitive interpretations all make the learner's life difficult. (And therefore the teacher's life too.)

    It also helps if you are using immutable or copy-on-write values, so there is never any shimmying of stuff out from under people's hands. Shared writable values cause so many bugs, and require the right mental models to comprehend at all. (Those mental models are among the harder bits of learning to program.)



  • @dkf said in Can I borrow an apology?:

    @Gustav said in Can I borrow an apology?:

    Yeah, it boggles my mind how come there's only one UI framework in existence that comes with a half decent implementation out of the box

    I know Tk does that sort of layout directly (it's one of two basic ones that almost all UIs are built out of, along with variations on a theme of gridding). Was that the one you were thinking of, or is "only one UI framework" actually wrong?

    Somewhere on Sourceforge (I suppose it's still there; I haven't touched it in at least a decade and a half, but I never deleted it) there is a never-released project with a quite complicated GUI implemented in Tk. Think of something like an audio mixer, with columns of related sliders, knobs, buttons, text boxes, etc. Each of these columns contains a hidden set of related subchannels which can be revealed if you need to manipulate the individual subchannels. It also contains hidden controls for other properties of the object that can be unhidden if needed. The number of objects, and thus the number of columns in the GUI, is dynamically configurable, and everything adjusts automatically as controls are added, revealed, and hidden.

    I think this was all done using pack, but it might have been grid; it's been so long that I don't remember. Whichever layout method I used, laying out the controls was (once I figured it out) the easiest part of the project, and the GUI all works perfectly (except one fully custom canvas widget I never got around to implementing).

    The code plumbing it all together was a pain. (Perl. :eek: But it doesn't need to be fast — >99% of the program's time is waiting for the meatbag to click the GUI — it's cross-platform, and it was better than the alternative, tcl, in which I am very much not fluent. Or Java; in particular, Java's sliders were ugly AF, while Tk's were exactly what I wanted right out of the box. If I were to pick up the project again, I'd probably use Java for the cross-platform compatibility — not least, avoiding the need to compile and package binaries for platforms I don't have — and bite the bullet of customizing the look of the slider controls, rather than forcing unsophisticated non-programmer users to install perl and Tk.)

    The "business" logic mostly works, too (and, it's thoroughly documented), except that I never finished implementing it. The program's output is a script used by another application. Only a fraction of the program's features are implemented in the export function. The real failing is that only an even smaller subset of the features are implemented in its own configuration save/load functions, so you can generate output that you can't reproduce the next time you run the program.

    I don't remember why I abandoned the project — probably a combination of waning popularity of the application it was targeting, busy real life, and possibly events related to my divorce.



  • @Tsaukpaetra said in Can I borrow an apology?:

    it actually worked as intended.

    Which all of your zero users really appreciated!


  • BINNED

    Not sure if that’s been posted yet:

    https://youtu.be/OvuEYtkOH88?si=U7f5Z_6vhC5wHzJR


  • BINNED

    @Gustav said in Can I borrow an apology?:

    @Tsaukpaetra said in Can I borrow an apology?:

    @Gustav said in Can I borrow an apology?:

    Programming Fundamentals 101

    I wouldn't expect anything serious from such a class, at that point you're still teaching things like "This is how maths is written in computer land", so it's extremely unlikely anyone will notice hardships with any programming language.

    Rust is fabled to be the most difficult exactly in this particular setting.

    By the people who never heard of the endofunctor meme?


  • Notification Spam Recipient

    @HardwareGeek said in Can I borrow an apology?:

    so you can generate output that you can't reproduce the next time you run the program.

    .... :rofl: Oh shit!


  • Banned

    @HardwareGeek said in Can I borrow an apology?:

    @Tsaukpaetra said in Can I borrow an apology?:

    it actually worked as intended.

    Which all of your zero users really appreciated!

    You are one to talk, after that story above.



  • @Arantor said in Can I borrow an apology?:

    centering a dev

    What kind of dev? Web? Backend? Mobile? Full stack? And what are we centering them on? :tro-pop:



  • Damnit guys, can't we discuss anything without someone hijacking the thread to promote Rust for once? 😠






    ...oh wait, this is the Rust thread. Never mind.



  • @Benjamin-Hall said in Can I borrow an apology?:

    And what are we centering them on?

    I'm told a lot of them are self-centered. :rimshot:


  • Discourse touched me in a no-no place

    @Zerosquare said in Can I borrow an apology?:

    Damnit guys, can't we discuss anything without someone hijacking the thread to promote Rust for once? 😠

    ...oh wait, this is the Rust thread. Never mind.

    Even in the Rust thread it should be discouraged.



  • @Gustav said in Can I borrow an apology?:

    @HardwareGeek said in Can I borrow an apology?:

    @Tsaukpaetra said in Can I borrow an apology?:

    it actually worked as intended.

    Which all of your zero users really appreciated!

    You are one to talk, after that story above.

    True, but that project was basically the classic "I made this for myself; maybe somebody else will find it useful, too" FOSS project, but with better documentation and (maybe, if I'd ever made an actual release) better support. I think the last version was maybe 0.3, or something like that.



  • 7c91b023-2835-4bd9-8e54-25c8763642fa-image.png

    I feel like this captures the mood well somehow.


  • I survived the hour long Uno hand

    @Arantor said in Can I borrow an apology?:

    @Gustav centering a dev is easy. Vertically aligning a dev in the middle, there’s the real trick. 🍹

    (Flex does make it a fuck ton easier however.)

    Just keep shrinking the dev’s cubicle until there is no additional space in any direction and the dev will be perfectly centered in all alignments.



  • @izzion said in Can I borrow an apology?:

    centered in all alignments.

    Even extreme ones like Chaotic Evil? Is that simultaneously possible?


  • Banned

    @izzion said in Can I borrow an apology?:

    @Arantor said in Can I borrow an apology?:

    @Gustav centering a dev is easy. Vertically aligning a dev in the middle, there’s the real trick. 🍹

    (Flex does make it a fuck ton easier however.)

    Just keep shrinking the dev’s cubicle until there is no additional space in any direction and the dev will be perfectly centered in all alignments.

    I'd scream "don't give them any ideas!" if my cubicle wasn't already shrunk to that size.


  • BINNED

    @Arantor said in Can I borrow an apology?:

    7c91b023-2835-4bd9-8e54-25c8763642fa-image.png

    I feel like this captures the mood well somehow.

    "There are 5 games written in rust and 50 game engines"


  • BINNED

    @cvi said in Can I borrow an apology?:

    @topspin said in Can I borrow an apology?:

    Now they’re proposing to add linalg. I already use a library for that (Eigen) and a BLAS implementation (MKL), I doubt the 3 major stdlib implementers have the manpower to beat what’s already available.

    It's fortunate that the graphics proposal ended up dead. I think Linalg is more tractable, but there are some parallels. Curious to see where that one is going. My guess is that one or the other (or all) groups of people will discover that the library wasn't designed with them in mind, if it ever makes it into existance.

    So I just watched this talk about std::linalg from nVidia's lead author of the proposal.

    https://www.youtube.com/watch?v=-UXHMlAMXNk

    It seems to be well on track to be included, so I guess the implementation burden isn't insurmountable, it just doesn't really offer anything to me that I don't already get from third party libraries. I'm actually more interested in the C++23 mdspan views it builds upon for interfaces where my needs are simple enough that I don't want to bring in a library.

    This is the motivational slide:
    Bildschirmfoto 2024-01-07 um 00.10.21.png

    Okay, sure, the code on the right hand side is more readable in comparison. But 1) that's an unfair comparison, because the left includes the BLAS function declaration, whereas the right just has include <linalg> instead. You don't write that as a user, you just include <lapack.h> or whatever. I'm pretty sure if the right hand side included the templated function declaration of matrix_product, it would be an unholy mess too. And more importantly 2) being more readable than the Fortran BLAS interface is a fucking low bar. (It passes integers by reference and options are stringly typed, FFS)

    I don't actually find that readable at all without having to look up the documentation. So the first parameter is the execution policy, the last parameter is the output matrix, and the three arguments in the middle are the actual product? What?? :sideways_owl: Well, the thing he wants to compute isn't a product anyway, it's the sum of a (scaled) matrix with a (scaled) product, so I guess the function really is the equivalent of dgemm, i.e. more or less a matrix version of a fused-multiply-add. Perfectly obvious.

    And are they really from the "operator overloading considered evil" camp? This is how I write that code in Eigen: alpha * A * B.transpose() + beta * C



  • @topspin said in Can I borrow an apology?:

    Perfectly obvious.

    Remember, it's C++.


  • Discourse touched me in a no-no place

    @topspin Has C++ added an exponentiation operator yet? Or is that still firmly in the hands of the "operators are EVIL!" crowd?



  • @dkf They didn't, but what would such an operator look like anyway? ^ is already taken up by bitwise XOR.


  • Considered Harmful

    @Deadfast said in Can I borrow an apology?:

    @dkf They didn't, but what would such an operator look like anyway? ^ is already taken up by bitwise XOR.

    Perl uses **



  • @topspin said in Can I borrow an apology?:

    . more or less a matrix version of a fused-multiply-add

    Haven't watched the talk ... but is it able to do any of the fusing/optimizations you would normally want? (I kinda guess "yes", but...)

    And are they really from the "operator overloading considered evil" camp?

    It seems like they want to use std::mdspan instead of defining their own type(s). Overloading operators on std::mdspan would have a bunch of consequences outside of std::linalg.


  • 🚽 Regular

    @LaoC said in Can I borrow an apology?:

    @Deadfast said in Can I borrow an apology?:

    @dkf They didn't, but what would such an operator look like anyway? ^ is already taken up by bitwise XOR.

    Perl uses **

    JavaScript, PHP, Python, ...



  • @Zecc :topper: So what. In C++, you can even use ***.


  • BINNED

    @cvi said in Can I borrow an apology?:

    @topspin said in Can I borrow an apology?:

    . more or less a matrix version of a fused-multiply-add

    Haven't watched the talk ... but is it able to do any of the fusing/optimizations you would normally want? (I kinda guess "yes", but...)

    Not 100% sure, but it looks like the API already provides the fused variants (just like BLAS) and the layer "somebody else" is supposed to build on top has to break it down to use them.

    And are they really from the "operator overloading considered evil" camp?

    It seems like they want to use std::mdspan instead of defining their own type(s). Overloading operators on std::mdspan would have a bunch of consequences outside of std::linalg.

    Yeah, that seems to be the idea. It's cool that the mdspan view is powerful enough that free functions like transpose and scaled apparently (?) just return another mdspan, and I agree that you shouldn't just overload operator+ on that one. But would it really have been that hard to create a class matrix or matrix_view that essentially just contains an mdspan and appropriately overload operators on that one?

    In the end, I'm just not sure who this is for. It's explicitly not for me (he says that if you're already using a library like Eigen, keep using that) and I doubt the implementers of third party libraries will change their code to build on it instead, either. :mlp_shrug:


  • BINNED

    Been looking at another discussion about what people use to build multi-platform desktop apps these days. I idly followed a link to something called Tauri, which promised to be for native, portable desktop apps. With that in mind, I checked out the website.

    Build an optimized, secure, and frontend-independent application for multi-platform deployment

    Built on Rust: With performance and security at the center, Rust is the language for the next generation of apps.

    Cross Platform: Bundle binaries for all major desktop platforms (mobile coming soon).

    Brownfield: Compatibility with any front-end framework means you don't have to change your stack.

    You don't have to change your stack? Nice. Wait a minute, how does that work? And who calls the GUI layer for their desktop app "frontend"?

    Tauri is compatible with almost every frontend stack. Select yours and get started!

    Bundle Size: By using the OS's native web renderer, the size of a Tauri app can be less than 600KB.

    Oh yes, of course. It's not native at all, it's just another electron competitor. Well, to be fair, that wasn't super obvious at first glance from the website (it could be more clear), but I probably just tripped over my own expectations when visiting it.

    Actually, there's a fairly nice overview on YouTube that is super short and succinct. That makes things far more clear than most project descriptions out there:

    https://www.youtube.com/watch?v=-X8evddpu7M

    Tauri. A toolkit for building native desktop apps with frontend web technologies and a lightweight Rust backend.

    It mentions JS in the first sentence, so I'm already set up for disappointment at the very beginning. However, I don't understand how "native desktop apps" comes in here. What's native about that?!



  • @topspin what the fuck is the “OS native web renderer” for anything other than MacOS which has Safari baked in pretty hard? Edge on Windows? What about Linux?

    600KB really isn’t a lot, that would have been acceptable even back in the era of embedding the IE engine into things.



  • @topspin said in Can I borrow an apology?:

    In the end, I'm just not sure who this is for.

    Same.

    It won't replace dedicated small vector/matrix libraries either. Those don't gain much benefit from the kind of optimizations you'd see here, and ergonomics of the library are much more important.

    I guess, I might use it out of convenience if I need to do some one-off linalg but CBA to pull in a third party library? Except that the new stuff has a learning curve, and I suspect that as soon as perf becomes an issue, it's third party library time again.



  • @Arantor said in Can I borrow an apology?:

    @topspin what the fuck is the “OS native web renderer” for anything other than MacOS which has Safari baked in pretty hard? Edge on Windows? What about Linux?

    Edge (Chromium) on Windows, Webkit/Safari everywhere else. Presumably Android would be Webkit/Chrome (via Android Webview).

    Doesn't sound very native to me.



  • @topspin

    C++
    not a pleasant one

    :surprised-pikachu:



  • @boomzilla said in Can I borrow an apology?:

    @Arantor said in Can I borrow an apology?:

    @dkf said in WTF Bites:

    allowing an is_nan() to be defined

    We never define is_grandad() though. I feel this is a missed opportunity.

    pop() is pretty common though. You should be able to use that twice in many circumstances.

    magnitude-4181837100.gif


  • Banned

    @topspin said in Can I borrow an apology?:

    However, I don't understand how "native desktop apps" comes in here. What's native about that?!

    Native as in React Native. As in it's not an external website.


Log in to reply