View Full Version : The Off Topic Programming Thread!
Dygear
15th April 2006, 13:13
... Let the off topicness begin!
What is your most hated function call?
For me it's preg_match in the PHP Programing Langue, I just don't get it, however many times I read the manual.
colcob
15th April 2006, 13:16
Yeah, I have failed to get reg expressions full stop. I mean I know in principle what they do, but arggh that syntax does my head in.
the_angry_angel
15th April 2006, 13:23
Regular expressions are definately one of those things that drive me nuts, as well. Unfortunately I have to use a variety of editors, both personally and at work - all of which have radically different regex markup. For instance ^p in Ultra Edit for a newline, instead of \n.
If you start using something like gVim, or Scite with a decent RegExp search and replace, you do start learning it more. Often though, I have to resort to testing things on my regexp tool :(
Currently the functions doing my head-in, are in the APR-Util bucket and brigade module (http://apr.apache.org/docs/apr-util/group___a_p_r___util___bucket___brigades.html). It makes sense, until you want to run a transform on the whole set of data, instead of a chunk :( Although I love the new Apache HTTPD filter system, its rather different and confusing for a few days (since it relies on APR buckets and brigades).
Edit: if anyone knows the best way to do the above, please give me a shout :)
filur
15th April 2006, 15:13
Regular expressions are by far my favorite tool. :)
Very tricky to get used to, but once you're there pretty much any other string parsing thingie seems completely useless. The only problem is when expressions get very long. :)
@Dygear, sections on regular expressions in the PHP manual is basically for people who already know how to use them, it's more just a list of modifiers and basic syntax, google for some tutorials or buy a book instead, it'll be worth it.
Most hated function call? fork(), it doesn't work on Windows. (PHP)
<?php
$str = stream_get_contents(fopen("http://liveforspeed.net","r"));
echo preg_replace(array(
"/\n/ms",
"/<.[^>]*>/ms",
"/.*April.[^W]*|(?=\!).*/ms",
"/a(r)e/",
"/th(?=[ai])/"
),
array(
" ",
"",
"",
"\\1",
"d"
),
$str) . "!!1! (rly?)\n";
?>
sdether
15th April 2006, 17:01
Regular expressions are by far my favorite tool. :)
Same here. It's the reason i got into perl in first place. I admit that regex is a pain in almost every other language, but it just part of the landscape in perl.
Most of my programming now revolves around building object models, but when someone hands me a text file and needs the data to be converted into something else, or have something extracted from it, I always whip up a perl script to do the regex and write the data out in a format that's easier to parse for my other code.
Dygear
16th April 2006, 12:59
Thanks filur :). I'll look more into the function as well, see what it does ...
[edit] ... LOL The script tosses this out " We r pleased to announce dat there will be an important S2 update dis month!!1! (rly?) " ...
Dygear
16th April 2006, 20:37
Parsing Packets With PHP (Cool Title Don't Ya Think - God I Need To Get A Life.)
Anyway, I have been playing around with the code that was posted on the fourms here not to long ago by our resident PHP InSim Guru filur. Anyway, in his exprament he simply took the first 3 charaters from the packet and added a little Keanu Reeves 'Whoa' to it then thow it out for us all to see. But it only had the packet identifier, it did not have information on what the packet really had in it.
So this it my (failed) attemp to read a LAP packet from the server using PHP.
<?php
stream_set_blocking( $socketOut = fsockopen( "udp://127.0.0.1", 65000 ), FALSE );
stream_set_blocking( $socketIn = stream_socket_server( "udp://127.0.0.1:64999", $errno, $errstr, STREAM_SERVER_BIND ), FALSE );
fwrite( $socketOut, "ISI\0" . pack( "Scc", 64999, 1+8+16+32, 1 ) . str_pad( "asdf", 16, "\0" ) );
$time = microtime( TRUE );
while( microtime( TRUE ) - $time < 30 )
{
if( $packet = fread( $socketIn, 1024 ) )
{
$time = microtime( TRUE );
switch( substr( $packet, 0, 3 ) )
{
case 'LAP':
$LAP['LAP'] = substr( $packet, 0, 3 );
$LAP['UName'] = substr( $packet, 4, 28);
$LAP['PName'] = substr( $packet,29, 33);
$LAP['CName'] = substr( $packet,34, 66);
$LAP['Time'] = substr( $packet,67, 61);
$LAP['PlyNum'] = substr( $packet,62, 63);
$LAP['UniqueId']= substr( $packet,64, 65);
$LAP['VerifyId']= substr( $packet,66, 68);
break;
default:
echo "Packet " . substr( $packet, 0, 3 ) . " Is Unhandled\n";
}
}
usleep(100 * 1000);
}
?>
filur
16th April 2006, 20:59
So this it my (failed) attemp to read a LAP packet from the server using PHP
That's pretty similar to my thingie, tho mine isn't hardcoded like that. :razz:
Anyway, you're not using substr correctly, the parameters are string, start offset, length. You're thinking string, start offset, end offset, which isn't right.
$LAP['UName'] = substr( $packet, 4, 28);
Will actually read 28 bytes from offset 4, not the range 4 - 28.
Dygear
16th April 2006, 21:03
Ahh, that explains it, should of read the manule one more time :). Thanks mate :).
[edit]
:HUGE GRIN ON HIS FACE:
$LAP['LAP'] = substr( $packet, 0, 3 );
$LAP['UName'] = substr( $packet, 4, 24);
$LAP['PName'] = substr( $packet,28, 24);
$LAP['CName'] = substr( $packet,52, 32);
$LAP['Time'] = substr( $packet,84, 4);
$LAP['PlyNum'] = substr( $packet,88, 1);
$LAP['UniqueId']= substr( $packet,89, 1);
$LAP['VerifyId']= substr( $packet,90, 1);
print_r( $LAP );
Dygear
16th April 2006, 21:44
How would I go about reading the data tho? The unpack function is not very helpful, but once more, I must be using it wrong ...
Array
(
[LAP] => Array
(
[1] => L
)
[UName] => Array
(
[1] => D
)
[PName] => Array
(
[1] => ^
)
[CName] => Array
(
[1] => F
)
[Time] => Array
(
[III] => 1125888
)
[PlyNum] =>
[UniqueId] =>
[VerifyId] =>
)
case 'LAP':
// Get Data
$LAP['LAP'] = substr( $packet, 0, 4 );
$LAP['UName'] = substr( $packet, 4,24 );
$LAP['PName'] = substr( $packet,28,24 );
$LAP['CName'] = substr( $packet,52,32 );
$LAP['Time'] = substr( $packet,84, 4 );
$LAP['PlyNum'] = substr( $packet,88, 1 );
$LAP['UniqueId']= substr( $packet,89, 1 );
$LAP['VerifyId']= substr( $packet,90, 1 );
// Make Readable
$LAP['LAP'] = unpack( "a", $LAP['LAP'] );
$LAP['UName'] = unpack( "a", $LAP['UName'] );
$LAP['PName'] = unpack( "a", $LAP['PName'] );
$LAP['CName'] = unpack( "a", $LAP['CName'] );
$LAP['Time'] = unpack( "IIII", $LAP['Time'] );
$LAP['PlyNum'] = unpack( "I", $LAP['PlyNum'] );
$LAP['UniqueId']= unpack( "I", $LAP['UniqueId'] );
$LAP['VerifyId']= unpack( "I", $LAP['VerifyId'] );
print_r( $LAP );
filur
16th April 2006, 22:00
I figured out the unpack types by trial and error, what i use is:
char: just grab raw (plain substr).
byte: signed char "c".
word: unsigned short "S", note that input must be 2 bytes.
short: signed short "s".
int: signed integer "i".
MSHT: 3x signed char "c", skipping thousands since they're never present.
The other types listed in InSim.txt that i haven't included are AFAIK only present in packets not needed in server handling, float, for example, is only used to present replay speed and FOV.
Dygear
17th April 2006, 19:28
Right, thanks mate :).
the_angry_angel
20th April 2006, 13:11
Something I've always hated, but today more than usual; reading other people's code. Unless both myself and the other programmers / coders are in a "metal-sync", I just tend to think "wtf, I wouldnt do it like that" and not get past it. Either that or I need a few days to get into the api and mindset of the coders.
VorTeX3k
20th April 2006, 15:13
Something I've always hated, but today more than usual; reading other people's code. Unless both myself and the other programmers / coders are in a "metal-sync", I just tend to think "wtf, I wouldnt do it like that" and not get past it. Either that or I need a few days to get into the api and mindset of the coders.
know this problem, too ;) but since working in a large software company, where you get some bugs assigned of which you didn't even knew the program itself you learn this very fast ;)
the_angry_angel
20th April 2006, 15:31
I've just come across some legacy code from within our firm. Its driving me nuts, which has driven me to rant about it :(
Victor
20th April 2006, 15:55
installed eAccelerator on this forum server yesterday. I'm so happy about it I wanted to praise it :)
filur
20th April 2006, 16:21
Something I've always hated, but today more than usual; reading other people's code. Unless both myself and the other programmers / coders are in a "metal-sync", I just tend to think "wtf, I wouldnt do it like that" and not get past it. Either that or I need a few days to get into the api and mindset of the coders.
Different indenting is enough to make me loathe a piece of code. :zombie: :)
the_angry_angel
20th April 2006, 16:28
installed eAccelerator on this forum server yesterday. I'm so happy about it I wanted to praise it :)
Cool :) I'll be watching with baited breathe, to see how the forum survives this time ;)
Edit: Now all you need to do is upgrade to apache 2.x and do some mod_mem_cache fu (if you can spare the memory that is) ;)
Different indenting is enough to make me loathe a piece of code.Tell me about it. I usually end up re-indenting ;)
On a different note, has anyone else tried php with ZTS enabled, stripped out any "unsafe" php modules, with the apache worker or event mpm's recently?
Dygear
20th April 2006, 17:32
Well, I am glad this thread is getting use from other's then my self!
No rants today, happy to be using PHP makes life easyer. :). <Said the noob programmer>
der_jackal
20th April 2006, 19:00
Okay, my turn for a rant, I've always, ALWAYS hated the "traidional" blocking.
if (Value){
FooBar();
}
May not seem like a big deal, but it's annoying when you're blocking huge nested statements..I think it just "looks" horrible.
switch (Irp->MajorFunction){
case IRP_MJ_DEVICE_CONTROL:
case IRP_MJ_INTERNAL_DEVICE_CONTROL:
switch (IrpStack->Parameters.DeviceIoControl.IoControlCode){
case IOCTL_SOME_DEVICE:
switch (Request->ReqeustNumber){
case REQUEST_ALLOCATE_ADDRESS_RANGE:
/*
Bunch of stuff goes here
*/
}
}
}
Just a nit pick... :D
filur
20th April 2006, 19:09
if (Value){
FooBar();
}
No indent at all? I'd refuse to read it. :)
The worst kind of indent is ..
if (Value)
{
if (otherValue)
{
hello();
}
}
And my wonderful indent looks like ..
if (Value) {
hello();
}
.. that. :)
der_jackal
20th April 2006, 19:50
I much prefer
void Foo(
IN ULONG Param1,
OPTIONAL ULONG Param2)
{
if (SOME_VALUE == Param1)
{
Bar(Param1);
}
}
IMO, just makes it SO much easier to visualize the blocks that way.
sdether
20th April 2006, 22:38
Different indenting is enough to make me loathe a piece of code. :zombie: :)
The indentation wars are the worst. When i'm using emacs, I can hit some keys and have the whole thing re-indented. But i have to refrain myself from the temptation, because it really messes with revision control, as it sees every line as changed which will come back to bite you when you try to dig for when a change entered the system.
In Visual Studio, our team has just agreed to all suffer to the MS auto-formatting. Sure it's not exactly the way any of us would do it, but at least its a consistent compromise. Although I still use 2 spaces for indent when everyone else uses 4 :)
der_jackal
20th April 2006, 22:43
Although I still use 2 spaces for indent when everyone else uses 4 :)
^ YEAH!!!!
*grumbles* Can't STAND the 4 space indenters...
Dygear
21st April 2006, 00:15
^ YEAH!!!!
*grumbles* Can't STAND the 4 space indenters...
I use the stanard tab indent of 8 spaces (Runs)
<?php
function foo_bar_tar_yar( $some_random_var )
{
if( $some_random_var == 'Your Mother' )
{
echo "No, your mother!\n";
}
}
foo_bar_tar_yar( 'Your Mother' );
?>
For me, the function name is allways proceeded by the opening parenthesis then a space, and any variables I want to pass, if more then one, then the comma is proceeded by a space and the next variable name is incerted, and so on. The squiggly brace always goes on its own line. I also tab.
the_angry_angel
22nd April 2006, 16:20
The worst kind of indent is ..
if (Value)
{
if (otherValue)
{
hello();
}
}
Bah, thats the One True Method(TM) :p Granted, I wouldn't do it with 8 spaces, but a tab. To be honest, as long as whatever editor you're using can collapse and highlight parenthesis and brackets, then its not so much of a problem :)
Dygear
23rd April 2006, 10:07
I'm actually using AutoHotkey (www.autohotkey.com (http://www.autohotkey.com)) to do that (selectively send key presses to LFS when using the joystick buttons). Unfortunately I'm not sure which method AHK uses to send the key presses. It's free, so if you don't have a problem with running an extra executable (you can convert the scripts into standalone exes), you could let AHK handle the button presses and selectively send them to either your Insim app or LFS.
Or you could check out PPJoy (http://www.geocities.com/deonvdw/Docs/PPJoyIntro.htm). It's a virtual joystick driver than can take inputs from other apps.
I was wondering if any of you knew how I could get LFS Style mouse steer into games such as rFactor, or any game the accepct a steering wheel as input.
What I want to do is use the mouse to control the cars, and as most games don't have the LFS style mouse steer, it's been a pain in the arse to race other games ( and yes, I do have a wheel, but it's much to slow to be an effective control device. )
MonkOnHotTinRoof
23rd April 2006, 11:58
I was wondering if any of you knew how I could get LFS Style mouse steer into games such as rFactor, or any game the accepct a steering wheel as input.
I'd like that too. I already tried some time ago using PPJoy app (you can map mouse to virtual joystick :D ), but rFactor freezed somewhere on the way from menus to racing :shrug:. I gave up anyway, cause I found some old joystick...
Dygear
27th April 2006, 02:17
Hey, guys, I need a C++ or Java programmer that is willing to make a replica of the Formula 1 Java Live Timming Thingy. It would be for SimFIA . . . So any one up for the job?
Shep
27th April 2006, 17:32
I hate having the leading bracket on the same line as the command, like filur's last if.
It makes no sense to me- it is harder to line up the closing brackets when dealing with bigger blocks of code.
Then again I come from a Pascal background, where the words "begin" and "end" were the brackets. :)
TagForce
27th April 2006, 18:04
I hate having the leading bracket on the same line as the command, like filur's last if.
It makes no sense to me- it is harder to line up the closing brackets when dealing with bigger blocks of code.
Then again I come from a Pascal background, where the words "begin" and "end" were the brackets. :)
Yup... The only sure way to learn proper indentation is using pascal :)
You one of those that when you started using another language the first thing you did was try to set the colors of the IDE to something EXACTLY like the old DOS Pascal IDE? I know I am :P
Frankmd
27th April 2006, 18:09
Hey, guys, I need a C++ or Java programmer that is willing to make a replica of the Formula 1 Java Live Timming Thingy. It would be for SimFIA . . . So any one up for the job?
I've been planning to make something like that for the masters of endurance. A kind of software version of the tracker website. Cant promise it will be anytime soon though, Im currently drowned with work for university, and that isnt going to change untill July, and then it is summer and I dont want to be inside programming :)
Kegetys
27th April 2006, 18:13
I like to keep things tidy:
void nkfsDec(void *data, int size) {
BYTE *k = key;
for(int i=0;i<size;i++) {
((BYTE*) data)[i] -= *k++;
if(*k == 0x00) // End of key, loop
k=key;
}
}
I find this style of indenting to be very readable, and keep the code from being too 'loose' which I find makes it harder to read. I guess thats because the first C code I ever read was indented like this (I think)...
Shep
27th April 2006, 18:20
Haha, I used Turbo Pascal for everything, so I never did anything in DOS. This was in 2000,
Turbo Pascal for Windows only bolded the reserved words, and made anything in single/double quotes blue.
I use JCreator for my Java work, and I too tried to make it look like TPW :D I took about a year of from Java, and when I came back I got used to their colorscheme.
When I was programming in C for a course last semester the linux box I was connecting to with PuTTY would color everything- reading red, blue and green text on a black background is hard! I had no idea how to change it. :shrug:
ikkah
28th April 2006, 09:10
I find this style of indenting to be very readable, and keep the code from being too 'loose' which I find makes it harder to read. I guess thats because the first C code I ever read was indented like this (I think)...
My style is the exact opposite of that.
void nkfsDec( void *data, int size ) {
BYTE *k = key;
for ( int i = 0; i < size; ++i ) {
((BYTE*)data)[i] -= *k++;
if ( *k == 0x00 ) {
k = key;
}
}
}
Yes, my tabs are 8 spaces wide. In my opinion making the code look loose makes it easier to read. I overuse horizontal space but I don't like to waste vertical space as much, maybe because I want to see as much code as possible without having to scroll.
So what do your IDEs look like in action? Here's my VC++: http://www.lfs-suomi.com/ikkah/vs.png
Notice the ultrawide code view and the light green background for comments.
DarkTimes
1st May 2006, 23:18
Has anyone else here ever tried to build a website engine? It's something I've been messing about with of late. I guess it's just an extension of having a set of useful classes to automate those sorts of things you do in every site, but I'm trying to put it together with a very good extensible design.
What I'm thinking is having a very strong core engine, with all the functionality slotting in as sort of plugins. Just basically a system which allows me to work very fast and never have to write the same code twice... yeah, fat chance.
But anyway, I've got a database abstraction layer (various types of database would 'technically' be supported as plugins, but it reality it only works with MySQL), a template engine (which works really well actually, but doesn't stop me hating template engines), plus lots of different classes to automate logins and sessions and cookies and all that stuff.
Only problem is that every time I work on a new project, I start to use my engine, but find I end up having to rewrite classes at various point. Kinda defeats the purpose... but anyway...
There's really not enough information around about the theory on designing complex web applications, I guess your supposed to know all this stuff anyway, but web sites are kind of different from other programs. I find myself going more and more to traditional program design, just chucking all my HTML stuff in templates (I hate templates, they rarely achieve a decent format/code seperation) and having nothing but pure PHP in my pages....
Ah, just a bit of a off-topic web-programming rant...
Anarchi-H
2nd May 2006, 03:50
Hehe, been there, done that DarkTimes. It is nigh on impossible to make code that is everything to every project for everyone... It just isn't going to happen.
The best you can do is keep it modular so that as little code has to be re-written as possible to facilitate the specific extra features any site needs. If it looks like it might be useful to another site, bung it in the repository with everything else.
That way the only bit you have to re-write (most of the time) is the 'glue' that sticks all of your random code lumps together in to some intelligible (or not sometimes) API.
As for my editor... I usually have no less than 8 or 9 gVim windows open, a couple or three Firefoxes and photoshop, and when I'm debugging CSS about 8 other versions of various browsers. Oh, and not forgetting at least one winamp :p
the_angry_angel
2nd May 2006, 07:42
I've recently been involved in designing and implementing a forum, which could be extended via plugins, to do almost anything. At the end of the day you're always going to get some hacked code that does Just Something(TM) (AKA screenshot code). However, we eventually decided on a kind of event driven system. Basically we looked at a micro kernel as a rough setup, and we ended up with a singleton "kernel" object which would allow external apps to hook into it, and pass event's. Unfortunately in most web-based languages this isn't a good choice - its a hell of a lot slower, but it does give you a lot of flexibility and produces some nice code.
Regarding templates, I totally agree. They're a total klunk most of the time, and I generally have a dislike for them, but they do allow non-techies to get stuck in a lot of the time. I've recently found clearsilver to have some very nice syntax, that most designers or Your Boss(TM), can cope with. Of course, it does tend to require that you're running the php add on, writing your webapp in C, or you've beaten me to writing mod_clearsilver for apache ;)
Dygear
2nd May 2006, 15:22
Would it not be a better idea to have the kernal tell all of it's plugins what it is doing. EX (Kernal says "I want to display a post", post plugin says "Ok I'll make the HTML for you.")
NotAnIllusion
15th May 2006, 23:12
Sry to barge in on this Advanced Stuff.. there's something I have been wondering: Is there any way to get MySQL 5.0x GA & PHP 5.x talking to each other without copying 'libmysql.dll' to an existing PATH directory? :scratchch
I have PHP installed in 'c:\php' and that path is also in the system PATH environment variable thingy, but PHP would have none of it until I finally conceded and copied 'libmysql.dll' to '\windows\system32'.
Dygear
16th May 2006, 21:15
I dislike C# and Java due to the way they are setup. I'm more of a procedural man myself. But C# and Java seem to throw that to the side. I never have taken the time to understand classes, and Java and C# live on them. That could be the main problem. I just don't have the time to learn it as of right now. It just seems wrong. I should really buckle down and attempt to learn more about classes, so that I can start using C# and Java.
Dygear
3rd June 2006, 02:15
I'm installing Ubuntu while I'm typing this to you. Now your thinking "Ya so what, you have a lap top or your using a second computer, big deal". No, I'm installing Ubuntu on THIS computer, the computer I'm using to type into the input box is also going about formatting one of my hard drives. I really think this is the best thing that has happend to installing an OS. They have the LiveCD and if you like the OS you can then install it to your hard drive, while still using the LiveCD part. I've got to say, I'm really very impressed.
Yea, and saying that, as soon as I rebooted to go into the OS that I did install on to my hard drive GRUB fails with error 18. We'er going to have to format the hard drive one more time :(. Oh well. Rember kids, if you'r installing linux, be sure to make a /boot mount point that is less then 1024 cylinders. So I'm going to go do that now ...
Dygear
3rd June 2006, 03:26
Works now :).
DarkTimes
3rd June 2006, 09:04
I dislike C# and Java due to the way they are setup. I'm more of a procedural man myself. But C# and Java seem to throw that to the side. I never have taken the time to understand classes, and Java and C# live on them. That could be the main problem. I just don't have the time to learn it as of right now. It just seems wrong. I should really buckle down and attempt to learn more about classes, so that I can start using C# and Java.
I've been doing a huge amount of C# recently, it wasn't something I'd looked into too much before, but I downloaded C# Express and was pretty blown away with how quick you can develop with it. Windows Forms are just fantastic for getting your application running quickly, you can take all that time you normally spend building the GUI and concentrate on what your program actually does.
OOP programming is something I'm pretty butch with too. I think though that if you're not really using OOP fully or don't fully understand the concepts, then it doesn't really help you make better code than procedural programming does. But if you start to implement it properly and intelligently it can do wonders for your code, when you start to use inheritance, polymorphism and encapsulation correctly, it's hugely powerful. Often though badly written or only partially OOP programs can be more hassle than procedurals stuff...
Java I'm not a fan of to be honest, never got too into it. I'd recommend C# instead by a long way...
NotAnIllusion: If you're running PHP on WinXP then you can just install MySQL as a Windows service, on my Apache installation it didn't need any more configuration then just running through the MySQL install setup. I think you might need MySQL Windows Essentials installer to do that, you can find it at http://dev.mysql.com/downloads/
NotAnIllusion
3rd June 2006, 13:38
NotAnIllusion: If you're running PHP on WinXP then you can just install MySQL as a Windows service, on my Apache installation it didn't need any more configuration then just running through the MySQL install setup. I think you might need MySQL Windows Essentials installer to do that, you can find it at
I do have MySQL installed as a service but the problem was that PHP Not Apache) needed to be configured for it and wasn't co-operating. Couldn't be bothered to find a way to get it working the way I wanted so I copied the necessary file to my system32. I just hate doing that because then even after removing PHP there's a residual file I don't need. Yuck! :p Thank you though, I'm now well into developing a web GUI in PHP for the dedi server for my uni final year project :D
Dygear
15th June 2006, 08:54
Well, you're not using two languages in your example. You're using the output from two languages.
C and SmallC are two different languages.
The output from two languages ... explain.
Silkswift
15th June 2006, 13:32
C and SmallC are two different languages.
The output from two languages ... explain.In your resulting program, you're not actually using the language, but the compiled code that was generated by each language compiler (usually as DLLs, in some sort of "machine language"). These can interoperate.
the_angry_angel
15th June 2006, 14:06
I thought I'd updated this...clearly not.
In the case of using PHP and GTK there are exported functions and wrappers around these functions - which allow the two languages to communicate. These are usually called bindings. You can get GTK bindings for python and php for example, which allow you to use the GTK widget set within either of those languages to create desktop applications. It usually means writing an addon module for your chosen higher level language, such as Python, PHP, to interact with the lower level one.
Using SmallC, or VB, or C# with C is a case of exporting the functions in a standard way from a DLL or SO file, which the languages then recognise, and import. To put it rather simply.
In the case of using something like Javascript or Lua in your own applications, you embed the interpreter engine into your code. This engine will then convert the script into the equivilent "C" at runtime. Using this embedding method you can also define your own functions which can allow you to extend the native libraries of that language.
Clear as mud?
Leachman
15th June 2006, 17:41
Works now :).
Lilo doesn't have this limitation.
Wordan
21st July 2006, 12:08
I am going to dig up this thread... What I hate in programming is other programmers. They are all younger and more capable than me. I really love technical things and wish I had enough knowledge in programming to make something usefull, but I must be a really slow learner, and I am not academic. I barely finished my college course, and I didn't finish the last one. I envy you all!
At the moment I am trying to dig in to programming theory with Ruby. I find it[Ruby] very easy to remember. I looked at my old GCSE maths revision books yesterday and boy am I clueless, I gotta try and refresh my memory.
As for indentation, I've settled on tabs so anybody can set their editor to space them as they like. I set mine up for 2 spaces
the_angry_angel
21st July 2006, 12:27
As for indentation, I've settled on tabs so anybody can set their editor to space them as they like.Sing it again brother! :D
Dygear
22nd July 2006, 15:45
Let's not forget the source code file is smaller too. As 1 tab is equal sometimes to about 8 spaces.
Dygear
7th August 2006, 22:19
SimFIA, the website and league, is very much in need of some more programmers. I'm looking for not only PHP programmers, but python programmers aswell. If you can do it in C++ or C# or Java that is fine by me. I'd very much like all work to be open source. So if your happy with then them drop me a PM on here or on the SimFIA fourms.
What kind of work will we be doing? Simple really. Programming for Live For Speed. Getting fule load from clients for Team Principles in the F1. Live Timing and Scoring for main SimFIA website (I'll be the lead for this, providing we chose lurLFSD.). Completely unified stats engine (Closed Source) (Again I'll take the lead programmer role for this).
BurnOut69
7th August 2006, 22:47
Let's not forget the source code file is smaller too. As 1 tab is equal sometimes to about 8 spaces.
Compiler gets rid of any blanks or comments, so this doesnt affect the size of the output in any way.
the_angry_angel
7th August 2006, 23:07
What kind of work will we be doing? Simple really. Programming for Live For Speed. Getting fule load from clients for Team Principles in the F1. Live Timing and Scoring for main SimFIA website (I'll be the lead for this, providing we chose lurLFSD.). Completely unified stats engine (Closed Source) (Again I'll take the lead programmer role for this).Sounds interesting, and I may beable to dedicate time to it in the coming weeks, provided work pans out as being reasonably quiet. Just one question though; that basically reads as a load of total marketing gumft, what does it all mean? ;)
Dygear
8th August 2006, 01:25
Sounds interesting, and I may beable to dedicate time to it in the coming weeks, provided work pans out as being reasonably quiet. Just one question though; that basically reads as a load of total marketing gumft, what does it all mean? ;)
Yea it's kinda ment to sound that way. SimFIA is ment to be professional and much of my posts about SimFIA are to promote it.
Compiler gets rid of any blanks or comments, so this doesnt affect the size of the output in any way.
I was referring to the source code file only. Disk space becomes an issue alot for me, and every little helps.
BurnOut69
8th August 2006, 09:56
We are talking about bytes anyway...and I really doubt anyone adds so many comments that they increase the size of the source dramatically hehe.
BTW I work as C# programmer so depending on the task and available time I may be able to give a hand. You know where to find me (#69 :smileypul)
Dygear
8th August 2006, 13:32
We are talking about bytes anyway...and I really doubt anyone adds so many comments that they increase the size of the source dramatically hehe.
BTW I work as C# programmer so depending on the task and available time I may be able to give a hand. You know where to find me (#69 :smileypul)
*Chuckles* Allright thanks for the notice.
Dygear
25th August 2006, 04:18
Try netstat -a -b -v on your computer. I wonder why ns.chaintech.cz:23604 is connected to my computer. I hate chinatech they make reallybad stuff.
C:\Documents and Settings\Dygear>netstat -a -b -v
Active Connections
Proto Local Address Foreign Address State PID
TCP dygear-x86:epmap dygear-x86:0 LISTENING 1012
c:\windows\system32\WS2_32.dll
C:\WINDOWS\system32\RPCRT4.dll
c:\windows\system32\rpcss.dll
C:\WINDOWS\system32\svchost.exe
-- unknown component(s) --
[svchost.exe]
TCP dygear-x86:microsoft-ds dygear-x86:0 LISTENING 4
-- unknown component(s) --
[System]
TCP dygear-x86:1025 dygear-x86:0 LISTENING 344
C:\WINDOWS\System32\WS2_32.dll
C:\WINDOWS\System32\alg.exe
C:\WINDOWS\system32\RPCRT4.dll
C:\WINDOWS\system32\ole32.dll
[alg.exe]
TCP dygear-x86:netbios-ssn dygear-x86:0 LISTENING 4
-- unknown component(s) --
[System]
TCP dygear-x86:1517 102.157.36.72.reverse.layeredtech.com:3784 ESTA
BLISHED 3104
C:\WINDOWS\System32\mswsock.dll
C:\WINDOWS\system32\WS2_32.dll
C:\Program Files\Ventrilo\Ventrilo.exe
-- unknown component(s) --
[Ventrilo.exe]
TCP dygear-x86:4380 ns.chaintech.cz:23604 FIN_WAIT_1 1704
-- unknown component(s) --
[System]
TCP dygear-x86:2134 localhost:2133 TIME_WAIT 0
TCP dygear-x86:2142 64.233.161.147:http TIME_WAIT 0
TCP dygear-x86:2154 64.106.174.50:http TIME_WAIT 0
TCP dygear-x86:2155 64.106.174.50:http TIME_WAIT 0
UDP dygear-x86:2948 *:* 1204
C:\WINDOWS\system32\mswsock.dll
c:\windows\system32\WS2_32.dll
c:\windows\system32\DNSAPI.dll
c:\windows\system32\dnsrslvr.dll
C:\WINDOWS\system32\RPCRT4.dll
[svchost.exe]
UDP dygear-x86:isakmp *:* 780
C:\WINDOWS\system32\WS2_32.dll
C:\WINDOWS\system32\oakley.DLL
C:\WINDOWS\system32\LSASRV.dll
C:\WINDOWS\system32\ADVAPI32.dll
C:\WINDOWS\system32\kernel32.dll
[lsass.exe]
UDP dygear-x86:3629 *:* 1204
C:\WINDOWS\system32\mswsock.dll
c:\windows\system32\WS2_32.dll
c:\windows\system32\DNSAPI.dll
c:\windows\system32\dnsrslvr.dll
C:\WINDOWS\system32\RPCRT4.dll
[svchost.exe]
UDP dygear-x86:1032 *:* 1204
C:\WINDOWS\system32\mswsock.dll
c:\windows\system32\WS2_32.dll
c:\windows\system32\DNSAPI.dll
c:\windows\system32\dnsrslvr.dll
C:\WINDOWS\system32\RPCRT4.dll
[svchost.exe]
UDP dygear-x86:1040 *:* 1204
C:\WINDOWS\system32\mswsock.dll
c:\windows\system32\WS2_32.dll
c:\windows\system32\DNSAPI.dll
c:\windows\system32\dnsrslvr.dll
C:\WINDOWS\system32\RPCRT4.dll
[svchost.exe]
UDP dygear-x86:3628 *:* 1204
C:\WINDOWS\system32\mswsock.dll
c:\windows\system32\WS2_32.dll
c:\windows\system32\DNSAPI.dll
c:\windows\system32\dnsrslvr.dll
C:\WINDOWS\system32\RPCRT4.dll
[svchost.exe]
UDP dygear-x86:3630 *:* 1204
C:\WINDOWS\system32\mswsock.dll
c:\windows\system32\WS2_32.dll
c:\windows\system32\DNSAPI.dll
c:\windows\system32\dnsrslvr.dll
C:\WINDOWS\system32\RPCRT4.dll
[svchost.exe]
UDP dygear-x86:4500 *:* 780
C:\WINDOWS\system32\WS2_32.dll
C:\WINDOWS\system32\oakley.DLL
C:\WINDOWS\system32\LSASRV.dll
C:\WINDOWS\system32\ADVAPI32.dll
C:\WINDOWS\system32\kernel32.dll
[lsass.exe]
UDP dygear-x86:microsoft-ds *:* 4
-- unknown component(s) --
[System]
UDP dygear-x86:3631 *:* 1204
C:\WINDOWS\system32\mswsock.dll
c:\windows\system32\WS2_32.dll
c:\windows\system32\DNSAPI.dll
c:\windows\system32\dnsrslvr.dll
C:\WINDOWS\system32\RPCRT4.dll
[svchost.exe]
UDP dygear-x86:3627 *:* 1204
C:\WINDOWS\system32\mswsock.dll
c:\windows\system32\WS2_32.dll
c:\windows\system32\DNSAPI.dll
c:\windows\system32\dnsrslvr.dll
C:\WINDOWS\system32\RPCRT4.dll
[svchost.exe]
UDP dygear-x86:ntp *:* 1108
c:\windows\system32\WS2_32.dll
c:\windows\system32\w32time.dll
ntdll.dll
C:\WINDOWS\system32\kernel32.dll
[svchost.exe]
UDP dygear-x86:1900 *:* 1240
c:\windows\system32\WS2_32.dll
c:\windows\system32\ssdpsrv.dll
C:\WINDOWS\system32\ADVAPI32.dll
C:\WINDOWS\system32\kernel32.dll
[svchost.exe]
UDP dygear-x86:1872 *:* 1624
C:\WINDOWS\system32\WS2_32.dll
C:\WINDOWS\system32\wininet.dll
C:\WINDOWS\system32\kernel32.dll
[wmplayer.exe]
UDP dygear-x86:1900 *:* 1240
c:\windows\system32\WS2_32.dll
c:\windows\system32\ssdpsrv.dll
C:\WINDOWS\system32\ADVAPI32.dll
C:\WINDOWS\system32\kernel32.dll
[svchost.exe]
UDP dygear-x86:ntp *:* 1108
c:\windows\system32\WS2_32.dll
c:\windows\system32\w32time.dll
ntdll.dll
C:\WINDOWS\system32\kernel32.dll
[svchost.exe]
UDP dygear-x86:netbios-ns *:* 4
-- unknown component(s) --
[System]
UDP dygear-x86:netbios-dgm *:* 4
-- unknown component(s) --
[System]
Victor
3rd October 2006, 17:37
the following has nothing to do with lfs, but i just have to express the joy over my latest find :
OpenWRT - a very nice firmware for a lot of routers, originally Linksys ones ( supported devices (http://wiki.openwrt.org/TableOfHardware) ). Basically after you flash your router with it, you have turned your router into a fully loaded linux-networking box, meaning you get access to all iptables functionality and in combination with ip and tc you can setup QoS schemes (very cool) and as long as memory permits (mine has around 16mb for OS + running things + some filespace), you can install all sorts of other stuff on it. I've even got a working php 5.0.3 running on my router :D Remember my router isn't a whole pc - i'm talking about such a consumer hardware router :) (Linksys wrt54g v.1.1)
Anyway, since there's a lot of geeks similar to me reading this forum, I figured there'll be some guys with a compatible router who might like this. If you are a bit familiar with linux and have no fear of flashing your hardware, then i strongly recommend openwrt (http://openwrt.org). It turns your normal consumer router into a pro router :) Do remember to read all the docs about installing though and do check to see if your router is supported. If not, you can potentially brick the router and throw it away.
Back to fiddling about now
the_angry_angel
3rd October 2006, 18:12
It might be worth pointing out that getting a compatible WRT54G (excluding L revisions) can be a pain in the neck. I luckily managed to get mine (v2) from ebay.
I'm currently running DD-WRT, which is pretty similar to OpenWRT in terms of features, with the addition of a better web gui (imho) :D You can also ssh / telnet to most standard DD-WRT images if you'd like to change things the manual way, just as you would with OpenWRT :D The only up side with OpenWRT is that it runs on a much larger range of hardware, and its easier to get involved with :) If you'd just like your router to work, or you need it to work (in terms of employment) then I'd not recommend playing with this stuff.
Victor
3rd October 2006, 18:28
yeah open wrt is more for those who don't need a webgui and can get by from the command line - i don't even have the httpd running anymore to save some memory :)
Initially I installed hyperWRT-thibor, which was already a great improvement to the original firmwares (which even have a nasty bug in them, keeping connections open way too long, flooding the routers buffers). But then my eye fell on openwrt and i'm loving that now for its versatility and community support (great source of available packages).
btw, if only this router http://www.asus.com/products4.aspx?l1=12&l2=43&l3=0&model=979&modelmenu=1 had a normal PC-cpu and a little more memory - then you could throw out your Linux PC and run everything from the hardware router :D (presumably consuming less power and more silent too)
Dygear
4th October 2006, 03:06
Allright, I knew about WRT54G (I infact own one and, yes, they do rock), I also knew about the firmware thing from The Screen Savers. (http://www.youtube.com/watch?v=-MoHHKkpSz0) (We will miss you TSS.) But PHP thing is new to me, and that is REALLY awsome!
The Screen Savers Dark Tip for Linux IDS can be found at time index 22:30 and goes on from there.
Victor
4th October 2006, 03:49
too bad they made the common mistake of claiming that raising the wlan signal strength gives a better connection - it just raises the signal bar on the receiving end, but unless the receiving end also raises its signal strength, the signal won't get much better :shy: Wlan isn't a broadcast ;)
Dygear
4th October 2006, 03:54
So, where do I find the php to run on it? Oh man, my internet is a hell of alot snapper now.
Victor
4th October 2006, 04:02
Assuming you went for openwrt, you can get the php package via here : http://www.ipkg.be/package/1213305 (there are also other php versions available - just search for php on that website).
note - of course that's not a fully blown php - you won't find gd in there for example :) But it has sockets which is most important on a router I guess. Though mysql support might've been handy for some occasions.
Dygear
4th October 2006, 04:02
Yes I did, thank you :).
glyphon
15th November 2006, 19:30
i think next year sometime i'm going to start working on a project in java...only i don't know java. i'm pretty good with javascript, php, and coldfusion. In fact, the project is integrating an app that built with javascript into a pre-existing java app. so, my first task in this project is to find a reference book. only thing is, there are hundreds, if not thousands of books out there, and most of them probably suck (most tech books do).
so my question is...what java book would you recommend?
In the past, i liked the O'Rielly PHP book, but there are about 50 Java books by O'Rielly, so I can't even just go with the Java book by them. So, recommendations please :)
DarkTimes
11th July 2007, 20:57
Bump.
I've finally started forcing myself to learn C/C++ and I'm making some decent progress. However one thing I've suffered from is a lack of a good IDE for my tasks. At first I was using BloodDev-C++, which I just hated. What a horrible environment to program in. But I finally stumbled onto a wonderful open-source IDE called Code::Blocks. I fully recommend it, it's fantastic! I'm just giving it a well deserved plug. :)
http://www.codeblocks.org/
OK - more console apps! :)
Edit: Oh - get a nightly-build, the last release came out years ago and was a bit crap. They don't support it anymore, the nightly builds are where it's at!
BrandonAGr
11th July 2007, 21:31
However one thing I've suffered from is a lack of a good IDE for my tasks.
http://msdn.microsoft.com/vstudio/express/downloads/ ?
DarkTimes
11th July 2007, 21:41
Yeah, I tried that. I didn't take to it tbh. Code::Blocks is better in my view. :)
I love VSE C#. but the C++ version isn't doing it for me...
Dygear
13th July 2007, 17:33
Code::Blocks huh? I'll give it a go!
the_angry_angel
13th July 2007, 22:05
Code::Blocks huh? I'll give it a go!I heartily recommend using the nightly builds over the "stable" version. Its got a lot more fixes and tweaks.. shame they've not released a new stable yet :(
wheel4hummer
19th July 2007, 04:04
I've currently been trying to learn assembly and machine code. I want to get a cheap microcontroller just to play around with. What is assembly useful for, anyway? I want to figure out how to write my own DOS drivers.
MonkOnHotTinRoof
19th July 2007, 05:30
I've currently been trying to learn assembly and machine code. I want to get a cheap microcontroller just to play around with. What is assembly useful for, anyway? I want to figure out how to write my own DOS drivers.
Assembly language is low-level CPU specific language. It's commands are directly compiled into machine code.
Hardly anyone uses assembly language today. Even lower layers of OS and drivers are usually written in C.
Advantages of ASM are: full control over CPU, fastest possible execution speed if experienced in ASM programming (and lots of time for optimization), small output files.
Disadvantages: not portable, hard to maintain code, nonproductive.
Assembly is great to learn architecture of CPU and for fun. It was my second language, right after Spectrum Basic :razz:. Tho it might be overkill for you. Usually microcontrollers can be programmed with stripped-down variants of C.
jjones
19th July 2007, 16:48
Hi im not a programmer, Im interested in all this insim stuff, i dont understand what its for, :shrug: Could some 1 explain what insim is and the benefits of using it, Sorry if i sound stupid, just interested .
thanks john :tilt:
the_angry_angel
19th July 2007, 17:00
Insim, OutSim and Outguage are methods of communicating with LFS to import and extract specific information.
Insim lets you get a very wide variety of information about what the client or server is doin, depending on where its connecting to (an InSim client which connects to a server gets a lot more information).
OutSim is designed to things like motion simulators and gives acceleration, heading, etc. vectors for your vehicle (client side only).
Outgauge gives you the gauges of your vehicle (client side only).
The advantage of using these "protocols" is that you can extract information that would otherwise be rather tricky to get ahold of.
the_angry_angel
19th July 2007, 17:02
Hardly anyone uses assembly language today. Even lower layers of OS and drivers are usually written in C.It's used for debugging more than you might imagine. A good C programmer will know at least some ASM for this reason.
Assembly is great to learn architecture of CPU and for fun. It was my second language, right after Spectrum Basic :razz:. Tho it might be overkill for you. Usually microcontrollers can be programmed with stripped-down variants of C.ASM is still used on a number of home appliances, such as heating timers, etc. where there is a ridiculously small amount of memory available.
DarkTimes
19th July 2007, 17:04
Hi im not a programmer, Im interested in all this insim stuff, i dont understand what its for, :shrug: Could some 1 explain what insim is and the benefits of using it, Sorry if i sound stupid, just interested .
thanks john :tilt:
Well basically InSim allows you to write a stand-alone program which can communicate with LFS and internally it works much in the same way as normal multiplayer works.
LFS sends out network packets which contain various information about what's happening in the game, your program then picks these packets up and processes the information it needs from them. In turn your program can also send packets back to LFS, instructing it to carry out certain tasks, or requesting for information to be sent, or sent in a specific way.
The benefits of using it are quite clear really, but probably examples would be good. For instance the CCRT license system uses InSim, LFSLapper is present on practically every server and displays information about current lap times to players on the server, LFSPitboard allows you to have a little customised pitboard show every time you cross the start line, LFSStats tracks statistical information about races and then allows you to view and export that data.
The possibilities are endless...
jjones
19th July 2007, 17:06
Insim, OutSim and Outguage are methods of communicating with LFS to import and extract specific information.
Insim lets you get a very wide variety of information about what the client or server is doin, depending on where its connecting to (InSim connects to the server gets a lot more information).
OutSim is designed to things like motion simulators and gives acceleration, heading, etc. vectors for your vehicle (client side only).
Outgauge gives you the gauges of your vehicle (client side only).
The advantage of using these "protocols" is that you can extract information that would otherwise be rather tricky to get ahold of.
:) cheers i find that outsim is interesting and motion sims, the build i saw on the threads looks very impressive indeed, As for the rest its way over my head. But thanks for explaining.:thumb:
Its amazing what u find if u look about, the lfs manual covers it all,
DarkTimes
19th July 2007, 17:15
ive currently been trying to learn assembly and machine code. I want to get a cheap microcontroller just to play around with. What is assembly useful for, anyway? I want to figure out how to write my own DOS drivers.
There's not really a huge impetus to learn ASM any more, it used to be very useful for writing performance critical programs, or embedding some ASM in a performance critical part of your code. For instance a lot of games used ASM in the most performance critical part of their loops, as you can see if you download the open source Quake III source code from id, which is written in C with some ASM inserted at key locations.
Nowadays though compliers and virtual machines are so clever and optimised that often its actually possible to harm performance by adding ASM if you don't know what you're doing. Plus of course modern PCs are so blindingly fast that performance has started to take 2nd precedence to ease of use and reuseability.
As others say, if you want to write device drivers you could do it with C.
wheel4hummer
19th July 2007, 20:47
There's not really a huge impetus to learn ASM any more, it used to be very useful for writing performance critical programs, or embedding some ASM in a performance critical part of your code. For instance a lot of games used ASM in the most performance critical part of their loops, as you can see if you download the open source Quake III source code from id, which is written in C with some ASM inserted at key locations.
Just because it isn't useful doesn't mean anything. I am a recreational programmer. I program in assembly because I find it fun.
DarkTimes
19th July 2007, 21:59
Yes, but it was a response to the question of what assembly can be useful for. I didn't say ASM is useless or that no one should use it. But in my opinion the uses for ASM have declined with the advent of much more sophisticated programming environments and stupidly fast computers. Really we have reached a point where ASM has very few practical applications in general programming. Although almost all of us program in our spare time because we do find it fun. No matter what language you use, so long as you find it fun, that's all that matters. :)
shadow2kx
19th July 2007, 22:27
Yes, but it was a response to the question of what assembly can be useful for. I didn't say ASM is useless or that no one should use it. But in my opinion the uses for ASM have declined with the advent of much more sophisticated programming environments and stupidly fast computers. Really we have reached a point where ASM has very few practical applications in general programming. Although almost all of us program in our spare time because we do find it fun. No matter what language you use, so long as you find it fun, that's all that matters. :)
ASM is only used to enhance the simplicity and the volocity of particuliar part of a program. Like in "real time" programming, when you need to put deadline you'll may be requiered to speed up some part of an application and sometimes there is no other way to do but by deassembly your program and modify it by hand. I had to do like that with one of my program. Also needed to program a kernel.
>> Edit: was already said, i didn't understanded.
And learning ASM may be quiet usefull to fully understand the world of programation.
One thing that we must not forget is that every programation laguage goes from High level programation language to ASM to binary (if i'm not wrong, offcourse :p).
DarkTimes
20th July 2007, 00:25
I'm digging myself into a hole, I know, but if you have to resort to ASM to optimise your code these days, then there is probably a whole lot wrong with your code that a few lines of assembly are unlikely to fix.
the_angry_angel
22nd July 2007, 01:09
More of a sysadmin-type moan, but I need to find some way of humilitating myself and I figure its probably aimed at the right sort of people. For some reason I decided that it would be a good idea to do an apt-get update on one of my personal boxes - whilst fairly intoxicated. Needless to say I wasn't paying attention and the upgrade system broke exim (the email server I run).
I swear nothing has, or will in future, sober me up quicker than watching it break my carefully crafted system as it upgrades to the new version and I say "no" to not change the conf files to the new version. Unfortunately once its on, unless you want to roll back and then upgrade again (which is equally mad sometimes) you have to fix the files yourself - or fire up a VS and get the files converted there instead.
I spent a good portion of the day working on having a hang over tomorrow/this morning as well :(
Victor
22nd July 2007, 01:15
that'll teach you not to make backups of vital stuff :tilt:
the_angry_angel
22nd July 2007, 01:35
that'll teach you not to make backups of vital stuff :tilt:I do make backups :p But only of data and conf files on my personal machines, unfortunately :( Perhaps I shall revise this.
sdether
22nd July 2007, 03:57
I've switched to running all my servers as vmware images (will try Xen on my new server). Aside from being able to run multiple servers on one machine, I can easily back up each server and even bring it up on another machine, should the host machine die on me. It's made my life so much easier.
DarkTimes
8th October 2007, 20:07
Quite an interesting development, Microsoft have announced they are releasing the source-code to the .NET Framework libraries, so in VS2008 you can step-through into the underlying code. Sounds pretty cool to me!
http://weblogs.asp.net/scottgu/archive/2007/10/03/releasing-the-source-code-for-the-net-framework-libraries.aspx
the_angry_angel
8th October 2007, 20:11
Unfortunately it's not the entirety of the .NET framework, only some base libraries that make up part of it :( (or at least that's my interpretation)
DarkTimes
8th October 2007, 20:27
Well from what I've read it will initially be :
System
System.IO
System.Collections
System.Configuration
System.Threading
System.Net
System.Security
System.Runtime
System.Text
System.Web
System.Windows.Forms
System.Data
System.Xml
System.Windows
With more to come in the months ahead, such as WCF, Workflow, and LINQ. It's obviously not complete, but it's a fair amount to get started with.
Hollywood
8th October 2007, 20:42
That's pretty much all of version 2.0. :)
System
System.IO
System.Collections
System.Configuration
System.Threading
System.Net
System.Security
System.Runtime
System.Text
System.Web
System.Windows.Forms
System.Data
System.Xml
System.Windows
WPF/WCF/WWF(when is the WorldWildLifeFoundation going to sue?!) is 3.0 so it makes since it'll come out later. LINQ is still beta along with all the other 3.5 stuff so I would not expect it to come out til much later.
With more to come in the months ahead, such as WCF, Workflow, and LINQ. It's obviously not complete, but it's a fair amount to get started with.
Nonetheless, will be interesting to see the code as written (like you can with Java... which in some cases is horrific) instead of through IL interpreters like Reflector. Especially when dealing with ASP.NET. Basic .NET code is great, Windows Forms is pretty solid, but a lot of the design choices, etc. made for ASP.NET are just assinine.
BurnOut69
8th October 2007, 20:52
Ehm...windows forms is FAR from solid, visual inheritance is a royal pain in the ass - ever heard of the white screen of death?
http://blogs.msdn.com/rprabhu/archive/2005/08/11/450332.aspx
DarkTimes
8th October 2007, 21:04
I have to admit I've only ever seen that screen on a handful of occasions, and even then just hitting Rebuild Solution would fix it.
col
9th October 2007, 14:11
I'm digging myself into a hole, I know, but if you have to resort to ASM to optimise your code these days, then there is probably a whole lot wrong with your code that a few lines of assembly are unlikely to fix.
I think you have a _very_ narrow view of modern programming.
Sure, if you have to resort to ASM optimization for some web scripting thing or for a simple console tool, then there might be something wrong with your design, but there are so many areas in which there are never enough resources.
What if you are processing a large data set using an algorithm that is NP-complete (and there aren't any more efficient alternative algorithms), then you need all the help you can get, and a "who needs ASM, modern cpus are well fast" attitude just isn't going to get the job done !
What about embedded platforms? there are millions of consumer products out there that all run some sort of software. The more efficient the software is, the cheaper the product can be to manufacture... You gonna code it in java and send a memo to the boss demanding 10 times more ram and a much bigger processor ?
What about handheld devices... gamboy advance/DS are good examples. Not only is the cpu comparatively tiny, and the memory restrictions extreme, you have to factor battery usage into your software design ! the larger percentage of the time the cpu is idle, the longer the battery will last !
It is going to get more and more difficult to hand code in assembly as we move towards truly concurrent architectures (everything gets more difficult as that happens), but assembly will still be valuable to optimize small code sections.
Anyway, I think it's amazing to hear folks who develop 'application software' for PCs or websites generalizing their experience to all of programming :)
Hollywood
9th October 2007, 17:29
Yup, usually caused by developers doing tasks that are too long. And yes there are some issues (especially in VS2005 that weren't in VS2003 but seem to be taken care of in VS2008 betas) with inheritance and controls moving, etc.
Ehm...windows forms is FAR from solid, visual inheritance is a royal pain in the ass - ever heard of the white screen of death?
http://blogs.msdn.com/rprabhu/archive/2005/08/11/450332.aspx
TAYLOR-MANIA
24th April 2008, 09:16
Hi, I didn't really know where to put this...
I was just wondering if a 'knock-out' system has been made (or thought of) via Insim.
I mean the kind of mode you can see in some arcade games, where the last car behind gets knocked out on the start of the next lap, you know? Last man standing wins kinda-thing.
I thought it should be very much possible to do & it could be really good if done well. Just a thought...
Stigpt
24th April 2008, 16:57
very possible and easy - just use mci to see what is tha car in last whenever a LAP is sent. The spectate that car. Dunno if you can do that via insim, but i guess you can. Good n easy mod - you try to code it - its a good starting point!
JamesF1
24th April 2008, 17:03
Yup, very simple to implement. You should be able to do it relatively simply if you're willing to spend a good while learning how to program in one of the languages that already has a library (presuming you don't already know how to program). :)
vBulletin® v3.7.1, Copyright ©2000-2008, Jelsoft Enterprises Ltd.