Web

Last edit

Geändert: 2c2

< &lt;journal "^\d\d\d\d-\d\d-\d\d.*Web"&gt;

stattdessen:

> <journal search tag:web>


Stuff about the world wide web (WWW): Structure, history, weirdness.

2015-06-14 Go Oddmuse

Sometimes I wonder whether I should move Oddmuse away from Perl 5 to something else. Something I would like to learn. An opportunity to redo everything, from scratch. Not many people are using Oddmuse, so I might as well write something else, for myself.

I recently read Writing Web Applications for Go, where they develop a simple wiki. I wondered about storing the data in a git repository. I found git2go. Hm…

Tags: RSS RSS RSS

Comments on 2015-06-14 Go Oddmuse

Last edit

Summary: It's also cool to look at the TinyWiki source code again and rediscover why I rewrote the Usemod Wiki style search and replace code with the extensible state machine code we have right now.

Added:

> ----
> [[gravatar: Alex Schroeder:e33b88db6bc04e1c93db25c702baea28]]
> It's also cool to look at [http://perldesignpatterns.com/?self the TinyWiki source code] again and rediscover why I rewrote the Usemod Wiki style search and replace code with the extensible state machine code we have right now.
> -- Alex Schroeder 2015-06-16 08:00 UTC


Perl 6 is an obvious candidate. And yes, they did not just change print ‘x’ to print(’x’) like they did in Python, it is a completely new language that you have to learn.

Speaking of Go, there is a great video called Perl 6 for Mere Mortals, and here is a direct link to a part of it which is somehow :) related to Go. That’s not a meaningful comparison, but it should give you the idea. You can also watch that video from the beginning, it is very interesting if you have not investigated into Perl 6 yet.

Now, if we think about all of the languages out there, what are the actual features that are required for Oddmuse?

Well, since Oddmuse is all about parsing the wiki text, you need some tools for parsing. Perl 5 has regexes (um, okay), Perl 6 has grammars (exactly what we need!), and Go has something as well (like this, which is, again, verbose as hell), but I’m not an expert. You can also use libs, but having a built-in support is probably advantageous.

Somehow I can’t really think of any other criteria, everything else probably exists in every other language out there. You might also say “performance” but the only website suffering from that is probably emacswiki, and it all depends on your actual goals – for example, better execution time can be achieved by using concurrency, which does not really lead to better CPU time. Concurrency in Perl 6 – yes (but maybe just a bit flaky at the moment), performance in Perl 6 – well, not now, but the potential is there (i.e. gradual typing).

In other words: what is the motivation? “Just to learn” is not going to get you anywhere, not even make you learn something (learning to find reasons for doing stuff (i.e. causation) is part of the learning, doing stuff purposelessly is harmful to the thinking process).

AlexDaniel 2015-06-14 14:05 UTC



Alex Schroeder
Perhaps Go just makes me want to delve into the low level stuff. I like the post about Handwritten Parsers & Lexers in Go. :)

I keep thinking about all the design decisions. Filenames are pagenames. Namespaces are subdirectories. Can we switch to “git first”? No more log files. We no longer need keep files. How would modules work? Would you simply recompile the wiki? Dynamic linking? Would I want to use a templating architecture? People seem to like that. Was “printing as we go” a good decision? Perhaps it no longer matters much.

I need to think about extensibility of Cajun, the Wiki Creole lexer and parser.

– Alex Schroeder


These are very good questions. Maybe you should write down these ideas on Oddmuse: Revolutionary Changes.

  • “git first” – Yea, but… This would effectively break the goal of having one script file that just works (and I think that this is more important than having no recent changes and keep files logic in the core).
  • “How would modules work? Would you simply recompile the wiki?” – this would effectively throw away all of the nice things like Module Updater or Module Bisect (or at least make them much harder to implement). It will also break the potential of a few other ideas that keep floating in my head. In other words, “simply recompile the wiki” is not that simple.
  • “Would I want to use a templating architecture? People seem to like that.” Yea, but… It seems like if we switch to Perl6 then the core will collapse into a small piece of code with all of the irrelevant stuff separated into grammars or other classes, or maybe just tiny subroutines. Which brings us to the next point…
  • “Was “printing as we go” a good decision? Perhaps it no longer matters much.” – Good decision, but it really depends on your understanding of “as we go”. For example, what if we parse the wiki text first, before printing anything except the header? Then, once we start processing the parsed text, we can print stuff as we go. That’s exactly how it will work in perl6 (at least, that’s the easiest way) – first you slam the wiki text into your grammar and wait for it to be processed (oh by the way, while this is happening you can actually do other stuff asynchronously, like start reading the tag index or whatever). Then, when your wikitext is parsed, you can start deciding what to print now. And this is so much better than what we have now. Want to print table of contents? Just take the required information from the match object, no need for dirty hacks. In other words, in perl6 it is very easy to have parsing and actions separately, which is beneficial in many ways. But at the same time, once you start processing the actions you can start printing as you go (which makes sense, what if there is some complex search stuff included on the page, you’d probably want to see at least half of the page while this is going).

