Blazechan 0.12.0: Road to Decentralization

Blazechan
The blazing fast imageboard engine
---
Current version: v0.12.0
Changelog
The "No update since 'Smas" Update

Many, many things changed.
- The panel application was merged into the frontend. This marks the
beginning of the major refactor that will happen to Blazechan, making
its parts fully replacable.
- A new settings system has been created, which uses database-backed
setting schemas to control board and site settings.
- Many board settings were added. Some are currently non-functional,
but those are expected to be fixed within a few days.
- New capabilities were added to extensions which allows them to now
add their own board and site settings, and extensions can now hook
right before and after a post is created to hook their own database
models to posts.
- Reporting posts was added.
- Blazechan now uses Django 2.0.
- A new document caching system is used, which is application-level.
Varnish has been obsoleted and this new Redis-backed cache is used.
- Some unit tests were added to test the permission system. These will
be extended to test more of the software in the future.
- Thread Updates. This uses WebSocket channels to transfer updates in
realtime.
- A huge ton of bug fixes. Thanks to everyone who found them.

Upcoming Features
- Full Tor support, with .onion redirection
- Theming, User CSS and User JS support
- Purging old boards with no content
- User post deletion with password
- Possible IPFS caching of images.

Let's get this train rolling again, lads.
- m712

You can verify the above message at nextchan.org/.static/tech-blazechan-msg.txt , with the key 5C651718F47D3410A50590E10297E4EB514B1570

Attached: Screen Shot 2018-07-20 at 13.32.44.png (1280x720 143.17 KB, 656.01K)

Other urls found in this thread:

gitgud.io/blazechan/blazechan/
gitgud.io/blazechan/
nextchan.org/
gitgud.io/zuse/dietchan
gitgud.io/blazechan/blazechan/commit/f3b217b
gitgud.io/LynxChan/LynxChan/blob/master/src/be/engine/postingOps/common.js#L404-407
gitgud.io/LynxChan/LynxChan/commit/b955483cf80b79ff245d1d77b5f9c17962375a96
initd.org/psycopg/docs/install.html#binary-install-from-pypi>.
nextchan.org/.static/backend-contract.txt)
twitter.com/SFWRedditImages

Links
gitgud.io/blazechan/blazechan/ - The main repository
gitgud.io/blazechan/ - Contains the main repo and extensions
nextchan.org/ - Live instance

it's shit
the only good imageboard engines are written in bare metal assembly

So, nothing? :^)

It runs better than php

Anyone else getting a 502 bad gateway response?

My VPS can't handle all the stuff contained in it, so Blazechan dies from time to time. I restarted it, should work now.

thanks

Attached: 120832302.jpg (358x419, 24.5K)

gitgud.io/zuse/dietchan

Des it have users yet?

I just added an install script to Blazechan. It currently only works for Debian/Ubuntu because I need to look up package names for other distros, but that should be fixed fairly quickly.


It hasn't really been announced anywhere yet, so not that I know of. It's still not complete, but I'm working on it after a few months of necessary break.

kek, you couldn't even make a front-end for mewch.
What makes you think you are anywhere capable of making a whole engine?

gitgud.io/blazechan/blazechan/commit/f3b217b

The frontend is done, but had some issues. Mega rolled it early before enough testing was done. We'll put the frontend back after I fix the issues and it's tested.

Do you even know what "done" means?

Just don't create shit threads
What are bookmarks?
Just keep the tab open.
what?
Do you even know that you are a faggot?

It's Stephen.

ebin

Stephen Lynx? LOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOL.

Also,
Filters exist, you can put the post content in it for the timebeing
Do you wanna know how I know you're Sergio? You suck badly at naming shit. For example, the above statement makes no sense.

working on the logo as we speak

Oh seems like you want to go then.

