These are chat archives for AvaloniaUI/Avalonia

31st
Aug 2015
Steven Kirk
@grokys
Aug 31 2015 13:26
:cake: :clap: :shipit:
Nelson Carrillo
@ncarrillo
Aug 31 2015 13:26
aw yea
José Manuel Nieto
@SuperJMN
Aug 31 2015 13:37
Oh my God! I'm so pleased!
José Manuel Nieto
@SuperJMN
Aug 31 2015 13:51
I've spoken aloud in the networks, let's celebrate :D I'm going to drink a capuccino this afternoon
Nelson Carrillo
@ncarrillo
Aug 31 2015 13:52
same, might be worth posting to a .NET subreddit / HN to perhaps get some eyes on the project
as this is a nice milestone
José Manuel Nieto
@SuperJMN
Aug 31 2015 14:23

as this is a nice milestone

That would help us get some more attention

Steven Kirk
@grokys
Aug 31 2015 14:24
already posted to HN: https://news.ycombinator.com/item?id=10146652 - please upvote ;)
will submit to reddit now
get those upvoting fingers out ;) :point_down:
José Manuel Nieto
@SuperJMN
Aug 31 2015 15:31
Go, go, go!
Nelson Carrillo
@ncarrillo
Aug 31 2015 16:30
can't upload on HN, my account is too new I bet. But I upvoted on Reddit
Steven Kirk
@grokys
Aug 31 2015 16:32
thanks!
Nelson Carrillo
@ncarrillo
Aug 31 2015 17:28
I agree with the commenter on the reddit post, the headline is a little confusing. Not sure if we can change it after the fact
José Manuel Nieto
@SuperJMN
Aug 31 2015 17:29
Whoops, it says "cross-platform .NET framework"
Darnell Williams
@Seeker1437
Aug 31 2015 17:29
oooh yeah.... .net not fully cross platform x3
Nelson Carrillo
@ncarrillo
Aug 31 2015 17:30
"cross platform UI framework for .NET"
or even mention XAML in the headline, since it will turn heads
José Manuel Nieto
@SuperJMN
Aug 31 2015 17:32
JMN blushes
Darnell Williams
@Seeker1437
Aug 31 2015 17:32
again this can run on mono too right?
why even mention .Net
Steven Kirk
@grokys
Aug 31 2015 17:33
yeah, sorry dudes
Darnell Williams
@Seeker1437
Aug 31 2015 17:33
"cross platform UI framework similar to the WPF framework"
Steven Kirk
@grokys
Aug 31 2015 17:33
bad title
Darnell Williams
@Seeker1437
Aug 31 2015 17:33
maybe?
XD
Nelson Carrillo
@ncarrillo
Aug 31 2015 17:34
so ReactiveUI tries to load PresentationFramework on non-Windows? :O wtf
Steven Kirk
@grokys
Aug 31 2015 17:34
too late now to change the title. I've written an apology ;)
yeah, ReactiveUI expects WPF if it's running on the .net framework
which mono is btw
at least it's an implementation of the .net framework
Nelson Carrillo
@ncarrillo
Aug 31 2015 17:37
hmm, I always thought ReactiveUI was a PCL..or at least it should be. Do we have a hard requirement on them anywhere?
Steven Kirk
@grokys
Aug 31 2015 17:41
the only hard requirement is in Perspex.Diagnostics, which is why you can get it running on linux currently by removing that
Nelson Carrillo
@ncarrillo
Aug 31 2015 17:41
oh just for the dev tools
Steven Kirk
@grokys
Aug 31 2015 17:41
yeah
i was thinking of using it throughout, but i'm glad i didn't now...
Nelson Carrillo
@ncarrillo
Aug 31 2015 17:42
I think the sample app / dev tools should become their own repo long term
Steven Kirk
@grokys
Aug 31 2015 17:42
yeah, probably
Nelson Carrillo
@ncarrillo
Aug 31 2015 17:42
I'm going to fork reactive-ui and see how far I get , even though there's still an assertion in Mono according to the issue you posted
José Manuel Nieto
@SuperJMN
Aug 31 2015 17:43
maybe you should tell Paul C. Betts
it's the creator of RxUI
Steven Kirk
@grokys
Aug 31 2015 17:43
i've already filed an issue: reactiveui/ReactiveUI#925
José Manuel Nieto
@SuperJMN
Aug 31 2015 17:43
OK! then I'm throwing a word there
Steven Kirk
@grokys
Aug 31 2015 17:43
i was wondering if creating a stub PresentationFramework.dll or something for mono might work
at least as a short-term hack
Nelson Carrillo
@ncarrillo
Aug 31 2015 17:44
yeah I think it will , you can even use type forwarding
Steven Kirk
@grokys
Aug 31 2015 17:44
the only problem i can see would be activating it only on mono
Nelson Carrillo
@ncarrillo
Aug 31 2015 17:44
but it depends on how deep the dependency on PresentationFramework is
Steven Kirk
@grokys
Aug 31 2015 17:44
yeah
José Manuel Nieto
@SuperJMN
Aug 31 2015 17:46
I don't think the dependency is such to be a deal-breaker. It's gonna be a scheduler thing, almost sure
although I'm a total n00b on those topics
Steven Kirk
@grokys
Aug 31 2015 17:46
yeah, i think that's exactly what it is
Nelson Carrillo
@ncarrillo
Aug 31 2015 17:48
soo...I checked around the source code
Lol.
if its as simple as commenting that line out ..
Steven Kirk
@grokys
Aug 31 2015 17:50
worth a try. i'm pretty sure rxui does stuff with Dispatcher too though
IWantsToRegisterStuff lol
If I can get it working by hacking around the code, having a PR ready to merge into ReactiveUI would probably help things out
could be a bug in his #ifdef's too..where only the Theme attribute is really problematic.. and everything else could work
Steven Kirk
@grokys
Aug 31 2015 17:53
yeah, though i'm not sure how easy the nuget integration will be, i.e. installing the correct version depending on platform
Nelson Carrillo
@ncarrillo
Aug 31 2015 17:53
I see some #if MONO in there
Steven Kirk
@grokys
Aug 31 2015 17:53
i think that's only true if running on a xamarin platform
though i could be wrong
Nelson Carrillo
@ncarrillo
Aug 31 2015 17:54
maybe we can define it in Perspex.Mono
if thats the case
idk I'm going to play around after work and see
Steven Kirk
@grokys
Aug 31 2015 17:54
ok, cool
Steven Kirk
@grokys
Aug 31 2015 18:04
and thanks for all your help/support guys!
Nelson Carrillo
@ncarrillo
Aug 31 2015 18:15
sure np , the runtime assertion "is not a valid warning number" seems to be related to a NoWarn entry in the csproj for the projects
Mono guys fixed in master so not worth changing
José Manuel Nieto
@SuperJMN
Aug 31 2015 18:21
@ncarrillo you're a master!
I'm surrounded by masters, oh yeah
that's the way I need to code for life :)
Darnell Williams
@Seeker1437
Aug 31 2015 18:23
Im not a master
Im a pie
Steven Kirk
@grokys
Aug 31 2015 18:23
there's always space for pie
José Manuel Nieto
@SuperJMN
Aug 31 2015 18:24
Lol!
Darnell Williams
@Seeker1437
Aug 31 2015 18:27
Have you ever thought about using asm to optimize this project?
Steven Kirk
@grokys
Aug 31 2015 18:27
nope! :)
Darnell Williams
@Seeker1437
Aug 31 2015 18:27
Would it be a strange idea?
XD
Steven Kirk
@grokys
Aug 31 2015 18:27
well if we were to do such a thing, it would come much later
but i'm not sure how feasable asm is with .net
Darnell Williams
@Seeker1437
Aug 31 2015 18:28
there is a solution out there called IL2CPU
Steven Kirk
@grokys
Aug 31 2015 18:28
that compiles IL into C++ right?
that would be a choice made by the consumer of the lib, not us
Darnell Williams
@Seeker1437
Aug 31 2015 18:29
nope directly to x86 asm
IL2CPP i think is the C++ one
Steven Kirk
@grokys
Aug 31 2015 18:29
ah ok, i was thinking of the one used by Unity3D
Darnell Williams
@Seeker1437
Aug 31 2015 18:30
yes IL2CPP is Unity3D lib