AlexDaniel 2015-06-16 00:22 UTC


And yeah, if you are seriously thinking about Go, what if we make a comparison table with Perl6 and Go, and the relevant language features? Both of the languages have some interesting stuff to offer, for example Perl6 to JS and Go to JS. And there are definitely some winning points for Go, especially associated with execution time and maturity.

AlexDaniel 2015-06-16 00:31 UTC



Alex Schroeder
Hehe, I think you and Oddmuse: Revolutionary Changes is what started this all! I looked at Oddmuse as a “mission accomplished” project. With the migration of Emacs Wiki I’ve realized that a big site might want to serve its own pages without running a web server. I tried to understand PSGI/Plack in order to have Perl run Oddmuse like a web application. When I saw the wiki tutorial for Go, and how I got a web server up and running in no time, and how easy it was to include some basic markup, I was thrilled! Sure, the code doesn’t have a lot of features. But it beats the SmallestWiki candidates. :)

You arguments in favor of some of the core architecture decisions made for Oddmuse are good – and your hopes for Perl 6 and improved parsing are infectious! I’m very much looking forward to Perl 6.

– Alex Schroeder 2015-06-16 06:02 UTC



Alex Schroeder
It’s also cool to look at the TinyWiki source code again and rediscover why I rewrote the Usemod Wiki style search and replace code with the extensible state machine code we have right now.

– Alex Schroeder 2015-06-16 08:00 UTC

Add Comment

2015-05-31 Redirection

Redirection good. Broken links bad. Cool URIs don't change.

Web Decay Graph. “This is a very sad graph.” – Tim Bray

Tags: RSS

Comments on 2015-05-31 Redirection

Last edit

No diff available.

Add Comment

2015-05-20 logjam

Guide to Deploying Diffie-Hellman for TLS.

OK, so apparently I need to look my site’s setup again. I hate these sysadmin problems. I would love to not worry about security issues, trusting my GNU/Linux distro to simply do the right thing. But it can’t upgrade my sites SSL setup. Currently the architecture does no allow that. Each site has config files, each site has its own certificates.

I should probably automate this in some way.

Tags: RSS

Comments on 2015-05-20 logjam

Last edit

Summary: Here's how to secure your browser, in German.

Changed:

< Here's how to secure your browser, [http://kubieziel.de/blog/archives/1595-Browser-gegen-LogJam-absichern.html in German].

to

> Here's how to secure your browser, [http://kubieziel.de/blog/archives/1595-Browser-gegen-LogJam-absichern.html in German]:
> # in Firefox, visit about:config
> # search for ##.dhe##
> # disable them all
> For Chrome, the solution is more involved and requires you to visit [https://cc.dcsec.uni-hannover.de/ this page] in order to find the spec of the cyphers you want to disable and to start Chrome with the ##--cipher-suite-blacklist## parameter in order to blacklist the cyphers you provide.


Hm, probably this https://letsencrypt.org/ ?

You’d have to wait for it though.

AlexDaniel 2015-05-20 21:23 UTC



Alex Schroeder
Here’s how to secure your browser, in German:

  1. in Firefox, visit about:config
  2. search for .dhe
  3. disable them all

For Chrome, the solution is more involved and requires you to visit this page in order to find the spec of the cyphers you want to disable and to start Chrome with the --cipher-suite-blacklist parameter in order to blacklist the cyphers you provide.

– Alex Schroeder 2015-05-21 05:38 UTC

Add Comment

2015-04-02 Other People

Today I saw two posts on Google+ I found interesting. In the first, Rob said that he would like to finance a zine in order to get all the news but not “the Internet”. I said that back when we all just had websites and used ftp to post new stuff the Internet was a peaceful place! :)

