Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-4041-

GUI programming

Name: Anonymous 2011-06-26 11:36

CS student here. Almost everything we've learned so far has been data structures and theoretical algorithms stuff. I want to actually make something with a user interface instead of a terminal.
What books would give a nice introduction to GUI programming?

Name: Anonymous 2011-06-26 11:39

WHAT.

Just google a winforms tutorial, then choose a shitty GUI program to write and learn about the components on the fly.

Name: Anonymous 2011-06-26 11:53

Start with Qt, get QtCreator (Qt IDE) and QtAssistant (Qt documentation), then when you understand the basics of GUI coding move to some other library like wxWidgets or Swing.

Name: Anonymous 2011-06-26 12:00

And please don't go anywhere near GTK.

Name: Anonymous 2011-06-26 12:08

Programming GTK feels like like snorting coke with your anus.

Name: Anonymous 2011-06-26 12:23

>>4
>>5
oh come on, it can't be that bad!

Name: Anonymous 2011-06-26 12:45

>>6
GTK programming isn't that bad. I wish people wouldn't do it though. The UI is disgusting and I'm not talking about appearance.

Name: Anonymous 2011-06-26 12:54

Swing for the win!

Name: Anonymous 2011-06-26 13:13

Imagine a giant cock flying towards your mouth, and there's nothing you can do about it. And you're like "Oh man, I'm gonna have to suck this thing", and you brace yourself to suck this giant cock. But then, at the last moment, it changes trajectory and hits you in the eye. You think to yourself "Well, at least I got that out of the way", but then the giant cock rears back and stabs your eye again, and again, and again. Eventually, this giant cock is penetrating your gray matter, and you begin to lose control over your motor skills. That's when the giant cock slaps you across the cheek, causing you to fall out of your chair. Unable to move and at your most vulnerable, the giant cock finally lodges itself in your anus, where it rests uncomfortable for 4, maybe 5 hours. That's what using GTK is like.

Name: Anonymous 2011-06-26 13:18

  *   '*
           *
                *       
                       *
               * 
                     *

