TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Inspector – A drop-anywhere C++ REPL

194 pointsby Mic92over 7 years ago

6 comments

Dangerangerover 7 years ago
Injecting a REPL into a given section of code is my favorite means of debugging and interactively developing. I&#x27;ve gotten into the habit of building up a class interactively within Emacs and re-evaluating files after they have been changed.<p>It feels a bit like test driven development, but much more concrete. When I don&#x27;t really know what I want to build, or what is possible, it&#x27;s a fun way to spike out some functionality.<p>Then after you see what sort of path could exist from your interactive session you can use the code as a scaffold and re-implement the functionality by writing a test and implementing the code to satisfy it.
评论 #16366176 未加载
评论 #16361411 未加载
jclayover 7 years ago
This comes at a good time as it&#x27;s something I&#x27;ve been looking for. We have a physics engine and we want to allow users to write custom c++ functions that can be linked in at run-time. We&#x27;d like to allow our users to swap in their own custom integration or timestep methods for example.<p>As an aside, do you know if it is possible to use this to JIT C++ for CUDA kernels?
评论 #16363142 未加载
评论 #16362347 未加载
评论 #16364171 未加载
评论 #16361540 未加载
评论 #16363962 未加载
kyberiasover 7 years ago
Do people create stuff like this because they don&#x27;t have access to good interactive debuggers? Visual Studio user here.
评论 #16368968 未加载
评论 #16365461 未加载
seletzover 7 years ago
Hmm -- I wonder why they chose to not use Jupyter as an REPL &quot;backend&quot; (Jupyter calls them &quot;kernels&quot;).
评论 #16360917 未加载
评论 #16361132 未加载
评论 #16360904 未加载
Asookaover 7 years ago
How is this better than just attaching GDB?
评论 #16362264 未加载
thereinover 7 years ago
Very interesting. Does it require a C++17 compiler? Also is there any way to simply use a different way of interacting with the REPL? For instance over sockets rather than stdio.
评论 #16365857 未加载