HNHacker News
TopNewBestAskShowJobs

ygra

6,002 karma · joined September 19, 2012

Software developer at yWorks GmbH, working with graph drawing, compilers and UX. My posts are my opinion and don't represent my employer in any way.

Contact, if needed: hn (at) hypftier (german tld)

submissionscomments
ygra··on Better text rendering in Chromium-based browsers on Windows
Only for shaping and measuring, if I recall correctly. Rendering is still done by Skia and not DirectWrite.
ygra··on Linux as co-operative Windows process (2017)
Just in kernel mode, so maybe comparable to WSL1.
ygra··on 'Passive house' survives fire in California
Considering that cladding/siding is independent of the construction method, it may not even be visible. Even prefabricated buildings made from wood might have plaster outside, just as concrete buildings could be clad with wood.
ygra··on 'Passive house' survives fire in California
Wooden building construction for single-family homes is not unusual here (Germany) either, especially for prefabricated buildings. It's cheaper than bricks or premade concrete elements and easier to insulate. From the outside you usually won't see a difference.
ygra··on WorstFit: Unveiling Hidden Transformers in Windows ANSI
So we end up in a world 20 years from now where most applications still don't use that. I guess the main problem as described here is the mapping, as argument splitting was just one of the possible things that break (next to argument validation or bad file names).
ygra··on WorstFit: Unveiling Hidden Transformers in Windows ANSI
msvcrt was never for applications to use: https://devblogs.microsoft.com/oldnewthing/20140411-00/?p=12...
ygra··on Streets GL – 3D OpenStreetMap
F4Map has an option "F4-specific buildings" which has premade 3D models for certain landmarks, including the opera house.
ygra··on Streets GL – 3D OpenStreetMap
It's too keen to add windows. This also is a bit annoying with churches. At least garages and sheds don't get windows by default.
ygra··on Streets GL – 3D OpenStreetMap
OpenStreetMap has the building outlines (sometimes even parts of the buildings) as well as tagging that specifies

    • wall and roof color
    • wall and roof material
    • roof shape
    • height (or levels, which
      typically is then multiplied
      with 3 m to get a rough height)
    • starting height (or level), for
      building parts above ground, e.g.
      bridges between buildings.
This can then get rendered as upwards extruded polygons with a cap in the shape of the roof. There are a few more complicated ways of specifying complex roofs with ridge lines, etc. but few renderers support them and usage is fairly limited.
ygra··on Streets GL – 3D OpenStreetMap
While a good idea in general (the StreetComplete app makes this very easy, by the way), this won't help for this app, as the data is from September 2023. Otherwise I'd love to use it more to validate how renderers handle different buildings. F4Map should show the change fairly quickly, though.
ygra··on Streets GL – 3D OpenStreetMap
It does use elevation data, but does not exaggerate it, I guess. Back when I was working with 3D maps, we noticed that many people liked exaggerated terrain heights better, especially when the terrain is viewed from above and realistic heights looked “flat”. Near where I live it looks fairly close to what it does in real life: https://streets.gl/#48.50063,8.99766,7.25,312.50,135.56 (granted, having added building and roof colors for almost all buildings also helps).
ygra··on Arnis: Generate cities in Minecraft from OpenStreetMap
There's a few projects that do rendering and 3D geometry construction from OSM Data, e.g.

- https://streets.gl (data outdated, sadly)

- https://demo.f4map.com/ (commercial, no textures)

- OSM2World (sadly not interactively on the web, good textures, lots of rendered details, e.g. street signs)

- osmbuildings.org (no live data, no roof shapes)

None are really photo-realistic, and there's are a bunch of problems in the map data where it's hard to infer good 3D geometry, e.g. stairs.

ygra··on Microsoft GW-Basic User's Guide and Reference (1989) [pdf]
For PowerShell there is the PowerShell ISE (ISE.exe) which is included out of the box, I think. But that's a far cry from the simplicity of BASIC, of course. And I guess the modern equivalent is probably JavaScript in the browser, but that's a whole other can of worms for beginning programming.
ygra··on GW-BASIC User's Guide (1987)
I found that book in our bookcase one day and read through it twice before asking my father whether we had GW-BASIC somewhere. I ended up starting programming with QBasic instead. From there I went to Pascal, Visual Basic and eventually all sorts of languages. But that book was the start.
ygra··on Debian opens a can of username worms
Not even that is free of footguns, especially around argument parsing and calling native commands.
ygra··on Debian opens a can of username worms
Wasn't one way to make grep faster setting LANG=C to avoid using language-aware string comparison? If so, shouldn't Unicode be supported by default or what would, say, de_DE.UTF-8 actually compare to make it slower?
ygra··on I'm a developer not a compiler
Interestingly enough, there are no primitive types in C#; that's a Java term. I'd probably ask for what definition they're after because I can think of a few:

• Types that have a type alias (that makes them special in the language), but that would include string and object.

• Value types that have a type alias. Closer to what Java does and would include most basic numeric types. But it would exclude System.Half and System.Int128 for example.

• Value types that the runtime knows about and might treat in a special way (e.g. by also having specific IL instructions for them). That would include most basic numeric types (and enums), but probably exclude boolean, decimal and the newer ones.

