HNHacker News
TopNewBestAskShowJobs

patrickg

779 karma · joined January 1, 2010

https://www.speedata.de
submissionscomments
patrickg··on Never Use a Warning When you Mean Undo
I accidentally closed a tab in chrome one day and all my text I've entered in a form was lost - so I thought. But chrome offered me to restore the tab - including the text in the form! I was very surprised and happy with this behavior. Now I am less afraid to use keyboard shortcuts, because I know that chrome will handle this allright (doesn't work always, I know).
patrickg··on Poll: What programming language do you use for your app/startup?
We am using LuaTeX (99.5% Lua, rest TeX) on our sole product.
patrickg··on Metapost programming language: Examples
See also the metafun addition, which works well with ConTeXt, a TeX macro package.

metafun: http://mirror.contextgarden.net/general/manuals/metafun-p.pd...

ConTeXt: http://wiki.contextgarden.net

patrickg··on Original Pentium FDIV flaw e-mail [1994]
It was one of the best things that happened to Intel. After some reluctance, they proved as a company users can trust in, as they allowed to return their CPUs in exchange for a non-broken one. This trust into Intel was worth much, much more then the cost of the refund policy.
patrickg··on Slaying dragons with git, bash, and ruby
That's what I use the feature-xyz branch for. I make "incomplete" commits, by logic only (refactor this, add new function...) and then at the merge into the develop branch, the commit must be in a working state. That way my development branch is always in a working state and each commit there adds one thing at a time (and still I have the detailled look because I use --no-ff commit).
patrickg··on Ask HN: Best Startup City - Outside the USA?
You have to take into account that in the earlier days more people lived in an appartment then nowadays.
patrickg··on Ask HN: Best Startup City - Outside the USA?
Move to a place you are familiar with. It would take too much time learning the language, learning the culture, getting used to the local way of doing things, building your network, having support from friends/family. I don't think that the place where you found your startup is really that important.

It surely depends on the kind of startup you are building, but knowing the local industry / companies (names, people, market shares) has helped me a lot more then the actual (lack of) regulations/startup "feeling", cost of rent, size of town.

patrickg··on Ask HN: Best Startup City - Outside the USA?
Depending which part of the city you want to live, it is far from being cheap. But there are a lot of places where it quite affordable, but I am not sure if this suits everybody (travelling distance, "neighborhood").

I am partly living in Berlin for 4-5 years now and now moving there with my startup completely.

patrickg··on Why I’m giving up on Europe and moving my startup to China
I wonder why almost nobody mentioned "ethics". Besides the arguments in the blog post, is it morally OK to start a business in a dictatorship? I am not so sure about it.
patrickg··on Why I’m giving up on Europe and moving my startup to China
"These rules are also very difficult to discover and very difficult to implement correctly. From the situation with healthcare for your employees through to filing your taxes correctly, the amount of paperwork is insane and complex."

Sorry, but reading this is raising a question if the author of this blog article has experienced this himself or just hearing about it. The bigger your company is, the more complex tax forms and other things will become. But as a small startup company it is very easy to do taxes etc. You don't even have to fill out a standardized form for declaring your business income if you are a small company (EÜR in Germany). I was afraid of all this as well, but starting the company here is really easy, there are a lot of government/local institutions that help you with everything, even the IRS answers your questions if you have any.

I cannot judge on the other things, but they sound - as other said here - like the other grass is always greener.

patrickg··on Ask HN: What are your best life hacks/best tools in life/time savers?
Sorry, only computer/work related:

1) I am so used to a mac that makes me save lots of time compared to other systems I am not used to. That doesn't mean a mac is better or whatever, I just want to point out that using the same system for a long time is probably the best time saver there is.

2) notational velocity is the note taking application (for my mac) that I have been looking for years. I have to write something down every now and then and I can reach NV just with a key press, and get back to work. NVs ui is so intuitive and blazingly fast, that I fell in love with it instantly.

3) spotlight (as a program starter and a desktop search enginge) and time machine are IMO the most time saving things built into the OS (and the user interface, of course).

