ignite
Members-
Content Count
36 -
Joined
-
Last visited
About ignite
-
Rank
Member [ Level 1 ]
-
After some thinking and taking into account learning propose of project i went into this new idea: if a language style is not specified why should you stick with pascal-like syntax? Hardest part of implementing this style syntax is to parse expressions, all that infix, prefix, postfix operators, operator precedence and such. So avoid all of this difficalties by choosing lisp-like syntax. It will be very easy to implement parser, evaluation can be implemented as simple procedure wich traverse parsed syntax tree and evaluate each node. Just piece of cake.
-
128M is not so bad. Some time ago I played with LTSP (Linux Terminal Server Project) and tryed out i486 machine as terminal (thin client). 4M was sufficent to run textmode terminal, in 8M I succesfully run X server terminal. Even with swap partition resided on NFS server X run fast enough. There was only two trivial settings - using external (of terminal server) font server and there was one small bug in init scripts (resolved now) which not free some amount of RAM used on startup only. Naturally this 8M of RAM was for kernel and X only, all applications run on LTSP server. More to said, I used Linux some time in similar as demolaynyc have configuration. In this (128M) case there is just several no-no: java, mono and all dependencies of it. Beagle is one example. Second recommendation is to switch off all unused services - up to cups and maybe xinetd server.
-
How To Start A Program On Startup With Options
ignite replied to djXternal's topic in Websites and Web Designing
It works for sure. But this method have disadvanteges: you can't manually stop this program at any time just typing /etc/init.d/program stop, or by special Red Hat script - service: service program stop. You can't activate/deactivate such a program by system tools like chkconfig or setup Red Hat utility. This program will not run correctly according to system 'run level'. This method of running program at startup have exactly one advantage - it's simple. -
Sum Fucntion? Ive been searching the web for a sum fucntion but...
ignite replied to Faint545's topic in Programming
You did some mistake. Actually you wrote in pseudocode count function. Sum differ from what you wrote in first line: Sum = 0, then in third Sum += Here is simple one line example code: for( float Sum=0, int i=0; i<sizeof(array); i++) Sum+=array; -
Opinion that linux is for slow computers not complitely right. Linux is such an OS that vary drastically from installation to installation. You can install last DE (desktop envirenment) with cool 3D effects, such as Beryl, which will need at least 512M of RAM and new video board with at least 256 Mb of RAM on it. In other side you can install text-only system which will run smoothly at old i486 machine with 8M of RAM. All depends of your needs. In your case it's feasible not to install GNOME nor KDE, install more lightweight DE, such as Xfce, or maybe even pure window manager, such as IceWM or BlackBox. This will save to you plenty of RAM. If you even more limited in RAM try lightweight browser - elinks and console IM - centericq. Happy linuxing.
-
Overall idea about this topic was inspired by my childrens. Some time ago I started to teach them programming. As a base language I choose Python. So the next step was an attractive subject to program examples and exercises . I create some "robot" program. There is nothing new in it: yet another logo-style game. (See attacments) The "robot" is actually lorry which moves at squire cells, concrete or ground and can't move through walls. It understands commands like "forward", "backward" and so on. All sounds good as for now. We started from program like this: #!/usr/bin/python# -*- coding: utf-8 -*-from robot import Robotrobot=Robot('z4-4.maz')while robot.clear_forward(): robot.forward(1)robot.right()while robot.ground(): robot.backward(1)robot.forward(1)while robot.ground(): robot.plant() robot.forward(1)robot.forward(1) But, as you already noticed, I am not native english speaker. When I speak about this program with childrens I forced continuosly switch ukrainian-english and back again and again. So topic arised: can Python understand ukrainian? Or in global context: any language other then english? I devide the overall task into three different in size and effort parts: 1) make python allows international symbols as identifiers: variables, classes, functions names. 2) translate parts of most used keywords and functions. 3) full python localization. Part One. As everybody knows characters represented inside computers as one or more bytes. Historically first widespread charset was ASCII coding standart. It declairs first 127 of 255 possible values of one byte. Later was introduced other 8-bit coding systems, such as latin1, koi8, win1252 etc. And finally was invented unicode, especially in utf-8 form. Utf-8 deffer from other unicode standarts by unique features: it compliant with ASCII code in first 127 values, and all other chars encoded by values from 127-255 vector, so no clash can occure with ASCII signs, digits and such. Let's start. Download latest python 2.5 source: wget -c www.python.org/ftp/python/2.5/Python-2.5.tar.bz2 Extract archive: tar -xjf Python-2.5.tar.bz2 cd Python-2.5 Pyton checks for allowed symbols in tokenizer module: Parser/tokenizer.c. Open it with your favorite editor and locate first call of function isalpha(), it looks like: /* Identifier (most frequent token!) */ if (isalpha(c) || c == '_') { All we need to do is to allow symbols above 127 (hex 7F), so edit line to get something like: /* Identifier (most frequent token!) */ if (isalpha(c) || c == '_' || c > 0x7F) { Next point is 20 line firther, search for isalnum() function, lines look like: while (isalnum(c) || c == '_') { c = tok_nextc(tok); } Do exactly edentical edit: while (isalnum(c) || c == '_' || c > 0x7F) { c = tok_nextc(tok); } Thats all! Just do regular things like conigure, make, install: ./configuremake make install Type /usr/local/bin/python and you'l get python interpreter wich allows all umlauts, accents and cyrillics. Part Two. .... to be continued: hack python grammar - translate keywords ("def", "while", "if") and builtin functions ("range")...
-
I'd like to have a little talk about names. All of us who stick with IT industry repeatedly deal with various names, labels, arbitrary strings and such. Starting from variables, procedures and functions names in programming languages, continuing with logins, users, computers names and finally finishing with passwords and passphrases. I notice one interesting fact. At first, when super new cool named thing introduced, the finest in the universe manual sad: the name of the_thing is arbitrary string consisting of alphanumeric characters and underscores .... bla-bla-bla. Then everybody begin using this cool the_thing and face inconsistencies, unsafety and unhandyness while using _arbitrary_ strings as names. After some time appears articles of various authors with suggestions about best practices in naming schemas. Such as meaningfull variables names, good passwords which hard to bruteforce but easy to remember and so on. So, I'd follow this trend and propose my own suggestions. Some time ago I need to repaire broken linux system. Specifically it was Fedora 5. My working desktop is Fedora 5 installation too. I installed my desktop using default options: root directory resides in Logical Volume Manager (LVM) partition which named VolGroup00. This was cool. But. At that time I hav't functional boot CD or DVD, as I usually prefer network installations. So i did next step: connect hard disk from broked system to my desktop and seen beautifull thing - that system was installed by default too, so its root directory resides on LMV wich named VolGroup00! Hah. After boot my system can't see new disk at all. So I face perfect ideal name conflict. What should I do? I can't rename my LMV volume group because it mounted. I can't rename new disk's volume group because my LMV software don't see it. Deadlock. After some googling I found perfect article about this topic http://www.linuxjournal.com/article/8874 and successfully solve my problem. But after all that troubles I remember one importent thing: never never never use default LVM volume names suggested by installer. Always rename it to something unique to concrete box. For example for my (ignite) box I chose igVol name, for server named 'nord' - nrdVol etc. Happy names hacking.
-
Add lines to /etc/named.conf:zone "cs.kuban.tv" { type master; file "cs.kuban.tv.hosts"; }; Create file /var/named/cs.kuban.tv.hosts: $ttl 38400 cs.kuban.tv. IN SOA cs.kuban.tv. root.cs.kuban.tv. ( 1053609663 10800 3600 604800 38400 ) cs.kuban.tv. IN A 192.168.144.200 Directory where to create cs.kuban.tv.hosts may differ from mine, but you can easy find proper location by lookup line directory "/var/named"; in /etc/named.conf file Should help.
-
It's hard to understand what you really need. If you want to access two hard drives as one big drive, LVM is right tool. Fedora installer by default create LVM, so you can add phisical volumes, hdb and hdd, to system's VolGroup00. Another option is to create new volume group on first hard drive, say hdb, then add second, hdd, as new phisical volume. After that you can create logical volume which will reside on both disks. Tips: man lvm vgcreate lvcreate
-
My first try was in 1998, it was Red Het 5.1. Long time i use dual boot, but already about 4 years i did full switch to linux. What made it? I think linux is a future. I prefer to be ready for future.
-
Awesome Homepage How to make many for nothing ;)
ignite posted a topic in Websites and Web Designing
This is good example of make many from idea. Nothing more. Just exellent idea. I was surprised. Look at this. -
Here https://github.com/sergev/uos-embedded is interesting tiny embedded OS. Supported architectures: Atmel AVR ARM7 (Samsung S3C4530), including Thumb mode Intel i186 Intel i386 (with Grub) At i386 support's Nano-X: Image
-
Some time ago Red Hat acquired Netscape's Directory Server and release it under open source licence renamed Fedora Directory Server. Does onybody use it, or simply try? What future of FDS do you predict?Give your opinion.
-
Some time ago i was asked to program device, connected to PC parallel port. Main program was written in python. First of all i found nice C library which perform the task: parapin. Building and installation is straightforward, so i don't stop on this. Then i start to build python wrapper. With SWIG its easy. First create file parapin.i, here is head of it: Actually i wrote only first 3 line, rest is copypasted from library header paragui.h. I take only those functions and definitions, which i need for my task. Then i wrote make config file Makefile: After running make utility i had ready for use python module parapin.py with functions set_pin, clear_pin and so on. Not so hard, isnt't it?
-
Simple question: where do you end up if you will long enough go to north-west?Possible answers: starting point or north.Which one is right?