Hacker News new | past | comments | ask | show | jobs | submit | ArtifTh's comments login

C# has GC by default, but you can do manual memory management in "unsafe" blocks


You can also do manual memory management in safe code.

- value types

- stackalloc is safe since C# 7

- SafeHandles since C# 2.0

- IDispose interface

- IDispose like Dispose() since C# 8

- Marshal class since C# 1.0

- Span<>() classes since C# 7


Forgot to mention:

- static lambdas since C# 9

- native function pointers since C# 9


This looks extremely low, you should be able at least twice of that as a junior without much experience.


Huh, that's quite a dramatic code size reduction. Which percentage of this codebase was in tests and boilerplate code for stuff like helper data classes?


Current version of Windows already have Chromium in the form of new Edge and Microsoft seems to start pushing progressive web applications. At least they made good integration with system for them.

So, perhaps, soon we will have PWAs instead of bunch of electron apps each carrying its own Chromium.


PWAs can never fully substitute native applications. It's difficult to access hardware and impossible to call operating system functions from a PWA. Applications that do something interesting tend to have a native library behind the frontend that does performance-sensitive work.


Quite the contrary, one of the benefits of PWAs is exactly that when they are distributed via app stores they get access to native APIs without any kind of manual FFI.

That is how they work across ChromeOS, Android and Windows, with Apple being the outlier for obvious reasons.


I didn't know this. If this is true then it's more powerful than Electron, which requires you exchange IPC messages from a separate process. The fact that you have to use the app store is a major disadvantage though.


In short: prefer induction over deduction in early stages of teaching.


I'd say the author is helping students develop their capacity for abductive reasoning (https://en.wikipedia.org/wiki/Abductive_reasoning). The goal is to get students to build accurate models for what the computer/code is doing, not just form rules that happen to match what they've observed.

For example, here's a 100% true story. I once showed a student code like this (in Ruby)

    my_name = "Jesse"
    my_age = 32

    puts("My name is #{my_name} and I am #{my_age} years old.")
They asked a great question: "Are the names my_age and my_name special? Do we have to use those names?"

I explained that, no, so long as you use the same name everywhere, it will always refer to the same value. The names of the variable aren't special. I changed the code:

    my_giraffe = "Jesse"
    my_waffles = 32

    puts("My name is #{my_giraffe} and I am #{my_waffles} years old.")
I use names like "giraffe" and "waffle" so students still recognize them as nouns but are less likely to bring some prior, inappropriate context into their reasoning.

"Oh, I see!" they said. "You can use any variable names so long as they start with my_."

The fact that they articulated their rule clearly to both themselves and me right at that moment puts them in the like 95th percentile of beginning students. Induction is natural but dangerous for beginners, who are so desperate to make sense of what they see that they'll adopt the first model that accounts for what they see without any consideration of the alternatives.

If they were thinking in terms of _predictions_, though, they'd naturally test their model by removing my_ and seeing what happened.


Of course the issue with that code is "why use variables at all?" Why not just say

     puts("My name is Jesse and I am 32 years old.")


The whole thing is clearly an exercise in describing use of variables and (perhaps) string interpolation.

Amusingly, your comment is a fun example of short abductive reasoning just like the student in the other guy's story.


it's interesting that for non-english populations, this part of programming does not really require explanation if the course uses local language words for names, and english vs local language is clearly keywords vs chosen names.


This also need to have somehow broken hinting instructions so it would render blurry with rainbow edges on a screen.


>Which distributions to support?

Target flatpak and/or snap.


So, basically a nanoscale electron tube?


Except without a vacuum (because the plate distance is so small that air doesn't get in the way)


>Are there already atmosphere-breathing engines that do this and what are they called?

Generally this kind of engine is called Magnetohydrodynamic drive. I'm not sure about atmospheric engines, but according to wiki[1] there are prototypes that uses water as working fluid.

[1] https://en.wikipedia.org/wiki/Magnetohydrodynamic_drive


Looks similar to Ionocraft[0], but only for low density plasma instead of an air.

[0] https://en.wikipedia.org/wiki/Ionocraft


Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: