Oop344 20102 May 27 - Online IRC course

From CDOT Wiki
Jump to: navigation, search

Preview

Today we went through 2 topics:

1. IRC chat rules
2. lazy evaluation

Whole Version

http://tinyurl.com/oop344may27

Main Part 13:40 to 15:15

438 : [13:41] <@fardad> hello
439 : [13:41] <JQuan> hi
440 : [13:41] <cgm87> hi
441 : [13:41] <Ray_> yo
442 : [13:41] <TonyKim> Hello
443 : [13:41] <Han3> hi
444 : [13:41] <adgezaza> hai
445 : [13:41] <lwang168> hi
446 : [13:41] <Ray_> o hai
447 : [13:41] <Bhavnesh> hey
448 : [13:41] <_YJ_> hi
449 : [13:41] <slaw12> hi
450 : [13:41] <xzhang148> i have log all
451 : [13:41] <iIra> Hi everyone
452 : [13:41] <Vovko> ohai
453 : [13:41] <oleg_pliats>  hi everybody
454 : [13:41] <ling_wu> hi
455 : [13:41] <caangus> hello
456 : [13:41] <Ray_> HALLO
457 : [13:42] <OzZy_M> hai2Uall
458 : [13:42] <crgosselin> HAI
459 : [13:42] <@fardad> Ray_: one hello is good :)
460 : [13:42] <sinker> hi
461 : [13:42] <Ray_> okii =)
462 : [13:42] <CloudScorpion> oh geez
463 : [13:42] <CloudScorpion> the kids are gonna lose their minds here
464 : [13:42] <crgosselin> nah we live on msn its all good
465 : [13:42] <OzZy_M> speak for yourself :P
466 : [13:43] <@fardad> Before we begin I want to use this opportunity to go through few point about IRC and the culture of chatting in IRC channels
467 : [13:43] <@fardad> just for everyone to know, the class is now in session
468 : [13:43] <xlu44> in time
469 : [13:43] <@fardad> irc chat:
470 : [13:43] <xzhang148> please add the svn
471 : [13:44] <CloudScorpion> fardad: perhaps you could mute everyone, then unmute them when you want questions
472 : [13:44] <@fardad> CloudScorpion: mute
473 : [13:44] <@fardad> irc chat rules
474 : [13:44] <@fardad> 1- casual chatting on IRC:
475 : [13:45] <@fardad> when you talk in an IRC channel that is not in a meeting mode, which means no active meetings is happening there
476 : [13:45] <@fardad> you see lots of cross talk between poeple on different subjects
477 : [13:45] <@fardad> to prevent conflict, usually users label their messages
478 : [13:45] <@fardad> CloudScorpion: thanks for being here
479 : [13:46] <@fardad> this means I am talking to CloudScorpion and no one else
480 : [13:47] <@fardad> but when you get into a channel and you see a meeting is happening, then always label your messages and try to limit them to minimum to prevent noise
481 : [13:47] <@fardad> 2- attending a meeting on IRC:
482 : [13:47] <@fardad> I - try to not do cross talking to everyone understands what is going on
483 : [13:48] <@fardad> but if you have to (have a question or want to say something to someone) then label your massege;
484 : [13:48] <@fardad> OzZy_M: are you ok with this?
485 : [13:48] <OzZy_M> fardad: I'm assuming you do not want to use Queries
486 : [13:49] <@fardad> all: that is the next point
487 : [13:49] <@fardad> if you only want to send one or two  messages then labeling is fine
488 : [13:49] <@fardad> but if you want to have a non-related chat (like when you talk in class when teacher is teaching :) then use /query
489 : [13:50] <@fardad> as you know all commands start with a "/"
490 : [13:50] <@fardad> if you want to open a private chat with someone you type "/query nickname"
491 : [13:51] <sinker> fardad: how do you know when a meeting is taking place in a channel?
492 : [13:51] <@fardad> sinker: good question
493 : [13:51] <xzhang148> fardad:how many persons should in a private chat?
494 : [13:51] <@fardad> sinker: good question
495 : [13:52] <@fardad> the answer is you just know .....
496 : [13:52] <@fardad> its like when you get in a room and yousee someone is talking an everyone else is listening....
497 : [13:52] <@fardad> then that is a meeting or a lecture
498 : [13:53] <@fardad> xzhang148: to answer your question...
499 : [13:53] <CloudScorpion> he is gonna lose control of it so quick
500 : [13:53] <CloudScorpion> err
501 : [13:53] <CloudScorpion> ignore that
502 : [13:53] <@fardad> CloudScorpion: sure
503 : [13:53] <@fardad> xzhang148: when a privte chat using a /query is only between two
504 : [13:54] <priya_gill> hi sir when is quiz then
505 : [13:54] <@fardad> priya_gill: hi and welcome, we are in a lecture now....
506 : [13:54] <xzhang148> fardad:ok
507 : [13:54] <adgezaza> Vovko:  label command test
508 : [13:55] <priya_gill> ok what r we discussing
509 : [13:55] <crgosselin> priya_gill: be quiet like in class, this isn't msn
510 : [13:55] <tdot> fardad id use +m until question time
511 : [13:56] <@fardad> tdot: Thanks tdot, I know, but that is kind of.... dictatorship....
512 : [13:56] <@fardad> I want students to be able to ask questions if they want :)
513 : [13:56] <OzZy_M> and totally open source...
514 : [13:56] <@fardad> ok...
515 : [13:56] <crgosselin> fardad: Please continue with the lecture
516 : [13:57] <xlu44> sinker
517 : [13:58] <@fardad> ok everyone, if you just joined, today logs are here:
518 : [13:58] <@fardad> http://tinyurl.com/oop344may27
519 : [13:58] <@fardad> read after 13:40 LABEL
520 : [13:58] <@fardad> http://tinyurl.com/oop344may27
521 : [13:58] <@fardad> OK
522 : [13:59] <@fardad> lets continue
523 : [13:59] <@fardad> IRC meetings II:
524 : [13:59] <@fardad> rule II:
525 : [13:59] <@fardad> if you need to pass a url to others in a meeting, don't use a long url like:
526 : [13:59] <@fardad> http://fardad.com/irclogs/Default.aspx?co=0&log=%23seneca-oop344.freenode.20100527&u1=All+Users&u2=No+One+Else&u3=No+One+Else&u4=No+One+Else
527 : [14:00] <@fardad> but instead use servicesl like tinyurl.com to shorten it to something like:
528 : [14:00] <@fardad> http://tinyurl.com/oop344may27
529 : [14:00] <@fardad> IRC meeting rule III:
530 : [14:00] <oleg_pliats> or bit.ly - it is free  one
531 : [14:01] <@fardad> oleg_pliats: thanks
532 : [14:01] <@fardad> rule III:
533 : [14:03] <@fardad> do not copy and paste code in a chat room
534 : [14:03] <@fardad> doing this is bad:
535 : [14:03] <@fardad> #ifndef  __FS_IOF_H__
536 : [14:03] <@fardad> #define  __FS_IOF_H__
537 : [14:03] <@fardad> #define PLT_VCC  11
538 : [14:03] <@fardad> #define PLT_BCC  22222
539 : [14:03] <@fardad> #define PLT_LNX  31
540 : [14:03] <@fardad> #define PLT_MAC  434
541 : [14:03] <@fardad> #ifdef PLATFORM
542 : [14:03] <@fardad> # undef PLATFORM
543 : [14:03] <@fardad> #endif
544 : [14:03] <@fardad> #define PLATFORM  PLT_VCC
545 : [14:03] <@fardad> void iof_init();
546 : [14:03] <@fardad> void iof_end();
547 : [14:03] <@fardad> void iof_flush();
548 : [14:03] <@fardad> void iof_movcur(int row, int col);
549 : [14:03] <@fardad> int iof_getch();
550 : [14:03] <@fardad> #endif
551 : [14:03] <crgosselin> fardad: god thats annoying
552 : [14:03] <@fardad> instead use sevices like:
553 : [14:04] <Ray_> pastebin?
554 : [14:04] <@fardad> pastebin.com
555 : [14:04] <@fardad> and pass something like this: http://pastebin.com/ZpdGRWaW
556 : [14:05] <@fardad> for those who just came in:
557 : [14:05] <@fardad> read http://tinyurl.com/oop344may27
558 : [14:06] <@fardad> to see what we talked about in past 30 mins
559 : [14:06] <@fardad> finaly
560 : [14:06] <@fardad> two improtant ones....
561 : [14:06] <CloudScorpion> important*
562 : [14:07] <Ray_> lol
563 : [14:07] <@fardad> when working on an IRC chat, specially in a opensource project where so many languages are used
564 : [14:07] <@fardad> Never correct another one for spelling, grammer and stuff like that
565 : [14:07] <xlu44> lol
566 : [14:07] <@fardad> since english ir probably there 9th language....
567 : [14:07] <OzZy_M> lol
568 : [14:08] <OzZy_M> Ya i know Javascrip, C, TURING...
569 : [14:08] <@fardad> and if someone try to type correct english, they have to think about spelling more than the topic they are talking about
570 : [14:08] <@fardad> but obviously, if the word is toooooo wrong and you can understant it, then please ask :)
571 : [14:08] <@fardad> the second thing is:
572 : [14:09] <@fardad> every know and then, drop an "OK" , "got it" or something like that, so the lecturer know he is not taling to himself
573 : [14:09] <@fardad> ok?
574 : [14:09] <@fardad> OK???????????
575 : [14:09] <caangus> ok
576 : [14:09] <Vovko> Ok
577 : [14:09] <crgosselin> "OK"
578 : [14:09] <adgezaza> OK
579 : [14:09] <jaburton1> Okay!
580 : [14:09] <Junseok> ok
581 : [14:09] <Ray_> yessir
582 : [14:09] <cgm87> fardad: ok
583 : [14:09] <slaw12> got it!
584 : [14:10] <TonyKim> ok
585 : [14:10] <_YJ_> ok
586 : [14:10] <acchung1> ok
587 : [14:10] <goldenration> fardad: ok
588 : [14:10] <Han3> Ok
589 : [14:10] <OzZy_M> kk
590 : [14:10] <rhui4> kk
591 : [14:10] <oleg_pliats> got it
592 : [14:10] <iIra> ok
593 : [14:10] <sinker> ko
594 : [14:10] <xzhang148> ok
595 : [14:10] <Ray_> lol
596 : [14:10] <goldenration> ZZZ
597 : [14:11] <@fardad> if you want to state what you are thinking use /me in third person:
598 : [14:11] <xlu44> oki
599 : [14:11] <cgm87> ah
600 : [14:11] <xlu44> im not sleeping yet
601 : [14:11] <@fardad> and /me will be replaced with your nick name
602 : [14:12] <xzhang148> fardad:how to make a meeting room just allow our team members get in?
603 : [14:12] <Xwu> test
604 : [14:12] <Xwu> me is testing
605 : [14:12] <adgezaza> Vovko: lol Vlad
606 : [14:12] <tdot> xzhang148: just /join #channelname
607 : [14:13] <@fardad> ok
608 : [14:13] <@fardad> ok everyone any questions?
609 : [14:13] <cgm87> fardad: I have a question. Will we be getting our SVN accounts today?
610 : [14:13] <@fardad> tdot: CloudScorpion: did I miss anything about IRC chats?
611 : [14:13] <goldenration> fardad: nope
612 : [14:13] <tdot> i doubt it
613 : [14:13] <danapao> when is  the quiz?
614 : [14:13] <xlu44> hi fardad
615 : [14:13] <@fardad> cgm87: I already sent the request to ACS, I will forward it to you as soon as I get it
616 : [14:14] <xlu44> i have two question
617 : [14:14] <cgm87> fardad: thanks
618 : [14:14] <@fardad> xlu44: hold for a second
619 : [14:14] <xlu44> 1 how to tags person's name
620 : [14:14] <xlu44> ok
621 : [14:14] <CloudScorpion> fardad: you could mention what a kick, ban etc are
622 : [14:14] <tdot> what for
623 : [14:14] <tdot> alsone isnt in their sem
624 : [14:15] <xzhang148> tdot: you mean I need create a new channel?
625 : [14:15] <CloudScorpion> XD
626 : [14:15] <@fardad> CloudScorpion: good point
627 : [14:15] <OzZy_M> xzhang148: Yes
628 : [14:15] <tdot> xzhang148: yes, just type /join #your_channel_name
629 : [14:15] <tdot> and it will create new channel
630 : [14:15] <tdot> (if its not already in use)
631 : [14:15] <@fardad> ok
632 : [14:15] <@fardad> wait a minute
633 : [14:15] <@fardad> everyone...
634 : [14:15] <@fardad> I see that two points were missed
635 : [14:15] <@fardad> first
636 : [14:16] <xzhang148> tdot:ok,thx
637 : [14:16] <@fardad> to create a group channel, as tdot said you just type /join #new-channel-name
638 : [14:16] <@fardad> if does not exist, one (temporary one) will get created and you can invite your team to join to chat
639 : [14:17] <@fardad> BUT
640 : [14:17] <@fardad> BUT
641 : [14:17] <@fardad> BUT
642 : [14:17] <@fardad> BUT
643 : [14:17] <Ray_> one but is enough fardad
644 : [14:17] <jaburton1> But what?
645 : [14:17] <@fardad> it is higly recommanded not to do so unless your public channel already hass a meeting going on it
646 : [14:17] <@fardad> this is agains the nature of open-ness :)
647 : [14:18] <xzhang148> oh
648 : [14:18] <@fardad> ok
649 : [14:18] <@fardad> the second thing is :
650 : [14:19] <@fardad> if you look at my name: it is differnt with other names
651 : [14:19] <@fardad> it either starts with an "@" or it is in different color
652 : [14:19] <adgezaza> no
653 : [14:20] <@fardad> that means I am an operator and I can kick poeple out
654 : [14:20] <tdot> it should start with an @ in the nicklist, on channel in mIRC it doesnt append the @ by default unless its enabled
655 : [14:20] <@fardad> or even ban them to ever enter a channel
656 : [14:21] <@fardad> because IRC is an OPEN chat system, sometimes poeple talk a little too much or go against the policy of the community, that is when an operator can kick them out, or ban them for ever
657 : [14:21] <@fardad> so
658 : [14:22] <@fardad> that is it
659 : [14:22] <@fardad> about IRC chats
660 : [14:22] <@fardad> xlu44: you hade questions
661 : [14:22] <xlu44> ty
662 : [14:22] <xlu44> will you give us the svn account?
663 : [14:23] <crgosselin> xlu44: he sent the request to ACS already, he'll email us when it comes
664 : [14:23] <Ray_> i have question, if u dont mind, how did u became an operator of a channel?
665 : [14:23] <xlu44> oh
666 : [14:23] <xlu44> ty
667 : [14:23] <tdot> Ray_: you create it, or youre given operator status by the creator :)
668 : [14:23] <@fardad> well, when you /join #new-channel, then the first person getting in is the operator
669 : [14:23] <Ray_> yeh i see that
670 : [14:23] <@fardad> and then you can give others operator status
671 : [14:24] <Ray_> nice ty
672 : [14:24] <@fardad>  or you go to freenode admin and register your channel and then anytime you join it, you will be an operator
673 : [14:24] <@fardad> tdot: thanks
674 : [14:24] <Ray_> i see
675 : [14:24] <@fardad> cgm87: one last thing before we move on
676 : [14:25] <tdot> yeah, if you ever want to know the channel or nick commands, you can always do /nickserv help or /chanserv help
677 : [14:25] <@fardad> IRC meeting are very slow, because of all typing....
678 : [14:25] <sinker> fardad: is there a command/shortcut to label your chat with another user's nick?
679 : [14:25] <tdot> for the curious
680 : [14:25] <@fardad> and because of that you must be patient
681 : [14:25] <@fardad> any questions about IRC before we start the lecture?
682 : [14:25] <sinker> fardad: is there a command/shortcut to label your chat with another user's nick?
683 : [14:25] <tdot> sinker: in mirc, you can type a portion of their nickname and hit Tab
684 : [14:26] <tdot> youre on chatzilla so i dont know...
685 : [14:26] <@fardad> ohhhhhh
686 : [14:26] <@fardad> yeah , it is like that in all IRC clients
687 : [14:26] <@fardad> type the first few and hit tab
688 : [14:26] <OzZy_M> Like Linux/UNIX
689 : [14:27] <@fardad> or DOS :)
690 : [14:27] <@fardad> he he
691 : [14:27] <@fardad> ok
692 : [14:27] <@fardad> any questions? final call
693 : [14:27] <danapao> no
694 : [14:27] <JQuan> nope
695 : [14:27] <xzhang148> no
696 : [14:27] <goldenration> fardad: no
697 : [14:28] <CloudScorpion> ATTENTION: if you want a channel that isn't uptight and formal, join #seneca-jac444
698 : [14:28] <OzZy_M> lol
699 : [14:28] <OzZy_M> no questions
700 : [14:28] <CloudScorpion> fardad: sorry, had to stick that out there
701 : [14:28] <@fardad> ooooooooh
702 : [14:28] <@fardad> yeah, the social channel for seneca students:
703 : [14:28] <@fardad> #seneca-social
704 : [14:29] <@fardad> you can get there and enjoy CloudScorpion and tdot cursing....
705 : [14:29] <OzZy_M> fardad: so what is #seneca for? school talk?
706 : [14:29] <@fardad> oooooooooooh
707 : [14:29] <@fardad> my bad
708 : [14:29] <@fardad> #seneca
709 : [14:29] <@fardad> is the main seneca open source channel
710 : [14:29] <tdot> lol, read the huge notice when you join the channel :)
711 : [14:29] <@fardad> feel free to get there
712 : [14:30] <@fardad> ask questions
713 : [14:30] <OzZy_M> tdot: I used to use mIRC a lot previously and got mentally conditioned to ignoring those big green blocks of text
714 : [14:30] <@fardad> but when in #seneca, please don't talk about how your girlfriend dumpped you...
715 : [14:30] <@fardad> thats for #seneca-social
716 : [14:31] <rhui4> do you have to pay for mirc
717 : [14:31] <cgm87> rhui4: no
718 : [14:31] <xzhang148> ok
719 : [14:31] <xzhang148> pls go on
720 : [14:31] <rhui4> cgm87: thanks
721 : [14:31] <danapao> just continue
722 : [14:31] <tdot> rhui4: it will bother you to register, but you can ignore it
723 : [14:32] <rhui4> sweet
724 : [14:32] <tdot> right now mine says its been unregistered for 300 and something days :D
725 : [14:32] <xlu44> d
726 : [14:32] <rhui4> lol
727 : [14:33] <CloudScorpion> be good little open sores kiddies and get chatzilla
728 : [14:33] <OzZy_M> pfft
729 : [14:33] <OzZy_M> forget chatzilla
730 : [14:33] <OzZy_M> IE ALL THE WAY MAN!!!
731 : [14:33] <rhui4> netscape that
732 : [14:34] <Ray_> i like how u troll ozzy lol
733 : [14:34] <OzZy_M> meh
734 : [14:34] <OzZy_M> we're on break!
735 : [14:35] <tdot> lol
736 : [14:35] <tdot> chatzilla blows
737 : [14:35] <tdot> its a horrible unsecure client and its already been exploited
738 : [14:35] <cgm87> lol
739 : [14:35] <JQuan> lol
740 : [14:35] <CloudScorpion> your mother has been exploited
741 : [14:35] <tdot> mIRC is the only decent IRC client for windows
742 : [14:35] <Trul>  True
743 : [14:36] <cgm87> or if your a Linux/Unix fan, irssi
744 : [14:36] <adgezaza> recommended for mac users: http://colloquy.info/downloads.html
745 : [14:36] <Trul> nah, BitchX is the best
746 : [14:37] <OzZy_M> isn't x_CHat a good one for linux as well
747 : [14:37] <tdot> iv only tried irssi but its annoying as hell
748 : [14:37] <tdot> xchat is ugly as hell but most linux programs are ugly as hell
749 : [14:38] <adgezaza> i irssi and thought the same
750 : [14:38] <adgezaza> i used
751 : [14:38] <tdot> you need to memorize like 40 commands to make it do anything ;p
752 : [14:38] <OzZy_M> i only used xchat once, but it didn't really feel alien.  And i'm an mIRC guy at heart
753 : [14:38] <cgm87> im right now using the built-in IRC client in Opera, thought I try something different
754 : [14:38] <tdot> iv been using mirc for like 10 years so im a little biased
755 : [14:39] <OzZy_M> same
756 : [14:39] <adgezaza> colloquy is pretty much command free
757 : [14:39] <adgezaza> you can do most things by clicking and right clicking...pretty ez
758 : [14:39] <tdot> mircscript is one of the first programming languages i learned :D
759 : [14:39] <OzZy_M> I got Turing in highschool :(
760 : [14:39] <OzZy_M> sooooo boring
761 : [14:39] <crgosselin> J++ in grade 10 lmao
762 : [14:39] <tdot> i actually never took it
763 : [14:40] <caangus> I had turing, made a side scroller for my final
764 : [14:40] <Ray_> turing's an educaitonal lang
765 : [14:40] <cgm87> most high schools have turing
766 : [14:40] <Ray_> i studied it too in highschool
767 : [14:40] <tdot> i guess iv known mircscript and php and vb6 for like 10 years
768 : [14:40] <tdot> around highschool i learned java and C# and C++
769 : [14:40] <OzZy_M> how long has C# been out?
770 : [14:40] <crgosselin> lucky.. I didnt learn c# till I was 17, 1st semester at waterloo
771 : [14:41] <tdot> C#? since about 2002 i think
772 : [14:41] <cgm87> it depends, my high school did have C++ and java, but the only teacher who taugh it we didn't see eye to eye
773 : [14:41] <OzZy_M> My school was pretty old
774 : [14:41] <OzZy_M> they god "new" P4 when I left
775 : [14:41] <OzZy_M> mind you it was in the middle of no where
776 : [14:41] <OzZy_M> oh ya
777 : [14:41] <OzZy_M> no AC in my school lol
778 : [14:42] <@fardad> ok
779 : [14:42] <@fardad> lets continue
780 : [14:42] <JQuan> ok
781 : [14:42] <_YJ_> ok
782 : [14:42] <xzhang148> ok
783 : [14:42] <xlu44> ok
784 : [14:42] <OzZy_M> yub yub commander
785 : [14:42] <cgm87> fardad: ok
786 : [14:42] <Junseok> ok
787 : [14:42] <rhui4> ok
788 : [14:43] <@fardad> I need to know everyone is here, if you are here say aye!
789 : [14:43] <caangus> aye
790 : [14:43] <acchung1> aye!
791 : [14:43] <OzZy_M> aye!
792 : [14:43] <JQuan> aye!
793 : [14:43] <crgosselin> aye!
794 : [14:43] <goldenration> aye!
795 : [14:43] <_YJ_> aye!
796 : [14:43] <mjschranz> aye
797 : [14:43] <kumail> aye
798 : [14:43] <imadorki3> aye
799 : [14:43] <danapao> aye
800 : [14:43] <rhui4> aye
801 : [14:43] <dperit> aye
802 : [14:43] <slaw12> aye
803 : [14:43] <CloudScorpion> Nay
804 : [14:43] <TonyKim> ok
805 : [14:43] <Junseok> aye!
806 : [14:43] <xlu44> aye
807 : [14:43] <ysliu2> aye
808 : [14:43] <Han3> aye
809 : [14:43] <TonyKim> aye!
810 : [14:43] <jaburton1> aye?
811 : [14:43] <Vovko> Ayee!
812 : [14:44] <priya_gill> aye!
813 : [14:44] <adgezaza> hai
814 : [14:44] <xlu44> can i copy paste in mirc?
815 : [14:44] <Vovko> no
816 : [14:44] <xlu44> ok
817 : [14:44] <rhui4> pastebin
818 : [14:44] <adgezaza> patebin
819 : [14:44] <Ray_> aye
820 : [14:44] <sinker> here
821 : [14:44] <xlu44> i wanna copy not paste
822 : [14:44] <rhui4> copybin?
823 : [14:44] <Vovko> xlux44: im kidding, u can paste anything u want
824 : [14:44] <OzZy_M> xlu44: just highlight the text, it auto copies
825 : [14:44] <Bhavnesh> aye!!!!!!!!!!
826 : [14:45] <OzZy_M> Ihave a wiki up that shows you how to log a conversation if that is what you want
827 : [14:45] <lwu11> aye
828 : [14:45] <xlu44> i wanna copy from mirc channel screen
829 : [14:45] <cgm87> brb
830 : [14:45] <CloudScorpion> hey, who wants a completed version of Assignment 1 for this class?
831 : [14:45] <xzhang148> aye
832 : [14:45] <caangus> lol
833 : [14:46] <xlu44> me
834 : [14:46] <CloudScorpion> I'll pastebin it for ya, quite open sores of me if I do say so myself
835 : [14:46] <JQuan> xlu44: just right click and hit copy
836 : [14:46] <OzZy_M> xlu44: just use your mouse and drag across the text you want to copy, then paste it wherever you want it.  mIRC auto copies when you highlight text
837 : [14:46] <OzZy_M> isn't all that up on the repo already?
838 : [14:46] <OzZy_M> besides isn't fardad changing the assignment a bit?
839 : [14:46] <CloudScorpion> a bit
840 : [14:46] <CloudScorpion> not much, that would require effort
841 : [14:46] <CloudScorpion> and fardad is anti effort :D
842 : [14:47] <goldenration> isn't programmers all anti effort?
843 : [14:47] <tdot> CloudScorpion: stfu
844 : [14:47] <OzZy_M> I see you said "anti effort" and not "pro efficientcy"
845 : [14:47] <xlu44> it's the point "mIRC auto copies" thank you
846 : [14:47] <crgosselin> lol
847 : [14:47] <OzZy_M> xlu44: yw
848 : [14:50] <@fardad> question:
849 : [14:50] <@fardad> if int a = 1; and int b = 2;
850 : [14:50] <@fardad> and if(b<2 && (a=a+1)) printf("X\n");
851 : [14:51] <@fardad> and printf("%d\n", a);
852 : [14:51] <@fardad> what is the output of second printf?
853 : [14:51] <dperit> 1
854 : [14:51] <crgosselin> 1
855 : [14:51] <OzZy_M> 1
856 : [14:51] <goldenration> 1
857 : [14:51] <imadorki3> 1
858 : [14:51] <jaburton1> 1
859 : [14:51] <priya_gill> 1
860 : [14:51] <rhui4> 1
861 : [14:51] <danapao> 1
862 : [14:51] <@fardad> question:
863 : [14:51] <Vovko> 2?
864 : [14:51] <JQuan> 1
865 : [14:51] <_YJ_> 1
866 : [14:51] <iIra> 1
867 : [14:51] <@fardad> why 1?
868 : [14:51] <CloudScorpion> syntax error
869 : [14:51] <Bhavnesh> 1
870 : [14:51] <adgezaza> 1
871 : [14:51] <xlu44> 1
872 : [14:51] <crgosselin> because b is not less than 2
873 : [14:52] <dperit> Because evaluating the truth condition takes precedence over the brackets
874 : [14:52] <xlu44> a=a+1 always be true
875 : [14:52] <Vovko> so? a=a+1 is in a conditin of 1st if statenent
876 : [14:52] <oleg_pliats> 1
877 : [14:52] <@fardad> xlu44: but if that is the case, doesn't that make a 2?
878 : [14:52] <xlu44> no
879 : [14:52] <@fardad> xlu44: why?
880 : [14:52] <adgezaza> still b<2 is still false
881 : [14:52] <priya_gill> becaz  bis not <2so it will not go to check second cond
882 : [14:52] <xlu44> because b<2 is false
883 : [14:52] <dperit> The program sees that b is not less than 2, and never even touches the second part of the statement
884 : [14:53] <tdot> because C++ uses short circuit evaluation, unlike VB :/
885 : [14:53] <@fardad> as priya_gill said, since the first condition is false
886 : [14:53] <OzZy_M> tdot: i was going to say that
887 : [14:53] <rhui4> tdot: what does that mean
888 : [14:53] <@fardad> the whole condtion's result is known
889 : [14:53] <@fardad> and because of that C does not waste time check the rest
890 : [14:53] <tdot> what fardad said
891 : [14:54] <rhui4> thanks
892 : [14:54] <@fardad> and because of that a = a+1 never happens
893 : [14:54] <@fardad> this is called lazy evaluation
894 : [14:54] <Vovko> fardad: k
895 : [14:55] <@fardad> remember the qustion I asked in class?
896 : [14:55] <xlu44> most of them
897 : [14:55] <OzZy_M> which one? :P
898 : [14:55] <priya_gill> ya the array one for printing <3
899 : [14:56] <crgosselin> for greater than 3
900 : [14:56] <OzZy_M> OHH the McDonalds combo #2?
901 : [14:57] <@fardad> put one line in the for loop
902 : [14:57] <@fardad> yada yada yada;
903 : [14:57] <Han3> a[i]>3 && printf("%d\n", a[i]);
904 : [14:57] <@fardad> with no ?: operator
905 : [14:57] <@fardad> http://pastebin.com/Uzc1D9W8
906 : [14:57] <priya_gill> ya
907 : [14:57] <@fardad> Han3: :)
908 : [14:58] <@fardad> didn't let me finish :)
909 : [14:58] <OzZy_M> oh ya
910 : [14:58] <xlu44> i sneaked ur last semaster answer;D
911 : [14:58] <@fardad> perfect
912 : [14:58] <crgosselin> fardad: you can use && without an if?
913 : [14:59] <@fardad> crgosselin: it goes back to what I said before
914 : [14:59] <@fardad> in C
915 : [14:59] <@fardad> operator are operators
916 : [14:59] <@fardad> if you can use + without an if
917 : [14:59] <@fardad> you can use && without an if
918 : [14:59] <crgosselin> oh ok
919 : [14:59] <@fardad> + && > / - are all the same
920 : [14:59] <crgosselin> thanks
921 : [14:59] <@fardad> they are all operaotrs working on their operands and returning a value
922 : [15:00] <adgezaza> fardad: a[i]>3 && printf("%d\n", a[i]); is the answer?
923 : [15:00] <@fardad> is everyone ok with that or Han3 ruined it for all :)
924 : [15:00] <iIra> yes
925 : [15:00] <@fardad> adgezaza, yeah
926 : [15:00] <Han3> sorry
927 : [15:00] <rhui4> ok
928 : [15:00] <xlu44> y
929 : [15:00] <adgezaza> fardad: thanks
930 : [15:00] <jaburton1> Nice to know.
931 : [15:00] <_YJ_> thanks Han
932 : [15:00] <xzhang148> ok
933 : [15:00] <Han3> YW
934 : [15:00] <OzZy_M> score one for the HOTYS
935 : [15:01] <@fardad> adgezaza: yes because C tests a[i] > 3 :)
936 : [15:01] <Han3> lol
937 : [15:01] <@fardad> if it is true then it needs to evaluate printf, and that is when it is printing
938 : [15:01] <@fardad> but when a[i] > 3 is false, then it will not evaluate printf
939 : [15:01] <@fardad> and it will not print
940 : [15:01] <crgosselin> fardad: will you get fired for doing this in the workplace?
941 : [15:02] <@fardad> so Han3 gave us the wrong answer
942 : [15:02] <xlu44> do you like we code in that way or use "if"
943 : [15:02] <@fardad> :)
944 : [15:02] <adgezaza> i like that
945 : [15:02] <jaburton1> So the default is if it's true it continues, else it stops.
946 : [15:02] <tdot> xlu44: you almost would always want to use an if for clarity
947 : [15:03] <OzZy_M> xlu44: you program for quality and let compiler do most optimizations
948 : [15:03] <@fardad> with && the nutral operand is true
949 : [15:03] <@fardad> which means if the first one is true the second one is tested
950 : [15:03] <@fardad> with || false is nutral
951 : [15:03] <adgezaza> fardad: is it faster for the compiler to make the condition without the if statement?
952 : [15:03] <@fardad> adgezaza: it is much much faster
953 : [15:04] <@fardad> so it depends on what you are programming
954 : [15:04] <@fardad> ad tdot said, if is usualy prefered for clarity but
955 : [15:04] <adgezaza> just use comments to clarify if its faster?
956 : [15:05] <@fardad> if you are writing a driver for a graphic card, then you need speed and then cond && action is prefered
957 : [15:05] <@fardad> well, "comments" is always recommanded and even enforced but
958 : [15:05] <@fardad> in my experience , it is not there, when you need it most
959 : [15:05] <@fardad> so
960 : [15:06] <@fardad> ok everyone is ok with lazy evaluation?
961 : [15:06] <adgezaza> fardad:  understood
962 : [15:06] <jaburton1> yep
963 : [15:06] <rhui4> yes
964 : [15:06] <crgosselin> yes
965 : [15:06] <xlu44> k
966 : [15:06] <priya_gill> yes
967 : [15:06] <JQuan> yes
968 : [15:06] <Junseok> yes
969 : [15:06] <goldenration> fardad: yes
970 : [15:06] <Han3> yes
971 : [15:06] <caangus> yeah
972 : [15:06] <OzZy_M> yub yub commander
973 : [15:06] <oleg_pliats> yes
974 : [15:06] <xzhang148> ok
975 : [15:06] <cgm87> fardad: ya
976 : [15:06] <imadorki3> yes
977 : [15:07] <_YJ_> yes
978 : [15:07] <@fardad> OzZy_M: not to correct you but it is "Aye Aye Commander" :)
979 : [15:07] <@fardad> alright
980 : [15:07] <iIra> yes
981 : [15:07] <Bhavnesh> yes
982 : [15:07] <rhui4> aye aye commander
983 : [15:07] <OzZy_M> fardad: yub yub is the sound ewoks make :P inside star wars joke :P
984 : [15:07] <@fardad> acutally that is what I needed to cover for this week....
985 : [15:08] <Vovko> star wars?
986 : [15:08] <rhui4> star balls is a good movie
987 : [15:08] <acchung1> nice
988 : [15:08] <@fardad> this is OOP344 to comicon...
989 : [15:08] <@fardad> s/to/not
990 : [15:08] <@fardad> ok
991 : [15:09] <@fardad> are everyone ok with what we talked about?
992 : [15:09] <sinker> yes
993 : [15:09] <crgosselin> yes
994 : [15:09] <_YJ_> yes.
995 : [15:09] <rhui4> aye aye commander
996 : [15:09] <acchung1> ye
997 : [15:09] <OzZy_M> fardad: are we not to use lazy notation for anything in this class?
998 : [15:09] <xzhang148> ok
999 : [15:09] <JQuan> yes
1000 : [15:09] <imadorki3> oui
1001 : [15:09] <goldenration> fardad: yes
1002 : [15:09] <Bhavnesh> ya
1003 : [15:09] <caangus> yeah
1004 : [15:09] <Han3> ok
1005 : [15:09] <Junseok> ok
1006 : [15:09] <cgm87> yep
1007 : [15:09] <slaw12> yes
1008 : [15:09] <@fardad> in my class use whatever you want as complicated as you want BUT
1009 : [15:10] <@fardad> make sure that is not shooting yourself in the foot
1010 : [15:10] <@fardad> if you do something complex and in the process do something wrong, you will still get marks deducted
1011 : [15:11] <OzZy_M> and if it is something hard and right? bonus?
1012 : [15:11] <tdot> basically use what makes sense for that part of the code :)
1013 : [15:11] <OzZy_M> i see
1014 : [15:11] <@fardad> ok everyone,
1015 : [15:11] <cgm87> yep
1016 : [15:11] <@fardad> if there is not question
1017 : [15:12] <@fardad> s/not/no
1018 : [15:12] <cgm87> fardad: what would something complex be?
1019 : [15:12] <rhui4> what does that mean
1020 : [15:12] <oleg_pliats> no
1021 : [15:12] <@fardad> if there is no question, then this is it
1022 : [15:12] <crgosselin> fardad: go drink some steamy hot green tea with honey and maybe you'll get your voice back
1023 : [15:12] <oleg_pliats> NO!
1024 : [15:12] <rhui4> ok  thx
1025 : [15:12] <@fardad> thanks for coming and will go through your meeting schedule to see if I can attend