[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

/dpt/ - Daily Programming Thread

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 330
Thread images: 41

File: htp1.gif (2MB, 500x214px) Image search: [Google]
htp1.gif
2MB, 500x214px
old thread: >>60185981

What are you working on /g/?

Also, we should compile a "beginner's list" like /wdg/ has
>>
>>60190522
I'll just repost this here so we call laugh at this faggot
also first for C
>>
File: 1493648868048.gif (2MB, 351x303px) Image search: [Google]
1493648868048.gif
2MB, 351x303px
>>60193215
creating gifs of how to use various tools and initiate build pipelines for a client because they're a 'visual learner' aka fucking too thick to read.
>>
I'm gonna start using emacs TODAY

how bout dat
>>
>>60193436
>2017
>start using emacs TODAY
I myself have decided to adopt the old medical philosophy that the body was comprised of humours
>>
File: d1986b3494839cfe.gif (502KB, 600x338px) Image search: [Google]
d1986b3494839cfe.gif
502KB, 600x338px
Daily programming challenge: find the sum of all palindromes under the nth prime
Give proof that it works with n=10000
>>
>>60193518
who is this little hooded anime lady and why am I so taken by her lifestyle?
>>
File: 1493498655748.gif (4MB, 656x368px) Image search: [Google]
1493498655748.gif
4MB, 656x368px
>>60193530
umaru-chan
>>
>>60193550
thats cute AF i'm gonna have to watch this
>>
File: booques.png (210KB, 590x904px) Image search: [Google]
booques.png
210KB, 590x904px
What textbooks do you guys suggest?
>>
going to make linked list in order in memory using brk and sbrk. Doesn't have to be in a specific order but it does need to be able to expand and contract and remove individual members if need be.
>>
>>60193615

SICP

Applied Cryptography 2e

Programming in Lua
>>
>>60193615
I wouldn't suggest any of those given the prices yikes. Do you have access to any private trackers for academic material? maybe somebody in /ptg/ knows a good one
>>
>>60193652
>>60193615
Those books are also available at Library Genesis
>>
>>60193692
oh nice, that is good to know. I tried to fine Lisp In Small Pieces on there but had no luck :(
>>
>>60193708
Search for the author instead of the title, I could find it that way
>>
>>60193638
Sounds like you're writing a malloc function.
>>
>>60193778
Yes, but my my malloc doesn't abstract anything
>>
>>60193778
>brk and sbrk
>malloc

malloc will use mmap for anything the first few pages desu senpai. But yes, malloc will use brk for small things.
>>
So /g/ tell me how to really learn AND master C.
>>
>>60193833


For learning C:
Start out with K&R and do the exercises. I know it gets a lot of hate on /g/ because it's old and isn't up to date when it comes to the standard, but it really is a great book in terms of pedagogy. At least this was true 8 years ago, maybe there's a better book out.

Also, I found that learning assembly, and calling C code from assembly (or wise-versa) helped me a great deal to understand how C synthesises. I recommend implementing a sprintf like function in assembly at some point.

Once you advance and gain experience, you'd probably should start using the C standard as reference for a lot of things.

Master C:
No one masters C, but practice makes perfect.
>>
Is there a non-cancerous source to learn ASP.NET from? I just need the basics. How to serve static and dynamic content, how to execute server-side code, etc.
>>
>>60193824
redpill me on mmap vs brk
>>
>>60193215
Pascal in uni, simple shit like arrays with numbers
>>
>>60193885
>Can't master C
>Can be perfect in C
Really getting me thinking
>>
>>60193935
brk and sbrk are archaic functions that predate virtual memory management. They are used by malloc for the first couple of pages because when the loader loads your executable, there's free space left in various segments that are loaded (your executable is wrapped into a ELF file, with headers describing different memory segments and their start addresses + sizes).

mmap is a low-level syscall for controlling memory, and is extremely flexible and powerful.
>>
>>60193885
Thank you. Do you have any tips on Python too?
>>
>>60194009
Not in the same way, sorry. I learned Python in a university class that was structured like a intensity course, where we did a bunch of assignments.
>>
How do I redefine let to 137 in Scheme or Lisp

Want my code to look more dank to impress girls
>>
>>60193987
>They are used by malloc for the first couple of pages
Could "mmap" be used in the same context?
Also, I thought "mmap" let's you map files into memory. Does it do other things that would make it useful for allocating memory?
>>
>>60194040
>Could "mmap" be used in the same context?
Yes

>Also, I thought "mmap" let's you map files into memory
Among other things. If you look at mmap's signature, it gives you an idea.

>Does it do other things that would make it useful for allocating memory?
Yes, it allocates pages and set proper page attributes, such as whether or not the page is pinned/swappable, the protection level, which process-specific virtual address you want it to have etc.
>>
>>60194073
This is really interesting, thanks. I'm looking at the mmap man page in detail right now.

Would you be able to recommend me any resources for learning about this stuff and the linux kernel "under the hood"?
>>
>>60194154
>any resources for learning about this stuff and the linux kernel "under the hood"?
Go directly to the source, is my recommendation.

I use this webtool frequently: http://lxr.free-electrons.com/source/

If that's too overwhelming, you could always start with making some small hello-world-ish kernel module that for example traverses the user process' page table and prints out addresses or something like that.

Also, to learn about virtual paging in general, refer to the Intel manuals. They're free and available for download online.

https://software.intel.com/en-us/articles/intel-sdm

There's also a lot that can be learned from this wiki, but I'm not sure how active it is any longer:

http://wiki.osdev.org/Main_Page
>>
What was your first programming language?
>>
File: 1473455453539.jpg (213KB, 563x522px) Image search: [Google]
1473455453539.jpg
213KB, 563x522px
Random question that I'm sure has a simple answer
Using Visual Studio, ran a debug piece of code on another program and spat out an enumerator value

What's the simple way to search through the declared entries in said enum to get the one that corresponds to the number value?
Said enum has several thousand entries and I'm drawing a blank how to do this
>>
>>60194346
QuickBASIC
>>
File: yukari_what (2).png (175KB, 441x599px) Image search: [Google]
yukari_what (2).png
175KB, 441x599px
>>60194346
M-Mathematica.
>>
>>60194346
PHP or mIRC script
>>
>>60194355

Haha, same here..
>>
>>60193650
>Programming in Lua
Why?
>>
>>60194405
I was genuinely retarded though. I didn't understand functions and subs/procedures at all, and I struggled with for loops. But then again, I was 8 years old.
>>
>>60194346
Turbo C++ (as in Borland's weird fucker version of C++).

Or it might have been RPG Maker 2000 events.

I forget the order that these things happened.
>>
>>60194393
mirc script for me as well lol, good times

Visual Basic and Pascal also
>>
>>60194346
VB6
>>
>>60194503
Are you me? Did you also use DarkBASIC?
>>
>>60194545
>Did you also use DarkBASIC?
Nope, 100% confirmed not your clone.

I have never touched a BASIC.
>>
I want Github to have an achievements system because I am Pavlov's Dog.
>>
>add -pedantic to my compiler flags
>10,000 warnings
>ISO C90 forbids mixed declarations and code
>initializer element is not computable at load time
Why do people like C89 again?
>>
File: anal beads.png (4KB, 149x277px) Image search: [Google]
anal beads.png
4KB, 149x277px
>>60194352
An enum is just a special kind of int, in a way of speaking.
>>
>>60194633
We don't. C99 or C11 for userspace, C90 for Linux kernel stuff
>>
>>60194635
Think of it as an int that pollutes the namespace of whatever scope it's in.
It's useful if you wanna pass error codes and don't feel like explicitly defining every error code number, just write the error labels.
>>
>>60194352
>>60194635
An enum is what modern languages have because they don't support
#define
.
>>
>>60194553
DarkBASIC was the tits for games back in the day. You missed out.
>>
>>60194662
I don't know if that's a fair assertion.

Enums have various uses when there is a specific set of possible categories for an item, and using bitflags can give you some interesting options for classifying things.

A classic example is using enum bitflags to describe the state of something, such as in an RPG with status ailments. You can bitwise OR things to show that something is "Poisoned", "Paralyzed", and "Confused", by setting the appropriate bits. In light of this, the programmer can use friendly names to flip these bits, rather than keeping track of an arbitrary order of bits.
>>
>>60194635
I know this, but the program I'm tying into uses a "type" enum for every single class defined, and the debugger spat out "151006328" and I wanted to get the name of the corresponding enum entry
I have the specific enum in the object browser, but search doesn't work because of course it's not that simple
>>
File: anal beads.png (2KB, 235x41px) Image search: [Google]
anal beads.png
2KB, 235x41px
>>60194760
>the debugger spat out "151006328"
Where did it do this? What did you call?

Pic related; you might be dealing with a series of bitflags here, as described in >>60194742

Need to see more code to diagnose.
>>
>>60194760
Maybe the enum it returned is a packed bitfield of the form
1001000000000010110001111000
>>
File: 1493137413729.png (410KB, 480x463px) Image search: [Google]
1493137413729.png
410KB, 480x463px
>try to code simple discord bot in python that can print stuff to the chat
>keep getting inconsistent indent error
>>
>>60194797
>>60194800
It's not used that way in this case, all of these are visible in the object browser as:
"Public Const kEnumEntryName As ObjectTypeEnum = ########"
I have the number, I was trying to grab the kEnumEntryName to decipher what object I found
>>
I have this chat program I wrote in flask. What would be the best way to store the messages?
Right now I have a single dictionary that stores it as id:message(s).
I don't feel like that will scale well.
>>
>>60194847
What language are you using? Just convert from int to the enum type. Literally just do
var enumValue = (MuhEnum)151006328;
in the Interactive window or something.
>>
>>60194885
Don't store the messages.
>>
>>60194885
Implement caching in memory for recent messages, and stale messages get saved to storage.

Good fucking luck.
>>
>>60194885
if you're looking for something lightweight you could offload them into sqlite
>>
Quick! In Rust, does a&&&b parse as a & (&&b) or as a && (&b) ?
>>
>>60194944
a && (&b)
>>
>>60194944
I'm not glad Rust is dead, but I'm glad its gone.
>>
>>60194944
I'm going to guess the former?
Last I checked, rust doesn't even have ternary operators.
>>
>>60194960
C and C++ have the same syntactic ambiguity, but they won't give you a type error if you mess up.
>>
>>60194886
VB.NET, I just got it by doing that but then I had to actually compile and get the debugger started so it'd tell me what name it corresponds to
Surely there's a better way since this would be useful but having to compile+run just to see the debugger spit out a name is silly and take too long
>>
>>60194944
fn main() {
println!("{}", stringify!(a&&&b)); // prints "a && &b"
}
>>
File: Capture.png (1KB, 67x27px) Image search: [Google]
Capture.png
1KB, 67x27px
>>60194944
>>
>>60194944
This is the kind of shit that keeps me from writing language parsers.
>>
File: skeptical spider.png (133KB, 537x470px) Image search: [Google]
skeptical spider.png
133KB, 537x470px
>>60194961
>ternary operators
>>
>>60194999
>C and C++ have the same syntactic ambiguity
I don't care. It's still ugly as fuck.
>>
On Wednesdays we kode!!!
>>
>>60194999
Being marginally better than C is a pretty low bar, desu senpai
>>
>>60195078
>>60195034
The logical operators have higher operator precedence than the bitwise ones, for this exact reason.
If you want to explictly bitwise and something, put it in parentheses.
>>
File: pigs swimming.jpg (146KB, 800x1067px) Image search: [Google]
pigs swimming.jpg
146KB, 800x1067px
msgbin[i+j] = str((int(msgbin[i+j]) ^ int(GENERATOR[j])))


How do I translate this python snippet into C++?

Already declared msgbin and generator as bitsets, only asking about the "str" and "int" part
>>
>>60195193
I have no idea what is doing.
>>
>>60195193

http://en.cppreference.com/w/cpp/string/basic_string/to_string
http://en.cppreference.com/w/cpp/string/byte/strtol
>>
Why were monads called like that? Is it because you can do computations inside the monad itself so that it is separated from outer world?
>>
>>60195014
Well, that's the fault of the stupid developer that's using a magic number in place of naming the enum value.

You can right click you project and do "Initialize in Interactive" to run one-liners against the types you're working with.
>>
>>60195117
Doesn't eliminate ambiguity due to unary operators though. Afaik this depends both on the behaviour of the lexer and the parser.
>>
>>60195234
I know my C++, I'm asking what those "str" and "int" do in python

>>60195213
It's part of a CRC check and correct algorythm.
>>
>>60195325
>I'm asking what those "str" and "int" do in python
They create a string and an integer type.

Think of it as casting.
>>
>>60195272
Monads are called like that in mathematics because they look like monoids if you squint. Mathematicians have had a bunch of names for the concept though, "triad" was the more popular term for most of its history and is arguably more descriptive (just the triad of map, pure, join) but it ended up falling out of favour to eliminate ambiguity.
>>
>>60195349
Ayy lmao so I just had to xor my shit up.
Thanks familia.
>>
Why must cross compiling to android be so miserable?
>>
>>60195375
Ok one more and I'm done lol:
 x = ''.join(bin[-24:])


''.join() does what exactly?
>>
>>60195364
What a shitty etimology, dare I say
>>
>>60195403
It makes a string.

', '.join(['a', 'b', 'c']) # prints "a, b, c"
>>
>>60195286
I know there are code problems, it's major software that's been worked on by god knows how many people for years. These fuckers aren't even consistent with 0 or 1 indexing lists

Could not find an "Initialize in Interactive" though, could it be either me being in .NET and not C#, or because this project isn't actually a self-contained program, it's a class library that compiles to a .dll that hooks into the program's API
>>
Python makes my tinkle sprinkle desu :^D
>>
I wish D had won the war to replace C++ for rapid development of desktop applications instead of Java/C#.
>>
To the anon asking for Python book recommendations, this guy is pretty good:
http://libgen.me/view.php?id=1412347
>>
>>60195770
That site doesn't load for me
>>
>>60195951
Does this one?
http://libgen.io/
>>
>>60194033
(defmacro redefine (a to b)
(declare (ignore to))
<your code>)

(redefine let to 137)
>>
>>60195387
Could you rephrase?
>>
>>60195996
No, only http://gen.lib.rus.ec/ but when I append the view.php thing to that URL I get a 404
>>
Sup /g/oblins

My device's accelerometer takes data at an interval and then feeds it to a handler function. My goal is to detect when a user taps on the desk nearby. Right now I have a big array of data (doubles) I'm saving and I'm using that to compare... I just check the average of my data set against the latest data +/- some % for sensitivity, say 1%, and I say that that is a tap if it exceeds those numbers.

However, right now I'm adding data to the pool at every interval update, when the handler is called, and when the user taps, this data gets added to the data pool which fucks up the average.

It's easy to exclude outliers (just don't add detected taps to the array), but if I do that and the user moves the device to a surface with different ambient vibrations, now no new data will be added and the loop will just think the user is tapping 24-7...

Anyone have a good solution for this?
>>
Should I learn SML?
>>
File: maxresdefault.jpg (129KB, 1440x1080px) Image search: [Google]
maxresdefault.jpg
129KB, 1440x1080px
>>60196313
Wut
>>
>>60196372
No
>>
File: akari tea.png (3MB, 925x1620px) Image search: [Google]
akari tea.png
3MB, 925x1620px
I upgraded debian and now getenv() in C is returning an empty string instead of NULL whenever it can't find a variable.

Why does this even happen?
>>
Fun fact: a formally verified Kernel exists:

http://www.sigops.org/sosp/sosp09/papers/klein-sosp09.pdf

Though the proof of correctness is 200k lines long, while the Kernel itself is 7.5k of C code.
>>
>>60196395
Are you sure? Report, it's a bug.
>>
>>60195756
No one stops you from using D
>>
>>60196480
Except your employer
>>
>>60196517
You don't have to be employed to write desktop applications
>>
>>60196438
I can't recreate it though.
I'm thinking it might be a lighttpd problem, because it only happens when accessing my site through the http server.
The homepage only shows when there's no QUERY_STRING available, and a non-null empty string screws it up.
>>
File: wholesome autocorrect 2.png (27KB, 258x387px) Image search: [Google]
wholesome autocorrect 2.png
27KB, 258x387px
>>60196373
Epic post, bro!
>>
>>60196550
Go on the incriminated machine and run a C ompiled program on it.
>>
>>60196408
I still want to see a proof of the Rust borrow checker.
>>
>>60196313
Figured it out, no thanks to you shitposters
if number of data points < max number of data points for sample period and newest data point is an outlier, clear entire data pool, perform arbitrary thing, and return
>>
I have a job interview next week, with a company using Big Data, Machine Learning, Natural Language Processing.

They're turning all these hot buzzwords you hear into an actual, solid business. Amazing company.

What is the fastest way to get some knowledge? I already know Python, Web Crawling and some Natural Language Processing.
>>
>>60196589
I just did, it returns empty getenv() calls as NULL.
Also, if I run my script from the command line, it also exhibits the correct hehavior.

It's a lighttpd problem.
I'll just add an edge case for it for now.
>>
>>60196740
Crash course TensorFlow.
>>
>>60196748
>it returns empty getenv() calls as NULL.
?
>>
I sort of understand the concepts of programming and all but I am absolutely horrible at projects. Is that fully determined by practice or is it mainly having a mind catered to problem solving?
>>
Selling my dice roll program for $1. Contact me if interested

#dice roll
import random

def main():
roll = 'y'
while roll == 'y' or roll == 'Y':
dice_roll()
roll = input('Roll again? (y/n) ')

def dice_roll():
for i in range(2):
print(random.randint(1,6))

main()
>>
File: gcc-make.png (21KB, 812x612px) Image search: [Google]
gcc-make.png
21KB, 812x612px
anyone else building gcc7?
>>
>>60196933
Building gcc on Windows? Seriously?
>>
Python is the ultimate guilty pleasure language. You shit on it for not satisfying type safety standards and being gimmicky at times, but if you want to get shit done, you use it.
>>
>>60196955
NEETs hate Python, click here to find out why!
>>
>>60196953
anything wrong with that?
>>
C with SDL2 and nuclear seems to be the only sane way to make cross platform(pc, mobile) gui applications.
Which scripting language choose to add into that combination, currently thinking about scheme but there's so many implementations to choose from also ocaml might be decent?
>>
>>60196990
No. But I'm impressed. I don't even try to build it on GNU/Linux, so building it on Windows. DO you use GNU/NT (ie WSL) or pure NT?
>>
>>60196955
This is bullshit
>>
>>60197030
I'm building on mingw64 (msys2). quite similar to building on linux I guess.
>>
File: download.png (33KB, 527x487px) Image search: [Google]
download.png
33KB, 527x487px
How can I write a program that will help me lose my virginity
>>
>>60197097
Write a tinder autoswiper.
>>
File: libshit.png (75KB, 1106x829px) Image search: [Google]
libshit.png
75KB, 1106x829px
>>60197030
Oh I'm running into some issues though. damnit. hope I won't need to rebuild the entire runtime library.
>>
>>60196774
Certainly practice helps, then at some point you should be able to figure out if there's something wrong with the way you approach problems or it's just that you are inexperienced.
>>
>>60197097
dumb frogposter
>>
>>60197176
What did you just call me?
>>
>>60196922
pirated it, nerd
>>
>>60197231
You are killing the dice roll software industry. Stop it at once!
>>
Hi, I'm looking for a language recommendation. I want to to write a program that uses some web APIs, so I'm looking for a language that's good at that. One that has good libraries for making http requests, parsing json, interacting with databases, all that. Normally I'm a C and C++ guy, but from what I've read these languages are a little too level for a task like this.

What would you recommend?
>>
Why are software companies so hostile to personal development?

https://www.quora.com/Should-I-fire-a-software-engineer-for-always-working-on-his-side-projects-during-office-hours
>>
File: wayland-screenshot.png (2MB, 3840x2160px) Image search: [Google]
wayland-screenshot.png
2MB, 3840x2160px
>>60197097
rewrite gentoofetch in C.
After it wtite P2P version of 4chan console and desktop client.
>>
>>60197279
I'm not a huge fan of Python but this is pretty easy to do in Python
>>
Is there anyone here that's very proficient in OpenGL and actually knows the spec? Either I'm retarded or I've found a bug in the AMD video drivers for Linux.I want to run it past you guys before I file a bug report.

GLuint vertexArray, vertexBuffer, elementBuffer;

//generate and bind a vertex array.
glGenVertexArrays(1, &vertexArray);
glBindVertexArray(vertexArray);

//generate, bind and set the data of the vertex buffer.
//this vertex buffer should now be associated with the VAO.
glGenBuffers(1, &vertexBuffer);
glBindBuffer(GL_ARRAY_BUFFER, vertexBuffer);
glBufferData(...);
...
//generate, bind and set the data of the element buffer.
//this element buffer should now be associated with the VAO.
glGenBuffers(1, &elementBuffer);
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, elementBuffer);
glBufferData(...);

//unbind the vertex array
glBindVertexArray(0);

//delete the application's reference to the vertex buffer - however, it
//remains allocated until the vertex array is deleted (as the spec dictates)
glDeleteBuffers(1, &vertexBuffer);
//delete the application's reference to the index buffer - this one gets
//deleted, even though it's still referenced by the vertex array object
//(as far as I can tell this is incorrect behaviour)
glDeleteBuffers(1, &elementBuffer);

...
//Nothing is displayed, because the element buffer was deleted earlier
glBindVertexArray(vertexArray);
glDrawElements(GL_TRIANGLES, primitiveCount, GL_UNSIGNED_INT, 0);
glBindVertexArray(0);
>>
>>60195053
Yes, but if and match statements are expressions, so you don't need them.
>>
>>60197353
What is "ternary" about three ampersands?
>>
>>60197279
Go. The net/http standard library is excellent. https://golang.org/pkg/net/http/
>>
>>60197097
Write script that download all facebook/tweeter/instagram pictures/tweets/posts of girls in your town/region, mark them when they get deleted, then pop up notifications after poster changed relationship status, you might have a lot of misses but sometimes you will get dirt on girl in relationship, great blackmail tool and your best bet on losing virginity.
>>
>>60197368
Sorry, I misread.
>>
>>60197435
this
>>
Trying to wrap my head around value and reference types in c#

I thought I had it down but I'm stuck on something

int[] x = new int[] { 5, 10, 15 };
int[] y = x;
y[0] = 99;

Console.WriteLine(x[0]);
Console.WriteLine(y[0]);


This works fine. It changes both the x[0] and y[0] to the same value.

string a = "Hello";
string b = a;
b = "yes";

Console.WriteLine(a);
Console.WriteLine(b);


Why doesn't this change the "a" variable to "yes"? Strings are reference types

Hope the code tags work... I'll delete this post if it doesn't
>>
File: 14937731469030.jpg (1MB, 3477x2456px) Image search: [Google]
14937731469030.jpg
1MB, 3477x2456px
>>60197566
>>
>>60197351
why are you deleting buffers before drawing?
>>
>>60197489
Can python use Facebooks API
>>
>>60197612
i'd imagine any language capable of querying a restful API via HTTP(S) can use the facebook API
>>
File: bandicam 2017-05-03 13-10-31-850.jpg (293KB, 1464x878px) Image search: [Google]
bandicam 2017-05-03 13-10-31-850.jpg
293KB, 1464x878px
I was here yesterday but had to leave suddenly, I was trying to compile code for an example in a C studying book, but the long double wasn't acting as the book said it should.

But it works fine if I loaded up visual studio, I just dunno if I really want to use that for such small projects in studying material.
>>
>>60197294
>> Quora
That website is SJW as fuck.
>>
>>60197588
According to the spec:
>When a buffer, texture, sampler, renderbuffer, query, or sync object is deleted, its name immediately becomes invalid (e.g. is marked unused), but the underlying object will not be deleted until it is no longer in use.

Apparently the buffers are supposed to be kept alive for the lifetime of the VAO they're associated with. That works correctly for the VBO (it draws correctly using glDrawArrays() instead of glDrawElements()), but not for the EBO.
My motivation is that I don't want to have to keep track of all the VBOs and EBOs associated with a Mesh object in my C++ code and make sure I delete them when the Mesh is deleted. Instead, I can just call glDeleteVertexArrays() and have it delete all the buffer data associated with it.
>>
>>60197765
Sorry, I missed out an important bit of my spec quote.
>When a buffer, texture, sampler, renderbuffer, query, or sync object is deleted, its name immediately becomes invalid (e.g. is marked unused), but the underlying object will not be deleted until it is no longer in use.
>A buffer, texture, sampler, or renderbuffer object is in use if any of the following conditions are satisfied:
>...
>the object is attached to any container object
>...
>>
File: primesieveirl.png (439KB, 1593x678px) Image search: [Google]
primesieveirl.png
439KB, 1593x678px
>>
>>60197294
>should I fire employee for being too good at his job?
>should I reject applicant because he brought his mom to the office and she waited in the lobby?
>should I reject applicant because he refused to talk or make eye contact with any women including the receptionist?

Keep programming as a hobby, this industry is pure shit.
>>
>>60193833
K&R is by no means bad, but Harvard has an intro to Computer Science MOOC that uses C pretty extensively. It's a pretty demanding intro to programming but you'll be far better off than your average code monkey by the end.

https://courses.edx.org/courses/course-v1:HarvardX+CS50+X/info

It's free and by the time you get through the course you'll have actually completed a practical project (which is more than 99% of /g/ can claim)
>>
>>60194346
C
>>
File: cs50 harvard meme class.jpg (259KB, 3000x1251px) Image search: [Google]
cs50 harvard meme class.jpg
259KB, 3000x1251px
>>60197854
>cs50

haha ok
>>
>>60197574
How is this relevant?
>>
https://github.com/open-source-society/computer-science

What does /g/ think about it?
>>
>>60194622
There's no shortage of websites that host programming challenges and competitions to satiate your need for objective metrics of progress anon.
>>
>>60194885
store them as json objects :^)
>>
Where do I obtain the intel C compiler for personal use? I see some projects distributing binaries compiled with it.
>>
>>60197890
>2017
>don't know what is perl
>>
>Stanford Uni's intro to CompSci course adopts JavaScript, bins Java
>>
Why do you call a female Pajeet? Pooja?
>>
>>60197959
JavaScript is better than Java.

Come at me
>>
>>60197978
Of course it is lol
If you want to be a contrarian you should try harder
>>
>>60197959
Any good CS first year touches C, Java and Haskell. Anything else is incorrect.
>>
>>60197959
Training a new generation of unskilled, low pay web monkeys
>>
>>60197990
Um. Err.

TypeScript is the future. Anyone who doesn't like it is a Luddite.
>>
Why the hate? Js is bretty decent these days compared to Netscape nav era.

Nifty little multi-paradigm language. Teach C on the second year. Don't teach Haskelol, mathfags can have it.
>>
def reset_proxy(driver_para, base_url_para, target_para):
driver_para.close()
driver_para.quit()
proxy = str(getIP())
port = getPort()
sp = webdriver.FirefoxProfile()
sp.set_preference('network.proxy.ssl_port', int(port))
sp.set_preference('network.proxy.ssl', proxy)
sp.set_preference('network.proxy.http_port', int(port))
sp.set_preference('network.proxy.http', proxy)
sp.set_preference('network.proxy.type', 1)
base_url_para = "https://boards.4chan.org/vg/thread/"
base_url_para = base_url_para + str(target_para)
binary = FirefoxBinary('C:\Program Files (x86)\Mozilla Firefox\Firefox.exe')
driver_out = webdriver.Firefox(firefox_profile=sp, firefox_binary=binary)
driver_out.get(base_url_para)
el = driver_out.find_element_by_id("settingsWindowLink")
el.click()
el = driver_out.find_element_by_xpath(".//*[@id='settingsMenu']/div/ul[1]/ul[2]/ul/li[11]/label/input")
el.click()
el = driver_out.find_element_by_xpath(".//*[@id='settingsMenu']/div/ul[1]/ul[2]/ul/li[9]/label/input")
el.click()
el = driver_out.find_element_by_xpath(".//*[@id='settingsMenu']/div/div[2]/button[2]")
el.click()
driver_out.get(base_url_para)
el = driver_out.find_element_by_class_name("open-qr-link")
el.click()
old_driver = driver_out
return driver_out
def main():
global errorCap
global errorBan
global errorDup
global errorISP
global old_driver
new_driver = None
try_post(driver)
while True:
if errorBan == True:
new_driver = reset_proxy(old_driver, base_url, target)
time.sleep(100)
errorCap = False;
errorBan = False;
errorDup = False;
errorISP = False;
try_post(new_driver)

im having some trouble with selenium for python,it works when it gets banned the first time,works fine and opens a new driver and browser but second time it gets banned,it shits itself
>>
>>60198105
>Teach C on the second year. Don't teach Haskelol, mathfags can have it.
Computer science courses (and universities in general) aren't about producing perfectly rounded little wagecucks, they're about imparting knowledge. Languages like JS are what most of the graduates will probably end up using, but they reveal nothing about the underlying data structures and systems like C does. Haskell isn't mandatory, but exposure to functional languages is. Teaching the chart-topping languages is how you end up producing an army of code monkeys who can rewrite boilerplate code but can't create anything new or transition to other languages once the languages they were taught fade out. Teach concepts, not languages.
>>
>>60197978
this but unironically
>>
File: Kornheiser_Why.jpg (73KB, 600x1040px) Image search: [Google]
Kornheiser_Why.jpg
73KB, 600x1040px
>mfw I hear about American computer science courses

Do they really just teach you whatever languages are being meme'd at the moment for the entire course? No wonder your government had to close the borders to stop us europoors and pajeets taking your jobs
>>
Alright here's a rundown of my situation. I took AP comp sci my senior year and its just not my thing.we took our last test but my instructor threw a curve ball and made a end of the year project. I need ideas for it it has to be interactive but it doesn't have to be too impressive.
>>
I want to learn artificial intelligence using C++
Suggestions?
>>
>>60198281
Rock, paper, scissors game
>>
>>60198253
It wasn't even that long ago that all universities were aligned to either oracle or microsoft, and this decided the major language they would teach you, Java or C#.

Now that desktop programming is becoming rapidly extinct, everyone just teaches webdev now, and that means meme frameworks with a smattering of javascript.
Maybe you'll get some theory if you're lucky but schools with CS departments are literal job training diploma mills these days.
>>
>>60198286

If you mean classical AI, try writing your own min/max AI for chess. There are plenty of libraries to help.
>>
>>60198296
He gave us that as an example and we can't use the examples.
>>
>>60198339
What are the minimum project requirements
>>
>>60198281
Blackjack
Poker
Connect 4
Battleship
Pong
>>
>>60197279
C#, Python, or Golang are all pretty good choices.
>>
$ nodejs -e "console.log(1234 >> 64);"
1234


defend this
>>
>>60198359
It just has to be interactive.
>>
>>60197279
Go/golang is actually designed for this.
>>
>>60198331
I'm a bit rusty at programming so that seems like a good start. I've used pathfinding and personally tweaked decision making, but nothing more. This seems like a general purpose decision making algorithm? Suggestions for starting modern AI?
>>
>>60197294
>there are people who will unironically defend the employee
Would you pay a kid at a car wash to wash their own car?
>>
>>60198369
I'm not that good at comp sci to do those. In just trying to pass so I can graduate.
>>
>>60198395
What's wrong with this?
>>
Are there any decent alternatives to VS that don't install 15+ dependencies and bullshit bloat? I just need something that will compile my hello worlds in C++
>>
>>60198395
>there are people who will unsarcastically compare tedious, routine, slave, oldschool job like carwashing and sophisticated, modern, creative job like software development
>>
>>60197875
>an American University in one of the most liberal states in the country is pozzed as fuck

That's a given anon, but it's a class on programming, not on how to run a country. Their retarded politics don't make them any less of a good resource to learn how to program.
>>
>>60198339
Space Invaders then you queer
>>
>>60198461
You really think there's any real learning happening in that pic?
>>
>>60198298
On my course in the UK we've had about a 60/40 ratio of theory to languages. I think there have been three pure language modules out of the 36 total that you do on the course, with the rest of the languages being framed as implementations of the concepts that are taught in lectures. I'm pretty sure I would have dropped out if I had to do nothing but the web stack and it's meme languages for 3 years.
>>
>>60198432
Last time I checked you could disable pretty much everything in VS installer except c++ support, there was not a lot of bloat
>>
I'm a "professor" at University of Toronto. This is my first time teaching beyond being a TA. I only have an MSc, not a PhD like others, hence professor in quotes.

I'm teaching a 2nd year course on ADTs. Basically things like introduction to classes, interfaces, abstract types, inheritance, polymorphism, etc using Java.

I've been told I don't NEED to use Java, I can use any language that's appropriate, it's just the class has only known Java to this point (this is the 3rd compsci course students would have taken, the first 2 are strictly Java).

I was thinking of changing it up to use C++ and Ada instead. Think this is a good idea?
>>
File: fuckOuttaHere.jpg (37KB, 320x362px) Image search: [Google]
fuckOuttaHere.jpg
37KB, 320x362px
>>60198441
>there are people who unironically think that they're entitled to payment for doing beneficial for the person paying them
>>
>>60198388
make a 2D random walk program in 4 directions. You specify how many steps to take
>>
>>60198426
What's wrong with paying to watch somebody wash their own car? Is that a serious question?
>>
>>60198286
If you're interested in learning modern AI then C++ isn't the language you should be using. Pick your poison from Caffe (has it's own language) Torch (LuaJIT) or TensorFlow (Python)
>>
>>60198496
Have you ever actually looked at the course material or watched any of the lectures?
>>
>>60198388
make a various datastructures visualization program. like red black, splay and other trees. it's fun looking at rotations
>>
File: 1490151615636.jpg (69KB, 699x485px) Image search: [Google]
1490151615636.jpg
69KB, 699x485px
using T = int&;
static_assert(std::is_same<T /*int& */, T& /*int&&*/>::value, "");
//OK

int bar(int&);
int i = bar(0);
//Error: no matching function call to 'bar'

int baz(int&&);
int l = baz(0);
//OK
>>
>>60197875
I don't get it. What's so bad about the pic?
>>
>>60198565
Hmm, never thought I'd see Python be a leader in AI languages. Do you think the language suites this field? I always thought C++ would be the best language for AI
>>
>>60198602
cpp was a mistake
>>
>>60198518
Are you actually good at c++?
>>
>>60198608
It reeks of "US CODERZ, RITE GUIZ?"
>>
>>60198518
Frankly, I think you should use Java. You aren't there to teach them a new language, you're there to teach them OOP concepts. Forcing them to learn another language will just confuse them about which bits are OOP concepts and which bits are implementation details.
Better yet, why not make it language independent? You could really drive home the point that OOP is language independent by showing them code snippets in several different languages, and tell them to do their coursework (if you decide to set any) in whichever language they choose.
If you have any pull in the department you should try to get them to change the languages used in the earlier modules though. Java isn't an appropriate language to teach CS101 in.
Also, can you really be a professor in America as an entry level job? Over here in Europe doctor is the entry level academic position and professor is what you get after you've been working for decades and leading your own research group.
>>
>>60198551
>pays minimum wage scrub to wash cars
>gets angry when he washes cars
>WOW I'M SO ANGRY MUH MONEY

kill yourself
>>
What does /dpt/ think of clojure?
>>
>>60198515
If I uncheck everything I can, it still comes out to 1.13GB. Seems a bit excessive.
>>
>>60198663

Technically I'm an associate professor. I'm not even going for my doctorate. The pay is $14,960 a per course taught (I'm teaching this and an Ada specific course meant for 4th years).
>>
>>60198518
Do Ada. By this point they should be starting to learn how to read a language manual by themselves.
>>
>>60197574
>periodic
That is just a normal table, you silly author.

If it were periodic, it would make sense wrapped end-to-end in a cylinder shape.
>>
>>60198634

Yeah. I'm most proficient in C, C++, Ada, and LISP.

>>60198663

To add, I get your point but they pretty much want things taught through the lens of a language or two. If I had some major pull, I'd get CS101 to be taught in C to be honest. I don't particularly like Java.
>>
>>60198395
If no customers are present and he is paid a fixed salary according to his employment contract, yes! Employees should be free to do what they want when they are idle.
>>
>>60198623
Modern AI has become so abstracted away from programming that the language doesn't really matter. The language you use is basically just there to set up your model and to call the train function, at which point an external program that's been optimized way beyond what any individual could do kicks in. You'll almost certainly never write your own neuron for a neural network, for example. Most production AI systems thesedays use TensorFlow, whereas research seems to have settled on Torch. The language doesn't matter much, though.
>>
>>60198721
>>60198691
>>60198518

is it even worth getting an msc in cs??
>>
idea guy here

what if google used ai to fact check your 4chan posts with all the data they have on you

imagine a 4chan where nobody can lie
>>
>>60198748

I dunno, they paid me $12k a year to do my master's. I enjoyed it, I was supervised by my favorite professor.

I focused on computer vision and image processing. My thesis was on pattern recognition in images (specifically for recognition of handwriting). The caveat was to do it the "old way" without neural network or similar architecture.

Basically took 1yr of grad courses specifically in computer vision, and then 1.5 years to do my thesis.

I found it fulfilling but if they didn't pay me I don't think I'd have done it.
>>
>>60198748
If you want to earn the big R&D bucks then a strong masters with a topic that's in demand like deep learning or computer vision is the most economical option I guess.
I'm a masters student in the UK because it was integrated, but I'm planning to do a PhD afterwards anyway. Academia pays less, but it also means that you get to sidestep the corporate bullshit that people on /g/ constantly complain about.
>>
>>60198518
As much as I love C++ and hate Java, I would stick with Java. C++ tends to fudge the OO concepts with weirdness because of how low level the language is. A few examples:

You can have a variable of type Parent* when the actual value is really of type Child, but if you try to have a variable of type Parent when the actual value is really of type Child, you'll truncate and garble your class members (assuming the child is bigger).

Because of above, you then have to heap allocate your polymorphic classes, which means you then need to destroy them, further complicating matters compared to any more modern language. Or use std::shared_pointer and similar types, which isn't much better.

There's also the weirdness of requiring virtual destructors, the honestly pretty odd syntax for pure virtual methods, interfaces being implicit rather than explicit... I don't think it's worth it (except if they would otherwise not receive any education on C languages and you're on a crusade to do something about that, in which case go ahead).
>>
File: Capture.png (10KB, 462x81px) Image search: [Google]
Capture.png
10KB, 462x81px
You have 10 seconds to explain why you aren't writing HolyC right now.
>>
>>60198824
C is niggerlicious. C# or C++ is divine intellect.
>>
>>60198824
Because I'm not mentally ill.
>>
>>60198824
Really made me think
>>
>>60198855
C# is too much voodoo for the next 10 centuries
>>
>>60198819

The curriculum hasn't changed much since I went for my BSc. The rough outline of compsci courses required to graduate are:

>intro to programming in Java (basic loops, I/O)
>continuation of the above in Java (AVL trees, B trees, recursion, etc)
>ADTs, OO programming in Java
>a course that's a mishmash of like 5 different languages (Prolog, ALGOL, Scheme, Ada, Java) which teaches things like memory management, how arrays are allocated, computational complexity, etc
>credit in PL/SQL
>webdev (PHP, PDO SQL, Javascript, HTML, AJAX, JSON)
>intro to both Python and Ruby
>AI, which used to be Expert Systems as late as 2005, now it's Java and very abstracted
>credit on design, KLM/GOMS model, etc
>a course in Ada and LISP, very general stuff
>capstone project in language of choosing

You'll see there isn't much language variety, most of it is Java. That course with the mishmash of languages doesn't focus on any one for long, mostly just snippets to illustrate a broad topic.

I just want there to be less Java, more other shit. C/C++ would be great, more Ada is good (we're taught from very early on that Ada is great because legacy software needs maintainers, yet they don't really focus on it at all).
>>
>>60198900
I wonder how much hate I would get if I got to teach an 101 course in Ada.
>>
>>60198900
I don't see any C languages in there... Go for it.
>>
>>60198900
What about Smalltalk? That's the quintessential object oriented language. I guess it'll be pretty useless when they graduate, but in terms of teaching OOP concepts it's unparalleled.
>>
>>60198900
>>a course that's a mishmash of like 5 different languages (Prolog, ALGOL, Scheme, Ada, Java) which teaches things like memory management, how arrays are allocated, computational complexity, etc
That's totally retarded. That's exactly where C should be coming in.
>>
File: gcc-make.png (38KB, 812x612px) Image search: [Google]
gcc-make.png
38KB, 812x612px
>~/build-gcc$ make -j256
now this is podracing.
>>
>>60198950

From what I gather, the course I'm teaching is one of the "less important ones", hence bigger freedom in what to teach. It being broadly on OO means I have many languages to choose from. It's just do I stick to convention and do Java, perhaps robbing graduates from a good foundation in C++ and/or Ada, or do it my way.

I wish I was taught C and C++. I had to learn it on my own.
>>
>>60198987
>>60198964

I know. There's a sore lack in C. Personally I think CS101 and 102 should be in C, and open up to C++ later.
>>
>>60198991
She can't go any faster captain, she's gunna blow!
>>
File: lmao.png (164KB, 642x582px) Image search: [Google]
lmao.png
164KB, 642x582px
>academia
>>
I want to get something like google street view in my game (unity), how hard would it be to do that?
>>
File: smug_ran.jpg (632KB, 709x1063px) Image search: [Google]
smug_ran.jpg
632KB, 709x1063px
>>60199100
>institutions funneling in that pajeet cash
What's the problem?
>>
>>60199100
They might as well stop calling themselves a university and just say "trade school".
>>
>>60198993
Just do Ada. It'll show them a language out of the FORTRAN family and I've heard students learn it pretty well.
>>
>>60199100
>javascript instead of java as a step up
>consider the social impact their work can have
wtf?
>>
File: AhmedandClinton.jpg (43KB, 400x400px) Image search: [Google]
AhmedandClinton.jpg
43KB, 400x400px
>>60199166
I'll let you guess the school
>>
>>60199166
it means inserting CoCs into every open source project and then engaging in organized character assassination on twitter if anyone resists.
>>
>>60198900
>AI, which used to be Expert Systems as late as 2005, now it's Java and very abstracted
>AI in Java
So they don't teach any ANN stuff? Traditional AI in Java sounds so tedious since it's usually most elegantly expressed with recursion.

>not a single functional language
Also pretty dumb since most big services go functional at some point in their software stack due to the easy parallelism.

>capstone project in language of choosing
Guess that's basically just Java, because they haven't been taught anything else.
>>
>>60199209
It looks like you're not safe anon.
>>
>>60199194
>Stanford
just end it all
>>
>>60198824
I'm not an autistic youtube vlogger
>>
>node shit was finally dying off
>now academia is going to push it even harder than ever

Web dev needs a massive reboot.
>>
>>60199250
>Web dev needs a massive reboot.
Web dev needs to end. The internet was a mistake. Nothing good has come from it.
>>
>>60199100
>blaming academia for this

Dude, academics are the ones pushing for languages to be taught regardless of their meme status. It's just that American universities are run as businesses thesedays so they teach students what they want instead of what they need.
>>
>>60199282
he says while posting on 4chan
>>
>>60199288
>>60199282
>>
>>60199282
Internet was a mistake. Do us a favour and disconnect from the internet now
>>
>>60199288
I don't know what your implying.
4chan is a shithole at best.
>>
>>60199287
Probably more sinister than that. Universities are liberal hives. They're intentionally forcing them down the route of web dev just so they can have more liberal web activists pushing the agenda on more and more people.
>>
What textbooks are useful for learning python as a first programming language? If not python, what language do you recommend
>>
>>60199337
Yeah bro, it's the fucking jews. And niggers.
>>
>>60199366
you're saying it like it isn't the truth
>>
>>60199337
The science faculty tend to not really give a shit about politics, they just want to do their job.
>>
>>60199100
i'm not going to lie, it's extremely funny to see a bunch of anons shitting on a Stanford education, as if these students aren't going to make $120k starting
>>
File: 1466853511186.jpg (54KB, 444x399px) Image search: [Google]
1466853511186.jpg
54KB, 444x399px
>>60199384
Absolutely not. Blame it all to jews and niggers, I swear it's the liberals bro! Conservatives will save STEM
>>
>>60199406
and they should be the first to line up the lampposts on the day of the rope
>>
>>60199406
Not for long though. When word gets out that Stanford CS is basically just codeacademy they'll drop out of the rankings like flies. We had it in the UK with Nottingham and Warwick, Imperial is the current meme university but in a few years they'll make a single fuckup that'll send them back down to 10th place.
>>
>>60199453
>meme uni
t. imperial reject
>>
>>60199422
>i believe in a market free of state intervention
>except when the market demands liberal values, then we need a national revolution
get cucked by economics
>>
I think the confusion comes from the fact that Computer Science != Software Engineering. Of course, university focused on softdev should teach javascript. Like it or not, it's js time. CS is not about programming, it's about cs
>>
>>60199384
The burden of proofs is on you.
>>
>>60199490
>C""""S""""
>>
>>60199453
>one of the best AI/ML research institutions is "just codeacademy" because i don't like the intro programming courses
i suspect you don't know much beyond codeacademy
>>
>>60199453
>Stanford CS is basically just codeacademy
this is too much
making a screencap
please post it on dpttxt as well
>>
>>60199490
Maybe they should rename their course to web development if they're going to skip over the comp sci theory then.
>>
>>60199505
computing is a physical phenomenon and, like all physical phenomena, can be studied experimentally. unless you're some kind of metaphysical dualist

almost all AI/ML research is done experimentally and theory follows behind

i suspect you saw a hal abelson gif once
>>
>>60199512
>>60199536
Undergraduate courses != research. Stanford academics are undoubtedly some of the best, but that has nothing to do with the quality of their CS undergraduate course.
>>
>>60199537
what part of "introductory courses" did you not understand

where the fuck teaches theory in the first semester
>>
>>60199558
>computing is a physical phenomenon
No it isn't. It's a mathematical phenomenon.
>>
>>60199588
>where the fuck teaches theory in the first semester
Every decent CS course starts of with the fundamentals of computation, memory, basic operations etc. Using a high level language just clouds all of that.
>>
>>60199560
every strong research institution feeds undergrads into research in the third and fourth year. have you not heard of an internship? i had 4 interns in my lab last summer and 3 more during the school year
>>
>>60199615
low-level programming is not "comp sci theory"

if you're saying they should lead with C then i don't disagree
>>
>>60199471
All the London universities are punching above their weight just by having London in their name. UCL is probably around Manchester/Nottingham/Newcastle tier except for the fact that it's located in the capital.
>>
File: chen_class.png (92KB, 532x391px) Image search: [Google]
chen_class.png
92KB, 532x391px
>mfw people actually unironically think that mathematics isn't a science
>>
>>60199592
a phenomenon is a situation that is observed to exist

mathematical objects do not exist, unless you've single-handedly solved the platonism/anti-platonism problem, in which case you should probably publish

the physical run time, physical memory use, etc., of an implementation is a good deal more concrete than a mathematical object
>>
>>60199686
You don't need to have two apples to have the concept of two. There are concepts in mathematics that have no physical representation. QED.
>>
Can someone explain to me the point of unit tests? If you write them once, they'll work forever as the data is the same. What am I missing?
>>
>>60199686
A lot of higher level mathematics has no grounds in reality.
The useful stuff is what people get taught in math-heavy stem degrees.
>>
File: test (4).png (532KB, 602x699px) Image search: [Google]
test (4).png
532KB, 602x699px
>>60199709
>>60199715
>mfw people unironically think science = empirical science
>>
>>60199713
The idea is that you can verify if a recent change broke some fundamental part of your program.
eg. your parser no longer works correctly after you rewrote it, you feed it some test data and expect the correct output, if it's wrong, you know that your program is no longer correct.
>>
>>60199686
i agree unironically, but i try not to give people too much shit about it
>>
>>60199686
Mathematics is not a science at all, and these autistic fucking science cultists need to get over it
>>
>>60199737
thank you, anime poster
>>
>>60199737
>unempirical science
Theology?
>>
>>60199686
What is it? "math science"?
LMAO
>>
File: chen_no.png (48KB, 324x226px) Image search: [Google]
chen_no.png
48KB, 324x226px
>>60199787
>>60199790
https://en.wikipedia.org/wiki/Formal_science
>>
Math can't be a science, there's way too many arbitrary magic numbers just to make equations work.

Who the fuck thought imaginary numbers were a good idea?
>>
>>60199698
>mathematical objects do not exist
I say they do. The only reason to believe otherwise is a desperate attempt to force everything to conform to the empiricist worldview.

>the physical run time, physical memory use, etc., of an implementation is a good deal more concrete than a mathematical object
Those are implementation details. Studying computation means studying the abstract notion of computation, not one possible implementation of it. I could run any program you like just by arranging rocks on a beach or by drawing dots on a giant piece of paper, and the runtime would change according to how quickly I can move. Empirical study of computation is basically meaningless.
>>
MATH DOESN'T REAL
>>
>>60197295
>p2p 4chan console client
what does this mean?
>>
>>60199815
imaginary numbers are just 2-dimensional numbers with a defined relationship between the 2 dimensions. that is, instead of independent X,Y you have R,I with a dependent relationship. this is why they tie closely to sine and cosine, because sine and cosine describe a single shape (a circle) in 2 dimensions. when you think of them this way it's not at all surprising that they model real phenomena
>>
File: oops.jpg (584KB, 2048x1536px) Image search: [Google]
oops.jpg
584KB, 2048x1536px
>>60199078
well guess what just happened
>>
>>60199713
Unit tests make most sense within test driven development. You write the tests for your code before you start developing the code itself, then you develop code that meets the tests (and therefore the requirements)
>>
>>60198993
What about LISP?
>>
>>60199891
>unstable OC and/or faulty memory
>>
>>60199832
>I say they do. The only reason to believe otherwise is a desperate attempt...
the reason to believe otherwise is that we require proof to rationally believe in the existence of things, and no one has proven the existence of platonic objects, a fact that you should be well aware of if really care about this topic. you might as well believe in elves

>I could run any program you like just by arranging rocks on a beach or by drawing dots on a giant piece of paper, and the runtime would change according to how quickly I can move.
exactly. this is exactly why implementation matters, because it affects real values, such as runtime
>Empirical study of computation is basically meaningless.
if you think minimizing runtime is a "meaningless detail" then i don't have much hope for your future work
>>
>>60199989
>the reason to believe otherwise is that we require proof to rationally believe in the existence of things
Far too many people think that rationally and empirically are synonymous. The existence of platonic objects is self-evident, it doesn't need proof.
>you might as well believe in elves
Elves do exist, in a platonic sort of way. The concept of an elf exists, even if they don't influence the physical world. Just like mathematics.
>exactly. this is exactly why implementation matters, because it affects real values, such as runtime
>if you think minimizing runtime is a "meaningless detail" then i don't have much hope for your future work
That's not the study of computation though, that's a trade skill. It's like saying that the study of fluid dynamics should teach plumbing.
>>
File: fedora not bad.jpg (200KB, 900x822px) Image search: [Google]
fedora not bad.jpg
200KB, 900x822px
>>60200086
jesus christ you are a fucking faggot
>>
>>60199975
seems odd since I've never had a blue screen before. in any case I can't find the memory dump so I guess we'll never know.
>>
>>60199686
Anyone that thinks there is a priori knowledge and that mathematics is a priori is completely retarded and don't know shit about mathematics.

Which is what we expect from the average 4channer.
>>
>>60200086
if the existence of platonic elves is "just like mathematics" and the existence of mathematics is "self-evidence and doesn't need proof," are you implying the existence of all platonic objects is self-evident and doesn't need proof? that's pretty convenient, i bet you can get a lot done that way

>It's like saying that the study of fluid dynamics should teach plumbing.
if you're implying that high-performance implementation is a "solved enough" problem, analogous to plumbing, then you should probably let DeepMind and the US government know so they can hire a plumber to deal with all that exascale computing. they'd save a couple bucks on PhDs
>>
new thread: >>60200231
>>
>>60200168
>4channer
>>
>>60199815
>Math can't be a science, there's way too many arbitrary magic numbers just to make equations work.
Ordinary science has far more of those magic numbers. Far far more.
Coefficient of friction? Magic number.
Mass of a proton? Magic number.
Electronegativity of elemental carbon? Magic number.
Age of the Earth? Magic number.

A lot of the magic numbers in math come down to "hey, we're in a 3D universe, in spatial terms, with one time dimension and an effectively flat geometry". Except for the crazy ones in number theory...
>>
>>60199358
Automate the boring stuff
>>
File: palis.jpg (326KB, 1054x1080px) Image search: [Google]
palis.jpg
326KB, 1054x1080px
>>60193518
Something like this?
>>
Why the fuck is my bash script not working? Bad part:

if [ "$stuScore" = "$profScore"]
then
echo "$stuScore / $profScore Great! Continuing..."
else
echo "$stuScore / $profScore Incorrect. Exiting..."
exit
fi


When I run it:

1000 / 1000 Incorrect. Exiting...

What the fuck?
>>
>>60201163
There is indeed a space after "$profScore" in the if statement. That's a typo not in the code.
>>
>>60201163
>Bash
Who giving knows, what a shit invention.
>>
>>60201163
Fixed it. Dumb variable misnomer.
>>
>>60198819

>Because of above, you then have to heap allocate your polymorphic classes
As opposed to Java, which has to heap allocate everything. In fact, I can't really think of any language which allows stack allocated polymorphic types.

>Or use std::shared_pointer and similar types, which isn't much better.
Or std::unique_ptr. Which really, if you're learning C++ in the current year, you NEED to be intimately familiar with smart pointers and RAII in general.
>>
>>60199166

JS instead of Java as an alternative class offering for the introductory course. They're doing this to evaluate whether or not JS would make a suitable replacement. CS106S appears to be an elective.

>>60199250

>node shit was finally dying off
To be replaced by what?
Thread posts: 330
Thread images: 41


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.