HN user

zastrowm

1,048 karma
Posts31
Comments62
View on HN
aws.amazon.com 3y ago

Amazon CodeCatalyst – Unified Software Development Service

zastrowm
12pts0
monorepo.tools 4y ago

Everything you need to know about monorepos, and the tools to build them

zastrowm
1pts0
uncrunched.com 8y ago

The Real History of TechCrunch

zastrowm
356pts89
blogs.msdn.microsoft.com 8y ago

Language Server Protocol Preview Release for Visual Studio

zastrowm
3pts0
www.blog.google 9y ago

Improvements to searching for special characters in programming languages

zastrowm
2pts0
news.dartlang.org 9y ago

Sound Dart and strong mode

zastrowm
3pts0
blog.google 9y ago

Partnering with global carriers to upgrade SMS

zastrowm
1pts0
blog.axosoft.com 9y ago

Introducing GitKraken Pro

zastrowm
1pts0
eager.io 10y ago

The History of the URL: Path, Fragment, Query, and Auth

zastrowm
1pts0
blogs.msdn.microsoft.com 10y ago

Windows Subsystem for Linux: File System Support

zastrowm
4pts0
www.recode.net 10y ago

Here's Why Amazon Isn't Selling Apple TV and Google Chromecast

zastrowm
1pts0
blogs.msdn.microsoft.com 10y ago

Mobile App Development Made Easy with Visual Studio and Xamarin

zastrowm
2pts0
victorsavkin.com 10y ago

Deep Work

zastrowm
3pts0
support.google.com 10y ago

Google Contributor now refunds unused funds

zastrowm
2pts0
www.dotnetfoundation.org 10y ago

Live Writer Is Now Open Source

zastrowm
155pts26
jeremydmiller.com 10y ago

My Thoughts on Choosing and Using Persistence Tools

zastrowm
1pts0
msdn.microsoft.com 10y ago

Essential .NET – Designing C# 7

zastrowm
4pts2
insidethecpu.com 10y ago

NET CLR Explained |

zastrowm
1pts0
chrome.blogspot.com 10y ago

Google Chrome Blog: Faster, Smoother and Safer Videos on Chrome

zastrowm
1pts0
medium.com 10y ago

The Future of Layout with CSS: Grid Layouts

zastrowm
2pts2
mrale.ph 11y ago

What's up with monomorphism?

zastrowm
19pts1
news.dartlang.org 11y ago

The present and future of editors and IDEs for Dart

zastrowm
3pts0
blogs.wsj.com 11y ago

Google Strikes an Upbeat Note with FCC on Title II

zastrowm
42pts13
blog.nuget.org 11y ago

NuGet: In the Platform

zastrowm
1pts0
chrome.blogspot.com 11y ago

Adobe joins the Chromebook party, starting with Photoshop

zastrowm
368pts245
blogs.msdn.com 11y ago

Moving to the .NET Framework 4.5.2

zastrowm
1pts0
www.cnet.com 12y ago

Google takes Chrome 64-bit for speed boost on Windows

zastrowm
2pts1
roslyn.codeplex.com 12y ago

C# Language Design Notes

zastrowm
2pts0
techcrunch.com 12y ago

Microsoft Will Soon Bring Back The Start Menu In Windows 8.1

zastrowm
371pts290
blogs.msdn.com 12y ago

Announcing TypeScript 1.0RC

zastrowm
12pts2

The charitable view would be that they come from language/platform that does include the base-class's methods/apis.

Your example of dotnet/C# doesn't seem to be the best - DotNet/C# repeats the base documentation - for example the SaveFileDialog class [1] lists all of the methods but indicates when the methods come from the base class.

Flutter also seems to list inherited methods - for example the TextButton [2].

[1] https://learn.microsoft.com/en-us/dotnet/api/system.windows....

[2] https://api.flutter.dev/flutter/material/TextButton-class.ht...

I liked Edge originally too - it seemed cleaner than chrome and had some cool features like vertical tabs and the Dev tools that were better than Chrome's. I made it my daily driver.