IL2CPU is basically done, writing asm is pretty simple too:

Get length of an array

new Mov { DestinationReg = Registers.EAX, SourceReg = Registers.EBP, SourceIsIndirect = true, SourceDisplacement = 8 };
new Mov { DestinationReg = Registers.EAX, SourceReg = Registers.EAX, SourceIsIndirect = true };
 new Push { DestinationIsIndirect = true, DestinationReg = Registers.EAX, DestinationDisplacement = 8 };
the interpreter outputs an elf, and NASM is used to compile
Steven Kirk
@grokys
Aug 31 2015 18:34
i'm not sure what its effects would be on portability
but maybe when everything is finished and it's all pig slow we might need it ;)
Darnell Williams
@Seeker1437
Aug 31 2015 18:37
ah might not actually be a good solution, you'd have to use a compatible assembler for each platform, right now NASM is x86 and x86_64 compatible, but not ARM compatibe
Nelson Carrillo
@ncarrillo
Aug 31 2015 18:37
I think as much should stay high level as possible, you lose portability
yep
i think maybe some SIMD stuff where it makes sense, if it makes sense
Steven Kirk
@grokys
Aug 31 2015 18:37
yeah, SIMD has a fallback
Steven Kirk
@grokys
Aug 31 2015 18:48
answered!
Nelson Carrillo
@ncarrillo
Aug 31 2015 18:52
agreed extension method the way to go
I love them
Steven Kirk
@grokys
Aug 31 2015 18:52
yeah, i use that pattern all over the place
José Manuel Nieto
@SuperJMN
Aug 31 2015 18:53
hahaha, I'm a fool! How didn't I thought about that before!
I also do, @grokys!
good shot!
Steven Kirk
@grokys
Aug 31 2015 18:53
haha :)
Darnell Williams
@Seeker1437
Aug 31 2015 19:33
tosses a pie in the sky
Nikita Tsukanov
@kekekeks
Aug 31 2015 19:37
Why are you using Cairo? Its pretty simple to draw on GTK window using System.Drawing
Nikita Tsukanov
@kekekeks
Aug 31 2015 19:43
And libgdiplus uses Cairo internally anyway
So Cairo is a less portable solution
Mono also has its own implementation of Windows.Forms which works fine if you are using only windows
Which can eliminate dependency on GTK and allow to write portable backend that relies only on .NET 2.0 or something like that
Nikita Tsukanov
@kekekeks
Aug 31 2015 20:09
You would also have problems with WinXP deployment - no Direct2D there and GTK needs to be installed separately
Nelson Carrillo
@ncarrillo
Aug 31 2015 20:11
hi! my immediate concern would be, who's maintaining libgdiplus anymore? does it make any assumptions to maintain GDI+ compatibility that would harm us down the road?
another question would be are we even looking to target XP? I'd say yes if it can be done without too much effort
Mono would be a requirement on XP to get around the lack of .NET4.5
as far as a rendering backend D2D would be out, but Cairo could still work there. Maybe GTK too
GTK/Cairo backend works on Windows pretty well actually, just D2D is better
Nikita Tsukanov
@kekekeks
Aug 31 2015 20:12
Hm. Why exactly do you require .NET 4.5?
It doesn't bring anything new actually
async/await works pretty well with .NET 4.0

who's maintaining libgdiplus anymore

API has been frozen for almost a decate, it doesn't need any support

