Visual Studio's GUI can't compile C... only C++... and to compile C, you need to use the cl program, which is great except that school PCs don't have command prompts, so it's effectively impossible to compile C11 on Windows without GCC... what the shit, Microsoft
and to use VS2015, Microsoft makes you sign up / in this is so infuriating, I wish the school computers had an OS that comes with a C compiler like, I dunno, Ubuntu or Arch...
we can go on dance practicing, I dont want to but my mother says you will need it even as programmer. They have balls also.
I disagree with it
So can some programmer and I mean actually programmer who works in some medium or greater firm tell me how it is with dancing ?
How you used it in your li...
What's the recommended amount of code that should be submitted to code review? Becuase, I've considered doing some code review for my crafting game, but my current code is approaching 1000 lines in total.
Simulate a DNA Computer code-golf
DNA computers are very powerful computational models, theoretically able to solve NP-complete problems such as SAT deterministically in polynomial time. Your task in this challenge is to write a program/function that simulates the behaviour of a very simple DNA ...
A few stats about the codegolf.xyz proxy: In the last month, 1719 unique users browsed PPCG using that proxy. A total of 63303 pages were served (~1 GB traffic). Only about 29% of users choose the experimental SSL page. The most active day had 179 users, the least active just 77.
I am not sure about this claim.
Assuming machine learning is part of AI, data science often sees ML as an application of its analysis results (well, I should cite a few books here). The DataScience project is more focused on statistics and modeling, I believe. On the other hand AI is also concer...
Parse a Formal Grammar
Given a context-free grammar, and a string, parse the string using the formal grammar and output the matches for the non-terminals.
Examples
First line is string, following lines are grammar, last line is output, examples are separated by ---
123
n -> any of
0 1 2...
@QPaysTaxes: Yes. a struct is the whole memory making up the struct
(but not things it points to of course, only pointers)
@QPaysTaxes: C or C++ ?
@QPaysTaxes Ok, no smart pointers then. Still, you COULD make it a char* and indeed alloc it, but then you have to track its history and where copies end up to know when to free it. . Or build your program with one of the garbage collector librtaries which makes it easy again
@QPaysTaxes: Yes, though it's conventional to switch the order of level and name (big things first in general leads to less struct padding and accessing level will need no offset)
@QPaysTaxes: Probably meaningless here since you don't worry about 50 mostly useles bytes. But generally it makes structures smaller, causing you to use less memory and have more chance of things fitting in cache
@QPaysTaxes: Sure it's a microoptimization and probably premature
Clear code first. optimization never or later if really needed
If padding doesn't matter I usually put importanbt things first. the reader gets tired if he needs to read a huge list of names and starts skipping..
Hey would stackoverflow.com/q/37018833/1541563 be a good question to transfer to Code Golf? I'm not getting anywhere on SO with it and it's been bugging me for a week now.