Welcome, Guest. Please login or register.
August 20, 2018, 11:23:16 pm

ballp.it is the community forum for The F Plus.

You're only seeing part of the forum conversation. To see more, register for an account. This will give you read-only access to nearly all the forums.

Topic: Thread.setTitle("Programmers Anonymous");  (Read 10486 times)

Schumin Capote

  • Paid
  • Nice to see you, to see you nice.
    • 244
    • 13
Thread.setTitle("Programmers Anonymous");
« Reply #105 on: March 06, 2018, 12:54:45 am »
How is the Angular community doing these days? It seems like Google nearly killed it with Angular 2 and while I've heard that Angular 4 is better, I haven't had much reason to check it out.

AFAIK the Angular community is still going strong. Google's still pushing it, in the way that Google pushes things (which means really heavily for like 3 months before ignoring it for another 3 and then coming back to it and wanting to change everything) and there's a lot of corporate buy-in to the ecosystem because "Google Has Invented The System" is an appealing thing for the business people to hear. I still do not like the syntax and I'm sure I never will, but I find it infinitely more agreeable than React. And I personally think Ember and Vue will always be considered niche.

...

Ember is definitely niche, but it was my first exposure to a modern JS framework. With Vue, it's not backed by a major US company like Facebook or Google, but it still has fairly strong support from big companies and has a good community. It may never surpass React in terms of market share, but it is big enough that I'm comfortable with it. We've already launched an online education site and practice relationship manager with it and I've had good success transitioning developers from Angular 1 to Vue. It won't be the right fit in every company or project, but it's worked for what we are doing.

Ambious

  • Definitely of the internet
  • Paid
  • Up the Irons!
  • 1,996
  • 118
Thread.setTitle("Programmers Anonymous");
« Reply #106 on: March 11, 2018, 02:02:27 pm »
The son of a bitch fined us by 20 points (out of 100) for using "external libraries" ngMessages and ngCookies.
Those are part of the AngularJS API! They're in the official documentation! We got them from the AngularJS website!
IN WHAT WORLD ARE THOSE "EXTERNAL" PACKAGES?!

I AM ANGRY!

jack chick

  • he/him
  • Ridiculist
  • Metal tyrant from hell
  • 2,770
  • 666
Thread.setTitle("Programmers Anonymous");
« Reply #107 on: March 12, 2018, 01:01:44 pm »
The son of a bitch fined us by 20 points (out of 100) for using "external libraries" ngMessages and ngCookies.
Those are part of the AngularJS API! They're in the official documentation! We got them from the AngularJS website!
IN WHAT WORLD ARE THOSE "EXTERNAL" PACKAGES?!

I AM ANGRY!

what is the point of limiting the libraries you can use in the first place

Ambious

  • Definitely of the internet
  • Paid
  • Up the Irons!
  • 1,996
  • 118
Thread.setTitle("Programmers Anonymous");
« Reply #108 on: March 12, 2018, 05:13:08 pm »
The son of a bitch fined us by 20 points (out of 100) for using "external libraries" ngMessages and ngCookies.
Those are part of the AngularJS API! They're in the official documentation! We got them from the AngularJS website!
IN WHAT WORLD ARE THOSE "EXTERNAL" PACKAGES?!

I AM ANGRY!

what is the point of limiting the libraries you can use in the first place

The official explanation: He wants us to learn to code stuff ourselves and not just rely on external libraries to do everything for us.
The real reason probably: He doesn't want to have to check code he doesn't understand because it uses libraries he doesn't have the time or patience to read the documentation of because like all IBM employees he has a stick so far up his ass he doesn't even know how to read anything without the IBM logo on it. I bet even his turds are up to company policy.

Turtle

  • [F+][F+][F+][F+][F+][F+][F+][F+][F+][F+][F+][F+][F+][F+][F+][F+][F+]
  • Paid
  • 203
  • 27
Thread.setTitle("Programmers Anonymous");
« Reply #109 on: March 12, 2018, 05:30:08 pm »
The sentiment of having to do the code yourself instead of using an external library is valid, but should not apply to the framework you're using, the common tools of the language, or aspects of the program that are not the focus of the exercise.

