Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
RX14
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
12 ms
·
91.
▲
by
RX14
8y ago
Well pretty much every Wifi card doesn't work in linux-libre, so that's the main thing. I'm sure I'd find a lot more that doesn't work if I tried linux-libre.
92.
▲
by
RX14
8y ago
Crystal can essentially have a sum type by representing it as a union of different record types. It's not common to do in crystal though, at least not with 3+ union entries. And pattern matching isn't really needed if you have flo
93.
▲
by
RX14
8y ago
I really love the work the guix folk are doing. I'd love to run guixsd on my laptop if it was easy and supported to run plain upstream linux instead of linux-libre. It just seems like such a lovely easy to use project from the little t
94.
▲
by
RX14
8y ago
Interestingly crystal has neither sum types or pattern matching (and it doesn't need them) :) And yeah, nobody has any experience maintaining 300kloc+ systems in crystal. And i'm sure we get loads of things wrong and there are lot
95.
▲
by
RX14
8y ago
Ah! I understand completely now! Interestingly I've only very rarely noticed that being a problem in practice. I'm not quire sure what to say about it more than that because it's definitely a real problem but I haven't n
96.
▲
by
RX14
8y ago
We don't have compilation units, all code is compiled at once in Crystal. It's a little painful in terms of compile times with large codebases but nowhere near C++ compile times yet :) We're thinking about caching and various
97.
▲
by
RX14
8y ago
In crystal, the compiler always knows the concrete values of the type parameters of any generic before typing it. I really am interested in knowing more about what you said about union types being non compositional because I'm definite
98.
▲
by
RX14
8y ago
You shouldn't be able to use a type without giving all the necessary type parameters, so you can't form a union type with unbound type parameters in so it's not a problem? I'm not 100% sure what you're asking... I&#
99.
▲
by
RX14
8y ago
Flow typing is where the type of a variable changes based on control flow. Consider: x : Int32 | String if x.is_a? Int32 # typeof(x) == Int32 else # typeof(x) == String end
100.
▲
by
RX14
8y ago
I mean the latter. And in practice, it's not just like using option types because it works well with flow typing. Being able to express your nil checking in ordinary control flow instead of special optional methods is often cleaner (th
101.
▲
by
RX14
8y ago
Being able to create arbitrary union types between different types, like crystal (which I work on). The difference between that and option/maybe is that it ends up playing nicely with flow typing without any special cases for optional&
102.
▲
by
RX14
8y ago
yeah in crystal we call them union types. We don't have sum types so I'm not really certain on the difference. I should have stuck to terminology I know.
103.
▲
by
RX14
8y ago
Just because null is a type in the type system doesn't mean it has to be a special type.
104.
▲
by
RX14
8y ago
Does swift have flow typing? The expressive power of sum types with nil is only exposed with flow typing. Also I don't think swift supports arbitrary sum types it just has a "fake" sum type syntax that only works with null. I
105.
▲
by
RX14
8y ago
Yeah, its a good option for new languages though.
106.
▲
by
RX14
8y ago
No, optional really isn't needed in crystal. You can just add `| Nil` to any type wherever you use it. We ever have a short cut in the type syntax of the language `?` to add null to a type union. So in practice at the type layer all yo
107.
▲
by
RX14
8y ago
You don't need option types for the compiler to enforce safety around nulls. Its possible to model null as its own type in the type system to enforce safety.
108.
▲
by
RX14
8y ago
You can middle click on the refresh button and it'll clone the tab you're currently in. Very useful for duplicating containers. And yes, that's terrible discovery in ux.
109.
▲
by
RX14
9y ago
You can click subscribe and put in your mastodon address ColinTheMathmo@mathstodon.xyz, or you can search rocky1138@kwat.chatin the mastodon search box and click follow from there.
110.
▲
by
RX14
9y ago
My brand new thinkpad with 16gb ram and a 1080p ips display cost only £670. These specs aren't expensive any more. That being said, my parents are perfectly happy using Google chrome on 2gb ram with a core 2 duo. And that's not wi
111.
▲
by
RX14
9y ago
So, what happens with highly disproportionate egress per amount of storage (think public image hosting/video hosting services). I personally ran a service with only 500GiB of data which would push 10TiB+ of egress per month. Would they
112.
▲
Hack everything without fear
(drewdevault.com)
166 points
by
RX14
9y ago
|
33 comments
113.
▲
by
RX14
9y ago
That's because makepkg rightly refuses to run as root. ==> ERROR: Running makepkg as root is not allowed as it can cause permanent, catastrophic damage to your system.
114.
▲
by
RX14
9y ago
My personal opinion is that the root cause of the issue is the ability of a language pacakge manager to mess with system files at all (i.e. do a global install of anything). Shards, the crystal package manager makes the sensible design de
115.
▲
by
RX14
9y ago
Thanks, yeah, that's a useful insight. I guess it's rather a moot point with Go anyway since you have multiple goroutines executing on multiple cores at once.
116.
▲
by
RX14
9y ago
It's not, because it's not built on promises at all. Go uses separate stacks for every goroutine.
117.
▲
by
RX14
9y ago
I know it's fairly pointless performance bashing but I just couldn't stop myself :) # In the crystal-lang/crystal repo $ find . -name '*.cr' -print0 | wc -l --files0-from=- | tail -n 1 252745 total
118.
▲
by
RX14
9y ago
I've never quite understood the benefits of async/await over go-style csp. It seems to me that its far better to just write sequential code all the time then mark all the points where you add parallelism with spawn/go instead
119.
▲
by
RX14
9y ago
Dragon likely will be integrated horizontally but some national security payloads need vertical integration.
120.
▲
by
RX14
9y ago
The thing about llvm ir is you get a code builder "for free" from llvm, where you're just calling functions to build your ir. However, when emitting C you have to build that yourself and take care to always emit valid code. N
More ›