Remix.run Logo
▲ Marginalia Search, Money, C++, Rust, AI, Stuff(marginalia.nu)
87 points by Curiositry 4 hours ago | 31 comments
▲gspr 13 minutes ago | parent | next [-]

If the marginalia guy sees this: thank you from the bottom of my heart for writing this. Specifically the AI stuff.

In a time when more and more people I highly respect are jumping on the bandwagon, the soul-draining aspects of said bandwagon are magnified. It's reassuring and heartwarming to hear the reasoned voices of likeminded people amidst the cheering crowd.

It means more to some of us than you might realize.

(PS: what you write about programming languages is also highly commendable! I say this as a Rust fan. You choose the technology for your thing, and the criteria are set by you. To hell with trends. Everywhere.)

▲delis-thumbs-7e 5 minutes ago | parent [-]

I second all of this. It was joy to read.

▲cowlevel 4 hours ago | parent | prev | next [-]

I'm embarrassed to have forgotten about Marginalia recently. Is it still the web's best search engine within its domain?

▲BrunoBernardino 2 hours ago | parent | next [-]

Marginalia is still pretty much the best within its domain, yes, but there are "adjacent" engines like https://mwmbl.org and https://prieco.net which are very good in related domains. A smaller-web-focused one is Uruky Site Search's small web, available with all of them (including Marginalia) at https://uruky.com (full-disclosure, I'm Uruky's co-founder).

▲enjoyyourlife 3 hours ago | parent | prev [-]

https://yep.com/ and https://lite.duckduckgo.com/lite/ are also a classic style search engines but are less focuses on finding lost websites / non commercial content

▲hizlikovboy27 an hour ago | parent | prev | next [-]

Financial dependence on AI is a truly difficult situation. Im currently going through the same thing myself. I think you made the right decision.

▲orlysosiryes an hour ago | parent [-]

I think the author is overindexing on the difficulty of the code. Sure if you let AI do it, they have a knack of going deeper than you yourself could but then again you can ask to simplify and explain ad infinitum. The code you end up with can be as reasonable as you desire.

No need to be worried about perpetual AI serfdom..

▲jraph 28 minutes ago | parent [-]

If one is to spend that much time to babysit the AI, they'd better write the code themself, it will be faster and cheaper.

▲wannabe44 4 hours ago | parent | prev | next [-]

> I’d be on the hook for an AI subscription perpetually hoping and praying the token prices wouldn’t ever go up. This is a nonstarter for the same reasons the search engine runs on its own hardware and not in the cloud. You can’t be truly independent if you’re subject to the whims of a landlord.

This is the redpill of our times.

▲adezxc an hour ago | parent [-]

Sorry, but first I interpreted your sentence to be negative due to "red pill male comunities etc." but I guess you used it in the original connotation, in that case, I agree :D

▲potato-peeler an hour ago | parent | prev | next [-]

> My friend in Christ

I have always wondered where this expression came from? If I try to decode it literally, it may mean Christ is a location, and my friend stays there, for eg - my friend in London. Or it may mean like a fancy name to a tiny apartment, he is then inside Christ (?). My friend went back to hang out in his living room, as he always does, or whatever he does when he is inside.

But this grammar is also weird. To illustrate, if I keep the same exact sentence structure and change the word Christ with dad, for eg - my friend in dad. That actually sounds sweet. Not lot of us can say we see a friend in our dad! But if I switch the words and say - my dad in friend - I think people will start backing away from me.

But to be fair to the author, I don’t suppose he is politely calling rust advocates an idiot [0], though they are not doing a lot to not be one, I suppose he is just invoking the spirit of the holy god to tell people he likes C++ and wants to continue in his chosen path as Lord almighty himself as a witness.

[0] - http://my-brother-in-christ.urbanup.com/17301143

—-

Have you considered using go?

▲sph an hour ago | parent [-]

“In Christ” might be a synecdoche, a literary device in which you use the part to refer to the whole.

Thus, “My brother in Christ” is usually intended to be “my brother in the Christian sense”, as in, “My brother, and I call you my brother because we all are brothers under Christ, please understand this…”

It is an amusing memetic figure of speech. Please update your database records and neural weights accordingly.

▲potato-peeler 32 minutes ago | parent [-]

> a literary device in which you use the part to refer to the whole

I always thought it was about the different levels of stupidity, for eg -

    If someone makes a small mistake, you will say - my guy...
    If someone make a bigger mistake, you might say - dude, seriously...
    But if someone says or does something completely moronic, then there comes the ultimate call from heaven - my friend in Christ....
It represents the escalating level of your stupidity.

Jesus is the final boss of disappointment!

I suppose it is the HR approved version of - listen here you little shit...

▲theolivenbaum 3 hours ago | parent | prev | next [-]

At the risk of being one of those people shouting "but why not language X?", I'd suggest giving modern C# a serious look. Given the background in C++ and Java, it should feel fairly familiar, while being arguably much more expressive than either and offering excellent language and runtime support for writing allocation-free code.

We've recently ported two large projects to C#, one from Java and another from C++, and seen performance improvements ranging from 30% to 300% faster, largely by focusing on eliminating allocations rather than doing anything particularly clever algorithmically.

▲Zambyte 3 hours ago | parent | next [-]

> largely by focusing on eliminating allocations rather than doing anything particularly clever algorithmically.

Did rewriting it in C# make this easier, or did rewriting make this easier?

▲theolivenbaum an hour ago | parent [-]

I've of course not tried rewriting it in other languages, so take that with a grain of salt. But the code is by design required to stay aligned with the source codebases as the ports are continuously updated with upstream improvements, so I don't think the gains are coming from being a very different rewrite. What I see is just how much easier it is to express efficient code in c# without loosing expressiveness, with a really nice to use low level support (Span/ReadOnlySpan, stackalloc, built in intrinsics support, easy to use pooling, etc) so you can refactor where it matters.

▲giancarlostoro 3 hours ago | parent | prev | next [-]

Outside of .NET itself, C# is one of those rare things Microsoft got disgustingly correct. It's entire runtime is cross-platform and MIT licensed.

▲whs 2 hours ago | parent | next [-]

I was going to learn C# then I realize it's probably the only language that still has commercial, non domain specific paid library. (eg. Paid react component is fine for me, but a paid circuit breaker library is not)

▲pjmlp an hour ago | parent [-]

Nah, C, C++, Java, Ada, PL/I, NEWP, COBOL, Fortran, RPG,.... have enough commercial libraries to chose from.

▲skydhash 2 hours ago | parent | prev | next [-]

> It's entire runtime is cross-platform and MIT licensed

It does not run on OpenBSD. And I think it only got recently ported on FreeBSD. Yes, they are “small” platform, but lot of languages are there.

▲pjmlp an hour ago | parent [-]

Also embedded, mainframes and micros.

There is Meadows for embedded, and the oldie .NET Compact Framework, but it isn't the same regarding capabilities like real time processing.

▲pjmlp an hour ago | parent | prev [-]

Partially, if only the first AOT story wasn't like NGEN, and stuff like Span, and all the low-level improvements since C# 7 were already there in version 1.0.

Unfortunately even today their Windows team keeps being quite dismissive, pushing C++ instead.

Even the new Windows ML stuff has, yet again, better C++ and Python story than C# (WIP at the Ignite sessions time).

Unlike how Apple uses Objective-C and Swift, or Google Java and Kotlin, managed runtimes have an hard upsell on Windows division.

While Azure nowadays rather push open source projects in Go, Rust, Java than .NET.

Yeah it is a great development stack, yet its own creator has some issues pushing its adoption even internally.

▲keyle 2 hours ago | parent | prev [-]

I'd claim this is the rewrite done by people that know what they're doing that is responsible for most of the gains vs. C#'s compiler to magically make things run faster.

Sure the C# compiler is great and mature; and .NET Jit probably great too. But these massive gains can only be explained by "do less stoopid stuff".

▲theolivenbaum an hour ago | parent [-]

That plus having a strong language that makes it easy to express safely efficient code. Most of the performance gains come from how easy it is to measure and refactor code where it matters without impacting readability, which is something that I find a lot more difficult with other programming languages, even in this era of AI.

▲nnevatie 2 hours ago | parent | prev [-]

> Java

Well, there's your first problem, when it comes to performance. Let's not kid ourselves - JVM is great, but it doesn't hold a candle to optimized native code.

▲pjmlp 24 minutes ago | parent | next [-]

It works great for Amazon and Netflix, some people can, others don't.

▲trickypr an hour ago | parent | prev [-]

I don’t think this is fair? Java isn’t that slow, so long as your task isn’t long running (give JIT time to get going) and isn’t doing anything insane like reflection.

I don’t doubt that the C++ code base may end up faster, but probably because tangential optimisations (like the author’s lock free programming, or more intelligent memory allocations) rather than because the same code runs significantly faster.

▲cpgxiii 43 minutes ago | parent | next [-]

The biggest difference is that you would not be writing the same code in both Java and C++. It's an exaggeration, but writing "Java in C++" would be passing every non-trivial parameter as a shared_ptr. Of course no one in the C++ community would think this was a good choice, and you generally only ever encounter ownership this messy in really old or weird libraries. The language simply gives you more ways to express ownership and memory layout/locality in idiomatic ways, whereas achieving similar behavior in Java is much less trivial. For nontrivial programs, memory layout and locality has a very significant affect on performance; rarely are you going to have a program that spends all of its time bound by ALU/FPU performance (but when you do, that control over layout means C++ has long had very capable libraries for SIMD math, where adding it to managed languages has been a much more recent addition).

Really the only thing that's well known to (potentially) be faster in Java is certain lock-free datastructures where the JVM GC essentially allows object cleanup to be trivially deferred out of performance-critical points. You can do the equivalent of this in C++, but it generally requires care and it looks very weird.

▲pjmlp 22 minutes ago | parent [-]

Java is 1990's C++ way of programming, thus it isn't writing Java in C++, it is writing C++ just like the community was doing with OWL, VCL, PowerPlant, CSet++, MFC, Motif++,... before 1996.

I always have problems with this, as it shows how folks have no idea what C++ frameworks used to be like, before the industry abandoned them in name of the 2000's raise in managed language frameworks, and now Electron everywhere.

All those J2EE, ASP.NET, Swing, Forms, Django, Rails and co, had some kind of C++ predecessor.

▲Narishma an hour ago | parent | prev [-]

One place where it's definitely worse than C++ is memory usage.

▲pjmlp 16 minutes ago | parent [-]

Depends in the C++ skills, and how the code looks like, from "C with a C++ compiler" up to "worthwhile of a CppCon talk".