These are chat archives for learnclang/general

3rd
Jan 2015
Marcus Ottosson
@mottosso
Jan 03 2015 10:58
Welcome @RicardoViana and @haggi! If I'm missing anyone, let me know! :)
Marcus Ottosson
@mottosso
Jan 03 2015 12:38
I'm at Day 4 on the Intro to C of http://handmadehero.org and just have to say Wow! If you aren't watching it, it is soo relevant to what we're talking about here, and it's amazing.
IanBreeg
@IanBreeg
Jan 03 2015 13:59
Hello everyone! :)
Marcus Ottosson
@mottosso
Jan 03 2015 13:59
Hey there :)
IanBreeg
@IanBreeg
Jan 03 2015 14:00
Would love to participate in this Clang thingy, can you add me, please? :)
Marcus Ottosson
@mottosso
Jan 03 2015 14:01
Added! Welcome aboard!
David Martinez
@davidmartinezanim
Jan 03 2015 14:01

I'd be in for the live session. North-west England here. Ideally at some point in the evening/night

@mottosso what has been done up until that point? I need to watch the videos myself. Just out of curiosity

IanBreeg
@IanBreeg
Jan 03 2015 14:02
Thank you, this is going to be awesome, no doubt)
David Martinez
@davidmartinezanim
Jan 03 2015 14:02
welcome aboard @IanBreeg
Marcus Ottosson
@mottosso
Jan 03 2015 14:02
@davidmartinezanim He's gone through a ton of stuff, primarily about how the memory works, both physically in the hardware and how to manipulate it - like literally each bit.
David Martinez
@davidmartinezanim
Jan 03 2015 14:03
awesome. I will try to get some time to watch those
Marcus Ottosson
@mottosso
Jan 03 2015 14:03
Remember how I asked before about introspection? Now I get why he introduced Visual Studio, that's how you do all of that stuff.
David Martinez
@davidmartinezanim
Jan 03 2015 14:03
is he coding anything while explaining or pure theory?
aha?
Marcus Ottosson
@mottosso
Jan 03 2015 14:04
He's coding and manipulating memory while explaining things.
David Martinez
@davidmartinezanim
Jan 03 2015 14:04
which version of VS did you end installing? I have to say that I am a bit apprehensive of installing VS
Marcus Ottosson
@mottosso
Jan 03 2015 14:05
I just got the 2013 Community edition installed here, he'll be using the same version I think but starts off with Express
But yeah, it's unwieldly, 11gb and took me about an hour or more to just finish the install.
But I'd suggest using a virtual machine for it, so as to not pollute your system because it does a lot of Windows updating and installs quite a few things I'm not interested in, like the Windows Phone SDK
@IanBreeg What's your experience with scripting/programming and such?
And can I ask how you found this group?
IanBreeg
@IanBreeg
Jan 03 2015 14:10
Sure, I've read a thread on tech-artists.org about this group. I'm a tech-artist myself and I guess I can call myself "proficient" with Python, but right now I'm really into "serious" programming, using C++ as my main language. So this idea about collaborative studying seems like a perfect fit to my current needs :)
Marcus Ottosson
@mottosso
Jan 03 2015 14:16
Perfect, I think you'll fit right in. :)
IanBreeg
@IanBreeg
Jan 03 2015 14:18
I'll do my best :)
Marcus Ottosson
@mottosso
Jan 03 2015 14:19
Have you heard of the Handmade Hero series?
IanBreeg
@IanBreeg
Jan 03 2015 14:21
Already subbed :) Looks like an awesome thing to watch
Marcus Ottosson
@mottosso
Jan 03 2015 14:23
Yeah! Thanks to @csaez for recommending it a few days ago.
IanBreeg
@IanBreeg
Jan 03 2015 14:27
@csaez Well, then my thanks to you, sir :)
Marcus Ottosson
@mottosso
Jan 03 2015 18:29
Hey @davidmartinezanim You got Clang to work under Windows, no?
How did you do that?
David Martinez
@davidmartinezanim
Jan 03 2015 18:36
@mottosso: I can try and get it working again. I'' take it that you are using both Clang and LLVM?
Marcus Ottosson
@mottosso
Jan 03 2015 18:36
Using both? How do you mean?
David Martinez
@davidmartinezanim
Jan 03 2015 18:38
I thought Clang does rely on LLVM?
Marcus Ottosson
@mottosso
Jan 03 2015 18:38
Yeah, me too, don't we need LLVM for Clang to run?
In that case, I'm using both clang and llvm
David Martinez
@davidmartinezanim
Jan 03 2015 18:39
let me install LLVM and try to get that working again
Marcus Ottosson
@mottosso
Jan 03 2015 18:39
Ok! Thanks!
I found this here: http://llvm.org/releases/download.html#3.5 which has precompiled binaries for Windows
Marcus Ottosson
@mottosso
Jan 03 2015 18:44
It looks dependent on either MinGW or Visual Studio however
I think it's because of the C-libraries, because if I remove MinGW after installing Clang it can't find them.
And it looks like they are at C:\MinGW\include
David Martinez
@davidmartinezanim
Jan 03 2015 18:47
that could be indeed
yeah, that's the link I used
so I just finished installing
but I do have minGW
Marcus Ottosson
@mottosso
Jan 03 2015 18:47
Works good?
David Martinez
@davidmartinezanim
Jan 03 2015 18:47
I'm gonna try now
Marcus Ottosson
@mottosso
Jan 03 2015 18:47
I wonder how it knows to find the C-libraries in that folder
David Martinez
@davidmartinezanim
Jan 03 2015 18:49
Could it be that you have that as part of any of your environment variables so it's searching for those automatically? something that you did due to the instalation of MinGW?
Marcus Ottosson
@mottosso
Jan 03 2015 18:49
I was looking at those, but I can't find anything that points to that directory
Maybe it's relative gcc.exe or such, like ../include
David Martinez
@davidmartinezanim
Jan 03 2015 18:51
I managed to compile a file running clang but as I said, I do have MinGW installed
Marcus Ottosson
@mottosso
Jan 03 2015 18:51
Mm, if you rename your c:\MinGW directory, you'll see that it can't find e.g. stdio.h
I suppose LLVM/Clang is merely a compiler after all, and doesn't involve any libraries
David Martinez
@davidmartinezanim
Jan 03 2015 18:54
MinGW is compiler+libraries but llvm is compiler only?
Marcus Ottosson
@mottosso
Jan 03 2015 18:55
Certainly looks like it
David Martinez
@davidmartinezanim
Jan 03 2015 18:55
maybe it already has MinGW and VS studio default paths in case that they exists
Cesar Saez
@csaez
Jan 03 2015 19:08
Windows urgently needs a package manager ... what a mess!
Marcus Ottosson
@mottosso
Jan 03 2015 19:09
Cesar Saez
@csaez
Jan 03 2015 19:13
lol
David Martinez
@davidmartinezanim
Jan 03 2015 19:13
hey @mottosso. Apart from the different days of handmade hero, did you also watch the videos of Intro to C on Windows ?
Marcus Ottosson
@mottosso
Jan 03 2015 19:13
Yeah!
I started with those.
Just finished the 5th, but couldn't absorb too much and will watch it again a little later. The other 001 video, what he calls "the real" stream, is a little less academic and more practical.
Looks like we've got another member, Hi @macgio! :)
David Martinez
@davidmartinezanim
Jan 03 2015 19:18
welcome aboard @macgio !
Marcus Ottosson
@mottosso
Jan 03 2015 22:05

Guess what! :)

This is all the code you'll need to make a popup dialog on Windows in C.

#include <windows.h>

int CALLBACK WinMain(
    HINSTANCE hInstance,
    HINSTANCE hPrevInstance,
    LPSTR lpCmdLine,
    int nCmdShow) 
{
    MessageBox(NULL,                // hWnd - Parent window id
        "Hello, World!",            // lpText - Text of the body
        "My New Window",            // lpCaption - Text of the header
        MB_OK|MB_ICONINFORMATION);  // uType - What buttons to display

    return(0);
}

image

Marcus Ottosson
@mottosso
Jan 03 2015 22:45

Twitch

@Byron I had a closer look at how Handmade Hero was doing his screencasts and tried setting that up here, and it was really easy. Maybe something we could try?

It's called Twitch and is essentially letting you stream video into it's website and have it stream it back out, whilst spectators can harmlessly view and chat with the author, much like we're doing it here in this chat.

The problem I think it solves as opposed to if we were to instead use something like Google Hangouts or Skype or Teamviewer is that it isn't as personal and up close, and requires no software on our part, no mic or camera, letting users join in and chat if they'd like to. We could eventually, in the future, have a look at archiving recordings for future viewings, like Handmade Hero.