Jump to content
xisto Community

ignite

Members
  • Content Count

    36
  • Joined

  • Last visited

Posts posted by ignite


  1. hy all,
    first of all please excuse my bad english, i will try to write as correct as i can.

    here is the problem, i must make an parser, and maybe a small compiler for school an until now i searched a lot after a tutorial or a website where to find some documentation. as fixxxer wrote it is more easy to learn yacc and to make this "new" language. but if i must create the language in Borland Delphi 5, which is your advise? and probably i didn't understood, but fixxer can you be more exactly on who is Chomsky's?(and to read Chomsky's articles on language, semantic, syntax and description of language)
    thanks and best regards,


    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. :)

  2. Ya, the X server is going to have some problems running on 128mb or RAM. I tried that before, it lagged right out.
    4GB of HDD space is barely enough to get a full-fledge desktop going.

    xboxrulz

    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.

  3. i dont really know if it really works for fedora but it sure works for slackware.edit your /etc/rc.d/rc.local and add the program and the options you want to run on startup.

    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. :)

  4. I have an old computer that I mainly use for browsing and im. It runs pretty slow on Win2K and I've heard that it's good to use linux OS for slow computers. Would I be able to use softwares such as Firefox, AIM, and Adobe programs under linux?

    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. :)

  5. 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")...



  6. 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. :)


  7. Please help me with configurating bind dns server.

    I configured it for internet domain names resolving (forwarder) and local domains resolver (xxxxx.ds) now I need that dns resolve internet domain as I want. cs.kuban.tv as 192.168.144.200 instead of 213.132.64.34, I don't know how to do it. DNS server I forward request to, resolve it as 213.132.64.34.

    What I should write in config file?

    Slackware linux 10.2 / BIND 9.

    Thanks for all who will reply. :)

     


    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.


  8. Hey guys I'm using Fedora Core 5, I was wondering if its possible to mount two hardrives (hdb and hdd on my system) on one folder using /etc/fstab.... if I just mount them with default options on the same folder the newest mounted takes over the folder and nothing on the older mount can be seen

    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

  9. I first tried Linux a few years ago, not because I was completely against Windows or anything like that, but just because I had some free time on my hands. I started off with Mandrake 9.0 which was very user friendly and Windows-like. After reading through a bunch of message boards and learning which distros are good for what, I soon realized my current distro was great for Linux noobs. So then I decided to try something a little more advanced like Slackware which I knew had a steep learning curve.
    Since then I've been using Slackware as my main OS and couldn't be happier. Of course somethings are a pain in the *bottom* to configure, but that;s Slack for you. If it ain't hard, then you won't learn anything from it.

    That's my story, I basically started to learn Linux because I was bored.


    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.

  10. 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:

    %module parapin

    %{

    #include <parapin.h>

    %}

     

    int pin_init_user(int lp_base);

    #define LPT1 0x378

    #define LPT2 0x278

     

    void set_pin(int pins);

    void clear_pin(int pins);

    void change_pin(int pins, int state);

    #define LP_CLEAR 0 /* for change_pin */

    #define LP_SET 1 /* for change_pin */


    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:

    all: _parapin.so

     

    _parapin.so: parapin_wrap.o

    gcc -o _parapin.so -shared parapin_wrap.o -lparapin

     

    parapin_wrap.o: parapin_wrap.c

    gcc -fpic -c parapin_wrap.c -I/usr/include/python2.4/ -I/usr/local/include

     

    parapin_wrap.c: parapin.i

    swig -python parapin.i

     

     


    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?


  11. Hi...
    First of all I know that this place isn't best for this, but this fits into 3 different categories so I decided to place it in main category... If it fits somewhere else better, I don't mind moving it somewhere else...

    So now the case.

    We (I and few other people I know) are working on 3D engine... exactly we want to create engines for 3 platforms (Linux, Windows, Mac OS) that would have one scripting interface so we decided to integrate one of those three script languages with C++ engine to make it more portable. I was searching for some infos that would compare those 3 scripts, but with no luck... (probably I was searching to short)...

    Please help me - which language should I choose to get best results (especialy it's about speed but also easy of use). If you can write pros and cons while you vote I would be greatful

    Thanks.

    PS.: I know java and python but never was using them with C++, so this is new land for me...


    My vote is for python. First of all, similar application exists - blender, and internally uses python. Second, create binding to external library is very easy using SWIG.

  12. If you were to create your very own game what kind of genre would it be?

    I think of mixture of all genres :), general scenario in RPG style, periodical campaign in strategic genre, but some part of it in first person shooter or simulator style, dependent of particular character.

    :D

  13. Ummmmm, well they all show up together.
    Does it matter what type of inbox I use, like Global Folder or Local Folders, something like that at all?


    There should be options in preferences where store sent mail. Check it, maybe right option just lost.

  14. What is the spec of your pc ?
    My main computer has:

    Windows XP Media Center Edition
    1024 MB RAM
    Wireless LAN
    200GB HDD
    Ati - Fire Gl 100-505090 Ati Fire Gl V7100 graphics card
    Dual Monitor Output

    what do you think? I want to upgrade it soon


    processor : 0
    vendor_id : GenuineIntel
    cpu family : 15
    model : 3
    model name : Intel® Pentium® 4 CPU 2.80GHz
    stepping : 4
    cpu MHz : 2793.641
    cache size : 1024 KB
    fdiv_bug : no
    hlt_bug : no
    f00f_bug : no
    coma_bug : no
    fpu : yes
    fpu_exception : yes
    cpuid level : 5
    wp : yes
    flags : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe constant_tsc pni monitor ds_cpl cid xtpr
    bogomips : 5592.94

    Disk /dev/sda: 200.0 GB, 200049647616 bytes
    255 heads, 63 sectors/track, 24321 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes

    Device Boot Start End Blocks Id System
    /dev/sda1 * 1 1217 9775521 c W95 FAT32 (LBA)
    /dev/sda2 1218 1230 104422+ 83 Linux
    /dev/sda3 1231 2441 9727357+ 83 Linux
    /dev/sda4 2442 24321 175751100 5 Extended
    /dev/sda5 2442 2564 987966 82 Linux swap / Solaris
    /dev/sda6 2565 24321 174763071 8e Linux LVM

    Video embedded :)

  15. I would like both my linux machine to see my windows machine and vice versa.... I got samba installed on ubuntu, but I cant get my windows pc to see it in my network, anything I should check?

     


    Check the workgroup option in /etc/samba/smb.conf file. Workgroup names for both machines should be equal.

  16. Alright, I'm currently creating an interface program for a MS Access database. I've only used Access once in the past but used other DB's a handful of times so I didn't have any trouble getting the general program created. My issue arose when I tried to make it so that the users needing to use the program can just copy the .exe and the .mdb files and use it.
    The program doesn't require users to share the database but to store their OWN programs information in their OWN database, so basically each needs to have their own database with the exact same design. The original plan was to just get them to copy over a near empty .mdb with the design set up and have them slowly create their own dataset with it. However, upon copying these files between my computer and others it ends up allowing my interface program to retrieve data from the DB but not write any new entries to it. All security permission on the file itself are set to allow read/write to everyone so I'm not sure what's causing this. Is there any other security settings I should worry about? Everything I could find within access seemed to be set so that it could be used freely so I'm not sure what the problem is. Any help would be greatly appreciated.


    The problem may be in versioning. Check DB engine's versions at user's machine.

  17. Well xboxrulz, I have already tried that. Still no change. I was using GNOME first. After struggling for some time, I switched to KDE. But the problem persisted. I did change the mouse pointer settings, still no use....

     

    The joke is the busy pointer gets displayed!!! (That was displayed when I double clicked on an item and the application was yet to open...)

     

    I'm really puzzled. While booting up, till the login screen comes, the mouse pointer will be very much present. But soon after the Login screen appears, the mouse pointer disappears! :)

     


    Try to delete whole user home directory, then create it from scratch. If problem was in some config, this should help.

  18. There are almost no more real-time operating systems.

    Windows is not.

    Some Unix systems had real-time extensions.

    A real-time operating systems has to do some tasks immediately (stop the engine because of danger, immediately turn righwards because an obstacle in front, stop the laser beam because an alert signal arrived).

    While a Windows or a Linux system is swapping, or when the cpu is 100% used because somebody is moving the mouse, no real-time action can take effect.

     

    This is common mistake. Real timeness is't about speed. But rather about predictivness. In realtime OS every operation and function operates in constant and predefined time. In common case realtime OSes slower then nonrealtime ones.
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.