HackerTrans
TopNewTrendsCommentsPastAskShowJobs

Choc13

no profile record

Submissions

Quantum Computational Supremacy – ACM Tech Talk with Scott Aaronson

event.on24.com
1 points·by Choc13·hace 5 años·0 comments

Show HN: Symbolica – Try our symbolic code executor in the browser

45 points·by Choc13·hace 5 años·35 comments

Mark Zuckerberg says Facebook will turn into a ‘metaverse’

theverge.com
191 points·by Choc13·hace 5 años·370 comments

Grokking Free Monads

dev.to
1 points·by Choc13·hace 5 años·0 comments

Grokking Monad Transformers

dev.to
1 points·by Choc13·hace 5 años·0 comments

Grokking Traversable

dev.to
1 points·by Choc13·hace 5 años·0 comments

Grokking Applicative Validation

dev.to
1 points·by Choc13·hace 5 años·0 comments

Grokking Applicatives

dev.to
1 points·by Choc13·hace 5 años·0 comments

Grokking Functors

dev.to
1 points·by Choc13·hace 5 años·0 comments

Grokking Monads, Imperatively

dev.to
1 points·by Choc13·hace 5 años·0 comments

Grokking Monads

dev.to
1 points·by Choc13·hace 5 años·0 comments

Ask HN: Which API gateway solution is the best

2 points·by Choc13·hace 5 años·6 comments

Ask HN: SaaS founders, how long did it take you to get your first customer?

13 points·by Choc13·hace 5 años·3 comments

Ask HN: Which job sites are people using for remote jobs?

50 points·by Choc13·hace 6 años·18 comments

comments

Choc13
·hace 5 años·discuss
I had a pop at this here https://dev.to/choc13/grokking-monads-in-f-3j7f
Choc13
·hace 5 años·discuss
Apologies, I wasn’t trying to call you a troll, more that your first comment seemed to me like it might have been made in jest, clearly it wasn’t.

The articles you’ve linked to are interesting and there are clearly many scientific discoveries to be made by studying the early formation of the universe which will test our current models. However I don’t feel like convention is the right word for laws like the conservation of energy, even if there are some difficulties with tying up these theories and new experimental evidence from events at the scale of the Planck length.

Convention to me would mean something that has been accepted just because it’s always been done that way and people didn’t really bother to question why, but I don’t think that’s the case here. But we’re verging on pedantry now so no point going down that route any further.
Choc13
·hace 5 años·discuss
Hmm not sure if troll, but energy conservation is definitely not just some convention. It’s a fundamental thermodynamic law. Spooky action at a distance does not violate speed of light information propagation either. The particles have to be entangled before they’re set off in opposite directions. Only once one is observed does the other also collapse, but it doesn’t mean you can communicate faster than the speed of light because you had to prepare the information when the particles were together IIRC, it’s been a decade since I studied quantum information theory.
Choc13
·hace 5 años·discuss
Yeah sure. We initially wanted to build something to compare the equivalence of two programs written in different languages and for this we started out using KLEE. Unfortunately, we found it didn't quite satisfy our needs and then changes we wanted to make didn't really fit with their architectural model. We also felt like it wasn't as amenable to parallelisation as we would have liked. The core technology is using an SMT solver just like KLEE, but our hope is that Symbolica will be more scalable and easier to use for larger problems.

DeepState looks interesting, we had seen this before and other stuff from trail of bits, but admittedly we haven't used it ourselves. Our impression is that it seems like more of a frontend to various symbolic execution / fuzzing backends. So maybe it's something we should consider integrating with too.

We hadn't come across ForAllSecure before, so thanks for pointing them out. They do appear to be similar, but their focus seems to be on large commercial/enterprise projects in sectors like defence and aerospace. So maybe I'm wrong, but I don't think they have an offering for individuals / smaller teams.

On the logo point, as another commenter pointed out it's the mathematical forall symbol, so I guess we just both had the same thought when it came to coming up with a logo.
Choc13
·hace 5 años·discuss
Yeah it can deal with symbolic memory. As long as the memory allocation is fixed size the contents can be fully or partially symbolic. We also support symbolic addresses for allocations to ensure that pointer arithmetic is fully tested.

We're currently simulating a lot of the underlying system at the C std library level. For a number of reasons we'd like to lower this to the raw syscall and assembly level. This would allow any lib C implementation to be tested along with the application code, and we may even be able to simulate threading and the file system. Syscalls could be made symbolic along with files by treating the entire system symbolically, but obviously this is a lot of work so it's something that we're gradually building towards.
Choc13
·hace 5 años·discuss
Great question. This obviously isn't exposed through the playground right now as that's just a single file demo.

Our backend software does integrate with larger build systems. So the way you would handle third party deps is to link them during the build and then analyse the whole built module. We plan to make it easier to integrate with toolchains for specific languages in the future.
Choc13
·hace 5 años·discuss
The static type information isn't actually too important to us, what our tool cares about is being able to interpret branching conditions in the code in order to turn them into constraints. We currently do this at the LLVM IR level, so as long as we can compile the code down into this form then we can analyse it. With Python a lot of the work we had to do in order to get a prototype working was in being able to handle all of the system calls that the Python interpreter needs to make when booting up. These aren't always straight forward to treat symbolically because they interact with the file system etc, but it's possible to provide mock implementations that don't affect the analysis of the users code.
Choc13
·hace 5 años·discuss
Ah right, makes sense, thanks. Most of the time on the playground is spent booting a build server (we're using GitHub actions behind the scenes just for this part of the playground) and then building the code. I just ran this example myself and the build part took around 50 seconds before it actually sent the bitcode off to be analysed.

We need to add some more detailed diagnostic outputs to the actual execution part so that we can see the timings more clearly, but as a rough approximation from looking at the logs the execution API took about 10 seconds to run and some of that time would be in waiting for the message to be dequeued and for the function to wake up and process the job. So it's taking maybe around 5 seconds right now to analyse this one.

I know that's still quite slow, but we've not yet spent any real time on optimisations to the execution part so we're quite confident we can make this bit faster. As for the constant build overhead, this is something that's only really applicable to our playground, as users would likely build their code locally or have already built it as part of a CI run. Given all the feedback on this slowness though we are planning to make some improvements to this build part of the playground too to help reduce this constant overhead, or at least make it more obvious that this is what is causing the initial part of the waiting time.
Choc13
·hace 5 años·discuss
Hey, the reason for the long times on the playground is actually that we’re having to wait for build servers to boot up and then build the code before we can finally ship it off to our backend for analysis. We’ve had quite a bit of feedback on this slowness and we hope to eliminate some of this constant factor boot up and compile time soon, and for what remains make it clear that this is what’s happening in the status box.

So although it might seem like it, we’re not actually doing any looping, we’re doing constraint solving as you’ve mentioned.
Choc13
·hace 5 años·discuss
On the monetisation point we do plan to have a paid version of the product too. We think that one of the limiting factors of using symbolic execution to date has been in the path explosion problem when analysing large programs. A large part of our reasoning behind building a new symbolic executor from scratch was that we wanted to be able to parallelise it to help overcome this issue. We intend to provide a cloud hosted version of Symbolica that makes use of this so that users can get access to this compute power on a pay per use basis.

So our rough plans at the moment are to charge on a consumption basis to use this service.
Choc13
·hace 5 años·discuss
Ah right yeah that makes sense. We built the website using NextJS so we kinda got this for free with their Image component.
Choc13
·hace 5 años·discuss
I’ve not used Hypothesis, but says it’s inspired by QuickCheck and I’m a regular user of FsCheck which is the F# equivalent. Those tools have a similar goal in mind that we do, but whereas they generate randomised test data (I think FsCheck creates 100 test cases IIRC), we effectively solve the equation so we can actually say that it holds for all inputs. The key difference is that we don’t actually invoke the code with concrete values, but rather treat it like a set of constraints that should always be satisfied. We then check these constraints and if they fail we can reverse engineer a concrete value that would cause the violation. So we effectively run it for all inputs, without actually running it for any inputs.
Choc13
·hace 5 años·discuss
Hey, thanks for the feedback. A more comprehensive list of features is on our todo list, we’ll update the site shortly.

The memory violation one doesn’t include symbolica.h because we don’t need to symbolize any variables for that one. When we run the compiled code through our solver it adds additional constraints such as, “don’t access memory that’s out of bounds”, so we can detect that automatically.

On your final point, we’re working on the LLVM bitcode so we do have to compile the code, hence the print statement. You’re right in that this is similar to other symbolic executors. We built this one as we found others were quite difficult to get started with and were hard to extend with the features we personally wanted as well as not supporting the languages we wanted either. Obviously at this point in time we’ve not achieved these goals yet, but we think we’ve built the foundations to be able to do so.
Choc13
·hace 5 años·discuss
I should add that we believe it’s possible to support other langs too, especially if they compile down to LLVM IR, or have an interpreter/runtime that does. So we plan to eventually work on support for others too like C++, .NET, Java, JavaScript and Rust.
Choc13
·hace 5 años·discuss
Hmm, yeah sorry about the FireFox thing and thanks for reporting. I just checked it now and it seems like the code editor div isn't respecting the height 100% style so it's shrunk to being a few pxs heigh. I'll fix today.

Thanks for giving it another shot in Chrome.
Choc13
·hace 5 años·discuss
We do have some upcoming changes that will make the status clearer on the website and will be removing some constant time overhead that we're paying on each playground run. I agree that the playground is on the slow side at the moment whilst we're still in the early stages of developing this product.

On the Lisp point, it's not really been developed for commercial reasons, as like you say it's not got the largest market share, but we wanted to see if we could get it to work with languages other than C and Lisp seemed like a nice one to try.
Choc13
·hace 5 años·discuss
Yeah that's a good point, we'll work on some more realistic examples.
Choc13
·hace 5 años·discuss
Yeah I think that's a great analogy, we noticed the same thing when we used to work together at our last jobs which is what motivated to start this venture.

On the implementation side, yes we're using Z3, you can have a poke around at the core symbolic executor at https://github.com/SymbolicaDev/Symbolica

In terms of managing the path explosion problem, we have a few techniques that we've prototyped locally. For instance we believe we can do quite a bit by canonicalising and caching past results. We've also made our executor amenable to parallelisation from the start. We hope to start using these techniques in our hosted version soon.

With your example, maybe I'm missing something here, but they look like they are functionally equivalent to me. When I just tried running some values by hand they even appear to overflow in the same way. What was the assertion that you were making and what was the result you were expecting?
Choc13
·hace 5 años·discuss
Ah sorry about that and thanks for pointing it out. Will fix!
Choc13
·hace 5 años·discuss
I’m not quite sure what you meant by this statement

“Javascript that runs on back-button mouse over is not where to put your efforts.”

Was this something you observed on our site, or just a general point about prioritising the core product over fancy UI effects on the website? Would you mind clarifying?