flat assembler
Message board for the users of flat assembler.

flat assembler > Heap > Interesting article about taboos in programming.

Goto page 1, 2  Next
Author
Thread Post new topic Reply to topic
JohnFound



Joined: 16 Jun 2003
Posts: 3500
Location: Bulgaria
Here is an interesting article about taboos in common programming practices.
The authors are: Lindsay Marshall and James Webber.
This article was mentioned by R.Hyde in ALA newsgroup, but I decided to post it here as well, because the article is interesting from the assembly programming point of view.

Also, I am sure, most of the assembly programmers will perceive this article not the same way as most of the HLL programmers.
It is interesting to read your opinions.

Regards.


Description: "Gotos Considered Harmful and Other
Programmers’ Taboos" by Lindsay Marshall and James Webber.

Download
Filename: 699.zip
Filesize: 22.85 KB
Downloaded: 511 Time(s)

Post 23 Apr 2005, 06:54
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
rea



Joined: 14 Nov 2004
Posts: 92
If you whant to take a look

http://www.massey.ac.nz/~kahawick/159331/Goto-Harmful-Dijkstra.pdf

And a set of anotations of some guy over the same paper http://david.tribble.com/text/goto.html

Is interesting what is here at the end ?? http://www.cs.utexas.edu/users/EWD/transcriptions/EWD13xx/EWD1308.html

Another taboo is the way programming is teached today, you think a programmer writing like Djikstra write a planification and solution of a problem???, you know I think is more test and debug Wink than understand the code/problem.



Ok, now I think that goto statement is harmfull if you dont know what you are doing.

In the time of Djikstra where no exist the suficient (some one clarify this?) base for understand structured programming (or it dosent exist at all?) he write in his paper something like "the more gotos used the more poor the programmer is", but what happen if a programmer use gotos and the control flow obtained with his writing/structure is exactly the same that is obtained with the statements if/then/else/while/for/wend.... or structured programming, mean that is a poor programmer?, if that, mean that the if/else and other statements that have the same impact are also poor?, hope you get the idea, sure not make eavely use of goto statements dosent make a programmer poor, what make it poor is not know the impact of the statements, but peraphs if you have a more easy way to get it done with if/else/etc (with the short mnemoic way.. why not consider those statements to mnemonics for control? they are more aids for the mind).
Post 23 Apr 2005, 15:44
View user's profile Send private message Reply with quote
smiddy



Joined: 31 Oct 2004
Posts: 559
Interesting read...I suppose most on this forum are opoptic in their calling. With the religious overtones was interesting too. Everyone is always trying to please the boss, who inevitibly will say your stuff is good or it stinks. If the boss' conception of convention is such that limits their insight, then, I suppose there are taboos. I suppose I'm lucky I work with people who're open minded and willing to accept non-conventional practice in order to find a solution to engineering problems.
Post 23 Apr 2005, 17:14
View user's profile Send private message Reply with quote
xanatose



Joined: 09 Jan 2004
Posts: 57
if,else,for,while etc. All are disguised gotos with disguised labels and a comparison.

I would really hate to work with someone that have the habit of labeling something like 'bad', just because someone else told him that is it, instead of coming with a valid argument.

In C++ use it only when necesary. There are some issues with exception handling and goto.

In C use it when convenient or necesary. There are some readability issues if you use them too much.

In ASM use them everywhere Smile

Bottom line, like it or not, you are still using goto, only in disguise. Using them will not make you a better or worse programmer.
Post 27 Jun 2005, 17:35
View user's profile Send private message Reply with quote
rugxulo



Joined: 09 Aug 2005
Posts: 2341
Location: Usono (aka, USA)
Sorry if bumping this thread bothers anyone, but I've discovered that a LOT of popular C/C++ programs use goto:


  • Descent 1 and 2
  • Duke Nukem 3D
  • OpenWatcom WASM 1.5
  • GASM 0.55
  • NASM 0.98.38 and 0.98.39
  • GNU diff 2.8.7
  • GNU sed 3.02.80 and 4.1.5
  • GNU ed 0.2
  • PPMd (var. J)
  • BZIP2 1.03
  • ZLIB 1.2.3
  • TDE 5.1t
  • SET-EDIT 0.5.4
  • CWSDPMI r5
  • NDIR 2.27 and 2.28
