Allegro.cc - Online Community

Allegro.cc Forums » Allegro.cc Comments » OS update

This thread is locked; no one can reply to it. rss feed Print
OS update
Matthew Leverton
Supreme Loser
January 1999
avatar

I updated the SSL certificate ahead of the March 15 deadline, and at the same time updated the server's (unsupported) Linux distribution to a less outdated version. The latter may have broken some things, although Linux server updates are generally painless.

If anything looks to have broken, let me know here. I'll check back next year. 8-)

Chris Katko
Member #1,881
January 2002
avatar

Quote:

I'll check back next year. 8-)

Oh YOUuuuuu. :)

-----sig:
“Programs should be written for people to read, and only incidentally for machines to execute.” - Structure and Interpretation of Computer Programs
"Political Correctness is fascism disguised as manners" --George Carlin

GullRaDriel
Member #3,861
September 2003
avatar

Ohhhhh yeaaaah

"Code is like shit - it only smells if it is not yours"
Allegro Wiki, full of examples and articles !!

Mark Oates
Member #1,146
March 2001
avatar

If anything looks to have broken, let me know here. I'll check back next year. 8-)

;D

--
Visit CLUBCATT.com for cat shirts, cat mugs, puzzles, art and more <-- coupon code ALLEGRO4LIFE at checkout and get $3 off any order of 3 or more items!

AllegroFlareAllegroFlare DocsAllegroFlare GitHub

Peter Hull
Member #1,136
March 2001

Now you will have to get the 'thread locks too soon' team to keep this thread alive for 12 months on the off-chance that ML will reply :D

MiquelFire
Member #3,110
January 2003
avatar

Sure, this shall be the backup thread.

---
Febreze (and other air fresheners actually) is just below perfumes/colognes, and that's just below dead skunks in terms of smells that offend my nose.
MiquelFire.red
If anyone is of the opinion that there is no systemic racism in America, they're either blind, stupid, or racist too. ~Edgar Reynaldo

GullRaDriel
Member #3,861
September 2003
avatar

We have our own ways to stick and keep alive a thread.

"Code is like shit - it only smells if it is not yours"
Allegro Wiki, full of examples and articles !!

Niunio
Member #1,975
March 2002
avatar

Not another one...

-----------------
Current projects: Allegro.pas | MinGRo

Dennis
Member #1,090
July 2003
avatar

Many thanks for the life sign in any case. kthxbye.

Eric Johnson
Member #14,841
January 2013
avatar

Now you will have to get the 'thread locks too soon' team to keep this thread alive for 12 months on the off-chance that ML will reply :D

There can only be one.

GullRaDriel
Member #3,861
September 2003
avatar

Bad topic , edited

"Code is like shit - it only smells if it is not yours"
Allegro Wiki, full of examples and articles !!

Neil Roy
Member #2,229
April 2002
avatar

I'll check back next year.

Hopefully we can keep this thread going until such a time. :)

---
“I love you too.” - last words of Wanda Roy

Eric Johnson
Member #14,841
January 2013
avatar

You guys had better post regularly if you want this thread to last an entire year! >:(

Neil Roy
Member #2,229
April 2002
avatar

Two threads to keep going now... the work load just doubled.

---
“I love you too.” - last words of Wanda Roy

MiquelFire
Member #3,110
January 2003
avatar

We haven't gotten off the rails enough to have an interesting topic form here yet.

---
Febreze (and other air fresheners actually) is just below perfumes/colognes, and that's just below dead skunks in terms of smells that offend my nose.
MiquelFire.red
If anyone is of the opinion that there is no systemic racism in America, they're either blind, stupid, or racist too. ~Edgar Reynaldo

Eric Johnson
Member #14,841
January 2013
avatar

We haven't gotten off the rails enough to have an interesting topic form here yet.

I'll start...

A few years ago, I wrote a blog-centered CMS in PHP and have used it to power my site ever since. The setup works well enough, but lately I've been feeling like stepping away from the overhead of PHP and MySQL to instead pursue static pages for their simplicity. Of course, managing many static pages would be a chore, so I began reworking my CMS yesterday to work as a static site generator instead.

I wanted it to be simple but flexible. The idea was to create some templates, then create content files that get "compiled" into the templates to make the static pages. I began using JSON to represent data out of convenience, but surprisingly, JSON apparently doesn't support multi-line strings! So I began using YAML instead. YAML, like JSON, is super simple to use, but YAML is even more flexible than JSON, and supports multi-line strings! :D

So my original CMS had these custom "tags". Basically, you would create a tag in a database by giving it a name and a value. You could then drop a reference to that tag in a blog post or whatever, and it would be replaced by the value of the tag. So for example, you could have a tag named "favorite_color" and set it to "blue", then drop it wherever you wanted it to appear. A better example would be in a footer or navigation bar; create the tag, give it a value, then put it where you want it. Then, any time you want to update the footer or navigation bar, you'd just update the value of the tag, and it'd be automagically updated on every page that uses it. My CMS used dozens of those.

I've created a simple version of that for my static site generator. So you could have a template that includes a reference for the page title, body, description, and so on, and then the system would replace those values when generating the static content.

Here's what a very basic template file might look like:

#SelectExpand
1<h1>{%page_title%}</h1> 2{%page_body%} 3<footer>{%footer%}</footer>

The tag references are between "{%%}". So "{%page_title%}" refers to a tag called "page_title". The references get filled in when the site gets "compiled".

So then you'd have a source file (written in YAML) like so:

#SelectExpand
1--- 2page_title: Hello World 3page_body: This is an example body! 4footer: Copyright 2018 5---

When "compiled", the output might look like this:

#SelectExpand
1<h1>Hello World</h1> 2This is an example body! 3<footer>Copyright 2018</footer>

Because the system is dynamic, I can add as many tags as I want, and the system would generate them for me. You can even have tags nested inside tags nested inside tags! This system allows me to easily create templates, manage data to go inside those templates, and then generates all the files I need to then move to a static host. So it's basically a templating system. I'm quite happy with it so far. ;D

But get this... I was doing some research on static site generators an hour or so ago when I learned about "Jekyll". Jekyll is apparently a well-known static site generator written in Ruby, and it already accomplishes the things I set out to do! :o I'm going to continue working on my own though, just for fun. ;)

Have any of you created static site/content generators before? If so, do you have any tips to share?

bamccaig
Member #7,536
July 2006
avatar

I didn't really get to the point of server-side hosting because I could never settle on a technology. My day job forever has been programming ASP/VBScript (years ago) or ASP.NET/C#, but I despise Microsoft platforms and also find .NET Web applications overly complex, slow, and painful.

For my own stuff I wanted to run on a Linux platform and use cooler technologies. I wanted to avoid PHP because despite getting the job done it's pretty inconsistent and ugly and there are hipper languages out there.

My first preference was Perl because I was learning it anyway. What originally attracted me to Perl is that it scared a lot of people away, similar to C, so it was somewhat of a personal challenge to learn it and not be afraid of it. In practice, it's a pretty neat language, though similar to C or C++ it can certainly be evil.

The main hurdle then is figuring out a Web server technology to use. A typical solution is Apache with some kind of module for the application server technology. However, Apache is kind of a pain to configure for a beginner, and despite setting up a simple server a few times I never spent enough time at it to be comfortable with it. The Apache module for Perl is also not really recommended within the Perl community because it's not an ideal interface. That pretty much holds for any of the generic Web servers that can be extended.

Instead, you're recommended to develop the application with a PSGI interface (a Perl-based API akin to WSGI) and then run it on a compatible server. Plack is the reference implementation of a pure PSGI server. This is all well and good, but it's all just more and more work to learn. Ultimately, the hurdle is that there aren't very many people doing this these days. Perl is quickly falling out of popularity so it becomes that much more difficult to get help with edge cases if you don't have the luxury to develop it for a living.

Another avenue I've explored is using Python and Django instead. I have only gotten so far as completing the Django tutorial, but it's amazing how easy it all is. I haven't gotten so far as setting up a "production" configuration to run a site yet. And again, because I don't get to develop it all day every day it's difficult not to forget about it between sessions.

If you have the luxury to be employed working with the tools you like to work with during personal hours then you should consider yourself lucky. That alone will make you infinitely more productive than having to learn entirely new things.

All that said, while not exactly a static site generator, my Web site was developed as XSLT/XML. It's rudimentary, and I barely understand XSLT, but basically I developed a master XSLT template that is basically the core HTML document, and then defined an XML document format that describes the content of the individual pages. In general you could define a heading and a series of "entries" which would be presented as bubbles of titled content.

The actual entry content itself is mostly XHTML. It has basically negligible capabilities in terms of generating dynamic content by itself. It really needs an application server technology on top of it to achieve some things. However, it does a good enough job of allowing me to keep pages consistently styled and laid out and keeping the actual content documents pretty purely about content. And all without leaving XML. :)

Decent browsers are able to download the XSLT document and do the transformation themselves (since this stuff has been standardized for 2 decades), but the usual shit browsers don't so as a fallback I can use xsltproc(1) to do the transformation on the server instead and then just publish the resulting HTML documents. I originally published both the XML/XSLT source and the HTML. It has since been moved to a few different servers with varying degrees of GAF, but it appears that the current configuration still has both. about.html and about.xml should be identical in a decent browser (assuming the HTML is synchronized with the XML), but if you view the source you'll see the difference.

I had planned to expand upon this with server-side programming to make a fully functioning CMS, but I haven't found the time to do it. The site was first developed in 2009 so in 9 years I haven't found the time or motivation to add the server-side solution. In reality, the content of the page also hasn't changed much in those 9 years which is probably why I haven't bothered to further develop the site. I still don't really have anything interesting to publish there.

Most of my programming is done at work on proprietary software using technology that I'm only half-enthusiastic to use (C# is great, but Windows, IIS, ASP.NET, and various other related technologies have a lot of frustrating weaknesses and limitations and pain points). I have blogged a few times about specific problems I've solved, but I did so on a separate blog site because I intended my Web site to become a company site eventually. I haven't yet figured out how to start a company and make it successful so the Web site remains a sort of placeholder..

Chris Katko
Member #1,881
January 2002
avatar

Django is the devil. It's huge. To get a tiny webpage you have to do all this stuff and basically "let django make your app" and you're just responding to it. It's like they take away the "main()".

I never got anything but the simplest tutorials to work and then I wondered if I would ever have a webpage that would need such a huge, imposing API/workflow just to get data on the screen.

-----sig:
“Programs should be written for people to read, and only incidentally for machines to execute.” - Structure and Interpretation of Computer Programs
"Political Correctness is fascism disguised as manners" --George Carlin

Eric Johnson
Member #14,841
January 2013
avatar

bamccaig said:

I wanted to avoid PHP because despite getting the job done it's pretty inconsistent and ugly and there are hipper languages out there.

Yeah, PHP isn't pretty, and it's riddled with inconsistencies (was this function needle haystack, or haystack needle? Ugh, off to the docs again...), but it certainly gets the job done. A lot of people refuse to use PHP because it's a "terrible language", but the way I see it is that you should use whatever best suits your use case. ;)

For example, I was once going to learn Ruby, but then I figured it wouldn't offer me anything that PHP doesn't already, so I just stuck with PHP. :P But recently I've been looking at Node. The thought of using JavaScript on the server is terrifying. :o

Quote:

about.html [castopulence.org] and about.xml [castopulence.org] should be identical in a decent browser (assuming the HTML is synchronized with the XML), but if you view the source you'll see the difference.

The HTML version is missing the "News" link in the navigation area. :( I don't see many sites using XML these days. For static content, most use HTML, and for data serialization, most use JSON. Heck, I don't even see RSS much these days either (does anyone still use RSS/Atom readers?). It's neat to see you using XML though. :)

Quote:

I have blogged a few times about specific problems I've solved, but I did so on a separate blog site because I intended my Web site to become a company site eventually.

You should start up bambams.ca again. You've already paid for the domain name after all. :P

bamccaig
Member #7,536
July 2006
avatar

The HTML version is missing the "News" link in the navigation area. :(

Very astute of you to notice. :) I think that I intended to remove the "News" page because ... there isn't any. However, I must not have updated the HTML afterward.

Quote:

I don't see many sites using XML these days. For static content, most use HTML, and for data serialization, most use JSON.

XML is not a very ideal format. It's very verbose, barely human readable if formatted properly, and hasn't lived up to the promises. It's also somewhat more difficult to process. That said, it's standardized and well supported on the Web. Often HTML is really XHTML. I think that it still makes great sense to use well-formed documents and require that. It simplifies the parsers and guarantees that the result is well-defined. Whenever I write HTML I write well-formed XML.

One of the things that killed XML/XSLT is certainly popular browsers failing to support it. As a Web developer you obviously can't adopt a new technology that won't work on a significant portion of the clients' machines. The other side of it I think is that people are lazy and incompetent. XML is strict, and a lot of people don't like having to be precise. That's really unfortunate.

However, XML really does a poor job of solving many problems so it's not all bad news that it hasn't been adopted very strongly. It's a good tool for some jobs, but it's horrible for many jobs too. The only unfortunate thing is that Web standards haven't really replaced it with anything better. HTML has all of the same downfalls of XML and then some, but is at least more compatible with the lazy and incompetent Web designers and developers.

Another point is that when XML is used it's usually abused. It's almost never validated, which is one of the strengths of using XML in the first place. You can validate that the entire structure is correct and matches the spec. If you don't do that you basically are ignoring all of the metadata which is a lot of the verbose weight, making all that extra effort completely wasted. Then you might as well use something like JSON or YAML that trims most of the fat/metadata and just specifies content and structure.

JSON and YAML are indeed superior for most purposes, but XML still would be useful for validation of documents. I'm not familiar with validation technologies for JSON or YAML, but there's probably no reason they can't be defined too (except that there's less metadata in raw JSON so unless the JSON itself is going to store the metadata your validation would be quite limited).

