Coder Social home page Coder Social logo

srndv2's Introduction

srndv2

building:

go get -u -v github.com/majestrate/srndv2/cmd/nntpchan

srndv2's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

srndv2's Issues

UTF-8 and Subject: - header of article. NNTP

Here is RFC 3977:

o Header values SHOULD use US-ASCII or an encoding based on it, such
as RFC 2047 [RFC2047], until such time as another approach has
been standardised. At present, 8-bit encodings (including UTF-8)
SHOULD NOT be used because they are likely to cause
interoperability problems

UTF-8 SHOULD NOT be used without " =?utf-8?q?this is some text?=
But, This specification extends NNTP from US-ASCII to UTF-8.

Should we use =?utf-8?q??=

auto reload daemon on runtime after recompiling

Whenever I update i have to stop the daemon, git pull and recompile, the process is unacceptably too long.

I think we need a way to reload the daemon live via signal, i.e. SIGUSR1

Can't touch the running binary executable so this would require a wrapper program that loads/unloads a shared library module ? Some other way?

>>fffffffff ImageBoard links for NNTP transfer.

Hello. I am working at diploma about your nntpchan. It is Java implementation.

We have problem with links in messages, like this:
>>fc346a235
We need NNTP format for links => convertation from your local
articles:message_id_hash ... to ... global message-id of NNTP.
When you feed(peering) with NNTP.

I will public my full work when it will be completed. See you.

Rebase template generation

right now I use a global singleton instance for generating templates which is a piss poor implementation.

there are right now, models, templates, cache.

models are in memory instances that hold state but also can render themselves

templates are like views, they render models by wrapping a model's rendering

cache is just a cache

ideally I'd like to use a classical MVC architecture but this would require reworking most of the frontend code as it is now.

NNTP attachment Content-Disposition header.

You have broke something in new commits
with Content-Disposition recognition.
I have such:
Content-Disposition: attachment; filename="name.png"

You can't display thumbnail.
Look at test board.

Rate limits

When creating 100s posts at once, I received:

{"error":"pq: sorry, too many clients already"} && {"error":"pq: remaining connection slots are reserved for non-replication superuser connections"}

rate limit is fine but needs to be documented. Rate-limiting to one every 100ms seemed to get around this.

Do ping pong!

Send "500\n" or "говно\n" to maintain stream connection once in 1-2 min. Make it neatly. Do not send it in the middle of another transfer.

expire orphaned articles

when doing sync, sometimes the root post is expired before we can get it so we have a bunch of replies with no root post.

ideally if we can't resolve these root posts the orphaned replies should be expired.

Potential rounding issues

In the postgres driver there are several instances of
page / int64(perpage)
which are converted to int again. This may lead to problems with floating point precision.
This is especially true for
( count / 10 ) + 1
Let's say you have exactly 10 threads here, so with this code you may end up with the unexpected result of 2 pages.

The correct way to handle this, would be to use math.Ceil

use /usr/bin/identify to store information about thumbnail size

Network latency and slow nodes tend to cause pages to jump since loading an image of unknown height and width causes reflow.

/usr/bin/identify is an ImageMagick command that returns the name, file type, width x height, [some weird string that has the width and height in it], bit depth (?), color space (?), file size, [some thing I don't understand], [some thing I don't understand].

$ /usr/bin/identify nntpchan.png
nntpchan.png PNG 2508x2043 2508x2043+0+0 8-bit sRGB 282KB 0.000u 0:00.000

If this information can be provided to templates, it will help improve usability.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.