patrickg··on [dead]
Actually, I like it! It looks so much of a 90's homepage (remember the marquee tag?). Of course this is as much distracting as possible and as unreadable as hell, but it is a nice html-collage. Perhaps I am alone with my opinion?
patrickg··on Design Doesn't Matter
This person mixed up design and style. This bottle is of course designed and I bet it is designed like this on purpose. But to the author's eyes, it doesn't have style. He (as I) lives in a different culture than the manufacturer, so this is probably a cultural clash.
patrickg··on PEG.js - parser generator for JavaScript
I love LPEG for Lua. It usually takes me some time to write a decent grammar, but once it works it is rather straightforward to read it. (http://www.inf.puc-rio.br/~roberto/lpeg/lpeg.html)

Now seeing this for javascript makes me think if I should actually do more work with js.

patrickg··on XeTeX: A modern LaTeX with proper OpenType and Unicode support
Just this site:

http://contextgarden.net

patrickg··on XeTeX: A modern LaTeX with proper OpenType and Unicode support
I suggest having a look at http://en.wikipedia.org/wiki/LuaTeX It is still in beta, but once the power of LuaTeX is unleashed, it will be the only used TeX engine (in two or three years). This is because it combines the quality of TeX's typesetting algorithms (+ unicode/opentype/...) with the ability to program in Lua, a very decent programming language. In "Lua mode", you have access to all TeX's internal parameters and algorithms, so you can even do the line breaking and pdf writing from inside lua. That means you don't have to use TeX's input language any more, a language that keeps many people away from using TeX. Now that you have everything on the Lua side, there is no reason why not to read XML, RTF, Wiki-Markup and other file formats and use the TeX algorithms to typeset these files.

TeX internally works with nodes. Every character you type, every space you use (like the space between paragraphs), every color command will be changed to a nodelist. The boxes and linebreaking algorithm operate on these nodes. In LuaTeX (in lua) you can create nodes manually and feed this list into the linebreaking algorithm and you get back a box of a perfectly nice typeset paragraph. Then you can even operate on these nodes again (or just before linebreaking) and ship out this paragraph into the pdf file. Nobody cares where you get the input from. There are several libraries included with LuaTeX and available for inclusion, such as LPEG (for really nice and sophisticated parsing), luasocket (internet access), luazip, etc. Even luaexpat (xml) and luasql (Database access) are available, so that makes LuaTeX perfectly suited for database publishing (which is what I am doing)

No other TeX engine can do that at the moment!

For the german speaking hackers, I am running the site

http://www.luatex.de

where I write technical stuff about LuaTeX (and some announcements), but beware: all in german.

[Edit: here is the site with google translation to english:

http://translate.google.com/translate?js=y&prev=_t&h...

]

patrickg··on XeTeX: A modern LaTeX with proper OpenType and Unicode support
LuaTeX + ConTeXt (also called MKIV), see the page on http://wiki.contextgarden.net/Mark_IV. With this combo, you can use the typesetting power of TeX and the programming power of LuaTeX combined.
patrickg··on TeX line breaking algorithm in JavaScript (and HTML5 Canvas)
Yes, I think that is the reason. Or perhaps: the users don't raise their voices to have something better?
patrickg··on TeX line breaking algorithm in JavaScript (and HTML5 Canvas)
What about a menu (ribbon) item called "apply very nice typography to your document" which recalculates/reformats the paragraphs? Would this be a solution?
patrickg··on TeX line breaking algorithm in JavaScript (and HTML5 Canvas)
I agree with you now :-)

I would like to have two browsers of the same type, one with high(er) quality typography and one as it is now. And then compare the speed. That would be interesting.

patrickg··on TeX line breaking algorithm in JavaScript (and HTML5 Canvas)
Nobody denied that it is slower in theory, but I still claim that you won't be able to measure the difference on an average web page. So time is not an excuse for not implementing this (and this was the original question).
patrickg··on TeX line breaking algorithm in JavaScript (and HTML5 Canvas)
If you don't know the constant, how can you say that it is non-negligible? I doubt that one can measure the difference in speed rendering an average webpage with either algorithm.

And your remark about real time: Even the old (and slow!) TeX can do linkebreaking for several hundred pages of text in a second. Including writing pdf. So you are probably right about real-time h&j even for quite large documents.

patrickg··on TeX line breaking algorithm in JavaScript (and HTML5 Canvas)
(b) is not correct. The time complexity of the total fit algorithm (as described in Knuth&Plass' paper) is almost the same as the simple (first-/best-fit) method. They use a technique called dynamic programming to divide the problem into pieces where the perfect line break of a sub paragraph is valid for optimal breaking of the whole paragraph.
patrickg··on TeX line breaking algorithm in JavaScript (and HTML5 Canvas)
Because a) first fit, best fit or something else is trivial to implement, having a good total fit implementation that works in a lot of circumstances is not trivial (I have re-implemented a simpler version of the algorithm in Ruby including using a hyphenation library). b) you can ask the same question: why does almost no word processor implement this algorithm? And with word processors it is much more important! The answer is simple: Most word processors are doing many things badly so having a total-fit h&j (hyphenation and justification) algorithm would only make the output slightly better but still much inferior to good book typography.
patrickg··on TeX line breaking algorithm in JavaScript (and HTML5 Canvas)
This is great news. However, having a Knuth & Plass line breaking algorithm without hyphenation is like sex without a partner. Pretty much useless. The good points you get from using a total fit algorithm is much less then you lose from lack of hyphenation. If hyphenation is implemented, this will be very great!
patrickg··on TeX line breaking algorithm in JavaScript (and HTML5 Canvas)
As you said: the Knuth/Plass algorithmn does not reduce or even detect rivers. Detecting rivers can be done in linear time, but reducing is very likely to put the algorithm in a higher time complexity class (which is almost linear with input length for the normal algorithm!).
patrickg··on Don't ask what you can do for LuaTeX, but what LuaTeX can do for you.
Hi thingie, thank you for your comment; you are right that the slides were just to aid a lot of talking. The presentation was held at last year's EuroTeX (2009) conference and was quite technical with a lot of discussion and the talk was prepared within a few minutes before the talk. I just wanted to present the way I use LuaTeX and the problems I encountered while hacking. I try to sum up all this (with solutions) on my german blog www.luatex.de. I am sorry that I can't give you a better answer then "you should consider attending a TeX conference".
← PreviousPage 10 of 10