These are chat archives for AvaloniaUI/Avalonia

3rd
Dec 2015
if that all looks good i think we're good to go!
Nikita Tsukanov
@kekekeks
Dec 03 2015 09:30
This message was deleted
@grokys have you uploaded vs ext?
danwalmsley
@danwalmsley
Dec 03 2015 09:45
well done guys!!!
Steven Kirk
@grokys
Dec 03 2015 10:26
yep, vs ext should be uploaded. does it look like it's not?
danwalmsley
@danwalmsley
Dec 03 2015 10:37

@grokys my vs ext said it had updated... but it still didnt work for me (@kekekes added a fix for having native dlls in project output dir.)

just uninstalled and re-installing incase I was stuck on an old locally installed one from yesterday

Steven Kirk
@grokys
Dec 03 2015 10:40
one sec let me check
danwalmsley
@danwalmsley
Dec 03 2015 10:40
downloading very slowly my end
Steven Kirk
@grokys
Dec 03 2015 10:43
it really is hard to emphasise enough just how bad the VS gallery site is
danwalmsley
@danwalmsley
Dec 03 2015 10:50
ok downloaded and working
must have been stuck on old version
Steven Kirk
@grokys
Dec 03 2015 10:50
ok, so it definitely is the latest version on the vs extensions site?
danwalmsley
@danwalmsley
Dec 03 2015 10:50
yes newly downloaded
Steven Kirk
@grokys
Dec 03 2015 10:50
and you now also get a usercontrol template?
danwalmsley
@danwalmsley
Dec 03 2015 10:51
yes
Steven Kirk
@grokys
Dec 03 2015 10:51
cool.
ok, so everything good?
let's TWEET! ;)
(and reddit and hacker news)
Steven Kirk
@grokys
Dec 03 2015 10:57
pls upvote!
Nikita Tsukanov
@kekekeks
Dec 03 2015 11:33
@grokys some guy proposed to make a shorthand for {Binding XXX}
Steven Kirk
@grokys
Dec 03 2015 11:34
yeah, polymer has that : {{XXX}}
it's nice
and [[XXX]] for one-way bindings, though not sure we'd need that too
Nikita Tsukanov
@kekekeks
Dec 03 2015 11:35
{[]}
Let's have one char that has a special meaning
which is '{'
Steven Kirk
@grokys
Dec 03 2015 11:35
i do like {{Foo}}
Nikita Tsukanov
@kekekeks
Dec 03 2015 11:36
{[]} for OneWay
Steven Kirk
@grokys
Dec 03 2015 11:36
ah yeah i get you
yeah it would be nice
Johan Larsson
@JohanLarsson
Dec 03 2015 11:36
what about ${Foo}
Steven Kirk
@grokys
Dec 03 2015 11:36
but first we need to get omnixaml working with standard xaml before we start extending it i think...
Nikita Tsukanov
@kekekeks
Dec 03 2015 11:37
@JohanLarsson
That has a smell of Makefile
Johan Larsson
@JohanLarsson
Dec 03 2015 11:37
C#6
Steven Kirk
@grokys
Dec 03 2015 11:37
@JohanLarsson well {{}} already uses markup extension syntax
as it's got {}
it's just there's currently no way to register a markup extension called {
Johan Larsson
@JohanLarsson
Dec 03 2015 11:39
@kek like this
oh, yeah, tricky with xaml syntax
Nikita Tsukanov
@kekekeks
Dec 03 2015 11:39
$ is applied to the whole string there
Johan Larsson
@JohanLarsson
Dec 03 2015 11:39
would be nice if it figured out one way on its own, if the property is readonly
Nikita Tsukanov
@kekekeks
Dec 03 2015 11:40
BTW, string interpolation will be also nice to have
Steven Kirk
@grokys
Dec 03 2015 11:40
yeah definitely
Johan Larsson
@JohanLarsson
Dec 03 2015 11:40
yeah, sweet
Nikita Tsukanov
@kekekeks
Dec 03 2015 11:40
<TextBox Text="X is ${X}">
Johan Larsson
@JohanLarsson
Dec 03 2015 11:40
think it is the feature I use the most
Steven Kirk
@grokys
Dec 03 2015 11:41
This message was deleted
i think it'd need special format involving {} but yeah that would be really useful
Johan Larsson
@JohanLarsson
Dec 03 2015 11:42
The {}{0:F1} is not super clean :)
Steven Kirk
@grokys
Dec 03 2015 11:42
i hate that format!
Nikita Tsukanov
@kekekeks
Dec 03 2015 11:42
Wait
we don't even need $ here
just allow {} to be anywhere in the value
Johan Larsson
@JohanLarsson
Dec 03 2015 11:47
dunno if {|{ActualHeight}/2|} would make any sense
Steven Kirk
@grokys
Dec 03 2015 11:49
not so fond of that syntax really, personally
Mike-EEE
@Mike-EEE
Dec 03 2015 12:02
hey everyone... congrats on Alpha 3 :)
Steven Kirk
@grokys
Dec 03 2015 12:06
thanks! ;)
Johan Larsson
@JohanLarsson
Dec 03 2015 12:08
@grokys still nice to be able to do it without converter as it comes up every now and then
Did not think many seconds about the syntax
Steven Kirk
@grokys
Dec 03 2015 12:08
yeah, personally i'm all for expressions in xaml
though i know a lot of people are against
Johan Larsson
@JohanLarsson
Dec 03 2015 12:09
the tricky part is probably where to draw the line
Steven Kirk
@grokys
Dec 03 2015 12:09
yeah
and the syntax!
Johan Larsson
@JohanLarsson
Dec 03 2015 12:10
yep, should be clean and natural
|...| is used for lambda syntax in some languages
Steven Kirk
@grokys
Dec 03 2015 12:10
though looking at it again, your {||} syntax isn't too bad...
Johan Larsson
@JohanLarsson
Dec 03 2015 12:10
maybe it is possible to skip the braces
Steven Kirk
@grokys
Dec 03 2015 12:11
possibly...
Johan Larsson
@JohanLarsson
Dec 03 2015 12:11
escaping gets noisy in general
Steven Kirk
@grokys
Dec 03 2015 12:13
yeah, curly brackets are already used to escape binding extensions so we'd probably have to use that
as skipping the braces could get confusing
but anyway, as i say, i think we need to get omnixaml to work with the current xaml standard first!
Mike-EEE
@Mike-EEE
Dec 03 2015 12:18
not sure if you are aware, but this was announced by Xamarin yesterday: http://blog.xamarin.com/3d-game-engine-for-android-ios-and-net/
no xaml UI, however... maybe partnership?
Steven Kirk
@grokys
Dec 03 2015 12:20
interesting! yeah, possible. we need to get stuff working first though ;)
Mike-EEE
@Mike-EEE
Dec 03 2015 12:27
LOL... right. see: alpha
Steven Kirk
@grokys
Dec 03 2015 12:31
haha
Nikita Tsukanov
@kekekeks
Dec 03 2015 12:31

not sure if you are aware, but this was announced by Xamarin yesterday: http://blog.xamarin.com/3d-game-engine-for-android-ios-and-net/

I think @EgorBo has something to do with that

Meanwhile 580 video views according to realtime analytics
danwalmsley
@danwalmsley
Dec 03 2015 12:36
@grokys can I pick your brain a second?
I have a TextEditor control.... and that has a property on it called TextView
textview is just a control for rendering text...
textview has a perspex property called TextDocument
however I want to be able to Bind to a TextDocument property on the TextEditor
but it actually set it on the textview... im struggling to acheive that
I thought I needed AddOwner but that seems to only work if TextEditor derives from TextView...
Steven Kirk
@grokys
Dec 03 2015 12:39
no, you should be able to do an AddOwner between any two controls
but i'm not completely clear on what you're trying to do, could you show me some code?
danwalmsley
@danwalmsley
Dec 03 2015 12:40
ok 1 sec...
this is in my TextEditor class
public TextView TextView
        {
            get
            {
                return textView;
            }
        }

        public static readonly PerspexProperty<TextDocument> TextDocumentProperty = TextView.TextDocumentProperty.AddOwner<TextEditor>();

        public TextDocument TextDocument
        {
            get { return GetValue(TextDocumentProperty); }
            set { SetValue(TextDocumentProperty, value); }
        }
this is in my TextView class
        public static readonly PerspexProperty<TextDocument> TextDocumentProperty =
            PerspexProperty.Register<TextView, TextDocument>("TextDocument");

        public TextDocument TextDocument
        {
            get { return GetValue(TextDocumentProperty); }
            set { SetValue(TextDocumentProperty, value); }
        }
