Hacker News new | past | comments | ask | show | jobs | submit | kgabis's favorites login

After Brexit everyone in Zurich thought that all FinTech startups would move from London to Frankfurt or maybe Zurich, since Switzerland has tight relationships with the EU.

This did not seem to happen.

Also, I haven't gotten more UK people asking me for tech jobs in Zurich compared to before Brexit. (I run a tech recruiting agency; happy to help people who want to move to Switzerland, you finde the recently released job-list here: https://coderfit.catsone.com/careers/ - job-descriptions are still WIP, please bear with us)


A fun and fairly simple project, with a surprisingly high ratio of usefullness to effort, is to write an interpreter for a concatenative language. Concatenative languages, like FORTH, can do a lot with very limited resources, making them good candidates for embedded systems.

If you want to play around with making your own concatenative language, it is actually surprisingly simple. Here is an overview of a step-by-step approach that can take you from a simple calculator to a full language with some optimization that would actually be quite reasonable to use in an embedded system.

So let's start with the calculator. We are going to have a data stack, and all operations will operate on the stack. We make a "dictionary" whose entries are "words" (basically names of functions). For each word in the dictionary, the dictionary contains a pointer to the function implementing that word.

We'll need six functions for the calculator: add, sub, mul, div, clr, and print. The words for these will be "+", "-", "x", "/", "clr", and "print". So our dictionary looks like this in C:

    struct DictEntry {
        char * word;
        int (*func)(void);
    } dict[6] = {
        {"+", add}, {"-", sub}, {"x", mul},
        {"/", div}, {"clr", clr}, {"print", print}
    };
We need a main loop, which will be something like this (pseudocode):

    while true
        token = NextToken()
        if token is in dictionary
            call function from that dict entry
        else if token is a number
            push that number onto the data stack
Write NextToken, making it read from your terminal and parse into whitespace separated strings, implement add, sub, mul, div, clr, and print, with print printing the top item on the data stack on your terminal, and you've got yourself an RPN calculator. Type "2 3 + 4 5 + x print" and you'll get 45.

OK, that's fine, but we want something we can program. To get to that, we first extend the dictionary a bit. We add a flag to each entry allowing us to mark the entry as either a C code entry or an interpreted entry, and we add a pointer to an array of integers, and we add a count telling the length of that array of integers. When an entry is marked as C code, it means that the function implementing it is written in C, and the "func" field in the dictionary points to the implementing function. When an entry is marked as interpreted, it means that the pointer to an array of integers points to a list of dictionary offsets, and the function is implemented by invoking the functions of the referenced dictionary entries, in order.

A dictionary entry now looks something like this:

    struct DictEntry {
        char * word;
        bool c_flag;
        void (*func)(void);
        int * def;
        int deflen;
    }
(continued in reply)

I had the same issue with noise-cancelling headphones (the bose qc 20 in-ears) where I couldn't wear them without sound pumping through them, so I ended up buying a pair of custom-molded in ear monitors (IEM is the search keyword to learn more). For a little cheaper than the price of the bose headphones, I had an audiologist take molds of my inner ear and then sent them to a guy in Poland (http://thecustomart.com/music_art-custom.php), who made me the best pair of headphones I've ever used. Noise cancelling is on-par or better than the Bose headphones, but all passive, and they sound fucking amazing. Highly recommend looking into this or another custom IEM solution -- it's made me a lot happier and more productive and less worried about hearing loss.

One question that the audiologist answered that you might want to know -- the noise-cancelling hiss has no impact on your hearing in a short-term or long-term way, so it is totally safe to use them without music or with low music all the time.


I have a slight fascination with sweeteners. About five years ago I imported a kilo of "Neotame" sweetener from a chem factory in Shanghai. It was claimed to be 10,000-12,000 times sweeter than sugar. It's a white powder and came in a metal can with a crimped lid and typically plain chemical labeling. Supposedly it is FDA-approved and a distant derivative of aspartame.

US customs held it for two weeks before sending it on to Colorado with no explanation. When received, the box was covered in "inspected" tape and they had put the canister in a clear plastic bag. The crimped lid looked like a rottweiler chewed it open and white powder was all over the inside of the bag. I unwisely opened this in my kitchen with no respirator as advised by the MSDS which I read after the fact (I am not a smart man).

Despite careful handling of the bag, it is so fine in composition that a small cloud of powder erupted in front of me and a hazy layer of the stuff settled over the kitchen. Eyes burning and some mild choking from inhaling the cloud, I instantly marveled at how unbelievably sweet the air tasted, and it was delicious. For several hours I could still taste it on my lips. The poor customs inspector will have had a lasting memory of that container I'm pretty sure.

Even after a thorough wipe-down, to this day I encounter items in my kitchen with visually imperceptible amounts of residue. After touching it and getting even microscopic quantities of the stuff on a utensil or cup, bowl, plate, whatever, it adds an intense element of sweetness to the food being prepared, sometimes to our delight. I still have more than 900g even after giving away multiple baggies to friends and family (with proper safety precautions).

We have been hooked on it since that first encounter. I keep a 100mL bottle of solution in the fridge which is used to fill smaller dropper bottles. I've prepared that 100mL bottle three times over five years, and that works out to about 12g of personal (somewhat heavy) usage for two people in that time. Probably nowhere near the LD50.

I carry a tiny 30mL dropper bottle of the solution for sweetening the nasty office coffee and anything else as appropriate. Four drops to a normal cup of coffee. We sweeten home-carbonated beverages, oatmeal, baked goods (it is heat stable), use it in marinades, and countless other applications.

I don't know if it's safe. The actual quantity used is so incredibly tiny that it seems irrelevant. I'd sweeten my coffee with polonium-210 if it could be done in Neotame-like quantities. Between this, a salt shaker loaded with MSG and a Darwin fish on my car, I'm doomed anyway.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: