News for hackers. Stuff that matters.

knicknic

Re:GitHub stars won't pay your rent on Thursday November 10, 2022 @02:07AM (#33543212)
I don’t pr unless it will be obviously taken without first opening an issue. This prevents me wasting time testing and writing code.

If someone is going to just close these questions, then I will drop them as it’s not open source I want to be a part of.

I am okay with paying for software. not okay with paying to find out my feature request will get denied

3x rule is not a rule but a guideline. It applies more to the average person.

If you give someone 100 dollars a day they have to buy food, clothes, rent, education, transportation. You give them 1000 dollars a day they still have to buy the same things. They can then use this leftover to buy nicer food or nicer house. This is why values of homes can get so high in areas. For the people getting 1000 they chose where ti spend this extra money. For people with 100 a day they don’t have extras to reallocate towards rent.

Re:ImageMagick: CLI for Image Editing on Thursday December 02, 2021 @03:22AM (#29413735)
One way to make it safer is to run inside webassembly. I needed an easy way to modify photoshop files and allow give those commands to other users. So you may want to check out https://knicknic.github.io/imagemagick/ it’s Imagemagick in a progressive web app that allows you to share commands.
The banks don’t own the loans, the government does, or peoples retirmenet funds…

How is repricing home loans going to affect banks?

Re:Docker Desktop no longer free for large companies on Wednesday September 01, 2021 @04:02AM (#28377404)
With a sha you shouldn’t have to change the pull policy. However there isn’t a need for always if you have the sha.
They pay you for work because it’s work, not because it’s fun. It’s easy to say, but they get X from you for that money. They don’t take it, you give it. If you are unhappy with how much you are giving than give less. If they are unhappy with how much you are giving than they pay less. Just adjust how much you are willing to give.
Re:The Lyme Disease Vaccine on Monday May 10, 2021 @12:32AM (#27102712)
Surprised no mention of it fully being available to dogs… https://www.merck-animal-health-usa.com/nobivac/nobivac-lyme...
Please bump priority of https://github.com/PowerShell/PowerShell/issues/3415 it makes it ugly and hard to convert scripts. Also source of bugs when users add lines to scripts.
Re:Pip has dropped support for Python 2 on Saturday January 23, 2021 @11:48PM (#25889363)
Potential security vulnerabilities? If I have a library and it works in 2 & 3. But I stopped working on keeping it 2 compliant because 2 is no longer supported. Than I will never bring a single fix to 2, even security fixes. Due to code divergence it may not be even easy for me to understand if the issue reproduces in 2.
Re:Why Working from Home Will Stick [pdf] on Saturday January 23, 2021 @11:06PM (#25889105)
Employees will just slack on another device. A phone or something.

I haven’t been in a bank in over 5 years. I have refinanced my home twice, and will probably do so again without stepping inside an office. The only reason I see to have an in person bank is if I wanted a safety deposit box, or frequently needed to get money changed.

Re:Rust for Windows on Friday January 22, 2021 @12:04AM (#25868509)
Why not just install powershell on Linux?
Re:The database servers powering Let's Encrypt on Thursday January 21, 2021 @11:54PM (#25868460)
You should try server43
Re:Linux and Powershell on Wednesday January 20, 2021 @01:02AM (#25843032)
`bash set -e`. Your examples don't work (if you have an answer please paste it in https://github.com/PowerShell/PowerShell/issues/3415 )

    Set-PSBreakpoint -Command Write-Error -Action { break; }
    cmd.exe /c "exit 1"
    echo "if this->($LASTEXITCODE) is 1 I shouldn't be here"
Your stack trace code is wrong. What your code is doing is essentially saying throw an exception when you encounter an error. All I am asking is when exception hits the top, dump the stack trace.

    $script:ErrorActionPreference = 'Stop'
    function bar() {
        throw "oops"
    }
    function foo() {
        $a = 123
        bar
    }

    foo

    PS C:\tmp> .\a.ps1

    Exception: C:\tmp\a.ps1:6:5
    Line |
    6 |      throw "oops"
        |      ~~~~~~~~~~~~
        | oops
I use `trap{$_.ScriptStackTrace; break}` but unfortunately I cannot hide this code into a helper script that I can dot source... because of scoping rules! Even though I am dot sourcing a file which I would think would load it into my current scope according to dot sourcing link you sent.

Why this is not the default behavior when leaking an exception and aborting I have no clue

enforcing things are arrays

    yes you can wrap stuff in arrays, but that is making the callsite look ugly for a function definition problem. The solution "return ,$array" is just weird

Honestly I prefer the bash way of $yaml | yaml2json(.exe) | convert-fromjson. Easier to find cross platform converters which your example is not. Takes me like 5 seconds to write, however then I have to teach others to do it as well, I want it in the platform. Also why they are at it, add toml support as well.

for documentation

  # .SYNOPSIS
  # Why do I need to type .SYNOPSIS above here, and yes that extra line is too many
  function foo(
      # but here its just obviously a comment for a parameter
      [string] $param=""
  ) {
      $param
  }
Also didn't mention this before I wish there was a version of powershell that was static checked like typescript for javascript.
Re:Linux and Powershell on Tuesday January 19, 2021 @08:09PM (#25841326)
I like powershell, but miss

bash set -e.(really really miss this)

Find it hard to set a script to abort with a stack trace.

Find it hard to deal with relative imports(this script imports a file in the same folder)

explaining the scoping rules

Disklike explains how your array is now a single object when you returned it from a function

Absolutely love powershell JSON support, miss native yaml support.

Love parameter globing

Love integration of parameters with a script, dislike that auto generated help can’t be done via single line comment to function

Re:Have the Tables Turned on NoSQL? on Friday January 15, 2021 @10:00PM (#25799597)
There are, but not with as many developers as JS. And because JS has so many developers it is better in some metrics.
Re:The sweet danger of sugar (2017) on Tuesday December 29, 2020 @12:00AM (#25566907)
That’s what the government wants you to believe.
Re:How Satya Nadella turned Microsoft around on Friday October 23, 2020 @10:15PM (#24876374)
If you want to talk about a failure you should talk about the kin.
Re:Let's Create a Simple Load Balancer with Go on Saturday November 09, 2019 @10:46PM (#21496281)
With talk of proxy and go. I am surprised gobetween hasn’t been mentioned yet https://github.com/yyyar/gobetween . Last time I looked at the source it was very approachable.