Steven Kirk
@grokys
Dec 03 2015 12:42
This message was deleted
danwalmsley
@danwalmsley
Dec 03 2015 12:43
TextEditor is like the top level control consumed by user
Steven Kirk
@grokys
Dec 03 2015 12:43
what does TextEditor's template look like?
danwalmsley
@danwalmsley
Dec 03 2015 12:44
public static Control Template(TextEditor control)
        {
            Border result = new Border
            {
                Name = "border",
                Padding = new Thickness(2),
                [~Border.BackgroundProperty] = control[~TemplatedControl.BackgroundProperty],
                [~Border.BorderBrushProperty] = control[~TemplatedControl.BorderBrushProperty],
                [~Border.BorderThicknessProperty] = control[~TemplatedControl.BorderThicknessProperty],

                Child = new ScrollViewer
                {
                    Name="scrollViewer",
                    [~ScrollViewer.CanScrollHorizontallyProperty] = control[~ScrollViewer.CanScrollHorizontallyProperty],
                    [~ScrollViewer.HorizontalScrollBarVisibilityProperty] = control[~ScrollViewer.HorizontalScrollBarVisibilityProperty],
                    [~ScrollViewer.VerticalScrollBarVisibilityProperty] = control[~ScrollViewer.VerticalScrollBarVisibilityProperty],
                    Content = new Panel
                    {
                        Children = new Perspex.Controls.Controls
                        {
                            new Grid
                            {
                                Margin = new Thickness(0, 5),
                                ColumnDefinitions = new ColumnDefinitions
                                {
                                    new ColumnDefinition(1, GridUnitType.Auto),
                                    new ColumnDefinition(1, GridUnitType.Star),
                                },
                                Children = new Perspex.Controls.Controls
                                {
                                    new StackPanel
                                    {
                                        Orientation= Orientation.Horizontal,
                                        Name="marginContainer",
                                        Margin=new Thickness(),
                                    },
                                    new TextView(control)
                                    {
                                        Name = "textView",
                                        HorizontalAlignment = Perspex.Layout.HorizontalAlignment.Stretch,
                                        Margin = new Thickness(5, 0),
                                        [~TextView.CaretIndexProperty] = control[~TextEditor.CaretIndexProperty],
                                        [~TextView.SelectionStartProperty] = control[~TextEditor.SelectionStartProperty],
                                        [~TextView.SelectionEndProperty] = control[~TextEditor.SelectionEndProperty],                                        
                                        [Grid.ColumnProperty] = 2,
                                    }
                                }
                            }
                        }
                    }
                }
            };

            return result;
        }
Editor.paml
TextDocument="{Binding TextDocument, Mode=TwoWay}"
Steven Kirk
@grokys
Dec 03 2015 12:44
you're not binding your TextDocument property in the TextView
Mike-EEE
@Mike-EEE
Dec 03 2015 12:46
@kekekeks ... looks like there is intellisense now in Alpha 3? is that using the new ReSharper goodness in any way or is that all custom to Perspex?
danwalmsley
@danwalmsley
Dec 03 2015 12:46
[~TextView.TextDocumentProperty] = control[~TextEditor.TextDocumentProperty],
thanks @grokys
it would have taken me ages to spot that
Steven Kirk
@grokys
Dec 03 2015 12:47
might be worth defining your styles in xaml now you can do that
Nikita Tsukanov
@kekekeks
Dec 03 2015 12:47
@Michael-DST intellisense was there even in alpha2
See designer improvements section in release announcement
Mike-EEE
@Mike-EEE
Dec 03 2015 12:47
@kekekeks oh. :)
danwalmsley
@danwalmsley
Dec 03 2015 12:47
yeh I will change that! :D
Mike-EEE
@Mike-EEE
Dec 03 2015 12:48
@kekekeks but i don't like to read!!!!!!!
videos pretty
Nikita Tsukanov
@kekekeks
Dec 03 2015 12:48
Well, you'll be reading the answer anyway
Mike-EEE
@Mike-EEE
Dec 03 2015 12:48
haha right!
i don't feel like i've met my quota of asking product owners questions without actually reading anything that they've slaved the work into written form.
so tag, you're it!
Nikita Tsukanov
@kekekeks
Dec 03 2015 12:50
Designer improvements:
  • Zoom
  • Background color configuration
  • Attached property intellisense
  • Markup extension intellisense
  • clr-namespace support
  • Design.DataContext, Design.Width and Design.Height for setting design-time properties.
Johan Larsson
@JohanLarsson
Dec 03 2015 12:52
I often miss being able to set Design.Value on bindings
Mike-EEE
@Mike-EEE
Dec 03 2015 12:52
i hate to ask, how was clr-namespace being used prior?
Nikita Tsukanov
@kekekeks
Dec 03 2015 12:52
OmniXAML has support for it
Mike-EEE
@Mike-EEE
Dec 03 2015 12:52
that is, how were objects being resolved?
Nikita Tsukanov
@kekekeks
Dec 03 2015 12:52
Code editor hadn't
Mike-EEE
@Mike-EEE
Dec 03 2015 12:52
ahhhhhhh
+1
grrr
rusty!
:+1: there we go
Nikita Tsukanov
@kekekeks
Dec 03 2015 12:53
Current completion engine has its limits through
I'll probably be able to implement some support for bindings
But it's hard to guess which datacontext will be associated with the element
Mike-EEE
@Mike-EEE
Dec 03 2015 12:54
@kekekeks have you heard anything more from ReSharper folks for the API you were talking about?
Nikita Tsukanov
@kekekeks
Dec 03 2015 12:54
BTW, @grokys how about strongly-typed data contexts?
Which API?
Mike-EEE
@Mike-EEE
Dec 03 2015 12:54
for Xaml intellisense
Nikita Tsukanov
@kekekeks
Dec 03 2015 12:54
API from R#?
Mike-EEE
@Mike-EEE
Dec 03 2015 12:55
hmmmmm... yeah i forget the name of it... you were supposed to have a meeting with them?
Nikita Tsukanov
@kekekeks
Dec 03 2015 12:55
We can't force our users to buy R#, you know
Oh, the conference is at 11 Dec
Mike-EEE
@Mike-EEE
Dec 03 2015 12:55
oh i know... obviously this is for people who have R# :)
ah cool... soon!
Nikita Tsukanov
@kekekeks
Dec 03 2015 12:55
I have "business" invitation as a speaker of previous one
I'm not sure that I'll come, to be honest
Most of the topics that will be talked about are kinda boring
Mike-EEE
@Mike-EEE
Dec 03 2015 12:56
oh really! cooled off on JetBrains? i forget the name of what you were talking about... basically an API that would help out the different Xaml systems
Nikita Tsukanov
@kekekeks
Dec 03 2015 12:56
So it might be a total waste of a day
And that Nitra guy won't be there
Mike-EEE
@Mike-EEE
Dec 03 2015 12:56
Nitra!
that's it
that's the "API"
guess it's the wrong word
Nikita Tsukanov
@kekekeks
Dec 03 2015 12:57
He was supposed to talk about Nitra at the conference but it seems that he won't be there
Mike-EEE
@Mike-EEE
Dec 03 2015 12:57
bummer... another promising tech being swept under
Nikita Tsukanov
@kekekeks
Dec 03 2015 12:57
Well, it's being actively developed
But not released yet
Mike-EEE
@Mike-EEE
Dec 03 2015 12:58
hmmm.. yeah? think it will see the light of day?
Nikita Tsukanov
@kekekeks
Dec 03 2015 12:58
I guess it's better to leave things as they are for the time being
We have a lot of other things to do
Mike-EEE
@Mike-EEE
Dec 03 2015 12:58
totally.
well if you have intellisense already in the designer, that's pretty rad
is it tied in at all w/ R#? or is it all VS?
prolly all VS
Nikita Tsukanov
@kekekeks
Dec 03 2015 12:59
And writing sophisticated parser will take time
100+ hours

is it tied in at all w/ R#? or is it all VS?

It's tied to my half-assed XML parser

Mike-EEE
@Mike-EEE
Dec 03 2015 13:01
oh noes! an xml parser for the Xaml parsing haha.
Nikita Tsukanov
@kekekeks
Dec 03 2015 13:03
Well, at least it doesn't blow up when it encounters incomplete expression
Mike-EEE
@Mike-EEE
Dec 03 2015 13:03
hahaha
like R# used to do
ALL THE TIME
ASP.NET especially omgggg
Steven Kirk
@grokys
Dec 03 2015 13:07
strongly typed data contexts would be great
Jared Hester
@cloudRoutine
Dec 03 2015 13:26
if you're open to F#, FParsec is a great library for writing parsers
Nikita Tsukanov
@kekekeks
Dec 03 2015 13:27
Have you seen any nitra examples?
You don't need to write any code there
Everything is declarative
Here is their C# grammar files, for example
Jared Hester
@cloudRoutine
Dec 03 2015 13:29
seems like a more verbose yacc
Nikita Tsukanov
@kekekeks
Dec 03 2015 13:29
That stuff will generate parse tree, abstract syntax tree and do all type resolution
They also plan to add MSIL generation
All using declarative rules
Jared Hester
@cloudRoutine
Dec 03 2015 13:30
oh this is nemerle, interesting
Nikita Tsukanov
@kekekeks
Dec 03 2015 13:30
Yep, that stuff will be used as a backend for Nemerle 2 compiler
Jared Hester
@cloudRoutine
Dec 03 2015 13:34
seems similar to FParsec. Define patterns, compose them with combinators
Nikita Tsukanov
@kekekeks
Dec 03 2015 13:35
The juicy part is what happens after building parse tree
Jared Hester
@cloudRoutine
Dec 03 2015 13:36
is it fast?
Nikita Tsukanov
@kekekeks
Dec 03 2015 13:37
they are planning to use it as R# backend
Jared Hester
@cloudRoutine
Dec 03 2015 13:38
I can't manage to keep it installed, but that's easy now that I don't write as much C#
I think I'm cursed to have weird VS problems with R# no matter what
danwalmsley
@danwalmsley
Dec 03 2015 17:01
been working on my text editor.... render loop is leaking memory like crazy... not as bad as it was but still pretty bad
anyway to work out whats causing it?
Nikita Tsukanov
@kekekeks
Dec 03 2015 17:48
Any memory proviler
if you have R# Ultimate you can use dotMemory
Steven Kirk
@grokys
Dec 03 2015 18:54
is it managed or unmanaged memory that's leaking?
Nikita Tsukanov
@kekekeks
Dec 03 2015 19:18
Well, mobile support got less attention than expected
Steven Kirk
@grokys
Dec 03 2015 19:21
yeah?
Jeffrey Stedfast
@jstedfast
Dec 03 2015 19:21
do you guys have a different text layout engine for each backend?
or do you have an abstraction that you use?
Steven Kirk
@grokys
Dec 03 2015 19:22
the Direct2D backend uses DirectWrite, the cairo backend uses Pango
Jeffrey Stedfast
@jstedfast
Dec 03 2015 19:22
hmm
but that won't get you the same text wrapping on each platform
Steven Kirk
@grokys
Dec 03 2015 19:22
i'm not sure what @kekekeks came up with for skia in the end
Jeffrey Stedfast
@jstedfast
Dec 03 2015 19:23
but maybe you guys don't care about that? (not necessarily a bad thing)
skia I think has a text layout engine
Nikita Tsukanov
@kekekeks
Dec 03 2015 19:23
We have FormattedText class that hides implementation details

