HackerTrans
TopNewTrendsCommentsPastAskShowJobs

alehander42

no profile record

Submissions

Show HN: CodeTracer – A time-traveling debugger implemented in Nim and Rust

github.com
334 points·by alehander42·anno scorso·52 comments

comments

alehander42
·anno scorso·discuss
you're right: in the RR case: currently this is not merged yet, but a RR contributor works on persistent checkpoints; they can act as snapshots
alehander42
·anno scorso·discuss
We're working on Windows support for the scripting and blockchain languages.

I am sorry if the headline felt misleading or the current support disappointing: we do have experimental Ruby support, that you can try right now if you record a `<somepath>.rb` program.

We do design the frontend, trace format/lib and backends to support multiple languages. Ruby is already having experimental support, and we try to keep various other languages/usecases in mind. We hope to find a model that lets us work more on supporting many more scripting languages. We'd also love contributors/the community adding support for languages or codetracer itself!

We also do have a closed source backend based on RR[1] that has partial C/Rust/Nim support, but it is not yet ready. It might be released as a proprietary solution. (However if we find an alternative sustainable business model, it would be great to be able to open source it.)

The scripting/blockchain languages backend is more db-like: it collects a trace by hooking in tracing API-s or instrumenting/patching vm-s (the trace is later postprocessed before replay).

The system languages backend is based on RR[1] recordings currently.

We'd be happy to discuss more usecases or languages!

1: https://rr-project.org/
alehander42
·anno scorso·discuss
Nim is the original language we use. Zahary is a prolific contributor to Nim, and we have a good relationship with the Nim community, they've helped a lot!

Nim and some Python are used for our closed source rr backend currently, and the frontend is written in Nim (compiling to JavaScript).

The backend for blockchain and scripting language which is open sourced, is newer and we used Rust there for several reasons. One of them is related to the fact that many blockchain languages are implemented in Rust and this makes it easier to interoperate/contribute. There are other aspects as well: both languages have pros and cons.

Some pros of Nim are e.g. it's metaprogramming support; the ability to share easily code/types between backend and frontend(it's an alternative to both e.g. C++/Go and TypeScript for us).

We're thankful to both language communities!
alehander42
·anno scorso·discuss
the support for system languages (the rr integration "backend") is currently closed source.

It's not ready yet, and it might be proprietary: it would be great if we can open source it, if we find a sustainable business model for that
alehander42
·anno scorso·discuss
Very impressive! Lisp people are always good at tooling.
alehander42
·anno scorso·discuss
True! The next major version of the format should use a more optimized format, as mentioned.

However, some of the important optimizations, that we're preparing are not related so much to the format, but to record more specific things and reconstruct more in the postprocessing.
alehander42
·anno scorso·discuss
We'd love additional contributors! We also have some more detailed plans for such an extension. If you're interested in chatting about it, you can join our discord[1] (or we can expand here/in a github issue as well)

1: https://discord.com/invite/aH5WTMnKHT
alehander42
·anno scorso·discuss
We are currently working on two "backends" where recording works in different ways.

For the scripting languages and smart contract/ZK languages, we instrument the interpreters using high level hooking API-s or direct patches, and we produce a trace.

For system languages, we directly build on top of RR[1] recordings for now: RR can record multiple processes, and it works in userland. IIRC it doesn't support modifications of shared memory outside of the recording. It's very well documented in their paper: Engineering Record And Replay For Deployability: Extended Technical Report[2].

1: https://rr-project.org/

2: https://arxiv.org/abs/1705.05937
alehander42
·anno scorso·discuss
A contributor to the D language helped us for many aspects of the project. He would really like to see D support haha!
alehander42
·anno scorso·discuss
We are building our future support for the system languages for now directly on top of RR recordings: credit to Robert(roca) and Kyle and all other contributors for RR and Pernosco, they're amazing technologies.

We've researched possible alternative approaches/tools as well, especially keeping in mind Windows/Mac support.

The traces for Noir and the scripting languages work in a completely different way, capturing all the relevant data which is later indexed into a db-like structure. With some future optimizations this can be very useful for various shorter programs in scripting languages, and generally for blockchain languages(as the running time there is usually low) and we hope that eventually with flexible record filtering it can be practical even for capturing important segments/aspects of long-running real world projects.
alehander42
·anno scorso·discuss
We are also planning to develop a distributed tracing platform, similar to Jaeger and OpenTelemetry, that continuously records the execution of many distributed processes (e.g. micro-services).

Unlike the existing platforms, which capture only message flows and require you to make educated guesses when some anomaly is observed, our system will let you accurately replay the processing code for each message to quickly identify the root cause for the anomaly.

This would rely on our ability to jump to the specific moment in time when a certain incoming message starts being processed. This moment can be identified either by a log line with a specific format or by a call to some special tracking function (e.g. track_incoming_message(request_id)).

For the system languages, the RR[1] recordings try to be practical by capturing only the non-deterministic events in the program execution. You can pair this with a ring buffer that discards the data after a certain retention period.

For the scripting languages(or any implementation using the db-like traces) we might add some advanced record filtering options.

(But maybe we are misunderstanding the question?)

1: https://rr-project.org/
alehander42
·anno scorso·discuss
Thank you!

The Python initial prototype is not yet finished. It's easy to play with, so anyone interested can actually work on it! Currently, in the experimental tracers, Ruby is usable for smaller programs, so one can try Ruby immediately.

I do plan on improving some of the prototypes, and on adding additional ones: for Lua, but JavaScript: e.g. v8 is also a good target. Scripting language users that find it useful, are welcome to discuss/chat with us, or even directly contribute or propose support for new languages.

A form of record filtering is planned indeed.

We have experimented with automatic chart visualizations of some things, we've planned custom visual representation as well, great to see interest in those
alehander42
·3 anni fa·discuss
Most Bulgarians are actually proud of their country, often sharing that the Cyrillic originated there, and focusing proudly on the old history and all kinds of inventors/achievements, even on stuff like the uniqueness of our yoghurt: so I have the opposite impression, as a Bulgarian
alehander42
·4 anni fa·discuss
Well, we can't and we shouldn't find agreement if our base beliefs are different. I only also disagree with any vitriol against the professor.

I have my doubts: even the comment you were critiquing, it seems to me that you read it with bad faith, assuming ill intentions which leads me unconvinced that you could argue objectively from the Biblical viewpoint in other cases.

I had my share of non-christian worldview for many years, so there is sadly not much surprising about your arguments except for the stubbornness in applying interpretations on Scripture that no normal christian through the ages or even scholar probably held.

I know we all go through different periods in our lifes, so I hope you find Christ again. He loves all of His lost sheep. See you.
alehander42
·4 anni fa·discuss
A soul is infinitely more important than a temporal sickness and God is infinitely more merciful and wise than our limited capacity/knowledge can comprehend. And yes, Christ came to destroy death on the Cross: and yet, before His resurrection He lived through every joy and pain other humans do. And I am glad that He did gave His words of Life, flesh and blood, instead of a biology textbook.

John 3:16-21 "16 For God so loved the world that he gave his one and only Son, that whoever believes in him shall not perish but have eternal life. 17 For God did not send his Son into the world to condemn the world, but to save the world through him. 18 Whoever believes in him is not condemned, but whoever does not believe stands condemned already because they have not believed in the name of God’s one and only Son. 19 This is the verdict: Light has come into the world, but people loved darkness instead of light because their deeds were evil. 20 Everyone who does evil hates the light, and will not come into the light for fear that their deeds will be exposed. 21 But whoever lives by the truth comes into the light, so that it may be seen plainly that what they have done has been done in the sight of God."
alehander42
·4 anni fa·discuss
Christianity is what actually fulfilled Second Temple judaism. There was no need for such a Temple anymore, as now people themselves were becoming living temples. Lord Jesus, apostle Paul and Hebrews explain all of this way better than I can.

Obviously rabbinical judaism believers see themselves as the actual following: and that's where we disagree. However their explanation seems stranger than the christian one: we stopped having major prophets because the Son of God Himself came to reveal the Father and to save us, we don't need animal sacrifices and a Temple from human hands, because they were just a shadow to the Cross, prophesies from OT were fulfilled with the promised Messiah. The rabbinical judaism: they don't have prophets, because ..? Why would God let their temple be destroyed, if they were right about Jesus? Where is their messiah?
alehander42
·4 anni fa·discuss
He wasn't talking about the hygiene of washing hands. He is God, he understood. He was making an obvious point about human traditions a which the Gospels even clarify with context.

The Scripture is full of similar scenes. Peter sees a vision with a sheet with unclean animals ready for eating. The focus was on evangelizing the people who eat those foods tho: the gentiles.

The destruction of the Second Temple was prophesied by Christ, and apostles started serving in the Church only 50 days after His resurrection, on Pentecost. So yes, rabbinical judaism has been a reaction to the destruction of the second temple, but the Church was already active and persecuted in the center of the roman empire, many epistles were already written and there were churches through greece and rome
alehander42
·4 anni fa·discuss
Every interpretation which focuses on Jesus as a "interesting teacher" ignores half of the things he actually said and demonstrated. Paul wasn't more radical than the man who claimed to be greater than the Temple, one with the Father. Christ claimed that Abraham rejoiced for His day, Moses wrote for Him and the Scriptures pointed to Him.

He saw His own flesh as the bread of life, greater than the manna in the desert.

I am not sure we can easily comprehend how out there this was.

He resurrected people and died for the sins of every human. His teaching wasn't just a list of debates, but it was full of claims and events that you can't honestly compare to other "rabbies"
alehander42
·4 anni fa·discuss
Not really. The Scripture is very good at showing what's in our heart: we have freedom to interpret some non-obvious things wrongly, to not put effort at actually understanding it and into deluding ourselves. However especially the Gospels have a lot of very obvious spiritual teachings.

But very often the truth reason that we don't like them is not because of our intelligence(you can find genius people believing in almost every kind of faith or ideology), but because of trauma, misunderstanding or the fact that often deep down we want to be our own gods, but we just end up being slaves to our own fragility and animal-like passions.

Hebrews 4:12

"For the word of God is living and active. Sharper than any double-edged sword, it pierces even to dividing soul and spirit, joints and marrow. It judges the thoughts and intentions of the heart. "

(edit: also, my point is: if you ignore all the things you shouldn't ignore, it's easy to leap to wrong interpretations. you shouldn't ignore them! end of edit)
alehander42
·4 anni fa·discuss
All of this is really not very relevant to the New Testament. Sadly I feel people back then had in some ways a better grasp of symbolism, proverbs and Scripture than us today.