Post 12 Aug 2006, 02:34
View user's profile Send private message Visit poster's website Reply with quote
scientica
Retired moderator


Joined: 16 Jun 2003
Posts: 689
Location: Linköping, Sweden
rea wrote:
Ok, now I think that goto statement is harmfull if you dont know what you are doing.

Goto is probably most HLL's "lowest" instruction, ie, a wrapper to "jmp", and as we all know, the lower you get, the more control you gain, with control comes power, power is a force, and if you don't know how to use the force you shouldn't perofrm laser surgery with light sabres (<--obscure reference to an Family Guy episodes 'cut scene' (featuring said weapon, Luke and Obi and a patient)) Razz

Seriously, the reason why goto has such a bad reputatioj in C/C++ is (afaik) that it was used more often than not to write "spaghetti code", which is code that's held to gether only by the dwarfs pushing electrons around and quantum cohesion. In languages like BASIC goto is often one of the first instructions learned (after the label and print Wink). But when it comes down to basics, goto is nothing more thatn a plain 'jmp', and we, unlike those who only do HLLs, "know" how to use jmp (ie "sane"). Further more, I thyink you can think of break and continue as a kind of goto/jmp too (ie break = goto <end of block> )

rugxulo, I've seen a few ncurses apps use goto too to save space and prevent dying horribly (<- good use of goto), ie, depending on where an error ocurs it jumps to the 'right' place in the "exit-nicely" code (eg, past endwin() if initscr() failed (irc in some implementations invoking endwin() prior to (a successful) initscr() would segfault), or to the part that delete's the panels) Smile

_________________
... a professor saying: "use this proprietary software to learn computer science" is the same as English professor handing you a copy of Shakespeare and saying: "use this book to learn Shakespeare without opening the book itself.
- Bradley Kuhn
Post 12 Aug 2006, 10:17
View user's profile Send private message Visit poster's website Reply with quote
f0dder



Joined: 19 Feb 2004
Posts: 3170
Location: Denmark
scientica wrote:

(irc in some implementations invoking endwin() prior to (a successful) initscr() would segfault),

Sounds like pretty poor code design >_<


Last edited by f0dder on 12 Aug 2006, 20:22; edited 1 time in total
Post 12 Aug 2006, 10:46
View user's profile Send private message Visit poster's website Reply with quote
scientica
Retired moderator