If I asked you to write a json serializer in C# and you turned in a program that references Newtonsoft.Json.NET, I would not accept that. If I asked for a calendar application and it referenced System.DateTime, well come the hell on.
A Whirring, Bone-White Gleech

A Whirring, Bone-White Gleech

  • five stars
  • Paid
  • you monster
  • 802
  • 159
Thread.setTitle("Programmers Anonymous");
« Reply #110 on: March 14, 2018, 07:03:40 pm »
The son of a bitch fined us by 20 points (out of 100) for using "external libraries" ngMessages and ngCookies.
Those are part of the AngularJS API! They're in the official documentation! We got them from the AngularJS website!
IN WHAT WORLD ARE THOSE "EXTERNAL" PACKAGES?!

I AM ANGRY!

what is the point of limiting the libraries you can use in the first place

The official explanation: He wants us to learn to code stuff ourselves and not just rely on external libraries to do everything for us.
The real reason probably: He doesn't want to have to check code he doesn't understand because it uses libraries he doesn't have the time or patience to read the documentation of because like all IBM employees he has a stick so far up his ass he doesn't even know how to read anything without the IBM logo on it. I bet even his turds are up to company policy.

Also, it might be because it's a practical impossibility to grade projects if they might use any arbitrary external library, and require unique non-trivial set-up.  If you get 30 projects, and each project requires some external dependency--some other library, a database, a cloud service, god knows what--then setting all of those up on your computer will take you for-fucking-ever.  It might not even be possible in some cases, like if you need an API key or something!  And that's even more true if you're grading on a platform other than what the student worked on.

Having said that, my usual solution is to require students to do a demo of their projects in their presentation, that way I can see that it's built and run at least once without having to do whatever crazy dance would be required to build it on my computer.
« Last Edit: March 14, 2018, 07:05:36 pm by A Whirring, Bone-White Gleech »

junior associate faguar

  • Frankly, an unreasonable level of uguu~
  • Paid
  • 390
  • -30
Thread.setTitle("Programmers Anonymous");
« Reply #111 on: March 23, 2018, 02:51:09 am »
I'm trying to do Google Summer of Code this year, and I eagerly await getting laughed at and told that I'm not good enough even for an "easy" difficulty problem, much less the one I really want to do.

Runic

  • Is Putting A Donk On It
  • Paid
  • [Citation Nuzzling]
  • 2,848
  • 96
Thread.setTitle("Programmers Anonymous");
« Reply #112 on: March 25, 2018, 01:21:18 am »
Python is fucking magic or something
Ambious Friend Anemone

Ambious

  • Definitely of the internet
  • Paid
  • Up the Irons!
  • 1,996
  • 118
Thread.setTitle("Programmers Anonymous");
« Reply #113 on: March 25, 2018, 09:55:31 am »
Python is fucking magic or something

The joke goes:
Someone: "You can't code in pseudocode!"
Python: "Hold my beer..."

A Whirring, Bone-White Gleech

  • five stars
  • Paid
  • you monster
  • 802
  • 159
Thread.setTitle("Programmers Anonymous");
« Reply #114 on: May 24, 2018, 01:13:43 am »
Tensorflow is so immensely frustrating.

I've been trying to build a Dataset from a generator.  This fails completely:
Code: [Select]
def get_random_tensors(count):
    for _ in range(count):
        yield tf.random_uniform((30, 1))

dset = tf.data.Dataset.from_generator(lambda: get_random_tensors(5000), tf.float32)

but this works correctly:
Code: [Select]
def get_random_tensors(count):
    for _ in range(count):
        yield np.random.uniform(-1.0, 1.0, (30,1))

dset = tf.data.Dataset.from_generator(get_random_tensors(5000), tf.float32)

I should have known I need to produce an actual numpy value immediately rather than a tensor, I guess.  Though why I have to wrap my generator expression in a lambda, I have no goddamned idea.  But my bigger complaint is, those two errors where super hard to figure out, because the error reports I got look like this:

