7 ms·
AsmBB – a lightweight web forum engine written in assembly language
- xyst 3y ago> x86 Linux server How hard would it be to add ARM support?
- kstrauser 3y agoThat's insane and impressive. Well done!
- DigiEggz 3y agoReally cool concept and execution. I did notice that the live notifications quickly become overwhelming, so there should be some kind of rate limiter on them.
- hombre_fatal 3y agoI could see "@User123 has entered the thread" working in the smaller forums I was a part of where I knew everyone. phpBB/vBulletin show a "Users reading this thread: ..." list for that reason, and there were popular plugins for things like "@Foo and @Bar are writing responses to this thread". It helped make the place feel more alive, especially when you were in an intense discussion. It was nice to know the fker was working on his next big quote-by-quote debunk of your post. But getting a notification when unregistered guests click into a thread doesn't seem useful to anyone.
- ezekielmudd 3y agoTap the Bell icon to disable the live notifications.
- iamdual 3y agoI couldn't read the article on mobile due to live notifications.
- CharlesW 3y agoYep, the alerts occlude must/most of the page. This is probably the first time the creator's encountered HN rush hour.
- cristoperb 3y agoit's definitely not the first time the project has gotten traction on hn (eg: https://news.ycombinator.com/item?id=37285156 https://news.ycombinator.com/item?id=37285156)
- ezekielmudd 3y agoTap the Bell icon to disable the live notifications.
- saagarjha 3y agoI can’t do that either because the notifications pile up and cover the button.
- TOGoS 3y agoDear AsmBB.org admin: Have those be turned off by default. They're annoying even when they don't occlude the entire screen.
- al_borland 3y agoEspecially for guests viewing the page. No one really needs to know that a random person loaded the page. If there is some kind of friend/follow functionality for logged in users, and they want to enable notifications for them, ok, but that’s about as far as it should ever go.
- janderland 3y ago
- zxspectrum1982 3y agoIt'd be nice to try to build this with Cosmopolitan https://github.com/jart/cosmopolitan https://github.com/jart/cosmopolitan
- giancarlostoro 3y agoReminds me a little of D's official forums, which load faster than you can close your eyes to blink. I love these kind of projects.
- dtx1 3y agoOh yeah it's immediately noticeable. How did they do it? https://forum.dlang.org/ https://forum.dlang.org/
- bhauer 3y agoUse a fast language and forget some of the old advice from "12 factor apps," some of which are focused on avoiding common challenges when scaling low-performance platforms.
- esafak 3y agoWhich ones did you have in mind?
- wruza 3y agoD isn’t “big” (as in “reddit big”), and any web-1.0 forum that I remember from 2000s worked like that on old hardware. If you’re curious how a single SQL database can serve so fast, it’s caches and invalidation when a thread CrUDs itself. Old boring tech. Edit: the tone was a little sharp, edited it out, my apologies
- giancarlostoro 3y agoIts open source iirc it uses MongoDB and redis for caching, worthy of noting is that you can also browse and download that entire board with a Newsgroups client. It also posts to IRC as well.
- jamesgeck0 3y agoIt appears to be written in D. It uses SQLite. https://github.com/CyberShadow/DFeed/blob/master/dub.sdl https://github.com/CyberShadow/DFeed/blob/master/dub.sdl
- bdcravens 3y agoIt's not just written in assembly, but it's backed by sqlite. Like many apps, IO is more likely to be the bottleneck than the CPU.
- CharlesW 3y agoUsing WAL mode with PRAGMA synchronous set to NORMAL, or even in that case? (I'm the furthest from a SQLite expert, just looking at it myself for a project.)
- bdcravens 3y agoNo idea - just did a quick scan of the source https://asm32.info/fossil/asmbb/dir https://asm32.info/fossil/asmbb/dir
- PaulHoule 3y agoRAM is a factor too. I’ve written some programs for Arduino in C that would be a good match for assembly because the stack and C calling conventions are a complete waste. (e.g. sometimes you have no recursive functions). The thing is portability —- as much as I love AVR-8 if my requirements grow AVR-8 has no nowhere to go except maybe an FPGA soft core. In C I can switch to an ARM microcontroller which I find really uninspiring but just performs better. That’s the one trouble w/ AsmBB that it is specific to some particular architecture.
- Cthulhu_ 3y agoThat's often the fallacy people have, assuming that the language is a bottleneck instead of the I/O or database design. Mind you, I understand it given some of the PHP I've seen. But again, that's not the language per se, but how it's used.
- andoando 3y agoMan how do you even connect to a db with assembly code? Are there assembly libraries? In theory I understand it but the monumental amount of effort it would take to write such “simple” things would take so much time
- nneonneo 3y agoIt says that the DB is SQLite, so I presume they’re just linking to the SQLite libraries.
- atdt 3y agoIt's less complicated than you might think. You call into SQLite C library functions using C calling conventions. Here's the relevant code: https://asm32.info/fossil/asmbb/file?name=source/sqlite3.asm&ci=tip https://asm32.info/fossil/asmbb/file?name=source/sqlite3.asm...
- andoando 3y agoHow about for setting up a server and serving http requests / establishing web sockets? If it’s just a bunch of calling C code then I have to ask which part of this is actually assembly
- wavemode 3y agoTo be fair, from that perspective every backend web application in every language is really just "calling C code".
- CharlesW 3y agoI wonder if this is a practical project to distribute as an APE: https://justine.lol/ape.html https://justine.lol/ape.html
- true_pk 3y agoIn the header, there’s a button to disable live notifications. On a side note, showing a list of forum users to someone who isn’t logged in is probably a bad idea. Is it something configurable?
- davidcollantes 3y agoHaven’t found the button to disable live notifications while on mobile.
- tommek4077 3y agoWelcome to the internet young one. That is what forums do since forever. And probably configurable as well.
- jansommer 3y agoProcessing time is insanely fast according to the footer. But the time it takes to transfer the document to Denmark is 500 - 1000ms. Seems like a CDN is better than performant code in this case... Still an impressive feat.
- Morthor 3y agoI'm in the Azores islands, in the middle of the Atlantic Ocean, and it loaded in under 500ms.
- ugjka 3y agoLatvia here, 256ms according to FF
- Karrot_Kream 3y agoComing from leading response time initiatives at a Big Tech, ouch. 1s is painful. Obviously transit time is a big part of that but if that's considered "good", well oof.
- tazjin 3y agoWell your average big tech site might transfer in a fraction of that, but then spends >5 seconds running JavaScript before anything useful happens.
- Calavar 3y agoWhat, are you implying that staring at grey circle and square placeholders for 15 seconds isn't good user experience? That's crazy talk!
- bryan_w 3y agoYou see, the client side metrics has the transfer time at 2ms and time to first interaction (onMouseOver event) at 5ms, and that aligns with the developer's experience on his M3 Mac on a network that's literally next door to the servers. :(
- pengaru 3y agoDespite being someone who wrote x86 assembly for years on DOS in the 90s before learning C (and even continued in at&t syntax on Linux for some time), I find this to be a silly exercise in time wasting beyond its academic and comedic/entertainment value.
- tasn 3y agoThis is super cool, though I very much doubt the following statement: > AsmBB is very secure web application, because of the internal design and the reduced dependencies. There's a lot of value in using well tested dependencies, and even Chuck Norris will have bugs writing complex software in assembly. Especially when doing string manipulation which this project should be doing a lot of.
- stefanos82 3y agoWhen Chuck Norris writes complex software in assembly, bugs apologize to Chuck for letting themselves getting carried away, fix their erratic behavior, and promise to never let that happen again.
- abestic9 3y agoI was rubbed the wrong way with that line too, such claims usually set off red flags, but the OP appears to not write English natively so they might have legitimately missed out some tempering. e.g. "AsmBB focuses on security in its design and reduced reliance on dependencies."
- mgaunard 3y agoI disagree; dependencies are more of a liability than anything else.
- tasn 3y agoI can see this maybe being true in a high level language (depending on the dependency), though it's definitely not the case with assembly. OpenSSL, for example, was hit with quite a few serious bugs over the years, and I'd still choose using it than my own SSL implementation. Especially in assembly.
- throwup238 3y ago> OpenSSL, for example, was hit with quite a few serious bugs over the years, and I'd still choose using it than my own SSL implementation. Especially in assembly. That's the difference between a programmer and a real engineer: an engineer doesn't need any help from dependencies to make his code totally insecure.
- ChuckMcM 3y agoI like this, and kudos for going for assembly language. It is certainly true that reducing dependencies reduces the attack surface for something, that does not, in and of itself, make it "secure". But yes, in a probabilistic sort of way it reduces the chances of exploits. Of course assembly language has zero memory safety or other guarantees which probabilistically increases risk. I can't say if I think they balance out one way or the other. Still, I love me some assembly language applications. For extra credit transpile it to aarch64 and then you can run it on a Pi-Zero (or Pi-W) in a wall wart :-). I have been researching, off and on, distributed forums. As forums like the one created here became the "go to" after Usenet fell out of favor I have thought a replacement would have both the distribution/replication features of Usenet and the user experience of phpBB (the grandparent of most forum software). Making it distributed, and eventually consistent, is an excellent distributed systems challenge. So it is kind of like relaxing to a puzzle. If you, gentle reader, have written something along those lines I'd love to have a look.
- 10000truths 3y ago> Of course assembly language has zero memory safety or other guarantees which probabilistically increases risk. I can't say if I think they balance out one way or the other. I would posit that assembly + Linux kernel ABI is safer than the traditional C/C++ stack because they are not littered with nearly as much "undefined behavior". Signed arithmetic overflows and underflows as expected. Memory allocation with mmap + MAP_ANONYMOUS initializes it to 0 as expected. Accessing unmapped memory in your address space (including address 0) triggers a SIGSEGV as expected. Your assembler makes much fewer assumptions than your C compiler and doesn't try to be half as clever, so it's more likely to crash and burn on error instead of silently subverting your expectations.
- theturtle32 3y ago[flagged]
- Dwedit 3y agoHe's either bought the propaganda, or he's pretending to have bought the propaganda for safety reasons.
- da39a3ee 3y agoTrue, but it's a tricky time to point that out. Right now we'd have to boycott a large proportion of open source projects by Israeli and Arab/Iranian/etc authors if we wanted to avoid using any open source software written by people who support obscene and inhumane military actions.
- theturtle32 3y agoTrue. Worthwhile contemplating how to navigate this sort of thing.
- Aeolun 3y agoI don’t think there is any point in boycotting open-source software written by those people? If it was actually their source of income, then it might do something, but it’s already freely available.
- da39a3ee 3y agoIt influences the personal psychological state of people to see that they're being ostracized, especially if they are not accustomed to it, and hence statistically will lead some to some impact on the balance of public opinion and state positions via democratic and societal network mechanisms. I think that it's helpful to ensure that all Israeli authors understand that the majority of the western world is no longer prepared to excuse their country's barbarity, to the extent that they will shun projects by citizens. It may have less impact on Arab/Iranian etc supporters of radical anti-Israel military actions because they are already accustomed to being ostracized by the west.
- 3y ago
- David_FF 3y agoThis is interesting. The forum looks nice and loads quick for me. Great job
- kristianp 3y ago79.7 kB transferred. It's nice to see minimal pages being generated. Have to disable the notifications to see this result though.
- fasterik 3y agoYou could do something similar in C and forgo the standard library. No dependencies other than syscalls. I don't really see a compelling reason to do it in assembly other than as an intellectual exercise.
- travisgriggs 3y ago“In addition it supports Unicode Emoji characters in really native way.” I wish it would go into greater detail here. I’m unclear what “really native” implies, as opposed to some sort of “kind of native” way?
- jjice 3y agoJust spit balling here: some sites like Twitter have their own emoji sets and I wonder if they're saying that they don't do that and instead rely on the OS's normal rendering of emojis.
- hombre_fatal 3y agoDunno, asmBB also uses an emoji font set.
- lifthrasiir 3y agoIt seems that AsmBB has absolutely no Emoji processing in its asm code, so it's more or less pass-through. Realtime chat does have emoji highlighting in its JS code (a part of the template) though: function formatEmoji(text) { var emojiRegEx = /(\u00a9|\u00ae|[\u2000-\u3300]|\ud83c[\ud000-\udfff]|\ud83d[\ud000-\udfff]|\ud83e[\ud000-\udfff])/g; return text.replace(emojiRegEx, '<span class="emoji"><span>$1</span></span>'); } This probably meant to catch U+00A9, U+00AE, U+2000..3300 and U+1F000..1FBFF, which is by itself too broad, but also the regex itself is not a faithful translation. (If anyone is wondering the correct solution, just use emoji-regex [1] or more recent `/\p{RGI_Emoji}/v` pattern [2].) [1] https://unpkg.com/browse/emoji-regex/index.js https://unpkg.com/browse/emoji-regex/index.js [2] https://caniuse.com/mdn-javascript_builtins_regexp_unicodesets https://caniuse.com/mdn-javascript_builtins_regexp_unicodese...
- k__ 3y agoNext: Unikernel
- jansommer 3y agoYes please! Still waiting for unikernels to actually become a thing. Looks so promising, but Unikraft has yet to launch their cloud offering and NanoVM is 7$ per unikernel, which, compared to an always on shared Hetzner vCPU for ~4$ (knowing those two are not exactly the same) is kind of pricey... Would expect them to be cheaper or at least cost the same
- k__ 3y agoOh, I had the impression NanOS was free.
- jansommer 3y agoI think you're right, but I'm mostly interested in the cloud offerings. It's super hard to convince anyone to roll your own unikernel infrastructure
- eyberg 3y agoSorry - just now seeing this. We don't have any $7/unikernel offerings out there at all. We do have a desktop app that costs $7. As for your other comment - one of the really awesome things about unikernels is that you don't have to roll your own infrastructure. The way these are made is that all the infrastructure management is pushed onto the cloud of choice. I'd highly encourage you to if you haven't to download https://ops.city https://ops.city and try to deploy something to GCP or AWS or wherever - it's free and would answer a lot of questions/assumptions you might have.
- banq 3y ago[dead]
- beibeibei 3y agoNeeds X86 Linux hosting Won't run on nearlyfreespeech.net hosting
- kragen 3y agonot even under qemu-user?
- ijustlovemath 3y agoI'd be curious what the outcome of extensive fuzz testing would be. I'm sure there's many subtle bugs to be found!
- snvzz 3y agoMissing in the headline is which asm, or even what OS it runs under. "x86 asm" and "on linux" are combined not larger than than "assembly language".
- anta40 3y agoI wonder if there's a sort of "Ruby on Rails" clone in assembly? That sounds like a cool idea, but perhaps not that useful
- uticus 3y agoWhen can I ask ChatGPT to just code up everything in assembly, and forget about all languages?