HNHacker News
TopNewBestAskShowJobs

3r8Oltr0ziouVDM

46 karma · joined August 16, 2021

submissionscomments
3r8Oltr0ziouVDM··on Backdooring Rust crates for fun and profit
Ok, but in Rust or NodeJS an HTTP server may depend on a package A that depends on a package B that depends on a package C that then introduces a backdoor in its 1.0.1 release. In a pure functional language you can quickly look through dependencies of an HTTP server, and if it has zero impure dependencies then you just need to trust the developers of this one HTTP server package.
3r8Oltr0ziouVDM··on Backdooring Rust crates for fun and profit
No. What I'm saying is that many of the dependencies in any language don't need to perform side effects, they only do pure calculations. For example a JSON parser takes a JSON string and returns some data structures. It's a pure function. However, in a language like Rust you can easily hide malicious code that has access to network inside such a function. In a pure functional language you can tell from the signature of a function you're calling that it is indeed a pure function and is guaranteed to not perform any side effects. So it is safe to call any function from a third-party dependency that doesn't do side effects (which you can immediately see from the type signature) without even inspecting the code.
3r8Oltr0ziouVDM··on Backdooring Rust crates for fun and profit
You can't perform HTTP requests from a pure function without making it obvious in its signature that it does side effects. For example in a language like Haskell:

  add : Int -> Int -> Int
  add x y = x + y
There is no way a function like this can run a Bitcoin miner, all it can do is to return an `Int`. In order to do side effects, a function must return a special `IO` type that should then be returned from `main` (and only then these side effects would be performed).
3r8Oltr0ziouVDM··on Backdooring Rust crates for fun and profit
We should switch to using pure functional languages by default. Most of the packages don't need to do any side effects and only perform pure calculations. In a pure functional language it is obvious from function signatures if these functions are able to perform side effects, so it's not possible to hide a backdoor inside a pure function. An average project would depend only on a few impure packages, such as a HTTP client or a framework, therefore it would be much easier to verify the security (for small impure packages you could just inspect their code yourself, and bigger packages like frameworks would have many contributors that check the code and strict policies about their security). Languages like Rust and C++ for which the pure functional model doesn't work should then only be used for performance critical code, and projects written in impure languages should avoid third-party dependencies as much as they can.
3r8Oltr0ziouVDM··on Const Generics in Rust
No, const generics only work with compile-time constants.
3r8Oltr0ziouVDM··on Swedish government agencies say energy-intensive crypto mining should be banned
You don't need to invest if you just want to use it.
3r8Oltr0ziouVDM··on Swedish government agencies say energy-intensive crypto mining should be banned
Not possible unless majority of the nodes accepts the change.
3r8Oltr0ziouVDM··on Swedish government agencies say energy-intensive crypto mining should be banned
It's great for doing cross-border transfers without restrictions as an example. For privacy there are Monero and mixers. The solution for volatility is stablecoins. DeFi can be useful for traders, you can trade without trusting any platform to hold your assets. The most important thing: it's an open source alternative to the traditional financial system, anyone can use it for anything without asking anyone else, and it evolves very fast because there is a lot of competition and no restrictions.
3r8Oltr0ziouVDM··on Investors Spent Millions on ‘Evolved Apes’ NFTs. Then They Got Scammed
Tornado.cash
3r8Oltr0ziouVDM··on $8000 of SHIB coin is worth $5.7b (in 400 days)
Monero is a private alternative to Bitcoin, all transactions are anonymous. Cardano, Solana, Algorand are smart contract platforms like Ethereum but with different technology and tradeoffs. These are just a few examples.
3r8Oltr0ziouVDM··on Welcome to the brand new Erlang Forums
>the only thing I feel I've lost out on is being able to view Twitter

I use Nitter https://nitter.net/

