My Computer Forum Computer Science Forum

Go Back   My Computer Forum > Lobby > New Users

New Users Post up here and introduce yourself!


View Poll Results: Are you going to study some programming this summer?
Yes, of course! 6 66.67%
Some. 0 0%
Maybe. 3 33.33%
I don't know. 0 0%
Not too much. 0 0%
Probably not. 0 0%
Definitely not! 0 0%
Voters: 9. You may not vote on this poll

Reply
 
LinkBack Thread Tools Display Modes
May 31st, 2008, 12:57 PM   #1
 
Joined: Dec 2007
Posts: 187
Studying some programming this summer

I will try to learn more C++, and I will probably need some help frou you guys.
johnny is offline  
 

My Computer Forum is free to register and we welcome everyone!

May 31st, 2008, 06:40 PM   #2
 
Joined: Dec 2007
Posts: 232
Re: Studying some programming this summer

I might try to improve my knowledge of Scheme, depending on how busy I am.
CRGreathouse is offline  
May 31st, 2008, 08:20 PM   #3
 
Joined: Dec 2007
Posts: 187
Re: Studying some programming this summer

Which one is harder - Scheme or C++? Or are they about the same?
johnny is offline  
May 31st, 2008, 11:39 PM   #4
Site Founder
 
julien's Avatar
 
Joined: Dec 2007
Posts: 414
Re: Studying some programming this summer

I am currently learning a few basic programming languages related to web development, even though they can't be considered programming languages but rather "scripting languages": php, mysql, html/css essentially. They're very flexible and quite poorly constructed (very weak typing, and mysql is often buggy when you try to throw in a little bit complicated syntax). But if you don't want to rely on 3rd party web developpers for all your life, I guess at one point you have to deal with this.
julien is offline  
June 2nd, 2008, 12:48 PM   #5
 
Joined: Dec 2007
Posts: 232
Re: Studying some programming this summer

Quote:
Originally Posted by johnny
Which one is harder - Scheme or C++? Or are they about the same?
They're very different and hard to compare. The base of both languages is small and can be picked up (by a programmer) in a week or so. The advanced features take longer, and learning the C++ libraries takes more than a lifetime.
CRGreathouse is offline  
June 2nd, 2008, 02:55 PM   #6
 
Joined: Dec 2007
Posts: 138
Re: Studying some programming this summer

Quote:
Originally Posted by CRGreathouse
I might try to improve my knowledge of Scheme, depending on how busy I am.


I'll be needing to learn quite a bit as well, as I'm going to be using it to implement a lambda calculus interpreter, and I'll be playing with parameter passing styles... So...

I'll also probably be putting more effort into learning perl, as I might be continuing to work in it.

As far as difficulty; Most people find imperative languages easier to learn, and they're considerably more used, so I'd learn C++ first.

Scheme has a rather simple rule set, but it makes you think in a very, very different way than people are used to, and is consequently a bit of a mindfuck.
cknapp is offline  
June 3rd, 2008, 11:19 AM   #7
 
Joined: Dec 2007
Posts: 232
Re: Studying some programming this summer

Quote:
Originally Posted by cknapp
and is consequently a bit of a mindfuck.
Speaking of which, did I tell you about the 'optimizing' BF interpreter I wrote?
CRGreathouse is offline  
June 3rd, 2008, 01:40 PM   #8
 
Joined: Dec 2007
Posts: 138
Re: Studying some programming this summer

Quote:
Originally Posted by CRGreathouse
Speaking of which, did I tell you about the 'optimizing' BF interpreter I wrote?
Oh! Do tell!
cknapp is offline  
June 4th, 2008, 11:20 AM   #9
 
Joined: Dec 2007
Posts: 232
Re: Studying some programming this summer

The language, for those who don't know: http://www.iwriteiam.nl/Ha_BF.html

I read in the code, stripped all non-command characters, and tested that the brackets matched. I then ran it through a regular expression that acted as a peephole optimizer, cleaning out redundancy and other minor efficiency issues. I mapped each command to its own byte, except for +. The remaining positions then represented a series of 1, 2, 3, ... +s in a row. So the code ++><++> would preprocess to ++++> and convert to 'byte code' as 0x04FF or something similar (in this case FF would be > and 04 would be ++++).

The opening brackets didn't get a code value. Instead, I had a second array the same size as the code array which kept 'pointers' (array indices) into the code array for the jump operations! So once the code was 'compiled' into this format, it would execute very rapidly.

Of course true optimizing compilers can exist, by lifting expressions like >++++[<+++++>]< to 4 * 5. Still, it was fun.
CRGreathouse is offline  
June 4th, 2008, 12:59 PM   #10
 
Joined: Dec 2007
Posts: 138
Re: Studying some programming this summer

Quote:
Originally Posted by CRGreathouse
I mapped each command to its own byte, except for +. The remaining positions then represented a series of 1, 2, 3, ... +s in a row. So the code ++><++> would preprocess to ++++> and convert to 'byte code' as 0x04FF or something similar (in this case FF would be > and 04 would be ++++).
First. FF is more than one byte. Did you mean "own word"?

And what happens when you have ++...++ (256 plusses)? Did you account for that?



Every time I start to think academicians don't have much spare time, I learn something new about BF, and am proven wrong
cknapp is offline  
June 4th, 2008, 09:34 PM   #11
 
Joined: Dec 2007
Posts: 232
Re: Studying some programming this summer

FF = 15*16 + 15 = 255 is one byte.

The most plusses that could be represented in their own byte was 249, I think, because the other commands take up room too. So 256 +es would have been something like F907.
CRGreathouse is offline  
June 5th, 2008, 06:31 AM   #12
 
Joined: Dec 2007
Posts: 138
Re: Studying some programming this summer

Oh, right... Yeah. Brain failure.
cknapp is offline  
June 15th, 2008, 06:22 PM   #13
 
Joined: Dec 2007
Posts: 232
Re: Studying some programming this summer

Quote:
Originally Posted by cknapp
Brain failure.
Well, that is the point...!
CRGreathouse is offline  
June 18th, 2008, 08:20 AM   #14
 
Joined: Dec 2007
Posts: 138
Re: Studying some programming this summer

But I don't think it was intended to make you confuse powers of 2... It's just supposed to throw too many things at you to keep track of...

Because the only thing better than assembly hacking, is when someone makes something more tedious than assembly to work with... (and don't even think about bringing up lambda calculus here!!!! :x )
cknapp is offline  
January 5th, 2009, 02:18 AM   #15
 
Joined: Jan 2009
Posts: 1
Re: Studying some programming this summer

I'll learn java servlet... do you know guys some useful ideas give me....
ethanjames is offline  
Reply

  My Computer Forum > Lobby > New Users

Tags
programming, studying, summer



Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Studying Techniques asbo New Users 0 April 30th, 2010 07:03 PM





Copyright © 2018 My Computer Forum Forum. All rights reserved.