Page 3 of 3 FirstFirst 123
Results 21 to 28 of 28

Thread: Beginners programming challenge #27

  1. #21
    Join Date
    Feb 2009
    Beans
    1,469

    Re: Beginners programming challenge #27

    Quote Originally Posted by debd View Post
    Code:
    void main(void)
    main() returns int.

  2. #22
    Join Date
    Nov 2010
    Beans
    271
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: Beginners programming challenge #27

    Quote Originally Posted by trent.josephsen View Post
    main() returns int.
    yikes! corrected.

  3. #23
    Join Date
    Nov 2010
    Beans
    271
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: Beginners programming challenge #27

    what happened to these threads??
    people dont code now!?

  4. #24
    Join Date
    Feb 2009
    Beans
    1,469

    Re: Beginners programming challenge #27

    I can't speak for anyone else, but I wrote a mockup main() and did some basic program design and decided I don't have time to make the entire thing. Perhaps this "beginner's" challenge was a little overambitious.

  5. #25
    Join Date
    Nov 2010
    Beans
    271
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: Beginners programming challenge #27

    Quote Originally Posted by trent.josephsen View Post
    I can't speak for anyone else, but I wrote a mockup main() and did some basic program design and decided I don't have time to make the entire thing. Perhaps this "beginner's" challenge was a little overambitious.
    That's alright..
    We could could move on to the next..
    Is there one going to be?

  6. #26
    Join Date
    Jun 2011
    Location
    United Kingdom
    Beans
    Hidden!
    Distro
    Lubuntu Development Release

    Re: Beginners programming challenge #27

    Quote Originally Posted by trent.josephsen View Post
    I can't speak for anyone else, but I wrote a mockup main() and did some basic program design and decided I don't have time to make the entire thing. Perhaps this "beginner's" challenge was a little overambitious.
    Yeah, I made one in python (which works-ish), but I had no idea how I was going to implement $ and ^.

    If anyone's interested, this paper helped: http://swtch.com/~rsc/regexp/regexp1.html

    Next one please!

  7. #27
    Join Date
    Nov 2010
    Beans
    271
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: Beginners programming challenge #27

    @MG&TL
    Actually implementing ^ and $ was easier IMO.
    You only have to try to match the first/last 'n' chars (for ^ and $ respectively ) of the string with the regex in case no meta is present.
    Else trying only the first/last word suffices.

  8. #28
    Join Date
    Jun 2011
    Location
    United Kingdom
    Beans
    Hidden!
    Distro
    Lubuntu Development Release

    Re: Beginners programming challenge #27

    Quote Originally Posted by debd View Post
    @MG&TL
    Actually implementing ^ and $ was easier IMO.
    You only have to try to match the first/last 'n' chars (for ^ and $ respectively ) of the string with the regex in case no meta is present.
    Else trying only the first/last word suffices.
    That's true. I guess it's the way I implemented it. I'll post my (rubbish) solution this evening, I have a feeling it's bug-ridden though.

Page 3 of 3 FirstFirst 123

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •