ioB
ioB
DDeno
Created by abi on 6/20/2024 in #help
Type-narrowing/covariance/contravariance
worth a read if you're curious
27 replies
DDeno
Created by abi on 6/20/2024 in #help
Type-narrowing/covariance/contravariance
27 replies
DDeno
Created by abi on 6/20/2024 in #help
Type-narrowing/covariance/contravariance
swift took this to the extreme and some people consider that to be its biggest mistake
27 replies
DDeno
Created by abi on 6/20/2024 in #help
Type-narrowing/covariance/contravariance
like I wish the typescript one just worked, but making type inference just work in that case is expensive
27 replies
DDeno
Created by abi on 6/20/2024 in #help
Type-narrowing/covariance/contravariance
In this case, there's a usability/compile time tradeoff you make here
27 replies
DDeno
Created by abi on 6/20/2024 in #help
Type-narrowing/covariance/contravariance
rust makes a tradeoff here where
let mut x = Vec::new();
x.push(1);
let mut x = Vec::new();
x.push(1);
actually just works ™️
27 replies
DDeno
Created by abi on 6/20/2024 in #help
Type-narrowing/covariance/contravariance
here's another fun one:
const x = [];
x.push(5);
const x = [];
x.push(5);
is a type error because x has type never[]
27 replies
DDeno
Created by abi on 6/20/2024 in #help
Type-narrowing/covariance/contravariance
yeah that's a fun one
27 replies
DDeno
Created by abi on 6/20/2024 in #help
Type-narrowing/covariance/contravariance
it turns out that making a type system usuable involves making some not-obvious tradeoffs
27 replies
DDeno
Created by abi on 6/20/2024 in #help
Type-narrowing/covariance/contravariance
lots of haskell theory you could read up on here for context
27 replies
DDeno
Created by abi on 6/20/2024 in #help
Type-narrowing/covariance/contravariance
this is a big open question in type systems
27 replies
DDeno
Created by abi on 6/20/2024 in #help
Type-narrowing/covariance/contravariance
well I think the assumption is just that you mean it to be a number
27 replies
DDeno
Created by abi on 6/20/2024 in #help
Type-narrowing/covariance/contravariance
if you do {five:5} as const it will have the type { five: 5 } iirc
27 replies
DDeno
Created by Kuwazy on 5/1/2024 in #help
Do you know how I can call a C variadic function in FFI Deno?
4 replies
DDeno
Created by jmr on 4/22/2024 in #help
Packaging deno packages to be used in an air-gapped environment
I’m not informed on artifactory so maybe someone else could advise
8 replies
DDeno
Created by jmr on 4/22/2024 in #help
Packaging deno packages to be used in an air-gapped environment
Behind the scenes, it’s literally just an http request to the url. You could just clone the repository locally and install it from that
8 replies
DDeno
Created by melody on 4/17/2024 in #help
how to "slim down" deno_core crate
definitely worth checking out
9 replies
DDeno
Created by melody on 4/17/2024 in #help
how to "slim down" deno_core crate
the github repo has a few examples
9 replies
DDeno
Created by melody on 4/17/2024 in #help
how to "slim down" deno_core crate
you should look at https://crates.io/crates/v8 instead
9 replies
DDeno
Created by melody on 4/17/2024 in #help
how to "slim down" deno_core crate
If you really only want the stupid basics, deno_core is the wrong crate for you
9 replies