/tech/ - Tech

Technology.

catalog
Mode: Reply
Name
E-mail
Subject
Message

Max message length: 8192

Files

Max file size: 20.00 MB

Max files: 3

Password

(used to delete files and postings)

Misc

Remember to follow the rules


Lets Make a Imageboard - /hobby/ edition Anonymous Comrade 10/31/2019 (Thu) 22:28:28 No. 2315
With the official locking of >>>/tech/ I'm moving my development log thread here. Feel free to ask questions, make comments, or pass on your suggestions. Much of the template is now complete, the CSS is responsive, usable on every browser that has rem support, and only 3815 bytes. There is still some work to be done which I'll mention in a reply following this. As it stands the plan is to start programming the back-end in OCaml this Monday leaving the finishing touches in the front-end for a later date.

front-end principles
The site should be minimalist. Adding elements unnecessarily makes everything more difficult to implement for and slower.

The site should be responsive. I don't own a device with a touchscreen, but they are omnipresent, and there is no reason that you shouldn't be able to use a website with your touchscreen device well.

The site should be compatible. I'd like to see support for more or less every desktop platform since ~2000 (this is easily done with MyPal PaleMoon, and TenFourFox) and more or less every "smart device" ever.

specifics
Text formatting should be subtle and compose as expected. There should be nothing that would feel be out of place in a book or article.

Web-fonts should not be used. Web-fonts don't improve the usability of the site but increase bandwidth usage and hinder performance for users.

JavaScript should only be used for progressive enhancements and as much of the site as possible should work without it. A Complete list of features which will require JavaScript are: automatic copying of text into the reply form, automatic refreshing of the page along with title notifications, and moving the second reply form.
>>2404
You don't encrypt passwords. you hash them. There is no reason for password data to be reversible, you should never be able to read them. You should only be able to verify that they're correct, which is what hashing does.
>>2405
>You don't encrypt passwords. you hash them. There is no reason for password data to be reversible, you should never be able to read them. You should only be able to verify that they're correct, which is what hashing does.
Oh, my bad, that makes sense. As I mentioned this isn't my area of expertise, I'll probably try to track down a book to read on web application security.
>>2406
You probably want to take a look at Lynxchan's source code, or Vichan's. I'm pretty sure they're not encrypting the IP addresses either. Yeah they're PHP and not OCaml, but they'll show you what to do on the database side.
>>2407
>You probably want to take a look at Lynxchan's source code, or Vichan's. I'm pretty sure they're not encrypting the IP addresses either. Yeah they're PHP and not OCaml, but they'll show you what to do on the database side.
I don't really like accepting any design decision without fully understanding why it was made and thinking about how it lines up with my objectives, so I think I'll probably have to read a book as I mentioned. I might be able to take a peak at some other imageboard engines to see if there is anything clever I'm missing in terms of my implementation though, yah.
>>2407
>You probably want to take a look at Lynxchan's source code, or Vichan's.
Most currently written IB software is pretty shit TBH, the source code for Vichan and offshoots is godawful.

most imageboard technology is stuck in the last decade
lynxchan uses mysql and alot of ib implementations of SQL databases are using 1 big god table for everything (no normalization).

The whole point of writing a new imageboard from scratch and not just making yet another crappy custom fork of Vichan is to rethink these design decisions, both technical, ui/ux, and site mechanics.

>>2407
>I'm pretty sure they're not encrypting the IP addresses either
well, they really should, because on a website where anyone can create a board, if you post on someones board one time the mods/vols can dox you. I don't trust BOs with PII like IP addresses as they are just randos from the internet like you and me. Why should they get to see my IP and geolocate me? At most the website owner/admin should see it.

>>2405
this, you should be hashing passwords (although that is common knowledge in web dev)
>>2409
lynxchan uses mongo*
interesting.
I have another question, how to implement the hover preview of quotes without JS (CSS only)? like for example when i quote op: >>2315 but also, there is the issue of "back links" i.e. posts that have been replied to also have a hover quote of the posts replying to it.