Quote:

Heck, I don't even see RSS much these days either (does anyone still use RSS/Atom readers?).

Sadly RSS/Atom seemed to suddenly die off. I blame social media. I was slow to adopt it, but I was really enjoying it for a while. And then content producers just stopped supporting it. I'm sure it wasn't perfect, but they didn't seem to replace it with anything either. That's the real shame.

Quote:

You should start up bambams.ca again. You've already paid for the domain name after all. :P

That site is still up. :) It's hosted by Blogger. It's not a perfect platform by any stretch, at least for my tastes, but it gets the job adequately done now without me having to maintain it much. :) That said, I haven't had much to post on it for a while. To some extent it's because I'm just exhausted from the stresses of work, but also my day job hasn't been very interesting for a while. It has become pretty menial. If any topics come up I'd still like to write about them, but nothing has stood out to me as a good topic for blog posting lately. Feel free to suggest topics. :P

Append:

I just went back and followed ML's link in the OP. It's amazing to me that a pretty major certificate authority has been so incompetent and presumably for so long. It makes you question the security of the entire Web. It probably should cause the Web to suddenly halt and review security, but the impact on businesses and users would be so huge that they "can't" so instead they'd probably just allow things to continue being insecure to avoid "spoiling the golden egg" (that expression makes no sense, but I can't think of the correct one).

Neil Roy
Member #2,229
April 2002
avatar

Funny, the HTML I use on my static page is ancient. Some day I will get up to date. But what I have works and I hate messing with what works. :)

I am thinking of totally redoing it, so perhaps I will take the time to learn something more modern? <shrug>

---
“I love you too.” - last words of Wanda Roy

bamccaig
Member #7,536
July 2006
avatar

My advice is don't bother trying to learn something more modern for Web development unless you have a goal in mind. You're probably better off devoting that time to game development since that clearly interests you and is also far more useful to the world. :) All a Web site really needs is to function properly, which requires trivial HTML not much more than plain-text. Unless Web development interests you (it doesn't even interest most people stuck doing it!) there's no point wasting time on it. :) Stick to what interests you. If you ever have a work that is so huge that it's worth having a flashy Web site you'll be able to afford to pay some drone to make it flashy for you. ;)

Eric Johnson
Member #14,841
January 2013
avatar

bamccaig said:

If any topics come up I'd still like to write about them, but nothing has stood out to me as a good topic for blog posting lately. Feel free to suggest topics.

I'd be willing to check out whatever you post. But by no means should you tailor your content to me. :P It's late (early?) and I can't think of any suggestions at this moment though.

Quote:

"spoiling the golden egg" (that expression makes no sense, but I can't think of the correct one)

I think you mean to say: "Don't bruise the broccoli that birthed you"...? Don't worry, I knew what you meant. :P I don't have much to say on the matter. The Web is a bunch of protocols--some good, lots bad--and once it's out there, it's tough (or impossible) to undo.

Neil Roy said:

Funny, the HTML I use on my static page is ancient. Some day I will get up to date.

Ask yourself it is worth your time and effort to update it. As it currently stands, your site works, so it does not necessarily need to be updated. That being said, if you do go about updating it, that might prove to be an enjoyable (or frustrating) experience. :) At most, you would just need some basic text and image formatting--nothing too fancy. HTML5 and CSS3 are really a breeze once you get the hang of it (I think they are easier than older versions).

Feel free to shoot me a message if you need any help. I got started with computer languages with the Web, so it's like my first love. :P

bamccaig
Member #7,536
July 2006
avatar

I should probably blog about the Tetris clone I was working on. It's just a little embarrassing how bad I am at game dev. :P But my maths disappeared quickly after high school. My current problem is just memory leakage. I'm not able to figure out if it's leaking mostly in drivers and such or if my program is the culprit. I think a bit of both. Unfortunately I didn't think to check memory leakage until an obscure bug appeared. Now the program is sufficiently complex that it's difficult to figure out how the leak occurs (if at all). Blogging about it might give me some motivation to continue trying to fix it, and might also attract some attention to find the problem.

Neil Roy
Member #2,229
April 2002
avatar

bamccaig said:

I should probably blog about the Tetris clone I was working on.

I started work on something similar, back in... 2004? ;D... never did finish it, but there is a playable version on my site, in the programming section at the bottom. Created with Allegro 4 at the time. It's a version that is similar to an Amiga game I used to play, as you make lines, it reveals a little bit of a picture in the background. Each level is complete when you reveal the entire image.

---
“I love you too.” - last words of Wanda Roy



Go to: