Ian Denhardt

48 posts

Ian Denhardt

Ian Denhardt

@zenhack_net

Freelance software dev & FOSS person. I hack on @SandstormIO. I don't actually use twitter anymore, see https://t.co/zccag5AaP7

Boston Katılım Eylül 2019
4 Takip Edilen14 Takipçiler
Ian Denhardt
Ian Denhardt@zenhack_net·
@pchiusano for a while now there's a hybrid design that's been floating around in my head: trad copying gc for young gens, then flip to recounting for old gens, when the generational hypothesis starts to fall apart. Key idea: twiddle the refcounts at promotion time.
English
2
0
1
0
@pchiusano@universeodon.com
@[email protected]@pchiusano·
My conclusion is that if you compare apples to apples, tracing GC is just easier to make fast, and even in principle, it is simply doing less work than reference counting. The reputation of tracing GC as being slow has more to do with other factors.
English
4
0
5
0
@pchiusano@universeodon.com
@[email protected]@pchiusano·
Ref counting vs tracing GC, we've been talking about this for native compilation, coming to @unisonweb 🧵 It's well known that reference counting has to traverse dead objects (to deallocate them when counts reach 0), whereas tracing GC has to traverse live objects.
English
4
0
33
0
Ian Denhardt
Ian Denhardt@zenhack_net·
@pchiusano I agree, but also ownership and borrowing is useful for resources other than memory. Tbh if perf weren't a consideration I'd say refcount everything, since it would make finalizers way more useful, often moreso than cyclic data types.
English
1
0
2
0
@pchiusano@universeodon.com
@[email protected]@pchiusano·
My take is that for anything other than systems programming, you want GC. It’s much more ergonomic; for FP it feels like a necessity. If performance were identical no one would seriously advocate for anything else outside of systems programming uses.
English
2
1
11
0
@pchiusano@universeodon.com
@[email protected]@pchiusano·
“In practice, people just want to be able to write a tree-like type without having to play Chess against the compiler.” Spicy take on rust here!
English
1
4
24
0
Ian Denhardt
Ian Denhardt@zenhack_net·
@pchiusano (note that because you only need to traverse new objects, any savings beyond would be constant factors on the O(n) you paid to build the structure. My guess is that crypto hashing is slower than diffing)
English
0
0
0
0
Ian Denhardt
Ian Denhardt@zenhack_net·
@pchiusano hm, unless it's a cryptographic hash you still need to check equality in case of collisions. Object.is lets you short circuit on pointer identity, so any savings you'd get would be from not traversing *new* objects, and I bet that's cheaper than crypto anyway.
English
1
0
0
0
@pchiusano@universeodon.com
@[email protected]@pchiusano·
Do any virtual DOM implementations maintain a hash at each node? Then when diffing, you only need to visit subtrees that have changed, rather than all subtrees. The hash can be built up in constant time at the same time the VDOM is being built.
English
5
1
10
0
Ian Denhardt
Ian Denhardt@zenhack_net·
@pchiusano for types like finger trees with a semantically implied representation, this makes sense, but if it's more abstract (e.g. maps) I think maintaining an interface boundary is useful. Being able to reason about what code can and can't depend on is a huge maintainability boon.
English
1
0
0
0
@pchiusano@universeodon.com
@[email protected]@pchiusano·
An irritating example: Haskell's finger tree library hackage.haskell.org/package/finger… hides its constructors for no apparent reason. There's no way to search a finger tree without allocation using any of the current functions.
English
1
0
1
0
@pchiusano@universeodon.com
@[email protected]@pchiusano·
In FP, don't make the constructors of a data type private. Your users are adults who can make their own decisions about whether to write code that relies on something that might change.
English
7
1
26
0
@pchiusano@universeodon.com
@[email protected]@pchiusano·
I'm not going to write 20 lines of effect signatures, and even if it could be inferred, I don't want to look at that. When type signatures reach a certain complexity, they cease to be as useful.
English
3
0
12
0
@pchiusano@universeodon.com
@[email protected]@pchiusano·
I keep coming to the conclusion that fine grained effects aren't really worth it. The logical endpoint is every function has its own effect type, and then like a 3 line function has a 20 line effect type.
English
6
6
56
0
Ian Denhardt
Ian Denhardt@zenhack_net·
@pchiusano when I was first putting together haskell-capnp's rpc later, I wrote a tiny library that may be apropos: hackage.haskell.org/package/superv… It gives you a bit of the best of both worlds: you can spawn tasks in an unstructured way, but still get an upper bound on their collective lifetimes
English
0
0
1
0
@pchiusano@universeodon.com
@[email protected]@pchiusano·
Last thought - in order to cancel or await completion of a task tree, you just wait/cancel the root, which can be a black box. 👍 For detached tasks, you have to know something about the internal structure - what all the subtasks are, which leads to first-order, rigid code.
English
2
0
1
0
@pchiusano@universeodon.com
@[email protected]@pchiusano·
@unisonweb design stuff. Spawning a task for its effects differs from spawning a task for its result. Yet most APIs treat them same. Consider: foo x = a = fork (thing1 x) b = fork (thing2 x) await a This leaves `b` task running even though its result will never be used.
English
3
1
14
0
Ian Denhardt retweetledi
James Young
James Young@JamesYoungKY·
Hello, my name is James. I'm a fmr Elections Admin of a large urban county, am registered @GOP, and actively work with hundreds of jurisdictions across the US. For many reasons, the past week has been difficult. If you seek truth about US elections, please keep reading.
English
999
7.6K
25.4K
0
Ian Denhardt
Ian Denhardt@zenhack_net·
@seagreen__ @saurabhnanda yeah, a unified client ala pidgin would be nice (and probably more tractable), but I don't know of anything good.
English
0
0
0
0
Ian Denhardt
Ian Denhardt@zenhack_net·
@seagreen__ A couple of times in my career I've made modifications to a tool I'd written and hadn't looked at in years. I'm always grateful to past-me for actually documenting things; the knowledge is definitely still in there somewhere, but those comments are really key to jog my memory.
English
0
0
1
0
Ian Jeffries
Ian Jeffries@seagreen__·
When people say "oh I don't understand any of my own code" I get a little concerned. Like I know it's not perfect, but I'm pretty sure I'll understand this 5/10 years from now: github.com/seagreen/acme-…
English
2
0
0
0
Ian Denhardt
Ian Denhardt@zenhack_net·
@alexelcu @pchiusano I've grown to find bizarre, completely irrelevant ads comforting, as it shows me the tracking isn't working that well...
English
0
0
1
0
@pchiusano@universeodon.com
@[email protected]@pchiusano·
The web was accidentally built to enable a default of "allow tracking everywhere without user consent". Naturally FB and others took advantage and even feel entitled to it now... despite no public discussion or informed consent. But there's nothing innate about that default.
Matt Cagle@Matt_Cagle

Facebook worrying its business will suffer if people can refuse to be tracked is everything you need to know about the business Facebook is in. arstechnica.com/tech-policy/20…

English
3
11
29
0
Rúnar
Rúnar@runarorama·
Has anyone made a thing that generates Thrift, Protobufs, gRPC, OpenRPC, JSON-RPC, or similar from Haskell types? I'd like to not have to write these janky IDLs by hand.
English
6
1
10
0
Ian Denhardt
Ian Denhardt@zenhack_net·
@qntm @seagreen__ leave them both, get out with your life, and reevaluate the life choices you made that left you without an off-site backup (even a dev's local checkout on their laptop).
English
0
0
1
0
qntm
qntm@qntm·
Hypothetical. Your data centre is on fire, and all your application code is on one drive, and all your tests are on the other drive, and you can only rescue one
English
32
6
24
0
Ian Denhardt
Ian Denhardt@zenhack_net·
@pchiusano what scares me here is not "excel tries to be clever with dates" so much as "scientists are using excel for this!?!?" No software engineer would think that was a good idea. What we need to think about is why we're failing to get scientists using appropriate tools.
English
0
0
1
0
Ian Denhardt
Ian Denhardt@zenhack_net·
@pchiusano frankly this reads to me less as a case of the software industry being a house of cards, and more how do we bridge the gap between friendly, easy to use tools and ones suitable for more "serious" work?
English
1
0
0
0
@pchiusano@universeodon.com
@[email protected]@pchiusano·
Every once in a while you come across something that reminds you what a pile of WAT the software industry is built on, leaving you stunned that anything works at all. 🙃 theverge.com/2020/8/6/21355…
English
2
15
62
0
Ian Denhardt
Ian Denhardt@zenhack_net·
@seagreen__ what I want is not really an IDE so much as tooling for easily scriptable transformations on source code. I'd be happy typing 'rename Old.Module.Path New.Path' at a terminal; it doesn't need to impose an editor on me to achieve that.
English
0
0
3
0
Ian Jeffries
Ian Jeffries@seagreen__·
Haskellers "i don't need an ide" Haskellers <gets annoyed when changing a module name because it involves 7(!) manual edits>
English
2
0
14
0