Better HN
topnewbestaskshowjobs
Log inSign up

DmitryOlshansky

276 karma · joined Jul 25, 2017 (9y ago) · 149 submissions

https://olshansky.me
Submissions

comment 2mo ago · link · parent

The bonus is synchonizing at arbitrary point in stream and that ASCII is UTF-8

comment 2mo ago · link · parent

I think one area where spinlock could be useful is fibers. There you have an option to schedule another fiber instead of spinning CPU until timeslice runs out.

comment 5mo ago · link · parent

I’ve replaced Asio recently with stright epoll event loop and got about 16% RPS better. That is for resonably sized SQL server, so be careful with nice precanned libraries.

comment 5mo ago · link · parent

I would argue that _premature_ abstraction is worse than _some_ duplication of code.

Also I’ve seen the kind of codebase that seems to be LZW packed due to the sheer desire to DRY everything out. Not pleasant thing, by the time you goto 10 layers deep on some “helper” function you forgot why you in there.

comment 6mo ago · link · parent

There is a big difference between JIT compiled _dynamic_ language and ahead of time compiled static language. While modern JS engines show that difference sometimes can be narrowed down with sophisticated JIT and runtime, it is still there.

comment 6mo ago · link · parent

Running NFA is O(nm) not NP.

comment 10mo ago · link · parent

On a related note getting my share of data back from OneDrive was a painful exercise - tons of spurious write errors I spent best part of my evening getting everything back to my filesystem. Yes remote by default was enabled without my consent.

comment 1y ago · link · parent

I just wonder if it has the three laws builtin.

comment 1y ago · link · parent

And I’ve just implemented BWT and Inverse BWT in D, earlier today! https://github.com/DmitryOlshansky/compd/blob/master/source/...

comment 1y ago · link · parent

I guess this will be killed soon enough, like so many Google projects.

comment 1y ago · link · parent

I too adopted Scala in 2014 and was really satisfied with FP side and how it all was tied with JVM. Honestly I always felt that JVM is a nice platform with a horribly verbose “assembly” language that is Java.

Fast forward to around 2020 and I had to organize a team to build search engine in JVM. Given how hard it is to find decent Scala developer I surrendered and did this project in Kotlin. Java devs easily pick up and write sensibly FP-style even code, and builtin coroutines are cool. Even though I had to open up the internals of coroutines to get tracing to work they felt a very welcome change compared to say monadic explicit async.

So for me Kotlin is kind of watered down Scala for typical Java folks and I could tolerate it compared to perspective of writing plain Java.

comment 1y ago · link · parent

Why not full VM with JIT? Seems much easier and more compatible with apps out there.

comment 1y ago · link · parent

Used cucumber as living specification for our search engine. Sooner or later we realized it was just matching a list of expected JSONs with a bunch of awkward Given, And Then mixed in. Scraped that stuff for our own Kotlin DSL, made the whole thing more flexible and faster to boot.

comment 1y ago · link · parent

I recall the Zookeeper paper from Yahoo scientist which basically details a more useful version of Google’s chubby. I find reliability and design of Zookeeper fascinating these days cool kids use etcd mostly because of relatively complex protocol of Zookeeper (there is a few implementations but they lack the polish of Java client).

comment 1y ago · link · parent

I recall playing Warcraft I with my friend over null modem. Kind of boutique LAN party.

comment 1y ago · link · parent

Think of page tables this is essentially a table of tables of tables. I also was meh on triple pointers until I found this use case.

comment 1y ago · link · parent

I think there was a discussion to add SuperStack a threadlocal buffer that will be used for arena style allocation back in 2010-2011. While std wont have it I see no problem implementing one yourself.

comment 1y ago · link · parent

Patching the binary is an option, though it’s tricky I would attempt it anyway.

comment 1y ago · link · parent

Or zookeeper for that matter.

comment 1y ago · link · parent

> Generic: Works with any type implementing the Event interface.

Isn’t this the opposite? Generic is usually implying any type would do.

comment 1y ago · link · parent

A drop-in memcached replacement written in D. The end goal is Redis but memcached is simpler protocol (and less data structures;)) to test the waters.

https://github.com/DmitryOlshansky/hedgehog

comment 1y ago · link · parent

I remember how I caught the silver train in Cartahena, most of my pirates didn’t survive the onslaught. So when the time came to divide the plunder each pirate would get ~ -16000 gold, I immediately recognized that was 16-bit wrap around. Sadly nobody wanted me to leed the next journey so I retired as a freaking rich pirate.

comment 1y ago · link · parent

That’s the POSIX AIO. Linux has had AIO that was only supported for direct I/O and had certain limitations making it awkward to use.

comment 1y ago · link · parent

I wonder how std.regex of dlang would fare in such test. Sadly due to a tiny bit of D’s GC use it’s hard to provide as a library for other languages. If there is an interest I might take it through the tests.

comment 1y ago · link · parent

At my work they would also disable ptrace in the kernel and require you to explain why need it

comment 1y ago · link · parent

Python is not something I expect to see when talking about performance. Being interpreted with powerful builtins it distorts what is fast and what isn’t in a fairly unpredictable way.

comment 1y ago · link · parent

It certainly doesn’t run like C. I once thought to port my JSM machine learning engine to python and it felt Cython might just be what I needed. Simply put it’s tight loops doing bitwise ops on bit-vectors. In reality no amount of adding type annotations would help the thing was slower then C++ by an order of magnitude.

28.

Photon – A Transparent Fiber Scheduler(github.com ↗)

4 points · by DmitryOlshansky · 2y ago · discuss

comment 2y ago · link · parent

In contrast I enjoyed my brief adventure in FreeBSD land. The system is so clean and simple compared to the chaotic nature of the typical linux desktop with countless deamons running. Ports usually work just fine and they even have Jetbrains Intellij IDE ready to go, lastly ZFS is a blessing - snapshotting never being easier.
12345