Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
MStrehovsky
searching Neon…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
7 ms
·
1.
▲
by
MStrehovsky
2y ago
Do you have data backing that up? Per https://github.com/MichalStrehovsky/sizegame : C#: 945 kB Go: 2174 kB Both are EXEs you just copy to the machine, no separate runtime needed, talks directly to the OS.
2.
▲
by
MStrehovsky
2y ago
Is AOT compiling your binaries [1] an option for you? The starting size of AOT compiled C# can beat Go in size [2] and from there it really depends on what you do and how you do it. Some simple ASP.NET server with https and routing can comf
3.
▲
by
MStrehovsky
3y ago
> Fair enough; perhaps it'd be worthwhile to throw a compiler error if both reflection and trimming were attempted. The tooling already generates warnings for any spot in the program that uses reflection _in a way that cannot be sta
4.
▲
by
MStrehovsky
3y ago
Someone with an iPhone told me the webm video embedded in the article still doesn't work on iPhones in 2024 so here's another link to the video: https://twitter.com/MStrehovsky/status/1742101904250060842
5.
▲
by
MStrehovsky
3y ago
It's a webm, looks like Apple still didn't implement it on iPhones. Here is another version of the video on a website that may work better on iPhones: https://twitter.com/MStrehovsky/status/17421019042500
6.
▲
by
MStrehovsky
3y ago
The repo does mention the Pi. I just forgot to talk about the Pi specifically in the article, sorry. https://github.com/MichalStrehovsky/uefimaze
7.
▲
Top whole program optimizations in .NET 8 native AOT
(migeel.sk)
1 points
by
MStrehovsky
3y ago
|
0 comments
8.
▲
by
MStrehovsky
3y ago
Here's an example [1] of a device driver in C#. It is possible. It is also not recommended. [1] https://github.com/VollRagm/KernelSharp
9.
▲
Smolsharp: Small standalone C# executables using NativeAOT
(github.com)
4 points
by
MStrehovsky
3y ago
|
0 comments
10.
▲
by
MStrehovsky
4y ago
I also like the less heavyweight approach where one can compose tools to do things. The existing .NET tooling is so entwined with MSBuild that one can't even (easily) invoke the C# compiler without an MSBuild project file. Don't g
11.
▲
by
MStrehovsky
4y ago
This is using Microsoft's standard libraries and compiler parts. All of .NET is MIT licensed so this kind of remixing is super easy.
12.
▲
by
MStrehovsky
4y ago
ZeroSharp is done by the same person as bflat (me). These ZeroSharp samples get broken all the time because they bend the MSBuild targets that ship with .NET to an extreme. Bflat is a more supportable route and has a couple extra customizat
13.
▲
by
MStrehovsky
4y ago
The crosscompilation on Go to mac is pretty limited. That's why I wrote "need to reach dependencies beyond what libc offers". If you crosscompile Go from Linux to mac, you'll actually get a different binary than if you c
14.
▲
by
MStrehovsky
4y ago
TL;DR: It's work. The way exceptions are done in .NET is by keeping track of extra metadata to be able to unwind methods (remove them from the execution stack) and execute handlers. That way the overhead of exception handling is close
15.
▲
by
MStrehovsky
4y ago
I want bflat to be able to crosscompile from anything to anything. Apple's platforms are difficult to crosscompile for - most instructions I've seen that need to reach dependencies beyond what libc offers require one to copy files
16.
▲
by
MStrehovsky
4y ago
Some executable file formats have time stamps in them. bflat follows the platform convention that respects this and writes current date/time in the file header by default. It is also a platform convention to offer options to set these
17.
▲
by
MStrehovsky
4y ago
dflat could imply it has something do to with dlang. bflat triggers a lot of engagement on Twitter and elsewhere because everyone wants to correct it. Couldn't have chosen a better name.
18.
▲
by
MStrehovsky
4y ago
bflat author here - happy to answer questions. I think at this point https://flattened.net/ is a better introduction to bflat than the repo. The repo also links to it, but wanted to highlight it.
19.
▲
C# Kernel Mode Driver to read and write memory in protected processes
(github.com)
2 points
by
MStrehovsky
5y ago
|
0 comments
20.
▲
by
MStrehovsky
5y ago
> 212kB Here's a 11 kB bootable x86-64 version of the game written in C# https://github.com/kant2002/SeeSharpSnake/tree/kant/uefi#run... . There's an accompanying article with a video at the
21.
▲
by
MStrehovsky
5y ago
(Author here, I hang out on HN.) Yup. There's really not much extra code in bflat compared to what's in the dotnet/runtimelab repo (in the NativeAOT branch). This just packages things differently so that one doesn't need
22.
▲
by
MStrehovsky
5y ago
Pass the multiple files to `bflat build`. Or if you run `bflat build` without arguments, it will compile all *.cs files in the current directory. Not great, but works for now.
23.
▲
by
MStrehovsky
5y ago
As a C# dev I'm sometimes envious of the experience that Go devs have around building small selfcontained executables. Type a few lines into a .go file, `go build` the file and you have an executable that you can give to anyone and it
24.
▲
Show HN: C# compiler with Go-like tooling (build small/standalone/native apps)
(github.com)
14 points
by
MStrehovsky
5y ago
|
1 comments
25.
▲
by
MStrehovsky
6y ago
Ironic that this news from Poland comes a day after activists go on trial for replacing halos with rainbows in a picture in Poland: https://www.dailymail.co.uk/news/article-9142821/Poland-tria...
26.
▲
Add hack to keep `actix-web` and `actori-web` compiling
(github.com)
2 points
by
MStrehovsky
6y ago
|
0 comments
27.
▲
by
MStrehovsky
6y ago
Here's another Snake game that can fit in a QR code, this one written in C#: https://twitter.com/MStrehovsky/status/1214955696556515331 (It doesn't need a .NET runtime; it's fully self-contained and
28.
▲
by
MStrehovsky
7y ago
(Author of the "C# on Windows 3.11" hack here - and a Slovak.) I would say the concentration of Czech/Slovak people around .NET at MS is a result of accidents and networking. I got into the team thanks to a friend of a friend
29.
▲
by
MStrehovsky
7y ago
My tweet has the "friend" link that should avoid the Medium paywall (sorry): https://twitter.com/MStrehovsky/status/1213034748848807937
30.
▲
by
MStrehovsky
7y ago
I spent more time doing the Snake logic than adding the soup of weird things around it to make it small. I had the weird things lying around from when I did an EFI boot application in C# last year: https://github.com/MichalS
More ›