News for hackers. Stuff that matters.

johncs

Re:Show HN: Trail – new kind of logic game on Sunday September 27, 2026 @02:50PM (#49869636)
Needs difficulty modes, or a steeper curve. Too easy for too long.
Re:docker2exe: Convert a Docker image to an executable on Wednesday May 07, 2025 @03:13AM (#43913009)
Basically the same as Python’s zipapps which have some niche use cases.

Before zipapp came out I built superzippy to do it. Needed to distribute some python tooling to users in a university where everyone was running Linux in lab computers. Worked perfectly for it.

Re:Google Search: Roboto Mono on Thursday July 25, 2024 @05:24AM (#41066587)
Thank you! It’s the Solarized color scheme which is definitely a bit low-contrast. I probably don’t notice it only because I’ve been using the color scheme across apps for so long.
Re:Google Search: Roboto Mono on Thursday July 25, 2024 @04:00AM (#41066020)
I do wish monospace designs were at least a _little_ trendier. My blog uses one, but honestly I feel like I should change it up since I'm looking for roles right now and I worry it doesn't _delight_ like modern designs right now.
Re:Iterating on an HTML resume with GPT-4o via cURL on Tuesday July 23, 2024 @07:57PM (#41052309)
> I have been manually copying my resume source into ChatGPT for feedback

That’s what I started out doing as well. At some point I got tired of it, and after writing the script I realized the tighter feedback loop was really nice.

Re:Ask HN: Who wants to be hired? (June 2024) on Monday June 03, 2024 @01:44PM (#40565191)

    Location: Portland, OR
    Remote: Yes
    Willing to relocate: Yes (Only to the Bay Area)
    Technologies: Most recently TypeScript, Python, React, PostgreSQL, GCP.
    Resume: https://resume.johncs.com
    Email: [email protected]
Full-stack engineer with professional experience in other areas including Unity, desktop, mobile, and set-top boxes. I've founded two small businesses with modest success but prefer the life of an IC.

I started programming 24 years ago when I was 7 and have been continuously loving and learning more about my craft since.

I've very recently started looking for a new IC role once again. I am interested in Senior/Staff roles that will allow me to continue expanding my knowledge.

There's a great Computerphile video from 2015 that introduced me to the idea of AI safety awhile ago. It seems like some good context to this article: https://www.youtube.com/watch?v=tcdVC4e6EV4
Yes. I run a small website and a friend of mine has agreed to take it over if I die. I've shared the passwords of the services that the website is hosted on with them via a package manager.

I do not have anything similar for my bank accounts or personal subscriptions.

Re:Can We All Just Admit React Hooks Were a Bad Idea? on Monday October 17, 2022 @01:59PM (#33237389)
This article asserts SOLID and MVC is good with basically no justification. It also doesn’t show how non-hooks code would be better.
Re:SL(1): Cure your bad habit of mistyping on Tuesday July 12, 2022 @09:28PM (#32077969)
Ah of course you meant in a word processor...

    $ never mind
    -bash: never: command not found
Thought I was about to learn about a new utility for a moment.
Re:GnuCash on Saturday April 30, 2022 @08:52PM (#31221017)
For those of you who like the idea of GNUCash but are looking for an easier tool to use (for us developer folks), check out https://plaintextaccounting.com.
Seems to be going after the same problems that https://shmeppy.com does. The specific choices are different though (like drawing is much different).
You got a good laugh out of me with the meow in your description.
Re:Jo – a shell command to create JSON (2016) on Sunday February 06, 2022 @07:56AM (#30232087)
Ended up sniping myself . Made a fairly complete version of what I was imagining: https://github.com/itsjohncs/construct-json#readme
Re:Jo – a shell command to create JSON (2016) on Sunday February 06, 2022 @01:33AM (#30230035)
In the common case where you trust your input entirely you can just interpret your string as JavaScript. Then you don't even need to use quotes for the key names.

    $ alias fooson="node --eval \"console.log(JSON.stringify(eval('(' + process.argv[1] + ')')))\""
    $ fooson "{time: $(date +%s), dir: '$HOME'}"
    {"time":1457195712,"dir":"/Users/jpm"}
It may be a bit nicer to place that JavaScript in your path as a node script instead of using an alias.

    #!/usr/bin/env node
    console.log(JSON.stringify(eval('(' + process.argv[2] + ')')))
Since fooson's argument is being interpreted as JavaScript, you can access your environment through process.env. But you could make a slightly easier syntax in various ways. Like with this script:

    #!/usr/bin/env node
    for(const [k, v] of Object.entries(process.env)) {
        if (!global.hasOwnProperty(k)) {
            global[k] = v;
        }
    }
    console.log(JSON.stringify(eval('(' + process.argv[2] + ')')))
Now environmental variables can be access as if they were JS variables. This can let you handle strings with annoying quoting.

    $ export BAR="\"'''\"\""
    $ fooson '{bar: BAR}'
    {"bar": "\"'''\"\""}
If you wanted to do this without trusting your input so much, a JSON dialect where you can use single-quoted strings would get you pretty far.

    $ fooson "{'time': $(date +%s), 'dir': '$HOME'}"
    {"time":1457195712,"dir":"/Users/jpm"}
If you taught the utility to expand env variables itself you'd be able to handle strings with mixed quoting as well.

    $ export BAR="\"'''\"\""
    $ fooson '{"bar": "$BAR"}'
    {"bar": "\"'''\"\""}
You'd only need small modifications to a JSON parser to make this work.
Re:Show HN: Looptap – A minimal game to waste your time on Thursday January 13, 2022 @03:46PM (#29926606)
Oh hey, it’s one of Fable’s mini games! Very cool to see
Re:Ask HN: What you up to? (Who doesn't want to be hired?) on Monday November 01, 2021 @10:15PM (#29076085)
I've been contributing to the IRC ecosystem again. Working on bringing some IRCv3 [1] features to The Lounge [2] right now.

Tryna do some neat things with the virtual tabletop I've built (Shmeppy [3]) as well. Getting its renderer off of the 2D Canvas API and onto WebGL, as well as some of its more perf-sensitive code onto WASM.

[1] https://ircv3.net [2] https://github.com/thelounge/thelounge [3] https://shmeppy.com

Re:The Troublesome Active Record Pattern on Thursday March 19, 2020 @02:58AM (#22625196)
> This pattern of access is simple and intuitive but causes huge problems in even small projects. Retrieving whole rows is hugely wasteful when only part of the row is required to resolve a user request.

Retrieving a whole row rather than just a single column from a database that's likely on a local network definitely doesn't seem "hugely wasteful", especially for smaller projects.

Re:A common mistake involving wildcards and the find command on Saturday February 08, 2020 @06:18PM (#22279304)
I set failglob: `shopt -s failglob`. Makes the whole command fail if there's no matches. That combined with `set -e` which aborts the script in the event of any command failing makes me feel somewhat safe.

Indeed I add the following two lines to every bash script I write:

    set -exu
    shopt -s failglob

Older »