gitgud.io/LynxChan/LynxChan/blob/master/src/be/engine/postingOps/common.js#L404-407 here, you can see that he's replacing [code] and [ /code] with and . Notice how he doesn't check at all whether two [code] [ /code] tags match. Of course this creates a problem: if you only post [code], then the rest of the page will be monospace.
And here's our golden boy Stephen's fix:
gitgud.io/LynxChan/LynxChan/commit/b955483cf80b79ff245d1d77b5f9c17962375a96
Not only does this reduce one's understanding of code, it also makes it harder to fix things down the line. This is the same engine which is supposed to be "an example to future imageboard developers" (his words, not mine).

And here you go sperging out about shit you don't even understand. I told you before, you don't even know why it doesn't matter if the tags are checked when posting. But I know you are physically unable to listen anyway, so keep on spergin'.

wow. that is cs grad meme tier

Please do enlighten us, o great Sergio, because as far I can see, it does matter apparently, since it needs a fix.

When you render a page, you might render it in a way that will take only PART of the post, because on board pages you cut the text. So only after you do that you can check what is matched or not.

lmao

That's a shitty justification. This would happen with any tag, and in fact it happens here (not sure if it's fixed) when a greentext is cut off. Why not check for all opening tags and close then recursively then? Why monkeypatch?

Because no other tag will cause issues if unmatched.

So apparently isn't a tag?
And this still doesn't change the fact that the fix is shitty, and should be done properly.

Sorry, but I don't have the time to get a stamp from the central office of Your Personal Autism.

You're more stubborn than a goat. I'm done with you.
Also, since thread watching and favorite boards were requested by no one but you, I won't do it. If more people want it, I'll do it.


:^)

What is the point of this argument? All imageboard engines are shit, no exceptions.

Attached: 1813.png (386x574, 185.59K)

True. It's all PHP, JS, Python, all trash.

Next up you'll tell us to install gentoo

Attached: 1461784264947-0.jpg (500x1048, 171.32K)

When I try to create a new board, I get Server Error (500).

Your commit list. Now.
didn't think so, faggot

Thanks, will look into it.

Are you Williamunaxy? You can log in to make a new board, I should check if a user exists before trying to create one.

Blazechan is currently undergoing a major refactor. This moves the non-datasource code into a new app, engine/, and also moves the frontend views and non-template code into the same app, effectively integrating the core of Blazechan closer together. This allows both backend and frontend to be easily replacable. The backend will implement a (currently in development) contract, which will allow you to use any backend you wish. For instance:
- NTTP/Overchan backend for Changolia
- Lynxchan database used as a Blazechan backend (with a shim)
- Vichan/Infinity backend with a shim
- Maybe something even more interesting
Additionally, extensions will now have a SQLite database that they will use to store their models. This is because since the data source is now agnostic you can't rely on a persistent database's existence (the backend may very well be a flat text file).
Please bare with me while I'm refactoring. No features will be implemented while the refactor is happening, but after that new features will be easier because the engine is more consistent.

Should be fixed. Can you try?

Please elaborate. You're using NTTPchan? ActivityPub? Diaspora? Zot? A custom protocol?

Read . I probably didn't include enough details in the OP, hence the confusion. My plan is to allow decentralization through pluggable backend so the data source can be distributed/federated.

I tried following the installation guide and got stuck at
>>> from panel.views.create import create_boardTraceback (most recent call last): File "", line 1, in ModuleNotFoundError: No module named 'panel'>>>

fixed this by stealing the right command from the install script, but now I'm stuck here
$ daphne -u /tmp/blaze.sock blazechan.asgi:application/home/owner/blazechan/.venv/lib/python3.6/site-packages/psycopg2/__init__.py:144: UserWarning: The psycopg2 wheel package will be renamed from release 2.8; in order to keep installing from binary please use "pip install psycopg2-binary" instead. For details see: initd.org/psycopg/docs/install.html#binary-install-from-pypi>. """)2018-07-24 04:33:38,863 INFO Starting server at unix:/tmp/blaze.sock2018-07-24 04:33:38,863 INFO HTTP/2 support not enabled (install the http2 and tls Twisted extras)2018-07-24 04:33:38,864 INFO Configuring endpoint unix:/tmp/blaze.sock^C2018-07-24 04:33:48,992 INFO Killed 0 pending application instances

