|
sb hermit posted:The best thing about templates in C++ in the late 90s is trying to decode compilation errors It's the same with msvc versus clang and it's kind of a pita if you work on a project with a mix of target platforms using msvc and platforms using clang. Everytime I do template stuff i fully expect the CI to scream at me about the clang platforms being broken. One of the reason is that clang parses templates as soon as you declare them. If you write for instance a declaration whose type is T::butt, since the compiler doesn't know T while parsing the template, it doesn't know whether T::butt is a type or a member function or a variable or what, so parsing fails. You are supposed to write "typename T::butt" in this case, which is kind of ugly but is the only way to tell the compiler "T::butt is meant to resolve to a type". Msvc however doesn't need this, because it defers parsing template when you actually use them, at which point it doesn't need that explicit hint to know what T::butt is. Another thing is that for the same reason, anything you use inside of templates must be declared before the template itself in clang, and in msvc it's fine not to do so as long as it's defined before you instantiate the template. Msvc basically tolerate code that isn't supposed to compile because of less rigorous handling of templates. It also have its downside, like you write a bunch of template code and it compiles fine and then you start actually using it and it turns out to be choke full of dumb mistakes Zlodo fucked around with this message at 09:49 on Jul 18, 2022 |
# ? Jul 18, 2022 09:41 |
|
|
# ? Apr 28, 2024 14:13 |
|
Sapozhnik posted:Anybody who claims to be able to bash out syntactically correct code involving generics on the first attempt is a filthy liar in Rust i can do syntactically correct 😎 just not semantically correct
|
# ? Jul 18, 2022 10:45 |
|
Zlodo posted:It's the same with msvc versus clang and it's kind of a pita if you work on a project with a mix of target platforms using msvc and platforms using clang. Everytime I do template stuff i fully expect the CI to scream at me about the clang platforms being broken. this is like the asp.net MVC view templating (aka razor templates) where they are explicitly strongly typed to a model but don't get compiled/processes until called so you can write something that looks valid then get a crash on calling it because of idk a null check or whatever. Not helped that visual studio is a bit erratic about whether it will or will not highlight errors. at least view template changes can be made on the fly though
|
# ? Jul 18, 2022 11:00 |
|
MrQueasy posted:I don't think this is that hard in a language that does it well and simply, like Kotlin. code:
|
# ? Jul 18, 2022 11:50 |
|
MrQueasy posted:I don't think this is that hard in a language that does it well and simply, like ... Haskell type Lens s t a b = forall f. Functor f => (a -> f b) -> s -> f t yes I know, I know, using kmett is cheating
|
# ? Jul 18, 2022 11:53 |
|
I'm s t a b
|
# ? Jul 18, 2022 12:18 |
|
Me? I'm Lord Rhaskell, and these are my esteemed cousins D. Functor and Mo 'Nads - we're here to collect on your gambling debts.
|
# ? Jul 18, 2022 12:55 |
|
This is what happens when you can't pay off your technical debt
|
# ? Jul 18, 2022 14:12 |
|
Zlodo posted:It's the same with msvc versus clang and it's kind of a pita if you work on a project with a mix of target platforms using msvc and platforms using clang. Everytime I do template stuff i fully expect the CI to scream at me about the clang platforms being broken. This is called 2 phase name lookup and MSVC finally started being standards compliant in 2017* * Behind an experimental switch
|
# ? Jul 18, 2022 15:55 |
|
gonadic io posted:This is what happens when you can't pay off your technical debt incorrect, you sell it as a collateralised technical debt obligation
|
# ? Jul 18, 2022 16:01 |
|
Powerful Two-Hander posted:incorrect, you sell it as a collateralised technical debt obligation aka a dependency injection framework
|
# ? Jul 18, 2022 21:16 |
|
Powerful Two-Hander posted:collateralised technical debt obligation
|
# ? Jul 18, 2022 22:16 |
|
I cannot take credit for this, like all good posters I stole it https://twitter.com/PHP_CEO/status/765298072691806209?t=wCMLGE3-YockKSQyOo_2Ng&s=19 I can take credit for popularising it at work though
|
# ? Jul 18, 2022 23:30 |
|
Zlodo posted:One of the reason is that clang parses templates as soon as you declare them. If you write for instance a declaration whose type is T::butt, since the compiler doesn't know T while parsing the template, it doesn't know whether T::butt is a type or a member function or a variable or what, so parsing fails. You are supposed to write "typename T::butt" in this case, which is kind of ugly but is the only way to tell the compiler "T::butt is meant to resolve to a type". this does seem like one of those things that should be standardized, but i guess the c++ committee were too busy fighting culture wars or something that day
|
# ? Jul 19, 2022 04:04 |
|
It is standardized. Shocking exactly noone, MSVC is not compliant.
|
# ? Jul 19, 2022 16:59 |
|
Xarn posted:It is standardized. Shocking exactly noone, MSVC is not compliant. it's a lot better than it used to be and they now keep up with the standards vs the old days where they took something like 15 years to add c99 support and they didn't have full c++11 support until well after c++14 was out. it still has it's weird quirks though, probably to deal with bad legacy code that would break if they actually fixed them and avoid the subsequent whining from windows-brained graybeards
|
# ? Jul 19, 2022 17:18 |
|
I think I got one of the release copies of J++. I remember it being far better than any other Java IDE at the time. To think that Microsoft could have made a ton of money off of Java tooling if the execs just played nice and not attempt the classic Microsoft extend and extinguish strategy.
|
# ? Jul 19, 2022 18:21 |
|
sb hermit posted:I think I got one of the release copies of J++. I remember it being far better than any other Java IDE at the time. There's probably a parallel universe where desktop java was successful enough that it didn't matter what os people used and windows lost
|
# ? Jul 19, 2022 20:26 |
|
as a client application language java was worthless without j++. it was either let microsoft take over the language and provide extensions to make it useful on the one client OS that matters OR kick microsoft out of java and resign the language to server side only.
|
# ? Jul 19, 2022 20:37 |
|
Shaggar posted:as a client application language java was worthless without j++. it was either let microsoft take over the language and provide extensions to make it useful on the one client OS that matters OR kick microsoft out of java and resign the language to server side only. yeah well for client applications, we still didn't do that, just with javascript this time
|
# ? Jul 19, 2022 20:39 |
|
"Polyphemus what happened who has committed this code?" "Nobody! Nobody has committed this code!" *Sigh* "I'll mark this as blocked shall I?"
|
# ? Jul 20, 2022 08:27 |
|
Shaggar posted:as a client application language java was worthless without j++. it was either let microsoft take over the language and provide extensions to make it useful on the one client OS that matters OR kick microsoft out of java and resign the language to server side only. meanwhile, the developer behind 'druid', one of a million half-finished UI crates for Rust, wonders why people aren't adopting it even though they've rewritten the core multiple times in a breaking way. (to be fair: he has a ton of really interesting ideas on UI toolkit development, it just never seems to go anywhere super concrete).
|
# ? Jul 20, 2022 08:58 |
|
Sagacity posted:it's really annoying to see that the only 'good' way of creating fairly lightweight crossplatform UIs is still Qt, after multiple decades. perhaps juce, if you're an audio developer, i guess. if you're not a c++ toucher you're pretty much out of luck. electron is a thing simply because other stuff was worse and that legitimately pisses me off somewhat. doesn't help that smartphones / tablets were thrown into the mix and took a big ol crap on how UIs are designed
|
# ? Jul 20, 2022 09:16 |
|
Sagacity posted:it's really annoying to see that the only 'good' way of creating fairly lightweight crossplatform UIs is still Qt, after multiple decades. perhaps juce, if you're an audio developer, i guess. if you're not a c++ toucher you're pretty much out of luck. electron is a thing simply because other stuff was worse and that legitimately pisses me off somewhat. avalonia looks like it has become really good over the past couple of years jetbrains have been using it for some of their smaller products and those guys know a thing or two about programming
|
# ? Jul 20, 2022 10:29 |
|
champagne posting posted:doesn't help that smartphones / tablets were thrown into the mix and took a big ol crap on how UIs are designed actually phone uis are easy! just make everything really big and minimize the amount of things you put on the screen. anything that users might actually want to use should be hidden behind undiscoverable ui actions (double tap here! swipe there!). the beauty of this approach is that you can just reuse the ui without changes on desktops because they're basically the same as phones
|
# ? Jul 20, 2022 12:07 |
|
Sagacity posted:it's really annoying to see that the only 'good' way of creating fairly lightweight crossplatform UIs is still Qt, after multiple decades. perhaps juce, if you're an audio developer, i guess. if you're not a c++ toucher you're pretty much out of luck. electron is a thing simply because other stuff was worse and that legitimately pisses me off somewhat. the only thing wrong with desktop java these days is that people still remember desktop java 15 years ago
|
# ? Jul 20, 2022 13:57 |
|
Soricidus posted:the only thing wrong with desktop java these days is that people still remember desktop java 15 years ago also applies to non-desktop java
|
# ? Jul 20, 2022 14:13 |
|
Sagacity posted:it's really annoying to see that the only 'good' way of creating fairly lightweight crossplatform UIs is still Qt, after multiple decades. perhaps juce, if you're an audio developer, i guess. if you're not a c++ toucher you're pretty much out of luck. electron is a thing simply because other stuff was worse and that legitimately pisses me off somewhat. im hoping .net maui finally gives us something decent but im not holding my breath. also it would still require a brain to use which rules out all the web "developers" currently working on electron horseshit
|
# ? Jul 20, 2022 14:20 |
|
redleader posted:actually phone uis are easy! just make everything really big and minimize the amount of things you put on the screen. anything that users might actually want to use should be hidden behind undiscoverable ui actions (double tap here! swipe there!). the beauty of this approach is that you can just reuse the ui without changes on desktops because they're basically the same as phones don’t forget to poorly reimplement they native platform UI widgets so all user interactions are jarring and unpleasant
|
# ? Jul 20, 2022 15:24 |
|
GUIs are a very hard problem, we've had them for over 40 years and user expectations keep increasing every time we sort of have a handle on them. It's not difficult to build a toolkit for something like a 320x240 original Apple Mac level of ui, but people expect rather more out of computers these days. Electron sort of solves GUI development but in a very ham fisted way that leans too much on typography concepts for ui layout. But web engines do at least support things like accessibility, bidirectional text, and ideographic text entry, which is more than can be said for a lot of toy frameworks. Sapozhnik fucked around with this message at 05:51 on Jul 21, 2022 |
# ? Jul 21, 2022 05:49 |
|
imo the biggest problem with these gui frameworks is they're all just 'here's how to build a form', not 'here's how to build a studio application'.
|
# ? Jul 21, 2022 06:33 |
|
apple has you covered with the modern and slick gui framework, NSDocument
|
# ? Jul 21, 2022 07:10 |
|
chaosbreather posted:imo the biggest problem with these gui frameworks is they're all just 'here's how to build a form', not 'here's how to build a studio application'.
|
# ? Jul 21, 2022 08:03 |
|
if one of the demos isn't a straight up rich text editor writing to a custom schema with embeddable custom widgets you can move around, and that code doesn't make you want to die, that ui framework is not ready. i've looked and man there isn't a single one that meets the textedit challenge, except web, which has like a dozen pretty good well maintained hugely popular libraries for doing that poo poo, and about 3 actually good ones.
|
# ? Jul 21, 2022 08:34 |
|
yes, that makes sense. the 7 GUI challenges page is also a pretty good one. some libraries are actually trying to implement the challenges to prove they're usable in the real world.
|
# ? Jul 21, 2022 10:07 |
|
chaosbreather posted:if one of the demos isn't a straight up rich text editor writing to a custom schema with embeddable custom widgets you can move around, and that code doesn't make you want to die, that ui framework is not ready. i've looked and man there isn't a single one that meets the textedit challenge, except web, which has like a dozen pretty good well maintained hugely popular libraries for doing that poo poo, and about 3 actually good ones. Even poo poo like avalonia which is moderately mature by new ui framework standards doesn't even have a rich text editor at all and with frameworks that do it's impossible to customize Most toy ui frameworks will never support accessibility/cjk input much less rich text editing so once you need that there's really no comparison. This is an area where nothing comes close to the web and imo really prosemirror and its derivatives are pretty much unparalleled in terms of control of the schema (I think it's the only one that lets you prevent creation of additional paragraphs for example and it's dead easy to make your own widgets)
|
# ? Jul 21, 2022 12:14 |
|
ugh please don’t try to put rich text editing in your apps just don’t you don’t need it
|
# ? Jul 21, 2022 14:21 |
|
cool av posted:ugh please don’t try to put rich text editing in your apps just don’t you don’t need it laugh-cries-emoji in Microsoft Teams
|
# ? Jul 21, 2022 14:24 |
|
chaosbreather posted:if one of the demos isn't a straight up rich text editor writing to a custom schema with embeddable custom widgets you can move around, and that code doesn't make you want to die, that ui framework is not ready. i've looked and man there isn't a single one that meets the textedit challenge, except web, which has like a dozen pretty good well maintained hugely popular libraries for doing that poo poo, and about 3 actually good ones. how does Qt not count?
|
# ? Jul 21, 2022 14:29 |
|
|
# ? Apr 28, 2024 14:13 |
|
champagne posting posted:laugh-cries-emoji in Microsoft Teams at least modern emoji is still plaintext unicode. i'll take that any day over rich text.
|
# ? Jul 21, 2022 19:21 |