digitalmars.D.learn - Source code for vibe.d listenTCP()
- Chris Piker (19/19) Feb 26 2022 Hi D
- Chris Piker (8/10) Feb 26 2022 Sorry to reply to myself, but I found the function. It was
- max haughton (4/23) Feb 26 2022 https://dlang.org/spec/traits.html#getLocation can be a
- Adam D Ruppe (12/14) Feb 26 2022 My dpldocs.info search engine is not great right now but it can
- Chris Piker (4/7) Feb 26 2022 Yes! Freaking awesome!
- Chris Piker (14/17) Mar 08 2022 Hi Adam
Hi D I'm trying out the vibe.d framework for the first time and it looks like many of the functions mutate some hidden global state. Take for example `listenTCP`. To help me build a mental picuture of the framework I'd like to see what global state is mutated, but for the life of me I can't even find the source code to listenTCP(). The obvious method of: ```bash git clone git github.com:vibe-d/vibe.d.git cd vibe.d grep -R -n listenTCP ``` returns many instances where listenTCP is used, but none that look like a definition. It's quite possible I just overlooked it, or maybe it's implemented as a mixin or something weird like that. Anyway if someone can just help me find the source code to listenTCP inside vibe.d I'd be grateful. Thanks for your time,
Feb 26 2022
On Saturday, 26 February 2022 at 22:25:46 UTC, Chris Piker wrote:Anyway if someone can just help me find the source code to listenTCP inside vibe.d I'd be grateful.Sorry to reply to myself, but I found the function. It was separated out into a separate package: https://github.com/vibe-d/vibe-core on which vibe-d now depends. D has so many code obscuring features that I didn't think to check for dependencies first.
Feb 26 2022
On Saturday, 26 February 2022 at 22:25:46 UTC, Chris Piker wrote:Hi D I'm trying out the vibe.d framework for the first time and it looks like many of the functions mutate some hidden global state. Take for example `listenTCP`. To help me build a mental picuture of the framework I'd like to see what global state is mutated, but for the life of me I can't even find the source code to listenTCP(). The obvious method of: ```bash git clone git github.com:vibe-d/vibe.d.git cd vibe.d grep -R -n listenTCP ``` returns many instances where listenTCP is used, but none that look like a definition. It's quite possible I just overlooked it, or maybe it's implemented as a mixin or something weird like that. Anyway if someone can just help me find the source code to listenTCP inside vibe.d I'd be grateful. Thanks for your time,https://dlang.org/spec/traits.html#getLocation can be a bruteforce approach to this question when dealing with a new codebase.
Feb 26 2022
On Saturday, 26 February 2022 at 22:25:46 UTC, Chris Piker wrote:Anyway if someone can just help me find the source code to listenTCP inside vibe.d I'd be grateful.My dpldocs.info search engine is not great right now but it can sometimes help find these things: http://search.dpldocs.info/?q=listenTCP Putting the name in there did find http://vibe-core.dpldocs.info/vibe.core.net.listenTCP.1.html and my website also offers a "see implementation" link at the bottom which has some inline code navigation jump links too to help. tbh i find vibe's codebase to be awfully convoluted. Part of why I made this cross-package search engine is to try to trace where some of these bugs came from.
Feb 26 2022
On Sunday, 27 February 2022 at 01:45:35 UTC, Adam D Ruppe wrote:and my website also offers a "see implementation" link at the bottom which has some inline code navigation jump links too to help.Yes! Freaking awesome! This needs to be a link on the regular D pages, or at least in the package index pages. (Maybe it is already?)
Feb 26 2022
On Sunday, 27 February 2022 at 01:45:35 UTC, Adam D Ruppe wrote:My dpldocs.info search engine is not great right now but it can sometimes help find these things: http://search.dpldocs.info/?q=listenTCPHi Adam Your site has been super helpful given the state of the vibe.d docs. It only has one issue from my point of view. The source code listing pages, for example this one: https://vibe-core.dpldocs.info/source/vibe.core.stream.d.html#L288 don't expand horizontally to use the given space in the browser window. Since the vibe.d sources contain many long lines I have to scroll down, find the horizontal scroll bar at the bottom of the page, and then scroll back up and find the function I was looking at. Do you observe the same behavior in your preferred browser, or is this just a problem in Firefox 91? No matter what, thanks for the site. I've been using it a lot!
Mar 08 2022