• Value types in general, as they all function similarly, regardless of whether it's bool, int, ValueTuple<float, ushort> or an enum. But that list is no longer finite.

But perhaps the following discussion about types in C# and .NET was what they're after. Who knows.

ygra··on Charset="WTF-8"
And the postal code.
ygra··on Java 24 to Reduce Object Header Size and Save Memory
Isn't just the lock something that potentially needs space per object?
ygra··on La Basilica Di San Pietro
Works fine in Firefox for me.
ygra··on Visual Basic 6 IDE recreated in C#
Having done a few such forms in the past, it was easy enough for a simple dialog with a list, two buttons and a text field, but it quickly got unwieldy.

Which was okay back in the day. Everyone had low display resolutions, so simply scaling a window's controls when resizing was okay. No need for responsive layout and even too fancy layouts, I guess. But what we got later with anchor in WinForms, layout panels in WinForms or WPF, layout managers in Swing, and CSS layout die help reduce the math you'd have to do yourself, especially for more complex layouts or even when the layouts change due to different requirements.

ygra··on Visual Basic 6 IDE recreated in C#
Well, VB subclassed the Windows common controls for the most part (and their class names all's contained Thunder, so when I wanted to know whether an application was made in VB, I looked at a button with Spy++).

That being said, technically the controls and VB of course don't have to be linked that closely. In this case they're Avalonia controls anyway that just expose different properties.

ygra··on Windows Kills SMB Speeds When Using Tailscale
It's not just the new CLI. I guess you could have done the same with netsh for ages as well.
ygra··on An unearthly spectacle – The untold story of the biggest nuclear bomb (2021)
Is that due to fear of an atomic bomb or more because of the artillery pieces aimed at Seoul as well as surrounding countries being unwilling to take in large amounts of North Korean refugees?
ygra··on Ambulance hits cyclist, rushes him to hospital, then sticks him with $1,800 bill
They can be mixed off traffic is rather low and the path is wide enough (basically plan for the encounter of a pram in one direction with a cyclist with trailer in the other direction). But that typically doesn't work for sidewalks in many cases because they're either too narrow or have too much foot or bike traffic.

E-bikes and cargo bikes are also a lot heavier than other bicycles and are getting more common. Due to higher mass and being powered they're quite a bit more dangerous to pedestrians.

ygra··on Passport Photos
The driver's license is not an ID, though. Besides, at least in Germany you get it and then it never changes. So the photo is pretty much always outdated.
ygra··on D2: Declarative Diagramming – A modern language that turns text to diagrams
Automatic layout can work really well if the diagram kind is known. E.g. you don't have that many arbitrary placement options for a flowchart as opposed to an arbitrary diagram. In those cases of your layout algorithm produces an okay result, most people won't miss options to change certain parts of the automatically-laid out diagram. I think I'm that's a major part why solutions like PlantUML, Mermaid, or D2 often require you to specify a diagram type: to restrict the layout to what makes sense for that diagram.

That's a problem that plagues more generic options like Graphviz or (disclaimer: I work on that) yEd where you get the generic layout options and have to adjust them to make sense for your diagram. More flexible, but also more cumbersome, often with the problem that you crave for manual adjustment if the layout is not quite right.

ygra··on Weird Lexical Syntax
When not using the format specifiers or alignment it will indeed compile to just string.Concat (which is also what the + operator for strings compiles to). Similar to C compilers choosing to call pits instead of printf if there is nothing to be formatted.
ygra··on Weird Lexical Syntax
> Unfortunately Unicode retconned the ASCII apostrophe character ' to be a vertical line

Unicode does not precribe the appearance of characters. Although in the code chart¹ it says »neutral (vertical) glyph with mixed usage« (next to »apostrophe-quote« and »single quote«), font vendors have to deal with this mixed usage. And with Unicode the correct quotation marks have their own code points, making it unnecessary to design fonts where the ASCII apostrophe takes their form, but rendering all other uses pretty ugly.

I would regard using ` and ' as paired quotation marks as a hack from times when typographic expression was simply not possible with the character sets of the day.

_________

¹

    0027 ' APOSTROPHE
    = apostrophe-quote (1.0)
    = single quote
    = APL quote
    • neutral (vertical) glyph with mixed usage
    • 2019 ’ is preferred for apostrophe
    • preferred characters in English for paired quotation marks are 2018 ‘ & 2019 ’
    • 05F3 ׳ is preferred for geresh when writing Hebrew
    → 02B9 ʹ modifier letter prime
    → 02BC ʼ modifier letter apostrophe
    → 02C8 ˈ modifier letter vertical line
    → 0301 $́ combining acute accent
    → 030D $̍ combining vertical line above
    → 05F3 ׳ hebrew punctuation geresh
    → 2018 ‘ left single quotation mark
    → 2019 ’ right single quotation mark
    → 2032 ′ prime
    → A78C ꞌ latin small letter saltillo«
ygra··on Weird Lexical Syntax
The former, I'd say.

https://learn.microsoft.com/en-us/dotnet/csharp/programming-...

For a multi-line string the quotes have to be on their own line.

← PreviousPage 3 of 34Next →