They still release some updates through
Steven Kirk
@grokys
Aug 31 2015 20:14
@kekekeks - welcome! they're good questions
Nikita Tsukanov
@kekekeks
Aug 31 2015 20:14
Since it's used in server side code
Steven Kirk
@grokys
Aug 31 2015 20:14
and ones i don't really have any answers for
i started on GTK+ because when i thought of linux i thought of that
Nikita Tsukanov
@kekekeks
Aug 31 2015 20:15
https://github.com/mono/libgdiplus - last commit 8 days ago
Steven Kirk
@grokys
Aug 31 2015 20:15
i used .net 4.5 because the most common PCL profile uses .net 4.5
and the majority of Perspex is a PCL
Nikita Tsukanov
@kekekeks
Aug 31 2015 20:15
PCL?
why?
You are planning to target mobile?
Steven Kirk
@grokys
Aug 31 2015 20:16
so it could potentially run on e.g. xamarin
Nikita Tsukanov
@kekekeks
Aug 31 2015 20:16
Ehm
Steven Kirk
@grokys
Aug 31 2015 20:16
or winrt
Nikita Tsukanov
@kekekeks
Aug 31 2015 20:16
You know about "Shared projects", right?
Ones that allow you to compile the same code for multiple target frameworks
Steven Kirk
@grokys
Aug 31 2015 20:16
yeah, you can't distribute shared projects using nuget
Nikita Tsukanov
@kekekeks
Aug 31 2015 20:16
You won't
Just keep several projects that include shared one
Steven Kirk
@grokys
Aug 31 2015 20:17
i much prefer using PCLs than shared projects with #ifs all over the place
José Manuel Nieto
@SuperJMN
Aug 31 2015 20:17
+1
by the way, welcome, @kekekeks !
Nikita Tsukanov
@kekekeks
Aug 31 2015 20:17
Haven't used #ifs ever once
in shared code
Usually I define some interface thats implemented outside of shared project
José Manuel Nieto
@SuperJMN
Aug 31 2015 20:18
Perspex should run in EVERY platform running .NET :p
Steven Kirk
@grokys
Aug 31 2015 20:18
which is what we do with PCLS
José Manuel Nieto
@SuperJMN
Aug 31 2015 20:18
Even smart-dishwashers
Nikita Tsukanov
@kekekeks
Aug 31 2015 20:18
And that EVERY platform includes XP, right?
José Manuel Nieto
@SuperJMN
Aug 31 2015 20:19
haha, XP is no longer supported
Steven Kirk
@grokys
Aug 31 2015 20:19
at this stage, i'm not really particularly interested in win XP
Nikita Tsukanov
@kekekeks
Aug 31 2015 20:19
Its still used
Especially in eastern europe
Steven Kirk
@grokys
Aug 31 2015 20:19
and by the time perspex gets finished, i imagine it will be hardly used
Nikita Tsukanov
@kekekeks
Aug 31 2015 20:19
Hm
fair point
José Manuel Nieto
@SuperJMN
Aug 31 2015 20:19
I don't think supporting XP would make Perspex specially interesting :)
Nikita Tsukanov
@kekekeks
Aug 31 2015 20:20
So you are "supporting" WinXP via Mono
José Manuel Nieto
@SuperJMN
Aug 31 2015 20:20
It would, however, if it runs in GNU/Linux and Mac
covering top-notch platforms that run .NET
Steven Kirk
@grokys
Aug 31 2015 20:20
are you asking about this because you want to write an app that covers XP?
José Manuel Nieto
@SuperJMN
Aug 31 2015 20:21
haha, that's what I was about to ask!
Nikita Tsukanov
@kekekeks
Aug 31 2015 20:21
Half of my apps are targeting WinXP
Steven Kirk
@grokys
Aug 31 2015 20:21
because i can look into targetting it if you need it
José Manuel Nieto
@SuperJMN
Aug 31 2015 20:21
are you developing those apps for clients?
Steven Kirk
@grokys
Aug 31 2015 20:21
for the moment though, there are many other priorities that i'd place above XP support
Nikita Tsukanov
@kekekeks
Aug 31 2015 20:21
yup
Steven Kirk
@grokys
Aug 31 2015 20:22
i don't see a particular problem with being able to support it in future
José Manuel Nieto
@SuperJMN
Aug 31 2015 20:22
but Perspex is in no way a framework ready to use for production
Steven Kirk
@grokys
Aug 31 2015 20:22
if System.Drawing is sufficient for our needs
Nikita Tsukanov
@kekekeks
Aug 31 2015 20:22
Some hardware (especially in automobile industry) doesn't even have drivers for Vista+
Well, I'm OK with having to build everything with some hacks to get it working on XP, so don't bother
I already have a library with chunks of BCL from Mono
José Manuel Nieto
@SuperJMN
Aug 31 2015 20:23
OK, but I don't see your point: do you see that Perspex could fulfill your needs in any way? I mean, you already have WPF :)
Steven Kirk
@grokys
Aug 31 2015 20:24
but in general the only answer to your questions is that "because we haven't considerd it/had a need for it yet"
Nikita Tsukanov
@kekekeks
Aug 31 2015 20:24
Last time I've tried to build cross-platform GUI app using GTK#
I ended with rewriting it using Qt
Because, well, GTK#
José Manuel Nieto
@SuperJMN
Aug 31 2015 20:24
sucks hard?
Nikita Tsukanov
@kekekeks
Aug 31 2015 20:24
Yup
José Manuel Nieto
@SuperJMN
Aug 31 2015 20:24
haha
Nikita Tsukanov
@kekekeks
Aug 31 2015 20:24
So I see a great perspective in Perspex
Steven Kirk
@grokys
Aug 31 2015 20:24
what are the main problems with Perspex targetting XP? Direct2D obviously
is .net 4.5 not available on XP?
Nikita Tsukanov
@kekekeks
Aug 31 2015 20:25
Nope
Only 4.0
Steven Kirk
@grokys
Aug 31 2015 20:25
ok, i didn't know that. i've not even seen XP for many years
if you wanted to try downgrading the perspex projects to 4.0 and see if anything breaks, that would be interesting to know
Nikita Tsukanov
@kekekeks
Aug 31 2015 20:26
Well, I keep wondering every time when people tell me "this app should also work with XP"
Steven Kirk
@grokys
Aug 31 2015 20:26
i would be fine with that as long as it didn't require anything ugly
José Manuel Nieto
@SuperJMN
Aug 31 2015 20:26
same with OmniXAML...
whatever it involves touching the code is a pain in the ass
A PAIN IN THE ASS
Steven Kirk
@grokys
Aug 31 2015 20:27
the other issue - a System.Drawing backend, shouldn't be difficult i don't think
Nikita Tsukanov
@kekekeks
Aug 31 2015 20:27
I think I can keep a separate branch with some hacks (i. e. compiling everything with needed BCL classes as a separate dll)
Steven Kirk
@grokys
Aug 31 2015 20:27
the main problem would be i think the fact we use PCLs
Nikita Tsukanov
@kekekeks
Aug 31 2015 20:28
People usually swith to .NET 4.5 because of async/await

the main problem would be i think the fact we use PCLs

.NET 4.0 does have support for PCL, you just need some update

And you know, you can get async/await working even with .NET 2.0
Steven Kirk
@grokys
Aug 31 2015 20:29
yeah, without the special syntax
Nikita Tsukanov
@kekekeks
Aug 31 2015 20:29
With
Steven Kirk
@grokys
Aug 31 2015 20:29
ah really?
That was the stuff I did back in 2013 because of some crazy client who wanted to install the app without admin rights
Steven Kirk
@grokys
Aug 31 2015 20:31
interesting
well it's definitely something i will bear in mind
if you'd be interested in writing a System.Drawing renderer I can guide you
Darnell Williams
@Seeker1437
Aug 31 2015 20:32
Wow actually as I am reading the conversation I must say, with the MonoLib and the possibility of this working on XP, that would turn a lot of heads
Steven Kirk
@grokys
Aug 31 2015 20:32
i'm really surprised :)
Nikita Tsukanov
@kekekeks
Aug 31 2015 20:33
You don't need MonoLib, actually. MS has several NuGet packages that do the same for .NET 4.0
Darnell Williams
@Seeker1437
Aug 31 2015 20:33
Even at Comcast, even though the agent computers are not XP, the phone switches and core servers are still XP
Steven Kirk
@grokys
Aug 31 2015 20:33
@kekekeks yes that's what i was thinking of - doesn't give you the syntax, right?
Nikita Tsukanov
@kekekeks
Aug 31 2015 20:33
Yup
You just need these packages and KB2468871 installed on the target machine
KB2468871 also enables support for PCL
Darnell Williams
@Seeker1437
Aug 31 2015 20:34
I feel like a complete noob now XD
Steven Kirk
@grokys
Aug 31 2015 20:34
me too - literally. this is old-guys stuff ;)
Nikita Tsukanov
@kekekeks
Aug 31 2015 20:35
Hey, I'm only 24
definetely not "old"
Darnell Williams
@Seeker1437
Aug 31 2015 20:35
Oi makes me feel even more noob.... 21 XD
Nikita Tsukanov
@kekekeks
Aug 31 2015 20:35
Regarding OmniSharp, you can ship a custom-built one. Or just embed one using ILRepack
Darnell Williams
@Seeker1437
Aug 31 2015 20:35
I specialize in task automation XD
Steven Kirk
@grokys
Aug 31 2015 20:35
ha, don't worry - i'm 40
Nikita Tsukanov
@kekekeks
Aug 31 2015 20:36
*OmniXAML
Darnell Williams
@Seeker1437
Aug 31 2015 20:36
:P OmniSharp haha, I use that sometimes
Steven Kirk
@grokys
Aug 31 2015 20:36
like i say, it's something we can definitely consider when we get close to a 1.0
Darnell Williams
@Seeker1437
Aug 31 2015 20:36
When I am at work and programming when I shouldn't be XD
Steven Kirk
@grokys
Aug 31 2015 20:36
for now i'd like to stick with a modern toolset for developing
Darnell Williams
@Seeker1437
Aug 31 2015 20:38
I understand really
For example I have been helping out with Cosmos lately, and with there being so few developers, Cosmos will only target x86 before expanding to other architectures XD
Steven Kirk
@grokys
Aug 31 2015 20:39
yep, we are few
Nikita Tsukanov
@kekekeks
Aug 31 2015 20:39
Got to get things up and running and then think about edge cases
Steven Kirk
@grokys
Aug 31 2015 20:39
yeah, exactly
Darnell Williams
@Seeker1437
Aug 31 2015 20:39
yep
Im only starting to learnt his XD
I have been working on this app for me to track my calls at work, it helped that I got the super basic version working, now i have one packed with features coming XD
Nikita Tsukanov
@kekekeks
Aug 31 2015 20:48
So, guys, I can help you with:
1) *nix portability (have been using Linux as server platform last 5 years)
2) Xamarin backends
3) Tray notification icon support (that stuff has some quirks, especially with GtkStatusIcon not working with Ubuntu)
4) Dunno, what the general plan?
Steven Kirk
@grokys
Aug 31 2015 20:49
i think the main priority right now is to get linux support up and easy to use
this is the issue tracking linux support: grokys/Perspex#78
Nikita Tsukanov
@kekekeks
Aug 31 2015 20:50
And what's the main problem with that for now?
Steven Kirk
@grokys
Aug 31 2015 20:50
the main problem is this: reactiveui/ReactiveUI#925
i would like to try the stub PresentationFramework.dll approach
i think @ncarrillo was going to take a look at rxui and see what would be required
Nikita Tsukanov
@kekekeks
Aug 31 2015 20:51
Your idea with stub seems right
Steven Kirk
@grokys
Aug 31 2015 20:52
i think the GAC would be used over the stub version on .net right?
Nikita Tsukanov
@kekekeks
Aug 31 2015 20:52
Just ship it in resources and load in AppDomain.ResolveAssembly
If platform has it, that's fine
Steven Kirk
@grokys
Aug 31 2015 20:53
hmm, yeah that's an option
Nikita Tsukanov
@kekekeks
Aug 31 2015 20:53
If it doesn't, feed it unsigned version
Since you don't have private key for PresentationFramework
Steven Kirk
@grokys
Aug 31 2015 20:53
sounds like a plan
Nikita Tsukanov
@kekekeks
Aug 31 2015 20:53
The good thing about AppDomain.ResolveAssembly is that it bypasses strong name checks
Steven Kirk
@grokys
Aug 31 2015 20:54
though, just loading from disk would be ok for now
Nikita Tsukanov
@kekekeks
Aug 31 2015 20:54
You might confuse the loader
Steven Kirk
@grokys
Aug 31 2015 20:54
as it's just (hopefully) a temporary hack
as far as i understand if it's in the GAC, the local one will be ignored
though i'm not too hot on assembly loading stuff
Nikita Tsukanov
@kekekeks
Aug 31 2015 20:55
local files have priority
it might argue about dll not having strong name or something
Nikita Tsukanov
@kekekeks
Aug 31 2015 20:55
See? Complex rules
Steven Kirk
@grokys
Aug 31 2015 20:56
might work to our advantage
Nikita Tsukanov
@kekekeks
Aug 31 2015 21:05
Ehm. Can get it building in MonoDevelop
Steven Kirk
@grokys
Aug 31 2015 21:05
cool!
Nikita Tsukanov
@kekekeks
Aug 31 2015 21:05
*can't
lol
Steven Kirk
@grokys
Aug 31 2015 21:05
oh
:)
what mono are you using?
Nikita Tsukanov
@kekekeks
Aug 31 2015 21:05
It says something about incompatible target framework
Mono JIT compiler version 4.0.1 (tarball Tue Apr 28 11:47:58 UTC 2015)
Steven Kirk
@grokys
Aug 31 2015 21:06
right, yeah, i had absolutely no luck with 4.0.1
miguel on the mono channel said to use 4.2 alpha as 4.0 is really buggy
Nikita Tsukanov
@kekekeks
Aug 31 2015 21:06
Meh
Steven Kirk
@grokys
Aug 31 2015 21:07
with 4.2 i had more luck
i thought i'd updated the mono build instructions to add that info, but i haven't
see here for instructions on changing to the alpha channel: http://www.mono-project.com/docs/getting-started/install/linux/#debian-ubuntu-and-derivatives
under "Alpha update channel"
Nikita Tsukanov
@kekekeks
Aug 31 2015 21:09
Hm. It seems inizan's PPA don't exist anymore
Ok, I'll get it from aplha channel
Hope it won't break DNX stuff
Steven Kirk
@grokys
Aug 31 2015 21:11
:worried:
Nikita Tsukanov
@kekekeks
Aug 31 2015 21:11
BTW they just released 4.2
A couple of days ago
Steven Kirk
@grokys
Aug 31 2015 21:11
ah really? so it's no longer alpha?
Steven Kirk
@grokys
Aug 31 2015 21:11
ah yeah
Nikita Tsukanov
@kekekeks
Aug 31 2015 21:11
ehm
wait
Steven Kirk
@grokys
Aug 31 2015 21:12
it's not actually released
they just published the release notes ahead of time
Nikita Tsukanov
@kekekeks
Aug 31 2015 21:12
I'm sure I've seen it on the news somewhere
Darnell Williams
@Seeker1437
Aug 31 2015 21:12
yeah I pointed it out before like a couple week ago
not actually released yet
Steven Kirk
@grokys
Aug 31 2015 21:12
afaik you still need the alpha channel for 4.2
yeah
Nikita Tsukanov
@kekekeks
Aug 31 2015 21:13
You know, I've maintained Ubuntu PPA for monodevelop for a while. Too lazy for that stuff nowadays
Nikita Tsukanov
@kekekeks
Aug 31 2015 21:19
Mono JIT compiler version 4.2.0 (Stable 4.2.0.179/a224653 Wed Aug 26 16:56:29 UTC 2015)
MonoDevelop is still complaining about target framework
Steven Kirk
@grokys
Aug 31 2015 21:19
on what project?
Nikita Tsukanov
@kekekeks
Aug 31 2015 21:21
Hm
It seems that it needs PCL reference assemblies
Getting them from stable channel
Steven Kirk
@grokys
Aug 31 2015 21:22
right, yeah they're not on the alpha channel
Nikita Tsukanov
@kekekeks
Aug 31 2015 21:23
at last
550 warnings
You can apply for ReSharper for OSS, you know
Steven Kirk
@grokys
Aug 31 2015 21:24
i think they'll be mainly documentation warnings, right?
Nikita Tsukanov
@kekekeks
Aug 31 2015 21:24
dunno, it's mono compiler warnings
Steven Kirk
@grokys
Aug 31 2015 21:24
example?
Nikita Tsukanov
@kekekeks
Aug 31 2015 21:29
/home/kekekeks/Projects/Perspex/src/Perspex.Base/Collections/PerspexList.cs(21,21): Warning CS0219: The variable `removed' is assigned but its value is never used (CS0219) (Perspex.Base)
and so on
Got around SIGABRT with stub
Now it wants presentation core
meh
Steven Kirk
@grokys
Aug 31 2015 21:37
you stubbed PresentationFramework?
Nikita Tsukanov
@kekekeks
Aug 31 2015 21:37
RoutedEventArgs? Seriosly? I thought Mono had that
Steven Kirk
@grokys
Aug 31 2015 21:39
in what lib?
Nikita Tsukanov
@kekekeks
Aug 31 2015 21:39
PresentationCore
InnerException {System.TypeLoadException: Could not resolve type with token 010000e0} System.TypeLoadException
And what I'm supposed to do with that?
Steven Kirk
@grokys
Aug 31 2015 21:42
yeah, exactly
i got stuck at that on 4.0.2
the type load exception error messages are less than helpful
Nikita Tsukanov
@kekekeks
Aug 31 2015 21:44
Even MONO_LOG_LEVEL=debug doesn't print anything descriptive
Steven Kirk
@grokys
Aug 31 2015 21:45
well i'm glad it wasn't just me being stupid
Nikita Tsukanov
@kekekeks
Aug 31 2015 21:45
BTW, there is PCL build of ReactiveUI
Just WAT
Steven Kirk
@grokys
Aug 31 2015 21:48
Nikita Tsukanov
@kekekeks
Aug 31 2015 21:49
argh
Steven Kirk
@grokys
Aug 31 2015 21:50
might be easier just to remove reactiveui for now...
Nikita Tsukanov
@kekekeks
Aug 31 2015 21:50
What do you need it for?
Remember, ILRepack is your friend
Steven Kirk
@grokys
Aug 31 2015 21:50
it's actually only used for the diagnostic tools - i was thinking of using it throughout but i'm glad i didn't now
Nikita Tsukanov
@kekekeks
Aug 31 2015 21:50
You can always have a custom build
Steven Kirk
@grokys
Aug 31 2015 21:51
so the stub .dll approach doesn't work?
Nikita Tsukanov
@kekekeks
Aug 31 2015 21:51
Dunno, reading mono/metadata/class.c
for now
Something really weird happened, it tried to load type but doesn't know it's name
Steven Kirk
@grokys
Aug 31 2015 21:52
how is that possible?
Nikita Tsukanov
@kekekeks
Aug 31 2015 21:52
Dunno, type being referenced directly by metadata token?
Darnell Williams
@Seeker1437
Aug 31 2015 21:53
generated type maybe?
Nikita Tsukanov
@kekekeks
Aug 31 2015 21:54
Nope
Well, you know, I think we should use custom build of this thing
Steven Kirk
@grokys
Aug 31 2015 21:58
of reactiveui?
Nikita Tsukanov
@kekekeks
Aug 31 2015 21:58
yup
Steven Kirk
@grokys
Aug 31 2015 21:58
yeah, that may be the only solution
Nikita Tsukanov
@kekekeks
Aug 31 2015 21:58
Is it referenced from PCL?
Steven Kirk
@grokys
Aug 31 2015 21:58
yeah
Nelson Carrillo
@ncarrillo
Aug 31 2015 21:59
id say get rid of ReactiveUI for now
Steven Kirk
@grokys
Aug 31 2015 21:59
yeah, or that
i was hoping for a better solution, but it looks like there might not be one
@kekekeks you've tried stubbing the dlls right?
Nikita Tsukanov
@kekekeks
Aug 31 2015 22:00
Yup
Nelson Carrillo
@ncarrillo
Aug 31 2015 22:00
if we need to later on maybe We can just fork it as a starting point. Rip out the stuff that makes no sense with Perspex and make it a lightweight mvvm fx once Perspex is more mature
Steven Kirk
@grokys
Aug 31 2015 22:00
just wanted to make sure that's what you were trying
Nikita Tsukanov
@kekekeks
Aug 31 2015 22:00
Replaced RoutedEventArgs and some attributes
And then got that error and I'm no longer sure what it wants
And looking at the code it seems that it would want A LOT
Steven Kirk
@grokys
Aug 31 2015 22:01
ah really?
balls
Nikita Tsukanov
@kekekeks
Aug 31 2015 22:02
I'll try to build it with MonoDevelop and see if that will work
Nelson Carrillo
@ncarrillo
Aug 31 2015 22:02
I think we need a doc on getting PCLs installed for Mono builds, stumbling block right now
and for some reason Splat and another package don't restore automatically. I had to Nuget restore explicitly
Steven Kirk
@grokys
Aug 31 2015 22:03
what exactly is the problem there @ncarrillo ? it seemed to work fine on monodevelop for me
Nikita Tsukanov
@kekekeks
Aug 31 2015 22:03
BTW, why ReactiveUI? I'm using Caliburn.Micro and happy with it
Steven Kirk
@grokys
Aug 31 2015 22:04
reactiveui works with IObservables which is what Perspex uses for binding
Nikita Tsukanov
@kekekeks
Aug 31 2015 22:04
Ehm
Steven Kirk
@grokys
Aug 31 2015 22:04
so it was a natural fit
Nikita Tsukanov
@kekekeks
Aug 31 2015 22:04
Observable...
for binding?
Steven Kirk
@grokys
Aug 31 2015 22:04
yeah, got a problem with that? ;)
Nikita Tsukanov
@kekekeks
Aug 31 2015 22:05
Wait, no DependencyObjects and stuff?
Steven Kirk
@grokys
Aug 31 2015 22:05
yeah, there are
well, our own version
Nikita Tsukanov
@kekekeks
Aug 31 2015 22:05
Even Xamarin.Forms uses WPF approach
with classic binding
Are you sure you won't get memory leak with IObservable?
WPF uses some tricks with WeakReference and stuff
That ensures that control will get automatically unbound from everything when it goes out of scope
Steven Kirk
@grokys
Aug 31 2015 22:09
you can do weak subscriptions with observables
but i'm hoping not to need to, by having lifetimes
Nikita Tsukanov
@kekekeks
Aug 31 2015 22:10
Well, I'm using bindings for shared cached objects (e. g. user profile information) a lot
So source object won't be collected for a really long time
Steven Kirk
@grokys
Aug 31 2015 22:11
there currently is no "binding to viewmodels" etc functionality
i was planning on using reactiveui for that :(
Nikita Tsukanov
@kekekeks
Aug 31 2015 22:11
You lost me here
XAML UI without binding?
Steven Kirk
@grokys
Aug 31 2015 22:12
it has binding
Nikita Tsukanov
@kekekeks
Aug 31 2015 22:12
Why won't you get binding implementation from Moonlight
Steven Kirk
@grokys
Aug 31 2015 22:12
but we're just released the first alpha dude, there's still a lot missing
Nikita Tsukanov
@kekekeks
Aug 31 2015 22:13
Its BSD licensed and has exactly the same API and behavior as WPF one
Steven Kirk
@grokys
Aug 31 2015 22:13
because i want to use observables for binding, as they much more powerful
yeah, i know, i've stolen a lot from it
our Grid implementation is from mono
Nikita Tsukanov
@kekekeks
Aug 31 2015 22:14
And what is your general idea of binding to view model?
Steven Kirk
@grokys
Aug 31 2015 22:14
well, it was to use ReactiveUI
now, i'm not so sure
Nikita Tsukanov
@kekekeks
Aug 31 2015 22:15
What IObservable does that Moonlight's binding can't?
Steven Kirk
@grokys
Aug 31 2015 22:15
a few examples from the perspex codebase...
This message was deleted
var scrollBarOffset = Observable.CombineLatest(
            this.GetObservable(HorizontalScrollBarValueProperty),
            this.GetObservable(VerticalScrollBarValueProperty))
            .Select(x => new Vector(x[0], x[1]))
            .Subscribe(x => this.Offset = x);```
