Live data from Hacker News

Asqi: A codebase explorer designed to help navigate and understand Git projects

dev.asqi.io

31–40 of 40 posts

Re: Asqi: A codebase explorer designed to help navigate and understand Git projects

#31
post #23

Earlier quoted context omitted.

YES - this was very much on my mind actually. I was thinking we really need section outlining for Markdown (and for diffs etc, so like "two people want to edit this paragraph" when we have collision detection later). It didn't make it into the first cut but was and still is top of mind as I'm dogfooding it. I have had some good ideas and some stupid ideas for semantic history, and many very mixed prototypes. The simp…

> a table of commits-modifying-this-thing [...] a linear list of commits doesn't convey branch/merge topology well. Agreed. Presenting both the local diff and the location in the commit graph seems like a better bet for helping people glean understanding of a change's purpose and context. I'm also thinking of using a table of per-item changes that's tied to the commit graph for topologically sorted history and reacha…

[dead]

Re: Asqi: A codebase explorer designed to help navigate and understand Git projects

#32
post #29
post #10

Earlier quoted context omitted.

Got it working again! Sorry about that, server crash possibly from being on HN :)

Looks like it's working now - I tried out the gitlab repo. My laptops fans spun up, mousing over segments seem to freeze the UI, and I wasn't really sure what I was looking at in the first place. I think the app itself is pretty disorienting, especially compared with the simplicity of the landing page. Have you considered pre-rendering all this stuff and making the app more static? I think a significant improvement c…

Yeah the locking up is a big issue right now. It happens when you first load a repo and the client populates its local IndexedDB with all the RPC data coming down, which is 10-100k insertions and causes browser slowness. I've tried a couple of strategies that run them in timed batches to avoid overwhelming the browser, but it still has trouble especially on big repos. If you know of a way to bulk-load IDB without browser issues, let me know; my next strategy is probably just going to be either to defensively trickle-load or maybe try to measure microtask wakeup times to detect event loop load for backoff. Once I get it right I'll write a blog post about it because it's an unexpectedly challenging problem.

The good news, though, is that the load delays happen only the first time: if you let it warm up once and reload later, it should be much snappier because IDB reads are much faster than IDB writes.

The hover on click idea came up in another reply and I really like it as an option you can choose. That's going to be a high priority for the next release, I'm glad you also mentioned it.

Pre-rendering is a very good idea and while I had considered it before, your comment has me thinking about a much more general use case for it. I think it might enable some very snappy UI behavior, particularly around time-scrubbing or timelapse animations. I'm really glad you said something; this might lead to something very cool.

Thanks for the kind words and thoughtful feedback!

Re: Asqi: A codebase explorer designed to help navigate and understand Git projects

#33
post #9

Earlier quoted context omitted.

It's actually pretty straightforward; we use tree-sitter for parsing and it takes me about 2-3 hours for each language. So I'm planning to add a lot more in the near future. If you have any that you find especially valuable, let me know and I'll see if I can prioritize them.

Ruby with sorbet would be cool, and C#

For Ruby + Sorbet, it looks like Sorbet fits into Ruby syntax so we can reuse the same grammar, but you'd probably want the signatures to be considered as part of the methods. Working with the example from their website:

  sig {params(name: String).returns(Integer)}
  def main(name)
    puts "Hello, #{name}!"
    name.length
  end
I think the idea is that Asqi should treat `sig {}` sort of like a comment: prefix metadata attached to `def main`, rather than as an unrelated imperative call (whereas `attr_reader` would not have this behavior). Do you know whether Sorbet continues to work if you alias `sig` and any of its other definitions? For example, can I do this?

  def mysig(&proc)
    sig(&proc)  # or some other transformation
  end

  mysig {params(name: String).returns(Integer)}  # does this work? I hope/assume not
  def foo(name)
    name.length
  end
If the above is disallowed, then it should be easy to implement Ruby with Sorbet support built in. Otherwise I can probably do Ruby by itself, but it would be unaware of annotations attached to methods since to my knowledge there's normally no structural connection between statements that precede definitions.

Re: Asqi: A codebase explorer designed to help navigate and understand Git projects

#34
post #33

Earlier quoted context omitted.

Ruby with sorbet would be cool, and C#

For Ruby + Sorbet, it looks like Sorbet fits into Ruby syntax so we can reuse the same grammar, but you'd probably want the signatures to be considered as part of the methods. Working with the example from their website: sig {params(name: String).returns(Integer)} def main(name) puts "Hello, #{name}!" name.length end I think the idea is that Asqi should treat `sig {}` sort of like a comment: prefix metadata attached…

> I think the idea is that Asqi should treat `sig {}` sort of like a comment: prefix metadata attached to `def main`, rather than as an unrelated imperative call (whereas `attr_reader` would not have this behavior). Do you know whether Sorbet continues to work if you alias `sig` and any of its other definitions? For example, can I do this?

No, it doesn't work if you alias

Re: Asqi: A codebase explorer designed to help navigate and understand Git projects

#35
post #33

Earlier quoted context omitted.

For Ruby + Sorbet, it looks like Sorbet fits into Ruby syntax so we can reuse the same grammar, but you'd probably want the signatures to be considered as part of the methods. Working with the example from their website: sig {params(name: String).returns(Integer)} def main(name) puts "Hello, #{name}!" name.length end I think the idea is that Asqi should treat `sig {}` sort of like a comment: prefix metadata attached…

> I think the idea is that Asqi should treat `sig {}` sort of like a comment: prefix metadata attached to `def main`, rather than as an unrelated imperative call (whereas `attr_reader` would not have this behavior). Do you know whether Sorbet continues to work if you alias `sig` and any of its other definitions? For example, can I do this? No, it doesn't work if you alias

Awesome, OK I believe I can make that work then. Very glad you mentioned Sorbet because I hadn't heard of it before but it will be cool to have it ship with Ruby out of the gate.

Re: Asqi: A codebase explorer designed to help navigate and understand Git projects

#36
post #13
post #9

Earlier quoted context omitted.

It's actually pretty straightforward; we use tree-sitter for parsing and it takes me about 2-3 hours for each language. So I'm planning to add a lot more in the near future. If you have any that you find especially valuable, let me know and I'll see if I can prioritize them.

Kotlin would be awesome!

Looks like there's a grammar for it (https://github.com/fwcd/tree-sitter-kotlin) so I think it's on the table!

Re: Asqi: A codebase explorer designed to help navigate and understand Git projects

#37
post #35

Earlier quoted context omitted.

> I think the idea is that Asqi should treat `sig {}` sort of like a comment: prefix metadata attached to `def main`, rather than as an unrelated imperative call (whereas `attr_reader` would not have this behavior). Do you know whether Sorbet continues to work if you alias `sig` and any of its other definitions? For example, can I do this? No, it doesn't work if you alias

Awesome, OK I believe I can make that work then. Very glad you mentioned Sorbet because I hadn't heard of it before but it will be cool to have it ship with Ruby out of the gate.

That is very appreciated! Sorbet is shamefully underrated. While there are some weaknesses in the tool (which are fixable), the criticisms it typically gets from the community are unwarranted/unfair IMO. For example, I've heard that it makes the code too verbose. But in my experience, inserting T.cast or T.unsafe is more of a shortcut and often a code smell, and lately since becoming more fluent with it, I'm rarely using casts anymore (though its unavoidable sometimes if you want to avoid T.untyped usages).

I think it has a solid foundation and puts Ruby at the top of my list of good languages if coupled together. It is very performant compared to other typed analysis tools in my opinion.

Please join the Slack community and ask questions if you have any. I'm not part of the Sorbet project or the companies that sponsor it, just an avid enthusiast. https://sorbet.org/en/community

Re: Asqi: A codebase explorer designed to help navigate and understand Git projects

#38
post #28

Fireship got hacked. Ticketmaster had user info stolen. et al, so when I see: > I log barely enough to determine whether the server has crashed. > We do not collect nor track... I'm 50% sold by these principles alone. It's 2024 and not being a data creep is a product feature now. Thank you.

Fireship or firebase?

Firebase. Thanks. Got it swapped for the YouTube channel.

Re: Asqi: A codebase explorer designed to help navigate and understand Git projects

#39
post #11
post #6

Earlier quoted context omitted.

Same demo not working for me, asks me to install a React App on the address bar in Chrome. No chance I'm installing something random.

Yeah you definitely don't need to install anything. I don't know how to deploy React apps apparently (will try to fix), but it's just a regular website and I would never ask users to expect anything else. Update: it's because create-react-app creates manifest.json in public/, which causes Chrome to prompt you for this. I've deleted it in the latest container image and I'll redeploy once traffic dies down a bit.

Demo page is now deleted?

Re: Asqi: A codebase explorer designed to help navigate and understand Git projects

#40
post #39
post #11

Earlier quoted context omitted.

Yeah you definitely don't need to install anything. I don't know how to deploy React apps apparently (will try to fix), but it's just a regular website and I would never ask users to expect anything else. Update: it's because create-react-app creates manifest.json in public/, which causes Chrome to prompt you for this. I've deleted it in the latest container image and I'll redeploy once traffic dies down a bit.

Demo page is now deleted?

Nope still there, but you may have caught the server at a bad moment. Because Asqi uses the DB read/write, there's only one replica of the server and it has less than 100% uptime depending on indexing and user load.
Post reply on HN