skia I think has a text layout engine

Where?

Jeffrey Stedfast
@jstedfast
Dec 03 2015 19:23
it's been a while since I looked at skia tho
Steven Kirk
@grokys
Dec 03 2015 19:23
yeah, i'm not so worried atm about slightly different rendering between backends
Nikita Tsukanov
@kekekeks
Dec 03 2015 19:23
I haven't found one
And had to implement line wrapping myself
Jeffrey Stedfast
@jstedfast
Dec 03 2015 19:23
I could be wrong then :)
I haven't looked at skia since the Moonlight project
Nikita Tsukanov
@kekekeks
Dec 03 2015 19:24
BTW, @grokys I think that we'll have to use bait&switch trick in the end
It's better to have one single package
That includes different platform libs for each supported framework
So there won't be "Perspex.Android", "Perspex.iOS" and "Perspex.Desktop"
Steven Kirk
@grokys
Dec 03 2015 19:25
i'm waiting for the net standard platform to get released before i think too much more about packaging
Nikita Tsukanov
@kekekeks
Dec 03 2015 19:25
Just "Perspex" that has different sets of packages for each framework
Well, we need to do that anyway
Since standard platform won't cover platform-specific stuff like native libs anyway
Jeffrey Stedfast
@jstedfast
Dec 03 2015 19:26
I'm surprised you guys aren't using CoreGraphics instead of Skia for iOS?
Steven Kirk
@grokys
Dec 03 2015 19:26
no, true
i think someone did write a coregraphics backend
Nikita Tsukanov
@kekekeks
Dec 03 2015 19:27

I'm surprised you guys aren't using CoreGraphics instead of Skia for iOS?

One backend to rule them all

The point is that we can run Skia tests on our CI server
Jeffrey Stedfast
@jstedfast
Dec 03 2015 19:27
there's definitely an advantage to using the same graphics lib for everything :)
Nikita Tsukanov
@kekekeks
Dec 03 2015 19:27
In case of CG we can't
Jeffrey Stedfast
@jstedfast
Dec 03 2015 19:27
ah, ok
Nikita Tsukanov
@kekekeks
Dec 03 2015 19:27
we may switch to CoreGraphics at some point
Jeffrey Stedfast
@jstedfast
Dec 03 2015 19:27
nod
Nikita Tsukanov
@kekekeks
Dec 03 2015 19:27
But for now we need to get things up and running
Steven Kirk
@grokys
Dec 03 2015 19:27
backends aren't that difficult to write at the moment
Jeffrey Stedfast
@jstedfast
Dec 03 2015 19:28
I just discovered your project like 5 minutes ago
Nikita Tsukanov
@kekekeks
Dec 03 2015 19:28
Backend API is changing every month
Jeffrey Stedfast
@jstedfast
Dec 03 2015 19:28
lol, I just got Larry Ewing reading your layout code
Nikita Tsukanov
@kekekeks
Dec 03 2015 19:28
So it's better to wait until it will be stabilized
Steven Kirk
@grokys
Dec 03 2015 19:28
larry ewing?
the layout code is a bit old - it needs to be revamped i think
for some reason it's super slow
it was one of those things that was like "i need something on screen!" and grew from there
Jeffrey Stedfast
@jstedfast
Dec 03 2015 19:29
larry ewing = the linux penguin guy
Steven Kirk
@grokys
Dec 03 2015 19:30
ha, i didn't know that was his name!
Jeffrey Stedfast
@jstedfast
Dec 03 2015 19:30
have you guys seen this? https://github.com/mono/moon
Steven Kirk
@grokys
Dec 03 2015 19:30
yep, we ripped a fair few things from there
Jeffrey Stedfast
@jstedfast
Dec 03 2015 19:30
it's a dead project now, but it may have useful tidbits
Nikita Tsukanov
@kekekeks
Dec 03 2015 19:30
I hope he won't sue me for messing with Tux in our first video
Jeffrey Stedfast
@jstedfast
Dec 03 2015 19:31
ah, Larry Ewing and I worked on that project :)
Steven Kirk
@grokys
Dec 03 2015 19:31
our Grid is ported from moonlight, ported from C++ to C#
i have no idea how it works
;)
Jeffrey Stedfast
@jstedfast
Dec 03 2015 19:31
lol
glad you guys are able to salvage some stuff from there
Steven Kirk
@grokys
Dec 03 2015 19:31
it wasn't you who write Grid?
Jeffrey Stedfast
@jstedfast
Dec 03 2015 19:31
no, I didn't write Grid
Steven Kirk
@grokys
Dec 03 2015 19:31
yeah, less than i'd have liked due to the C++ness of a lot of it
Jeffrey Stedfast
@jstedfast
Dec 03 2015 19:31
it might have been Larry
looks like it was a mix of people
Steven Kirk
@grokys
Dec 03 2015 19:33
yeah, your name is down as contributor
Jeffrey Stedfast
@jstedfast
Dec 03 2015 19:33
but larry did most of the Moonlight layout logic
I mostly did text layout stuff
Steven Kirk
@grokys
Dec 03 2015 19:33
it's a shame you guys didn't get SharedSizeScope done
Jeffrey Stedfast
@jstedfast
Dec 03 2015 19:33
like TextBlock, TextBox, etc
Steven Kirk
@grokys
Dec 03 2015 19:34
ah ok - we might be coming to you for advice at some point then ;)
Jeffrey Stedfast
@jstedfast
Dec 03 2015 19:34
when was that introduced? I don't recall that class
Nikita Tsukanov
@kekekeks
Dec 03 2015 19:34
It was ported from C++
Steven Kirk
@grokys
Dec 03 2015 19:34
maybe SharedSizeScope isn't in silverlight
Nikita Tsukanov
@kekekeks
Dec 03 2015 19:34
this one I guess
Oh
Jeffrey Stedfast
@jstedfast
Dec 03 2015 19:35
I meant SharedSizeScope :)
Nikita Tsukanov
@kekekeks
Dec 03 2015 19:35
nvm
Steven Kirk
@grokys
Dec 03 2015 19:35
he wrote part of grid.cpp ;)
Jeffrey Stedfast
@jstedfast
Dec 03 2015 19:35
I think we stopped working on it around SL4, so maybe it was added in SL5?
Steven Kirk
@grokys
Dec 03 2015 19:35
perhaps
Jeffrey Stedfast
@jstedfast
Dec 03 2015 19:35
it's definitely good that you guys are writing this all in C#
Nikita Tsukanov
@kekekeks
Dec 03 2015 19:35
Well, not all
Skia-backend is partly in C++
Steven Kirk
@grokys
Dec 03 2015 19:36
yeah, i heard miguel said he regretted doing so much of moonlight in C#
Nikita Tsukanov
@kekekeks
Dec 03 2015 19:36
Since Skia is C++ lib
Jeffrey Stedfast
@jstedfast
Dec 03 2015 19:36
the native/managed transitions (each c# class had a c++ equiv) was brutal
well, yea
Steven Kirk
@grokys
Dec 03 2015 19:36
our C++ portion is pretty small though i think right?
Jeffrey Stedfast
@jstedfast
Dec 03 2015 19:36
but I mean a big mistake we made was having a c++ object for each managed object
(more or less)
Steven Kirk
@grokys
Dec 03 2015 19:36
i regret that you did so much of moonlight in C++! ;)
Nikita Tsukanov
@kekekeks
Dec 03 2015 19:36
oh
Steven Kirk
@grokys
Dec 03 2015 19:37
i'm sure it made sense at the time... ;)
Jeffrey Stedfast
@jstedfast
Dec 03 2015 19:37
the higher level c# classes din't have a native side, but most of the core controls did
yea, we thought it'd be faster
it was a case of premature optimization :(
Steven Kirk
@grokys
Dec 03 2015 19:37
yea
Jeffrey Stedfast
@jstedfast
Dec 03 2015 19:38
also SL1.1 was largely native
Steven Kirk
@grokys
Dec 03 2015 19:38
i wanted to steal your layout code but... all in C++
Nikita Tsukanov
@kekekeks
Dec 03 2015 19:38
I'm also considering to implement windowing backend in C++, so we won't depend on bindings. That will allow to run on top of coreclr on *nix platforms
But everything else should be in C#, I guess
Jeffrey Stedfast
@jstedfast
Dec 03 2015 19:39
nod, I'd definitely suggest keeping as much in c# as you can
Steven Kirk
@grokys
Dec 03 2015 19:39
yeah, i'm unsure about that, makes sense in some ways, less so in other ways
but having to rely on the frankly pretty shaky gtk-sharp just to get a window onscreen on linux isn't ideal
Nikita Tsukanov
@kekekeks
Dec 03 2015 19:39
Platform support layer is isolated anyway, so writing a part of it in C++ shouldn't be an issue
Steven Kirk
@grokys
Dec 03 2015 19:40
gtk-sharp also means that nugetting stuff is harder as there's no package
Nikita Tsukanov
@kekekeks
Dec 03 2015 19:42
We still need GTK through
Steven Kirk
@grokys
Dec 03 2015 19:42
but maintaining our own C++ lib for taking to gtk for each flavor of linux is frankly scary
yeah, i'm just talking about gtk-sharp
Nikita Tsukanov
@kekekeks
Dec 03 2015 19:42
That lib can also be used for MacOS
to avoid GTK dependency at all
Steven Kirk
@grokys
Dec 03 2015 19:43
yeah, i dunno... pros and cons
Nikita Tsukanov
@kekekeks
Dec 03 2015 19:43
And just use UIWindow and GLKView
As iOS backend currently does
Steven Kirk
@grokys
Dec 03 2015 19:43
probably @jstedfast has some experience here
Jeffrey Stedfast
@jstedfast
Dec 03 2015 19:46
well, in moonlight, since we were using c++, we just linked with gtk
and didn't have to use gtk-sharp
Steven Kirk
@grokys
Dec 03 2015 19:49
yeah, what i mean is would you advise writing our own limited C++ bindings for talking to GTK/OSX etc instead of relying on gtk-sharp?
Nikita Tsukanov
@kekekeks
Dec 03 2015 19:49
the thing is that we don't need bindings
We need IWindowImpl implementation
Jeffrey Stedfast
@jstedfast
Dec 03 2015 19:49
oh
Steven Kirk
@grokys
Dec 03 2015 19:50
ok, probably bindings is the wrong word
lets say C++ windowing backend
Jeffrey Stedfast
@jstedfast
Dec 03 2015 19:50
it looks like we had a minimal abstraction over Window: https://github.com/mono/moon/blob/master/src/pal/window.h
Steven Kirk
@grokys
Dec 03 2015 19:50
or even, could we p/invoke?
like we do on win32
Jeffrey Stedfast
@jstedfast
Dec 03 2015 19:50
it definitely might be worth p/invoking
Nikita Tsukanov
@kekekeks
Dec 03 2015 19:51
P/Invoking GTK and UIKit?
Seriously?
Steven Kirk
@grokys
Dec 03 2015 19:51
i've never tried p/invoke away from windows, so i don't know if it even works?
Jeffrey Stedfast
@jstedfast
Dec 03 2015 19:51
well, UIKit would be painful
gtk... it depends on how much you need
Nikita Tsukanov
@kekekeks
Dec 03 2015 19:51
Better have one managed<->native API for all platforms
And if someone will need to run perspex on some exotic platform
He will only need to recompile stuff
Steven Kirk
@grokys
Dec 03 2015 19:53
for win32 as well?
Nikita Tsukanov
@kekekeks
Dec 03 2015 19:53
And all changed #defines will be supported automatically
Well, why not?
It's easier to deal with native structs from C/C++
Steven Kirk
@grokys
Dec 03 2015 19:53
because i'd prefer to keep as much as possible managed, and p/invoke on windows works well
Nikita Tsukanov
@kekekeks
Dec 03 2015 19:54
Well, not quite
I'm getting Win32Exception from time to time
Steven Kirk
@grokys
Dec 03 2015 19:54
class already registered?
yeah that's a really weird one
Nikita Tsukanov
@kekekeks
Dec 03 2015 19:55
Parameter is incorrect
or something like that
Steven Kirk
@grokys
Dec 03 2015 19:55
oh not sure i've seen that one
but i'm not sure putting C++ into the mix would improve stability!
Nikita Tsukanov
@kekekeks
Dec 03 2015 19:55
Implementing system dialogs also was painful
Steven Kirk
@grokys
Dec 03 2015 19:56
yeah, you know much more about this low-level stuff than me
Nikita Tsukanov
@kekekeks
Dec 03 2015 19:56
We can even just take ATL or something
Steven Kirk
@grokys
Dec 03 2015 19:56
so if you say "yep it'd be better with a C++ blob" i'll believe you
Nikita Tsukanov
@kekekeks
Dec 03 2015 19:56
And let it handle windowing stuff
Steven Kirk
@grokys
Dec 03 2015 19:56
but i'm still quite uncomfortable with the idea ;)
Nikita Tsukanov
@kekekeks
Dec 03 2015 19:57
We may keep current backend for the time being
for win32
But initial version will be developed on Windows anyway, so...
Steven Kirk
@grokys
Dec 03 2015 19:57
i think that makes sense
Nikita Tsukanov
@kekekeks
Dec 03 2015 19:57
Well, I might as well use GTK for initial version
That will speed up things
Steven Kirk
@grokys
Dec 03 2015 19:58
i did C++ for about 8 years in the 90s. there are still scars.
i never want to spend a day debugging linker flags ever again ;)
Nikita Tsukanov
@kekekeks
Dec 03 2015 19:59
ahahah
Take a look on my skia lib repack scripts then
Steven Kirk
@grokys
Dec 03 2015 20:00
where are they?
Steven Kirk
@grokys
Dec 03 2015 20:01
is that in russian? ;)
Nikita Tsukanov
@kekekeks
Dec 03 2015 20:02
It's in some mix of latin, telugu and the language of aztecs
I guess
Steven Kirk
@grokys
Dec 03 2015 20:02
haha
i have written precisely 2 bash scripts in my life
Nikita Tsukanov
@kekekeks
Dec 03 2015 20:03
But at least it produces one fat static library, which is nice
Nikita Tsukanov
@kekekeks
Dec 03 2015 20:09
BTW, what exactly happens when tab page is opened for the first time? For some reason it's very slow on mobile
After page was opened at least once it's all smooth (well, excluding "Lists" page on Android that takes ~5 seconds to open anyway)
My first guess it that skia does some font loading, but I'm not sure about that
Steven Kirk
@grokys
Dec 03 2015 20:17
i'm not entirely sure - you see it on desktop a little as well when opening the lists tab
there are some things that are using on the visual tree that should use the logical tree
i'm hoping fixing that will speed things up a little, as stuff is getting attached/detached more than it needs to
Wiesław Šoltés
@wieslawsoltes
Dec 03 2015 21:28
@grokys Regarding issue Perspex/Perspex#323
I have refactored my DataTemplates and got this working
Steven Kirk
@grokys
Dec 03 2015 21:29
ok cool - i want to fix the underlying issue anyway though
Wiesław Šoltés
@wieslawsoltes
Dec 03 2015 21:29
now DataTemplate only contains UserControl
<DataTemplate DataType="core:XPoint">
    <shapes:PointControl/>