Joined: 16 Jun 2003
Posts: 689
Location: Linköping, Sweden
yeah, ncurses is awfull, please, if you know of any good (and documented!) text ui api please tell me -- ncurses is awfull, but I know of no other alternative (well, there's s-lang, but wtf is the docs? tuts? howtos? examples? :/ ).
And for some reason when every other curses app work with TERM=xterm, I have to do TERM=xtermc, xterm-color, linux or screen (screen-bce b0rks, I suspect BCE (back color erase)) to get it partially working (otho, overriding LINES and COLUMNS seems to work just as well :/)

wait...did I say "good", I meant "working"...

btw, most of the ncurses functions are macros (well, at least that what the docs say :S ). Times like this makes me think the UI part win32 API is a good design(btw, how's win64 doing it? did they decide on letting WORD grow to 32-bit? (I've decided not to defile my amd64 with win64 so I haven't checked))
Post 12 Aug 2006, 11:03
View user's profile Send private message Visit poster's website Reply with quote
f0dder



Joined: 19 Feb 2004
Posts: 3170
Location: Denmark
It really surprises me the terminal code in linux sucks so much (or is it *just* because of ncurses?).

I mean, for fscks sake, I coded an ANSI-espace-sequance handler in pascal/16-bit-asm that allowed smooth playback on a 486. Even when not running over SSH (hell, running local terminal) on a p2-mmx-350 (my testbox) or p3-celeron-1.3 (my fileserver@mums place) or p4-whatever-fast (new fileserver I set up for the museum where I work), curses stuff lags terribly.

Opening the (textmode) console buffer directly ought to give sorta decent speed, but then your apps obviously won't be as portable, and won't work across SSH - sigh.

The GUI design of windows is IMHO pretty okay, although the win32 API kinda sucks (in the "it's got too much leftovers from win16" way; it's versatility is still better than POSIX/X stuff. NT native API seems more interesting, though.) - it's scary how much the XFree/XOrg implementations suck. Even with the proprietary nvidia modules loaded, my box lags when resizing one of the simple marble games that comes with Ubuntu.

Haven't really looked at Win64, I find 64bit mainly uninteresting for normal use...
Post 12 Aug 2006, 20:28
View user's profile Send private message Visit poster's website Reply with quote
rugxulo



Joined: 09 Aug 2005
Posts: 2341
Location: Usono (aka, USA)
Well, isn't it from Fortran that goto originated plus BASIC (which Fortran spawned), neither of which had decent conditional structures at the time? (Obviously, both languages have evolved since then.) Anyways, some languages (e.g., Oberon) supposedly don't even have goto.
Post 13 Aug 2006, 02:44
View user's profile Send private message Visit poster's website Reply with quote
scientica
Retired moderator


Joined: 16 Jun 2003
Posts: 689
Location: Linköping, Sweden
goto on_topic: ; for those with no patience with OT Wink
f0dder wrote:
It really surprises me the terminal code in linux sucks so much (or is it *just* because of ncurses?).

I mean, for fscks sake, I coded an ANSI-espace-sequance handler in pascal/16-bit-asm that allowed smooth playback on a 486. Even when not running over SSH (hell, running local terminal) on a p2-mmx-350 (my testbox) or p3-celeron-1.3 (my fileserver@mums place) or p4-whatever-fast (new fileserver I set up for the museum where I work), curses stuff lags terribly.

Opening the (textmode) console buffer directly ought to give sorta decent speed, but then your apps obviously won't be as portable, and won't work across SSH - sigh.

I'd like to think it's ncursed...
I think much of the ANSI problem is that basically every "terminal" is actually only an emulator (eg xterm beeing a VT100 ("up to" VT220 afaik) emulator). Also, for some odd reason, starting xterm takes a few seconds of 100% CPU (I suspect it's some of my crazy CFLAGS or prelink'ing that causes that, as it starts fast on other machines), and from what I've seen there seems to be one standard per historical terminal system (one for VT100, VT220, DOS, ... )
I wonder, maybe I'd be better off writing my own ANSI-abstraction (relying on XTerm's own docs on it's ANSI escape code support) - but, that'd be "one more wheel to re-invent".

f0dder wrote:
The GUI design of windows is IMHO pretty okay, although the win32 API kinda sucks (in the "it's got too much leftovers from win16" way; it's versatility is still better than POSIX/X stuff. NT native API seems more interesting, though.) - it's scary how much the XFree/XOrg implementations suck. Even with the proprietary nvidia modules loaded, my box lags when resizing one of the simple marble games that comes with Ubuntu.

Haven't really looked at Win64, I find 64bit mainly uninteresting for normal use...

X has many many many design flaws (but I still like it in a bdsm way, just as some like the windows paradigm Wink), it seems to be a (bad) design that the GUI locks while moving/resizing windows, I've tried Xgl, and that's a whole new experience - in short "smooooth!", sadly I'll have to wait till KDE4 (or kde-window-decorator, sans my trivial 1 line patch to keep it from exiting since it "isn't ready for use"(ie, it doesn't decorate, but handles windows)) - the problem wasn't that I didn't have any titles (I kind liked that actaully) but Xgl isn't stable enough for me :/ - Xlg/AIX looks promising, but alas, we're stuck with X for now (but luckily as X modulized developpment is speeding up - (afaik) the monotholic X was a hell-hole to compile and develop(make a small change rebuiild *everything*), now it seems it just a depency-headace to compile and a headace to develop - small, but still progress Wink)
Speaking of ubuntu, I'm trying Kubuntu on my laptop, I'm surprised over how well it behaves (otho, still as with any other "High Level Distro" it got a few queer deps (like one to PPP libs when I've opted out all PPP et al) - but, I'm just used to the gentoo way (otho getting anything in to the portage is a slooow process (well, not all of the time, I manged to get (i)use flag added)).
(ot, I get good performance with nvidia here, ut2004 plays smooth, but then again, I'm also using Con Kolivas patches, btw, CFQ-default made it to mainlaine \(^_^)/ )

Wonder if there's any project for creating a API for linux (a nice name would be "LAPIs" (http://en.wikipedia.org/wiki/Lapis_lazuli)), one that picks the good part of Win32/NT API. (I think WINE got some libwine, but I don't think that's it's purpose).

on_topic: ; sorry, (almost) nothing here Razz
rugxulo, I've never learned FORTRAN (nor it's history) so you're probably right there.

_________________
... a professor saying: "use this proprietary software to learn computer science" is the same as English professor handing you a copy of Shakespeare and saying: "use this book to learn Shakespeare without opening the book itself.
- Bradley Kuhn
Post 13 Aug 2006, 08:23
View user's profile Send private message Visit poster's website Reply with quote
f0dder



Joined: 19 Feb 2004
Posts: 3170
Location: Denmark
Well, obviously ANSI is "emulated", or should we rather say, "software emulated". What makes me wonder is HOW linux/curses (whichever one of them it is) can do it so badly (see my former remarks). Iirc the linux "native" terminal is VT100... if that supports color and other escape codes, it would be interesting to write something "raw" for that, and see if it's still slow.

I guess part of the nCURSEs Wink problem is that it, if I'm not mistaken, uses some form of "terminal description database". I never looked deeply into this, but it seemed to be in some text format, and I wouldn't be surprised if this additional layer is shoddily written.

ANSI support, at least a partial subset that's fully usable (ie., not having to support sound escapes) isn't that much work. If you used more than 1.000 lines of assembly for the core, something would be very wrong.

PS: prelinking sucks. It voids the advantages of dynamic linking. Is ELF dynlink really so inefficient that this is necessary? >_<

I haven't coded for X, so can't really say anything about the API. From the "end-user" perspective it's messy, though (well, XFree and XOrg - perhaps some of the commercial unix implementations are better). If you start an X app from a terminal, it's usually going to spam a lot of info on the terminal. And the resize sluggishness... 50% CPU usage on a dualcore AMD64? Eek. I'm, again, wondering if this is a problem with the X11 protocol, or just the implementations.

A few years back, it was faster & smoother to use the X-Win32 server and do remote display, than running natively on the linux box (sure, somewhat better graphics card in the windows box, but everything used to run smoothly on windows with the old graphics card that was then moved to the linux box).

I guess what pisses me off most about linux is that it's next to impossible to get another "alternative OS" to get attention now; all of the resources are spent on linux. This is pretty unfortunate, with the direction MS is taking with Vista and all, we really do need an alternative. IMHO linux just isn't there, yet. It's too "clunky", even the "friendly desktops" aren't friendly enough for a big part of "normal users", the whole GPL zealot attitude scares developers away, etc.

scientica wrote:

Wonder if there's any project for creating a API for linux (a nice name would be "LAPIs" (http://en.wikipedia.org/wiki/Lapis_lazuli)), one that picks the good part of Win32/NT API. (I think WINE got some libwine, but I don't think that's it's purpose).


Could be interesting. I really ought to pick up a copy of the POSIX reference and see what it's like... I somehow have the impression that to do "interesting stuff", you need non-posix stuff. The Win32 API might be a non-orthogonal mess, but it does offer you all the basic building blocks you need, and a lot of control for those blocks.

Now, if Linus had cloned something sophisticated like VMS instead of doing uncontrolled mushroom-growth of minix...

_________________
Image - carpe noctem
Post 13 Aug 2006, 12:23
View user's profile Send private message Visit poster's website Reply with quote
scientica
Retired moderator


Joined: 16 Jun 2003
Posts: 689
Location: Linköping, Sweden
f0dder wrote:
Well, obviously ANSI is "emulated", or should we rather say, "software emulated". What makes me wonder is HOW linux/curses (whichever one of them it is) can do it so badly (see my former remarks). Iirc the linux "native" terminal is VT100... if that supports color and other escape codes, it would be interesting to write something "raw" for that, and see if it's still slow.

I guess part of the nCURSEs Wink problem is that it, if I'm not mistaken, uses some form of "terminal description database". I never looked deeply into this, but it seemed to be in some text format, and I wouldn't be surprised if this additional layer is shoddily written.

iirc it's called "termcap"/"terminfo", it's a bilion files /usr/share/terminfo/[0-9a-z]/. Well, the kernel is hardly at fault, it's likely either xterm or ncurses.

f0dder wrote:
PS: prelinking sucks. It voids the advantages of dynamic linking. Is ELF dynlink really so inefficient that this is necessary? >_<

for things like KDE3 it makes a difference (at least pre gcc 4.1 with visibillity-hiding (iirc that's supposed to cut "some" fat of the runtime linking))

f0dder wrote:
I haven't coded for X, so can't really say anything about the API. From the "end-user" perspective it's messy, though (well, XFree and XOrg - perhaps some of the commercial unix implementations are better). If you start an X app from a terminal, it's usually going to spam a lot of info on the terminal. And the resize sluggishness... 50% CPU usage on a dualcore AMD64? Eek. I'm, again, wondering if this is a problem with the X11 protocol, or just the implementations.

well, depends on the app (ie, I think GNOME/Gtk way way worse than KDE3/Qt3 at spamming)
Well, I'd geuss the implementation, as Xgl is better in that part (iirc no 100% cpu while moving, and that's with all the fancy special effects turned on (and the distored window was repainted while beeing moved). The advantage of X is it's network transparency, but that's probably one of the roots of it's performance problems.

f0dder wrote:
A few years back, it was faster & smoother to use the X-Win32 server and do remote display, than running natively on the linux box (sure, somewhat better graphics card in the windows box, but everything used to run smoothly on windows with the old graphics card that was then moved to the linux box).

I guess what pisses me off most about linux is that it's next to impossible to get another "alternative OS" to get attention now; all of the resources are spent on linux. This is pretty unfortunate, with the direction MS is taking with Vista and all, we really do need an alternative. IMHO linux just isn't there, yet. It's too "clunky", even the "friendly desktops" aren't friendly enough for a big part of "normal users", the whole GPL zealot attitude scares developers away, etc.

Well we could always start using ReactOS Razz

Well, now days, as a "normal" user to install windows, well, I don't think the poor bastard would be able to do it (and I doubt it'd make any difference of ine s/windows/linux/ here, installing OS just isn't for "normal users", just like normal people aren't expected to change engine of their cars (now days you almost need to be a greese monkey "just" to change a light bulb in a car (in a few years it will requre one to first lift out the engine....)))
f0dder wrote:
scientica wrote:
Wonder if there's any project for creating a API for linux (a nice name would be "LAPIs" (http://en.wikipedia.org/wiki/Lapis_lazuli)), one that picks the good part of Win32/NT API. (I think WINE got some libwine, but I don't think that's it's purpose).


Could be interesting. I really ought to pick up a copy of the POSIX reference and see what it's like... I somehow have the impression that to do "interesting stuff", you need non-posix stuff. The Win32 API might be a non-orthogonal mess, but it does offer you all the basic building blocks you need, and a lot of control for those blocks.

well, I'm no expert on posix, but, afaik it only defines a baseline of C functions and structs (eg, open(), read(), close()), many "gnu" apps has a --posix wich i makes it act posixly, ie killing any extensions.

_________________
... a professor saying: "use this proprietary software to learn computer science" is the same as English professor handing you a copy of Shakespeare and saying: "use this book to learn Shakespeare without opening the book itself.
- Bradley Kuhn
Post 13 Aug 2006, 15:36
View user's profile Send private message Visit poster's website Reply with quote
0x4e71



Joined: 25 Feb 2004
Posts: 50
win32 is a mess indeed, but there is at least a small subset of pretty damn useful functions. I'm sure that if we start a discussion here we could come up with a wish-list.
Maybe for a resource like a list of win32-to-linux equivalents, or indeed a library.

Just off the top of my head:

I don't know if there is a posix (or Linux for that matter) equivalent to VirtualAlloc(), I find it a tremendously useful function, especially the possibility of allocating a chunk of address space without committing pages to it, then allocate memory to it later as buffers grow...

All of the Console functions, you have ONE reasonable way to read everything, key events, state of SHIFT/CTRL/ALT (try that on unix without ioctl and other horrible tricks), mouse events, console resize events. Plus access to attributes and block commands for output. A+


MessageBox() Razz

Abominations such as CreateFile() (contra-intuitive name, 7 parameters, deprecates _lopen) and ImpersonateNamedPipeClient() are not in scope for me Wink


/L
Post 13 Aug 2006, 17:10
View user's profile Send private message Reply with quote
f0dder



Joined: 19 Feb 2004
Posts: 3170
Location: Denmark
scientica wrote:

iirc it's called "termcap"/"terminfo", it's a bilion files /usr/share/terminfo/[0-9a-z]/. Well, the kernel is hardly at fault, it's likely either xterm or ncurses.

Yeah, termcap/info sounds about right. The lag happens both remotely (PuTTY), local (xterm/derivates as well as a "raw" linux console)... oh well.

scientica wrote:

for things like KDE3 it makes a difference (at least pre gcc 4.1 with visibillity-hiding (iirc that's supposed to cut "some" fat of the runtime linking))

Yeah, it did seem to make a little difference when I played with it on a test gentoo install. The point is that it shouldn't make a difference, and shouldn't need to be done. Would be interesting if somebody profiled the load stage of some apps and found out where the bottleneck is. There has to be more to it than just plain dynamic binding... unless there's some really retarded code in the ELF loader. I guess windows has an advantage in requiring the PE exports to be sorted, so it can do a binary search... does ELF do the same?

scientica wrote:

Well, I'd geuss the implementation, as Xgl is better in that part (iirc no 100% cpu while moving, and that's with all the fancy special effects turned on (and the distored window was repainted while beeing moved). The advantage of X is it's network transparency, but that's probably one of the roots of it's performance problems.

Interesting, I guess I ought to test out Xgl (not very intuitive that there's both Xgl and glX, which are different things Smile). My Ubuntu test install was nuked since I needed the disk for something else, but I guess I have some other disk lying around... And yeah, network transparancy is cool, I just hope there's some really efficient special-path socket stuff going on locally, otherwise there's a lot of waste moving buffers around etc.

scientica wrote:

Well we could always start using ReactOS Very Happy

*grin* - I actually think it's a pretty worthwhile project. The NT kernel *is* a solid piece of engineering, it's all the win32 fluff and badly coded third-party applications that are troublesome.

scientica wrote:

Well, now days, as a "normal" user to install windows, well, I don't think the poor bastard would be able to do it (and I doubt it'd make any difference of ine s/windows/linux/ here, installing OS just isn't for "normal users", just like normal people aren't expected to change engine of their cars (now days you almost need to be a greese monkey "just" to change a light bulb in a car (in a few years it will requre one to first lift out the engine....)))

Oh, but I wasn't talking about installing, I was talking about daily use (both windows and linux are generally easy enough to install for power++ users, although linux is at a bit of a disadvantage because most distros gives you a lot of install choices). Power users shouldn't have much trouble using linux for most stuff, but it would be a bad idea trying to get my mum or the museum people to use it...

scientica wrote:

well, I'm no expert on posix, but, afaik it only defines a baseline of C functions and structs (eg, open(), read(), close()), many "gnu" apps has a --posix wich i makes it act posixly, ie killing any extensions.

Hm, I thought posix also defined memory mapped files and threads? If it doesn't even have that... eek.

_________________
Image - carpe noctem
Post 13 Aug 2006, 17:17
View user's profile Send private message Visit poster's website Reply with quote
f0dder



Joined: 19 Feb 2004
Posts: 3170
Location: Denmark
0x4e71 wrote:

I don't know if there is a posix (or Linux for that matter) equivalent to VirtualAlloc(), I find it a tremendously useful function, especially the possibility of allocating a chunk of address space without committing pages to it, then allocate memory to it later as buffers grow...

I think the linux equivalent of VirtualAlloc would be mmap()... just hope it's done differently than on windows, pagefaults are expensive.

0x4e71 wrote:

All of the Console functions, you have ONE reasonable way to read everything, key events, state of SHIFT/CTRL/ALT (try that on unix without ioctl and other horrible tricks), mouse events, console resize events. Plus access to attributes and block commands for output. A+

ioctl() isn't *that* horrible, as long as it's documented. Of course I prefer named API calls instead of direct ioctl(), but you can always write wrappers. It's all about r3->r0->r3 in a controlled manner, anyway. Haven't traced/disasmed the console APIs on NT, but I wouldn't be surprised if they end up sending IRPs to a device driver.

0x4e71 wrote:

Abominations such as CreateFile() (contra-intuitive name, 7 parameters, deprecates _lopen) and ImpersonateNamedPipeClient() are not in scope for me Wink

CreateFile should really have been named CreateObject Razz. It's a bit over the top in some ways, but on the other hand, it offers you a shitload of functionality... cache hints, buffered vs. unbuffered, security, ...

I like the idea of ACLs instead of simple user:group permissions - it's more flexible, even though it also gives you greater flexibility of ways in which to shoot yourself in the foot Wink

_________________
Image - carpe noctem
Post 13 Aug 2006, 17:26
View user's profile Send private message Visit poster's website Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7108
Location: Slovakia
Quote:
I think the linux equivalent of VirtualAlloc would be mmap()... just hope it's done differently than on windows, pagefaults are expensive.

isn't it libc thingy? only linux system call dealing with memory allocation i have found is brk()... which is scaring me away, if i have to code my own memory handler without use of paging.

windows sucks in many ways, just as linux. Windoze's biggest problem is that it's so mass-user oriented, if they wouldn't make such I-cant-read idiots of users, it would be IMO by time better than linux with all MS's potential .

and also they would need to put real people into charge, not some idiotic braindead managers, but that's problem of entire society
Post 13 Aug 2006, 18:33
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7108
Location: Slovakia
sorry, mmap IS system call (no. 90 dec)
Post 13 Aug 2006, 18:55
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7108
Location: Slovakia
Quote:
Sorry if bumping this thread bothers anyone, but I've discovered that a LOT of popular C/C++ programs use goto:

not to forget linux sources...
Post 13 Aug 2006, 19:02
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
rugxulo



Joined: 09 Aug 2005
Posts: 2341
Location: Usono (aka, USA)
Wow, you're right, even the very first version of Linux had 'em. Very Happy

unzip -qq linux001 -d linux & cd linux & xgrep -ric "goto " *.* | find /v ":0"
Code:
FS\BUFFER.C:3
FS\INODE.C:1
KERNEL\EXIT.C:1
KERNEL\FORK.C:1
KERNEL\HD.C:1
KERNEL\SCHED.C:1
KERNEL\VSPRINTF.C:5
    
Post 13 Aug 2006, 19:44
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  
Goto page 1, 2  Next

< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Copyright © 1999-2019, Tomasz Grysztar.

Powered by rwasa.