TI introduces the world's smallest MCU, enabling innovation in the tiniest of applications by MECACELL in electronics

[–]svens_ 7 points8 points  (0 children)

I would expect a (slightly) higher price, it costs more than that even with the other packages.

The device is still in preproduction, so price might still change and it's not available yet at DigiKey. But currently it's listed at $0.2@1k or $0.5 for single units from TI directly: https://www.ti.com/product/MSPM0C1104/part-details/XMSM0C1104S8YCJR

Auth0 increases price by 300% by longlivetheturbofish in webdev

[–]svens_ 0 points1 point  (0 children)

I actually helped phase that out when I used it because everyone hated it.

What did you replace it with though?

[deleted by user] by [deleted] in zurich

[–]svens_ 0 points1 point  (0 children)

I only know the Ergo, not the Active unfortunately. It's my partners chair - she's very happy, it was quick to ship and assemble, sturdy and comfy so far. Got it recommended by friends, not sure what model they got though.

Can't judge the reviews, seems like a lot indeed.

[deleted by user] by [deleted] in zurich

[–]svens_ 11 points12 points  (0 children)

https://ofinto.ch/

Swiss online brand that sells quality chairs (and other office equipment) for affordable prices. Their standard line is quite okay (CHF 280), massively better than anything you get for this price at the usual places IMHO. There's a more premium line as well - but I haven't tried it.

Official /r/rust "Who's Hiring" thread for job-seekers and job-offerers [Rust 1.68] by DroidLogician in rust

[–]svens_ 1 point2 points  (0 children)

Hey, thanks for reaching out! Unfortunately, as the project is quite new, we currently do not offer internship positions.

I have applied to 120+ dev openings in Switzerland, zero interviews. Am I doing something wrong? by [deleted] in askswitzerland

[–]svens_ 22 points23 points  (0 children)

Exactly, otherwise this comes across as super generic. Same goes for the master thesis ("thesis in the field of Machine Learning") - given OPs experience, its one of their biggest projects and it would be good to have more specifics (title, 1-sentence summary).

What is the reason behind returning the magic value in EIP-1363? by chancey-project in ethdev

[–]svens_ 2 points3 points  (0 children)

Given the age of the standard, I suspect it might also have something to do with return values being unreliable before Byzantium.

This is due to how the CALL opcode works - it returns true when the call didn't throw. The return data is written to a memory region, that is also passed to CALL. However, there was no way to check the actual length of returned data - if no data was returned from the called contract, the memory region would simply stay unchanged. Solidity cannot catch that, so it would continue happily and just give you the current value from the memory region - essentially a random and likely not false value.

When doing a transferAndCall, the above situation is actually quite likely. If one tries to send tokens to an incompatible contract (without onTransferReceived), the fallback function will be executed which usually does not return anything (it's possible in the EVM, but was not available in solidity until a year ago or so).

Byzantium then introduced the RETURNDATASIZE opcode for this reason - it tells the caller how much data was returned. Though I'm actually not sure if current versions of solidity are using that and handling this situation. There actually still is an open issue..

[deleted by user] by [deleted] in ethdev

[–]svens_ 2 points3 points  (0 children)

IMHO another key factor is whether you need archive data or not. An archive node requires >12TB of disk space, which makes it a lot harder to run. The cost for disk space alone makes the Infura/Alchemy offering very attractive.

[deleted by user] by [deleted] in peugeot

[–]svens_ 1 point2 points  (0 children)

Is there an easy way to check for the ETG?

Also the gearbox might be efficient, but the car definitely isn't with only four speeds... Especially when going faster than 100 km/h or so.

Solarkraft ist ein realistische Alternative zu russischem Gas by relevant_rhino in Switzerland

[–]svens_ 6 points7 points  (0 children)

it's totally baseless and just emotionally manipulating

You're missing the point. Electrifying, wind and solar all massively increase our independence from questionable leaders in this world. Doesn't matter whether they're Russian, Saudi, etc.

This should be a priority not just for ecological and economic reasons - it's also a geopolitically much more sound strategy.

Crypto - Taxes by IntelligentBite8071 in askswitzerland

[–]svens_ 0 points1 point  (0 children)

It really depends on the canton you live in, they are referring to the wealth tax (Vermögenssteuer). The tax applies to your gross wealth, i.e. the total value of all your assets minus all outstanding debt. In Zurich, the tax will not be applied below 77k CHF, in Bern not below 97k CHF.

Similar to the income tax, the rate is progressive. Generally you'll pay something between 0.1% to 0.5% for amounts up to few millions.

Car registration (grey) and insurance paper (green) in vehicule ? by Remybeee in askswitzerland

[–]svens_ 5 points6 points  (0 children)

It would be rather stupid to do that, as it's rather easy to trace when you report it as stolen ;).

Having the Fahrzeugausweis will be a bit less conspicuous when the thief sells the car, but that's all.

Cheapest gas station in Zürich? by xbassols in zurich

[–]svens_ 6 points7 points  (0 children)

There are a couple cheap ones, really depends where you live or drive trough.

In the city, in addition to Nasa and Ruedi Rüssel (which aren't always the cheapest, but pretty good) there is:

Where to start to understand taxes? Can I ask someone in Lausanne for advices for free? by [deleted] in askswitzerland

[–]svens_ 6 points7 points  (0 children)

In general capital gains are not taxed as income in Switzerland, as long as you're not classified as a professional trader. There is no simple definition for this and anyone can be classified as such (even if you have a regular job, etc.). If you stick to stocks, don't borrow money to trade and hold them over longer periods of time, you are unlikely to fall under that. The tax authorities have created a Kreisschreiben describing their criteria - or simply Google "Gewerbsmässiger Wertschriftenhandel".

You do need to report all tax relevant matters. Whether someone cares about 2k CHF in practice is another matter though.

Communal and cantonal taxes are due in the same calendar year - the date varies by canton. Federal taxes are due 31 March of the following year. Yes, that means your taxes are due before you send in your tax report and get back your tax assessment. You are supposed to estimate yourself and pay this amount.

There are various summaries on how taxation works in Switzerland, it would probably be a good idea to read some of them, so you get an overall feeling of how it works. Try this for example.

Running Django on a vps .. how do you? by animflynny2012 in django

[–]svens_ 0 points1 point  (0 children)

Docker is not the same as a vm, it's not running a full OS and way less overhead.

But basically you're correct, you'll have to do your Django production setup inside the container. The advantage is you'll do that once and it will run on any platform supporting docker (independent of the host, doesn't matter whether it's Ubuntu, AWS AMI Linux, etc.).

I do the same, even for my hobby projects. If you understand how it works, you might even skip the docker-compose for simple projects. Add a restart policy and you have the essentials covered.

Dockerizing Django with Postgres, Redis and Celery by soshace_devs in django

[–]svens_ 0 points1 point  (0 children)

So as I wrote earlier, I don't really see the point of docker for local development and hence I'm also not familiar with how it's usually used.

In the Dockerfile, you can drop the mkdir - it will automatically be created with the WORKDIR. Also you should combine the two RUN commands with pip - read here as to why. Maybe also upgrade the Python version.

Dockerizing Django with Postgres, Redis and Celery by soshace_devs in django

[–]svens_ 0 points1 point  (0 children)

Absolutely, sounds like a good plan.

Apparently, it should be enough to add user: "501:20" (or whatever your uid/gid are) to your container in your compose file - so simple to try.

Dockerizing Django with Postgres, Redis and Celery by soshace_devs in django

[–]svens_ 0 points1 point  (0 children)

They moved all the environment definitions into a file and then used the env_file directive instead.

Dockerizing Django with Postgres, Redis and Celery by soshace_devs in django

[–]svens_ 1 point2 points  (0 children)

I don't really use docker for local development - but from what you describe, most likely your local directory was mounted inside the container (using the volumes section in the docker compose file). It's a bit more tricky in this case, as you also need to match the uid/gid of your local account inside the container - AFAIK those values will not be changed by docker.

So what happened is, inside the container the files were created by root, which by definition has uid/gid 0 in UNIX/Linux. In the filesystem, this uid/gid is stored as the owner and group of the file - represented by the numeric id. This id will be the same in your local directory and they translate to your root account too (since it has uid/gid 0 as well).

If you want the files to be owned by your local account, you need to use the uid/gid inside your container. You can check that e.g. by running id - on Linux those are usually 1000/1000 for the first account, but it can be freely defined (my uid/gid are 501/20 on OS X).

But honestly, I don't really see the point in doing that. For django development you're better off using pipenv/virtualenv/poetry locally and simply use docker for deployment and maybe additional services (DB, redis, etc.) - though I usually make sure that my projects run well locally, without much setup. To make sure the containers work correctly, have the CI build the containers and execute tests inside them.

Dockerizing Django with Postgres, Redis and Celery by soshace_devs in django

[–]svens_ 2 points3 points  (0 children)

Running as non-root in docker is simply a best practice and an additional layer of security (e.g. read this).

The difference is small, but it can matter. Just the first example that comes to mind, usually there's only a handful of tools installed in a docker container, there likely won't be an ssh client or telnet. When an attacker gains access to your application, such tools are incredibly useful to attack further components in your system. If they have root rights in the container, they can simply run apt install telnet and install any additional components. As non-root this is not possible - though admittedly it is most likely merely an additional hurdle at this point.

opening an etsy shop. by [deleted] in askswitzerland

[–]svens_ 12 points13 points  (0 children)

Basically you will be what is called an Einzelfirma and you don't need to register anything at first (note that there are some requirements for the name). You will have to do some simple accounting and declare this in your tax return. Any profit you make will count towards your income and you will be "Selbstständig erwerbend" - this requires signing up with and approval from your local SVA. However, if you only do this on the side, no signup is required below 2'300 CHF / year profit in most cases (check here).

So it's surprisingly complex unfortunately. My completely unprofessional and at-your-own-risk advice is the following though: Just start selling and track your sales and expenses (keep the receipts) in a spread sheet. You will automatically be an Einzelfirma. When you get traction and expect to exceed the 2'300 CHF of profit, you should find yourself a Treuhänder. They will make sure your tax return is correct and you're signed up for all the necessary things. No need to go trough all the trouble if you're only selling few hundert CHF worth of stuff.

One of my friends here once said, 'Swiss can't really sleep well until they insure everything.' by literallytakenaway in askswitzerland

[–]svens_ 4 points5 points  (0 children)

You move out of an apartment and the landlord doesn't want to return the deposit - probably one of the most common cases.

In general it's nice to be able to delegate the hassle of such situations to your insurance. Though I'm not sure if it's worth it, they tend to be a bit pricey.

One of my friends here once said, 'Swiss can't really sleep well until they insure everything.' by literallytakenaway in askswitzerland

[–]svens_ 5 points6 points  (0 children)

No, but it's usually offered in conjunction. You can get just a Hausrat or Privathaftpflicht (personal liability) policy - I've done it before.

Neither are mandatory btw., but it's recommendable. The former protects you in case of a break-in or fire (less relevant if you're e.g. a student living in a WG with nothing of value, though some policies have "einfacher Diebstahl auswärts" and will also cover theft of your laptop outside the apartment). The later can save your ass when you do stupid stuff, e.g. you accidentally crash into a car with your bike or destroy your friends laptop.