>>81 I'm so fucking confused. What does [br] do? Just inline another <br/>? I wish I had a list of bbcode inputs and html outputs to refer to. This project became a nightmare as soon as I entered the actual frontend of shiichan. Oh and I've implemented the over 1000 thread thing. If you look at the source of the threads with over 1000 threads, the post form is still there and you can unhide it by editing the html with firebug. I've seen over 1000 necros from as late as 2013, so there was someway to bypass the limit in shiichan. My current implementation hides the post form after 1000 posts and actually stops accepting posts at 1111 posts so you can get quints with a script if you want to. Maybe I'll introduce some randomness to get the same mysteriousness as shiichan.
it used to insert line BReak. That was really retarded.
Name:
Anonymous2014-07-15 20:42
>>82 I don't follow the thread, I just look at the latest replies, so I hope I'm not off-topic here. I think you are discussing old /prog/'s bbcode, right? In which case, to multiquote, the technique used was this: > foo[br]bar
which would appear as
foo bar
By the way, to escape bbcode, there's [#][/#] (which I just used twice to show to you once).
I need help /prog/. how can I write a regular expression in python that will find all matches for N regular expressions and perform a customized replacement for each given expression? I can't iterate the substitutions one after the other because the replaced strings will be matched.
tldr; I need to lex in python. How can I using the standard library?
Name:
Anonymous2014-07-17 22:46
>>91 why do python programmeres think everything about the world changes when using python?
I can never tell if the posts about "<exteremely common thing> in python" are trying to appeal to people who think anything written in python is somehow better or if they're just proud of themselves for getting anything done in that shitheap of a language.
tl;dr - lexing with regex = two problems, like everywhere else (except perl 6) - stop being a baby and lex how you would lex in any other language
Name:
Anonymous2014-07-17 23:45
[math] was a tag that just put the text in a <div>. If jsMath hadn't been totally broken because of an undefined variable (if I recall correctly, it loaded before the page body, thus had nothing to work with) it would have done interesting things. It worked fine in my unreleased experimental SuperW4ch userscript, where I loaded the imagereddit jsmath script instead.
Name:
Anonymous2014-07-18 0:23
>>92 If I was writing in c I would lex using a statemachine that was machine generated with lex or flex. But I'm using python instead of c. I could write the statemachine myself in python but it would be slow as fuck to do that kind of processing at the script level. The only thing I can think of would be to use multiple regular expressions and perform multiple passes and craft the expressions so they somehow don't substitute within each other, but it's difficult and opens doors for html injection if things go wrong. It's frustrating to have a library that can do regex but can't do this conveniently.
>>96 I took the easy route and decided to only detect hyperlinks beginning with a protocol. The range expressions are functioning as closely as I could emulate. I'm going to take a break from development for a while. If you have any changes you'd like to put in post a diff here or somewhere and I'll merge it in when I see it. You are also welcome to pull the code off the site and host your own. I believe the site is feature complete except for the subject page and json feed. I have no plans to implement a moderation interface and no ip addresses or identities are recorded in the database. Ip addresses still appear in logs though, so be aware of that. I'm not looking but someone else might.
fyi heliohost took away the sqlite3 module so w5ch.heliohost.org is broken until that dependency is removed. The admin user name is ``w5ch''. You can type that in to reactivate the account if it has been suspended from me not logging in once a month and looking at heliohost's advertisements in the admin interface.
There was a thread on /vip/ I was going to bump today. OP said he would check back in 3 years to see if his thread was on top. Now he's just going to see that the board is gone ;_;