Discussion Forums > Technology

MangaViewer - an opensource, standalone, python manga reader

<< < (4/6) > >>

kiiller_man1:

--- Quote from: Freedom Kira on November 07, 2011, 09:22:10 AM ---In addition to plugin operability, I greatly value efficiency. You would have my props if you manage to code this (efficiently) in C instead of scripting it in Python, which is very computation-intensive. I know that it's easy to script stuff in Python (haven't actually tried it before though), but it comes at a pretty big price computation-wise.

Now THAT should give you something to work on. Yay segmentation faults!

--- End quote ---

I'd say coding stuff in any language is easy (excluding brainf*ck-esque languages), but coding things well takes more skill. I appreciate that you look for efficiency, I highly value it too. I am much less confident in my skills as a C programmer though, as I started learning it much later than most of the other language I know. Therefore I am much more worried that I will do something inefficiently in C that could cause memory leaks. I am much more secure in all of the other languages I know.

In terms of efficiency though, I beg to differ. My code utilizes Tkinter, which are Tk bindings for Python. Tk is a lightweight and fast gui toolkit, so no problems there. To manipulate images, my code uses PIL, or the Python Imaging Library, which is actually a C library for python and should be fast as well. I don't see much that could be slow, and I don't think I've ever seen the memory usage go about 20mb.


--- Quote from: Sosseres on November 07, 2011, 07:35:34 PM ---That is why java is great. Runs on most platforms without all that much fuss.

--- End quote ---
I have done a lot in java, but I had wanted to do something in python (plus I don't really like doing gui's in java).


--- Quote from: Kyrdua on November 06, 2011, 05:55:28 PM ---Hmm. lack of mouse navigation aside. It's controls are pretty simple.

and oh. thought of a few more suggestions

* lancoz filter for resampling
* smooth scrolling
* boss key (lol)
--- End quote ---
I really like the background customization idea, that is something I will likely implement. After doing some research, I have found that the "antialias" setting for resizing actually uses lancoz filtering :D. Smooth scrolling is something I was playing with before I refactored my code, I just need to get it right. And who's to say there isn't already a boss key? XD.

kureshii:

--- Quote from: Freedom Kira on November 07, 2011, 09:22:10 AM ---You would have my props if you manage to code this (efficiently) in C instead of scripting it in Python, which is very computation-intensive.
--- End quote ---
Eh, why wuss out with the pursuit of efficiency; just write it in asm and save CPU cycles like you've never done before! :V

Ultra_Magnus:
Obligatory xkcd:

kureshii:


Also relevant.

Freedom Kira:
<3 xkcd. I remember that Emacs one (I hate Emacs with the passion), good memories.


--- Quote from: kiiller_man1 on November 07, 2011, 10:12:01 PM ---I'd say coding stuff in any language is easy (excluding brainf*ck-esque languages), but coding things well takes more skill. I appreciate that you look for efficiency, I highly value it too. I am much less confident in my skills as a C programmer though, as I started learning it much later than most of the other language I know. Therefore I am much more worried that I will do something inefficiently in C that could cause memory leaks. I am much more secure in all of the other languages I know.

In terms of efficiency though, I beg to differ. My code utilizes Tkinter, which are Tk bindings for Python. Tk is a lightweight and fast gui toolkit, so no problems there. To manipulate images, my code uses PIL, or the Python Imaging Library, which is actually a C library for python and should be fast as well. I don't see much that could be slow, and I don't think I've ever seen the memory usage go about 20mb.

--- End quote ---

Heh, I admit I haven't actually tried Python scripting before. I'm learning Ruby right now for a course. Learned very basic bash scripting a couple years ago but I can't say I really took anything away from the experience. Ruby is quite a beautiful language, and I imagine Python is very similar, as they are both advanced scripting languages.

C would be the third language I learned, after Java (although C++ was the first, and the kind of C++ I was doing was very much like C because it lacked class definitions etc. that really differentiates C++ from C). The nice thing about ANSI C is that you can often get away with workarounds that will avoid the possibility of a memory leak. After a couple years of sporadic practice with C, I can code about as fast as a beginner Ruby scripter (task-wise, I mean, not line-wise).

I guess 20MB is not that much if you look at mainstream computers now, but a computer that's, say, 7-ish years old would find that to be about 5-10% of the RAM. That's a lot for an image viewer. But if you think about it, the only reason why uTorrent 1.8.5 is still fairly popular is because it's so much more lightweight than the newer versions of uTorrent. There's really nothing else saving it.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version