Nikita Tsukanov
@kekekeks
Aug 31 2015 22:16
MultiBinding
/thread
And you won't fit THAT to XAML
Steven Kirk
@grokys
Aug 31 2015 22:17
if you've never used reactive extensions i'd advise you to take a look
José Manuel Nieto
@SuperJMN
Aug 31 2015 22:17
stick to Rx
STICK TO THEM!
Steven Kirk
@grokys
Aug 31 2015 22:17
Observable.Interval(Tick, PerspexScheduler.Instance)
            .Select(_ => Stopwatch.Elapsed)
            .Publish()
            .RefCount()
José Manuel Nieto
@SuperJMN
Aug 31 2015 22:17
they are the way to peace, love and life
Nikita Tsukanov
@kekekeks
Aug 31 2015 22:18

RefCount

Am I the only one who sees problems with ref counting?

basically, it's saying "create a timer that says alive as long as there are subscriptions"
i don't see anything wrong with that
Nikita Tsukanov
@kekekeks
Aug 31 2015 22:19
Hm
I still don't see how you can fit that in XAML
José Manuel Nieto
@SuperJMN
Aug 31 2015 22:20
it will
Steven Kirk
@grokys
Aug 31 2015 22:20
why not?
Nikita Tsukanov
@kekekeks
Aug 31 2015 22:20
LINQ queries?
in XAML?
José Manuel Nieto
@SuperJMN
Aug 31 2015 22:20
if it doesn't, then I will die and reincarnate in the .NET Minotaur
Steven Kirk
@grokys
Aug 31 2015 22:20
well no, obviously
José Manuel Nieto
@SuperJMN
Aug 31 2015 22:20
don't say it isn't possible
Steven Kirk
@grokys
Aug 31 2015 22:20
i don't think i'd want to write it!!
José Manuel Nieto
@SuperJMN
Aug 31 2015 22:20
Rx fits just everything
you're supposed to write simple bindings in XAML :)
Steven Kirk
@grokys
Aug 31 2015 22:21
i suspect you've never used reactive extensions or reactiveui in a GUI app @kekekeks
José Manuel Nieto
@SuperJMN
Aug 31 2015 22:21
the ViewModel is the one that does the complex operations and exposes the meaty properties to bind to
Nikita Tsukanov
@kekekeks
Aug 31 2015 22:21
So, basically, BindingExtension.ProvideValue should return IObservable?
Steven Kirk
@grokys
Aug 31 2015 22:21
i'd advise you to try it
yeah
something like that
Nikita Tsukanov
@kekekeks
Aug 31 2015 22:22
Then implementation of it shouldn't be that complex
Steven Kirk
@grokys
Aug 31 2015 22:22
at the xaml level it'll me an impl detail
however in code, it's really powerful
Nikita Tsukanov
@kekekeks
Aug 31 2015 22:22
I'm fine with it, as long as it doesn't involve C# code in XAML
José Manuel Nieto
@SuperJMN
Aug 31 2015 22:23
+1 to that, @kekekeks
XAML should be declarative as much as it could
Steven Kirk
@grokys
Aug 31 2015 22:23
ha, well i want that personally after doing html stuff with knockout
at least support for the ! operator!
José Manuel Nieto
@SuperJMN
Aug 31 2015 22:23
haha
I know how you feel, bro
Nikita Tsukanov
@kekekeks
Aug 31 2015 22:24
So, basically there will be two binding systems
Steven Kirk
@grokys
Aug 31 2015 22:24
nope, just one
Nikita Tsukanov
@kekekeks
Aug 31 2015 22:24
one for code, that exposes Rx
Steven Kirk
@grokys
Aug 31 2015 22:24
it's all observables
Nikita Tsukanov
@kekekeks
Aug 31 2015 22:24
Another for XAML, which is easy to use from it
Steven Kirk
@grokys
Aug 31 2015 22:24
José Manuel Nieto
@SuperJMN
Aug 31 2015 22:25
it's supposed to keep it simple
Steven Kirk
@grokys
Aug 31 2015 22:25
for xaml there will be markup extensions which produce observables
Nikita Tsukanov
@kekekeks
Aug 31 2015 22:25
I got your point about everything being IObservable under the hood, but in XAML you want your converters, multi bindings and stuff
All goodies that people are used to
Steven Kirk
@grokys
Aug 31 2015 22:25
yeah, we can provide them if needed
José Manuel Nieto
@SuperJMN
Aug 31 2015 22:25
Of course
Nikita Tsukanov
@kekekeks
Aug 31 2015 22:26
So, basically, framework needs infrastructure for XAML bindings
Which will provide observables
José Manuel Nieto
@SuperJMN
Aug 31 2015 22:26
for the moment, Styles are the only thing I don't see how to implement, but mainly because I still haven't had time to take a look at them in Perspex
Steven Kirk
@grokys
Aug 31 2015 22:27
yeah, styles are really different from WPF etc
they're more like CSS
José Manuel Nieto
@SuperJMN
Aug 31 2015 22:27
@kekekeks right now, it provides Bindings that rely on INotifyPropertyChanged
(in XAML)
Nikita Tsukanov
@kekekeks
Aug 31 2015 22:27
Are you sure that having css instead of WPF styles is a good thing?
José Manuel Nieto
@SuperJMN
Aug 31 2015 22:27
but we could do custom extensions for Rx (that bind observables)
Nikita Tsukanov
@kekekeks
Aug 31 2015 22:27
in WPF I can set a lot of stuff in style
Steven Kirk
@grokys
Aug 31 2015 22:28
styles should be a lot more powerful.
Nikita Tsukanov
@kekekeks
Aug 31 2015 22:28
Complex templates (even for child controls), animations, etc
Steven Kirk
@grokys
Aug 31 2015 22:28
my only worry is performance
here's the style for Button:
            new Style(x => x.OfType<Button>())
            {
                Setters = new[]
                {
                    new Setter(Button.FocusAdornerProperty, new FuncTemplate<IControl>(FocusAdornerTemplate)),
                    new Setter(Button.TemplateProperty, new ControlTemplate<Button>(Template)),
                    new Setter(Button.HorizontalContentAlignmentProperty, HorizontalAlignment.Center),
                    new Setter(Button.VerticalContentAlignmentProperty, VerticalAlignment.Center),
                },
            },
            new Style(x => x.OfType<Button>().Template().Name("border"))
            {
                Setters = new ISetter[]
                {
                    new ThemeSetter(Border.BackgroundProperty, DefaultTheme.ControlBackground),
                    new ThemeSetter(Border.BorderBrushProperty, DefaultTheme.ControlBorder),
                    new Setter(Border.BorderThicknessProperty, 2),
                    new ThemeSetter(TextBlock.ForegroundProperty, DefaultTheme.Text),
                },
            },
            new Style(x => x.OfType<Button>().Class(":pointerover").Template().Name("border"))
            {
                Setters = new[]
                {
                    new ThemeSetter(Border.BackgroundProperty, HoverBackground),
                    new ThemeSetter(Border.BorderBrushProperty, HoverBorder),
                    new ThemeSetter(TextBlock.ForegroundProperty, HoverForeground),
                },
            },
            new Style(x => x.OfType<Button>().Class(":pressed").Template().Name("border"))
            {
                Setters = new[]
                {
                    new ThemeSetter(Button.BackgroundProperty, PressedBackground),
                    new ThemeSetter(TextBlock.ForegroundProperty, PressedForeground),
                },
            },
            new Style(x => x.OfType<Button>().Class(":disabled").Template().Name("border"))
            {
                Setters = new[]
                {
                    new Setter(Button.ForegroundProperty, new SolidColorBrush(0xff7f7f7f)),
                },
            },
