These are chat archives for AvaloniaUI/Avalonia

3rd
Apr 2017
Andrew
@zezba9000
Apr 03 2017 00:05
the permission system should allow dev apps to have access to the system a normal music player app wouldn't have for example. Maybe I'm missing something but I don't think this will do anything but allow people to use the latest software on any distro. Which is a huge pitfall with how it is now trying to fragment away package management away from the developers.
Nikita Tsukanov
@kekekeks
Apr 03 2017 00:06
The right thing to do is to ship everything you need alongside with the app
Like Steam and Rider do
This way you only depend on libc and fontconfig
And that allows you to package your app as tar.gz
And it will run on any glibc-based distro
Without sandboxing and other magic stuff
Flatpack tries to solve two issues at once
1) ship deps (which is good)
2) isolate the app from the system (which should be optional)
Andrew
@zezba9000
Apr 03 2017 00:08
you still want sandboxing for security. Maybe its not needed on a dev app but a music and picture app you would
like WinRT apps or Android and iOS etc
ya I agree
Nikita Tsukanov
@kekekeks
Apr 03 2017 00:09
You know, desktop isn't a mobile phone
That's not supposed to allow you anything other than play games and view content
Andrew
@zezba9000
Apr 03 2017 00:09
well the lines will blur more as they have been
Nikita Tsukanov
@kekekeks
Apr 03 2017 00:09
Desktop apps are supposed to help people to do some work
Andrew
@zezba9000
Apr 03 2017 00:09
MS is releasing Win10 phone / PC devices later
and Ubuntu already has
Nikita Tsukanov
@kekekeks
Apr 03 2017 00:10
And in case of linux it often involves either software development or access to hardware
Andrew
@zezba9000
Apr 03 2017 00:10
once phones are as fast as a desktop in the context of now. Many can use them as a dev tool as well.
with a dock
Nikita Tsukanov
@kekekeks
Apr 03 2017 00:11
Meh, I've got Monodevelop on my N900 years ago
It's just a toy
Andrew
@zezba9000
Apr 03 2017 00:11
compared to what?
Nikita Tsukanov
@kekekeks
Apr 03 2017 00:12
To latest chips from Intel, 32GB RAM and terabytes of storage
Andrew
@zezba9000
Apr 03 2017 00:12
intellij is the only other open source IDE that comes close
o you're talking about the hardware
intel just released a Ram/Drive storage hyprid
so you can have 300gb of ram or storage
or share it
Nikita Tsukanov
@kekekeks
Apr 03 2017 00:17
Still won't fit into phone form-factor (yep, I'm aware of 4TB mSATA SSD's)
Andrew
@zezba9000
Apr 03 2017 00:18
For web devs a phone with 4gb of ram and 64gb of storage is more than enough if run in desktop mode with a dock.
@curea Hey how did you install the nightly builds in VS Code?
I don't see any packages.config file
o err ic, in the csproj
Nikita Tsukanov
@kekekeks
Apr 03 2017 00:22
4GB for web devs? That's like 4 chrome tabs with angular apps inside
Andrew
@zezba9000
Apr 03 2017 00:24
ok I don't even know how to respond to that? Its simply not true. Also if I was making a WASM app my mem usage would be fine. We are only in the early stages of this transition anyway.
Nikita Tsukanov
@kekekeks
Apr 03 2017 00:25
I've seen angular apps eating 1GB of RAM
Andrew
@zezba9000
Apr 03 2017 00:25
ok web dev is a joke... its why WASM is now a thing
Nikita Tsukanov
@kekekeks
Apr 03 2017 00:26
Yep, I kinda waiting for Mono to be ported there
Andrew
@zezba9000
Apr 03 2017 00:26
when CoreRT or Mono compiles to WASM we can run fast apps using Avalonia ;)
same
Nikita Tsukanov
@kekekeks
Apr 03 2017 00:26
We still need to somehow ship Skia there
Andrew
@zezba9000
Apr 03 2017 00:26
CoreRT is what should be ported though
Nikita Tsukanov
@kekekeks
Apr 03 2017 00:26
Since canvas isn't that fast, unfortunately
Andrew
@zezba9000
Apr 03 2017 00:27
WebGL is though
Nikita Tsukanov
@kekekeks
Apr 03 2017 00:27
Well, CoreRT is still crasing on Console.ReadKey or something
Andrew
@zezba9000
Apr 03 2017 00:27
ya lol but because of how it can compile to C or LLVM directly it makes more sense in the long run
Mono ran in PNaCl a long time ago
so it shouldn't be to long for mono
Nikita Tsukanov
@kekekeks
Apr 03 2017 00:28
It's been stated that work on that is already in progress
Our main issue would be to compile Skia for WASM
Andrew
@zezba9000
Apr 03 2017 00:29
ya I would think if Skia has a GLES2 backend the rendering part should be already done
which it has to for Android
Nikita Tsukanov
@kekekeks
Apr 03 2017 00:30
We are currently using it in software-only mode, unfortunately
And the thing is that for most of UI purposes software rendering is actually faster
Because of font rendering compilations with GPU
Andrew
@zezba9000
Apr 03 2017 00:31
I would argue its not being done correctly then.
an example would be you could never do that for a game
but game font sizes aren't as dynamic.. which is simple to fix, just uses more ram
software rending for Skia right now is fine. I think 90% of people right now just need/want a UI that is C# and cross platform
and Avalonia is the only one doing it right
Nikita Tsukanov
@kekekeks
Apr 03 2017 00:32
In games you are usually using texture fonts
And don't deal with huge text blocks
You can't do that for UI
Andrew
@zezba9000
Apr 03 2017 00:33
sure you can, you just use instance rendering
Nikita Tsukanov
@kekekeks
Apr 03 2017 00:33
We had HW support before switching to Skia# from native Skia-based backend
So we know how to do that, it's only the matter of time
Andrew
@zezba9000
Apr 03 2017 00:34
there are multiple ways to do instanced based rendering
Nikita Tsukanov
@kekekeks
Apr 03 2017 00:34
Skia uses font atlases for text rendering
And when you, for example, rotate things
Those atlases will overflow and it will try to compact or/and recreate them
Andrew
@zezba9000
Apr 03 2017 00:35
ok, you can still render that in the GPU
Nikita Tsukanov
@kekekeks
Apr 03 2017 00:35
I'm currently waiting for scenegraph branch
Since it will add render layer support
And those issues will go away automagically
Andrew
@zezba9000
Apr 03 2017 00:35
ic
Nikita Tsukanov
@kekekeks
Apr 03 2017 00:36
No support for that in Skia yet
The thing is that Chrome uses SW-rendering for most of the things
Andrew
@zezba9000
Apr 03 2017 00:37
ya but the point is its possible
Nikita Tsukanov
@kekekeks
Apr 03 2017 00:37
And only uses HW-acceleration for scene compositing
Andrew
@zezba9000
Apr 03 2017 00:37
ya I kinda thought that
FireFox renders much faster
so does Edge
I wonder if they render text via the GPU
and Firefox is coming out with a new rendering backend that can use Vulkan I think
its like 6 times as fast as Chromes rendering
Nikita Tsukanov
@kekekeks
Apr 03 2017 00:39
One of the issues with HW rendering is that Skia requires you to setup OpenGL rendering contexts manually
Nikita Tsukanov
@kekekeks
Apr 03 2017 00:39
Which is actually a good thing that gives a lot of flexibility
But it requires tons of work to set up properly for each platform
Andrew
@zezba9000
Apr 03 2017 00:40
Hmm I wish I had more of my ReignSDK done as you could use that and it would basically do it for you.
I'll have to start working on that again. Just have been working on my Git GUI tool.
but I'm more of a graphics person at heart
Nikita Tsukanov
@kekekeks
Apr 03 2017 00:43
The thing is that we also want to use native platform's composition support
CALayers for OSX/iOS and DirectComposition for windows
And in case of Windows we also need to set up ANGLE (and probably provide precompiled binaries, since SkiaSharp only ships them for Win10)
Andrew
@zezba9000
Apr 03 2017 00:45
ugg :)
I never liked ANGLE
to me this is the wrong way to make an agnostic rendering api
but because Win/Mac want there own rending APIs instead of following standards people have to make this hackary.
or if there was a web specific graphics API, that would be better. Shaders would get transpiled into D3D, GL, Vulkan or Metal etc
this could then be optimized correctly for each browser. Translating GL into D3D9 is crazy. They just don't work that same at that level
D3D9 texel offsets are just totally different for one
Nikita Tsukanov
@kekekeks
Apr 03 2017 00:54
We have Direct2D for those who don't like ANGLE
But we'll still probably need it for 3D widget
And Skia will get Vulkan support anyway
We could also use native opengl support when available (i. e. user have drivers from vendor installed)
But the main reason for having ANGLE is that 3D widget
Andrew
@zezba9000
Apr 03 2017 00:55
I wouldn't worry to much about a 3D widget right now. WPF tried this and it just never got used that much. What makes more sense is to have a widget that gives you back its rendertarget handle and a callback that gets fired before its used in a composited render
Nikita Tsukanov
@kekekeks
Apr 03 2017 00:56
We are in no position of standartizing 3D rendering API
So we need to choose one to support
And I don't see anything better than OpenGL + OpenTK
Well, you see, we kinda need to provide a way to render to GPU surface
Andrew
@zezba9000
Apr 03 2017 00:56
don't choose any, just give the user a handle to the one Skia uses. On windows it will be a DXGI object
Nikita Tsukanov
@kekekeks
Apr 03 2017 00:57
And it will be tied to the rendering API
We can do that with ANGLE, since it can share surfaces with Direct2D
So even if we use Direct2D for UI rendering, we can still provide OpenGL FBO
Andrew
@zezba9000
Apr 03 2017 00:58
So you're saying making something like: RenderTargetBitmap in WPF?
Nikita Tsukanov
@kekekeks
Apr 03 2017 00:59
Along the lines, but with GPU support
Andrew
@zezba9000
Apr 03 2017 00:59
RenderTargetBitmap had GPU support
you could just get its DXGI handle I think
Nikita Tsukanov
@kekekeks
Apr 03 2017 00:59
Hm, nice
I'm not planning to implement their horrible 3D rendering API through
Andrew
@zezba9000
Apr 03 2017 01:00
that in turn could be used to create a D3D9 or D3D11 renderTargetView
ya that sucked
thats what I was saying don't do
Nikita Tsukanov
@kekekeks
Apr 03 2017 01:00
The main issue with that API was collections with change notifications
You basically have to create your mesh using regular lists and then convert them
It will take ages otherwise
Andrew
@zezba9000
Apr 03 2017 01:01
ya it was unusable, I don't think it supported shaders either
normally when someone wants to render 3D content they want to pass through the output from another rendering API
like for EHR for example
Nikita Tsukanov
@kekekeks
Apr 03 2017 01:02
Well, we have to support old machines with WinXP and without dedicated dedicated GPU
So we are stuck with WPF
Andrew
@zezba9000
Apr 03 2017 01:03
stuck with WPF?
Nikita Tsukanov
@kekekeks
Apr 03 2017 01:05
With WPF's 3D widget
Andrew
@zezba9000
Apr 03 2017 01:05
when you say "we" you mean Avalonia?
Nikita Tsukanov
@kekekeks
Apr 03 2017 01:05
The app where I'm using 3D
Avalonia doesn't run on XP
Andrew
@zezba9000
Apr 03 2017 01:05
ic
Nikita Tsukanov
@kekekeks
Apr 03 2017 01:06
Well, it could, potentially
Andrew
@zezba9000
Apr 03 2017 01:06
I had made this a while ago, It needs to be updated which is my next project I'll be working on after my C# shader compiler: https://github.com/reignstudios/ReignSDK
it supported WinXp D3D9-11 in an agnostic why
wpf support was also part of its plan
so it could render 3D objects in WPF and you could write shaders in C# for example
and it runs on WinXP
it also supported XNA, PSVita, OpenGL and when I get to it Vulkan, D3D12 etc.
its such a useful tool I'm sad I had to leave it hang for so long.
Andrew
@zezba9000
Apr 03 2017 01:12
I made a game with it that ran on WP7, iOS, Xbox 360 and Android. Shaders were all written in C#. Of course this was before Roslyn so my shader transpiler used Regex... and thats how I learned to regular expressions lol
Nikita Tsukanov
@kekekeks
Apr 03 2017 01:13
C# parser using regexes
god, why
Andrew
@zezba9000
Apr 03 2017 01:13
lol because I could :)
it killed me but I learned a lot
Andrew
@zezba9000
Apr 03 2017 01:33
@curea Hey was trying to reproduce your VS code setup process. Did you run:
dotnet add package Avalonia --source "https://www.myget.org/F/avalonia-ci/api/v2"
I get errors like:
error: Unable to resolve 'Avalonia' for '.NETCoreApp,Version=v1.1'.
error: Package 'Avalonia' is incompatible with 'all' frameworks in project 'D:\Dev\TEMP\Encore\Encore.csproj'.
which is odd because if the packages exist in the csproj manually it works:
<PackageReference Include="Avalonia" Version="0.4.1-build2920-alpha" />
    <PackageReference Include="Avalonia.Skia.Desktop" Version="0.4.1-build2920-alpha" />
    <PackageReference Include="Avalonia.Gtk3" Version="0.4.1-build2920-alpha" />
    <PackageReference Include="Avalonia.Win32" Version="0.4.1-build2920-alpha" />
Steven Kirk
@grokys
Apr 03 2017 07:49
@kekekeks

when i try to run ControlCatalog on master with skia i get:

'Unable to load DLL 'libSkiaSharp.dll': This operation is only valid in the context of an app container. (Exception from HRESULT: 0x8007109A)'

anyone else seeing the same?
Nikita Tsukanov
@kekekeks
Apr 03 2017 08:40
@grokys
Check if libSkiaSharp.dll gets copied to the output directory
BTW, are you using Win10?
@grokys mono/SkiaSharp#264
It seems that libSkiaSharp.dll for win10 runtime was built with some weird flag or something
Steven Kirk
@grokys
Apr 03 2017 08:57
yeah, i'm using win10 and libskiasharp.dll doesn't get copied
theepicmixer
@pmikstacki
Apr 03 2017 10:11
Ok, i will try to use rider. Xaml editor extension for monodevelop od currently my dream, I'll try to do this for you guys
is*
Nikita Tsukanov
@kekekeks
Apr 03 2017 10:23
@grokys is that full .NET or .NET Core?
Steven Kirk
@grokys
Apr 03 2017 10:30
it's just plain master, which is using .net 4.,5
@pmikstacki that would be great!
Steven Kirk
@grokys
Apr 03 2017 10:47
@kekekeks so does controlcatalog on master work for you using skia?
is it just on my machine?
Wiesław Šoltés
@wieslawsoltes
Apr 03 2017 11:13
c9.PNG
Having fun with Cloud9 + Avalonia + Core2D + .NET Core publish
Nikita Tsukanov
@kekekeks
Apr 03 2017 12:18
@grokys I'm running on Win8
And that error seems to be related to Win10
Steven Kirk
@grokys
Apr 03 2017 12:18
ah - so it's a skiasharp issue?
Nikita Tsukanov
@kekekeks
Apr 03 2017 12:18
mono/SkiaSharp#264
Steven Kirk
@grokys
Apr 03 2017 12:20
ok, guess i need to wait for a fix then!
Darnell Williams
@Seeker1437
Apr 03 2017 12:22
@grokys can I pm you?
Nikita Tsukanov
@kekekeks
Apr 03 2017 12:23
The strange thing is that ControlCatalog.Desktop should use SkiaSharp.targets
Which copies libSkiaSharp.dll from win7-x86/win7-x64
Darnell Williams
@Seeker1437
Apr 03 2017 12:25

