The Spectre of Math

February 3, 2014

New computer, still with MATE …

Filed under: LaTeX,Technology — jlebl @ 7:53 pm

I just got a new work laptop, the Dell XPS 13 developer edition.  Even for a day installed GNOME 3 on it.  Then I realized that I can’t work with two different desktops at the same time, so I went back to MATE.  I can’t change my work computer to GNOME because the dual-monitor support is terrible in GNOME shell.  Oddly it seems that dual monitor is a corner case for GNOME devs now.  Strange as Linux is more used in the “workstation” market than “home desktop” market, and if I look around the offices here, whoever can (has funding) does have a dual monitor setup on their workstation.  GNOME sucks as a workstation.  It might be fine as a place to launch a web browser, email, chat, whatever it is that kids do nowdays.

The other thing is that this has a pretty high DPI, and EVERY desktop kind of sucks at this.  I don’t think that mid 30’s is too old to use computers, but there are things which are definitely harder on this thing and require squinting.  My eyesight is not what it used to be, but it’s not that bad.  I can get most (but not all) fonts to be bigger.  But for example chrome I can’t get to be bigger everywhere, that is, yes on the webpages, but no on the tab headers.  Also UI elements in other things are tiny, like scrollbars are suddenly hard to hit because they are tiny.  Why don’t these things also scale?  That’s annoying.  Smaller resolution is OK, but blurry and sucky.

Another annoying thing is this really godawful thing called a click-pad.  It makes the assumption that just because you can do something, you should.  So the top of the “buttons” are now also place where the “mouse” moves.  So by pressing the button I am also moving the mouse, often clicking somewhere else.  So now if I want to click on something two things happen: 1) the mouse jumps somewhere completely different 2) or I can’t hit it.  Put that together with the small controls and you have a recipe for disaster.  I continually click on things I don’t want to.

Ahh well … There are nice things about the laptop too, like the size, and the case.  Though it doesn’t have a lock hole, which is really anoying … in a coffee shop, am I supposed to take the laptop to the bathroom with me?  I know it’s small, but taking your laptop with you to pee is kind of weird.  Oh yeah … ended on another complaint …

May 30, 2013

Windows 8.1 innovations

Filed under: Linux,Technology — jlebl @ 4:35 pm

I’ve just briefly glanced at what’s new in Windows 8.1, probably because I am procrastinating right now, not because I am actually interested, not having any plan of ever using Windows ever again in my life.  It was really amusing that new features are apparently that you can open more than two applications at once and also resize them on screen.  So maybe Windows 8.1 will finally catch up to Windows 1.0.

I feel I’m taking crazy pills here, because almost everyone is really into this trend.  First make the interface really bare (but graphically intensive) to make it look like a smartphone.  Then reintroduce very restrictive versions of these features and tout them as great achievements.  Chrome OS also at some point caught up with the 80s and added stacking windows.  I wonder when Windows will finally get into the 80s.

And while basic features like window management appear an insurmountable challenge in the new “iphone app” mentality, putting up a clock on your screen eats more CPU/GPU and memory than it would take to guide a spacecraft to Mars and back.  Not even that long ago did a calculator application not require 3D acceleration to reasonably run.

Good thing I’m using XFCE here.  Let’s see how I start a calculator: My non-accelerated desktop means that if I press Ctrl-Alt-R (which is my shortcut for terminal … R used to stand for rxvt long time ago) I immediately get a terminal.  Then I type “genius” press enter, and I’ve optimized the startup so I get a prompt immediately, there is essentially zero wait.  I type in a calculation, and out pops the answer.  Now if I attempt to do this on my phone, or in GNOME using the native calculator, there are several long waits either when some random nonsense is loading just for me to start the app and then there are these useless animations taking up time.  So for example if I have a student in my office and want to just quickly (note the word quickly) calculate something about their grade, I would definitely not do it on my phone.  Even try starting the native terminal in GNOME, it’s a few seconds wait on my machine from the time I get to start it (click a button, or whatnot).  So much for accelerated desktop. Just trying to phone someone on my phone is often a lot longer process than it used to be in the 90s when I got my first cellphone.  There is hardly a lack of power in the phone, it is just that it is so skillfully wasted.

This younger generation today must be really really patient (compared to us old fogies … you know 35 is old when it comes to technology) to put up with this.

February 7, 2013

The computation

Filed under: Hacking,Linux,Mathematics,Technology — jlebl @ 4:47 pm

So the computation has finished (actually a few days ago) for degree 19. I’ve only yesterday gotten around to finishing a short paper (addendum) to post to arxiv, which I’ve done yesterday, see arXiv:1302.1441. The really funky thing is that there are so many sharp polynomials in degree 19. Up to symmetry there are 16 in odd degrees up to degree 17, yet there are 13 in degree 19. And two of the new ones are symmetric, which is actually surprising, that seems it should be hard to achieve if you think about how they are constructed. There’s probably a bunch of interesting number theory that appears here. It should be fun to figure out what’s going on there.

This was the first time a paper of mine got reclassified to a different archive on arxiv. I put it into algebraic geometry because well, the motivation comes from geometry, but it got stuck into comutative algebra. Which actually makes a lot more sense. Especially since none of the motivation from geometry appears in this writeup.

Degree 21 has been running for about a week. It will probably be running for the next year or so at which point I really expect it to just spit out only one polynomial which is the group invariant one we already know about. Which would be also kind of funky since then there would be two degrees with as few polynomials as possible and in between there would be a degree with the most polynomials we have found so far in any degree.

January 21, 2013

The correct finite field does wonders

Filed under: Hacking,Mathematics,Technology — jlebl @ 5:26 pm

So the computation I was running since thanksgiving was getting nowhere (finding degree 19 polynomials which are equal to 1 on x+y=1, which have fewest possible terms (11) and which have only positive coefficients, we know that there are finitely many, the trick is to find them). My code didn’t really have good status updates. Well it does tell you exactly where it is, but it takes a bit of computation to really see how it’s progressing, so I didn’t do that until a few days ago since I thought it was going way too slow.

And low and behold, it was going way too slow. I computed that it should take another 3-7 years or so (different parts of the search space take different times so it’s a bit hard to estimate). That was a bummer. That was about 10 times longer than I thought it should be. At first I was a bit resigned to this reality, but the next day I started to look into it, and one thing I figured out after running a bunch of tests was that one shortcut I was using was never triggered. The idea is that we need to find when a certain matrix with integer coefficients has 1 dimensional nullspace. Doing the integer row reduction is done with gmp, and is reasonably fast. But since we do this many times over and most of these matrices are simply full rank (no null space), we don’t really need to do the whole computation. So what we can do (and this is a useful trick to know), is to first do all computation in some small finite field, e.g. do everything mod p for some small prime p. If a matrix is full rank mod p, it is full rank. The computation can be done rather quickly this way and you don’t even have to involve modulo computation, since all the possible computations you can just precompute first and just build up a big table, so instead of two multiplications, an addition, and finding the remainder, you just look up in a table. Anyway, that gets us quite a bit of a speed up.

Now the thing is that I was using mod 19, since that worked for lower degrees. One thing I forgot when I started the run (remember this was a few years since I looked at this code and ran it last time), is that the modulus cannot be the same as the degree. The matrices we need to work with have most terms divisible by the degree. So moding out by 19 essentially always made the matrix all 0 (except for a few 1s scattered around). So these matrices were essentially always singular and the shortcut never triggered. So after doing a useless mod 19 calculation we had to do the actual integer arithmetic. That’s why it was slow. Damnit!

Well the calculations were not wrong, I just did a lot more computation than needed. After a small amount of testing it seemed that mod 23 was a good finite field to proceed in, so I restarted the code. Suddenly 3-7 years turned into first estimating 90 days and after running things for a day, that turned into an estimate of 30 days.

Then I noticed one more thing (and Danny pointed this out too), that his code used symmetry and just threw out half of the nonsymmetric polynomials, since the computations are the same. I remembered that my code didn’t do it. It didn’t make much sense if the longest run we did was 5 days on one core (for code that is only ever run once or twice, small speedups are somewhat pointless). I implemented this idea and it seems to achieve 33% reduction in time (there’s still the checking for symmetry, and there are of course symemtric polynomials, so that’s probably close to where we can get). So anyway, I guess within 20 days we should have the answer.

After it finsihes, I still have one more speedup up my sleeve. It could be that I can do the row reduction really fast mod 2 by using binary operations (each row would be an unsigned int). Not sure what speedup I can achieve though, at best 90%, since that’s how many cases mod 2 catches. While mod 23 or so catches essentially everything. So the idea is to do mod 2, then mod 23, and only then if the matrix is still singular do the integer arithmetic. If the speedup is another 50%, and my most optimistic estimates hold, that would put degree 21 within the realm of possibility, though at least half a year on 4 cores. That’s is, within something I’d be willing to run.

