Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
svnpenn
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
57 ms
·
661.
▲
by
svnpenn
6y ago
I'd say better to export tables to CSV files, and dump the schema to an SQL file.
662.
▲
by
svnpenn
6y ago
My point is, what is even the point of using Deno? If its for static typing... well Go has that. So what is the benefit?
663.
▲
by
svnpenn
6y ago
Yeah, and the executable is 47 MB. You can do the same thing with Go: package main import "os" func main() { for _, s := range os.Args[1:] { o, _ := os.Open(s) os.Stdout.ReadFrom(o)
664.
▲
by
svnpenn
6y ago
Here's an implementation in PHP $a = file('words'); $m = array_flip($a);
665.
▲
by
svnpenn
6y ago
Here is my solution: use std::fs; fn main() -> Result<(), String> { let s = "a.rs"; match fs::read_to_string(s) { Ok(v) => print!("{}", v), Err(v) => Err(format!
666.
▲
by
svnpenn
6y ago
Yeah, I would use whatever is shorter
667.
▲
by
svnpenn
6y ago
Nope. Running this command: dotnet publish ` -p:Configuration=Release ` -p:PublishSingleFile=true ` -p:PublishTrimmed=true ` -p:RuntimeIdentifier=win-x64 gives an 11 MB file, that still requires 4 DLL as well.
668.
▲
by
svnpenn
6y ago
Doubly so with GitHub. I have had my GitHub account removed multiple times with no reason. Then if you email them, it can take weeks before they bring it back.
669.
▲
by
svnpenn
6y ago
This is technically true, but it's a difference of a 5 MB executable vs a 50 MB.
670.
▲
by
svnpenn
6y ago
I can say without hesitation, that Firefox is the worst piece of open source software that I use. Hands down. And has been for many years. In fact it's so bad, that I've been using Waterfox for a few months. If any better option b
671.
▲
by
svnpenn
6y ago
This site has something weird going on. If you try to select text, you can only select it in reverse. If you try to select forward, it just selects the entire page. Why do people do stuff like this?
672.
▲
by
svnpenn
6y ago
Workaround: let m = {year: 2019}; let s = JSON.stringify(m); console.log(s); // {"year":2019}
673.
▲
by
svnpenn
6y ago
Pretty cool, but cant print basic objects const m = {year: 2019, month: 12}; console.log(m); // [object Object] Compare with Node: { year: 2019, month: 12 }
674.
▲
by
svnpenn
6y ago
So people are just allowed to post ads for closed source software now?
675.
▲
by
svnpenn
6y ago
Just did this. Thanks
676.
▲
by
svnpenn
6y ago
> I suggested to a client that they use Sqlite3 for their company database rather than a disk based database. Sqlite is a disk based database...
677.
▲
by
svnpenn
6y ago
You dont have to use OpenSSL. For example Windows already includes Schannel, so you can build cURL with Schannel and avoid OpenSSL: https://daniel.haxx.se/blog/wp-content/uploads/2020/09/curl-...
678.
▲
by
svnpenn
6y ago
Here is my script: https://github.com/nu8/cove/tree/master/rust-deps
679.
▲
by
svnpenn
6y ago
Hm, this response essentially says "other languages have this problem too, so deal with it". While thats true, it completely misses the point. The point is not that dependencies exist, or even that a package might have many depend
680.
▲
by
svnpenn
6y ago
I like this idea, but I dont know if Hyper is the best package to go with. Hyper occupies part of the Rust ecosystem that I think suffers from package bloat, like much of NPM. For example, currently Hyper requires 52 packages: autocfg, bitf
681.
▲
by
svnpenn
6y ago
Does anyone know a fast mirror for Erlang? Every time I try to download its very slow: https://github.com/erlang/eep/issues/12
682.
▲
by
svnpenn
6y ago
Its been implemented since Firefox 69 (I am using older version). But regardless, its part of a draft spec, shouldnt be used on a public website IMO.
683.
▲
by
svnpenn
6y ago
> https://www.gwern.net/About what the hell, its like someone vomited CSS on that page
684.
▲
by
svnpenn
6y ago
this guy has some voodoo going on this site. I see the page, then the whole screen turns white. Even in safe mode. Edit: he is using ResizeObserver: https://developer.mozilla.org/Web/API/ResizeObserver which hasnt
685.
▲
by
svnpenn
6y ago
Vaporware. Indefinitely on preorder, and $2,000: https://shop.puri.sm/shop/librem-5-usa
686.
▲
by
svnpenn
6y ago
Well, since they didnt bother to actually link the damn thing, here it is: https://cloud.webtype.com/css/a3ef0e70-14ef-4a0a-ab95-f8b0d8... I would be careful though, look like they have a copyright warning, and a track
687.
▲
by
svnpenn
6y ago
In Go, you can use an interface to implement private struct fields. Then you can make a "New" function to implement default values as needed. I made a post about this last month: https://stackoverflow.com/a/63
688.
▲
by
svnpenn
6y ago
You can do that now. Its not quite the same but pretty close: fn f(n: Option<u8>) -> u8 { match n { Some(n0) => n0, None => 10 } } fn main() { let n1 = f(Some(20));
689.
▲
by
svnpenn
6y ago
https://en.m.wikipedia.org/wiki/Not_invented_here
690.
▲
by
svnpenn
6y ago
Yep, I do this. I keep my list here, which is essentially these type items, and also a bunch of the "fixed top and bottom bars" that sites love to put in: https://github.com/nu8/hearth/blob/master&#x
More ›