José Manuel Nieto
@SuperJMN
Aug 31 2015 22:28
@kekekeks My advice is that you take a look at Perspex running and then you could see the whole picture
Steven Kirk
@grokys
Aug 31 2015 22:32
but as for your questions of "are you sure...?" no, i'm not sure at all. we're trying a lot of new stuff here, some of which may turn out to be the wrong choice
however, in terms of perf, the slowest thing atm is layout which is exactly the same as wpf et al
and the biggest threat of failure is lack of interest, and this stuff keeps me interested ;)
Nikita Tsukanov
@kekekeks
Aug 31 2015 22:38
Any ideas on getting designer working?
At least in preview mode
Steven Kirk
@grokys
Aug 31 2015 22:39
not really thought much about it so far i'm afraid
getting intellesense on the xaml would be a good first step, but no idea how to go about even that
Nikita Tsukanov
@kekekeks
Aug 31 2015 22:40
XAML editor is also broken - it claims stuff about Grid not existing in https://github.com/grokys/Perspex
Steven Kirk
@grokys
Aug 31 2015 22:40
yeah, exactly
Nikita Tsukanov
@kekekeks
Aug 31 2015 22:40
AFAIK you need to mark assembly with some attribute
Steven Kirk
@grokys
Aug 31 2015 22:41
which we can't do, due to it being in a PCL :(
José Manuel Nieto
@SuperJMN
Aug 31 2015 22:41
Hey, the designer is supposed to fail
Nikita Tsukanov
@kekekeks
Aug 31 2015 22:41
No, it doesn't
Perspex does drawing itself
so it could render preview
José Manuel Nieto
@SuperJMN
Aug 31 2015 22:41
because it will be parsed by OmniXAML, that is completely different from the reader classes in System.Xaml
Nikita Tsukanov
@kekekeks
Aug 31 2015 22:41
And nobody actually need anything else
Steven Kirk
@grokys
Aug 31 2015 22:42
a designer will come much later
this is still alpha1
José Manuel Nieto
@SuperJMN
Aug 31 2015 22:42
haha, a Designer could be really nice, but we have SO LITTLE RESOURCES
Nikita Tsukanov
@kekekeks
Aug 31 2015 22:43
I wonder what Xamarin did to make XAML editor working
Steven Kirk
@grokys
Aug 31 2015 22:43
i understand your impatience but you do realise that there are just 3 people who have worked on this so far
MS have hundreds and hundreds
Nikita Tsukanov
@kekekeks
Aug 31 2015 22:43
I'm trying to figure out the state of the project
José Manuel Nieto
@SuperJMN
Aug 31 2015 22:43
hahaha, @grokys and myself being a total n00b compared to you!
Steven Kirk
@grokys
Aug 31 2015 22:43
sure
José Manuel Nieto
@SuperJMN
Aug 31 2015 22:43
and @ncarrillo
so, 2.5 devs doing stuff
Steven Kirk
@grokys
Aug 31 2015 22:44
yeah, so please go easy on us ;)
José Manuel Nieto
@SuperJMN
Aug 31 2015 22:44
I hope you can collaborate with something cool, if you will
to keep the traction going
Steven Kirk
@grokys
Aug 31 2015 22:45
ok guys, it's late, need to go to bed
thanks for your interest @kekekeks
i hope you find something that interests you to work on!
José Manuel Nieto
@SuperJMN
Aug 31 2015 22:46
same for me!
I outta here for now
see you later! nice to see new people here
Nikita Tsukanov
@kekekeks
Aug 31 2015 22:50
I think I know how get that designer thingy working
Just T4 and some magic
A separate assembly with adapter types that will look like its WPF-based classes
So designer will see them, create them and call them
José Manuel Nieto
@SuperJMN
Aug 31 2015 22:52
Cannot unsee what you've said!
haha, I must see that!
Steven Kirk
@grokys
Aug 31 2015 22:52
that might just work!
Nikita Tsukanov
@kekekeks
Aug 31 2015 22:52
Well, I specialize in weird stuff like that
José Manuel Nieto
@SuperJMN
Aug 31 2015 22:53
you've been renamed to Hahahacks
Steven Kirk
@grokys
Aug 31 2015 22:53
though i'm not sure how rendering would work
Nikita Tsukanov
@kekekeks
Aug 31 2015 22:53
hey
I have a friend with nickname "hacklex"
José Manuel Nieto
@SuperJMN
Aug 31 2015 22:53
invite him!
I'll bring some spanish red wine
now yes, see you tomorrow, guys!
Steven Kirk
@grokys
Aug 31 2015 22:54
tomorrow!
:sleeping: