Better HN
topnewbestaskshowjobs
Log inSign up

gray_-_wolf

805 karma · joined Oct 7, 2017 (9y ago) · 316 submissions

Submissions

comment 1y ago · link · parent

Good question. I care only about POSIX compatible shells, so the escaping just follows the POSIX rules. In practice that means it works on any actually used system except windows, which is fine with me.

comment 1y ago · link · parent

Another approach is to have powerful enough language that allows you to guard against the shell injection. I wrote a syntax form allowing to do this:

    (sh "cat " file " >" output)
With file being bound to "foo'bar" and output to "x", it is automatically translated into

    cat 'foo'\''bar' >'x'
This gives you the flexibility to use shell (sometimes it just is the most concise way) while being safe against injection.

I believe for example in rust you should be able to do the same.

comment 1y ago · link · parent

Patches are welcome :)

comment 1y ago · link · parent

> typeface change

Long live plain text email.

    ()  ascii ribbon campaign - against HTML e-mail 
    /\  www.asciiribbon.org   - against proprietary attachments

comment 1y ago · link · parent

Bit annoying is that when companies ask for a portfolio, they often mean GitHub. Lot of non-technical hiring people I discussed this with were confused by the fact that there are other ways to contribute, like mailing lists.

comment 1y ago · link · parent

What I find interesting is that the project claims MIT license, but if it is "almost entirely" AI generated, I am not sure it even is copyrightable. So either the licensing terms deserve some large disclaimers, or it is not "almost entirely" made with AI. Based on the name I assume it is your project, could you shed some light on which of those two options is correct?

comment 1y ago · link · parent

It's mff.cuni.cz. ff.cuni.cz is faculty of philosophy, mff is faculty of math and physics :)

comment 1y ago · link · parent

> so app starts

I assume this "app" is not open source, correct? Is is compatible with Linux systems? Can it run on non-FHS distribution?

> all your other apps are shutdown

I admit I am curious about this bit. Does it just start killing all other processes belonging to the same user ID? Or of all users (since you could get "assist" from process owned by an another user)? At least PID 1 needs to survive the slaughter, but it can be used to run arbitrary code to assist with the cheating. So how does it tell what is "an app" it needs to stop?

comment 1y ago · link · parent

No.

comment 1y ago · link · parent

If you (the company) send me a company laptop to use for that shit, sure, we can interview that way. It is the same deal with Teams and Zoom. None of that shit is touching my personal devices, it is strictly limited to the work machine.

comment 1y ago · link · parent

> Unicode case folding decisions can also be made at that point

Ok I will bite. How do you indent to do case folding without knowing the language the string is in? Will every filename or whatever also have its language as part of the string? I am not sure what the plan is there.

comment 2y ago · link · parent

I would hope google has DKIM and SPF set.

comment 2y ago · link · parent

Also happy Firefox user here. Do not worry, there are dozens of us. Dozens!

comment 2y ago · link · parent

Most of the spam I get is from gmail. Maybe they should apply their so effective spam engine to outgoing mail as well...

comment 2y ago · link · parent

That seems actually quite impressive.

comment 2y ago · link · parent

But it seems to involve moving parts, so I am not sure the reliability trade-off is worth it for decades/centuries long missions.

comment 2y ago · link · parent

> with a clear practical use,

What is a practical use for largest known prime number?

comment 2y ago · link · parent

I do not understand why

    x = if something:
          func1()
        else:
          func2()
Would not work. At least that is what I imagine when it is said "make if an expression".

comment 2y ago · link · parent

Well did they not tried to jail Trump for what he wrote online in January after loosing the election?

comment 2y ago · link · parent

The macho unicorn is kinda dope though.

comment 2y ago · link · parent

As long as the set is limited (as enums usually are), you can always go with the middle ground between omitted case and catch all:

    case FILE_NOT_FOUND:
        /* This is normal, nothing to do. */
        break;
This should still catch adding new value into the enum and not handling it.

comment 2y ago · link · parent

> It doesn't make economic sense anymore to use seven segment displays in new products, small TFT/LCD and even OLEDs are cheaper.

Maybe cheaper, but what about power consumption? I would have expected them to need significantly more, which might matter for battery-powered devices.

comment 2y ago · link · parent

I wonder if I have ever had a laptop where the UEFI worked correctly and without bugs. It always required some workaround somewhere to get stuff working.

comment 2y ago · link · parent

I prefer reading papers on paper, with fountain pen to make notes. It is easier for me to focus on compared to electronics devices (well, I am answering on HN instead of doing things I should be doing)...

comment 2y ago · link · parent

> Also, without some sort of indicator, Vim’s modal design is awkward here—it’s very easy to forget which mode you’re in.

That is why I have this in inputrc:

set editing-mode vi

set show-mode-in-prompt on

set vi-ins-mode-string +

set vi-cmd-mode-string :

comment 2y ago · link · parent

Out of curiosity, can you drop into edit session during the macro? It is some time since I last used vim, so I do not recall, but in emacs you can record a macro along the lines of "do A, do B, drop to edit session letting user do whatever, do C, do D". Is that possible with vim macros?

comment 2y ago · link · parent

It is not their device... Or at least it should not be.

comment 2y ago · link · parent

The problems is that I will still use linux for all my spare-time computing, so obviously I would like the experience to be as same as possible.

comment 2y ago · link · parent

The island is tiny. According to the article, when population roused to about 200, it led to famine. The local food supply just cannot support large population.
12345
11