So, the mood went from “I’ll probably give up n d=19 soon” to “maybe d=21 is possible”. All this just by using a different prime :)

December 7, 2012

Bad memory

Filed under: Hacking,Mathematics,Technology — jlebl @ 6:47 am

So I just remembered, it wasn’t that we thought the computation (see a previous post) would take half a year, it would take 450 days on 3ghz CPU. I guess my memory was being optimistic. I remembered “half a year” when it was really “one and a half a year”. OK, so the computation has now been running for a bit over 2 weeks now on 4 cores. I guess I’m at least 10% there (I hope). It looks a bit worse from the output. It doesn’t seem computers have gotten all that much faster (not at all it seems at least on the load I am trying to do) in the past few years. The only thing better is more cores.

November 25, 2012

“Maxima is calculating”

Filed under: Hacking,Mathematics,Technology — jlebl @ 3:57 pm

So friday afternoon I wanted to test for existence of a certain mapping that takes one surface to another surface. Everything is algebraic so one might assume if a mapping exist it might actually be polynomial and since everything is of low degree, the mapping might be as well. So I just set up brute force equations and tried an arbitrary degree 2 mapping. After a second or two, maxima returned no solutions to the resulting system. OK, so how about plugging in degree 3. It turns out I don’t need to test the linear terms, and there are 3 variables so 16 variables per component so I get an algebraic system in 48 variables. Sounds bad, but lot of the equations become something of the form “x=0″. So I looked at a subset of the system. Already the generating of the equations took a few seconds. So I thought, this will take a few minutes. So I started “algsys” on the equations. Well, that was wednesday afternoon. It is Sunday and the thing is still running. Unfortunately it just says “Maxima is calculating” in the wxMaxima window, so one has no clue if it will take another day or so, another year or so, or if the sun will implode first. I sort of have the feeling it is doing something stupid. Once I get more time for math on monday, I’ll probably try to simplify the equations by hand first. I could also try for the solution (or lack thereof) numerically. In the meantime I’ll let it run. This is on my laptop which is surely not meant as a computation machine. It’s only running on one core so it’s not heating up too badly. When I was running some computations for days in the summer on all four cores you could almost cook eggs on the keyboard.

On a related front, I decided that my work computer is sitting too idly so I started the degree 19 calculation that we never did with Danny on our paper [1]. In 2008 we thought it would take at least half a year. Presumably the computers have gotten a tad quicker in the meantime (and since I’m running it on 4 cores), so perhaps the result will come in sooner. Still the progress seems slow from the output so far. It is a bit difficult to judge, I’ll try to estimate time left more precisely later on, but just as first guess from looking at the output I don’t think this will be done before christmas.

There is something magical about pressing ENTER to start the computation you know will take months to complete. It is one of the few places where you really use the fact that you have a fast computer. Most computer power is totally wasted. So for example in somewhat similar time frame Firefox managed to get 70 minutes of CPU time (maxima is up to 5208 now). Now that’s with only very occasional short browsing over the last few days. It seems mostly it’s the tabs being open that eat up time, run the CPU and heat our house. Come to think of that my office will be quite warm I bet once I get there on monday, I don’t think the heating runs on the room termostat, as the swich on that thing is in “off” position and it still heats the room. So with the added heating from 4 cores running at top speed and it being a small room, it should get toasty.

Update (monday morning): Actually my office was not much warmer. The computer case is actually quite cold and I don’t feel a huge difference in temperature of the air output. I don’t know why I never ran anything on this computer and always used my laptop so far for longer computations. I think I’ll abuse it more from now on.

[1] Jiří Lebl and Daniel Lichtblau, Uniqueness of certain polynomials constant on a line, Linear Algebra and its Applications, 433 (2010), no. 4, 824-837, arXiv:0808.0284.

November 18, 2012

News of Microsoft demise a bit premature and study habits of college students

Filed under: Teaching,Technology — jlebl @ 3:36 pm