I wonder about browser extension that hides all the comments, everywhere. I think those are the source of all grief. Yes, it’s sad! I know of the Herp Derp extension for YouTube. I’m sure there are others!

In another post, people were discussing how we react to provocative posts by others. What if they disabled comments? Are we happy because it saves us from wasting our energy? Are we incensed because the medium implies that we’ll only post what we’re also willing to discuss? That’s certainly how I feel! For myself, this is my daily Google+ challenge: not to post any political stuff. For if I did, I wouldn’t want to read the counterpoints. I still feel the need to rant, though! What to do? Because I also hate posts where I cannot comment, I don’t want to post and disable comments. My solution is to keep the political stuff on Twitter. There, I retweet a lot. Or I’ll write a few well chosen words, add a link and post it. If I’m interested in reading the opinions of others, I can follow them on Twitter and read the stuff they link to. Perfect! I remember people saying that 140 characters was not enough. But now I’m seeing that on G+, having more characters doesn’t improve the experience of politics and religion.

Tags: RSS

Comments on 2015-04-02 Other People

Last edit

No diff available.

Add Comment

2015-01-20 Caching

I’m trying to figure out how to use mod_cache. The following in my VirtualHost section doesn’t seem to make a difference. The wiki is still getting invoked.

    CacheEnable mem /wiki/feed/full/RPG
    MCacheSize        100000000
    MCacheMaxObjectSize 1000000
    

(This RSS file is about 99k.)

The wiki is logging these requests to a file and I’m requesting the URL from the command-line using curl. Hm, must investigate later.

Tried adding this:

    CacheEnable mem /wiki/feed/full/
    MCacheMaxStreamingBuffer 1000000

No effect.

Tried replacing it with:

    CacheEnable disk /wiki/feed/full/RPG

No effect.

Giving up. Damn you, mod_cache.

Tags: RSS RSS

Comments on 2015-01-20 Caching

Last edit

No diff available.

Add Comment

2014-11-13 Chrome and this Wiki

I’ve been using Chrome for a day now and this wiki doesn’t look as good as it does using Firefox, on Windows.

  1. The emoji at the bottom are mostly unsupported.
  2. The bold text (“fix typos” and “updates by email”) is fuzzy at the bottom.
  3. The anti-aliasing doesn’t look good (c, e, r, etc.) at the default size (Ctrl 0).

Something about the fonts is not making me happy.

Googling… Stackoverflow has something about webfonts, anti-aliasing, and a note that 37 will fix this. I guess I hadn’t used Chrome in a long time. Let’s see whether an update fixes this.

Restarting… I am not impressed. :(

Adding Symbola to the site and to the CSS.

Fiddling some more. Increased the font size. Getting rid of Arial Narrow or whatever it was for header and footer. Getting rid of bold for the moment and replacing it with small caps. WTF am I doing!?

Unhappy… Noticia Text by JM Solé? Should I use the webfonts from the Google network or serve from my own server? More traces being left behind…

Built sfnt2woff to convert ttf files to woff. The files are significantly smaller, now. Using Noticia Text and Symbola by George Douros (for the smileys). Everything seems to work on Chrome. Now anti-aliasing for the header and footer looks a bit crummy on Firefox (Windows). Wow. Such pain.

At home… Things look pretty good on Firefox (OSX). Oh well. I think this is going to be the new look for a while.

Hop on the time machine!

  1. 2011
  2. 2012
  3. 2013
  4. 2014

Tags: RSS

Comments on 2014-11-13 Chrome and this Wiki

Last edit

Summary: I think I will remove all those emoji from the footer and just install smiles.pl – those should always work! :)

Changed:

< I think I will remove all those emoji from the footer and just install [http://git.savannah.gnu.org/cgit/oddmuse.git/plain/modules/smiles.pl smiles.pl] -- those should always work! :-)

to

> I think I will remove all those emoji from the footer and just install [http://git.savannah.gnu.org/cgit/oddmuse.git/plain/modules/smiles.pl smiles.pl] -- those should always work! :)


Iceweasel on Linux, gotobar looks awful after your recent changes (wrapping):

http://files.progarm.org/2014-11-14-164928_993x71_scrot.png

And I’ve always had this:

http://files.progarm.org/2014-11-14-165014_1149x107_scrot.png

AlexDaniel 2014-11-14 14:56 UTC



Alex Schroeder
The gotobar looks OK? Perhaps it was pure chance that it didn’t wrap with the previous font size (and using a narrow font). I wonder why you’re not getting more emojis. I though Symbola had them all covered. Oh well.

– Alex Schroeder 2014-11-14 16:08 UTC


No, it is distracting. If you change the width of the input fields to 8ex then it will not wrap. Alternatively you can make “Search” and “Matching Pages” text smaller. But please, stop this line wrapping thing. Maybe I could live with it if “Matching pages” thing was under “Search”, but having input fields on the left and on the right just bugs me.

AlexDaniel 2014-11-14 22:06 UTC



Alex Schroeder
OK, second attempt: keeping search and matching pages together.

– Alex Schroeder 2014-11-15 07:35 UTC



AlexSchroeder
I don’t like the result on my phone. Argh.

AlexSchroeder 2014-11-15 12:59 UTC


Alright, that’s better!

But maybe you should increase line spacing a little bit? So that search field does not get so much into gotobar buttons. That would be perfect!

http://files.progarm.org/2014-11-16-035159_618x66_scrot.png

AlexDaniel 2014-11-16 01:58 UTC


I’m not sure whether d0cdd4 was supposed to fix smileys, but they are still not showing up.

AlexDaniel 2015-01-19 00:40 UTC


Hm, they are showing up on my system…

https://i.imgur.com/WNWVG8Y.png

You linked to a change of an Oddmuse CSS, but this site uses the same solution, I think. Specifying the Symbola font as the fallback.

– Alex Schroeder 2015-01-19 10:07 UTC


It seems like Symbola font is not being loaded at all. Weird.

AlexDaniel 2015-01-19 12:06 UTC


Hm, but you can access the font via its URL? https://alexschroeder.ch/fonts/Symbola.ttf

– Alex Schroeder 2015-01-19 13:23 UTC


Sure.

Does it work for you in firefox? I mean, can you see Symbola font being loaded in the Network tab in the developer tools? (with ctrl+f5)

AlexDaniel 2015-01-20 02:27 UTC



AlexSchroeder
No, because I have installed it locally. I can see all the characters on my iPhone 4, however. That must mean it manages to download the font, right?

AlexSchroeder 2015-01-20 11:27 UTC


Hm. Deleted the font, used Chrome, and now I see how it no longer works. D’oh! I see, however, that Symbola.woff is being downloaded, with a Status 200. The response header looks OK as well.

HTTP/1.1 200 OK
Date: Tue, 20 Jan 2015 11:31:14 GMT
Server: Apache
Last-Modified: Thu, 13 Nov 2014 09:37:03 GMT
Accept-Ranges: bytes
Content-Length: 18608
Cache-Control: max-age=3600
Expires: Tue, 20 Jan 2015 12:31:14 GMT
Keep-Alive: timeout=5, max=98
Connection: Keep-Alive
Content-Type: application/x-font-woff

– Alex Schroeder 2015-01-20 11:33 UTC



AlexSchroeder
The font is still not installed locally. Trying Firefox. I see that the font is not downloaded – but the characters display correctly with the sole exception of 🐋. WTF.

AlexSchroeder 2015-01-20 11:35 UTC



AlexSchroeder
In addition to that, Firefox seems not to be using the Noticia Text font. I don’t know what’s going wrong today but something’s wrong.

AlexSchroeder 2015-01-20 11:43 UTC


I think I will remove all those emoji from the footer and just install smiles.pl – those should always work! :)

– Alex Schroeder 2015-01-20 12:06 UTC

Add Comment

2014-10-15 fail2ban

My server has fail2ban installed.

“Fail2ban scans log files (e.g. /var/log/apache/error_log) and bans IPs that show the malicious signs – too many password failures, seeking for exploits, etc. Generally Fail2Ban is then used to update firewall rules to reject the IP addresses for a specified amount of time, although any arbitrary other action (e.g. sending an email) could also be configured. Out of the box Fail2Ban comes with filters for various services (apache, courier, ssh, etc).”

Ever since I installed fail2ban, it showed no activity. Until now. Weird!

https://farm4.staticflickr.com/3946/15538247161_b9e7e00bc1_o.png

Is this due to the Shellshock vulnerability? First public disclosure 2014-09-24, activity starting 2014-10-06. It’s weird, though. I thought Shellshock would involve bash scripts as CGI scripts, called via Apache but these failures are ordinary SSH login attempts as seen on /var/log/auth.log:

Oct 13 11:49:38 alexschroeder sshd[6860]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=222.186.56.33  user=root
Oct 13 11:49:40 alexschroeder sshd[6860]: Failed password for root from 222.186.56.33 port 3462 ssh2
Oct 13 11:49:43 alexschroeder sshd[6860]: Failed password for root from 222.186.56.33 port 3462 ssh2
Oct 13 11:49:45 alexschroeder sshd[6860]: Failed password for root from 222.186.56.33 port 3462 ssh2
Oct 13 11:49:45 alexschroeder sshd[6860]: PAM 2 more authentication failures; logname= uid=0 euid=0 tty=ssh ruser= rhost=222.186.56.33  user=root
Oct 13 11:49:50 alexschroeder sshd[6864]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=222.186.56.33  user=root
Oct 13 11:49:51 alexschroeder sshd[6864]: Failed password for root from 222.186.56.33 port 4067 ssh2
Oct 13 11:49:54 alexschroeder sshd[6864]: Failed password for root from 222.186.56.33 port 4067 ssh2
Oct 13 11:49:56 alexschroeder sshd[6864]: Failed password for root from 222.186.56.33 port 4067 ssh2
Oct 13 11:49:56 alexschroeder sshd[6864]: PAM 2 more authentication failures; logname= uid=0 euid=0 tty=ssh ruser= rhost=222.186.56.33  user=root

Tags: RSS

Comments on 2014-10-15 fail2ban

Last edit

No diff available.

Add Comment

2014-09-12 Die Wanderungen in Sozialen Medien

Bin wieder am Rumstudieren wegen sozialen Medien. Politisches Zeug und so passiert bei mir vor allem auf Twitter, aber die bringen immer mehr so Facebook Ideen. Grössere Grafiken war ja OK, aber jetzt gibt es immer mehr Werbetweets und neu wollen sie auch beliebte Beiträge von fremden Leuten einblenden, oder gewisse Tweets ausblenden, eben der ganze Scheiss, der hier auf Facebook auch passiert. Und so frage ich mich natürlich: Was gibt es für Alternativen?

Da wäre mal App.net – aber die haben in ihren Terms of Service eine schreckliche Passage drinnen: “You agree to defend, indemnify and hold us harmless from and against any and all costs, damages, liabilities, and expenses (including attorneys’ fees, costs, penalties, interest and disbursements) we incur in relation to, arising from, or for the purpose of avoiding, any claim or demand from a third party relating to your use of the Service or the use of the Service by any person using your account, including any claim that your use of the Service violates any applicable law or regulation, or the rights of any third party, and/or your violation of these Terms.”

Grauenhaft! Aber eigentlich wäre es cool: Kostet $36/Jahr und hat dafür garantiert keine Werbung und ein vernünftiges Business Modell.

Dann meldet sich mein Sinn für freie Software und flüstert: Wenn ich schon wechsel, warum nicht auf GNU Social? Zum Beispiel bei Load Average oder GNU Social Deutschland? Und so bin ich am Pröbelen…

Auf alle Fälle muss man sich keine Illusionen machen: Die allermeisten Freunde folgen einem ja nicht zu neuen Medien. Man muss einfach dort neue Freunde finden. Das muss ja eigentlich gehen! Ich bin da optimistisch.

Über mein Rollenspielhobby schreibe ich übrigens vor allem auf Google+ – irgendwann sind die Leute von Twitter einfach massenhaft ausgewandert. Das war ein seltsames Phänomen.

Wer schon dort ist, sagt Hallo! 😜

Tags: RSS RSS RSS

Comments on 2014-09-12 Die Wanderungen in Sozialen Medien

Last edit

No diff available.

Add Comment

2014-09-10 Twitter Alternatives

Twitter recently updated their Privacy Policy and Terms of Service to allow us to buy merchandise from “some of the most popular names on Twitter”, without leaving “the Twitter experience”. Yay!? In one of my anti-capitalist urges, I decided to take another look at Twitter alternatives.

As far as I can tell, there is App.net and GNU Social (formerly Status Net).

App.net offers a Twitter-like experience, API access, and no ads but it costs. The free option offers, 500MB of file storage and following up to 40 accounts (plenty to get started). Upgrading costs $36/year, which is an OK price but I pay just $25/year for my Flickr Pro account… The default client you download, called App.net on my phone, also gives you a totally confusing non-Twitter experience involving Broadcast. I had no idea what this was and switched to Riposte.

Then I discovered the following passage in the App.net Terms of Service:

You agree to defend, indemnify and hold us harmless from and against any and all costs, damages, liabilities, and expenses (including attorneys’ fees, costs, penalties, interest and disbursements) we incur in relation to, arising from, or for the purpose of avoiding, any claim or demand from a third party relating to your use of the Service or the use of the Service by any person using your account, including any claim that your use of the Service violates any applicable law or regulation, or the rights of any third party, and/or your violation of these Terms.

I don’t think I can use this service! Specially considering this:

These Terms and any action related thereto will be governed by the laws of the State of California without regard to or application of its conflict of law provisions or your state or country of residence. All claims, legal proceedings or litigation arising in connection with the Services will be brought solely in the federal or state courts located in San Francisco County, California, United States, and you consent to the jurisdiction of and venue in such courts and waive any objection as to inconvenient forum.

Remember the abominable, cruel and unusual punishment called Three Strikes? No thank you! If I can choose, California is unacceptable.

So what about the alternative? That would be GNU Social. Now I need to decide whether I want to install my own instance or whether to join an existing server. For now, I’m kensanata on Load Average, one of the existing services.

Tags: RSS RSS

Comments on 2014-09-10 Twitter Alternatives

Last edit

Summary: GNU Social is also free and distributed – but it uses PHP, which I don't trust. 👻

Added:

> Right now I don't feel like I have a good alternative.


It is weird to see no mention of twister in a post called “Twitter Alternatives”. Unfortunately, the development is slowly beginning to stall 😟

AlexDaniel 2014-09-11 01:47 UTC



AlexSchroeder
I just checked it out and it doesn’t seem to be an alternative for my use case: sitting on the train and staring into my iPhone 4. The download page is full of alpha warnings. iOS clients unavailable… 😟

AlexSchroeder 2014-09-11 06:02 UTC


Yes 😟

But it is fully free and distributed, so it is worth mentioning.

AlexDaniel 2014-09-11 12:33 UTC



Alex Schroeder
GNU Social is also free and distributed – but it uses PHP, which I don’t trust. 👻 Right now I don’t feel like I have a good alternative.

– Alex Schroeder 2014-09-11 20:13 UTC

Add Comment

2014-08-15 HTTPS

Wohoo, I upgraded the webserver for alexschroeder.ch from HTTP to HTTPS. You should have been redirected automatically. Munin and Monit are still working. Page editing still works. The config file has been updated so that all the links should point to HTTPS, now. 👍

I’m expecting load average to go up. We’ll see how it goes. Perhaps I’ll have to upgrade my virtual host package…

SystemStatusLoadCPUMemory
KallobombusRunning[1.46] [1.52] [1.29]62.7%us, 1.8%sy, 0.0%wa20.4% [107256 kB]

Update: A day and a half later, it seems that we’re OK.

https://farm6.staticflickr.com/5583/14936634845_9a49f6c76b_o.png https://farm6.staticflickr.com/5582/14749974570_19fddd32a2_o.png https://farm4.staticflickr.com/3918/14749969999_b5e92b5dbc_o.png https://farm4.staticflickr.com/3861/14749970049_29c9268ea1_o.png https://farm4.staticflickr.com/3835/14913641576_c979b63f37_o.png https://farm4.staticflickr.com/3863/14750022238_5e48344bed_o.png

Graphs by Munin.

Update: Moved Campaign Wiki to HTTPS as well. 🐧

Tags: RSS

Comments on 2014-08-15 HTTPS

Last edit

No diff available.

Add Comment

More...