wheresvic1's comments

wheresvic1 | 6 years ago | on: QuickJS JavaScript Engine

I'm asking this here because I don't really know where else to do so: I'm trying to compile a binary from a js source that uses the standard modules (they are loaded by default if you run the interpreter) so the following works:

    std.printf("%d\n", 1);
    std.printf("%s\n", os.platform);
However it does not compile to a binary and doing something like:

    import std from "std";
    import os from "os";

    std.printf("%d\n", 1);
    std.printf("%s\n", os.platform);
compiles via `./qjsc -m -o default_modules examples/default_modules.js` however does not execute:

    $ ./default_modules 
    SyntaxError: export 'default' in module 'std' is ambiguous
Source: https://github.com/smalldatatech/quickjs/blob/master/example...

wheresvic1 | 6 years ago | on: Ask HN: What are you working on?

This sounds pretty cool but tbh, if I'm willing to try out a beta product with all my images (and the risk of losing them due to some bug or any other risk) and provide feedback, I'd like to have a bigger carrot than just using the product for free in beta only :)

wheresvic1 | 6 years ago | on: Ask HN: What are you working on?

Professionally, I'm really lucky as I am working in R&D at a university hospital and I have a couple of cool projects going:

- The current medical application used in our hospital does not have a way to track if a case is a re-admission or not. This information is very important in surgery and urology. The doctors are using an excel file to track this information at the moment and we are building an app so that this information gets put into a database and will also later be integrated into the main medical system.

- Currently, students in radiology do not get very many chances to actually look at images to practice so we are building a crowdsourcing platform for radiology images. This will also be useful for interviewing or general practice for professionals.

On the side, I've been working on https://ewolo.fitness - a workout tracking app that also has running and weight tracking built-in. I found all existing solutions too gimmicky and annoying - a workout tracker should be as flexible as possible and let you add your data and get out of your way...

wheresvic1 | 7 years ago | on: Copying objects in JavaScript

Aha yes you are correct - it outputs an ISO string at the very least but does not parse it back to a date. I will update the article to reflect this!

wheresvic1 | 7 years ago | on: Stop using JWT for sessions (2016)

> I saw many examples on the net of people putting role/authorization and various other types of session information within the JWT and it just looked insane to me.

Why is this crazy? If you encrypt your JWT with a private key that is only known to the server, then any modification to the JWT will lead to an invalid token.

The only thing here is that the list of roles granted is visible to the user if they were to decode the JWT, which is something you might not be entirely comfortable with but I don't think it's totally crazy.

wheresvic1 | 7 years ago | on: Kubernetes for personal projects? No thanks

Totally agree with the author, for my side projects in Node.js, I use the following:

- pm2 for uptime (pm2 itself is setup as a systemd serivce, it's really simple to do and pm2 can install itself as a systemd service)

- I create and tag a release using git

- on the production server, I have a little script that fetches the latest tag, wipes and does a fresh npm install and pm2 restart.

- nginx virtual host with ssl from letsencrypt (setting this stuff was a breeze given the amount of integration and documentation available online)

Ridiculously simple and I only pay for a single micro instance which I can use for multiple things including running my own email server and a git repo!

The only semi-problem that I have is that a release is not automagically deployed, I would have to write a git hook to run my deployment script but in a way I'm happy to do manual deployments as well to keep an eye on how it went :)

page 1