There are apparently a number of people all excited about Microsoft now really destroying itself. Well it still remains to be seen. But I think a good indication of where things are headed are college students. Since I have google analytics now on the textbook pagess I can do some experiments. So for example essentially all the traffic from “Irvine” is from UCI students that look at the differential equations book. So I looked at the operating systems usage from Irvine. Here are the results (note that this is a small sample, very unscientific): 72.3% Windows, 10.6% Mac, 10.4% iOS (iPad + iPhone), 3.7% Linux, 3.1% Android. Now given if you watch what people use on campus it seems mostly Mac, I think that gut feeling might be a bit skewed. On the other hand there could be computer labs running that students use and have no choice over the OS. So what conclusions could one draw? Windows is still dominant, by far. Mac is doing better, but actually quite a bit worse than one would expect among college students. Linux is doing a bit better than I would expect, it’s where Mac was just a few years ago. The interesting thing is also the iOS vs Android. It seems from the news that Android phones have beat iPhones in terms of marketshare, but here it doesn’t look like it. So that would indicate tablets are being used and iPad still beats the android tablets. Interestingly 7.3% of visitors used 320×480 resolution, and that I guess means phone. I can’t figure out how to break that down in Google Analytics. By the way, this means 7.3% are reading their textbook on their phone. This number may spike during exams :). Let’s test this theory.

I don’t know how to draw this graph for Irvine only, so it could be other places as well. But look at this graph for the number of visits from phone-like resolution:

But let’s stop that cynical thinking about cheating: There were two exams at UBC (University of British Columbia) for two classes using the differential equations book, but they were on the 14th, and the spike is on the 13th, so the students were studying hard, not cheating. Well maybe studying from a pub so they needed to look at the textbook from a phone, but still.

November 3, 2012

Linus has way too much time on his hands

Filed under: Linux,Personal,Technology — jlebl @ 8:44 pm

So latest news comes that Linus has switched to KDE. This apparently after first switching to XFCE, then I guess back to GNOME. Hmmm.

I’m still on XFCE. Can’t be bothered to try anything else. Yes XFCE is somewhat sucky, but once you fix its stupidities (such as the filemanager taking a minute to start up due to some vfs snafu that’s been apparently around forever), it’s there. I’ve entertained the thought of trying something else, but it’s not an exciting enough proposition.

Now I am wondering what to do once Fedora 16 stops being supported. Should I spend the afternoon upgrading to 18? The issue is that I can’t do the normal upgrade thing since that would boot into it’s own environment and would not load a necessary module that I do on startup that turns off the bad nvidia card with a screwed up heatsink. It’s impossible to do this in BIOS (stupid stupid Lenovo, never buying another Lenovo again). Anyway, that means having to do it right after boot, but before the GUI comes up since that would (even if using the intel card) turn the laptop into a portable oven, and it will just turn off and die nowdays. I am thinking that maybe if the upgrade happens during the wintertime, I could just stick the laptop on snow (and wait till it’s at least 20 below freezing) and then it could stay sane for the duration of the upgrade perhaps. I will probably try to do the upgrade by yum only, but that seems like it could be bug prone and would require some manual tinkering, and I just don’t care enough to do that.

Next time picking a distro I’m going with something LTS I think. And … Get off my lawn!!!

May 12, 2012

Return to linear search

Filed under: Hacking,Linux,Technology — jlebl @ 5:02 pm

So … apparently searching an unordered list without any structure whatsoever is supposed to be better than having structure. At least that’s the new GNOME shell design that removes categories, removes any ordering and places icons in pages. The arguments are that it’s hard to categorize things and people use spatial memory to find where things are.

The spatial memory was here before with nautilus. It didn’t work out so great. No people don’t have spatial memory. For example for me, I use a small number of applications often, I put their launchers somewhere easy to reach. The rest of the applications I use rarely if never. No I do not remember where they are, I do not even remember what they are named. E.g. I don’t remember what the ftp client list, but I am not a total moron and I correctly guess to look for it in the “Internet” menu which is managable. Given I’ve used ftp probably once in a year, I do not remember where it is. Another example is when Maia (6 year old) needs a game to play. I never play games, but I have a few installed for these occasions. Do I want to look through an unordered list of 50-100 icons? Hell no. I want to click on “Games” and pick one. 95% or so of applications i have installed I use rarely. I will not “remember” where they are. I don’t want to spend hours trying to sort or organize the list of icons. Isn’t that what the computer can do for me? Vast majority of people (non-geeks) never change their default config, they use it as it came. So they will not organize it unless the computer organizes it for them. I have an android tablet, and this paged interface with icons you have to somehow organize yourself is totally annoying. One of the reasons why I find the tablet unusable (I don’t think I’ve turned it on for a few months now). That interface might work well when you have 10 apps, but it fails miserably when you have 100.

