Jump to content

Today...


Leoo

Recommended Posts

Last day here. 4 completely awesome years, but it's time to move on. Leaving behind my girlfriend, family, relatives, friends...

 

Gonna be freaking weird.

 

But then, 3 months in Norway, a month in South-West USA and Mexico/Guatemala/Belize, then a few weeks on some Pacific island until eventually landing in New Zealand for a year...

Can't say it's gonna be awesome, maybe I'll get homesick or I won't find a job or something, but life's an adventure.

t3aGt.png

 

So I've noticed this thread's regulars all follow similar trends.

 

RPG is constantly dealing with psycho exes.

Muggi reminds us of the joys of polygamy.

Saq is totally oblivious to how much chicks dig him.

I strike out every other week.

Kalphite wages a war against the friend zone.

Randox pretty much stays rational.

Etc, etc

 

Link to comment
Share on other sites

I got into Forth because of Minecraft; it was used by one of the computer mods. I think the difficulty or using Forth turned a lot of people off, but at the time I was only just beginning to learn programming anyway, and Forth seemed easier to pick up than Lua, which the other computer mod of the time used (and I think that one still exists). It was a perfect language for that kind of hardware control task. Apparently it's also very easy to maintain. Just wouldn't want to read it (I'm sure it gets easier with practice, but at my level of familiarity it might as well be a magic spell).

 

I'll have to do more with Python to know exactly where I stand on writing it. I like the formatting, and the consistency in keywords (it doesn't have the situation in Java where things like '==' work very differently on data primitives like int than they do on object references like String). See if I still feel the same way writing something more complete.

Link to comment
Share on other sites

I like the formatting, and the consistency in keywords (it doesn't have the situation in Java where things like '==' work very differently on data primitives like int than they do on object references like String).

 

JavaScript's equality comparisons...

 

rWoBHj4.png

 

If Cthulhu were a programming language, it would be less bizarre than that.

ozXHe7P.png

Link to comment
Share on other sites

As scary as that chart is, you don't ever end up outside those orangish/green boxes. There's no case in which you'd ever compare [] == "false" or 0 == "" for example

Link to comment
Share on other sites

I'm aware Java isn't JavaScript. I just brought it up because Randox thought Java's equality comparisons were bad.

 

As scary as that chart is, you don't ever end up outside those orangish/green boxes. There's no case in which you'd ever compare [] == "false" or 0 == "" for example

 

You don't in correct code, but what happens when a typo results in you passing a number as a string due to the dynamic typing system? Or the dozens of other cases where the wrong type of variable is passed around?

ozXHe7P.png

Link to comment
Share on other sites

That doesn't happen all that much and it's such an easy bug to notice and fix that it's not worth worrying about

Ehh, entire languages have been written around the idea that dynamic typing is awful and leads to all kinds of bugs

 

@Veiva: I figured, just clarifying for anyone not as familiar with the topic

polvCwJ.gif
"It's not a rest for me, it's a rest for the weights." - Dom Mazzetti

Link to comment
Share on other sites

I see a swirly thingy and another swirly thingy and oh hey, we have a pair of friends!

 

Seriously, I worked at an IT company for over a year and a half and I know jack shit about code itself. Yet I know quite a bit about the management and work sharing of a huge IT company.

 

And me white boat goes in 15 hours... Me drunk af.

t3aGt.png

 

So I've noticed this thread's regulars all follow similar trends.

 

RPG is constantly dealing with psycho exes.

Muggi reminds us of the joys of polygamy.

Saq is totally oblivious to how much chicks dig him.

I strike out every other week.

Kalphite wages a war against the friend zone.

Randox pretty much stays rational.

Etc, etc

 

Link to comment
Share on other sites

Got wifi hooked up at my new place, finally, after 3ish hours of running around between getting lost and having to go out and pick up extra things.

 

I have no idea why Rogers gives out wifi modems that come with Ethernet cables, but not a coax cable when you actually need the coax cable to use the modem in the first place.

Link to comment
Share on other sites

Writing code that writes code is the best.

 

I've written my own speedy in-process OpenGL tracer. So far I can serializing OpenGL calls to a memory buffer. Taking a slightly customized OpenGL spec file, I wrote some monster that generates code to serialize and deserialize OpenGL calls, such as glTexImage2D:

 

 

 

// In Jaques, the serialization/hooking library:
struct TexImage2DFunc : public Func<13>
{
private:
    typedef void (* FuncType)(GLenum, GLint, GLint, GLsizei, GLsizei, GLint, GLenum, GLenum, const void *);
    FuncType function;
public:
    void operator ()(GLenum target, GLint level, GLint internalFormat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void * pixels);
    inline void reset() { this->function = nullptr; }
};
extern TexImage2DFunc TexImage2D;

jaques::func::TexImage2DFunc jaques::func::TexImage2D;
void jaques::func::TexImage2DFunc::operator ()(GLenum target, GLint level, GLint internalFormat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void * pixels)
{
    if (this->function == nullptr)
    {
        auto result = (FuncType)load_gl_function("glTexImage2D");

        if (result == nullptr)
        {
            return;
        }

        this->function = result;
    }

    this->function(target, level, internalFormat, width, height, border, format, type, pixels);
}

extern "C"
void glTexImage2D(GLenum target, GLint level, GLint internalFormat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void * pixels)
{
    jaques::func::TexImage2D(target, level, internalFormat, width, height, border, format, type, pixels);

    jaques::Writer::begin<jaques::func::TexImage2DFunc>();
    jaques::Writer::parameter<jaques::type::GLenum>(target);
    jaques::Writer::parameter<jaques::type::GLint>(level);
    jaques::Writer::parameter<jaques::type::GLint>(internalFormat);
    jaques::Writer::parameter<jaques::type::GLsizei>(width);
    jaques::Writer::parameter<jaques::type::GLsizei>(height);
    jaques::Writer::parameter<jaques::type::GLint>(border);
    jaques::Writer::parameter<jaques::type::GLenum>(format);
    jaques::Writer::parameter<jaques::type::GLenum>(type);
    jaques::Writer::parameter<jaques::type::GLvoid>((const jaques::type::GLvoid::type)pixels);
    jaques::Writer::data(jaques::size::TexImage2D::pixels(format, type, width, height), pixels);
    jaques::Writer::end<jaques::func::TexImage2DFunc>();
}

// In Touchstone, the deserializer/processing library:
class TexImage2D : public TCall<13>
{
public:
    explicit TexImage2D(CallStream& stream);
    ~TexImage2D() = default;

    inline const char* get_name() const override
    {
        return "glTexImage2D";
    }

    inline std::size_t get_size() const override
    {
        return this->size;
    }

    inline GLenum get_parameter_target() const
    {
        return this->parameter_target;
    }

    inline GLint get_parameter_level() const
    {
        return this->parameter_level;
    }

    inline GLint get_parameter_internal_format() const
    {
        return this->parameter_internal_format;
    }

    inline GLsizei get_parameter_width() const
    {
        return this->parameter_width;
    }

    inline GLsizei get_parameter_height() const
    {
        return this->parameter_height;
    }

    inline GLint get_parameter_border() const
    {
        return this->parameter_border;
    }

    inline GLenum get_parameter_format() const
    {
        return this->parameter_format;
    }

    inline GLenum get_parameter_type() const
    {
        return this->parameter_type;
    }

    inline const void* get_parameter_pixels() const
    {
        return this->data_parameter_pixels;
    }

private:
    std::size_t size;
    GLenum parameter_target;
    GLint parameter_level;
    GLint parameter_internal_format;
    GLsizei parameter_width;
    GLsizei parameter_height;
    GLint parameter_border;
    GLenum parameter_format;
    GLenum parameter_type;
    const void* data_parameter_pixels;
};

touchstone::call::TexImage2D::TexImage2D(CallStream& stream)
{
    auto slice = stream.begin(TexImage2D::token);

    this->parameter_target = slice.parameter<types::detail::GLenum>();
    this->parameter_level = slice.parameter<types::detail::GLint>();
    this->parameter_internal_format = slice.parameter<types::detail::GLint>();
    this->parameter_width = slice.parameter<types::detail::GLsizei>();
    this->parameter_height = slice.parameter<types::detail::GLsizei>();
    this->parameter_border = slice.parameter<types::detail::GLint>();
    this->parameter_format = slice.parameter<types::detail::GLenum>();
    this->parameter_type = slice.parameter<types::detail::GLenum>();
    auto parameter_pixels = slice.parameter<types::detail::GLvoid>();

    if (parameter_pixels == nullptr)
    {
        this->data_parameter_pixels = nullptr;
    }
    else
    {
        this->data_parameter_pixels = (const void*)slice.data();
    }

    this->size = stream.end(slice);
}

 

 

I should be able to identify interesting OpenGL calls and modify them, as well as injecting completely new OpenGL calls. Will allow me to customize the rendering of any OpenGL application. Such as changing the colors of GUI elements, or adding a day/night cycle, or whatever else...

 

(I noticed a mistake in the code generation while reading the excerpt I posted. Another good thing about code generation is such bugs are easier to fix. :P)

ozXHe7P.png

Link to comment
Share on other sites

What's the best code to learn right now in terms of usage? I plan on taking some programming classes next year as well as getting cisco certified after I finish my degree.

aah.png

aah.png
aah.png

aah.png

 

People in glass houses should shower in the basement.

 

Link to comment
Share on other sites

I don't think the choice of program matters all that much. I mean, do absolutely pick something with modern features that is actively used, but learning the concepts behind the programming is ultimately more important than the language, because the concepts are transferable. Once you've learned to program in one language, it's a lot easier to move into other languages.

 

Python seems to be well regarded as a first language since it's not only popular, but the syntax is dead simple. That means less time learning how to write Python, and more time spent learning how to program in a more general sense, so that's certainly a good route to go. Java is also pretty popular as a teaching language. You'll spend more time on the nuts and bolts of how to write programs than you would with Python, which can be frustrating at the start for sure, but it might also make it easier to quickly move into at least some of the other languages down the road.

Link to comment
Share on other sites

Anyone else playing Player Unknowns Battlegrounds?

  • Like 1
Quote

 

Quote

Anyone who likes tacos is incapable of logic.

Anyone who likes logic is incapable of tacos.

 

PSA: SaqPrets is an Estonian Dude

Steam: NippleBeardTM

Origin: Brand_New_iPwn

Link to comment
Share on other sites

Yesterday i spent some time clearing my room. It's about a week before my exams start again and i wanted to get rid of some of the clutter standing around so i can study in neater environment. Anyway, so i came across a small box hidden under some shit on my dresser that contained all my old studs and rings from when i still had my piercings a couple of years back. I took one of them out cleaned it, and tried to see if my piercings were actually still open. Took some effort, but they actually were. Felt rather weird having them in for the first time in so long. 

Link to comment
Share on other sites

 

Every programming job around here requires security clearance.

 

They also require things like a Bachelor's degree, but that's actually possible for me to get.

Could you not get security clearance?

 

Possibly, possibly not. A history of psychosis (unspecified schizophrenia spectrum disorder) may make that a bit hard, due to the nature of my symptoms, as far as I know. Also, don't know how being a socialist helps matters, either. (I know it's not the Cold War anymore, but there's still laws against being a or holding socialist/communist beliefs on the books, don't know if it affects security clearances, and I'm not going to lie about it).

 

It wasn't until I tried learning C that programming actually started making sense.

I started with C! For Christmas in 2003 (sixth grade), I got a book called "C Primer Plus." (I affectionately refer to it as "the big blue book.") We moved up here to NC the following month, and I read it cover-to-cover on the two trips it took to move stuff up here. Over the next year, I did exercises in the book until I had a firm understanding of C. Stayed with C for the longest time, developing games with Allegro 4 and other such things.

 

Eventually, I met someone in my RuneScape clan (The Moriquendi) who programmed a little bit in C++ and the syntax fascinated me. He wrote a contact book program, and I remember seeing std::vector. Learned C++ over the next few years, moving on from "C with classes" to my current status of "moderately comfortable with most common C++ semantics" (e.g., SFINAE, RAII, the bulk of the standard library).

 

I've also made extensive use of C# because I fell in love with XNA (made by the same developer behind Allegro 4!), Lua, and dabbled with at least half a dozen other languages (Python, JavaScript, Java, MoonScript, etc).

ozXHe7P.png

Link to comment
Share on other sites

 

but there's still laws against being a or holding socialist/communist beliefs on the books

Really? WTF

 

Yes. There's potentially more. I think there were (maybe still are) questions about socialist/communist beliefs on security clearance applications, too.

 

(Also nearly all IT jobs in professional firms around here require top secret clearance too. Hahaha. The joys of living next to one of the biggest military bases in the United States.)

ozXHe7P.png

Link to comment
Share on other sites

Earlier today it was announced that 5 GCC countries have cut diplomatic ties with Qatar due to some comments they made regarding Iran, or something like that. Basically as of Tuesday (i think) air and ground transport to and from these countries will be suspended, diplomats have been asked to leave these countries, exports and imports will stops. Basically the entire country is in a state of panic right now because a lot of out eggs, chicken, milk, and frozen vegetables comes from Saudi. Went to the store earlier and shelves were EMPTY. People are freaking the [bleep] out. I don't know if i should laugh or what. It's going to be an interesting couple of weeks ahead. Don't think it's going to be much longer till the US gets involved here again and "asks" the Emir to step down... again.

Link to comment
Share on other sites

 

 

but there's still laws against being a or holding socialist/communist beliefs on the books

Really? WTF

 

Yes. There's potentially more. I think there were (maybe still are) questions about socialist/communist beliefs on security clearance applications, too.

 

(Also nearly all IT jobs in professional firms around here require top secret clearance too. Hahaha. The joys of living next to one of the biggest military bases in the United States.)

 

Looks like that law only applies to public employees. Are defense contractors considered public employees? I wouldn't think so. Obviously California law has no effect where you are, but still...that's dumb.

polvCwJ.gif
"It's not a rest for me, it's a rest for the weights." - Dom Mazzetti

Link to comment
Share on other sites

Anyone else playing Player Unknowns Battlegrounds?

Very poorly, but yeah.

 

My laptop is getting old, so my gtx 660m gpu doesn't really cut it any more.

 

Game runs okay but buildings can take up to a minute to load in so it makes it hard to do anything if I jump into an area with pretty much anyone else.

15cbz0y.jpg
[bleep] the law, they can eat my dick that's word to Pimp

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.