This is probably hard to do as CSS only?
>>2412
Back-references are trivial to implement without JavaScript, the hover display is tricky though I effectively decided against it my reasoning being here: >>2326
I basically slept all day today, and when I wasn't sleeping I might as well have been. So very little was accomplished today. I made some improvements to the code parser and a combinator called "string_till", but that's about it. The solution I thought I had to parsing plain text did not work. Despite this the parser should now work for all "well formed" data where opening tags are always closed at the scope they were opened with.
>>2413
what about forward-references?
the thing that shots like No. xxxx >>xxxx >>xxxx

i.e. it shows what posts have linked to it?
>>2415
>what about forward-references?
Oh, that's what I thought you meant by back-references. Yah, those should be trivial to implement in only HTML/CSS, and typically don't work without JavaScript for whatever reason. I was kinda out of it yesterday sorry.
>>2416
yes i mean there are back references (in the post) linking back to a previous post. However to the right of the post they are being linked to, it also shows a similar link to the post it is being quoted in
>>2417
That makes sense.
Today was slightly more productive than yesterday. I wrote a serializer from the AST to S-expressions using Faraday, and made some clean ups to the parser. I tried a few more tactics to try to get plain text parsing to work the way I want which failed, so I've resorted to asking on a (different) forum for advice. For those curious, I want to pass around a list of scoped text formatting rules for a few reasons, and Angstrom's fixed-point combinator doesn't seem to allow any means of doing this. I've also decided to change the stack a bit, I think I'll be using React instead of Lwt, and probably a template engine, and a custom Faraday serializer instead of TyXML. I also am probably going to be adding UUCP, Logs, and Mime-Magic as dependencies.
I like OCaml, it's very cool.
>>2420
>I like OCaml, it's very cool.
It has its fair share of issues UTF8, threads, documentation, ecosystem fragmentation, the standard library, etc. but I enjoy it quite a lot too.
>>2419
>using React
i thought you said you were gonna go minimal javascript? if you're going to use an SPA framework at least use mithril.js since its like a minimalistic one
https://mithril.js.org/
its way faster and smaller

>>2421
>>2420
Ocaml suffers the issue of bad multicore/concurrent support, same as any 1990s language. Its still a pretty good language, looks like haskell for example was very ocaml inspired
>>2422
>i thought you said you were gonna go minimal javascript? if you're going to use an SPA framework at least use mithril.js since its like a minimalistic one
Yes, I will be using minimal JavaScript (I don't plan on using any libraries, frameworks, etc.), I was referring to OCaml React here: https://erratique.ch/software/react/doc/React I'll probably still need lwt a little to do concurrent IO in front of http/af but other than that I'll probably just be using Functional Reactive Programming, which should result in cleaner software and significantly reduced development time at a extremely slight performance cost.

>Ocaml suffers the issue of bad multicore/concurrent support, same as any 1990s language. Its still a pretty good language, looks like haskell for example was very ocaml inspired
Concurrency support is actually quite good through async and lwt, also OCaml is actually 6 years younger than Haskell, although they have a common ancestor in SML, which Haskell is a bit more distantly related too. Also I'm not sure it's that common to have multicore support as non-existent as OCaml's (it's literally implemented as a global lock), luckily it is in the works though: https://github.com/ocaml-multicore/ocaml-multicore/wiki It is a pretty great language though despite its many faults.
>>2423
so hows the project going
what about [code][/code] style tags like they have on lainchan
>>2424
>so hows the project going
It's fine, as always I only really work on it on Monday and Tuesday, making small minor changes on other days, but I'm hoping to have HTML generation complete this following week. I recently with the help of a individual from another forum found a simple way around a problem I was having so I should be able to easily write the remaining features for the parser and also the HTML serializer. These remaining features being allowing the closing of a tag in a scope other than the one it started in and interpreting opening/closing tags without their closing/opening counterpart as plain text.

>>2425
>what about [code][/code] style tags like they have on lainchan
I'm not certain what you mean. I'm not super interested in syntax highlighting in the code blocks if that's what you mean. You can't do it right without having the user input what language they are writing, and it adds loads of extra elements necessary to make it work. Not to mention it is not possible to completely implement this feature as languages spring up all the time. If you mean the bbcode style tags I've thought about this, and I'd implement this style tag for code blocks if ``` turned out to appear too much in source code, which shouldn't be the case.
>>2426
on lainchan they do have syntax highlighting.
>>2427
>on lainchan they do have syntax highlighting.
Yes, I know. It works as I've described except if you don't provide a valid language annotation from the list: https://github.com/highlightjs/highlight.js/tree/master/src/languages it just uses a default which does inconsistent highlighting based on some common features across languages. In practice pretty much no one uses the annotations on that site so most of the syntax highlighting is broken and it requires the costly HTML tags and CSS tags necessary for it to work at all. Even when the annotation is provided it tends to produce quite ugly results, see: https://www.lainchan.org/test/res/368.html#920

Oh course it's always possible to do better than existing solutions. The costs are just too high to me though, the necessary decrease in efficiency, and the persistent cost of adding new languages, along with the requirement of users to add this annotation to their source blocks which in practice they don't seem willing to do just makes this feature undesirable to me. This is ignoring the fact that this is actually a rather time consuming thing to implement in the first place because you have to write a parser for every language you want to highlight.
>>2428
yeah maybe syntax highlighting is dumb, youre making an imageboard not an IDE

any thoughts on what sort of font you want to use for UX though?

serif or monospace?
>>2429
>Yeah maybe syntax highlighting is dumb, you're making an imageboard not an IDE.
It wasn't the worst idea.

>Any thoughts on what sort of font you want to use for UX though? Serif or Monospace?
At the moment I'm just using whatever the default Sans-Serif and Monospace fonts are for their various purposes. Other than not wanting web-fonts I'm not real picky on this, I'd be perfectly fine accepting whatever users or folks in this thread like (so long as I don't think it's too bad).
One step forward two steps back. It really doesn't seem possible to express the oddities of my markup language in Angstrom, additionally it lacks Unicode support meaning I can't really filter ranges of Unicode characters easily. I'll rewrite things in Ulex and Menhir. Supporting only Latin-1 and "properly formed" markup is not acceptable.
>>2431
As far as something actually productive goes, here's the global rule set I'm considering. I'm posting it here reluctantly as I know this is the type of thing which could derail the thread or push it in the wrong direction. Regardless it seems significant enough to post here despite this:
0. Do not discuss the spectacle.
1. Do not discuss identity. (where identity is a group association based on some social construct)
2. Do not respond to perceived wreckers.
3. Always post content in relevant existing threads before making your own.
4. Always argue in good faith and avoid using personal attacks.
5. Always elaborate on your opinions, and expand on your thread topics.
6. Always spoiler any NSFW content and make sure it's relevant to the discussion.
7. Do not post anything illegal in the country of Romania. (or wherever the host is located)
>>2432
are these the rules for the chan you're making?

and does ocaml really not have utf8 support?
>>2433
>are these the rules for the chan you're making?
Well, they are what I'm considering at least, they are subject to change either based on my own thoughts or feedback from you guys.

>and does ocaml really not have utf8 support?
OCaml has the Uchar.t type for individual Unicode characters and allows for Unicode escaping in strings such as "\u{1234}" but strings default to Latin-1 and the char type is only Latin-1. There are also libraries that add Unicode support like UUCP and Camomile, but none of this matters if a relevant library you're using doesn't support these things such as is the case with Angstrom. Ulex supports Unicode by implementing it themselves I believe.
(90.64 KB 1280x720 mpv-shot0016.jpg)
>>2432
>0. Do not discuss the spectacle.
>>2435
I'd typically ask you to expand on this so that I can understand your critique better, but instead I'll expand on my rule so that it's clear what this would mean in practice. The idea is that this rule would limit conversation of self-improvement in authentic creative tasks or discussion of ideas independent of the spectacle. This is clearly a clash of cultures with what is typically discussed, but there are communities which exist for this type of thing, so it's not unprecedented. I don't plan on mandating detournment or anything like that. In any case, it seem nearly every community does allow discussion of the spectacle, so for those that don't like this rule there are many other places for them to go.
would limit conversation to**
(360.90 KB 512x512 NO FUN.png)
>>2432
you missed a rule
>>2438
I can add this if it becomes too much of a issue. ツ
>>2439
>>2431
I hate to do this but I'm actually going to be implementing the 80% solution for now. I'll make a note file of how I should rewrite things in the future but here's a short list of the features that will be missing from the markup language until I circle back: UTF-8 support (currently only Latin-1), closing tags at a scope other than the one they started at, support for link schemes other than ftp, http, https, and gopher, and a number of whitespace optimizations such as converting repeated line breaks into paragraphs when possible, deleting tags that only effect the foreground when there is only whitespace in them, and converting all consecutive non-line breaking whitespace into a single space.

I'll polish up my Angstrom parser and implement a Faraday HTML serializer today or tomorrow to as I said earlier finish HTML generation by this week.
>>2441
based
>>2441
To maximize the part of my life authentically lived under normal circumstances I don't allow myself to use the internet except for to find answers to specific questions, or to download books, and I don't engage with entertainment at all. Over the past several months due to some stress in my life I've been enforcing the internet part of my rules less stringently than I would like. I'll be continuing development but dramatically slowing my dev-log. It's unlikely that questions asked here will be answered in any sort of timely fashion. I hope you all understand. Just for the record, I don't think Asceticism is in its self good, it's just a tool I use.
>>2443
wait so are you discontinuing development? i was planning on using this... :(
>>2444
No, "I'll be continuing development but dramatically slowing my dev-log." In other words I'll be programming the same amount but talking about it less. Also keep in mind it's going to take a while before it's competitive with existing engines, you'd probably be better off using those for the foreseeable future.
>>2315
I'm late to the game here, why was >>>/tech/ shut down?
>>2446
they said there wasn't enough activity, so they combined the non-leftypol boards other than GET into one single board
Bumping, op come back
hey I haven't read the thread, but, how hard is it?
>>2449
OP is trying to make a new imageboard sowftware, If you want to make oneyourself, try using LynxChan
It's amusing to me that the formatting on this site managed to become even more broken, and that this somehow managed to effect posts already stored in the database; this thread is hideous now. Anyway I made a good bit more progress on this project but decided to abandon it. My justification was that while the left needs to establish new hegemonic institutions, of which social-media is probably the strongest modern example, these institutions are worthless unless you're willing to use the power these institutions hold to enforce your will, and I simply don't have the time to realistically do this. Another issue is that the internet probably reflecting modern cultural trends (as promoted by the bourgeoisie) is hedonist and obsessed with the spectacle (not to mention least common denominator politics like social democracy), these cultural traits would be very difficult to overcome, and require rules that would be especially costly to enforce. For now I'm going to be focusing on improving my skills, I've recently been studying GADTs, existential types, type-level programming, eta-reduction and all sorts of interesting things in addition to my standard mathematics studies, hopefully my improved skills will be useful to us in the future. In any case, I will likely stop posting on this forum or any other forum, and it's fair to assume that any posts from this point on anywhere on the internet are not me. I wish you all the best, good bye. >>2449 >hey I haven't read the thread, but, how hard is it? It's a pretty simple web application, not particularly difficult so long as you don't obsesses over the details (which I tend to do). I'd only ever made two static sites before this and I was still able to make CSS that was superior to any imageboard I was able to find, and the backend was very clean if incomplete despite my programming experience having nothing to do with the internet. >>2450 >OP is trying to make a new imageboard sowftware, If you want to make one yourself, try using LynxChan. Just to be clear using LynxChan isn't creating a new image-board engine, which was my intent.
>>2451 Sad to hear that, good luck on your next projects anon tho >Just to be clear using LynxChan isn't creating a new image-board engine, which was my intent. Oh yeah I know, I was just telling him to use it if he wants to make a new imageboard
feature request make threads look good in firefox's reader mode
>>2453 lol nvm just saw this wasn't happening anymore RIP

Delete
Report

no cookies?