[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: 327
Thread images: 36

File: C stella no mahou.jpg (154KB, 1280x720px) Image search: [Google]
C stella no mahou.jpg
154KB, 1280x720px
old thread: >>57285014

What are you working on, /g/?
>>
>>57291269
So basically I want to become a GNOME developer (I have a very precise target to accomplish). So I'm thinking of starting my programming with C.

I do know a bit of a python but that's irrelevant.

Any guide lines?
>>
learning XNA/monogame
>>
>>57285593
No, they aren't.
Not at all.
>>
>>57291312
why would you attempt to do stateful programming in a stateless language?
>>
>>57291325
It isn't necessarily stateful, these work for any monad or applicative
>>
>>57291269
is that game dev anime worth watching?
>>
Would the easiest way to reverse a queue be to use a stack?
>>
>>57291384
array
>>
>>57291355
>anime
>being worth watching
>>
>>57291355
this >>57291467
all anime is worth watching
>>
File: image.jpg (80KB, 656x600px) Image search: [Google]
image.jpg
80KB, 656x600px
>>57291470
>>
>>57291249
Is that the legendary 3D chess?
>>
>>57291269
>What are you working on, /g/?
9D chess
>>
>>57291637
Is that like 1-D chess?
>>
>>57291637
How many time dimensions does your chess game have?
>>
>>57291712
-2.
It has 2 time dimensions, but the time in both of them flows backwards.
>>
>>57291269
I'm working on preserving an old google app engine project which uses an hilarious amount of deprecated APIs.
>>
>>57291269
if ( op.image.IsAnime() == true )
post("Fuck you for watching anime you weeaboo fuck.\n>>>/a/");
>>
>>57291925
How is the IsAnime method implemented?
>>
>>57291938
Trained neural network specially designed to weed out degeneracy
>>
>>57291945
So it's literally a digital Hitler.
>>
>>57291925
> == true
>>
>>57291938
Google image search. If anything referencing Asia comes up, return true.
>>
Is random access REALLY constant time?

When the electrons hit the metal, wouldn't "finding" address 0xFFFFFFFFFFFFFFFF take longer than finding address 0x0000000000000000.

You calculate an address, but it still has to GET there. How does it GET there?

I'm imagining RAM being a train station with 2^64 different platforms. You still have to walk all the way over to the last platform even if you know it instantly.
>>
File: 1476842769869.jpg (107KB, 838x983px) Image search: [Google]
1476842769869.jpg
107KB, 838x983px
>>57291960
Is anyone ever figuratively Hitler?

>>57291972
Suck my dick brah.
>>
>>57291985
Or is it like a tree structure where it starts searching at the least/most significant bit... which makes the access time of 32-bit memory < 64-bit < 128-bit etc. because of the extra steps it has to go through.
>>
Hi /g/ i come to you in my moment of need. I am currently trying to recreate an common api standard working with flask and python but i can't seem to get ahold of my request data.

the api client i am trying to serve sends post requests in json under the application/x-www-form-urlencoded content-type and i can't access the data from request.form in any meaningful manner. I would ideally like to access the json send as a form field name as a python dict so i can easily work with it.

e.g.
if request.headers['Content-Type'] == 'application/json':
apiRequest = request.json
current_app.logger.warning(apiRequest['sid']) '''works'''
elif request.headers['Content-Type'] == 'application/x-www-form-urlencoded':
apiRequest = request.form.to_dict()
current_app.logger.warning(apiRequest.iterkeys().next())
current_app.logger.warning(apiRequest.iterkeys().next()['sid']) '''FAIL'''
'''converting ^ into a dict also fails with this undecipherable error'''
'''ValueError: dictionary update sequence element #0 has length 1; 2 is required'''
>>
>>57292074
to clarify, i can easily extract and parse the json send using the correct content-type but when the client sends it under the wrong content type (which i have no control over) I cant access it like a dict.
>>
>>57291384

Just use a double ended queue and you will never have to worry about this question again.

>>57291733

So you start from a checkmate and have to work your way backwards and sideways until all of the pieces have been put back on the board?
>>
File: 2016-10-29-111932_969x766_scrot.png (137KB, 969x766px) Image search: [Google]
2016-10-29-111932_969x766_scrot.png
137KB, 969x766px
/dpt/-chan, daisuki~

>>57291985
>Is random access REALLY constant time?
No, mainstream memory RAM need to recharge an array line every X times. on-chip cache memory doesn't have that problem since every bit cells has its own power circuit (know as SRAM)

https://en.wikipedia.org/wiki/Memory_timings
https://en.wikipedia.org/wiki/Memory_refresh
https://en.wikipedia.org/wiki/Static_random-access_memory

>>57291985
>You calculate an address, but it still has to GET there. How does it GET there?
A Memory module arranges memory like this

Banks -> Arrays -> Words -> Cells (where one cell = one bit)

The address decoder selects the correct bank, array, word (usually, a word is the smallest addressable unit).
The needed time to a reach a word is the same for every words. (pic)

>>57291384
Yes

>>57291301
https://fna-xna.github.io/

>>57291269
Thank you for using an anime image!!1!
>>
learning lisp was a mistake
>>
>>57292120

which textbook is that
>>
File: image.gif (80KB, 256x256px) Image search: [Google]
image.gif
80KB, 256x256px
>>57292142
kek
>>
>>57292098
if request.headers['Content-Type'] == 'application/json':
apiRequest = request.json
current_app.logger.warning(apiRequest['sid'])
elif request.headers['Content-Type'] == 'application/x-www-form-urlencoded':
apiRequest = request.get_json(force=True)
current_app.logger.warning(str(apiRequest['sid']))
>>
>>57292172
btw its coming along swimmingly. i got login working i got getcategories working i got getfeeds working. just tested it with the client. works brilliantly. few more functions and im nearly home
>>
File: 2016-10-29-113550_856x825_scrot.png (169KB, 856x825px) Image search: [Google]
2016-10-29-113550_856x825_scrot.png
169KB, 856x825px
>>57292155
https://www.amazon.com/Bebop-Boolean-Boogie-Third-Unconventional/dp/1856175073
>>
>>57292202
Not him, but if anyone wants to know more about memory in general:
>http://lwn.net/Articles/250967/
>>
>>57291985

It's O(sqrt(N))
http://www.ilikebigbits.com/blog/2014/4/21/the-myth-of-ram-part-i
>>
Making a new game a Dwarf Fortress clone. Since I am just in the starting out stages which language should I choose. I am leaning towards C++, Rust or GO. Avoiding FPS death that dwarf fortress has is one of my big priorities. The bigger priority is what will help me out further down the line. If Rust for some reason goes belly up like Ruby did, there isn't much reason to learn it.
>>
>>57292279

>what will help me out further down the line
C++
>>
File: 1376813888542.jpg (33KB, 285x281px) Image search: [Google]
1376813888542.jpg
33KB, 285x281px
>>57292292
>Actually telling someone to learn C++
>>
>>57292314
For game development you want something that is reasonably fast and object-oriented.

I tried to do it once in C, but truth be told, C++ is just the better language for those things.
>>
>>57292335
So I have to ask why not Rust then?
>>
>>57292314

It's obvious that Anon is concerned about languages that are going to be used most often in the industry (otherwise, what would it matter if hipsters stop using it). Between C++, Rust, and Go, C++ both has the greatest numerical dominance at the moment, and will likely maintain the greatest numerical dominance in the near to distant future (at least between these three languages. There is an overall shift away from systems languages for many tasks). I don't foresee Rust or Go getting much use for a while except from Mozilla and Google respectively.
>>
>>57292279
>Avoiding FPS death that dwarf fortress has is one of my big priorities
What makes you think choosing a correct language will make you avoid performance issues in this case?
>>
>>57292364
>will likely maintain the greatest numerical dominance in the near to distant future
We'll see in a year or two.
>>
>>57292279
>Avoiding FPS death that dwarf fortress
this has much more to do with the model than the language, i think

>belly up like Ruby did
explain
>>
>>57292386

Well given that I haven't seen too many cases of Go or Rust being used in industry outside of their parent companies (although I've seen plenty of hipster side projects), I am doubtful. Still, it is an industry known for wild changes and random fads. Anything could happen.
>>
>>57292345
Because it's a retarded language to begin with. There has been enough ire flung at Rust to make it seem not quite ready for such things.

