HNHacker News
TopNewBestAskShowJobs

0xcoffee

678 karma · joined December 4, 2016

submissionscomments
0xcoffee··on Install Windows the Arch Linux Way
I believe Microsoft provides the Media Creation Tool for this purpose.

https://support.microsoft.com/en-us/windows/create-installat...

0xcoffee··on We put half a million files in one Git repository (2022)
Windows is coming out with their own 'Dev Drive': https://learn.microsoft.com/en-us/windows/dev-drive/

I'm very curious how it performs compared to EdenFS: https://github.com/facebook/sapling/blob/main/eden/fs/docs/O...

0xcoffee··on We put half a million files in one Git repository (2022)
It's not that unusual, we vendor entire VM images which contain the development environment. (Codebase existed since before docker). And it works well, need to fix something in a project that was last update 20 years ago? Just boot up the VM and you are ready.
0xcoffee··on The V Programming Language 0.4
Changelog: https://vlang.veery.cc/post/725/v-0.4-is-out
0xcoffee··on LuaJIT uses rolling releases
The export-subst attribute was new to me.

Here is a description of what it does:

If the attribute export-subst is set for a file then Git will expand several placeholders when adding this file to an archive. The expansion depends on the availability of a commit ID, i.e., if git-archive[1] has been given a tree instead of a commit or a tag then no replacement will be done. The placeholders are the same as those for the option --pretty=format: of git-log[1], except that they need to be wrapped like this: $Format:PLACEHOLDERS$ in the file. E.g. the string $Format:%H$ will be replaced by the commit hash. However, only one %(describe) placeholder is expanded per archive to avoid denial-of-service attacks.

https://git-scm.com/docs/gitattributes#_export_subst

0xcoffee··on Barracuda urges replacing, not patching, its email security gateways
Perhaps this is what they were talking about: https://www.cvedetails.com/cve/CVE-2019-13640/

> In qBittorrent before 4.1.7, the function Application::runExternalProgram() located in app/application.cpp allows command injection via shell metacharacters in the torrent name parameter or current tracker parameter, as demonstrated by remote command execution via a crafted name within an RSS feed.

0xcoffee··on Temporal .NET – Deterministic Workflow Authoring in .NET
Lamba/Func/Expressions are doing exactly this in C#, there is no instantiation required. Creating a unusable Ref object is jumping through hoops.

You can parse an expression to serialize it and run it on a different server etc

See e.g. https://github.com/6bee/Remote.Linq

0xcoffee··on Temporal .NET – Deterministic Workflow Authoring in .NET
>You're going to have to do that lifting anyways to create an instance for `e` that isn't really a usable instance.

But this should never happen, these is no reason to create an unusable instance. The real instance should be resolved in the same way however the current workflow resolves it.

0xcoffee··on Temporal .NET – Deterministic Workflow Authoring in .NET
The main reason I'm curious is because they write

'We solve this problem by allowing users to create instances of the class/interface without invoking anything on it. For classes this is done via FormatterServices.GetUninitializedObject and for interfaces this is done via Castle Dynamic Proxy. This lets us "reference" (hence the name Ref) methods on the objects without actually instantiating them with side effects. Method calls should never be made on these objects (and most wouldn't work anyways).'

Which sounds like a lot of heavy lifting. It seems something like

    public class WorkflowBuilder<T> where T : class
    {
        // Somehow workflow gets the real instance
        private T Instance;
    
        public async Task<TResult> ExecuteActivityAsync<TResult>(Func<T, Task<TResult>> func) => await func(Instance);
    
        public async Task<TResult> ExecuteActivityAsync<TResult>(Func<Task<TResult>> func) => await func();
    
        public async Task ExecuteActivityAsync(Func<Task> func) => await func();
    
        public async Task ExecuteActivityAsync(Func<T, Task> func) => await func(Instance);
    }
    
    public record Purchase(string ItemID, string UserID);
    
    public class PurchaseActivities
    {
        public static WorkflowBuilder<PurchaseActivities> OneClickBuyWorkflow => new WorkflowBuilder<PurchaseActivities>();
    
        public async Task DoPurchaseAsync(Purchase purchase)
        {
            await OneClickBuyWorkflow.ExecuteActivityAsync(e => e.DoPurchaseAsync(purchase));
        }
    
        public static async Task DoPurchaseAsyncStatic(Purchase purchase)
        {
            await OneClickBuyWorkflow.ExecuteActivityAsync(() => DoPurchaseAsyncStatic(purchase));
        }
    }

Would pretty much achieve the same thing.
0xcoffee··on Temporal .NET – Deterministic Workflow Authoring in .NET
I didn't really understand the part about 'What Problem Does 'Ref' Solve?'

What would be the downside of writing it such as:

`ExecuteActivityAsync<OneClickBuyWorkflow>(e => e.DoPurchaseAsync, etc...)`?

0xcoffee··on The Open Microscopy Environment
Noob question here, how can I read this paper? Or I need to purchase access?
0xcoffee··on Stop overcomplicating it: A simple guidebook to upping your management game
What is SR IC
0xcoffee··on I've been designing a language since 2009 – friends and I implemented a beta
Seems like the same thing could be achieved cleanly with chainable results. My quick & dirty c# example.

  For.Loop(10, (i, @break) =>  
  {  
      Console.WriteLine(i);  
      @break();  
  })    
  .OnComplete((i) => Console.WriteLine("Done"))  
  .OnBreak((i) => Console.WriteLine("Break"));
0xcoffee··on Apple unveils all-new MacBook Air, supercharged by the new M2 chip
Isn't it just based on amount of pixels needing to be pushed through? So if it can support a 6K external, it should be able to support multiple monitors as long as combined resolution doesn't exceed 6k?
0xcoffee··on Git Fork: A fast and friendly Git client for Windows and Mac
I love this so much, I've been waiting to see if they ever have a sale, but honestly it's worth the full price.
0xcoffee··on Ask HN: Docker vs simple DLLs?
If you have a standalone application, then great, maybe docker doesn't add a lot

Maybe your application requires xyz lib to be installed via apt or something similar

Now docker is useful, as it can maintain that environment easily

Now imagine you work in a company with many different teams, and just want a similar way of deploying all services without requiring knowledge of how the application dependency tree looks, just use docker everywhere.

That is why imo you see docker used in places it doesn't really offer a benefit, because a standardized way of deploying is a benefit in itself.

0xcoffee··on The use of ‘class’ for things that should be simple free functions (2020)
Can someone give an example of how (automatic) dependency injection works in functional programming?

This to me is the only real benefit of OOP, that I can just add another service into the constructor and not have to update call sites of other signatures which would happen if I passed everything as parameter arguments.

I work in Asp Net land, and most of my work is linking services together and not so much solving mathematical problems.

0xcoffee··on Windows Update vs. My Router
You are focused too much on Microsoft and the individual user. The concepts are applicable to any device from any manufacture. The book I linked is about the evolution and history of network spread malware such as bots. It discusses about how security was always an afterthought during the start of the millennium, and how at a certain point basically every device was running some malware. Then collectively the industry and the government finally started to understand the nature of the beast and introduced security hardening best practices.

This is continuing today, and the increased knowledge sharing has industries working together to fight the problem. Even the US government has learned from e.g. google and started to move to 0-trust network architecture: https://www.whitehouse.gov/briefing-room/presidential-action...

Automatic updates are one of the biggest enablers of stopping automatic spreading of malware. The Mirai botnet for example had a large capacity knocked out thanks to Deutsche Telekom responding and force updating their network devices which were vulnerable attack vectors. Unfortunately there are a lot of devices out there which are out of support or have no updates available (i.e. internet of shit), which remain a constant problem.

Automatic updates are the industry standard, because the days an patched or unpatched device is a threat to the internet is 0. This doesn't mean patching is futile. It still greatly reduces the available attack surface, and also helps protect other devices.

You should also be aware the when 0-day gets patched, they often happen silently. e.g. Linux will obfuscate it's commit message, because if they say 'e.g. fix really bad 0 day', then immediately that 0-day becomes public knowledge and will be exploited even more before the patch is live and propagated to the systems. Same in release notes, so people don't diff the binary to discover what the attack vector was. Just because it's not loudly announced, doesn't make it not real.

