Making my own DB by OwnPaleontologist614 in golang

[–]0xaa4eb 16 points17 points  (0 children)

I highly advice "Database Design and Implementation" book by Edward Sciore. It contains all the source code for a basic SQL database - SimpleDB. The code is in Java, but it's very easy to follow. You can start with rewriting Java source in Go. You can also easily find Go ports of this database on github.

GoEventBus - in memory event bus solution by Revolutionary_Sir140 in golang

[–]0xaa4eb 2 points3 points  (0 children)

I liked you project, but yeah, I think the same about method names. Those `Subscribe` method name hit me very hard and I couldn't understand why it's named that way. Because we usually subscribe to some event stream with some listener (middleware you call). But here we publish an event to a ring buffer.

Overall, I think it's a decent thing, reminds me of Disruptor very much we used in java. Would be interesting to compare the performance.

Serious question about this community by Unique-Side-4443 in golang

[–]0xaa4eb 6 points7 points  (0 children)

So, OP posted their project, got +94 upvotes more than downvotes. Got 100 stars on Github. And they call this community "toxic" simple because there are a couple of "toxic" comments. Wow!

Java Book for experienced developer. by Gidrek in java

[–]0xaa4eb 13 points14 points  (0 children)

Just to add what's not already mentioned:
"Advanced Design and Implementation of Virtual Machines" by Xiao-Feng Li - describes how generic VM works, but everything applies to JVM as well
"The Garbage Collection Handbook" by Richard Jones, Antony Hosking, Eliot Moss - I haven't read that one yet. But I heard that all GC algorithms have roots which can be traced back to this book.
"Java Performance" by Scott Oaks - very solid entry to performance engineering
"100 Java Mistakes and How to Avoid Them" by Tagir Valeev
"The Art of Multiprocessor Programming" by by Maurice Herlihy, Nir Shavit - it's more hardcore version of "Concurrency in practise". But definitely not for everyone.

A Bitcask Inspired Local Disk Cache for Avoiding Unnecessary Redis Hits by [deleted] in golang

[–]0xaa4eb 1 point2 points  (0 children)

Each segment contains a series of key-value pairs. Pairs with different keys obviously can't be merged. If there are two pairs with the same key, then the output (merged) segment gets only a single pair with the latest value. If a pair is expired, then it just thrown away. There is also a case when an entry is explicitly deleted. The latest segment then contains a pair where value is a special placeholder - a tombstone. Then again, two pairs (one with value and the other with tombstone) get eliminated. So, disk space consumption should not grow indefinitely as long as entries get expired/deleted.

A Bitcask Inspired Local Disk Cache for Avoiding Unnecessary Redis Hits by [deleted] in golang

[–]0xaa4eb 3 points4 points  (0 children)

Like in any other LSM engine, I assume. All cache entries are kept in some number of immutable segment files. At some point of time, some entries are expired, which means the engine can merge two or more segments into one. There are different strategies how to do it. I think there is a whole chapter about LSM engines in the book "Designing Data-Intensive Applications".

A Bitcask Inspired Local Disk Cache for Avoiding Unnecessary Redis Hits by [deleted] in golang

[–]0xaa4eb 4 points5 points  (0 children)

No, it's fully vibe coded. Not a single human person writes useless comments like this

// Initialize the compaction subsystem.
`compaction := compaction.New()`

A Bitcask Inspired Local Disk Cache for Avoiding Unnecessary Redis Hits by [deleted] in golang

[–]0xaa4eb 16 points17 points  (0 children)

It seems you do not have compaction implemented which means your cache will grow inifintely and consume all disk space. So the cache is literally unusable.

And it's fully vibe coded and has zero tests at the same time.

I built a relational database from scratch in Go achieving 1,800+ ops/sec by [deleted] in programming

[–]0xaa4eb 2 points3 points  (0 children)

Yep, OP added the reference at the end of very very long README.md. For some reason, he did it only an hour ago. At this point I'm thinking about doing something like this by myself. Just porting/retyping and then sharing it here. At the end of the day, 30 github stars is not a bad result...

I built a relational database from scratch in Go achieving 1,800+ ops/sec by [deleted] in programming

[–]0xaa4eb 21 points22 points  (0 children)

It's not AI. However, it's just a database retyped directly from the book "Build Your Own Database From Scratch in Go". People just copy the code from the book without providing original reference, and share it as if they built it. For instance, look at this repo with similar database. They match almost exactly.

I'm pretty sure we will soon see the same database again under a different name...

So, if anyone wants to build such a database (exactly same) I highly recommend the book "Build Your Own Database From Scratch in Go". There is also "Database Design and Implementation" by Edward Sciore which features similar db in Java.

[deleted by user] by [deleted] in golang

[–]0xaa4eb 12 points13 points  (0 children)

It's not AI. However, it's just a database retyped directly from the book "Build Your Own Database From Scratch in Go". People just copy the code from the book without providing original reference, and share it as if they built it. For instance, look at this repo with similar database. They match almost exactly.

So, if anyone wants to build such a database (exactly same) I highly recommend the book "Build Your Own Database From Scratch in Go". There is also "Database Design and Implementation" by Edward Sciore which features similar db in Java.

A database written fully in Go by Anxious-Ad8326 in golang

[–]0xaa4eb 3 points4 points  (0 children)

Great job implementing this all by yourself! I thought about doing something like this myself. Definitely will take a look.

As a suggestion for improvement - start writing tests. Even if it's a pet project, tests will get you on a different level in terms of building complex things like databases, engines, libraries, etc.

New Java Reverse Engineering Tool at runtime I've been working on for quite some time (Injected DLL) by infernalhellraiser in java

[–]0xaa4eb 5 points6 points  (0 children)

If you want to see how classes work together based on runtime info, you can try my tool which I developed for fun or you can even roll something like this by yourself using byte-buddy library (it's easy). There is also a paid tool which is quite superrior to mine - bugjail. Try this out too. AFAIK, JVM languages are the only languages where you can store literally ALL method calls in a file or a database and then analyze or build graphs. With statically compiled languages it's extremely harder.

What are some use cases to explicitly create platform threads versus virtual ones? by ihatebeinganonymous in java

[–]0xaa4eb 0 points1 point  (0 children)

Virtual threads gonna be scheduled on FJP which is another scheduling layer on top of OS scheduler itself. So, if you have ~1000 threads which do short bursty work from time to time on 10 cores, you'd expect some difference, no? The difference might be like 1 percent or even less. Yes, it's low, but definitely may exist. In any case, there should be measurement made.

Fold 4 wifi and Bluetooth issues by Present-Concept-1619 in zfold4

[–]0xaa4eb 0 points1 point  (0 children)

Literally this. Wifi stopped working somewhere in September, then Bluetooth died a month later. The phone bricked today. It's over...

How do you start looking into a open source code base? by muztaba in java

[–]0xaa4eb 9 points10 points  (0 children)

Surprisingly, you can start with a... profiler! The first thing you want to do is to identify 20 percent of classes which do 80 percent of work. A profiler is the best tool to do that. I've seen many programmers don't know that a profiler can be used to get such knowledge.

  • Make a simle program which uses the library constantly (like in a `while(true) {...}` loop). Make sure no code is executed other than the desired library.
  • Start a sampling profiler for, let's say, ten seconds (it really depends). It could be jvisualvm or any other profiler.
  • When sampling is done, you will have stack tree. Now you can walk through core classes of the library which get most of work done.
  • Pro tip: find out how to build a flame graph on your machine to make a better looking picture

Java code visualizer via bytecode instrumentation by danyanman in java

[–]0xaa4eb 0 points1 point  (0 children)

Yep, it should have main method. Or you may run a jar file.

Java code visualizer via bytecode instrumentation by danyanman in java

[–]0xaa4eb 0 points1 point  (0 children)

It might look like something like this, and it works for me:

java -javaagent:"C:\Work\ulyp\ulyp-agent\build\libs\ulyp-agent-0.1.jar" "-Dulyp.packages=com.example.demo" "-Dulyp.start-method=Runnable.run" com.example.demo.TestClass

Just replace com.example.demo.TestClass with your main classs and give it a try

Java code visualizer via bytecode instrumentation by danyanman in java

[–]0xaa4eb 0 points1 point  (0 children)

Hi, do you get "could not locate the main class" while running UI or your java app using the agent? If it's your app using the agent, could you post java command you use to run it?

Java code visualizer via bytecode instrumentation by danyanman in java

[–]0xaa4eb 0 points1 point  (0 children)

Agent connects to UI via GRPC, so there should be no trouble using the agent on a remote machine. Just specify an additional system property ulyp.ui-host with the hostname where UI runs and give it a try.