The instructions are now outdated since the frontend and panel merged. Are you using a different distro from Debian? If not, the install script should help you. I should add package names for other distributions soon.

Looks like the server booted properly, you have nothing to worry about. You need to put it in a GNU screen (screen -S blaze), start it, and when the daphne output stops you can exit the screen using C-a C-d. When you want to come back just do screen -r b (any prefix works).

How long should I be waiting for? Minutes?
It never proceeds past 2018-07-24 05:25:40,783 INFO Configuring endpoint unix:/tmp/blazechan.sock

That means it already started and you don't have to do anything, just exit the screen. You can now configure/start nginx and it should work.

Is frontend/static/vendor supposed to have nothing in it?

Yes, since vendor files are now pulled by django-npm automatically when you do ./manage.py collectstatic.

what the fuck is wrong with you retards

Attached: DfHlbIVX0AAZCg8.jpg (597x434, 18.92K)

The only retard here is you.

finish up hs first then come back

You're low functioning.

durrrrr

Attached: DcoyWbWX0AAPdt6.jpg (500x275, 19.28K)

*to benefit you

Attached: 081e9969b9e10fc2b4a9af30571f1f6c515ee2c34b014696033ca6ad1150a16b.png (600x560, 408.93K)

Yes user this is part of what not being an autistic fuckwit is about.

You don't need to attach your real name to the work to use it in your portfolio you stupid cunt.

great idea retard

Just admit that you don't have any contributions, user. Nobody will judge you.

No. That feature still hasn't been implemented.

0.14.0 planned feature.

Attached: DX5P0TEXUAASgQi.jpg (500x664, 62.11K)

Into the trash it goes.
Someone port it to glibc

I like the logo.

I'm halfway through defining the interfaces the backend will implement. There is a small problem, though: zope.interface (the interface library I'm using can't distinguish static methods from normal methods, but you can work around it by using @classmethod and making the first argument _ or something. If more issues arise, I'll switch to using native ABCs.
Other than that, I'm going through the entire codebase of Blazechan to find places where I used the queryset API and replacing them with functions, and boy is it tedious. But for s good cause. Hopefully I don't get too burnt out so I can finish it.

So this is clearly all pebcak/configuration errors, but why are the cached assets returning 404?

Attached: Screenshot from 2018-07-24 16-07-05.png (1304x916, 108.33K)

Is this ./manage.py runserver or nginx? Did you do ./manage.py collectstatic?

I did ./manage.py collectstatic, and this is nginx

$ ls /srv/http/static/channels css debug_toolbar img js rest_framework vendor
CACHE does not exist for whatever reason

Hmm... Did you setup the static dir in .env correctly?

STATIC_ROOT="/srv/http/static/"

Just in case that was the issue, I changed it to /srv/http/blazechan/static, and changed the nginx config to match, re-ran ./manage.py collectstatic
cached assets are still the only thing 404ing, with /srv/http/blazechan/static/CACHE not existing

Attached: Screenshot from 2018-07-24 16-27-19.png (1303x914, 108.83K)

It's weird that it's not generating. Can you post your complete .env (you can omit the DB stuff and the secret key)? Also, can you do "redis-cli" then "keys *compressor*" and post the output of that?

Can you check storage/log.err just to make sure? Maybe there's some indicator there.

DEBUG=TrueDEBUG_IPS="127.0.0.1"HOSTNAMES="localhost"STATIC_ROOT="/srv/http/blazechan/static/"COMPRESS_ENABLED=TrueYUI_COMPRESSOR="yuicompressor"

Oh, and just to make sure, the user you're running blazechan (daphne) as has write permissions to the static dir, right?

[owner@Owner-PC ~]$ redis-cli 127.0.0.1:6379> keys *compressor(empty list or set)

I assume blazechan resides in /srv/http/blazechan/?
"keys *compressor*", with a leading * too