3r8Oltr0ziouVDM··on Welcome to the brand new Erlang Forums
I only started to disable JS in 2021, lol. Running arbitrary scripts from random sites on the Internet is not a good idea as there are many privacy and security risks. Browsing with JS disabled by default actually works pretty well, most of the sites are more or less readable. Of course if I was using Erlang and interested in this forum, I'd enable JS on it because it's probably fine (and open source?), but it's still disappointing that a programming forum is not at all readable without JS.
3r8Oltr0ziouVDM··on Welcome to the brand new Erlang Forums
I'm on desktop, using Firefox, and it's just an empty page with a red border at the top for me.
3r8Oltr0ziouVDM··on Welcome to the brand new Erlang Forums
Doesn't work without JS.
3r8Oltr0ziouVDM··on Nim receives $100k in Bitcoin donations
What do you mean by "finally"? It always was one the main use cases, doing p2p value transactions.
3r8Oltr0ziouVDM··on Nim receives $100k in Bitcoin donations
>You know, you can always do a bank transfer.

Lol. In my country there is no easy way to do an international bank transfer. Crypto is literally the only solution I can imagine if I want to donate a few bucks to a FOSS project, all other options would be too much effort and too expensive.

3r8Oltr0ziouVDM··on Google Pixel 6 Launch [video]
You can install an open source OS on it.
3r8Oltr0ziouVDM··on Mozilla to put ads in Firefox address bar suggestions
It's not even open source.
3r8Oltr0ziouVDM··on It costs $436 to deploy a smartcontract on Ethereum
It can modify the state of the blockchain based on the inputs.
3r8Oltr0ziouVDM··on No More Medium – Build Your Own Site (2019)
I think Medium works better with JS disabled, I don't remember seeing any paywalls there since I started to browse with JS disabled by default.
3r8Oltr0ziouVDM··on Matrix trailer dynamically uses current time
Doesn't work for me because my time zone is spoofed :)
3r8Oltr0ziouVDM··on Malware found preinstalled in classic push-button phones sold in Russia
Yes.
3r8Oltr0ziouVDM··on Malware found preinstalled in classic push-button phones sold in Russia
https://shop.puri.sm/shop/librem-5-usa ?
3r8Oltr0ziouVDM··on uBlock Origin review
It can certainly break if YouTube changes something on their side, but I've never had huge issues, so it's probably not something that happens very often. But the mobile site is a good fallback option.
3r8Oltr0ziouVDM··on uBlock Origin review
In case you'd want to try it: NewPipe is open source and it's on F-Droid which is a very safe place to get apps from.
3r8Oltr0ziouVDM··on uBlock Origin review
>I also started using the YouTube mobile website instead of the apps after getting 2 ads before a 3 minute video.

Have you tried NewPipe? https://newpipe.net

3r8Oltr0ziouVDM··on NitroPhone – Pixel 4a phone with GrapheneOS
No. It's a Pixel phone, the hardware is not open.
3r8Oltr0ziouVDM··on Tech-savvy audiences block Google Analytics
Disable JavaScript by default (try uBlock's advanced mode).
3r8Oltr0ziouVDM··on Away from Exceptions: Errors as Values
>Only throw exceptions when something really bad has happened and the program must stop. For example:

> the program cannot connect to its database;

> the program cannot write output to disk because the disk is full;

> the program was not started with valid configuration.

I'd prefer Result over exceptions even in these cases. The only case where I think exceptions should be used is when the type system of the language is not powerful enough to prove the validity of some operation. For example in Rust:

  let v = vec![1, 2, 3];
  let n = v.pop().unwrap();
The `pop` method returns `Option`, but I as a programmer know for sure that the collection isn't empty, I just can't prove it to the compiler. So I use `unwrap` to get the value and panic in the case I'm actually wrong and made a stupid mistake.

Another example is division by zero. Using a `Result` as a return value of the division operator would be extremely inefficient and unergonomic. Panic/exception is the best way to handle this situation.

I believe dependent types can solve both of the problems above so we can get rid of exceptions completely. Unfortunately, there is no a single mainstream language that has them.

3r8Oltr0ziouVDM··on I switched from macOS to Linux after 15 years of Apple
I've tried Fedora recently. The package manager didn't pass my stress test:

1. Did a minimal installation without a GUI. 2. Installed Gnome. 3. Installed KDE. 4. Uninstalled Gnome and KDE. The system ended up in a broken state: many important packages were deleted, I couldn't connect to the network, and the package manager stopped working.

Page 1 of 2Next →