</DataTemplate>

ok cool - i want to fix the underlying issue anyway though

Yeah, sure. I just had to do refactoring

I have now like 50 UserControls :smile: but the xaml is loading very fast
danwalmsley
@danwalmsley
Dec 03 2015 21:52
do you guys notice that text rendering in perspex is all a little blurry?
Steven Kirk
@grokys
Dec 03 2015 22:06
no, i've not noticed that
danwalmsley
@danwalmsley
Dec 03 2015 22:06
hang on il try a print screen
blob
if you see my app in foreground and compare text to Visual studio in the background
Steven Kirk
@grokys
Dec 03 2015 22:08
hmm it's not like that on my machine
blob
danwalmsley
@danwalmsley
Dec 03 2015 22:09
must be different dpi
Steven Kirk
@grokys
Dec 03 2015 22:09
that would be my guess yeah
danwalmsley
@danwalmsley
Dec 03 2015 22:09
do we need to implement snap to pixels?
Steven Kirk
@grokys
Dec 03 2015 22:14
yeah we do
danwalmsley
@danwalmsley
Dec 03 2015 22:15
I checked my display settings, had 125% scaling on
Nikita Tsukanov
@kekekeks
Dec 03 2015 22:15
@danwalmsley try with Skia
it uses GDI drawing
danwalmsley
@danwalmsley
Dec 03 2015 22:15
and I changed back and its ok now
Nikita Tsukanov
@kekekeks
Dec 03 2015 22:15

I checked my display settings, had 125% scaling on

oh, that's the cause

danwalmsley
@danwalmsley
Dec 03 2015 22:15
@kekekeks how do I tell it to use skia?
Nikita Tsukanov
@kekekeks
Dec 03 2015 22:16
Currently we don't support DPI scaling
danwalmsley
@danwalmsley
Dec 03 2015 22:16
ah ok thats cool then
Nikita Tsukanov
@kekekeks
Dec 03 2015 22:16
So windows scales stuff after it's being rendered
DPI scaling is only supported for mobile devices and designer
danwalmsley
@danwalmsley
Dec 03 2015 22:26
did anyone implement iscroll interface?
Nikita Tsukanov
@kekekeks
Dec 03 2015 22:27
Nope
Wiesław Šoltés
@wieslawsoltes
Dec 03 2015 22:39
pd.PNG
@kekekeks I'm getting a lot of instances of Perspex.Designer not killed
Nikita Tsukanov
@kekekeks
Dec 03 2015 23:24
That's weird
even after build?
Darnell Williams
@Seeker1437
Dec 03 2015 23:42
hmmmm
Darnell Williams
@Seeker1437
Dec 03 2015 23:48
AH I think i see why
One thing I meant to do before @kekekeks took over
@kekekeks You need to kill the designer process associated with a IWpfTextView if it is closed. I think that might help a little bit, unfortunately I don't understand DesignerKiller enough to add what needsto be added. But something makes me thing we need to use metadata to help with this.
Nikita Tsukanov
@kekekeks
Dec 03 2015 23:54
Hm
Well, you should be able to call _host.Kill
I still need to finish some work tonight
Then I'll be able to see what's happening there
Darnell Williams
@Seeker1437
Dec 03 2015 23:55
ill do a PR with it
to so you can review it
Nikita Tsukanov
@kekekeks
Dec 03 2015 23:57
I'm not sure that I've pushed latest changes to the main repo
sychronized
_designer should have Kill method or something
Darnell Williams
@Seeker1437
Dec 03 2015 23:59
yeah :D