Xamarin's contiuing barrel of cross-platform, XML-encoding fut the wuckery
-
@blakeyrat IIRC, even in C++ inlining is just a suggestion. The compiler can and will ignore you if it thinks it should.
-
@mrl said in Xamarin's contiuing barrel of cross-platform, XML-encoding fut the wuckery:
4 buttons, list of scrollable items below. Items have 4 properties displayed (square of correct color (bool), name (string), category (enum), checkbox (bool)). Clicking on item shows 5th property. Right click opens edit view.
I'd maybe make the template for the list its own file, or a full-on view or control, depending on how complex it is.
@mrl said in Xamarin's contiuing barrel of cross-platform, XML-encoding fut the wuckery:
It starts simple, list of items. Then I want something lined up to the right edge. Oh, I remember that attribute from hour ago, it's the obvious Container.TextDisplayAlignText=TextAlignessNotLeft. Oh, it doesn't work in this container. Google... must be in grid. Now that other thing is not stretched. No problem, just width=*. Oh, it's ignored, nothing stretches in this control. Google... must be in grid. Ok, now everything takes a lot of space... TextStretching=NotStretching? No. ShiftThingsToLeft=True. No. Google... only stack panel does that.
And yet it's better at that than anything web-based is. Everything about alignment is pretty trivial with grids; you might have some padding columns or something, but for the most part it's very rare to need anything else for that.
@mrl said in Xamarin's contiuing barrel of cross-platform, XML-encoding fut the wuckery:
Funny (not) thing is, I still want to learn it. Got any pointers?
I don't have a lot, honestly. I learned it on the job from people far more talented than me, who had already established some good stuff. And my experience is mostly with WPF. I think my thread here is called 'Doing MVVM properly" or something... but I can never remember it. The gist of it is that you can set things up so your views bind to your viewmodels pretty much automatically, and then not think too much about setting all that up ever again. As opposed to the PRISM style of using weird PRISM methods every three lines and hiding all your code that does things.
-
@lorne-kates said in Xamarin's contiuing barrel of cross-platform, XML-encoding fut the wuckery:
Instead, on SOME properties of SOME controls, you would do binding like this:
<Label Text='{Binding ItemName}' />
Why the different syntax? I mean, sure the project started life as it's own non-VS thing-- but it's been YEARS since it's been rolled into Visual Studio. Surely using the convention Visual Studio developers are already used to would be-- you know-- smart.
That's because that is the binding syntax people use when doing data binding in WPF XAML.
As for why they do this for XAML... I have no idea.
-
@benjamin-hall said in Xamarin's contiuing barrel of cross-platform, XML-encoding fut the wuckery:
@blakeyrat IIRC, even in C++ inlining is just a suggestion. The compiler can and will ignore you if it thinks it should.
Yes, inclining is the compiler's job.
Back in the C days when compilers were dumb theinline
keyword was used for this but nowadays it's basically ignored, unless you go with__forceinline
or whatever the magic incantation is. Whatinline
will do, semantically, is allow the same symbol to be declared multiple times as long as the one definition rule is obeyed.
-
Just a (hopefully) helpful note.... If you are doing WPF (or any related UI) then I highly recommend doing serious research on the work by Billy Hollis. The stuff is simply amazing, but it takes time to get through. I have listened to at least 20 hours of his presentations -LIVE, plus countless recordings and readings - even after that much time I sill find more useful tidbits upon review.
-
@blakeyrat said in Xamarin's contiuing barrel of cross-platform, XML-encoding fut the wuckery:
@pie_flavor said in Xamarin's contiuing barrel of cross-platform, XML-encoding fut the wuckery:
I mean that they're not stored as an object. If an inline method takes a closure, then the closure is inlined to the method the same way the method is inlined to the caller. So you can be extremely expressive with zero run-time cost.
Inlining is the compiler's job. There's no manual control of it at all in C#, AFAIK.
I doubt the CLR JIT can inline closures. That and reified generic parameters are the only reason you'd need inlining in Kotlin.
It's especially helpful with methods that are so damn useful you want to use them everywhere. Like theapply
extension method, for instance - it takes a closure withthis
as the parameter and returnsthis
, for inserting a void method call into a chain call. Or theuse
method which does the same thing but as try-with-resources. It wouldn't take much extra even if you weren't inlining it, but if it's always inlined, then you can use it everywhere for free and make your code very pretty.
-
Miguel de Icaza is a dangerous lunatic, that much was clear in his Ximian days already.
-
@pie_flavor said in Xamarin's contiuing barrel of cross-platform, XML-encoding fut the wuckery:
Because @blakeyrat is known for not caring who's at fault for a particular problem and just blaming whatever layer he finds it in.
n
-
@pie_flavor said in Xamarin's contiuing barrel of cross-platform, XML-encoding fut the wuckery:
Basically, there's almost no reason to be using Java
Correct.
-
@pie_flavor said in Xamarin's contiuing barrel of cross-platform, XML-encoding fut the wuckery:
when actually it is ASP.NET which is the special one and everything else which uses XAML.
Everything else is dumb and Microsoft "sells" Xamarin as "Just like .Net but for mobilez", so they are setting that expectation.
@pie_flavor said in Xamarin's contiuing barrel of cross-platform, XML-encoding fut the wuckery:
If you don't like it, write the app in HTML and JS.
No, YOU shove a cactus up your urethra.
-
@mrl said in Xamarin's contiuing barrel of cross-platform, XML-encoding fut the wuckery:
Compile, no error, run, no error, click, cryptic exception from deep bowels of the framework. Binding is wrong. Maybe.
{twitch} Thanks for the PTSD there. Yeah, apparently "compile-time structure checking" iz just too hard. Even though you have the power of Intellisense RIGHT THERE.
If only there were some way of DEFINING the SCHEMA of an XML layout
bolded text
-
@pie_flavor said in Xamarin's contiuing barrel of cross-platform, XML-encoding fut the wuckery:
Heck, you can even inline operator overloads.
Heck, you can even store propane tanks ONTOP of the barbeque, and they'll protect you from your neighbour's nailgun!
-
@mrl said in Xamarin's contiuing barrel of cross-platform, XML-encoding fut the wuckery:
Where can I find good ones?
You can find plenty of guides right on Xamarin's site... owait, I think I touched on that.
-
@magus said in Xamarin's contiuing barrel of cross-platform, XML-encoding fut the wuckery:
Everything about alignment is pretty trivial with grids;
Bullshit. Line up an arbitrary (ie: databound list) number of items, stacked horizontally.
Of course a ListView isn't intended to display things horizontally without some serious nested controls.
BTW: The "don't use the Grid for this" is only on that one forum discussion. It isn't on either the UI documentation, or the developer's API guide, although maybe GridLayout will work. Except the GridLayout seems to be Android-specific. Just like the GridView is. And if you search for help on any of these THREE FUCKING SIMILARLY NAMED GRID-THINGS, you'll end up getting the wrong information, because you'll probably end up on a forum where someone is asking about a "Grid View" (ie: a view where they use Grid, and not a GridView, the specific type of object). And you won't know until you're halfway through the thread because no one is using the right terminology.
And even then, you'll end up finding out the Grid-anything doesn't do what you need it to do, because none of them are dynamic. And in fact, most of them you have to EXPLICITLY DEFINE EACH COLUMN and EXPLICITLY ADD ITEMS TO EACH COLUMN-- as in Grid.Add(Item, RowIdx, ColumnIdx).
Unlike, say, a .Net GridView, which you give a datasource, and it'll generate a row for every item, and any number of columns you want.
-
@lorne-kates said in Xamarin's contiuing barrel of cross-platform, XML-encoding fut the wuckery:
@pie_flavor said in Xamarin's contiuing barrel of cross-platform, XML-encoding fut the wuckery:
when actually it is ASP.NET which is the special one and everything else which uses XAML.
Everything else is dumb and Microsoft "sells" Xamarin as "Just like .Net but for mobilez", so they are setting that expectation.
You are equating ASP.NET with .NET. They are setting that expectation for you. People who are used to application development, however, know that it's XAML in WPF and XAML in UWP, and would expect Xamarin to use XAML as well. It'd be like if I was expecting JSP syntax to work in Android's XML system. They're two completely different technologies, and especially in your case you've got the wrong idea of which one is dominant.
@pie_flavor said in Xamarin's contiuing barrel of cross-platform, XML-encoding fut the wuckery:
If you don't like it, write the app in HTML and JS.
No, YOU shove a cactus up your urethra.
Generally I'd use 'fuck a cactus'. I'm trying to figure out which is better.
-
@lorne-kates Yes, yes, WHAAARGARBL! indeed.
You are correct, grids don't deal with arbitrary numbers of things, and in the case of arbitrary numbers of things, positioning can sometimes be odd. ItemsControl variants are pretty good, though.
@lorne-kates said in Xamarin's contiuing barrel of cross-platform, XML-encoding fut the wuckery:
Unlike, say, a .Net GridView, which you give a datasource, and it'll generate a row for every item, and any number of columns you want.
That's because that isn't what grids are for. You're mixing frameworks again. Seriously, if you assume that something in one UI framework will work the same as something in another one, you're just asking to be disappointed.
Now, there are also DataGrids, which are the bindable version of grids. Which is great, except you're using the broken, partially implemented version of XAML. So have fun.
-
@dkf said in Xamarin's contiuing barrel of cross-platform, XML-encoding fut the wuckery:
@carnage said in Xamarin's contiuing barrel of cross-platform, XML-encoding fut the wuckery:
"Lets take all the best parts of every other language…"
There were probably important bits that they missed. There's a tremendous amount of subtlety to language design, and many bits that look like they're totally ignorable to start with turn out to be actually critical. (I've no specific knowledge of anything missing, of course — I've not studied Kotlin in any depth — but I really doubt that the best bits can all work together because I understand the deeper end of some of the tradeoffs…)
Yeah, they did have to skip items on the wish list, but it is a really nice language, and it feels mostly coherent. I remember parts of it did not feel coherent when I first started using the language, but I can't remember what now. And the language is surprisingly discoverable. When you want to do something new, trying what seems logical is usually the way it's supposed to be done.
If you do java development, you really should try kotlin. It's simply better, and can make use of all of javas libraries and platforms.
Now I sound like an evangelist, which I am not.
-
This post is deleted!
-
@pie_flavor said in Xamarin's contiuing barrel of cross-platform, XML-encoding fut the wuckery:
@powerlord said in Xamarin's contiuing barrel of cross-platform, XML-encoding fut the wuckery:
Also, generics are still type erased in Kotlin.
Comes with the platform. I don't know how Ceylon does it, but I'm pretty sure it's not performant.
I am quite confident is is more performant. It takes some work up-front (I don't know whether they do it at compile-time or class load-time), but then it eliminates some casts and lets the JIT optimise each monomorphisation for its specific uses.
The reason for type-erased generics is compati(de)bility with plain Java libraries that use the type-erased generics in their interfaces. Because reified generics are necessarily separate classes from the polymorphic ones (.NET introduced a separate generic version of everything in 2.0)
-
@topspin said in Xamarin's contiuing barrel of cross-platform, XML-encoding fut the wuckery:
Back in the C days when compilers were dumb the inline keyword was used for this but nowadays it's basically ignored
That's what everyone says, but last time I checked by looking at the (optimized) disassembly, both Apple clang and VS C++ very much took the "inline" keyword seriously. In fact, even member functions defined inside the class definition itself (which per spec should be implicitly treated as
inline
IIRC) were only actually inlined iff explicitly declaredinline
with the keyword.
-
@pie_flavor said in Xamarin's contiuing barrel of cross-platform, XML-encoding fut the wuckery:
Generally I'd use 'fuck a cactus'. I'm trying to figure out which is better.
If you can't figure out if you like cactus-fucking or urethra-shoving better, then maybe you should go to Amazon and buy yourself a TENS machine, and a guide on sounding.
-
@magus said in Xamarin's contiuing barrel of cross-platform, XML-encoding fut the wuckery:
That's because that isn't what grids are for. You're mixing frameworks again. Seriously, if you assume that something in one UI framework will work the same as something in another one, you're just asking to be disappointed.
.Net is better than Xamarin
Nuh-uh! Layout in web is shit. But XAML is so much better, like with grids!
{explains why .Net is better at grids, and why XAML is shit at them}
Oh sure, if you're going to actually compare the frameworks, XAML looks like shit. But if you don't compare XAML to anything else, XAML is the best!
-
@lorne-kates said in Xamarin's contiuing barrel of cross-platform, XML-encoding fut the wuckery:
.Net is better than Xamarin
Part of the problem we have is this makes no goddamned senses, since Xamarin is .NET exactly as much as ASP.NET (which is what you seem to be meaning when you type ".NET" but I'm by no means certain of that) is.
Your statement is like "Toyota is better than Japanese cars" which makes no sense because Toyotas are Japanese cars.
If your gripe is Razor vs. XAML, maybe you should actually call these technologies by their actual names instead of making up your own names which just confuses everything everywhere.
I mean you're a fucking software developer, how the hell do you use software if you're not capable of precisely naming things?
-
@blakeyrat by rotebolded text****
-
@blakeyrat said in Xamarin's contiuing barrel of cross-platform, XML-encoding fut the wuckery:
I mean you're a fucking software developer, how the hell do you use software if you're not capable of precisely naming things?
Point and click.
-
@lorne-kates Yeah all those widgets have names, too. I suppose you call them "doohickey 27 and whatchamacallit 8"
-
@blakeyrat said in Xamarin's contiuing barrel of cross-platform, XML-encoding fut the wuckery:
@lorne-kates Yeah all those widgets have names, too. I suppose you call them "doohickey 27 and whatchamacallit 8"
Even I don't use whatchamacallit 8 anymore, luddite. I've switched to whatchamacallit 9.1 ages ago. (I know they're up to whatchamacallit 20 now, but I don't like the new UI).
-
Real men use direct pixel level calls for their UI design, none of these highfaluting frameworks or APIs....
-
@thecpuwizard said in Xamarin's contiuing barrel of cross-platform, XML-encoding fut the wuckery:
Real men use direct pixel level calls for their UI design, none of these highfaluting frameworks or APIs....
I assume there's an npm library for that.
-
@thecpuwizard said in Xamarin's contiuing barrel of cross-platform, XML-encoding fut the wuckery:
Just a (hopefully) helpful note.... If you are doing WPF (or any related UI) then I highly recommend doing serious research on the work by Billy Hollis.
Why? What work did he do?
-
@laoc said in Xamarin's contiuing barrel of cross-platform, XML-encoding fut the wuckery:
Miguel de Icaza is a dangerous lunatic, that much was clear in his Ximian days already.
-
@lorne-kates said in Xamarin's contiuing barrel of cross-platform, XML-encoding fut the wuckery:
@pie_flavor said in Xamarin's contiuing barrel of cross-platform, XML-encoding fut the wuckery:
when actually it is ASP.NET which is the special one and everything else which uses XAML.
Everything else is dumb and Microsoft "sells" Xamarin as "Just like .Net but for mobilez", so they are setting that expectation.
You seem to be conflating ".Net" with "ASP.Net". This is not correct.
-
@masonwheeler said in Xamarin's contiuing barrel of cross-platform, XML-encoding fut the wuckery:
@thecpuwizard said in Xamarin's contiuing barrel of cross-platform, XML-encoding fut the wuckery:
Just a (hopefully) helpful note.... If you are doing WPF (or any related UI) then I highly recommend doing serious research on the work by Billy Hollis.
Why? What work did he do?
He is one of the leaders in design of high quality User Experiences. While he does use many technologies, XAML [WPF] is primary.
Here is a link to an MSDN blog (since apparently a web search is too difficult for you) https://blogs.msdn.microsoft.com/brada/2008/07/07/great-user-experience-example-in-a-business-application/
-
@lorne-kates .NET is better than Xamarin's weird subset. But XAML is part of .NET as well. And you still don't understand that two things with similar names aren't the same thing.
-
XAML, at least in WPF, had a large learning curve. At my first job we actually figured out it was easier to learn it via the XML since it forced you to know what's going on.
I liked WPF not so much for the XAML syntax, but for the MVVM model you're encouraged to use. It actually made me not hate UI development since your code could be actual code and leave a lot of the UI population and manipulation to the binding layer.
-
@thecpuwizard Is there maybe a technology you could use to make high quality user interfaces without requiring listening to 20+ hours of lectures? I got shit to do, man.
-
@blakeyrat said in Xamarin's contiuing barrel of cross-platform, XML-encoding fut the wuckery:
@thecpuwizard Is there maybe a technology you could use to make high quality user interfaces without requiring listening to 20+ hours of lectures? I got shit to do, man.
I believe that the technology is the minor (yet still significant amount of time). I suck at user design. The two best people I know have spent years developing their skills - one of them even went so far as to get a 4 year degree in that area - what makes something both attractive and effective to people - lots of psychology.
Of the people that have watched at least one of his (full length, typically 45-60 minute) videos, nearly all of them "get hooked". Of course they are still the minority of total developers.
-
@thecpuwizard Yeah but if they hadn't made the technology so goddamned difficult to learn and use you'd have a lot more time available to work on the softer skills as you mention.
Imagine what software development would be like if the creators of development tools actually respected their customers' time. It would be amazing.
-
@lorne-kates said in Xamarin's contiuing barrel of cross-platform, XML-encoding fut the wuckery:
@pie_flavor said in Xamarin's contiuing barrel of cross-platform, XML-encoding fut the wuckery:
when actually it is ASP.NET which is the special one and everything else which uses XAML.
Everything else is dumb and Microsoft "sells" Xamarin as "Just like .Net but for mobilez", so they are setting that expectation.
And they fulfill that, you fucking moron. That you're used to web forms is not their problem. This looks and works exactly like fucking WPF and UWP (with a few caveats). It's natural for anyone who's been doing non-web GUIs the better way the past fucking ten years in .NET.
Fuck!
-
@kt_ said in Xamarin's contiuing barrel of cross-platform, XML-encoding fut the wuckery:
the better way
No. XAML is horrible. Lorne's points above about there being no compile-time checking of stuff that should be trivial to check at compile-time are perfectly valid, and these are problems that did not happen with WinForms.
-
@kt_ said in Xamarin's contiuing barrel of cross-platform, XML-encoding fut the wuckery:
non-web GUIs the better way
No.
I already posted several reasons that WinForms was far superior to XAML. XAML is an over complicated mess, I've actually never seen anybody say otherwise. (There's plenty of "yeah it's a mess but if you X it's ok" or "once you learn it it's ok" or "if you abandon the GUI tools and look directly at the XML it's ok" arguments out there.)
-
@blakeyrat said in Xamarin's contiuing barrel of cross-platform, XML-encoding fut the wuckery:
@kt_ said in Xamarin's contiuing barrel of cross-platform, XML-encoding fut the wuckery:
non-web GUIs the better way
No.
I already posted several reasons that WinForms was far superior to XAML. XAML is an over complicated mess, I've actually never seen anybody say otherwise. (There's plenty of "yeah it's a mess but if you X it's ok" or "once you learn it it's ok" or "if you abandon the GUI tools and look directly at the XML it's ok" arguments out there.)
XAML isn't an overcomplicated mess.
There, now you've seen somebody say otherwise.
-
@masonwheeler said in Xamarin's contiuing barrel of cross-platform, XML-encoding fut the wuckery:
No. XAML is horrible. Lorne's points above about there being no compile-time checking of stuff that should be trivial to check at compile-time are perfectly valid, and these are problems that did not happen with WinForms.
That isn't XAML's fault, though. That's the Xamarin implementation. There is compile-time checking elsewhere, especially with
{x:Bind}
-
@blakeyrat said in Xamarin's contiuing barrel of cross-platform, XML-encoding fut the wuckery:
@kt_ said in Xamarin's contiuing barrel of cross-platform, XML-encoding fut the wuckery:
non-web GUIs the better way
No.
I already posted several reasons that WinForms was far superior to XAML. XAML is an over complicated mess, I've actually never seen anybody say otherwise. (There's plenty of "yeah it's a mess but if you X it's ok" or "once you learn it it's ok" or "if you abandon the GUI tools and look directly at the XML it's ok" arguments out there.)
I'd rather deal with the learning curve of XAML than writing a ton of event handlers that all need to call into various state setters. Mostly because it's really easy to forget to add all the right ones when adding new controls. Plus that state management code gets in the way of seeing what's going on. Even if you add methods like "SetFooGroupState" and "SetOverallState", it still turns into a mess.
Like I said I don't really care about XAML for XAML's sake, but more that it has some sophisticated data binding capability. I have similar opinions about the data binding available for Android apps.
-
@masonwheeler said in Xamarin's contiuing barrel of cross-platform, XML-encoding fut the wuckery:
You seem to be conflating ".Net" with "ASP.Net". This is not correct.
It's close enough. If Microsoft is going to confusingly name all their technologies like that, then fuck them when I mix them up.
Enjoy your ASP.Net Core 2.0 which is newer than .Net 3.5 which actually uses CLR 2.0 which .Net 2.0 used, unless you're replacing it with .Net 4.0 which uses CLR 4.0 because there's no CLR 3.0 or 3.5. If you update to .Net 4.5 or higher you'll still be using CLR 4. I don't know why you would confuse .Net and ASP.Net, given that their version numbers increment in the exact same way, and are released nearly in lock-step with each other. And you absolutely don't want to mix it with ASP.Net Core, which sounds like it's ASP.Net without extensions, but is actually a new version of ASP.Net and has nothing to do with ASP.Net (non-Core), even though ASP.Net Core follows the exact same version numbering of 1.0, 1.1 then 2.0.
And don't forget when you're setting up your ASP.Net 3.5 project that uses .Net Framework to go into IIS and set the App Pool to target .Net Framework v4.0.30319, because v4.0.30319 is actually .Net Framework 3.5 and higher (all the way up to 4.7.1, which is only for Windows 10, unless you install the extension for Windows 7).
So basically you can shove the "lol u shuldn't bee confused" up your tiny brown jewelry box.
-
@blakeyrat said in Xamarin's contiuing barrel of cross-platform, XML-encoding fut the wuckery:
@thecpuwizard Is there maybe a technology you could use to make high quality user interfaces without requiring listening to 20+ hours of lectures? I got shit to do, man.
No.
There also isn't a technology you could use to make high quality user interfaces WITH listening to 20+ hours of lectures.
Web 3.0!
-
@kt_ said in Xamarin's contiuing barrel of cross-platform, XML-encoding fut the wuckery:
This looks and works exactly like fucking WPF and UWP (with a few caveats)
THIS LOOKS AND WORKS EXACTLY LIKE THESE TWO OTHER THINGS EXCEPT FOR ALL THE DIFFERENCES!
-
@masonwheeler said in Xamarin's contiuing barrel of cross-platform, XML-encoding fut the wuckery:
XAML is horrible
Do you mean XAML or XAML? They're two exactly the same different things.
-
@pie_flavor said in Xamarin's contiuing barrel of cross-platform, XML-encoding fut the wuckery:
XAML isn't an overcomplicated mess.
There, now you've seen somebody say otherwise.The opinions of Discodevs don't count.
-
@magus said in Xamarin's contiuing barrel of cross-platform, XML-encoding fut the wuckery:
That isn't XAML's fault, though. That's the Xamarin implementation. There is compile-time checking elsewhere, especially with {x:Bind}
So XAML is great, except for the implementations of XAML, which is Xamarin, which is actually XAML, which is used in the .Net framework that isn't ASP.Net, which is run by Microsoft by Microsoft doesn't make XAML but they push a product that does because it works in their IDE that people who use ASP.Net are used to, except the IDE can't handle XAML because Xamarin didn't implement it right, even though Intellisense is part of Visual Studio (formerly Visual Studio .NET).
Perfectly clear.