chips
Polly
chips | Polly | |
---|---|---|
9 | 52 | |
925 | 13,046 | |
- | 1.1% | |
7.5 | 9.8 | |
about 1 month ago | 3 days ago | |
C | C# | |
zlib License | BSD 3-clause "New" or "Revised" License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
chips
-
Zilog Z80 CPU – Modern, free and open source silicon clone
Because it's a software implementation in Verilog which is much closer to a software emulator and has nothing to do with the original Z80 "transistor structure".
For instance here's the LD A,(DE) "payload":
https://github.com/rejunity/z80-open-silicon/blob/974c7711b2...
And here's the equivalent in my software emulator:
https://github.com/floooh/chips/blob/bd1ecff58337574bb46eba5...
What's interesting though is that the Verilog implementation doesn't seem to update the internal WZ register, even though there are references to WZ in other places.
But in the end, if it looks and feels like a Z80 from the outside (e.g. the right pins are active at the right time) the internal implementation doesn't matter all that much.
-
Getting into way too much detail with the Z80 netlist simulation (2021)
Author here, interesting to see this posted since it's more like a reference manual for Z80 instructions with 'unusual' timings. The followup blog post about the cycle-stepped Z80 emulator is probably more interesting:
https://floooh.github.io/2021/12/17/cycle-stepped-z80.html
One important note: at the start of the post I'm speculating about why I was seeing some minor differences to a 'real' Z80, it turned out that this speculation was wrong and instead the differences were caused by 'incomplete' netlist simulation code which worked fine for the 6502 but required some tweaks for the Z80, see the comments of this GH issue for details: https://github.com/floooh/v6502r/issues/2.
As far as I'm aware the netlist simulation now behaves correctly like a Zilog Z80 (but note that reverse engineered Z80 clones like the East German U880 are known to have slightly different undocumented behaviour), and the Z80 emulator in https://github.com/floooh/chips is tested against the netlist simulation for correct behaviour and timing.
-
A world to win: WebAssembly for the rest of us
I simply don't see that there's a big enough difference between traditional garbage collection, refcounting and manual memory management. Each of those can already be implemented in pure WASM, just more or less awkwardly.
As for "just another ISA", there have been CPUs which had separate call- and data-stacks, with the call-stack living on the CPU and not accessible as regular data. In that sense WASM isn't much different then those esoteric CPUs.
And even though WASM might not allow free jumps, I yet have to see a noticeable performance difference between WASM and native for this type of "worst case code":
https://github.com/floooh/chips/blob/f5b6684ff6e899429544b21...
-
Appler: Apple ][ emulator for IBM PC, written in 8088 assembly
Oh my, the 6502 emulation [1] has fewer lines of assembly code than my (code-generated) implementation has lines of C code [2] :D
Very nice use of a macro assembler though [3], makes the code feel very high level.
To my defense, the generated code has a lot of redundancies (such as assert(false) which were meant to catch any 'stray cycles' but which are removed in release mode.
[1] https://github.com/zajo/appler/blob/develop/src/65C02.ASM
[2] https://github.com/floooh/chips/blob/master/chips/m6502.h
[3] https://github.com/zajo/appler/blob/52aaa0f768cdf303438cd2c7...
-
Ask HN: What's the best source code you've read?
I don't know if it's the best code I've ever read but this emulation library [0] of 8 bits computers is pretty well written, documented and designed: https://github.com/floooh/chips.
It's a good way to document old hardware with emulation code.
- A new cycle-stepped Z80 emulator
-
Tiny Emulators
Looks like here's the source code of the emulators:
8-bit chip and system emulators in standalone C headers - https://github.com/floooh/chips
-
Emulating a Parallel Memory chip at the circuit level:
There's a project on GitHub of similar nature -- it has include-able .h files emulating 8-bit computer chips on the pin level, and bus state is also held in a 64-bit value: https://github.com/floooh/chips/blob/master/chips/m6502.h
-
Yet Another Eater Sap1 Is Finished
I wrote also a library of components for some complex chips (like 6502 simulation using https://github.com/floooh/chips)
Polly
-
The Retry Pattern and Retry Storm Anti-pattern
In our applications, we should wrap all requests to remote services in code that implements a retry policy that follows one of the strategies I listed earlier. If you are a .NET developer like myself, you may be familiar with the Polly library. Golang has a library called Retry, and there are numerous third-party libraries for Python and Java.
-
Http calls on mobile, what is the preferred way / best practice
Another question that rises is, would it be better to use some HttpClient package to handle the requests, like Refit in combination with Polly. But then again, it seems Refit also uses the HttpClient factory, which was a bad thing according to the previous?
-
[Question] HttpClient does not recover from error
D'Oh! Sorry, not PolySharp. I meant Polly. Too many similarly-named libraries!
-
I thought "Availability Groups" would be 100% "seamless"
Everywhere I've worked with AGs, we've worked with the application team to add retry logic to help make things a bit more seamless to end users. There are libraries out there that can make this pretty easy - Polly is one that I've used a few times, but there are others.
-
Do you really need "microservices"?
Fallacy 1: The network is reliable. If system 2 works perfectly well, but is not accessible for service 1 due to network issues, service 2 is still unavailable. This is why timeouts, service breakers and retry policies exist. A great tool for .NET to handle common network issues is Polly, but even when using a tool like this, the network is still not completely reliable.
-
Only "exit 1" if VISIBLE errors are thrown during script invocation, ignoring try/catch blocks
I see. Then I don't have any better idea right now, but I do want to suggest that if your script is mostly API calls and you want to be able to deal with failures then take a look at the polly library: https://github.com/App-vNext/Polly
-
Getting back into C# after a hiatus, any good reading material recommendations to get back up to speed? Been using Kotlin recently, and got quite a lot of experience in engineering.
Runs in containers nicely, has good integration with Kafka, RabbitMQ, gRPC, etc. for Microservices communication. Implements resiliency patterns you'd want in Microservices via Polly. Has a decent Dependency Injection framework built in by default.
-
What your hidden nuget gems ?
It's in no way hidden. But I use Polly all the time.
-
Message Queueing
Depending if the sender or the reciever is down, you can also try Polly http://www.thepollyproject.org/
- How To Implement Retries Without Cluttering Your Code
What are some alternatives?
wasm.cljc - Spec compliant WebAssembly compiler, decompiler, and generator
MediatR - Simple, unambitious mediator implementation in .NET
s7-wasm - Example of using s7 Scheme with web assembly and emscripten
Hangfire - An easy way to perform background job processing in .NET and .NET Core applications. No Windows Service or separate process required
makaronLab - CPU simulation experiments
FluentValidation - A popular .NET validation library for building strongly-typed validation rules.
8086tiny - 8086tiny interpreter by Adrian Cable, taken from http://www.megalith.co.uk/8086tiny/
Redis - Redis is an in-memory database that persists on disk. The data model is key-value, but many different kind of values are supported: Strings, Lists, Sets, Sorted Sets, Hashes, Streams, HyperLogLogs, Bitmaps.
TypeScript - TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
Refit - The automatic type-safe REST library for .NET Core, Xamarin and .NET. Heavily inspired by Square's Retrofit library, Refit turns your REST API into a live interface.
appler - Apple ][ emulator for MS-DOS, written in 8088 assembly
Flurl.Http - Fluent URL builder and testable HTTP client for .NET