News for hackers. Stuff that matters.

Atomskun

Re:Why Does Windows Use Backslash as Path Separator? on Wednesday April 24, 2024 @06:27PM (#40150619)
How in the world is your rant in linked file supposed to work?

* It seems you decide whether to execute a file by its extension, e.g. `.php`

* You are complaining that Windows is stripping away spaces, so `.php ` becomes `.php`

* And supposedly this could lead the file being served as static text if you didn't have a Windows workaround?

It rather seems to me that POSIX accepting `.php ` as a filename, and this not being picked up by a `.php` check is problematic here.

Re:Ask HN: How to make a native GUI with a modern language? on Wednesday August 10, 2022 @11:40AM (#32413844)
I see, thanks for the insights.
Re:A History of Lua (2001) on Wednesday August 10, 2022 @11:38AM (#32413797)
Just like Lua, hence their similarities.
Re:Ask HN: How to make a native GUI with a modern language? on Tuesday August 09, 2022 @03:10PM (#32402563)
I can't use jpackage on Windows to build Mac binaries, but not having FX installed is what kind of problem? Just use jpackage to create an .app for Mac, an installer or portable build for Windows, and a .deb or executable binary for Linux. It bundles all dependencies and users can just click and run it.
Re:Ask HN: How to make a native GUI with a modern language? on Tuesday August 09, 2022 @01:51PM (#32401309)
What's the problem with jpackage for, say, shipping Windows binaries?

I just let it package a "portable" (no need to install) directory of all dependencies and that's it. Users just download a ZIP and can use my programs.

Can I scroll up to a thread to the first message without Javascript running to fetch previous posts? We had this in the 00-ties.

It would also be great if I can Ctrl+F to use my browser's search feature to look through all messages instead of relying on a dynamic JavaScript one.

Re:Wrapping Up 2021. Leaving C++ on Saturday January 01, 2022 @09:28AM (#29758510)
Imagine needing to announce your "departure" from a community.

> Bjarne looked me up and down, put on a face of disgust, and walked away.

Sure you aren't projecting? To the author of this article, you need to get some help not hiding behind "I have OCD." The way you sound is really off-putting.

Sorry if this sounds hard, but you have some form of narcissism that in the end only hurts you more. Drop your pride.

Re:Lithuania evacuates its embassy in China on Friday December 24, 2021 @07:23AM (#29673039)
I'm not the original poster. Anyway, the point is that Qing dynasty was also "foreign" because it was reigned by Manchu.
Re:PortableApps.com Hits 1 Billion App Downloads on Thursday December 23, 2021 @12:09PM (#29663827)
You are cherry-picking the best experience one can have on macOS, and contrasting it with the worst experience on Windows. This way it just sounds like comparing in bad faith.

There is plenty of Mac software that requires an installer and Uninstaller, plenty of off-behaving applications that put stuff directly into ~ or ~/Documents, and even those that install some internal executables into /usr/local/bin.

You can have an equally pleasant experience on Windows (after all, this is about portable apps...). There is "mature" software whose installers will just override (update) the existing application (e.g. Anki, Affinity apps), %APPDATA% is your Application Support folder on Windows (if only more software would use it), and then there's also the slightly new .appx packaging with a clean way of uninstalling. No one hinders you to just download portable apps directly from the vendor and putting it into C:/Applications, if you want that.

If there is an odd one out, it would be Desktop Linux.

Re:Lithuania evacuates its embassy in China on Sunday December 19, 2021 @01:13PM (#29616529)
Why are you counting Qing dynasty into that?
Re:Nim 1.6.2 on Friday December 17, 2021 @10:47AM (#29593745)
I love Nim's syntax, but is there a specific reason why e.g. the SFML binding cannot imitate C++ RAII approach of handling resources? There is .close everywhere.
You have no idea what you are talking about. You can install any kind of distribution by copying over their rootfs. For example, I am running Void Linux on WSL2.
Hold shift while dropping.
Reminds me of something we had more than 10 years ago.

https://en.wikipedia.org/wiki/EyeOS

It certainly ran better than this.

Re:TailwindCSS v2.0 on Thursday November 19, 2020 @03:14PM (#25153828)
Re:TailwindCSS v2.0 on Thursday November 19, 2020 @05:30AM (#25148072)
I'm not using Tailwind, but that comparison is wrong. Something like mt-2 still doesn't map to a fixed style, and it also has another specificity than inline styles which makes it easier to override.

If you need to globally change the margin that mt-2 adds, you only need to change that class instead of all HTML inline styles.

Re:What Color Is This? Part 2 on Wednesday October 14, 2020 @10:08PM (#24784056)
One could also remove the expected shadow values (and hues) depending on the color of the clothing and the color of the light, at least approximately.

Should work as long as there aren't complicated interactions of the material with light that hits it.

Re:Full-Bleed Layout Using CSS Grid on Tuesday October 06, 2020 @02:31AM (#24695230)
For a sidebar alone, you don't need CSS grid (probably obvious). The point of this article, i.e. having something full-bleed, is implemented by adding a specific class to the element. Which means you would always have a DOM similar to

    </something that gets closed>
    <full bleed>
    ...
    </full bleed>
    <next>
    ...
My point is that now, with a new block element in the hierarchy, it would fill the maximum width anyway. It is only because of being inside a CSS grid that you now have to work around the grid positioning which means adding more CSS attributes.

The exception would be if you would want the full bleed element directly under the sidebar (in terms of z-index). Here CSS grid is useful, but this is probably a special case anyway.

Re:Full-Bleed Layout Using CSS Grid on Monday October 05, 2020 @12:48PM (#24689446)
Wait until Web developers find about setting a width and horizontal margins: auto on a block container again.

As a matter of fact, that would require even less attributes to work compared to the method presented in the article.

Re:Wikipedia is getting a new look on Thursday September 24, 2020 @02:14PM (#24581650)
That's...in literally every browser's setting since the beginning of browsers.
Re:Wikipedia is getting a new look on Thursday September 24, 2020 @02:08PM (#24581569)
Why do you think is that? Genuinely curious. There's nothing in Windows that prominently wants you to have everything maximized (ignoring the semi-new tablet mode; windowing behavior stems from a time long before that).

macOS, on the other hand, explicitly advertised having an "immersive" fullscreen mode (with a dedicated button in the past).

Re:Wikipedia is getting a new look on Wednesday September 23, 2020 @09:06PM (#24574260)
I bet it won't remember my scroll position when navigating back between articles.
Re:Checked exceptions: Java’s biggest mistake (2014) on Friday September 11, 2020 @11:34AM (#24443900)
What's the difference to modeling the "happy path" with function calls one after another, with an outermost try block that can catch any exception that might have happened inbetween?

These functions wouldn't even need to care about Some[T]; T is enough.

Re:Undiscoverable UI Madness on Friday February 28, 2020 @05:26AM (#22441829)
Android had this "Option" key until Google decided to blindly follow Apple.

Today, an artifact of this feature is still accessible by holding the Back button for a long time, but it is set to simply show the Overflow menu (if the App has one).

I wish so much that Android would have sticked with it. Similarly, many Windows notebooks swap the right Ctrl with a "Context Menu" key. It basically lets you right click with the mouse, but it could have had so much more potential ...

Great, could you tell your Android contractor:

- "Magazine" in the sidebar just shows "No internet connection" (which is wrong) when clicking on it.

- Why can't the app remember my Filter settings? I'm only interested in digital 2D when on the "Browse" screen, but I have to apply the filter every single time I open the app.

- On Browse selected, click on Search, type in anything (e.g. Blender), then "View All Projects." Scroll through the first "page" (so that results show up that weren't on the screen before). Now these results begin to show up duplicated later when continuing scrolling (I assume pagination and/or the RecyclerView is implemented incorrectly).

- The app doesn't seem to cache images. Click on any project. Let the image load. Hit back. Click the same project again. The image needs to load again.

Looking at it again, some UI elements feel kind of uncanny which makes me think that the app isn't full native. There are some other small things that make the app look a little bit unpolished which I think a site like ArtStation doesn't deserve.

Re:Experiments in Constraint-Based Graphic Design on Thursday December 12, 2019 @11:59PM (#21779234)
I don't understand neither the author's nor yours approach to doing this in Illustrator.

If you want to have a square inset into a circle in Affinity Designer, you:

- Draw a circle.

- Create a square from the middle of the circle outwards. The square will _constraint_ perfectly to the circle.

If you want to do the reverse (circle inside square), it's even easier since the bounding box of the 2 objects is one and the same ...

I have the feeling that the author is simply unfamiliar with current design programs. Those haven't stagnated like one might think from the article.

Re:Relearn CSS layout on Monday June 17, 2019 @05:56AM (#20201376)
> so the usage of margin-top should always be avoided

Not really if you consider sibling layouts, e.g.: https://matthewjamestaylor.com/css-margin-top-vs-bottom

> owl selector: performance implications - it's fairly bad from a performance POV to use it.

Arguing about "CSS performance" is futile when the real cause of bloatedness is mostly JavaScript these days (also: http://alistapart.com/article/axiomatic-css-and-lobotomized-...).

The owl-selector can actually be quite elegant, but becomes a burden if you have lots of side-by-side blocks (which would always need to set their margin-top to 0).