>>57292373
Not him, but a lot of languages just love to allocate their memory from the heap, as if it's the only true kind of memory. Even for really small allocations - they don't use alloca or VLAs. they just internally call malloc/free, and that's that.

That does not sound bad, but:
- once you deal with multiple threads the necessary locking in a global userspace list can cause unnecessary slowdowns.
- it's does scale badly quickly.

I remember having debugged an application of mine where a kernel function used to allocate memory from the heap to transfer a small multibyte string into a wide string. Completely unnecessary. But a lot of programmers just don't give a fuck and rather wonder whether ++i or i++ is faster.
>>
File: umaruwp.jpg (112KB, 1920x1080px) Image search: [Google]
umaruwp.jpg
112KB, 1920x1080px
>>57292241
If dat guy wanted to time ram access, he should have mapped the memory as uncached.
Does a cache miss on today intel/amd cpus cost more than an uncached access?
>>
>>57291300
What's your precise target?
>>
>>57292420
Yes. It depends on the cache type (first level, second level, third level), but the minimum amount of cycles such accesses cost are 2 to 3 cycles (not sure about the maximum though). Uncached we are talking about 200 cycles - which causes the current memory line to be loaded into the cache, which evicts the oldest cache line.

And this is not really going to be better in the future. In the past, consoles like the SNES had 6 to 12 cycles per memory access (which was also the reason why, despite having an input clock of ~21 MHz, the actual max speed was more like ~3.5MHz). Because CPUs have become more faster than memory has.
>>
>>57292404
i think go has done okay outside of google. docker is a good advertisement
https://en.wikipedia.org/wiki/Go_(programming_language)#Projects_using_Go

part of mozilla's problem is that they don't have anything to show off. servo is a long way out
>>
>>57292415

>they don't use alloca or VLAs
Like walking on an icy bridge across a lake of lava. Dynamic memory allocation and the stack don't quite mix. That said, it is nonetheless wise to use the stack wherever appropriate, and when using the heap, it should always be an option to store an entire instance of an object inside of another, rather than only being able to store a pointer. This allows object members to be accessed in linear address order, and decreases the number of times memory needs to be allocated or freed.
>>
>>57292498
>Like walking on an icy bridge across a lake of lava. Dynamic memory allocation and the stack don't quite mix.

Well, the most important compilers (VS and GCC) have support for that. And it's not that hard writing your own small function that reverts the stack in case you need to allocate memory in a loop. I gotta know; I did it before.

(Doesn't work on Windows x64 targets though; VS does not support inline assembly, and I don't know how to tell MASM to create a naked function).

And even in the olden days you could increase the stack size of your application if it wasn't enough. They say that you shouldn't do too much on the stack, but while that's still true and valid, I feel like this has lead to the approach where everyone is afraid of using the stack at all, when a stack allocation and reverting it does cost 50 cycles, while using malloc/free can easily cost more than 1000.

Or shorter: everything in reasonable amounts.
>>
>>57292535

>Well, the most important compilers (VS and GCC) have support for that.
The problem is not one of support. The problem is that dynamic stack allocation has the potential for stack overflow. If you know ahead of time an upper bound on how much memory you need, you can simply allocate the maximum amount that you will need. If you don't, you place your code at risk.

>And it's not that hard writing your own small function that reverts the stack in case you need to allocate memory in a loop. I gotta know; I did it before.
And then you are just overwriting the stack memory you just allocated. In this case, you clearly do not need to have a dynamic allocation function at all.

>(Doesn't work on Windows x64 targets though; VS does not support inline assembly, and I don't know how to tell MASM to create a naked function).
As someone who exclusively uses GCC to program on Windows x64 with very few exceptions*, I am laughing at you.

>And even in the olden days you could increase the stack size of your application if it wasn't enough. They say that you shouldn't do too much on the stack, but while that's still true and valid, I feel like this has lead to the approach where everyone is afraid of using the stack at all, when a stack allocation and reverting it does cost 50 cycles, while using malloc/free can easily cost more than 1000.
Here, we get into the realm of being more platform specific, and also, running into a particularly odd problem: the stack tends to grow down on commonly used platforms, not up. At some point you run into the problem where virtual address 0 is supposed to be invalid for safety's sake, and thus, you cannot grow the stack forever as you can with the heap.

>Or shorter: everything in reasonable amounts.
If the amount is reasonable, can you give it an upper bound? If you can, you do not need dynamic allocation. If you can't, then how is it reasonable to use the stack?
>>
>>57292695

Forgot that asterisk I put in there.

*My one exception is my current use of Visual Studio for use with the Windows Driver Framework for a research project. But when writing Windows Drivers, you really ought not to do inline assembly anyways.
>>
rate my 4chan image scraper :))

curl -s 'https://boards.4chan.org/g/thread/57291269' | tr -d '\n' | grep -o 'href="//i.4cdn.org/[a-zA-Z0-9]*/[0-9]*.[^\"]*" target=' | sed 's/^.*\/\/\([^\"]*\).*$/\http\:\/\/\1/g' | sed -n 'g;n;p' | xargs wget -q
>>
>>57292471
but a cache miss is followed by a memory fetch from the ram, it should require more cycle than a straight uncached access, no?
>>
>>57292498
>>57292695
I don't know why you've always been against VLAs. I guess you're just a filthy sepplesfag who tries to come up with excuses for why features that C has but C++ doesn't are bad.
Are you against recursion because it MIGHT cause a stack overflow? Even if it's infeasible? (e.g. stack overflow on a binary tree).
VLAs, like any other feature, can be used dangerously, but under situations where you can reason that it isn't going to be fucking massive, they're safe to use.
>>
>>57292695
>If you know ahead of time an upper bound on how much memory you need, you can simply allocate the maximum amount that you will need.

>what is recursion?

Your approach would more effectively overflow the stack once we are in a recursive function that needs to store a certain amount of data on the stack that cannot exceed a certain size (we made sure of that). Let's say that certain size is 16 KiB. With your approach each call requires 16 KiB + overhead.

Now we use alloca/VLAs, and now we only use the amount of memory that we actually need + overhead.

Also, there is another problem with "just allocating an array" - which is a speed problem. Assuming you only need little amounts of memory, but in two separate arrays, with a static array size this might cause cache at least one eviction if both fixed arrays do not fit in one cache line. With alloca we at least have the change to avoid that - even if one cache line is not that much, it can still matter. I have once written a partition scanner that was supposed to read lost data from a NTFS partition. When declaring a buffer size I decided for one that wouldn't evict my cache constantly, rather than using one that saved kernel calls and saturated the pipeline. And then I benchmarked it against the same problem, but this time with a huge buffer and very few syscalls.

My first approach - the one that honored the cache size - was measurably faster.

>As someone who exclusively uses GCC to program on Windows x64 with very few exceptions*, I am laughing at you.

The last time I checked GCC for Windows the binary images were bloated as hell. Isn't this the case anymore?

>Here, we get into the realm of being more platform specific

That's why I said: everything in reasonable amounts. I am not saying we need to store 1 MiB on the stack, that's ludicrous. But 60 KiB I'd rather have on the stack than on the heap.

>If you can't, then how is it reasonable to use the stack?

I already addressed that one.
>>
>>57292729
rm -rf /

Watch out.
>>
>>57292866

>I guess you're just a filthy sepplesfag who tries to come up with excuses for why features that C has but C++ doesn't are bad.
To be honest, I enjoy both C and C++. But even when using C, I don't use VLAs, because they're a vulnerability waiting to happen. It has nothing to do with language features.

>Are you against recursion because it MIGHT cause a stack overflow?
>Even if it's infeasible? (e.g. stack overflow on a binary tree).
In most cases, recursion can either be reduced to a jump statement by the compiler (tail recursion) or has a clear upper bound on the amount of stack space used (walking a binary tree can never use more stack frames than the number of bits in an address space). In cases where there is no defined upper bound on the amount of stack memory used for recursion, one should not use recursion, and instead use iteration with a heap-based stack.

>VLAs, like any other feature, can be used dangerously, but under situations where you can reason that it isn't going to be fucking massive, they're safe to use.
If you can reason that it isn't going to be fucking massive, you can reason out an upper bound. Whether it's a 4K block or a 2M block of stack space, you can say, "this is the absolute maximum amount of RAM I could possibly use for this use case, and I can prove that it will never go higher." In this situation, VLAs are useless, and you would be better off sparing yourself a register for some other local variable. You just need to allocate a block big enough, constant-sized block of memory on the stack.

If you CAN'T give it an upper bound, and dynamic allocation is necessary, then there is no possible way by which you can claim VLAs are safe, because there will always be a valid input to the program which will cause it to either crash or corrupt memory.
>>
>>57292735
Depends on it. The problem is that this question is hardware-specific, so I'll answer this from a x64 perspective.

Because there are two things that can determine how a CPU knows that a memory access is going to be uncached:

- MTRRs (Memory Type Register Ranges)
- PATs (Page Table Attributes)

The first one is somewhat deprecated because PATs are more flexible. MTRRs are registers inside a CPU that determine what accesses are cached in what matter. For example, if you write to a PCIe device, and the range is not those of control registers, then you want to write-combine everything. For normal everyday programming you want to have things being written-back.

https://en.wikipedia.org/wiki/Write_combining

To come back to your question: the MMU, the Memory Management Unit, needs to know not only the mappings, but also the way the memory needs to be accessed. That needs to be determined even before the memory access is done, because - well, CPU caches. Registers. If a range is uncached, it needs to be fetched directly.

The MMU can determine: Yup, it's uncached, so fetch it directly. Or it can say: Nope, it's cached, use the value in the register/CPU cache. And then the cache is searched for the value, and (since you were asking what is faster, uncached or cache miss) it will not find it and issue a memory read.

To answer your question - based on this model, and from my own, probably incomplete knowledge of those things, I'd say that cache miss is slightly slower than directly uncached - because it might waste a few cycles. And we are just talking a few cycles here.
>>
>>57293011
>a few cycle

lookup in l1
lookup in l2
loopup in l3
miss
instruction paused
fetch from ram
fill cache
look up
resume instruction

vs

fetch from ram
>>
>>57292279
i'll help you out:

the biggest fps hog in DF is the pathfinding (it's 3d, too). here's what you need to do to avoid this:

- run each pathfinding computation on a different thread
- cache the previous pathfinds and only compute the different parts

for the first step, rust will be massively helpful in telling you what you can or can't share between threads. it simply won't compile until it works
>>
>>57292927

>Your approach would more effectively overflow the stack once we are in a recursive function that needs to store a certain amount of data on the stack that cannot exceed a certain size (we made sure of that). Let's say that certain size is 16 KiB. With your approach each call requires 16 KiB + overhead

If function B is non-tail recursive and needs N bytes of stack memory after M calls deep, allocate all of this memory in a single buffer in A, and have A call B with a pointer to that giant stack array.

>The last time I checked GCC for Windows the binary images were bloated as hell. Isn't this the case anymore?

This is somewhat the case still, particularly for C++, since MinGW has to package its own libstdc++. C programs are reasonably fine in size.
>>
how to learn code
>>
>>57293085
become trap
>>
>>57293085
Did you honestly believe you'd get a different response than
>install gentoo
?
>>
>>57293085

Here you go kid, knock yourself out:
https://thepiratebay.org/torrent/9394908/C_Primer_Plus_6th_Edition_Dec_2013
>>
>>57293085
start with code.org
>>
>>57293116

That's a dumb idea. Start with an actual programming language. Get a book or a tutorial, an editor, and a compiler, and start doing the example programs and figuring out how they work.
>>
I've got a tiny website up and running where I want to write experimental web apps. I was thinking of making a simple pixel-art animation. What's the best language to achieve this in?
>>
>>57293147

JavaScript. How the fuck else are you going to animate shit in a browser? Flash is dead.
>>
>>57293146
first you advice a book intended to learn c, not programming, and and now you dismiss scratch as a programming language? k tard
>>
>>57292987
>In most cases, recursion can either be reduced to a jump statement by the compiler (tail recursion)
TCO is not guaranteed. What if you're using a compiler without that optimisations or optimisations turned off?
>If you can reason that it isn't going to be fucking massive
It's more of a case of "I don't expect people to use my program for 4 billion elements". If you want to actually write a program that is designed to work with large amounts of data, you would design it a lot differently than normal, and goes a lot deeper than "VLA vs malloc".
>you would be better off sparing yourself a register for some other local variable
Registers are plentiful. Nobody is going to write code using 20 VLAs simultaneously.
Also, register allocation is hardly something the programmer should be worrying about, as there are all sorts of unpredictable shit (to a mere mortal) that a compiler will optimise out, and you won't have a clue about how the compiler chose to use the registers.

Even then, you don't seem to be aware of the other things that VLAs add to C. It actually does quite a bit to the type system.
void my_fn(size_t n, int array[static n])
{
/* array points to an array of size n and is non-null, otherwise it's a constraint violation */
}

Although that's a somewhat obscure feature, and can apparently lead to more efficient optimisations.
I'm unaware if compilers currently make use of this, though.
>>
>>57293161
Alright mate, no need to get feisty. I'm a relatively new programmer and have only dipped my toes into web dev
>>
>>57293183
>no need to get feisty
This is 4chan, idiot. It would be weirder if his reply wasn't aggressive.
>>
>>57293085
install gentoo
>>
>>57293162

C is a programming language. If you learn C, you will be learning to program.

Scratch, while Turing complete, can hardly be considered a language, and fails to model what programmers will actually be working with in their future careers. You will be typing lines of code in an editor or an IDE, not dragging blocks around. So one might as well start with a language just like that. One could always start with JavaScript or Python, but I think it useful for students to learn the language which all of these tools are built upon, so that as they learn other languages, they can explore their interpreters and get a better understanding of how they tick.

>>57293200

This. I've been on this site since 2006, and you're all starting to become pansies.

Now if you excuse me, it's 5 in the fucking morning and I need sleep.
>>
>>57292866
VLAs are 100% useless.
You cannot recover from errors, so you have to cap the size (or just know it will be fairly small) in which case you can just use a static array with that max cap:
int a[4096];
>>
why cant u allocate an array on the stack and return it from a function?
>>
>>57293335
Because the stack is reverted to the caller's stack frame the moment the function returns.

And now stop asking dumb questions.
>>
>>57293335
Because in C, arrays are not first class objects, and decay into pointers in most situations. When you return an array, you just return a pointer to the start, and as soon as you leave the function, that array becomes invalid.
It's just a design decision in C, that made it easier to implement and not have a bunch of copying.
>>
>>57293352
thanks
>>
>>57293335
You can in good languages.
>>
File: image.jpg (29KB, 549x800px) Image search: [Google]
image.jpg
29KB, 549x800px
Write a Boolean expression that checks whether a given integer is
divisible by both 5 and 7, without a remainder.

static void defineNum()
{
byte userNum = getInput();
testNum(userNum);
}

static byte getInput()
{
Write("Enter a number between 0 and 255: ");
byte val = Byte.Parse(ReadLine());
return val;
}

static void testNum(byte x)
{
WriteLine((x % 5 == 0 && x % 7 == 0) ?
$"Your number {x} is equally divisible by 5 and 7." :
$"Your number {x} is not equally divisible by 5 and 7.");
goAgain();
}

static void goAgain()
{
char? ans = null;
Write("Try another number? (Y/n) ");
ans = Char.Parse(ReadLine());

if (ans == 'y' || ans == 'Y')
{
defineNum();
}
else
{
System.Environment.Exit(1);
}
}

public static void Main(string[] args)
{
defineNum();
}
>>
What would be faster in C++:
1) Use std::map with std::string as key type and search the map for an object
2) Use std::vector and have std::string (which will be unique) as an object member then traverse the vector to find the object
>>
>>57293485
1 is O(log n)
2 is O(n)

Though unless you have a particular reason not to, you should use std::unordered_map instead as its lookups are usually constant.
>>
>>57293485
Measure it.
But if you don't need it sorted you should use unordered_map instead.
>>
File: or gnu+linux.png (35KB, 584x240px) Image search: [Google]
or gnu+linux.png
35KB, 584x240px
>>57293085
install emacs
>>
>>57293559
I use vim, and I am merely 62 KGs (1.78 meters height).
>>
>>57293396
cin >> true;
>>
What are some features you'd like to see in programming languages that you don't usually see?

I'd like more powerful base types with consistent, well-defined operations (Number type, Graph type, State Machine type, Set type), for example, and a separation between semantical relationships (every circle is an ellipse) and syntactical relationships (circle/ellipse problem in OO languages).
>>
>>57293598
We use American units around here, skelly.
>>
File: image.jpg (148KB, 424x640px) Image search: [Google]
image.jpg
148KB, 424x640px
/*
* Write an expression that looks for a given integer if its third digit (right
* to left) is 7.
*/
static decimal getInput()
{
Write("Enter a number between 0 and 65535: ");
decimal val = Decimal.Parse(ReadLine());
return val;
}

public static void Main(string[] args)
{
decimal userNum = getInput();
WriteLine($"Your number is {userNum}");

string userStr = userNum.ToString(),
strNum = userStr[userStr.Length - 3].ToString();

WriteLine( (strNum == "7") ?
$"3rd digit from the right is {strNum}" :
$"3rd digit from the right is not 7");
}
>>
>>57293629
So literally Haskell?
>>
>>57293646
>imperial unit user
>>
>>57293656
how is that literally haskell
>>
>>57291300
> I want to become a GNOME developer
ya need *VALA*
>>
File: NO.jpg (36KB, 352x385px) Image search: [Google]
NO.jpg
36KB, 352x385px
>>57293396
>>57293647
>mixing up algorithm and interface
>>
>>57293629

I'd like a programming language that had an enforced type for height and weight. That would literally blow up if someone tried to use burgerland units.
>>
>>57293646
>what it physics
>>
>>57293598
Thank mr skeltal

>>57293646
Go home, shart in marter
>>
>>57293559
>realDonaldTrump
Wait... did he seriously named his twitter account like that?
...
Real life is a lie
>>
>>57292172
>>57292193
Maybe I'm way out there but maybe urldecode the urlencoded stuff?
>>
>>57293559
What the fug. Vim is literally what the organic tofu eating, tattooed """code artisans""" at web start-ups are all into.

T. Vim user.
>>
>>57293671
addendum: and vala is UTTER trash

source: wrote a music player in vala and killed myself 3 days later
>>
>>57293396
Kindof implies
x % 35 == 0
and reciprocally.
>>
>>57293866
yeah, could've done that just the same. nice spot.
>>
>>57293853
nah they're using atom
>>
>>57293629
gradual typing maybe? I notice they do distinguish the type of terms and the type/class of values which blew my mind at first but makes a shitload of sense...

->
https://www.python.org/dev/peps/pep-0483
>>
Was rewriting my ML framework to the new and improved(TM) datatypes.

But my father called me and now I have get out to him to fix a dryer.
>>
>>57293647
>>57293396
that's some shitty ass code

would've probably been better if you just slapped everything in main rather than using functions the way you're using them, not to mention that you're not checking any of your inputs
>>
I can get all the JetBrains software for free legitimately, is it good?
>>
>>57293910
looks interesting and I'll give it a read later, but could you summarise the idea in a few lines?
>>
>>57293923
Not either of those anons and am new to programming. Care to explain?
>>
>>57293629
Static typing and whitespace dependent scoping.
>>
>>57293629
Type Providers
>>
>>57293249
scratch is being used to introduce people to programming in many universities (harvard, berkeley, ...) but sure, you, the mere anon, know better than those teachers, amiright?
>C is a programming language. If you learn C, you will be learning to program.
c primer plus is more like a manual for c then a introduction to programming. someone who has learned c barely know programming.
>>
>>57293957
The idea is that Python always was and always will be a dynamically-typed language at it's core, but that external static checkers can now be used in addition to validate constraints modeled using types. They kind of work like beautiful static contracts to me. You can say
def sum(seq: Sequence[Integral]) -> Integral:
and linters will mind if users try to pass anything funny to sum, but this has no effect at runtime. At runtime
type(seq) == list
most of the time, a class which doesn't care that it's holding only integrals. You can also have type parameters, (e. g. if your sequence is a sequence of type T I'll yield a sum of type T as long as T is a subtype of Integral), unions (e. g.
if user_wants_an_int(): return 1; else: return "hello"
returns
Union[int, str]
as far as static analysis can tell), typecheck only parts of your code, and a whole lot of goodies depending on which linter you use. It's not mature yet but it makes me wonder.

https://en.wikipedia.org/wiki/Circle-ellipse_problem
>situational classification
aka Duck typing
>>
>>57294070
>know better than those teachers
Implying they're not zombies repeating whatever they learned like mindless parrots..
>>
>>57294094
TypeScript does some of that
>>
>>57294094
pomf
>>
File: keikaku.png (159KB, 600x600px) Image search: [Google]
keikaku.png
159KB, 600x600px
>>57291269
>anime op
>>
File: image.jpg (45KB, 343x499px) Image search: [Google]
image.jpg
45KB, 343x499px
>>57293923
Well they're just answers to programming exercises in a book I'm following so I'm not going overkill with value checking.

>>57293976
His points:
>functions i used weren't absolutely necessary
while true i feel they improve readability.

>you're not checking any of your inputs
this is a valid point, reasons explained above.
>>
>>57294186
pomf
>>
>>57293085
>sacrifice at least 10 years of your life
>abandon friendships, love and social life
>say goodbye to sanity, say hello to anxiety
>neglect yourself, your physical fitness and attractiveness
Hope that helps!
>>
>>57294308
Is there a way to go back?
>>
>>57294210

Diamond Jackson is my ebony milfu
>>
How do I build a make file using MinGW?

I want to build Android.mk and Application.mk inside link related
>https://github.com/finnstr/gdx-liquidfun-extension/tree/master/jni

How do I do this?
>>
File: sefgsghnse45tyhdxbv.gif (917KB, 248x193px) Image search: [Google]
sefgsghnse45tyhdxbv.gif
917KB, 248x193px
I want to be a professional programmer.
But i'm really rubbish at maths.
Is that a problem?
>>
>>57294356
Yes.
>>
>>57294332
goto back;
>>
>>57294356
depends on what you're aiming for
>>
>>57294356
Not unless the actual domain you're programming in is inherently mathematical.
>>
>>57294368
I didn't declare a label back then.
>>
>>57294210
>functions i used weren't absolutely necessary
That's not my point. Functions are good to have, the way you're structuring them is bad. In >>57293396 your functions are just procedures that call other procedures making it harder to follow the program flow.

>while true i feel they improve readability.
In your case I feel like they actually worsen the readability.
>>
>>57294308
Request: Someone put >>57294308 's post
and the post he replied to into a single meme image.
i lack the skills to do so :(
>>
>>57294356
Honestly? No.
>>
>>57294397
error: label ‘back’ used but not defined
>>
>>57294342
Austin, please help me

How do I build a make file using MinGW?

I want to build Android.mk and Application.mk inside link related
>https://github.com/finnstr/gdx-liquidfun-extension/tree/master/jni

I've tried
cd C:\Users\Sam\Desktop\jni - edited
mingw32-make.exe Android.mk

But it doesn't work
>>
>>57294429
>he didnt backup his life
>>
File: Bcbb48cf13.jpg (137KB, 873x1170px) Image search: [Google]
Bcbb48cf13.jpg
137KB, 873x1170px
Python is love, Python is life.
>>
>>57294437

Just call 'make' in that directory and see what happens
>>
>>57294378
um idk, i just want to be able to work somewhere and make games in my spare time.

I want to be good at every language, even Haskell.
>>
>>57294429
You are mixing up warnings with labels.

> warning: label 'back' defined but not used
> error: label 'back' used but not defined

I can't goto back.
>>
>>57294439
>I-I didn't think I would need a backup!
>>
>>57294453
>and make games in my spare time.
okay you'll need math then but only basics like trig and shit

>I want to be good at every language, even Haskell.
you learn paradigms and concepts, not languages
>>
>>57294449
Python is bad and you should feel bad
>>
>Uni project
>need to write an android app
>never programmed android
>haven't programmed for the past 2 years
I'm fucked lads
>>
>>57294453
You got no chance, kiddo.
>>
>>57294475
>never programmed android
>android is programmed in java

You don't even know how many nigger cocks you already have in your butthole, that's how much you are fucked.
>>
>>57294475
pussy
>>
Segmentation fault

How do I fix that?
>>
File: image.jpg (161KB, 480x360px) Image search: [Google]
image.jpg
161KB, 480x360px
>>57294405
> functions should only return a value to main
duly noted senpai. origato
>>
>>57294522
Are you fucking serious?
>>
>>57294472
>Python is bad
why?
>>
>>57294475
Give money and I'll make it for you.
>>
>>57294437
You need the Android NDK to build those things.
https://developer.android.com/ndk/guides/build.html

But have fun setting that up ^)
>>
>>57294533
dynamic typing

slow
>>
>>57294522
gdb program
run
bt full
>>
>>57293728
there was a discussion about language with feature like that after the Mars Climate Orbiter crash
>>
>>57294522
Install an SEH/signal handler, catch it, set instruction pointer to next instruction and keep going.
>>
>>57294549
dynamic typing is great.
>>
>>57293728
F#
https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/units-of-measure
>>
>>57294579
No
>>
>>57294356
>Is that a problem?
No, but it should be.
>>
>>57294579
Dynamic typing is sloppy garbage that only made sense in the twilight period between C and popular statically typed languages with generics and type inference.
>>
File: 1360129151600.gif (3MB, 290x189px) Image search: [Google]
1360129151600.gif
3MB, 290x189px
>2016
>still writing branching code
>>
>>57294617
thank you for confirming that you don't know shit. type inference and generics predate C, you fuck tard.
>>
>>57294642
Quite right. Dynamic Typing was never useful.
>>
>2016
>opinions
>>
How come programming languages usually don't include an exponent operator and instead force you to use library functions?
>>
>>57294642
>popular

I actually took care to qualify the statement that way with the knowledge some wikipedia-accredited sperglord might otherwise interpret that in the dumbest way possible but I guess that didn't stand in your way.
>>
>>57294687
Because they create a dumb distinction between operator and function. GO FORTH
>>
>>57294687
probably because it's not natively supported by most CPU's, so it's better to let the programmer decide what to use instead.

Some languages of course do support them.
>>
>>57294545
Thank you anon, this looks promising.

The quest to edit the native libraries has been long and arduous. I hope I'm nearing the end of my 6 week long adventure.
>>
>>57294687
Because it's not very common operation in general programming.
>>
>>57294687
most of programming languages have an operator. only the retarded c family does not.
>>
>>57294760
>retarded c family
>>>/g/wdg/
>>
>>57294723
>only ever used to do private or at most sergeant programming
>never even touched general programming
fuck my life
>>
>>57294775
do you even know the history of C?
>>
>>57294783
C is for Cookie.
That's good enough for me.
>>
>>57294760
Thanks for Correcting the Record!
>>
>>57294793
>C is for Cookie.
for Cuck
>>
>>57293767
Intentionally, too.
https://twitter.com/donaldtrump
>>
Given that X = X + 1, what is the value of X?

You should be able to solve this.
>>
>>57294840
7
>>
How do I do this in C++?
struct A { std::string a{}; }
struct B { int b{}; };

template <typename T, typename C, ???>
void something(C &c)
{
c[T::???] = 1;
}

A a{};
B b{};

something<A, A::a>();
something<B, B::b>();
>>
>>57294840
∞
>>
File: image.png (162KB, 630x465px) Image search: [Google]
image.png
162KB, 630x465px
>>57294860
you don't
>>
>>57294840
https://archive.rebeccablacktech.com/boards/g/img/0572/81/1477678593879.png
>>
>>57291300
>So basically I want to become a GNOME developer
Fuck the GNOME devs and fuck you if you actually want to be one of them
>>
>>57294887
"a" in this font is retarded
>>
easiest way to iterate through two lists of different objects at the same time and compare fields in those objects?
>>
>>57294910
zip
>>
>>57294925
yeah...would be nice. should have mentioned I'm using Java.

I'm thinking I could maybe do it with streams?
>>
>>57294840
(λf -> (λx -> f (x x)) (λx -> f (x x))) (λx -> x + 1)
>>
File: 2015-12-13_00002.jpg (288KB, 1920x1080px) Image search: [Google]
2015-12-13_00002.jpg
288KB, 1920x1080px
what do you think of this?

it's a hacking game called Hacknet.
One of you must've played it.
>>
Is there better alternative to SDL?
>>
>>57294944
Search for 'java stream zip' genius.
>>
Hurd kernel in Node.JS
>>
Has anyone ever found a satisfactory solution to the "tab is 2 spaces or 4 spaces" problem?
>>
I have a sequence of n signed integers. Suppose Ak is the sum of those integers whose index is less or equal to k, and Bk is the sum of integers whose index is greater than k. I have to find a k so that the abs( Ak - Bk) is the smallest.
Fastest solutions I can think of involve a prefix sum table, which kinda limits me to O(n). Can this be done faster?
>>
>>57295007
sfml
>>
>>57295028
Node.js in Node.js
>>
>>57295030
Yeah, stick to the language default and don't be autistic.
>>
>>57295030
I did.
>tab is 8 spaces, now screw yerself.
>>
>>57295030
>tab
>2 spaces
wow
>>
>>57294877
>
you don't


np, I did it

struct A { std::string a{}; }
struct B { int b{}; };

template <typename T, typename MT, MT T::*member, typename C>
void something(C &c)
{
auto t = new T{};
c[t->*member] = 1;
}

A a{};
B b{};

something<A, std::string, &A::a>();
something<B, int, &B::b>();
>>
>>57295038
>inb4 it turns out to be faster than Node.JS
>>
>>57295030
Here are your options:
>tab to spaces
>don't be autistic
>>
>>57295049
>current year
>not 64 spaces
ishiggydiggy
>>
Where would a Java/Python pleb start if I want to learn C++?
>>
Do y'all think that a peer to peer intranet would be possible to build?

There would have to be some system to instill trust, I was thinking that your program instance acts like a node in a flexible network. A two key system (like PGP) could give you an address for others to connect to, and authorization is just as easy. I dunno.
>>
>>57295028
GNU/Linux operating system with Electron
>>
Why is GTK so retarded? The library has memory leaks and you can't do nothing about it..
>>
>>57295030
Your own code: Pick one and stick to it.
Someone else's code: Use whatever they use.
>>
>>57295186
Coreutils.js
>>
give me something to program to learn C
>>
>>57295314
Make an 18 servo hexapod robot dance along to audio
>>
>>57295314
Implement a memory manager that does not require a global list of chunks, does not issue a system call whenever memory is allocated or released, and is also absolutely lockless in userspace. Supposed to run on Linux and Windows. Oh, and on Windows, you want to at least TRY to not having to copy the data in the memory from the old to the new location if the wanted space is not sufficiently allocatable at the specific memory address.

Good luck with it.
>>
>>57295314
make a 2D SDL game
>>
>>57295364
>>57295369
>>57295375

please guys ive just finish k&r
>>
File: autism-1.jpg (935KB, 2530x759px) Image search: [Google]
autism-1.jpg
935KB, 2530x759px
>>57295369
>>
File: 1470088831446-0.png (378KB, 1450x1080px) Image search: [Google]
1470088831446-0.png
378KB, 1450x1080px
>>57295386
>>
>>57295386
Pussy.

>>57295390
I might be autistic, but I recognize envy when I see it.
>>
>>57295399
whats a tornado text?
>>
>>57295409
Google
>tornado text program
wow that was hard work
>>
File: 1477624183977.png (701KB, 800x600px) Image search: [Google]
1477624183977.png
701KB, 800x600px
got done with a decently complex text-based c# game, which I'm happy with, but now I'm not sure how to go about harder things.

What advice can you guys give me when it comes to progressing my knowledge through practice?
>>
>>57295445
stop worrying about the complexity of your projects but rather focus on creating things you haven't made before. >>57295399
>>
So can somebody tell me what's better?

Monogame or FNA? and why?
>>
File: 100.png (556KB, 515x599px) Image search: [Google]
100.png
556KB, 515x599px
>software engineering assignment to make UML diagrams
>professor says we can use visio for windows and omnigraffle for mac
>email him to ask what about linux
>no response
>>
>>57295642
Kill him, he ain't worth living.
>>
>>57295642
If you are special enough to use linux, you are special enough to find that out your self.
Also, draw.io.
>>
File: file.png (59KB, 869x450px) Image search: [Google]
file.png
59KB, 869x450px
>>57295509
I'm using XNA and it's all right. A little on the featureless side of things though. I imagine FNA is similar. Seriously consider using an engine or you're going to be spending a LOT of time figuring out how basic things work, particularly if you are going the 3d route
>>
>This is a minimalistic and straight to the point guide to assembling a JavaScript stack. It teaches you how to set up ES6, Babel, Gulp, ESLint, React, Redux, Webpack, Immutable, Mocha, Chai, Sinon, and Flow.

simply epic
>>
>>57295675
it's a computer science program. i'm getting a little bit tired of all the windows shit at this school. EVERYTHING is windows. they have a sponsorship deal or some shit. it's infecting the classes too. apparently the database class requires you to have windows installed to use proprietary windows shit
>>
>>57295713
what if you installed gentoo in the school computers?
>>
>>57295713
Don't be such a whiny bitch and deal with it.
>>
>>57295760
Xor yourself, retarded faggot.
>>
File: areyouawizard.png (531KB, 492x638px) Image search: [Google]
areyouawizard.png
531KB, 492x638px
qsort([]) -> [];
qsort([Pivot|T]) ->
qsort([X || X <- T, X < Pivot])
++ [Pivot] ++
qsort([X || X <- T, X >= Pivot]).


It's both beautiful and headache inducing the first time you try to wrap your brain around it.
>>
File: attack.png (59KB, 840x544px) Image search: [Google]
attack.png
59KB, 840x544px
>>57295760
deal with this, shithead
>>
>>57295804
That's not quicksort.
>>
>>57295713
>computer science program
>caring about which operating system you use

I can understand someone in software engineering complaining, but your operating system shouldn't matter if you're a computer scientist.
>>
>>57295820
? It's literally an erlang implementation of the quicksort algorithm.
>>
File: c5f.gif (1MB, 250x250px) Image search: [Google]
c5f.gif
1MB, 250x250px
>>57294780
>>
>>57295642
visual paradigm
>>
>>57295713
>propietary

could you be any more brainwashed by /g/?

Nobody in the real world writes open-source code
Try sitting down and investing 2000 hours in a program and then someone telling you that it should be free for everyone in the world. That just makes your time worthless
>>
>>57295842
A proper quick sort sorts in-place.
>>
>>57295842
Some retarded people think this is not quicksort.
You can see it on stackoverflow too.
They get shown why they are wrong, but still they won't admit it.
>>
>>57295850
could you be any more brainwashed by multinational corp's into using nonfree software that spies on you instead of free versions of it that don't, and are used by more top tech companies on top?
>>
>>57295832
>your operating system shouldn't matter if you're a computer scientist.
That implies being familiar with more than one OS, which his school doesn't provide.
>>
File: just blow my rocket up.jpg (21KB, 327x466px) Image search: [Google]
just blow my rocket up.jpg
21KB, 327x466px
>>57295642
>have to use proprietary bloatware in digital design class
>only works on wangblows and jewbuntu
>>
>>57295856
I don't think you understand what an algorithm is, because it sure has fuck has nothing to do with low level implementation details like that.

It's literally impossible to sort in place in any language with immutable state, anyways, so your implication is that it's impossible to do quicksort in any functional language.
>>
>>57295399
I wonder what I'll work on today.
>>
>>57295007
write your own abstraction nerd
>>
>>57295642
"What's Linux?"
>>
>>57295899
>It's literally impossible to sort in place in any language with immutable state
That just means your language is so limited that you can't even implement a proper quicksort.

> it's impossible to do quick-sort in any functional language.
You can do a quick-sort in Haskell. But you need mutable arrays for that.

Sorting in-place is a key property of quick-sort. It's the key thing that makes quick-sort useful in practice.
Otherwise you could just use a merge-sort, which is both easier to understand and doesn't have the O(n^2) worst-case.
>>
>>57295899
https://augustss.blogspot.de/2007/08/quicksort-in-haskell-quicksort-is.html
>>
>>57294522
Rewrite it in Rust.
>>
>>57295978
>Sorting in-place is a key property of quick-sort.
source?
Wikipedia says otherwise:
>In efficient implementations it is not a stable sort
meaning it doesn't actually seem to be a 'key property'.
Furthermore, this doesn't actually matter too much in functional languages.
>>
Trying to work through Nature of Code in Java. The lack of graphics makes it a bit harder, and i have a C++ assignment about Graphics due next week, so I guess I should do it in C++ instead.
>>
>>57296070
>Wikipedia

What you posted is a deforested tree sort, nothing else.
>>
>>57296070
in-place and stable are not the same thing
>>
have you read your bible today?
>>
Halp! I've started to dream code. And it's not even good code. It's absurd nonsensical code.
>>
>>57296081
> I guess I should do it in C++ instead.
No shit Sherlock.
>>
>>57296092
source?
Also this wasn't me.

>>57296094
Sorry.
Wikipedia:
>Quicksort can operate in-place on an array
It can, but doesn't have to.
If you disagree, provide a source.
>>
File: abstraction.png (1MB, 1200x1198px) Image search: [Google]
abstraction.png
1MB, 1200x1198px
>fp
>>
>>57296109
Can you reproduce it?
Maybe it'll someday be implemented in mind-machine interfaces.
>>
>>57296109
>tfw god has spoken the most magnificent of codes to him but anon is to lame to understand it
>>
>>57296119
>source?
https://www.reddit.com/r/programming/comments/2h0j2/real_quicksort_in_haskell/c2hv1w/

I know, >leddit
Just look at the code.
>>
>>57296081
That book is a sham. I mean it's okay for what it's worth but it spends half of the time talking about graphical representation of things. The author teaches a class on coding at some art college or in some art program, something along those lines. Waste of time.
Half the chapter on neural nets is making an animation to show perceptrons going off.
>>
>>57296109
It's similar to the Tetris effect, it won't help you fix your errors you made last night, but it will help you become more acquainted with the code and help you remember commands.
>>
>>57296135
>tfw god is Pajeet
>>
>>57296156
I know the code.
I want a real scientific source which states that this is not quicksort.
Not some personal blog of some dude.
If you can provide it, I will shut up.
>>
when are we gonna code in binary?
>>
http://wiki.c2.com

what the fuck has ward done
>>
>>57296194
What's wrong?
>>
>>57296193
You can code in binary if and whenever you want to.
>>
>>57296212
look at the source
>>
>>57296230
What if I'm not at my computer?
>>
Heh.

https://github.com/rust-lang/rust/blob/master/src/libcore/num/mod.rs#L423
>>
>>57296235
the web2.0 meme corrupts everything it touches

javascript was a mistake
>>
>>57296241
Then do it on paper. Or the walls. Or even in your mind.
>>
>>57296193
The only time you need to code in binary is when you have to manually input code into your home made computer.

Higher level languages like C and Assembly work much better faster than binary in writing and executing so to answer when am I going to code in binary? Never. When is binary going to become the standard on /g/ or anywhere else? Never.
>>
>>57296247
>using a still born language
>>
>>57291269
Getting some stuff done for my Social Network, so maybe I can launch it in the near future.

I hate Facebook....
You faggots said it would never see the light of day!... but it will. And it will start off ok, and then become pretty cool. And one day, maybe after 8-10 years, make Facebook bow its head in shame as my site takes their head (market share) with its katana (awesome graphical interface, which by that point will have been updated to WebAssembly (because JS is shit, but atm, I need it))
>>
Anyone here have or use an Arduino? I just bought an Uno with an NFC shield and I'm trying to read and write tags, but I don't fucking know what the fuck I'm doing. I have basic C++ knowledge but other than that, I'm a bit lost - is there anywhere where I can learn the syntax for Arduino? Shit like Serial.Print() is new to me. Thanks in advance
>>
>>57296439
Just read through the examples:
https://www.arduino.cc/en/Tutorial/BuiltInExamples
>>
>>57293865
Care to elaborate ?
>>
>>57296485
He ded
>>
>>57296485
i really don't
>>
Making my own OpenVR engine.
Am I retard for not using Unreal?
>>
>>57297051
Is it for learning purposes?
Will it have any actual benefits over using Unreal (good scripting language, minimal Runtime, and/or requirements)?
If so, you are not retarded.
If it doesn't fit those critera, it's useless.
>>
File: ahagon0.jpg (72KB, 729x453px) Image search: [Google]
ahagon0.jpg
72KB, 729x453px
>>57291355
Its a bunch of artfags.
And it's moe garbage that would be shit if not for cute girls. I give it 8/10.
>>
>>57291355
let me show you something better
https://www.dailymotion.com/video/x4lnfpx_eng-160725-irene-game-development-girls-ep-1-web-drama_people
>>
>>57292415
Ada doesn't have this problem
 pragma Restrictions(No_Implicit_Heap_Allocations)
>>
Since it's probably a SQL / VBA programming job i better ask here.
I have a MS Access database with two different tables. One, let's call it table A, holds 2000 rows representing data for questions, this table is the basis for a questioneer.
The other table (B) holds the hook questions with demographic and meta questions. The problem i have is that i want a form that alternately takes questions from both tables:
Question 1 from B and questions 1 to 5 from A, then question 2 from B and questions 6-10 from A and so on,,, you get the idea.
I already looked into MS Access subforms, but the problem is that there is no direct relationship between the two tables, the only thing i image working is that i insert a new row in A linking to the primary key of B.
But i'd imagine it'd be a pain in the ass to insert a row with a number that automatically increments every 5 rows in Excel or Access.
Does anyone know a solution that works with Excel, Access or VBA?
>>
>>57297051
UE4 already has some major fucking performance issues m8
>>
>>57291467
please go back to l eddit friend, this is an anime appreciation website.
>>
is wearing a choker /dpt/?
>>
>>57297605
only if you post pics
>>
>>57297605
only if your dom is a cute boy
>>
>>57297668
tfw no dom
>>
File: cobol-cartoon.png (140KB, 776x1033px) Image search: [Google]
cobol-cartoon.png
140KB, 776x1033px
I may have an opportunity to become a COBOL dev at a large banking/insurance firm through a two year internship.

Will COBOL remain relevant in the coming years or am I wasting my time? I heard a lot of financial organizations are still using COBOL for their core applications and databases and aren't too keen on changing that any time soon.
>>
>>57296439
If you have basic C++ knowledge but a method call is foreign to you, then no, you dont have basic C++ knowledge and you should probably learn some.
>>
>>57297326
I love restriction pragmas.
>>
>>57297605
>>57297661
>>57297668
>>57297702
>>>/lgbt/
>>
>>57298088
thanks for the insightful, relevant (shit)post
>>
>>57292415
How do you personally solve this? Custom allocators? Fixed buffers? Or do you actually see speed improvements from allocating like 5 VLAs on the stack?
>>
File: 1454007278519.png (282KB, 1023x513px) Image search: [Google]
1454007278519.png
282KB, 1023x513px
>>57298088
Get your ass back to Pol, you retarded backwards stormtard. We don't need OR want your bullshit here.
>>
File: 1473506231297.png (247KB, 999x1200px) Image search: [Google]
1473506231297.png
247KB, 999x1200px
>>57298101
Shut up you retard, you can follow him right along in the trip back to that HOVEL known as pol if you like complimenting him so much.
>>
>>57298088
but I'm a girl
>>
File: her shey.jpg (105KB, 1000x1000px) Image search: [Google]
her shey.jpg
105KB, 1000x1000px
>>57298165
>girl
>>
>>57298116
And you fuck off back to >>>/lgbt/ you insufferable faggot, keep your gay ass shit there.
>>
>>57291269
new thread

>>57298229
>>
class Node
{
Node next;
int data;

public Node(int d)
{
data = d;
}


class Node
{
Node next;
int data;

public Node(int data)
{
this.data = d;
}


Are these the same thing? I see the latter more but I want to understand the use and styling behind it.
>>
>>57298483
this refers to anything in the class
>>
std::unique_ptr<Trap> t = std::make_unique<Trap>(snowflake);
>>
main.cxx:39:8: warning: parentheses were disambiguated as a function declaration
[-Wvexing-parse]
Foo f1(Bar());
^~~~~~~
main.cxx:39:9: note: add a pair of parentheses to declare a variable
Foo f1(Bar());
^
( )


>C++
>>
Hey guys, im learning c++ in college and we were asked to make a project, part of it being combining two names together to create a username that was char 1 of name 1, and the entire name 2 attached. The problem is im getting a y symbol appearing randomly, i've tried memset and cin.ignore, what should i try?
>>
>>57296193

we are coding in binary
Thread posts: 327
Thread images: 36


[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.