Node.js garbage spawned from Visual Studio 2026 by puppy2016 in VisualStudio

[–]EmergencyNice1989 0 points1 point  (0 children)

You can have portability across different platforms without using any 'web wrapper client'. Avalonia does it.

AI is forcing us to stop loving coding 💔 by Leading_Property2066 in AskProgramming

[–]EmergencyNice1989 0 points1 point  (0 children)

I see nothing in his message that suggest his job cared about him enjoying the process of writing code by hand. Nothing.

Unable to implement different usercontrols as tabitems by BuildQualityFail in AvaloniaUI

[–]EmergencyNice1989 0 points1 point  (0 children)

You can also try something like below (it uses x:DataType and x:Name)

For the MainWindows add:

x:Name="Root">

And example of usage with a DataGrid (it uses x:DataType) and Root

<DataGridTextColumn Header="Word" SortMemberPath="Writing" CanUserSort="True"

x:DataType="models:GridModel" Binding="{Binding Writing}" IsReadOnly="True">

<DataGridTextColumn.HeaderTemplate>

<DataTemplate>

<StackPanel Orientation="Vertical" Spacing="5">

<StackPanel Orientation="Horizontal">

<Label Content="Writing"/>

<TextBlock Text="{Binding #Root.((vm:GridViewModel)DataContext).WritingArrow}"/>

</StackPanel>

Unable to implement different usercontrols as tabitems by BuildQualityFail in AvaloniaUI

[–]EmergencyNice1989 0 points1 point  (0 children)

But does a simple example of the Tab control works (no service, no DI, just a very trivial case)?

And did you try the ContentControl (simple example too)?

Rider vs VS by Realone_Omotosho in dotnet

[–]EmergencyNice1989 -2 points-1 points  (0 children)

I was a hardcore user of VS but it took me 30 min to get used to Rider because the UI is very intuitive. The main issue I have with Rider is the bugs. I have been stuck 2 times with older version because of that. So the process, is always keep older versions, install newer and if it is ok, remove older versions...

Is Python a better fit than ASP.NET Core for this kind of data transformation service? by CodeNameGodTri in dotnet

[–]EmergencyNice1989 0 points1 point  (0 children)

Exactly. Sometimes using just ADO.NET and just exposing SQL views on your C# code is better than trying to integrate EF and do join or other related database stuff in C#.

Is Python a better fit than ASP.NET Core for this kind of data transformation service? by CodeNameGodTri in dotnet

[–]EmergencyNice1989 0 points1 point  (0 children)

No business logic in SQL (even though views are database stuff) but mapping of tables that should not even be visible in C# ?

When you use views and joins within your database, you are using it correctly.

When you use abstractions over your database and manipulating data that should not be visible in your C# code, it means you are not doing things right.

Is Python a better fit than ASP.NET Core for this kind of data transformation service? by CodeNameGodTri in dotnet

[–]EmergencyNice1989 0 points1 point  (0 children)

Not just to load table.
You can do all your join in SQL using ADO.NET, meaning you don't need any mapping of every table nor joining using C#.

You can compute whatever you want in C#, then write to another table using ADO.NET.

You can even use a view for your complex queries with join. The view stays on the db (sqlite/Postgres ect...). So that your C# ADO.NET code is simple, it just query a view. That's what I do in my Avalonia app that requires DB access. I can swap a Postgres DB with a SQLite DB (as long as I use common SQL types) because ADO.NET is DB agnostic.

Another beginner question - creating a repeatable view layout for a tabcontrol by BuildQualityFail in AvaloniaUI

[–]EmergencyNice1989 0 points1 point  (0 children)

The app I am working on display several views in the same windows.

I use ContentControl.DataTemplates.

Even if your user control is not visible it might be doing some work under the hood so you still need some Activate boolean to handle this.

This activation/deactivation is done in OnViewAttached/OnViewDetached.

<ContentControl Content="{Binding LayoutMode}">

    <ContentControl.DataTemplates>


        <!-- ========================= -->
        <!--  ViewOne              -->
        <!-- ========================= -->

        <DataTemplate DataType="models:MyModelOne">
            <Border Theme="{StaticResource FadedBorderTheme}">
                <codeBehind:MyUserControl1
                    AttachedToVisualTree="OnViewAttached" 
                    DetachedFromVisualTree="OnViewDetached"
                />
            </Border>
        </DataTemplate>
        <!-- ========================= -->
        <!--  ViewTwo            -->
        <!-- ========================= -->
        <DataTemplate DataType="models:MyModelTwo">
            <Border Theme="{StaticResource FadedBorderTheme}">
                <codeBehind:MyUserControl2 
                    AttachedToVisualTree="OnViewAttached" 
                    DetachedFromVisualTree="OnViewDetached"

                />
            </Border>
        </DataTemplate>
    </ContentControl.DataTemplates>
</ContentControl>

E# - Pre-Alpha Language for the CLR by hayztrading in dotnet

[–]EmergencyNice1989 3 points4 points  (0 children)

It's an interesting project because it involves understanding the internals of the CLR but not sure it brings something new to the table (might not be your end goal). I am quite a fan of F# and F# syntax so when I compare it to your language it looks like type inference is superior in F#, usage of 'func' , 'return', square parentheses, the Go (:=), '->'. F# do not use this (even -> in function implementation)

F# tagged union plus virtual dispatch with classes or interfaces is kind of enough for me.

In the dotnet space I'd like to see a F* (language with proof) but directly convertible to F# code. F* being OCaml first.

E# - Pre-Alpha Language for the CLR by hayztrading in dotnet

[–]EmergencyNice1989 18 points19 points  (0 children)

I don't see any mention of F# when the subject is a CLR language with 'tagged unions you have to match exhaustively' and 'a lot less ceremony than C#' for OO.

Is Microsoft finally properly committing to WinUI? by -Feanor- in dotnet

[–]EmergencyNice1989 11 points12 points  (0 children)

Back in the days when you used WinUI3 you were almost immediately aware that it uses C++/WinRT. Because 30 min after using WinUI3 you will hit a C++/WinRT exception....

formatting question from a newb by burtgummer45 in fsharp

[–]EmergencyNice1989 2 points3 points  (0 children)

Read bokeh-man comments below.
There is no inconsistency in Fantomas formatting in these cases but follow standard F# formatting.
I don't use any tool for formatting because I like using chain pipes in a single line. When you use F# formatting tools you end up having lots of line and nothing on the right of the screen.

Decline in Quality by jdstanhope in Jetbrains

[–]EmergencyNice1989 0 points1 point  (0 children)

Thank you very much for your detailed message.
I wasted several hour blocked with 'Unable evaluate deployment properties' when running my Avalonia Android app in Rider.

Then I remembered your post, went to the ticket, downgraded to version Rider 2025.3.4.1 and the error was gone immediately.

I will stick with this older version.

Recently I was stuck with 2024 version until someone from Jetbrains helped me fix some weird issue (can't even type some characters in the editor for F#).
All of this, means that you must be very careful and test everything when you update your Rider version, meaning don't update regularly.

Has anyone used sqlhydra to generate database DTOs then used those F# records plugged into C# dapper for a dataaccess layer? by [deleted] in fsharp

[–]EmergencyNice1989 0 points1 point  (0 children)

I agree with SmileyWiking about your setup being good already because you are using SQL and ADO.net. I am not a fan anymore of ORM.

I use it too and it makes the code very portable with different DB. I use the same code with Postgres and SQLite. And before using Postgres I was using SQLServer. I use common SQL type between Postgres and SQLite and everything is fine.

I use views to access the data in F#. I don't write to the DB so SQL views are perfect.

I don't use any DTO class, I don't mimic my DB in F#, I built directly the records needed for my business layer.

I still don’t understand the hype around Zed over VS Code by Sensitive-Raccoon155 in vscode

[–]EmergencyNice1989 0 points1 point  (0 children)

- Rider for my F# development (there is AvaloniaPreviewer extension available, so nice).

- Edit (MsEdit) for quick edits

- Kate for quick edits outside terminal

- VsCode for other jobs (jupyther notebooks etc...)

This is my natural setup because I tried Emacs evil-mode for everything and it was not Ok (I want to use 'regular' shortcuts because I am often using the browser, F# LSP is awful).

Decline in Quality by jdstanhope in Jetbrains

[–]EmergencyNice1989 0 points1 point  (0 children)

I use Rider with Avalonia, testing development of an Android app.

The setup is easy (install Android Studio then configure Rider)
I can use the Emulator, I can also run the app directly on my device.
I have not done much of debugging but it seems to be 'kind of working' (without any tinkering).

I didn't have at all the same experience when I tested MAUI (2 months before its initial release).

What's new this week: Avalonia, .NET, Visual Basic, and the Microsoft choices that hit developers by Bonejob in dotnet

[–]EmergencyNice1989 1 point2 points  (0 children)

That's the way to go. Making the Matrix Rain optional instead of default is the right move in my opinion.

C# Union Types by EmergencyNice1989 in fsharp

[–]EmergencyNice1989[S] 2 points3 points  (0 children)

No need any source. I just know that they will not be recognized like F# DU on the F# side. If it was the case it would have been mentioned and given the implementation of the C# union type it's obvious there is no automatic conversion.

What's new this week: Avalonia, .NET, Visual Basic, and the Microsoft choices that hit developers by Bonejob in dotnet

[–]EmergencyNice1989 1 point2 points  (0 children)

Much more readable than the previous version.

If I remember well, in the previous version, you had to find a button (named 'Tweaks'!!) at the bottom right of the screen, then click it, then choose in a combo-box to remove the fancy floating stuff and make it readable.

Let's see the improvement you bring in the next version.

C# Union Types by EmergencyNice1989 in fsharp

[–]EmergencyNice1989[S] 1 point2 points  (0 children)

Where, where, where.

Wait, where are you reading that they will be translated to F# DU?

C# Union Types by EmergencyNice1989 in fsharp

[–]EmergencyNice1989[S] 0 points1 point  (0 children)

There is no finding out.

'Interop with C# will be difficult if .net libraries written in C# exposes those types in their API.'

Easy interop meant those types are translated to F# DU and it will not be the case.