orangeduck
Joined 15 years ago
Joined 15 years ago
For example I would try converting the bezier representation into an implicit HRBF representation (here is a good explaination in 3D http://rodolphe-vaillant.fr/?e=12). This representation should be much easier to process on the GPU - checking how much the point is inside/outside the glyph should only be one matrix multiplication which would make the computation in the actual shader really really fast.
http://lua-users.org/wiki/PatternsTutorial
At first I found it a bit confusion but they're actually pretty great. For me at least 90% of the tasks I want to do with regex can be done with scanf, and Lua's little extension covers the remaining 10% quite well.
I know lots of people often say that it would be nicer to use functional composition for regex instead of strings because strings are too confusing, but I disagree with this. The confusion of regex to me is not from the string representation, it is that some characters are "special" while others are "normal" (including whitespace). At first it appears that most characters are "normal" and so you can start from some example and generalize the string until it matches all the things you want - but once you start putting parenthesis and such in you start to realize that most of the string wont be matched "normally" and it is better to start thinking like a grammar and write it from scratch. This double thinking is pretty annoying.
For this reason, to me the Lua patterns are really the only alternative I've come across to regex that I've liked. They've got nice compact expressive syntax, can really easily do most of the matching tasks I need due to the scanf base, (almost) all the "special" characters begin with %, and the complex cases can still be matched.
1. Why? 2. Is anyone using it for anything serious?
The second one is easiest to answer: no. And most people are suprised to hear that I probably wouldn't use it for anything serious either.
If you hadn't noticed from my github page I love C, and while I am also very interested in the things Cello adds such as duck typing and interfaces, and all the syntactic sugar that makes thing really nice and literate; it doesn't interest me enough to choose it over C. Additionally who is going to want to use my project if it uses this weird hacky C library! People are (for good reason) very suspect of dependancies.
That isn't to say I don't like programming in Cello. I'm almost definitely the person who has written the most in it and some things are just a joy to write in it, and look so clear and functional and algorithmic. At some point in the distant future when I find the time I really will attempt something serious such as a web framework. If that takes off we seriously can decide if it really is a good project (hur hur hur).
To be fair, "why" can also be pretty easy to answer depending on who is asking: because I could. Because I thought it was kinda cool and that people would be interested. There seems to be some default position in programming that unless your project is silly or sarcastic people assume you are "advocating" something by doing it, or making some kind of political statement on software development. I didn't work on this project to try and change the world. Nor to create something better than the alternatives. It doesn't change my life if people use Cello or not. I wasn't frustrated with C++, and I wasn't looking for a cylindrical rolly thing for my cart. I just made it for fun.
> How did it end up working out? I assume it's process, not spot color. Is the colored text still sharp enough to be read easily?
Yeah it isn't spot color and the text looks really great and easy to read. The print quality of the interiour seems very high quality and it really makes it seem alive with the images and colored sections. I think it keeps it fun to read, which was always one of my intentions. I was totally over the moon with the interiour when the first proof copy arrived.
But as you mention financially it isn't going to make much sense. I don't make much more off the print book than the ebook sale, and yet it costs the consumer ten times as much! So in some sense it was kind of vanity project - but I still enjoyed it a lot, and wanted to prove I could do it additionally.
> It worked out well for me -- the time I spent in InDesign was really enjoyable -- but I can definitely see how it wouldn't be the right choice for others.
Actually if someone had mentioned InDesign to me I might have given it a try. I mainly picked Latex because I knew the font rendering and formatting would be awesome and it was something I knew already so I could get started. As you say, InDesign is fun, while working on a complex project in Latex isn't exactly a joy. But I think the end product was still sufficiently professional :)
> I've done some print work before, so I was fully expecting some variance here. Unless you have a carefully calibrated display and keep track of color profiles through the whole pipeline (and they do too), there's always some difference.
Yeah I probably should have been prepared for this. And additionally there was some error in how they were cutting the bleed which looked poor with my cover design. If I did it again I would definintely try to find a professional to consult before tacking the cover for any friendly advice he/she had to offer.
> For what it's worth, I'm really glad you made it, and I'll be buying a copy.
Thanks! I feel bad ending on a downer because I really have gotten a lot of pleasure out of it, so I don't want to paint the process in a negative light. As a learning experience it was really unique and great. There are just too many fun, great and unique areas of computer science to play around with as well!
Creating the ebook was fairly easy. It ended up being a case of writing a bunch of scripts to fix and tweak various things about the HTML website. Constructing the print book was a lot harder work.
I explored rendering a PDF from the ebook but the font rendering was ulitmately too poor and the configuration of the ebook tools was getting really difficult. Additionally the text layout was not great with lots of code blocks getting split over pages and images in wrong places.
I knew I needed to use a program more suitable for publishing so I tried doing a manual conversion to Latex, but after the first couple of chapters I realized it was going to take too long. Instead I begun on some scripts converting my HTML into Latex automatically. Most of this work was done by `pandoc` and a list of regexes that redefines "unholy". God only knows how it all worked in the end. I found various Latex solutions for the pullouts, and syntax highlighting, that I liked ang which gave me as much control as I required, and in the end it was actually looking pretty nice.
Then came the copy editing, and like in this article it was long, tedious, difficult, and I'm still not completely 100% happy with the final result. It took the form of a bunch of scripts inserting pagebreaks before or after paragraphs and moving text, images and pullouts to balance the pages. Essentially it is very difficult to copy-edit a book with so many code blocks, even with the help of Latex. This is the only part of the process where I felt down on my skills, and that someone who does it for a living would not face the same problems (probably they wouldn't be using Latex in the first place). But in the end I was happy with the interiour - which still looked awesome printed in color - and I think I by far did the best I could.
I designed and made the cover in Photoshop to the vision of it I had always had. I think I did a fairly decently job but certainly it would have been better looked at by a professional. Unfortunately createspace doesn't seem to do a good job of printing the cover, so it didn't look precisely like the supplied image I made. Perhaps this is different when ordering non-proof copies.
The nice thing about my approach was that when people send pull requests and corrections to the website I can automatically integrate them across the ebook and print versions, and if I ever do want to make updates in future the process is relatively painless. I think I'd be happy to self publish again. Createspace was great and I felt good not having to rely on others for the process. The main thing I didn't like about it was the marketing - that is something that does not come naturally to me. I think it is unlikely I will write a programming book again. It was fun, but I felt like finishing it more of an obligation once the ball was rolling. Ultimately I think I made a "good" thing which lots of people read, enjoyed and appreciated, and I know it wasn't just an additional item of waste in the universe due to all the people who have reached out to me personally (thank you so much). But at the end of the day unfortunately it hasn't derived me satisfaction worth the effect it took to produce - which was a lot - and I think that is just due to the nature of the thing, not it's success or position in the world.
In my eyes "worse is better" is about the mindset of approaching a task. It is about diving right in and learning through production - without being paralysed by the idea of introducing hacks or ugly design. It is the idea that, for the moment, there isn't a need to be worried about covering every edge case or possible failure option. It persuades you to focus on something simple and easy to explain, with a single purpose or intent. It is better to produce something (anything) and see where it takes you.
It also says how important it is to embrace contribution and collaboration. How important it is to, after some threshold, release yourself from feelings of ownership.
But if I had to nail down exactly why I believe "worse" is so successful ("better") it is because those that create "worse" software don't focus on the software - they focus on the idea. From that the software is painfully drawn. The software might suck, but I believe ideas are better. They are more persistant, easily explored, dynamic, and shareable than software. Ideas that are good, simple, and easily taught are far more important than well designed software. That is why they survive.
There are lots of programmers and hackers who don't believe in "worse is better". Sometimes you seen them on HN with a fantastic new programming language (or something) they have designed and built in isolation - perfect in every aspect (at least to them). Nothing quite hurts like their confusion when interest dwindles and their software is forgotten. All they had seen on HN were "worse" links every day, and after years they had provided "better" - to them it is criminal that it hasn't been picked and gained momentum.
Worse is better is not going away, and I think you can either engage yourself in it as a philosophy, or struggle.