@wieslawsoltes that is easy cool!

I need to look into Cloud9

Way not easy xD
Way cool*
Wiesław Šoltés
@wieslawsoltes
Apr 03 2017 12:27
@Seeker1437 Unfortunately using dotnet to build is not possible due to disk size restriction to 2GB :(
I am using publish binaries from my CI builds
dotnet restore uses a lot of disk space for cache
Steven Kirk
@grokys
Apr 03 2017 12:42
@Seeker1437 sure - i'm kinda in the middle of something, but i'll respond sooner or later ;)
Darnell Williams
@Seeker1437
Apr 03 2017 12:49
@grokys sure - take your time, it isn't urgent lol
@wieslawsoltes Ah okay, I will expirement with it. Is it smooth?
Wiesław Šoltés
@wieslawsoltes
Apr 03 2017 12:51
the app is usable
I'm trying https://codenvy.io/ right now
I was able to build Core2D with Avalonia for .NET Core
curea
@curea
Apr 03 2017 13:19
@zezba9000 I use vscode with the “Nuget Package Manager” addin, but for this project because it’s using non-standard package locations I had to add them to the .csproj file manually….
Wiesław Šoltés
@wieslawsoltes
Apr 03 2017 17:48
@kekekeks Does running linux framebuffer requires sudo ?
Wiesław Šoltés
@wieslawsoltes
Apr 03 2017 17:54
chmod +X solved the issue
dotnet/cli#2971
Nikita Tsukanov
@kekekeks
Apr 03 2017 19:45
You need access to /dev/fb0 and /dev/input/*
Wiesław Šoltés
@wieslawsoltes
Apr 03 2017 20:56
i managed to get something on display but input did not work, I've used VirtualBox to see if it works
how did you test this, I have seen qemu there ?
Andrew
@zezba9000
Apr 03 2017 21:20
@curea ok ic. Was just trying to update the Avalonia wiki for pulling packages. If VScode can't just pull the latest nightly not sure it can be easily documented yet.
Steven Kirk
@grokys
Apr 03 2017 23:43
@kekekeks i saw you said you were waiting for the deferred renderer stuff to be merged - if you want we can merge it. i was intending to port it bit-by-bit but especially with VS2017's performance at the moment that's taking a while
i'm currently unable to test skia though