127.0.0.1:6379> keys *compressor*1) ":1:django_compressor.templatetag.3aef0a4b0cc5.file.css"2) ":1:django_compressor.templatetag.11203c0f7655.file.js"3) ":1:django_compressor.templatetag.11203c0f7655.file.css"4) ":1:django_compressor.templatetag.32e893f513d6.file.js"5) ":1:django_compressor.templatetag.d04b6a438de5.file.js"6) ":1:django_compressor.templatetag.f8b240d0fef7.file.css"

can you try copying one of those keys and trying to get its contents with "get (key name)"? It should be a bunch of \xYY and something like

oh I'm retarded nvm

127.0.0.1:6379> get :1:django_compressor.templatetag.3aef0a4b0cc5.file.css"\x80\x04\x95d\x00\x00\x00\x00\x00\x00\x00\x8cT\x94GA\xd6\xdf\x93''\xb5=\x89\x87\x94."

Can you check the error logs in storage/log.err? Maybe post the complete thing if it exists?

$ cat storage/log.err [2018-07-24 06:26:48,545] ERROR exception: Invalid HTTP_HOST header: '127.0.0.1'. You may need to add '127.0.0.1' to ALLOWED_HOSTS.
that's the entire file

What about storage/log.info?

same contents

This is certainly an enigma. Do you mind joining #nextchan on irc.rizon.org so we can figure this out?

bump

...

Sorry for the long absence. My day job started taking a long part of my day, and also I worked on some other project with some guys. I moved almost all the code into the 'engine' app, leaving 'backend' with the models and migrations only (migrations will be an implementation detail later on) and the frontend with templates only. I'm currently spec-ing out the backend contract that the backend needs to implement to talk to the engine. Let's hope this goes through... (Post body too long, here's the current draft of the spec: nextchan.org/.static/backend-contract.txt)
Mind you, it's still very incomplete because I'm generating the specs as I read through and adjust the code, but now that I have more free time I hope to bring things back on track. Only the views are left to do the raw Django ORM -> backend contract calls conversion, and then after that I'll be checking the templates for what members are needed.
Also, I thought about it a little, and not all backends that Blazechan plans to support supports all the features of a centralized data-source. So, I'll be implementing some way for the backend to tell the engine what features it has and what it's missing, and the engine can optionally turn off some features if the backend doesn't support it.
And finally, I decided to drop the zope.interface library for implementing the contracts because it's too complex and unnecessary for what I need. I'll be using simple base classes.
That's all for now, stay tuned.

...

I remember the first blazechan thread you made and have been following this since. Good job man it's amazing to see this grow as a project

before I consider using your engine I need to know what's your opinion on the jews

The more I argued with them the more I learned their dialectic. At first they calculated on the stupidity of their adversary.
Then, when they could find no other way out, they played stupid themselves. ...Whenever you attacked one of the
apostles, your hand closed around slimy matter which immediately separated and slipped through the fingers and the
next moment reconstituted itself. If you struck such an annihilating blow that, observed by the audience, he had no
choice but to agree with you, and thus you thought you had taken one step forward, the next day your amazement would
be great. The Jew knew nothing at all about yesterday and repeated his same old twaddle as though nothing had
happened; if you angrily challenged him on this, he could not remember a thing other than he had demonstrated the
correctness of his assertions on the previous day.
Many times I stood there astonished.
I didn’t know what to be more amazed at: their verbal agility or their art in lying.
Gradually, I began to hate them.

But what architecture?

Okay, after long fucking last I was able to allocate some time into working on Blazechan. I finished the interface specification, and significantly reduced the amount of models needed to implement (you only need 3 now, Author, Board & Post), since most are used on client- (well, server-) side only and aren't needed in the backend. I'm currently in the process of trying to migrate all the models (except the ones in the interface spec) in the backend to the engine without breaking the project, hopefully I won't break my local install.

Attached: a68.png (520x678, 301.09K)

Your own.
Physical assembly, not some bullshit abstraction.
Zig Forums INSERTS BITS ONE BY ONE MANUALLY

Oof