Code: [Select]
Traceback (most recent call last):

  File "<ipython-input-49-1b94387c5bca>", line 1, in <module>
    runfile('/home/ /tensorflow_learning/dset race.py', wdir='/home/ /tensorflow_learning')

  File "/home/ /tensorflow_learning/tflowv/lib64/python3.6/site-packages/spyder/utils/site/sitecustomize.py", line 705, in runfile
    execfile(filename, namespace)

  File "/home/ /tensorflow_learning/tflowv/lib64/python3.6/site-packages/spyder/utils/site/sitecustomize.py", line 102, in execfile
    exec(compile(f.read(), filename, 'exec'), namespace)

  File "/home/ /tensorflow_learning/dset race.py", line 32, in <module>
    sess.run(x_dset)

  File "/home/ /tensorflow_learning/tflowv/lib64/python3.6/site-packages/tensorflow/python/client/session.py", line 900, in run
    run_metadata_ptr)

  File "/home/ /tensorflow_learning/tflowv/lib64/python3.6/site-packages/tensorflow/python/client/session.py", line 1135, in _run
    feed_dict_tensor, options, run_metadata)

  File "/home/ /tensorflow_learning/tflowv/lib64/python3.6/site-packages/tensorflow/python/client/session.py", line 1316, in _do_run
    run_metadata)

  File "/home/ /tensorflow_learning/tflowv/lib64/python3.6/site-packages/tensorflow/python/client/session.py", line 1335, in _do_call
    raise type(e)(node_def, op, message)

InvalidArgumentError: ValueError: setting an array element with a sequence.
Traceback (most recent call last):

  File "/home/ /tensorflow_learning/tflowv/lib64/python3.6/site-packages/tensorflow/python/ops/script_ops.py", line 157, in __call__
    ret = func(*args)

  File "/home/ /tensorflow_learning/tflowv/lib64/python3.6/site-packages/tensorflow/python/data/ops/dataset_ops.py", line 391, in generator_py_func
    nest.flatten_up_to(output_types, values), flattened_types)

  File "/home/ /tensorflow_learning/tflowv/lib64/python3.6/site-packages/tensorflow/python/data/ops/dataset_ops.py", line 390, in <listcomp>
    for ret, dtype in zip(

  File "/home/ /tensorflow_learning/tflowv/lib64/python3.6/site-packages/tensorflow/python/ops/script_ops.py", line 124, in _convert
    result = np.asarray(value, dtype=dtype, order="C")

  File "/home/ /tensorflow_learning/tflowv/lib64/python3.6/site-packages/numpy/core/numeric.py", line 492, in asarray
    return array(a, dtype, copy=False, order=order)

ValueError: setting an array element with a sequence.


[[Node: PyFunc = PyFunc[Tin=[DT_INT64], Tout=[DT_FLOAT], token="pyfunc_73"](arg0)]]
[[Node: IteratorGetNext_41 = IteratorGetNext[output_shapes=[<unknown>], output_types=[DT_FLOAT], _device="/job:localhost/replica:0/task:0/device:CPU:0"](Iterator_37)]]

I've learned a lesson about building software from Tesorflow today: test your inputs and throw your errors early, so you can give the user useful information about what they did, instead of shitting up like this.

Runic

  • Is Putting A Donk On It
  • Paid
  • [Citation Nuzzling]
  • 2,848
  • 96
Thread.setTitle("Programmers Anonymous");
« Reply #115 on: June 20, 2018, 02:21:28 pm »
So in the course of researching machine learning, I have learned about the strange afterlife of Enron. Yes, that Enron. When the company got hit by the big fraud case, the government released 1.6 million emails relevant to the case. It turns out that that giant chunk of emails is actually really useful for machine learning research and even today I've found datasets based on it that are useful for my own projects.

What a world, eh?

A Whirring, Bone-White Gleech

  • five stars
  • Paid
  • you monster
  • 802
  • 159
Thread.setTitle("Programmers Anonymous");
« Reply #116 on: July 26, 2018, 05:54:54 am »
Once again, I'm writing a C++ program, and I just want to create an array, of length provided by a variable not known at compile time, that will have bounds-checking and that will be deleted when it goes out of scope.  And despite the insane profusion of containers and smart-types available in C++, none of them does that.

std::array doesn't, because its size is a template parameter, so it needs to be a compile-time constant.

std::vector doesn't, because it's not fixed-size.  Which I admit is picky on my part.

std::unique_ptr<int[]> doesn't, because it doesn't check the array bounds any more than a basic int[] does.

WHY THE FUCK IS THIS SUCH AN UNREASONABLE REQUEST.

Turtle

  • [F+][F+][F+][F+][F+][F+][F+][F+][F+][F+][F+][F+][F+][F+][F+][F+][F+]
  • Paid
  • 203
  • 27
Thread.setTitle("Programmers Anonymous");
« Reply #117 on: July 26, 2018, 04:26:06 pm »
WHY THE FUCK IS THIS SUCH AN UNREASONABLE REQUEST.
I'm only familiar with C++ at a cursory level, but I think I've figured something out, let me know what you think

Code: [Select]
    int variableArraySize;
   
    std:array<int, 1> array1;
    std:array<int, 2> array2;
    std:array<int, 3> array3;
    ...
    std:array<int, 1000> array1000;

    ...   
   
    int elementAt(int arraySize, int index) {
        switch(arraySize) {
            case 1: return array1[index];
            case 2: return array2[index];
            ...
            case 1000: return array1000[index];
        }
    }
 
    ...
   
    iterator begin(int arraySize) {
        switch(arraySize) {
            case 1: return array1.begin();
            case 2: return array2.begin();
            ...
            case 1000: return array1000.begin();
        }
    }
A Whirring, Bone-White Gleech

jack chick

  • he/him
  • Ridiculist
  • Metal tyrant from hell
  • 2,770
  • 666
Thread.setTitle("Programmers Anonymous");
« Reply #118 on: July 26, 2018, 10:11:24 pm »
WHY THE FUCK IS THIS SUCH AN UNREASONABLE REQUEST.
I'm only familiar with C++ at a cursory level, but I think I've figured something out, let me know what you think

Code: [Select]
    int variableArraySize;
   
    std:array<int, 1> array1;
    std:array<int, 2> array2;
    std:array<int, 3> array3;
    ...
    std:array<int, 1000> array1000;

    ...   
   
    int elementAt(int arraySize, int index) {
        switch(arraySize) {
            case 1: return array1[index];
            case 2: return array2[index];
            ...
            case 1000: return array1000[index];
        }
    }
 
    ...
   
    iterator begin(int arraySize) {
        switch(arraySize) {
            case 1: return array1.begin();
            case 2: return array2.begin();
            ...
            case 1000: return array1000.begin();
        }
    }

lol

A Whirring, Bone-White Gleech

  • five stars
  • Paid
  • you monster
  • 802
  • 159
Thread.setTitle("Programmers Anonymous");
« Reply #119 on: July 31, 2018, 02:43:01 am »
WHY THE FUCK IS THIS SUCH AN UNREASONABLE REQUEST.
I'm only familiar with C++ at a cursory level, but I think I've figured something out, let me know what you think

Code: [Select]
    int variableArraySize;
   
    std:array<int, 1> array1;
    std:array<int, 2> array2;
    std:array<int, 3> array3;
    ...
    std:array<int, 1000> array1000;

    ...   
   
    int elementAt(int arraySize, int index) {
        switch(arraySize) {
            case 1: return array1[index];
            case 2: return array2[index];
            ...
            case 1000: return array1000[index];
        }
    }
 
    ...
   
    iterator begin(int arraySize) {
        switch(arraySize) {
            case 1: return array1.begin();
            case 2: return array2.begin();
            ...
            case 1000: return array1000.begin();
        }
    }

I think we've got something here, let's see if we can get this into boost.