|
MⒶrtin HⒶboⓋštiak [BEFORE! Jan/3➞₿🔑∎, LNP/BP]
@
kixunil
|
|
I'm programmer interested in Rust, Linux, Open Source, Bitcoin, liberty, agorism and much more.
Are you blocked and think it's a mistake? Reach me at ln-ask.me
|
|
|
13.409
Tweetovi
|
540
Pratim
|
1.300
Osobe koje vas prate
|
| Tweetovi |
|
MⒶrtin HⒶboⓋštiak [BEFORE! Jan/3➞₿🔑∎, LNP/BP]
@kixunil
|
10 h |
|
One possibility would be for me to require everyone to communicate via ln-ask.me ;)
|
||
|
|
||
|
MⒶrtin HⒶboⓋštiak [BEFORE! Jan/3➞₿🔑∎, LNP/BP]
@kixunil
|
10 h |
|
Wouldn't it be easier to write fn ctx_mapper<C, E>(ctx: C) -> impl FnOnce(E) -> ErrorReport;
?
|
||
|
|
||
| MⒶrtin HⒶboⓋštiak [BEFORE! Jan/3➞₿🔑∎, LNP/BP] proslijedio/la je tweet | ||
|
Manish
@ManishEarth
|
13 h |
|
dude you've advocated for blockchain voting, sit the fuck down twitter.com/AndrewYang/sta…
|
||
|
|
||
|
MⒶrtin HⒶboⓋštiak [BEFORE! Jan/3➞₿🔑∎, LNP/BP]
@kixunil
|
4. velj |
|
That's a nice way to fix the consequences of that bug! 👍
|
||
|
|
||
| MⒶrtin HⒶboⓋštiak [BEFORE! Jan/3➞₿🔑∎, LNP/BP] proslijedio/la je tweet | ||
|
nic carter
@nic__carter
|
3. velj |
|
the "problem" that utility tokens solve is the founders not being rich enough
that's it. that's the tweet
|
||
|
|
||
|
MⒶrtin HⒶboⓋštiak [BEFORE! Jan/3➞₿🔑∎, LNP/BP]
@kixunil
|
4. velj |
|
Looks interesting!
|
||
|
|
||
|
MⒶrtin HⒶboⓋštiak [BEFORE! Jan/3➞₿🔑∎, LNP/BP]
@kixunil
|
4. velj |
|
For early development I do this:
#[derive(Debug, thiserror::Error)
#[error (transparent)]
struct Error (anyhow::Error);
The idea is to change it later to a more specific type once I know well what kinds of errors I need.
|
||
|
|
||
| MⒶrtin HⒶboⓋštiak [BEFORE! Jan/3➞₿🔑∎, LNP/BP] proslijedio/la je tweet | ||
|
Naomi Wu 机械妖姬
@RealSexyCyborg
|
4. velj |
|
Western women need to sit down and have a serious chat about why they fucking despise the female body. If tits make you this upset you're broken.
decider.com/2020/02/01/ali…
|
||
|
|
||
|
MⒶrtin HⒶboⓋštiak [BEFORE! Jan/3➞₿🔑∎, LNP/BP]
@kixunil
|
4. velj |
|
Hey @tippin_me ditch zero amount invoices ffs! They are insecure and unprovable.
|
||
|
|
||
|
MⒶrtin HⒶboⓋštiak [BEFORE! Jan/3➞₿🔑∎, LNP/BP]
@kixunil
|
4. velj |
|
I think it should be assumed he stole it and sent Jack 1 sat to obtain the screenshots. Tipping me uses zero amount invoices, so he can't create cryptographic proof, it's trivial to make fake screenshots.
We should behave as if he stole it. If he didn't, it'll be a lesson.
|
||
|
|
||
|
MⒶrtin HⒶboⓋštiak [BEFORE! Jan/3➞₿🔑∎, LNP/BP]
@kixunil
|
4. velj |
|
That's not a proof, you could have Photoshop it.
|
||
|
|
||
|
MⒶrtin HⒶboⓋštiak [BEFORE! Jan/3➞₿🔑∎, LNP/BP]
@kixunil
|
4. velj |
|
He can't, because tipping me uses zero amount invoices.
|
||
|
|
||
|
MⒶrtin HⒶboⓋštiak [BEFORE! Jan/3➞₿🔑∎, LNP/BP]
@kixunil
|
4. velj |
|
Here's in-depth explanation: doc.rust-lang.org/nomicon/subtyp…
So the reason Rust forces you to use PhantomData is to prevent you from messing up variance. This is mostly used in unsafe code.
|
||
|
|
||
|
MⒶrtin HⒶboⓋštiak [BEFORE! Jan/3➞₿🔑∎, LNP/BP]
@kixunil
|
4. velj |
|
Details of how subtyping works. Basically fn f(x: &str); says x must live during the entire execution of the function, but it's allowed to give it longer lifetimes. However fn f<'a, 'b>(x: &'a mut &'b str); can't allow larger 'b, because it'd allow f to assign shorter reference.
|
||
|
|
||
|
MⒶrtin HⒶboⓋštiak [BEFORE! Jan/3➞₿🔑∎, LNP/BP]
@kixunil
|
4. velj |
|
UB => use union
Panic => use enums with unwrap-like methods
Compile error => just use enums
My experience is that Compile error is superior in 99.99% cases.
|
||
|
|
||
|
MⒶrtin HⒶboⓋštiak [BEFORE! Jan/3➞₿🔑∎, LNP/BP]
@kixunil
|
4. velj |
|
The thing is they are actually tagged under the hood - it'd be UB otherwise. In Rust there are untagged unions too, but with UB. Useful only for ffi and some unsafe magic.
When you answer "what should happen if I access wrong variant?", Rust can give you the appropriate solution
|
||
|
|
||
|
MⒶrtin HⒶboⓋštiak [BEFORE! Jan/3➞₿🔑∎, LNP/BP]
@kixunil
|
3. velj |
|
This whole thread...
😂 twitter.com/Foone/status/1…
|
||
|
|
||
|
MⒶrtin HⒶboⓋštiak [BEFORE! Jan/3➞₿🔑∎, LNP/BP]
@kixunil
|
3. velj |
|
One of the key things I was thinking about were either it being superset of Rust or being transpilable into Rust human-readably. Possibly with some basic optimizations (e.g. remove .clone() where not needed).
|
||
|
|
||
|
MⒶrtin HⒶboⓋštiak [BEFORE! Jan/3➞₿🔑∎, LNP/BP]
@kixunil
|
3. velj |
|
Announcing sqck - minimalistic PGP key verifier written in @rustlang based on @SequoiaPGP. It allows you to decrease the risk of exploitation via untrusted PGP keys.
github.com/Kixunil/sqck
|
||
|
|
||
|
MⒶrtin HⒶboⓋštiak [BEFORE! Jan/3➞₿🔑∎, LNP/BP]
@kixunil
|
3. velj |
|
I had pretty much the same idea except the intent was to allow somewhat quicker prototyping.
|
||
|
|
||