Then they adding a shopping helper; then more ads to the new start-page; then a notification about Microsoft rewards; then popups about how "Bing is better" or that "Bing AI" was there to help - don't forget the "Open links in Edge on Mobile" popup; then they added a side toolbar with a giant B[ing] button that wasn't removable unless you toggled a group policy (now there's an option for it). The damn button was the last straw for me because of the amount of work I needed to do to just disable it.

I just want to get on my computer - do a few things and get some stuff done

Yeah, so do I and Edge kept getting in the way to keep telling me about all the new things that Microsoft things I should use.

Chrome isn't great - the privacy sandbox/built-in interests stuff is disgusting - but Chrome wasn't as "in your face" so I could just start it and go. Brave avoided the the privacy sandbox and now Firefox works for me everywhere.

I find the best middle ground is setting up the IDE to have TSC watch running while making changes, but using other tools for doing the actual compiling (vite for example). This allows me to refactor quickly - choosing when to ignore type errors - but also be notified of all the other call sites that I need to update, including in all of the files not currently open in the editor.

For this specific example the problem is that the handleClick callback is using a stale/cached onImageDeleted callback (which indirectly has old state). If you add onImageDeleted to the handleClick dependency array, it beings to work as you expect.

The Deno Company 5 years ago

I think the point was that it's not different from Node.js - and thus not much of a benefit.

If it was more along the lines of "I want to use this array helper library, but it shouldn't have any permissions" then it would be a lot more useful, but right now if your Deno app needs any file or network access, then all of your dependencies get access too.

Yeah, but I wonder if .NET wouldn't have succeeded until .NET Core without generics as a distinguishing feature. I feel like generics + some of the features built on them (LINQ+TPL+etc.) is what let .NET/C# stand apart from Java.

I'm not necessarily saying it would have failed, but I do wonder :: )

This surprised me:

It was only through the total dedication of Microsoft Research, Cambridge during 1998-2004, to doing a complete, high quality implementation in both the CLR (including NGEN, debugging, JIT, AppDomains, concurrent loading and many other aspects), and the C# compiler, that the project proceeded.

I didn't realize that it was less a "must-have" and more of a "research and if-possible" task. I wonder how the .NET framework/languages would have changed if they went with type erasure. Would we even still talking about .NET today?

I crave this for C#/.NET; I was hoping the article was going to mention something about faster edit cycle w.r.t. normal apps. It came pretty close:

... uses the new Mono IL interpreter to run managed code at runtime... to be used for quickly reloading C# code and prototyping

So maybe it will/can provide the foundation for faster edit cycles with native apps and not just WASM.

The CSharpLang github[1] repository would be where to look for this. I didn't find anything that mentioned adding language support for it, and IIRC, in the past they rejected the idea of inline XML or JSON support.

Going the other way of C# inside HTML, you have Razor[2] and Blazor[3], the latter of which is a prototype of Razor running in the browser via web assembly.

[1] https://github.com/dotnet/csharplang [2]: https://docs.microsoft.com/en-us/aspnet/core/mvc/views/razor [3]: http://blog.stevensanderson.com/2017/11/05/blazor-on-mono/

I'm curious if this will change now that webapps/electron-apps have become so popular. It may be that users have begun non-native apps as the new norm.

Has there ever been discussion about a permission for "running as an app" that would make a distinction between web pages and apps? I like that the web gets more features that allow apps to run cross-platform, but I don't fully understand why we make no distinction between pages and apps.

Yep, it's annoying to have those limitations, but I sort of understand why. They could make their message a lot clearer though.

I personally would have the hardest time with the 250 user limit

From the document, the text is "more than 250 PCs or users", so my understanding is that a company is limited if it has >= 250 computer users, not 250 customers. E.g. you could have a million free app users and it would be fine.

That fact that I had to preface that with "my understanding is that" means that the document is fuzzy, which is annoying, but at least further documents[2] can clarify a bit:

- Any individual developer can use Visual Studio Community, to create their own free or paid apps. - In non-enterprise organizations up to 5 users can use Visual Studio Community. In enterprise organizations (meaning those with >250 PCs or > $1M in annual revenue) no use is permitted for employees as well as contractors beyond... [the exceptions as noted].

[2] https://www.visualstudio.com/wp-content/uploads/2017/03/Visu...

So you (as an individual not as part of a company) could create a paid or mobile app and have as many users as you want and make as much as you can. If you're a company, then you need to be under 250 PCs, <= $1M, and <= 5 Visual Studio users and you're still good. Exceed those numbers and you have to pay up.

even the drug-pusher-like "Community" (first hit is free, unless/until you're making money) edition.

I mean, yeah it's not free-for-all, but "first hit is free" is kind of unfair. A company is not allowed to use it if they have more than "(a) more than 250 PCs or users or (b) one million U.S. dollars... in annual revenues" [1], and if it doesn't meet that criteria, it's usage is limited to 5 concurrent instances. More accurate would be "first hits are free, and you won't start getting charged until you're big enough where you can afford it".

Just making the distinction because I still have friends who think they can't use Community at home if they want to have a side project that makes money.

[1] https://www.visualstudio.com/license-terms/mlt553321/

I believe that .NET Core is not a subset of the .NET Framework; e.g. .NET Core might have things that are not yet in .NET framework.

I believe that the things that go into .NET core eventually go into .NET Standard (and thus the framework), but at a slower pace.

Thus it would be:

  .NET ECMA Spec ⊆ .NET Standard ⊆ (.NET Core ∩ Mono ∩ Xamarin ∩ Unity ∩ .NET Framework)

I am talking about what value you could pass into the multiple dispatch code in the article I linked to

Ah, I misunderstood the question. Yes, in that case it's fairly type-safe.

The actual reflection going on in the code I posted for multiple dispatch would surely be nothing more than an int comparison

Is this based on gut reaction or are you talking about optimizations that `dynamic` performs? I ask because my understanding is that `dynamic` is like a really efficient reflection-emitter, that attempts to do at runtime the same thing that the compiler would do at compile time, but slower because it has to look stuff up via reflection.

From Eric Lippert [2]:

The magic is: the compiler emits code that starts the C# compiler again at runtime. The runtime version of the compiler analyzes the call as though the compile-time types of all the objects had been their actual runtime types, generates an expression tree representing that call, compiles the expression tree, caches the delegate for next time, and runs the delegate.

[2] http://stackoverflow.com/questions/10330805/c-sharp-multiple...

So maybe `dynamic` at runtime figures out that it can do a "a struct with an int tag to represent the type, and a void pointer for its value", but I wouldn't assume it does and from what I've read on it, I wouldn't think that it does.

I've found the DLR is just as fast... with a much lower overhead

Can you expand on this? I would not have expected that it would be faster than compiled expressions.

A dynamic type is probably just implemented as a tagged bit of data, surely

A dynamic "type" is really just `object` whose methods are looked up at run time. It's not tagged data at all. See [1] for more info, specifically the example(s) at the bottom, as the reflection code is what gets executed at run (albeit with caching so that methods aren't looked up all the time).

`dynamic` is a complex feature that enables multiple dispatch as a side-effect, but only because it allows a whole lot more.

[1] https://visualstudiomagazine.com/Articles/2011/02/01/Underst...

what arguments could you pass in to the statically typed function that would cause the use of dynamic to bite you in the ass

    public void Output(int value);
    public void Output(Person person);
    ...
    dynamic aValue = "Some String";
    Output(aValue);
Compiles, because the actual resolving of which overload to call is done at runtime, not at compile time. And at runtime, there is no overload that accepts a string.

FYI, I recently found out that C# can actually do multiple dispatch

But also good to know, that it can be costly and unsafe. `dynamic` is basically using reflection at run-time, which for most cases is fine, but it's something to keep in mind. It also means that type checking is delayed until run-time instead of compile-time.

Reading this reminded me of all the discussions that took/are taking place for pattern matching in C#[0]; reading this I had the same reactions that I did for C#: cool stuff. It's also nice to see the languages reach parity in features; I only hope the two language committees pay attention to the research/feedback that the other receives.

[0] https://github.com/dotnet/roslyn/issues/10153

From https://github.com/dotnet/roslyn/issues/347 (Details > Mutability):

  > Should tuples be mutable or immutable? The nice thing about them being 
  > structs is that the user can choose. If a reference to the tuple is 
  > readonly then the tuple is readonly. 
  
  > Now a local variable cannot be readonly, unless we adopt #115 (which is 
  > likely), but that isn't too big of a deal, because locals are only used 
  > locally, and so it is easier to stick to an immutable discipline if you 
  > so choose. 
  
  > If tuples are used as fields, then those fields can be readonly if 
  > desired.

It seems that it will CLR-enforced so I would guess that it's not going to be available for any type:

  The fast representation makes the type automatically stack-only, i.e. the constraint 
  will be enforced by CLR type loader. This restriction should also be enforced by 
  managed language compilers and/or analyzers for better developer experience. For 
  the slow span, language compiler checks and/or analyzers is the only option (as 
  the runtimes won't enforce the stack-only restriction).

Are you sure you're not thinking that Xamarin uses XAML and not WPF? XAML is used by WPF, UWP, & Xamarin Forms, but I don't recall WPF being on anything other than Windows.

Anders Hejlsberg is who you're thinking of.

He was the original author of Turbo Pascal and the chief architect of Delphi... the lead architect of C# and core developer on TypeScript.

(from wikipedia)