So please do your minimum part to practice network hygienic if you want to participate. It is not a 'dilemma', it is polite behavior for a greater goal.

0xcoffee··on Windows Update vs. My Router
It is because there is decades of history of unpatched devices being used as vectors for ddos, entrypoints for horizontal movements inside a secure networks etc.

If you pay attention to the Ukrainian conflict, you will see that the cyber-warfare is going strong (especially in the energy sector), and the internet is indeed a 'threatening' place. Just because you don't consider yourself an interesting target doesn't mean you won't be compromised.

Yes it's unfortunate that MS packages both bug fixes and 'features' in their update process. But as other comments have said, it is better then to migrate away from Windows to another OS which you can keep up to date.

There are many layers to a good defense, but for a regular consumer, simply keeping devices up to date is a low effort way of reducing attack surface area.

I wouldn't run any unpatched device with internet access, be it windows, linux, anything.

I recommend the book "This Is How They Tell Me the World Ends: The Cyberweapons" for a non-technical but interesting read about this topic.

0xcoffee··on Noto emoji, a new black and white emoji font with less color
I used to place emojies in our critical failure message box. Basically I have a list of 'bug' emojies, and would randomly select one to display in the message box.

Ideally no-one except developers ever saw this box, but gave myself a laugh at least whenever our app crashed in a bad way.

0xcoffee··on An Account of the Shanghai Lockdown
Shanghai is big enough that being in the same city can still be far away, especially when no metro etc is running.
0xcoffee··on An Account of the Shanghai Lockdown
Even worse, they do lockdown in place and without warning. So if you were at work, and your dog was home, then your dog would stave alone.

I really don't understand why they don't at least let people stuck at work go home, really crazy situation.

Source: Chinese gf's dad is in lockdown at his work, while mom in lockdown at home.

0xcoffee··on I decided that I must live my life on my terms
My past idea of happiness assumed that happiness was a default emotion that would always be available, as long as your worked hard enough for it. As I got older, less and less things give me emotional response. Even love and heartbreak are patterns I recognize and don't give the rush they used to. For me it simply comes down to, 'help the next generation live in a better world' Take away the self, it's already experienced everything it needs to.
0xcoffee··on HTTP Feeds
100% onboard with better tooling.

Starting with out of the box swagger support: https://github.com/OAI/OpenAPI-Specification/issues/396

Shame they are not interested in adding it.

0xcoffee··on Travel photos are underrated (2019)
My pixel 4 has an 'export frame from video' option, and on my last hike I took lots of photos and videos, but actually by far all my best 'photos' that I send to my friends, are stills from a video. From now on I'm basically always just going to film everything.

Probably it just means I'm a bad photography, and this is essentially brute force approach towards it haha

0xcoffee··on Roland 50 Studio
Damn this sounds so cool. Accidentally clicked the red clear button and deleted score though :(

Would love a way to ctrl-z to save myself from myself.

0xcoffee··on Blender 3.1
I tried to download their new Benchmark 3.0.0, but site seems to be hammered.

Softpedia has a mirror though: https://www.softpedia.com/get/System/Benchmarks/Blender-Benc...

0xcoffee··on Russian news channel RT to broadcast on Rumble after Big Tech curbs
In theory I agree with you, but it's not like silencing 'ideas and argument you disagree with'

Look at this: https://www.rt.com/russia/551384-russia-ukraine-nuclear-fals...

>“The SBU and the militants of the Azov Battalion are planning to blow up the reactor and accuse the Russian Armed Forces of allegedly launching a missile attack on the experimental nuclear facility,”

This isn't a discussion in which people are arguing different opinions in good faith, it's straight up manipulation to excuse killing more people.

0xcoffee··on SymSpell: 1M times faster spelling correction
I don't really see a reason why the C# version couldn't be written in a similar functional style as the Haskell version. I don't see them using linq anywhere. I see shallow clones, double constructors, no use of records. So I won't be too quick to judge. Would love to see someone try their hand at optimizing the C# version, using the full availability of modern c#.
0xcoffee··on Tell HN: SWIFT is not a payments transfer system
So how does it work when there are multiple of these systems (CIPS). Is double spending possible?
← PreviousPage 2 of 7Next →