Name: Anonymous 2011-06-26 13:21


                 .---------.
            _    |:: [-=-] |
           | |   |_________|
           |~|
           |_|      ,;;;,          ,;;,
            I\  ,__//`\\\\__,     /   `\
            I |{  // - - \\  }   / ''   )
            I | ) \\_ = _// (    \_- __/
            I |{___'-) (-'___}\____)-(
            I ||~/,'~~~~~,\~~|'---./  \
            I \ //        \\ |    |  \ \
            I  \/         // |    \__/-/
            I (/         (/  |     |/||
            I  |             |     || /
            I  |             |     || |
            I  :-----_o_-----:     || |
            I  | /~~|===|~~\ |     || |
            I  ||   |===|   ||     ||_|
           /^\ "~   '^^^'   ""    ((__|
"I will never write a purely functional program again."

Name: Anonymous 2011-06-26 13:22


              |
          \   |   /
     .     \  |  /    .
      `-.__|\/_\/|_.-'
    .__  \ /     `./
       `-</        \
    ----<|         _|
     _.-<|    _    o(
    '    /   (.      >
      .-'`.   `     -
     '     `     __.'
           _)___(
          //    \\
         | |    | \
         | |    |  \
"I love sucking dicks after writing haskell code"

Name: Anonymous 2011-06-26 13:23

                                                 |`-._
                                                  .-'    `-.-;"\.
    .--------------------------------..-.. _ .-'\ |      /o\ | \\\
   |\ ________________________________\\ \\\/    \\      | |   ///\
   | |  __ __ _    __ __ _   __ __ __  ||-|||     '.      \/ //////|
   | | |__|__/_\  |__|__|_| |__|__|__| || |||               ///////|
   | | |__|__)__) |__|_|     __.--|__| ||_|||         .    ////////|
   | | |__|__|_/  |__|__ _  |__|--'__  | . ||         \'..'/////////
   | | |__|       |__|__|_| |__|__|__| |( )||          `--`///////;
    \|                                 | ' ||---.  ,,,////////////
     '---------------------------------'---'     `.//////////////'
                                                   ```=///////='

"The PEZ bot demands haskell programmer's cum"

Name: Anonymous 2011-06-26 13:24

                   _,,,_
                  //_\\\\
                  ;/ \\\\;
                 (  '7'  )
                  ;  _  ;
                   \ _ /
                .---)_(---.
               /\\  <_>  //\
              ;   > / \ <' _;
              |   | | | |   |
         _____|  |\_|_|_/_  |_______
        /    /  /        /  /      /|
       /   \/==/------, /==/      //|
      /    (\( -     /  \\(      //||
     /       / ~~~~ /           // ||
    /       '------'           //  ||
   /__________________________//   ||
   |-------------------------;;    ||
   ||   ||     |  ||  |==||  ||    ||
   ||   ||     |==||==|  ||  ||    ||
   ||   |/    /  / /  /      ||    |/
   ||        (__/ (__/       ||
   ||                        ||
   ||                        ||
   |/                        |/
"F minus and no dick sucking this time.
Next time you claim that haskell is usable i'll expel you personally"

Name: Anonymous 2011-06-26 13:26

                  :
                \ _ /
              -= (_) =-
        ,________|_]
        | // // // |
        |//_//_//_/|
        ||""""""""||
        ||________||
        |.========.|
        ||        ||

 

                 ___
               ."   ".
               |  ___(
               ).' -(
                )  _/
              .'_`(
             / ( ,/;
            /   \ ) \\.
           /'-./ \ '.\\)
           \   \  '---;\
           |`\  \      \\
          / / \  \      \\
        _/ /   / /      _\\/
       ( \/   /_/       \   |
        \_)  (___)       '._/
"If our faggot hipster boss had allowed us to use Java instead of haskell,
we'd've been finished two months ago."

Name: Anonymous 2011-06-26 13:27

                ,
       __  _.-"` `'-.
      /||\'._ __{}_(
      ||||  |'--.__\
      |  L.(   ^_\^
      \ .-' |   _ |
      | |   )\___/
      |  \-'`:._]
      \__/;      '-.
      |   |o     __ \
      |   |o     )( |
      |   |o     \/ \

"Sir, please immediately add state to your toy program."

Name: Anonymous 2011-06-26 13:27

          _.---._
       .-' ((O)) '-.
        \ _.\_/._ /
         /..___..\
         ;-.___.-;
        (| e ) e |)     .;.
         \  /_   /      ||||
         _\__-__/_    (\|'-|
       /` / \V/ \ `\   \ )/
      /   \  Y  /   \  /=/
     /  |  \ | / {}  \/ /
    /  /|   `|'   |\   /
    \  \|    |.   | \_/
     \ /\    |.   |
      \_/\   |.   |
      /)_/   |    |
     // ',__.'.__,'
    //   |   |   |
   //    |   |   |
  (/     |   |   |
         |   |   |
         | _ | _ |
         |   |   |
         |   |   |
         |   |   |
         |___|___|
         /  J L  \
        (__/   \__)

"Do you know what they do in prison to haskell programmers?'

Name: Anonymous 2011-06-26 13:29

                    / .-     __
                    |/,-'`  `-.\
                 _.-'''-._     \\  .--.
              _.;.--._.--.;._  _\\/_`~\\
     _  .-. .` /(   / \   )\ `|. \\ |--'
    | \ | |   ;  '-'   '-'  ; |~~~~~|
    _\ \| |__ |     (_)     | |  '__|_
   (_`      _)| .         . | |. (__  \
     `',  |`  |  `-.___.-'  | |  (__  |
       |  |   ;    | : |    ; | '(___ |
       |  |    \   | : |   /  |  . |  |
       |   \____'._| : |_.'___;====|  |
        \          | : |              /
         '------.  '._.'  .---------'`
                |         |
                | .  ~  . |
                |         |
                |         |
                |____.____|
               /===========\
              ;:.   | .::.  ;
              |:'   |_'::'  |
              |  .:. |      |
              |__':'_|___.::|
              [______I______]
                |    |    |
                (_   |   _)
                 |   |   |
                _|___|___|_
            .-//\\--|||--//\\-.
           (_||__\\//|\\//__||_)
           `"""""""""`"""""""""`
"Two weeks of C# job paid for the vacation at Hawaii
and the coke and whores."

Name: Anonymous 2011-06-26 13:30

                __________
               |          |
             __|__________|__
            '--///      \\\--'
              (|/  6  6  \|)
              )\\  _,)._ //(
              ( \\\ == /// )
              )  \\)\//(/  (
                  )))))))
                  ((((((
                   ))))
                    ((
"Haskell is not kosher"

Name: Anonymous 2011-06-26 13:30


                \\\\///
            _.""       ""._
          .'               '.
         /                   \
         |    .=~~= =~~=.    |
         |    .-''-.-''-.    |
         |   /_____|_____\   |
      .--'     (o ) (o )     '--.
     /  _        /   \        _  \
     | (_       /     \       _) |
     \         |       |         /
      '--. \'--\       /--'/ .--'
          \ \   '-----'   / /
           \ '. .--.--. .' /
            \  `'-----'`  /
             '-.       .-'
                )'---'(

"I'm so fucking high"

Name: Anonymous 2011-06-26 13:31

                  / .-
                  |/,-'`
               _.-'''-._
             /` __   __ `\
        ___ ;__.--._.--.__;
       /  /\  ( O / \ O )  `\
       | _\/_  '-'   '-'   _/
      _|_|' |     (_)     |
     /  __) |             |
     |  __) |    .___.    |     .-.  _
     | ___)';    |.-.|    ;     | | / |
     |~||/\ .\           /    __| |/ /_
     | \_\/==;'._     _.'__  (_       _)
     \  8      /\"""""/\   `\  `|  .'`
      '--8----.`-`\^/`-`.    \  |~~|
          8   |   /~\   |`\   \ |  |
          8   |   |\|   |  \   `y  |
          8   |   |\|   |   \      /
          8   |   |\|   |    '.__.'
          8   |___|\|___|
          8   |===\_/===|
"I saw your contributions at the haskell wiki. You're fired."

Name: Anonymous 2011-06-26 13:32


             .---.
           /` ___|`\
           |_/    \|
           (  -/-  )
            \_ - _/
           .-'|_|'-.
          /         \
         /     O     \
        / _____!_____ \
       /.-------------.\
       \|     ,;,     |/
        |     ;;;     |
        |  ;;;;;;;;;  |
        |   `';;;'`   |
        |     ;;;     |
        |     ;;;     |
        |     :::     |
        |     ';'     |
        |             |
       _| _  __   __ _|_
     _/ _  __  ___  __ _\_
   _/ __  ___  _ ___ __ _ \_ 
"God hates fags and haskell programmers"

Name: Anonymous 2011-06-26 13:34


          _,,--,,_
        /`       .`\
       /  '  _.-'   \
       |  `'_{}_    |
       |  /`    `\  |
        \/ ==  == \/
        /| (.)(.) |\
        \|  __)_  |/
         |\/____\/|
         | ` ~~ ` |
         \        /
          `.____.`
"We kill haskell programmers in the name of God"

Name: Anonymous 2011-06-26 15:16

Okay now do it against LISP faggots too.

Name: Anonymous 2011-06-26 16:01


             *     ,MMM8&&&.            *
                  MMMM88&&&&&    .
                 MMMM88&&&&&&&
     *           MMM88&&&&&&&&
                 MMM88&&&&&&&&         Sometimes I wish we
                 'MMM88&&&&&&'    could just launch
                   'MMM8&&&'      *  all the LISPers to the moon
          |\___/|
          )     (             .              '
         =\     /=
           )===(       *
          /     \
          |     |
         /       \
         \       /
  _/\_/\_/\__  _/_/\_/\_/\_/\_/\_/\_/\_/\_/\_
  |  |  |  |( (  |  |  |  |  |  |  |  |  |  |
  |  |  |  | ) ) |  |  |  |  |  |  |  |  |  |
  |  |  |  |(_(  |  |  |  |  |  |  |  |  |  |
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |

Name: Anonymous 2011-06-26 16:02


"I won't fuck a LISPer"
                       "Don't worry, I write Java for a living"
         ____
       .'    '.                ____
      / .;;;;. \            .-'    '-.
     | /////\\\ |          /  ,;;;;,  \
     | |( '\'(  |         |  {{{{{{}}  |
      \ `\ -_/ /          |  {)'<' }}} |
       ;<\  (>;            \ {\_= /}}}/
     /`|\`\_//|`\           `{{)  \}}}
    ;# LI__:_LI #\          /`\`""`/`\
    |  | .--. |   \        /   '--'   \
    | #| |__| |\ # \      /     ()     \
    |  ;      |#\  #\    /   /      \   \
    \#  \     \/ \#  \__/-._/   ()   \_.-\
     `\#/    \ |  \_.'=-;._/          \_.-;
      |/      \|  //\_/`\_/     ()     `\|_\
      |   |_   | ||      ||'-.______.-'`\
      |    |   | ||_...._||._        _.-'
      |   /|   | //.----.\\ ;```--```;
      |   ||   | |`-....-'| |   |\   |
      | __||   | \        / |   ||   |
      |   ||.-.|  '.____.'  ;.-.||-- |
      |   |; _ |            | _ ||   |
      |'--;`/ \;            /`\'`|._.;
      ;.__| >_ |            | _< |.__|
      (__/  \_/              \_/  \__)

Name: Anonymous 2011-06-26 16:03

                    _     _    _     _
                   [_]___[_]__[_]___[_]
                   [__#__][__I_]__I__#]
                   [_I_#_I__#[__]__#__]
                      [_]_#_]__I_#_]
                      [I_|/ _W_ \|#]
                      [#_||{(")}||_]
                      [_I||{/~\}||_]
                      [__]|/\_/\||#]
                      [_I__I#___]__]
                      [__I_#_I___#_]
                      [#__I____]__I]
       .-.            [__I_#__I__[_]
     __|=|__          [_#_[__#_]__#]
    (_/`-`\_)         [__#_I__[#_I_]
    //\___/\\         [_I__]__#_I__]
    <>/   \<>         [#__I__#_]__I]
     \|_._|/          [_I#__I___I_#]    .:.
      <_I_>           [#__I__]_#___]   -=o=-
       |||            [_I__I#__]___]    ':'
 jgs  /_|_\         \[__]#___][__#]//, \|/
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
"Shouldn't have written that paren, bitch. Enjoy the tower"

Name: Anonymous 2011-06-26 16:04

                     '
     |\          .(' *) ' .
     | \        ' .*) .'*
     |(*\      .*(// .*) .
     |___\       // (. '*
     ((("'\     // '  * .
     ((c'7')   /\)
     ((((^))  /  \
   .-')))(((-'   /
      (((()) __/'
       )))( |
        (()
         ))
"I wish I had taken the Java course instead and had a job."

     

Name: Anonymous 2011-06-26 16:05

              _____________
     ....-''``'._ _________)
             ,_  '-.___)
               `'-._)_)
     -----'``"-,__(__)
"Get the fuck out and take your parens with you."

Name: Anonymous 2011-06-26 16:06


  ::::::::::::::::::::::::::::::::::::::::::::::::::::::
   ::::::::::::::::::::::::::::::::::::::::::::::::::::::
   ::::::::::::::::::::::::::::::::::::::::::::::::::::::
   ::::::::::::::::::::::::::_:::::::::::::::::::::::::::
   :::::::::::::::::::::::::/ |::::::::::::::::::::::::::
   :::::::::::::::::::::/ \ | | /\:::::::::::::::::::::::
   ::::::::::::::::::::::\ \| |/ /:::::::::::::::::::::::
   :::::::::::::::::::::::\ Y | /___:::::::::::::::::::::
   :::::::::::::::::::::.-.) '. `__/:::::::::::::::::::::
   ::::::::::::::::::::(.-.   / /::::::::::::::::::::::::
   ~^~_-~^^-^~^_~^_^-~^~^-~| ' |~^~_-~^_^-^~^_~^_^-~^~^-~
   ~^-_~^-~^_~^-~^_~^-_ _^,|___| ,~_ _~^-_~^-~^_~^-~^_~^-
   ~^-~^~-_~^__.===~'`__..[_____]-..__`'~===.__~^-~^~-_~^
   ~_~^_.=~~'   ~_.==~-.-~|     |~=.-~==._~^-^'~~=._~_~^
   ~-:`-~^-~^_~^:-~^~-_~-.`-===-'_.=~-_~^-_:~^-~^-_~`;-~
    ~-'._~^-~^-_^~=._~-~_~-'~~'~`_^-~_^_.=~-~^-_~^-_.'^-
   _~^-~^~=._~^-~^_-^~~==..,~_^_,..==~~-_~^-~^-_.=~_~^-~^
   _-~^-~^_~^`~==.__-~^_~^-_~^-_~^-_~^-~__.==~`_-~^-~^_~^
   -~_~^~-~^-~^~_~^~`~~~==,,....,,==~~~`-~_~^~-~^-~^~_~^~
    ~=^~^-~^-_~^~^_-^~^-~^~-_~^-~^-~^_~^~-~^~-~^-~^-~^-~^
    ~^~^-~^-~^_~^~-^~_~^-^~^~^-~^-~^~^~-^~-~^-~^~~-^~-^~^

"LISP is a very usblblbublblblbblblblbllll

Name: Anonymous 2011-06-26 16:07

                             ...::::)))))):.
  /~~\               ...:(((((((((((((((((:'
 /~~\ \          .::)))))))))))))))))))):`
     \_\__   ,-((((((((((((((((((((((:'
   ,'~__ '),' ` `''"~'~-=-===.~~'"'`
  (,@   ,/   `.`.`. .-.     _/@@@/`.
   \_.__/\__`~\____ |~|.~+=/@@@/~_/@`.
     ~` _____\ \. '~| |'~~;@@/~_/@@@@/`.
       /=___=___\-  | |    `\_/@@@@/~_/@`.
      //~           `.`.      '\@/~_/@@@@/.
     //               `.`.       \/@@@/~~ ;
    ]/                  ~=`._      `'~=._.;
                                         .'
"I feel like stinging a LISPer"

Name: Anonymous 2011-06-26 16:09

              _|/
            ."   ".
        __ /(o)-(o)\
      /_)||   /     |
      |_)||  '-     |    
      \_)|| '.___.' /   |\/|_
       | / \  \_/  /   _|  '/
       |--\ '.___.'    \ ) /
       \   \_/\__/\__   |==|
        \    \ /\ /\ `\ |  |
         \    \\//     \|  |
          `\   /\   |  /   |
            ;  ||   |\____/
            |  ||   |    
"To not wasting out lives on toy languages and having a well-paid job!"

Name: Anonymous 2011-06-26 16:10

         __
       .'  `'.
      /  _    |
      #_/.\==/.\
     (, \_/ \\_/
      |    -' |
     ,\    =  / /|
  .-'|`-. __.' / |
 /   |S `-.__.' .-\
    /-.I   | | { _/
    \_ }C  | |  `|
     |   P | |   |
      '.   | |  .'
        '-.| |.'
           `"`
"What the fuck am I reading."

Name: Anonymous 2011-06-26 16:12


       ___________________
      / _________________ \
      |/                 \|
      ||                 ||
      ||      .-""-.     ||
      ||     / \    \    ||
      ||     | /`-._|    ||     .-""-.
      ||     |/ . . |    ||    /  /   \
      ||     (   _\ )    ||   ;_.`\   |
      ||     |\  = |     ||    /.  \  |
      ||    /\ \_._/     ||   /_   )\ /
      ||   /\_\___//\    ||     =   `(
      || /`  \  \|   `\  ||     \__/  \
      |\/_____|__;_____\_/|       )__/ \
      \___________________/      /| / /`\
                                / ` /    |
                               |    |    |
"I wish I had anyone to talk to, but nobody wants to talk to a lisp faggot"

Name: Anonymous 2011-06-26 16:13


                 .-----.
                /       `\
              _|_         |
             /   \        |
             '==='        |
             . ' .        |
            . : ' .       |
               '.         |
           . '    .       |
            .-"""-.       |
           /  \___ \      |
           |/`    \|      |
           (  a  a )      |
           |   _\ |       |
           )\  =  /       |
       _.-'  '---;        |
     /`           `-.     |
    |                \    |
    |    |   .  & .   \   |
    \    /      &   |  ;  |
    |   |           |  ;  |
    |   /\          /  |  |
    \   \ )   -:-  /\  \  |
     `.  `-.  -:-  | \  \_|
       '-.  `-.    (  './\`\
        / `'-. `\  |    \/_/
        |    \  |  |      |
        |     '-\===D     |
         \       | |      |
          \      \ |      |
           \      \|      |
            \      \      |
             '.     |     |
               /   /      |
              /  .';      |
            /`  /  |      |
           /   /   |      |
          |  .' \  |      |
          /  \  )  |      |
          \   \ /  '-.._  |
           '.ooO\__._.Ooo |
"oh fuck sussman gerald makes me so hard rub rub fap"

Name: Anonymous 2011-06-26 17:25

That was awesome. Keep up the good job!

Name: Anonymous 2011-06-26 17:40

dude, lisp might be old, but not that bad...

Name: Anonymous 2011-06-26 18:00

>>37
It's not because it's old.  It's because the parens make it unusable.  Its semantics are almost perfect, pero the syntax leaves a lot to be desired.

Name: Anonymous 2011-06-26 18:09

>>38
just that? wasn't there already a project called "lisp without parentheses"?

Name: Anonymous 2011-06-26 18:22

Good thread.

Name: Anonymous 2011-06-26 18:26

>>39
Paredit already uses indentation as a visual cue and it's not enough.  Prefix notation sometimes just doesn't cut it.  I'm certainly not a fan of Perl's operator hell, but it's nice to have infix operators for certain things.

Name: Anonymous 2011-06-26 18:50

>>38
hahahahaha

oh wow

kids say the darndest things

Name: Anonymous 2011-06-26 19:09

>>41
operator hell
What's that now?

Name: Anonymous 2011-06-26 19:15

>>42 Either make an argument or shut the fuck up, fagstorm.
>>43 You know, an operator for everything and all that.

Name: Anonymous 2011-06-26 19:41

>>44
ok.
Lisp's lack of syntax takes about an hour to get used to. It's lack of syntax is the key to the power of the semantics that you claim to understand. Writing macros in a Lisp with syntax would require the programmer to do 'manual parsing' to convert the syntax to s-expressions anyway. In the end, syntax just feels pointless and over-complicated and in the way.

Or you could just get this argument from google. Nothing new here.

Name: Anonymous 2011-06-26 20:29

>>44
There are a lot of ops like there are a lot of functions in the standard library. Or like there are a lot of CPAN modules. It's not hell, quite the opposite.

Name: Anonymous 2011-06-27 8:26

>>45
Lisp's lack of syntax takes about an hour to get used to.
I think Ive heard this about a thousand times. I want my God damned infix operators. I don't want to write (+ 3 4); I want to write 3 + 4. I don't want to write (vector-ref v i); I want to write v[i]. I don't want to write ASTs by hand, that's the compiler's job!

Name: Anonymous 2011-06-27 11:35

Geehrte Damen und Herren wären sie bereit für einen Augenblick die Augen zu schließen und sich vorzustellen wie ich langsam meinen Penis in ihren Mund führe, halten sie kurz inne, riechen sie diesen Würzigen strengen Duft ein ungewaschenen Glieds? Nähmen sie sich zeit und lassen sie es auf sich wirken während ich langsam weiter ihren Rachen runter gleite merken sie die plötzlich Luftknappheit?  Erschrecken sie sich nicht sie werden sich schnell dran gewöhnen weinen sie ruhig wen ihn danach zumute spüren sie dem Rhythmus des pochenden Gliedes konzentrieren sie einzig und allein auf die würzige Zwiebelwurst die ihren brechreiz wieder und abermals auf die probe stellt. Und dann werden sie eins, eins mit dem Moment der Vollkommenen Entleerung genießen sie jeden einzigen klebrigen tropfen der ihr Kehle herunter tropft und werden sie sich dem Leben in seiner vollen Wonne  bewusst.

Name: Anonymous 2011-06-27 12:48

>>47
you are missing the point so far that it's funny.

Infix operators and easy-to-use arrays are only attractive if you're a C-programmer and NEVER abstract anything off of doing pointer arithmetic.

In Lisp you slather layers of abstraction on everything you do, including things that are 'primitive operators' in lesser languages like arithmetic.

here's dot product in Scheme:

(define (dot a b) (apply + (map * a b)))

or would you rather a loop or lots of infix math operators?

Name: Anonymous 2012-06-16 4:32

>>12
typical haskell programmer

Name: Anonymous 2012-06-16 5:13

>>49

Dot product

require "matrix"
def dot_product vec1, vec2, angle
  raise TypeError unless vec1.is_a? Vector and vec2.is_a? Vector and angle.is_a? Numeric
  vec1.magnitude * vec2.magnitude * (Math::cos angle)
end

Name: Anonymous 2012-06-16 5:47

>>47
I've never had a problem with prefix notation. Maybe you're just dumb.

I do realize I am responding to a year old post, but this faggot probably still comes here.

Name: Anonymous 2012-06-16 6:21

>>52
You're right, I'm still here.

Lisp is shit, parenthesized.

Name: Anonymous 2012-06-16 7:01

>>51
What language is that?

Name: Lambda A. Calculus 2012-06-16 7:12

GETting these dubs in the name of UMENA HASKAL-CHAN!!!!

Name: Anonymous 2012-06-16 20:30

>>54

Ruby. I use exceptions to enforce correct typing.

By the way, a simple way of doing dot products in Ruby:

Vector[a,b,c].inner_product Vector[x,y,z]

My earlier code only requires an angle as an argument because I can't be assed to remember calc 3 at 2 in the morning.

Name: Anonymous 2012-06-16 21:00

㞒ᥒ䥘項⎈搀掆С隔冇㉇茀癢呣礓঒熂⅐⤗䍑䚆ᒓ㔢㈑蕓␙ↈ顒坵莓鈶钔怵≖報Ј甂p΀ᥦ甁ᝄ傗昱c葉椗ᐴ䀴⎒虓芅餄╃枈董捴陳‴碀荁㙸饆怣晉ቨ阵焇╦投蕅ᑖᕷ耘晹墄虹啕ࠤ␈ࠠ䘣⌑ဧ嘦鞙炐ᠱ厖灸分琲煦煄嚈㠔産坰襣晀卤脀န憁䝷✕ᄩ琴㍳昅噴⅙倲⍁€䤷ᅔ攱䒅職硔甥喂Ԁ酹嘦碂⥖鉵⥁瑑㝉聐来㥰ᒕ㐨荲攠琀⠴䤹抂霰ᄄ悙䊉᥂ᄘęㄅ単♈⒖㜔晅䌁䄠椡ኃ犗⢇碂桰ㅂ╱喀昁癖ሓ獓㔱挆⅑䌷⦂၂挩u椰陈⎙ᄳɦ顲΁儕㠤碕⑤葵⍁䈁褐ճ❥戥ㅢ㐃अ㘷散䄠愃ᝢ萓Ф锘І堅礸䝉堓圗祖䆑䊗荓䤴鉔砤ʄƓճ鄧芈扠═䝄鎈頇蠡奨鈵褷̗祐啡ㅑ坓ᚖ鈳霠酕捹ឆ楘虸䚈㔖⤒襅ᑂ萨䑴憒榁蕘晁圔晀䅗陕⚇祴爡ᜲ䞓ጤ䖆蚉須♷琐兲ᘕ煔鈤ݱ耸ᡔᜃ奃䍩儶陃㠸栗夗ᤰ舱ʅ椘枓猁ᝠ‣䅳礩蚙

Name: Anonymous 2012-06-16 21:23

栠ङ襂餳㘂楴夁覘䔀͐硔搳镆ᕱሰ衸☒蠵鄧⅑锰搂艙㢗怵㢗杔薉ᄂ匹鉉霦荇蠐榉䀡楴鄤ህ梃ᔙ㉷⁠硧犂ᑕ㉠灩⚆荄ޕ鐱陃䘀摂愆‡ᜥ䠓扑䙔蚔䄂㖅㉁㠃砕ሩ㎄㥓锣╄⌓㞓㘆څ荁℧鑠㠈即⥤䚆͘᥆堂眹璄抐啉䐵醓撃㎄㜑̤疓䞓㥕酗杕怅椧邆ᘹᑅ攧艨㞕ՐA⊐噕夳F攅⢒ݑ逇候熅喒җ咉塸朓奣瑇捨畑㔄ᑁ䈰嚓Š鐘㤄⤠䄵ㆇԲ换स摖蜂☈襅䁁儃荠ဈ၃ܓ㐇霔Ĵ塠挂睵⌖順⁦␸䢆㐤唕具ࡅၙ厕⎁酄ࡰ扸ᐐ⥄ݥ⊂ᢕѡ䝒薀們ふ蔑7咉ͅ奕खㅢ劉┱ⅳ䐔䆂襱炓倄䚓萔䑧吠畀㙃嘦靠䤱eࠇ卉袂怤䎒蝢荣捄嘖䘱♥鄱逈ᔦ愁遡Е螗㤒ၗ挥᜘扤䐖頂䐠ᔘኅ颗薕⥈茁✸蕰桶ᙣ2鄲ᤅ䔱挵Ƙጃ脹⁶搀腓酑⤔ᜤㅑ゘榖㈨䖅ᔗࡈ䝂ⅱどち儶㚓瑳奅銘䜴Ք馑⑑葘䝳㝀爖䝕入餖脷㌵邘䍗鈁鑨靓礂ƕ≥煉呐熈䂂

Name: Anonymous 2012-06-16 22:23

夗ࠁ✗㕰馄ٷ餃摩␇⑸戃ᜩᑱᢙ蠧㒈ᜐቒ腈憀㉷顙㡓瞇唈睢煢攉鎀鐳瑣㈅脗ဓŃဦሡ鍳獨⑗舒ᡰ぀␩㕃᠃镵㐔䖇愒餷䈐猆匄䤩圣䘰閗Փ鑣艁•䚈䦓摨偶奵奡顸㔠摴հ✩璐楔圓じी颀閕玉ظ切‡憃猆᜘怘ᄅ䕃㔇醕瀕怒荣ݲ搈ᐢፔ䔐卢暀፱夢蒘㐷祸㙲怰⁒朒甘❓堹艡呵顀栴፲ᒁ㜑钙摂㎉ƅ睃㝰䎀圲瑰䘵䙲椆㍈瀶搗兰䍠ֆ憑㉡琤啱̨ᑤअᙐ͂焒㥆∥⁡鐒饔䁀聹ᖗ递甧⦂䤇ᙔℐ䕓 銈坐ᎄ唐畆萑ᒙ艥扥杕門鞕䉕ᐷ略摵ᘣ艠✩䁙刳栕♴〹噉䎇傘ぇ靑墖蝄䀳ȑ畳▉瘲饧㉓‘℠䔨䊑砙⌱♰㆗垑∕ॖ䄆昀㡱卣䅕Θ㥨䁸㕵到瑒錅礥摣爲☃ᝳ癘葧ဨ瀰㘳ቸ遲酸ቒ倉偐阣堑塠䀠 ঐक㖓頲夆ᝩ䖇⌂✨悄䁸⌷⌔逳ᚈ杓♰瀦剗䠸⡕外∷ၣᄁ舣抆ʁ薅炁夐᜶ࡹ靴ጇِ䉉爕⦉蜅夵術ᦃ急搆陑䔵塤茕頔㊒ᅒ熄

Name: Anonymous 2012-06-16 22:53

㦉琠䦔㌀薅㈓頰耴⠄圗⍑♆碀ᡖ䠢暑ሦ葨靄劀䀆怴坖鈹桤ᖓ΀蒖醉㜐⊀㥤醃元┸㑦㑀膑憆㊃傑މ♑饙ؘ椐搈衱瘙䉈╤္㦑☨颖⍅⤹鉧舳㊁邗፸㝧砡Ĥᤈ傑冂ᜡ楁䔱ᆈ㌵ᜓ⍗䝘顖頰鄨⤐ࢗ瘢♤̩❉⒇⒆䀓⌒㡁䑣ᆆ⅁霰㐧✃ፉ噧慙夨匄報奱挦॔䈢㑂煙᠓厕ℙ㉆鐥荙ⅶ遙❀ᅗ夣䑃䝒❶ᔸさ啒攰႔炁牐頖䀱ᙶ禀ԇ䙒㢑㉠⦈䑤醐ԙ䉷打膃祰榄ę莖➗㞃㘕慲瑧栤熈㍅ၥ肅ᑃ鎕㈧⚂䡗ᢑ圂Յᄵ蠉❐扵剸噈剥撘䚀奄䈴Š≀䕈錵吧嘐颈塗捦朵权睵ᡲ唸䥲熇䜸顲⡄瀇膈㌖聡☦̅䄂镣隃鞕愣遷蠆堈蠒灗妖ᜓ➔ـ㠉瞃㔘╆䔩捸舘圦蔶҅蘴薖卵儒爤鄓鍆鍑眑院Ũ祉瀇炀⦔鈶᜹ܗ㕳萱镲ၲ嘡℉遈玅ℴ䀶╒䥗刔ڀ衃栁ᖒ咄艄ᑵ喀ᒖ㊕䙩⍀⤲煉玔㉃䉠ᚐ㎈ݳ␡ᎀ癃㝑蠤ŗ焇鐸ɴ䍁㙄腣怡Ȃ✠ᐣ璐衂⌃抅ጴ焀焢

Name: Anonymous 2012-06-16 23:15

ɘʼn斘䔘酱妙璘条锘咃㥘犉颐鄕逹㠔∇合㍓吉ᆈ嘲塠琸㌖び嘖䊃扥㕙鞄䚃憒Ց厀㠱蕉䞑杕ذ·袃舒䕹ℕ锠鈄㔸ᠩᡰ墐➉甕煸㕡愒戤睷脀䑃灆ŀ䁵⠣咖йć楳ㄡ聂ळ蘰䀵静莃䕒猷聢䉲㎈⁤祉䤅㙧甤᝹襤㘓愰镤员㝡㠠ђ刄萣ᤈ䠖䑴】枈ʔ悂怑鈤ፖ祴㐗䔠<䖁䁤鍇犀⑲❰睕ࢗ㔵到␥杩㢑嘵ࡈ虹ጷ噴塴ፙᥒŅ蠷⥀嘸視猶㤐悕ᘓ倘Ă٧䐈剕顣ᜁ晣妆祰ᙳॲ"夵襃ՠȨ㕁妔抇録萢܉脖蚂䅆䕳椠颇䠓ቇ䖆塑䙸鑈㙲葃霢邈̈́䆈覃掙⡂०怢覂邓᎘碀ᅠ㢃饐䅓㠦芄牓ᡩ妉腀栳ᄆ␘鐴灒䈀䙐栰܉具䅖㈹⚃≩虤┳朥垉␹錦畄腦䕆猒႕芐噣㠁ᔘ䡉㌃᠅ч袘遥薘饙䑩瀸怀㉹嘶ᜰ䐐u牖ȵ襴钐鞃鈹॓ᦓ煨䐅㎔Ԗह呔枒褙䑧镩蘷㘱礧䥒瀅س灷昈霗䁰皀杨䠕䄐嘀堇艓慄舗饹億सࢇᙷኑ榁钉印▂䥆牅蕀㢑猣ĥ蔣匲

Don't change these.
Name: Email:
Entire Thread Thread List