If I could remember that games are on page 4 (after presumably I’ve made a lot of unneeded effort to put them there) I can remember they are in the “Games” category. Actually there I don’t have to memorize it. Why don’t we just number all the buttons in an application since the user could remember what button number 4 that’s right next to button number 3 on window number 5 does. I mean, the user can use spatial memory right?

Now as for “that’s why there is search” … yeah but that only works when you know what you are searching for. I usually know what I am searching for once I found it. It’s this idea that google is the best interface for everything. Google is useful for the web because there are waaaaay too many pages to categorize. That’s not a problem for applications. Search is a compromise. It is a way to find things when there are too many to organize.

The argument “some apps don’t fit into one category neatly” also fails. The whole idea of the vfolder menus was that you could have arbitrary queries for submenus. You can have an app appear in every category where it makes sense. Now just because people making up the menus didn’t get it just right doesn’t make it a bad idea. Also now this leads to a lot of apps without any categories. The problem I think is with the original terminology. When I was designing this system I used “Keywords” instead of “Categories”. But KDE already had Keywords, so we used Categories, but you should think of them as Keywords on which to query where the icon appears. It describes the application, it doesn’t hardcode where it appears. Unfortunately, there seems to be a lack of understanding of this concept which always led to miscategorization. For example someone changed the original design to say some things were some sort of “core categories” or whatnot and that only one should appear on an icon and that there will be a menu with that name. That defeats the purpose. It’s like beating out the front glass of your car and then complaining about the wind.

Finally, what if I lend my computer to someone to do something quickly. No I am a normal person, so I don’t create a new account. And even if I do create a new account, the default sorting of apps is unlikely to be helpful. If someone just wants to quickly do something that doesn’t involve the icons on the dash, they’re out of luck if I have lots of apps installed. Plus at work I will have a different UI, on my laptop I have a different UI, and any other computer I use will have a different UI. I can’t customize everyone of them just to use them.

As it is, if I had a friend use my computer with gnome-shell they were lost. If it’s made even less usable … thank god for XFCE, though I worry that these moves towards iphonization of the UI will lead to even worse categorization. There are already many .desktop’s with badly filled out Categories field, so there will be less incentive to do it correctly.

April 29, 2012

GNOME UI Fail

Filed under: Linux,Technology — jlebl @ 3:21 pm

So, another GNOME UI fail. Marketa has a new computer: Using compositing leads to crashes so using fallback gnome (am thinking i should switch her to xfce as well). But this is really not a problem of the fallback.

Anyway, the UI fail I am talking about is “adding a printer”. Something which she figured out how to do previously. Not with the new UI for the printing. The thing is, the window is almost empty and it is not at all clear what to press to add a printer. So she hasn’t figured it out and I had to help out. I figured out three things

1) The “unlock” thing is totally unintuitive. She did not think of pressing it. She doesn’t want to unlock anything, she wants to add a printer. With it, some parts of the UI are greyed out, but it’s not clear what should happen.

2) There is just a “+” in a lower corner that you have to press. She did not figure out that’s what you have to press to add a printer. A button with “Add printer” would have been a million times better.

3) Not even I figured out how to set default options for the printer such as duplex, resolution, etc… Pressing “Options” is something about forbidden users or whatnot, which is a totally useless option on a laptop.

If a PhD who has used computers for years can’t figure out how to do something like this, there is a problem with the UI.

This is a symptom all over the new GNOME system settings. It’s very hard to set something up if it didn’t set itself up automatically. There’s also a lot of guesswork involved now. The UI may be slightly prettier, but it is a step backwards usage-wise.

Here’s a solution:

1) Get rid of the lock thing, go back to the model that if you do something that requires authentication, ask for authentication. Why should there be extra UI that only confuses the user.

2) Change the “+” and “-” buttons to have the actual text. “Add printer” “Remove printer”.

3) “Add printer” should be very prominent in the UI. I bet 90% of the time when a normal user enters that dialog, they want to add a printer.

4) Put options where they can be accessed. Surely the options are accessible somewhere, but I didn’t find it.

Maybe I should file a bug that will get ignored …

Next Page »

The Rubric Theme. Blog at WordPress.com.

Follow

Get every new post delivered to your Inbox.