[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: 317
Thread images: 40

File: 2000px-Haskell-Logo.svg.png (36KB, 2000x1412px) Image search: [Google]
2000px-Haskell-Logo.svg.png
36KB, 2000x1412px
What are you working on my dudes?

D edition
>>
>>56408204
First for D
>>
>>56408160
They're both garbage. You don't need a "system" to decouple data from behaviour, that's just procedural programming with structs.
>>
File: meme fizzbuzz 2.png (24KB, 514x323px) Image search: [Google]
meme fizzbuzz 2.png
24KB, 514x323px
First for monads
>>
>>56408281
>unironic Haskell use

ohoho
>>
File: 1472920109121.png (8KB, 600x600px) Image search: [Google]
1472920109121.png
8KB, 600x600px
>>56408281
>>
Which big companies actually use Haslel?

Oh that's right, none of them!
>>
>>56408341
>implying it's Haskell
>>
>>56408359
>implying it's not Haskell
>>
>>56408357
Not an argument
>>
>>56408357
Facebook

And Simon Peyton Jones works at MS Research
>>
>>56408400
He said major company, not micro company
>>
>>56408408

#rekt
>>
>>56408266
procedural programming with structs as conceived in e.g. C/C++ has some serious deficiencies that are widely recognized

the simplest and most grokkable is that arrays-of-structs (a vector of xyz positions) and structs-of-arrays (a struct containing 3 distinct xyz vectors) are not compatible despite representing the exact same data (in row-store vs. column-store form). the rows of the column-stored data are not easily recognizable as structs/classes in C/C++ because structs and classes must be stored contiguously. decoupling the Object data and Object behavior makes it possible to write systems where the data layout is handled by a platform-appropriate manager (for example, the PS3 vastly preferred columns because if its streaming semantics)

this has tremendous performance implications and the Intel compiler for example actually provides extensions to handle this transformation implicitly. these are the same concerns seen in databases and ECS systems strongly resemble databases, whereas first-class programming language data constructs do not (but they really should)
>>
>>56408445
>decoupling the Object data and Object behavior makes it possible to write systems where the data layout is handled by a platform-appropriate manager (for example, the PS3 vastly preferred columns because if its streaming semantics)
struct Position;
struct Velocity;
struct Sprite;

void move(Position *, Velocity);
void draw(Position, Sprite);

You can structure the entities however you want and the actual meat of it (above) doesn't have to change.
AoS:
// doesn't have to be the only entity type, just an example
struct Actor {
Position p;
Velocity v;
Sprite s;
} entities[100];

// can reduce boilerplate with a map function
for(int i = 0; i < 100; ++i) {
move(&entities[i].p, entities[i].v);
}
for(int i = 0; i < 100; ++i) {
draw(entities[i].p, entities[i].s);
}

SoA:
struct Entities {
Position p[100];
Velocity v[100];
Sprite s[100];
} entities;

for(int i = 0; i < 100; ++i) {
move(entities.p + i, entities.v[i]);
}
for(int i = 0; i < 100; ++i) {
draw(entities.p[i], entities.s[i]);
}
>>
I just posed the following question to one of my classmates:

Write a function which takes the following list as input [1, 2, 3, 4, 5] and returns the list [3, 5, 7, 9, 11] by means of recursion.

He could not solve it, even though it is pretty simple http://hastebin.com/ofufilexew.py. Are people working in the field this retarded?
>>
>no anime image

do you even program bro
>>
File: 1471831638656.jpg (247KB, 1500x1000px) Image search: [Google]
1471831638656.jpg
247KB, 1500x1000px
Do you guys know of any books to get started with modular arithmetic?
>>
>>56408579
He is like a little baby
Watch this
fun :: [Int] -> [Int]
fun xs = map (\n -> 2*n + 1) xs

>>56408603
Haskell is anime
>>
>>56408204
>D edition
>2000px-Haskell-Logo.svg.png
niggawatt
>>
>>56408632
>by means of recursion
>>
>>56408204
Will playing TIS-100 help me later to learn assembly? It's for embedded systems.

This game shouldn't be as fun as it is.
>>
>>56408632
Retard.
fun = map $ \n -> 2*n + 1
>>
>>56408640
map's doing the recursing for me
>>56408649
desu I'm still learning Haskell and still can't get $ to work properly for me ;_;
>>
>>56408649
map $ (+1) . (2*)
>>
>>56408204
Just scrolling through the wikipedia list of algorithms, stopping at everything that looks interesting.

>Haskel-logo
>D edition
okay mate
>>
>>56408670
f $ n = f n

e.g.
f $ a + b
= f (a + b)
>>
>>56408680
True, but point-free has diminishing returns of brevity as a tradeoff for clarity.

>>56408670
In that case, it's equivalent to:
fun = map (\n -> 2*n + 1)

The bigger thing is that you can leave out the xs parameter there entirely due to currying.
>>
>>56408644
I guess it'll get you into the general assembly mindset, but it won't necessarily teach you it since every assembly is different
>>
>>56408579

lmao


def twoplusone(lst):
if len(lst) == 1:
return [2*lst[0]+1]
return [2*lst[0]+1] + twoplusone(lst[1:])

>>
>>56408704
>>56408716
See, I would try something like
fun xs = map $ \n -> 2*n + 1 xs

and it would throw an error every time, but I think I understand now why it wasn't working
>>
>>56408781
ugly as sin
what is this god awful language
>>
>>56408542
1. your actor/entity independent move and draw code (which operates directly on components rather than actors/entities typed "with" those components) is a big chunk of all that an ECS really is. you have a move behavior that's decoupled from the actor data, you don't call actor.move(), you call move(actor.data). that's decoupled.

2. the part that you are missing is that that the way you get data differs between the two cases (entities[i].v versus entities.v[i]), which means if you change the data layout you have to change every accessor. an ECS would abstract this, so you don't have to know the layout

3. systems are game-specific and so game designers are implementors of systems. however, in an out-of-the-box game engine some systems and components associated with them need to be provided (like the render engine, which depends on position data). these preexisting components need to be made accessible to users in a manner independent of their internal implementation

tl;dr all an ECS does is wrap database-like concerns behind a uniform abstraction so that system implementors (who are the users of the game engine) don't depend on them. here is another really hard, database-like concern: some data components are sparse and should be stored in sparse arrays, whereas others are dense and should be stored in dense arrays. this is the kind of thing a system implementor shouldn't have to know about a component to access it (and god forbid you need to join on sparse/dense arrays of components because your system requires "all components with a position and a sprite")
>>
>>56408802
imagine you'd written
map $ (\n -> 2*n + 1) xs

now the compiler sees
map ((\n -> 2*n + 1) xs)

now the compiler tries to apply xs to (\n -> 2*n + 1)
(not what you wanted)
>>
File: 14725643940880.jpg (45KB, 500x390px) Image search: [Google]
14725643940880.jpg
45KB, 500x390px
>>56408808
python
>>
>>56408903
fucking sneks
why do they still post here
>>
>>56408808


def map_recurse(function, inp):

h = function(inp[0])
t = inp[1:]

if len(inp) == 1:
return [h]
return [h] + map_recurse(function, t)



a bit cleaner
>>
>>56408926
that's just as fucking ugly
>>
>>56408926

Which is almost the same solution posted in the link at >>56408579
>>
>>56408810
>2. the part that you are missing is that that the way you get data differs between the two cases (entities[i].v versus entities.v[i]), which means if you change the data layout you have to change every accessor. an ECS would abstract this, so you don't have to know the layout
You can abstract it more (typically with templates or macros) without delving into something doing it for you with runtime overhead.

>3. systems are game-specific and so game designers are implementors of systems. however, in an out-of-the-box game engine some systems and components associated with them need to be provided (like the render engine, which depends on position data). these preexisting components need to be made accessible to users in a manner independent of their internal implementation
No reason to couple that stuff to any sort of entity representation.

>here is another really hard, database-like concern: some data components are sparse and should be stored in sparse arrays, whereas others are dense and should be stored in dense arrays. this is the kind of thing a system implementor shouldn't have to know about a component to access it
This is just a generic abstraction issue, nothing to do with the provision of a built-in "ECS".

>and god forbid you need to join on sparse/dense arrays of components because your system requires "all components with a position and a sprite
The "systems" (presuming you're talking about the procedures) don't know about entities at all, they just take components.
>>
>>56408926
plus this won't work for an empty list
>>
>>56408949

I see, yes that solution is better.
>>
>>56408720
Nice. Works for me. I know the language from TIS is not assembly per se.
>>
Is it bad to learn Python 2 over Python 3?
>>
>>56409275
It's bad to learn Python at all
>>
File: 2016-09-03_21-42-38.png (345KB, 1280x766px) Image search: [Google]
2016-09-03_21-42-38.png
345KB, 1280x766px
Playing with some GLSL. Wonder how long till they remove it.
>>
>>56409297
Forgot link: http://glslsandbox.com/e#35009.0
>>
>>56409297
>>>/pol/
>>
File: Screenshot_2016-09-03_14-46-16.png (1MB, 1919x1079px) Image search: [Google]
Screenshot_2016-09-03_14-46-16.png
1MB, 1919x1079px
>>56409297
Why not just have a cute anime girl?
>>
>>56409318
>>>/cuck/
>>
>>56409343
I don't know how to do it in GLSL.
>>
>>56409275
What is your rationale for learning 2 over 3? Python 3 is a big improvement to the language in terms of consistency and expression. The fact that Python 3 uses UTF-8 also reduces the number of potential headaches with the language.
>>
>>56409293
this
>>
File: Sif.gif (35KB, 230x200px) Image search: [Google]
Sif.gif
35KB, 230x200px
>>56409367
Oh, I thought the Swastika was a background for your editor or something, I wasn't looking close enough
>>
D shillers are multiplying...

Why would one choose D over something like C++ or Rust?
>>
Warehouse System
>>
>>56409396
No, it's a GLSL shader.
>>56409410
D is superior to C++ and I haven't used Rust, but it looks weird.
>>
>>56408649
>>56408680

You guys forgot the input values..

(1..5).map {|i| i*2+1}
>>
>>56409410
Because you don't have a job so things like a stable API aren't important to you
>>
Live shitposting engine. Still beta-ish. https://test.meguca.org/g/282
>>
>>56409432
He said write a function to do it, not do it
>>
>>56409297
glsl looks like total shit
>>
>>56409489
Why? It looks mostly like C.
>>
>>56409452
needs js ;_;
>>
>>56409509
this
>>
Is there anything to learn DX9 HLSL like in those glsl sandbox sites?
>>
>>56409509
Because it's not C. They could just make a few extensions on top of C and keep it backwards compatible but they didn't.
void main? wtf
>>
>>56409509
>asking a question
>answering it yourself
>>
>>56409540
Why would you learn DirectX at all?
Why not OpenGL?
Why not Vulkan?
And why the fuck would you learn obsolete version of DirectX?
>>
>>56409556
why not
>>
>>56409553
>implying C looks bad
>>56409549
Why would GLSL be backwards compatible with C?
>>
>>56409556
this
directx is literally a perpetuated meme that microsoft won't let die
if we got rid of directx we could all be using opengl and nobody would have any issues
>>
>>56409575
>Why would GLSL be backwards compatible with C?
Because it could easily be?
Because C was made as a portable language and they made changes that were not needed?
>>
>>56409569
1. It's proprietary Microsoft API that only works on Microsoft products.
2. The competition (OpenGL and Vulkan) works on all major desktop OSes, game consoles, mobile phones and in web browsers.
3. It's more ugly (it has tons of functions taking structures with typedefs 100 characters long).
4. It's obsolete.
>>
>>56408649
OH MY GOD this completely aesthetic revision which has no impact on performance and a negative impact on readability is SO MUCH BETTER

why are husklel users such little faggots? all they care about is that their code looks pretty
>>
>>56409549
C lets you do a lot of things that are not possible on the GPU, certainly not when GLSL was introduced.
>>
>>56409343
Hi Chris.
>>
>>56409617
>wanting ugly code
you must be an ugly person
>>
>>56409516
WASM soon, but otherwise there is no other way to implement this right now. Not that statically typed JS without any framework memes is slow by any margin and the code is FOSS and source-mapped, if you are concerned about spying or something.
>>
>>56408917
There's nothing wrong with Python

>>56409632
Hello
>>
>>56409617
>negative impact on readability
Maybe if you don't know the language, and why should I care if you don't?
>>
>>56409628
>C lets you do a lot of things that are not possible on the GPU, certainly not when GLSL was introduced.
Such as?
>>
>>56409633
you are the definition of a code monkey

off yourself
>>
>>56409611
>Because it could easily be?
Not really, it couldn't.
Sharers don't manipulate pointers. Shaders don't manipulate character arrays. Originally, GLSL didn't even fully support integers.
Both languages have different scopes.
>Because C was made as a portable language and they made changes that were not needed?
What changes that weren't needed? Like new functions useful in shaders? Like vector types to gain access to SIMD on GPUs?
>>
>>56409665
>>56409670
>>
>>56409656
He's right though, map (\x -> 2*x + 1) is better than map $ \x -> 2*x + 1


>>56409669
*antonym
>>
>>56409617
Well yeah, it's going to be unreadable if you don't know the language.
>>56409632
hey bby
>>
>>56409612
>1. It's proprietary Microsoft API that only works on Microsoft products.
This is wrong, the api is public and there are multiple free implementations of it.

>2. The competition (OpenGL and Vulkan) works on all major desktop OSes, game consoles, mobile phones
Just like Direct3d

>and in web browsers.
Doubtful for Vulkan, did they actually try it?

>3. It's more ugly (it has tons of functions taking structures with typedefs 100 characters long).
Have you actually tried OpenGL? It's worse. Also, you included vulkan, where you have to type 10x the amount of code to do the same thing.
>>
>>56409684
>*antonym

code monkeys worry about code, programmers and computer scientists worry about data structures and algorithms
>>
>>56409611
the gpu hardware is very different to cpus, the language has to be far more restricted than C
>>
>>56409700
dx9 is deprecated as fuck, if anything you'd use dx11/12 but you'd be better off with modern opengl or vulkan
>>
>>56409700
>Also, you included vulkan, where you have to type 10x the amount of code to do the same thing.
Same as D3D12, but if you don't understand the reason for this you need to kill yourself.
>>
>>56409670
>Sharers don't manipulate pointers
And?

>Shaders don't manipulate character arrays
They do manipulate arrays however.

>Originally, GLSL didn't even fully support integers.
Citation needed.

>What changes that weren't needed?
Many, such as the lack of goto or void main.

>>56409676
Does not really help.
>>
quit hatin bro haskell code looks awesome on my riced out desktop LOL
>>
>>56409743
C has pointers as an integral feature. GLSL has no need for pointers as GPUs cannot utilize them.
>>
>>56409704
>code monkeys worry about code
No, they don't. That's why they're code monkeys. They just stream out endless wastes of mindless characters.
>>
>>56409743
gpus have limited support for branching
>>
>>56409707
>the gpu hardware is very different to cpus, the language has to be far more restricted than C
How so? I am pretty sure that every feature that C requires in a freestanding environment can be implemented on GPUs.
>>
>>56409748
>C has pointers as an integral feature
Yes, and?

> GLSL has no need for pointers as GPUs cannot utilize them.
I fear that you do not understand how pointers work. You do not need to access random addresses, you would only need to be able to access certain objects that you defined, something that could be implemented.
>>
>>56409700
>This is wrong, the api is public
I haven't said it's not publicly available, but that it's proprietary.
>and there are multiple free implementations of it.
Such as?
>Just like Direct3d
What? Direc3D only works on Windows (doesn't on GNU/Linux, OS X and FreeBSD), and Xbox (not on Sony's or Nintendo's consoles), only on Windows Phone (that's like 5% of smartphones) and probably on Ie/Edge (Not Firefox or Chrome or Safari).
>Doubtful for Vulkan, did they actually try it?
I don't know, not yet probably.
>Have you actually tried OpenGL?
Yes.
>It's worse.
Not really.
>Also, you included vulkan, where you have to type 10x the amount of code to do the same thing.
I could be wrong, but the same is with OGL 3.1+ and D3D 11+. Lower level APIs mean higher performance but harder to code directly.
>>
>>56409753
And?
>>
>>56409756
on modern gpus, THEORETICALLY you probably could, but for example you can't even dynamically access an array in a fragment shader at least not in opengl es 2.0, only uniform arrays in the vertex shader can be accessed with a dynamic array index
>>
>>56409773
>you would only need to be able to access certain objects that you defined, something that could be implemented.
You don't need pointers for that, and you don't want pointers for that as C has no way of distinguishing between a reference to an object and any old address.

More to the point, you can talk about deficiencies of GLSL without going full retard and saying "it should be C with extensions".
>>
>>56409784
go ahead and make your C for gpus then retard
>>
File: 1470046835427.jpg (948KB, 1426x2200px) Image search: [Google]
1470046835427.jpg
948KB, 1426x2200px
I want to make something to bulk rename my files. What's the best approach? A simple bash script is enough? Can I do it with C?
>>
>>56409814
>A simple bash script is enough?
Yes.
>>
>>56409814
GHCi is really good for this
>>
>>56409814
a bash script is enough.
you could use python if you wanted to though
>>
>>56409781
>but that it's proprietary.
What is this supposed to mean then? An API can't be proprietary. Only software can.

>Such as?
Here, some spoonfeeding for you
https://wiki.ixit.cz/d3d9
https://www.phoronix.com/scan.php?page=article&item=mesa_gallium3d_d3d11&num=1

>What? Direc3D only works on Windows (doesn't on GNU/Linux, OS X and FreeBSD)
What a lie, see above.

>Not really.
How convincing. It's actually a nightmare.

>I could be wrong, but the same is with OGL 3.1+ and D3D 11+.
There were a few extensions for that but it was optional.

>Lower level APIs mean higher performance
Lower level shit always means lower performance because the compilers can't optimise them as well. Exactly the reason modern programming languages such as Haskell are better.
>>
>>56409743
>And?
And what? If GLSL was compatible with C, it would have to support pointers.
>They do manipulate arrays however.
So?
>the lack of goto
Arbitrary jumping is hard to implement efficiently in a GPU execution unit, plus goto is mostly useful for getting out of loops and error handling, both of which aren't used in shaders.
>void main
What the fuck is a shader supposed to return? It's return value are transformed vertex coordinates or fragment color/depth.
>>
>>56409831
>Lower level shit always means lower performance because the compilers can't optimise them as well
There's a massive difference between a compiler and a driver. And it's still not "always", it's up to the programmer to do a better job.
>>
>>56409773
Why the fuck would Khronos include pointers in GLSL spec? For what use? To make the implementation harder?

I don't think you wrote a shader in life.
>>
File: [tilting increases].png (27KB, 500x500px) Image search: [Google]
[tilting increases].png
27KB, 500x500px
>>56409831
>Lower level shit always means lower performance because the compilers can't optimise them as well. Exactly the reason modern programming languages such as Haskell are better.
>>
I hate anime weebs.
>>
>>56409831
>>56409861
Also, for instance, Rust is hardly any higher-level than C or C++, but its restrictions still allow the compiler to do a better job optimizing.
>>
>>56409792
>You don't need pointers for that
Ehm... I know? I didn't imply that you did.

>C has no way of distinguishing between a reference to an object and any old address
And this is wrong.

>>56409799
I don't really care about GPUs though.

>>56409841
>And what? If GLSL was compatible with C, it would have to support pointers.
Yes, and it happens to be trivial.

>So?
Exactly as you read. char arrays are a subset of "arrays". There is no reason if you can implement arrays in general that you can't implement char arrays.

>Arbitrary jumping is hard to implement efficiently
It does not need to be efficient however.

>What the fuck is a shader supposed to return?
An int would be fine. It's like they made useless changes like this just to fuck with compatibility.
>>
>>56409297
You got poo'd
>>
>>56409888
>I don't really care about GPUs though.
do you even know what GLSL is and what it's used for you massive buffoon
>>
>>56409872
>Why the fuck would Khronos include pointers in GLSL spec?
So they would not be special snowflakes and break compatibility with C for no reason?
>>
>>56409879
You're on the wrong site buddy
>>
>say something stupid like "GLSL should be an extension of C"
>get called out in every way possible
>double down on your stupidity

>>56409888
>I don't really care about GPUs though.
You're fucking retarded.
>>
>>56409888
>It does not need to be efficient however.
fucking retard kill yourself

>An int would be fine. It's like they made useless changes like this just to fuck with compatibility.
you're just trolling aren't you
>>
>>56409904
There's no reason for GLSL to be compatible with C in the first place.
>>
>>56409900
Nice argument.

>>56409910
>say something stupid like "GLSL should be an extension of C"
And it should

>get called out in every way possible
>double down on your stupidity
I believe that I had logical arguments yet all I get is whining.

>You're fucking retarded.
Just because I do not care about GPUs enough to make a C implementation for them? ok
>>
>>56409831
>An API can't be proprietary.
Of course it can. Meaning, the rights owner controls who implements or uses the API.
>Posting experimental gallium D3D9 tracker
OK.
>What? Direc3D only works on Windows (doesn't on GNU/Linux, OS X and FreeBSD)
It's not a lie you fucking shill.
>How convincing. It's actually a nightmare.
Okay.
>Lower level shit always means lower performance because the compilers can't optimise them as well.
In case of graphics APIs, access to lower level driver objects gives better performance if the developer know what he's doing.
>>
>>56409907

4chan was a mistake
>>
>>56409936
>And it should
everyone in pic related disagrees
>>
>>56409920
>fucking retard kill yourself
Is that supposed to be an argument?

>you're just trolling aren't you
I fear that I can't see how I am wrong.

>>56409931
Easier to implement, there would be no need for each vector to make their own compiler. Instead they could implement a backend on gcc or clang without any extra frontends.

Now, what is the reason for Khronos to be a special snowflake?
>>
>>56409951
you're the special snowflake sperglord
>>
>>56409951
>Easier to implement, there would be no need for each vector to make their own compiler. Instead they could implement a backend on gcc or clang without any extra frontends.
Or they could do the same thing as DirectX and Vulkan and expose an IR instead. IIRC the only reason GLSL is still around is due to some kind of Nvidia lobbying or other politics.
>>
>>56409888
>It does not need to be efficient however.
Yes, shader code has to be efficient.
As I said, you have no clue about GPU programming.
>An int would be fine. It's like they made useless changes like this just to fuck with compatibility.
Uh, that would be like millions of ints, one for each pixel. Who the fuck needs that?
>>
>>56409945
>Meaning, the rights owner controls who implements or uses the API.
Who told you something as retarded as that?

>>Posting experimental gallium D3D9 tracker
>OK.
It works, and it works well. Also I posted a D3D11 implementation.
Also, wine has it's own implementation.

>It's not a lie you fucking shill.
But it IS a lie, see the links I posted above. Don't use the shill meme if you do not know what it means?
>>
>>56409904
GLS isn't and never was intended to be an extension to C. It was intended as a C-like language for programming shader units.
>>
>>56409951
Mesa actually uses LLVM for compiling GLSL. And it doesn't have to be C-compatible for this.
>>
>>56409948
Yeah, there are many members of Khronos, and? Most of these also support diversity in programming, don't you think that it would be extremely retarded if I posted a picture similar to this as a reply to someone arguing that trying for higher diversity ratio in CS is bad?

>>56409963
>the carposter
I should have thought as much.

>>56409971
I was very happy when the IR became a thing. In fact if I am not mistaken I think there were some proposals for gcc and clang to implement it as a backend.

>>56409977
>Yes, shader code has to be efficient.
In that case, don't use goto in shaders. Done! It has nothing to do with goto being implemented or not.

>As I said, you have no clue about GPU programming.
How is this relevant?

>Uh, that would be like millions of ints, one for each pixel. Who the fuck needs that?
Everyone who cares about compatibility.
The compiler could optimise it and handle it as void.

>>56410001
>GLS isn't and never was intended to be an extension to C.
I know, and this was a bad idea.
>>
> see a project in github
> code type it line for line
> understand what happens
Is this what learning is supposed to be?
It's like monkey see, monkey do.
I even think, that this is counterproductive

What do you think, am I overthinking it?
>>
>>56410024
LLVM is not a C compiler. Clang is.
>>
>>56408204
I'm learning C++, I decided to make my first game (a 3d one) without an engine.

I'm not kidding.
>>
File: errorerwr.jpg (91KB, 2054x344px) Image search: [Google]
errorerwr.jpg
91KB, 2054x344px
What does this error mean?
I have no errors in the code, and it compiles perfectly on my desktop.
But when I try and compile it with android, I get an error.

I'm using the LiquidFun and Box2D plugins with LibGDX
>>
File: ferrari f12 12207713_source.jpg (85KB, 640x480px) Image search: [Google]
ferrari f12 12207713_source.jpg
85KB, 640x480px
>>56410031
>the trapfag / sperg who gets incredibly triggered by car
what a surprise, so you're not trolling you're actually this retarded, you're fucking pathetic fag

>>As I said, you have no clue about GPU programming.
>How is this relevant?
HOW ARE YOUR INCREDIBLY RETARDED OPINIONS ABOUT GLSL RELEVANT
>>
>>56409981
>It works, and it works well. Also I posted a D3D11 implementation.
It's nothing. You have to have Gallium in the first place (in practice, using either radeon driver or nouveau). And it's not used in native apps, it's used in wine. It's hardly a native solution. Neither is wine. Also, that leaves OS X.
>>
>>56410031
OK, you win. You're either trolling or retarded. I'll ignore your further posts.
>>
File: 1407551723075.jpg (46KB, 400x400px) Image search: [Google]
1407551723075.jpg
46KB, 400x400px
>>56409831
>Lower level shit always means lower performance because the compilers can't optimise them as well. Exactly the reason modern programming languages such as Haskell are better.
>>
>>56410054
>using java
>>
>>56410053
The first time I attempted to program I dove straight into C++ and DirectX 3D. It took a while, but I understood it fairly well.
>>
>>56410059
>You have to have Gallium in the first place (in practice, using either radeon driver or nouveau).
That should be like over 50% of desktop GNU/Linux users.

>And it's not used in native apps, it's used in wine.
It could be used easily in native applications.

>It's hardly a native solution. Neither is wine
How so?

>>56410074
Quality argument, you sure showed me.
>>
>>56410088
pls no bully
>>
>>56410095
>That should be like over 50% of desktop GNU/Linux users.
Where do you get this statistics? I'd bet on most people using either Intel or proprietary drivers.
>>
You guys can code, but are still retarded.
>>
>>56410054
probably missing a call to System.loadLibrary("something")

you need this to load the dll/so
>>
>>56410125
>You guys can code
i'm stuck on errors all day
so sad i crie so much
>>
>>56410125
>You guys can code
Nope, just me
>>
>>56410133
or maybe it's something with your build path or proguard
>>
>>56410142
And im stuck with a file tree view that loads itself infinitely and don't use the alternative because it looks uglier.
>>
>>56410158
delusional
>>
File: hgjhmh.jpg (175KB, 1136x925px)
hgjhmh.jpg
175KB, 1136x925px
>>56410133
That's what I've been thinking.

Pic related is what I did to setup.

I've tried to do the bottom paragraph, but on Android Studio, despite trying for an hour, I have no idea how to do what it's asking.
>>
File: 1469488610645.jpg (39KB, 640x480px)
1469488610645.jpg
39KB, 640x480px
>>56410085
Exactly!
>>
>>56410211
Weeb
>>
File: 1456948716963.jpg (45KB, 640x480px)
1456948716963.jpg
45KB, 640x480px
>>56410220
>>
I don't know any JS (i do mostly c++/java) , but I figure this should be relatively easy?

For some specific domain, I have a regex: /dev\?id\=(?P<developerID>\d+)/
and I want to find/replace the entire thing with: "developer?id="+myRegex.developerID

Can someone point me to the relevant methods so I don't have to trudge through docs.
>>
>>56410269
This can be done with sed.
>>
File: 1467877203282.jpg (121KB, 350x625px)
1467877203282.jpg
121KB, 350x625px
>>56410142
What's the issue?

>>56410211
>>56410239
Thank you for using anime images
Keep up the good work anon
>>
>>56410204
i use eclipse so not sure about android studio but try this

http://stackoverflow.com/questions/31936254/how-to-set-the-class-path-in-eclipse-and-android-studio
>>
File: 1466945518399.jpg (49KB, 640x480px)
1466945518399.jpg
49KB, 640x480px
>>56410317
Thank anon, you too!
>>
>>56410269
String.prototype.replace()
>>
>>56410317
>>56410350
Anime is for degenerate cucks
>>
Does anyone here have a job earning more than $100k?

didn't think so
>>
File: 1469521512402.png (160KB, 589x675px) Image search: [Google]
1469521512402.png
160KB, 589x675px
I saw these 4 screenshots on /v/. The code doesn't seem THAT bad.

What's wrong with this one?
>>
File: 1472927520149.png (149KB, 828x801px) Image search: [Google]
1472927520149.png
149KB, 828x801px
What's wrong with this one except that he should have used a switch?
>>
>>56410421
Ah, I see the problem

It's not Haskell
>>
>>56410421

l m a o

this is why you should learn to program before you design a game
>>
>>56410239
Fuck off with the girl cartoons you fag
>>
File: 1464113654633.jpg (45KB, 640x480px) Image search: [Google]
1464113654633.jpg
45KB, 640x480px
>>56410409
>>56410446
>>
File: 1472927587745.png (102KB, 828x801px)
1472927587745.png
102KB, 828x801px
OK, this one is the worst, how would you break it down? Not sure if it's meme worthy.
>>
>>56410421
if (Male == false) can be shortened to if(!Male). Same for other such ifs.
>>
>>56410464
You're avatarfagging you goddamn cancer cuck.
>>
>>56410440
Switch only works with integer values. Then again, he shouldn't be doing so much string comparisons but use flags/enums instead.
>>
>>56410465
Very nice meme anon, as for the coding:

1) You could set a boolean that determines whether or not to update the clock
2) It doesn't look like you use all those branches.
if (a) {
if (b) {

}
}
is the same as
if (a && b) {
}
>>
>>56410440
A lookup table seems more appropriate here,
>>
File: 1472927663312.png (227KB, 560x279px)
1472927663312.png
227KB, 560x279px
What's wrong with this one except that again he didn't use a switch?

>>56410472
that's really nitpicking

does it make the program run faster if you do it that way?

>>56410443
are people hating sarcastically?
>>
File: 1450977913739.jpg (39KB, 640x480px)
1450977913739.jpg
39KB, 640x480px
>>56410480
I was under the impression that avatarfagging was posting the same image over and over with slight changes.
>>
>>56410514
>does it make the program run faster if you do it that way?
No.
>>
>>56410288
I want to do it automatically whenever the page is loaded in the browser, but thanks!

>>56410398
I'll tool around with this, hopefully won't take long. Thanks :)
>>
>>56410514
Use a map
>>
>>56408204
I am working on my 20th or so Android app. It will provide ringtones.

I had thought of doing an photo app which can do collages, text inserts, effects, backgrounds, filters and all that junk, but looked at Instagram's, Facebook's etc. and saw it would take a lot of work to make something competitive with them. Maybe if I have some more success with the ones I am doing I'll go back to that.
>>
>>56410514

lmao did you write the program

also a simple lookup table/dict could do the same thing

It's not that the program is going to run faster, it's

a) The fact that the programmer is inexperienced enough to be writing shoddy code
b) The fact that the programmer is wasting time writing out everything when he could be using for example a lookup table
>>
>>56410534
Well, then make a userscript. JS supports regexp replacing.
>>
>>56410536
>Use a map

these aren't my work

I was just wondering why people were screenshotting these because they didn't seem that bad to me except that /v/ has a hate boner for this dev.
>>
>>56410541

20th? What happened to the other 19 out of curiosity?
>>
>>56410581
decouple code from data
>>
>>56410581
>>56410592
plus consider that a map could be loadeddynamically, and thus changed without recompiling
>>
Reminder /g/ that ruby has a code of conduct. You're a cuck if you continue to use ruby. Use non cucked languages like C.
>>
Wait is some sperg seriously mad that GLSL isn't C? What the literal fuck. Apples and oranges.
>>
File: yrrtjrty.jpg (100KB, 973x732px) Image search: [Google]
yrrtjrty.jpg
100KB, 973x732px
>>56410338
I've gotten to here, but the .jar files I want to add aren't there.

I also have no idea what I'm doing
>>
>>56410569
that's what i'm doing
>>
File: mount stupid.jpg (23KB, 600x338px)
mount stupid.jpg
23KB, 600x338px
>>56410689
yeah and he's clueless about gpus and graphics programming
>>
>>56410734
this graphic was drawn by someone at the peak of mount stupid
>>
Job finally set up their email shit correctly so now I get emails like pic related when my schedule gets posted.

Considering writing a script to check my email once a day for a new posting then set up my google calendar and perhaps alarms on my phone for when to wake up in the morning based on work time.

Should be within the realm of my capabilities, when I saw the format of the email I was super excited because it looks very easy to parse
>>
>>56410440
kek
Not even the issue, some styles prefer else if chains rather than switch case.
Assuming that's java, you can't compare objects with ==., since you're just comparing addresses, this includes Strings.
>>
>>56410584
>What happened to the other 19 out of curiosity?

One had a lot of success.

One has done OK. I mostly keep it published as it is a fairly unique utility, there aren't many alternatives available.

I have two newer ones I published this year. I'll see how they do.

Then there's the ringtones one.

One of my apps had over 400,000 downloads, one had over 150,000 downloads. I unpublished both.

The 400,000 one because it was a file manager and I no longer desired to compete. The 150,000 was a game and I don't know how to monetize games.

Basically I take my most successful app (600,000 current installs) as a barometer and if an app isn't making at least hundreds of dollars a month in its maturity I dump it. Not worth my time.

The exception is the aforementioned somewhat unique utility app. I make less than $100 a month on it but leave it up as kind of a public service.
>>
>>56410698
some things you can try

http://stackoverflow.com/questions/16608135/android-studio-add-jar-as-library
>>
>>56410770
>because it looks very easy to parse
of course, as long as it's easy enough to run through printf() you can generally parse it quite easily
>>
>>56410770
>I was super excited because it looks very easy to parse

Are you autisti-
>Jordan

Nevermind.
>>
>>56410853
xDDDDD us desktop bros amirite
>>
>>56409880
>Rust is faster than C++
>>
File: baconnumbers.png (7KB, 787x353px)
baconnumbers.png
7KB, 787x353px
I made a program that creates a histogram of the bacon numbers of actors
(the bacon number of an actor is the degrees of separation from Kevin Bacon, i.e. if an actor was in the same movie it's 1, if he was in a movie with an actor who was in a movie with Kevin Bacon it's 2 etc.; if he has no affiliation with Kevin Bacon it's -1)
Turns out no actor has a bacon number greater than 5 which is evidence for the six degrees of separation theory
>>
Im new to programming and im doing codeacademy java right now. Wondering what do I do after the codeacademy course. Books, videos, anything that could help progress my knowledge?
>>
>>56411198
does this trawl the list of movies the actor has been in (recursively to some fixed depth) till it finds a path, use a preexisting DB of relations or what?
>>
>>56411257
I just use a text file from IMDB I found online that lists movies and the participating actors, create a bipartite graph with that, then use BFS for each actor to find his/her bacon number
>>
>>56411241
javadoc tutorials.
beware tough. loads of enteprise lingo to make java look like soooooooo sophisticated.
That actually belongs to haskell.

>tfw gonna code together with my lil bro in haskell on one laptop to strengthen ou brotherhood. :3
>>
>>56411298
ah yeah, that makes a lot of sense. neat!
>>
>>56411241
CodeEval or Project euler problems are a nice way of getting to know a language.
>>
haskell is deprecated
>>
>>56411351
by GHC
>>
File: trash.png (47KB, 2000x606px) Image search: [Google]
trash.png
47KB, 2000x606px
Why do RDMBSes need to be so tightly coupled with a weird, arbitrary domain-specific language? Why don't RDMBSes support a simple binary protocol for encoding relational algebra queries that languages can wrap with typed, structured libraries?
>>
>>56411351
Haskell's about two decades old and only becoming more popular.
>>
>>56409275
>http://hastebin.com/ofufilexew.py
There's literally no difference between them between like print and print(), which already works on both because they realized how they cucked python2 by doing that. Only main difference is the libraries available.
>>
>>56411301
>>56411333
I'll be sure to check these out. Will I be able to do these with my knowledge of Java through codeacademy? Or will I need to learn a little more befire taking these on?
>>
Starting programming/data science and learning R right now. I dunno if I'm a grandpa for using it but I hope its somewhat useful. Also not sure if Haskell is a meme.
>>
>>56411447
this explains everything:
https://docs.oracle.com/javase/tutorial/

as for the others you'll figure things out as you go along
>>
>>56411474
Everything is a meme except for the programming language and libraries I use.
>>
>>56408953
>You can abstract it more (typically with templates or macros) without delving into something doing it for you with runtime overhead.
Unity does use C# generics in its accessors and I have personally written a column store in C++ with template metaprogramming (it's hard to write one without C++17 features, it's very verbose). But runtime is inevitable if you have a designer-facing DSL or other scripting language that wants to associate data with actors, like Kismet in Unreal. This is a productivity tool that's expected in every AA(A) project, because level builders aren't going to write and compile C++ for an in-engine cutscene, or a light switch, or whatever one-of gadget they want to whip up.

>No reason to couple that stuff to any sort of entity representation.
you need actors anyway for message passing so it's logical to make them consistent

>This is just a generic abstraction issue, nothing to do with the provision of a built-in "ECS".
it's the kind of abstraction that an ECS implements. what do you think an ECS is, aside from queryable storage for components associated with entities?

>The "systems" (presuming you're talking about the procedures) don't know about entities at all, they just take components.
if you have a system that requires multiple associated components (e.g. the render system operates on all entities with a position AND a sprite), then you have to be able to join the position and sprite columns. this is trivial if you're using the bitmask system often seen in ECS tutorials, but in a real system that might e.g. mix sparse columns, dense columns, columns whose type is known at compile time, and columns with runtime type from a script, then you will need to conduct a real database join

personal opinion: ECS are just in-memory databases and in a decade everyone will just be using standard in-memory databases instead of their homegrown solutions. in-mem DBMSs solve a lot of problems C/C++ structs don't
>>
>>56409293
Why is it bad?
>>
>>56411428
>support a simple binary protocol for encoding relational algebra queries that languages can wrap with typed, structured libraries?
sounds like a bytecode for RDBMSes. looks like it's been done before, might be worth looking into this https://en.wikipedia.org/wiki/MemSQL
>>
>>56411474
haskell is pure trash
>>
At my uni it is mandatory to take an fp course (Haskell). Ive heard a lot of bad shit about it. Am I being memed or does it help you even if you don't use functional memery?
>>
>>56411578
*haskell is pure, trash
>>
>>56411534
>>56411578
Is R a meme then? Say I want to get into quant finance or financial research/projection, is it a good language to learn for that? Is it also a good idea to learn multiple languages?
>>
>>56411621
>wtf how dare they make me learn shit
haskell is life
>>
>>56411621
it's actually useful, and if you go into it with an open mind you'll definitely learn some things to apply to your own code and probably end up enjoying the course too.
>>
>>56411652
The only language you will ever need is machine language, since all computers run on it and you can do anything with it. Start learning that.
>>
F# is better than hasklel
>>
Is the best way to get good at programming to start projects of your own or solve predefined problems?
>>
>>56411726
read a lot of code
>>
>>56411726
Nigga just do both.
Predefined problems are good because people who are good at what you are trying to learn came up with them and thus they will probably teach you something valuable if you do them honestly.
Starting projects of your own teaches you how to think and make stuff independently.

Both are very important if you want to git gud, so do both.
>>
>>56411722
>lying
what do you hope to achieve
>>
>>56411652
yes R is fine for statistics and all that jazz and yes learn multiple languages but not shit tier ones like haskell
>>
>>56411549
I also just don't like the SQL language, it is beset with extensions and awkward crufty features. A bytecode for SQL will still have these problems. Why not have a simple bytecode for the core relational algebra operators and call it good?
>>
I am trying to learn Python. I wrote a program that let's you input a price for a meal, it then calculates sales tax, a tip, and a total.

What I want to know, is there a way to get it to run in the command prompt in windows and not close at the end?

Also is there an equivalent of "goto" in python?

Something like:

Start
ask for menu price
calculate tax
add menu price and tax
print tax
print total
goto Start
>>
>>56411045
I didn't say that.
>>
>>56411845
>What I want to know, is there a way to get it to run in the command prompt in windows and not close at the end?
Yes you start it with cmd.
>>
>>56411857
>its restrictions still allow the compiler to do a better job optimizing
what did he mean by this?
>>
>>56411873
Doesn't mean the language itself can be as fast as C++ ~ideally~ can be. Though even that is debatable. However, I imagine that naive, straightforward Rust will perform better than naive, straightforward C++.
>>
>>56411845
>Also is there an equivalent of "goto" in python?
yes, you unlock it by taking a gun, pointing it at your head and pulling the trigger
not many people know this so please don't share this secret
>>
>>56411922
umad
>>
>>56411706
Is this a ruse? Seems like an overly complicated language to be using for statistical analysis. Also thank you and >>56411825
for the advice.
>>
>>56412009
>overly complicated language
Do you want to be a data scientist or not?
>>
>>56411845
while true:
kill_self();
>>
>>56412037
if i repeatedly kill myself, when do i actually die?
>>
>>56412075
Actually you infinitely kill yourself.
>>
>>56412037
>>56412075
>>56412094
GOLD EXPERIENCE REQUIEM
>>
What's the best way to store structured data on C? I'm making a small library that stores config files. I'm thinking of using container and field structs, where containers contain an array of fields and fields have a union containing one of several types of values or a container. This kind of makes accessing the values kind of a pain, since I have to check for whether a field at hand is a container or a value.
>>
Hey guys, C noob coming through.

I'm getting started with debugging programs with GDB, and I have a quick question about notation:

Sometimes, when I am stepping through assembly of a function I wrote, I see output like this:

<myfunction+51>:    mov ...


In this example, "myfunction" is the function that the debugger is in right now.

What, exactly, does the "51" represent?

Is it the number of instructions that I am past the entry point? Is it the number of bytes?
>>
File: 1472694501290.webm (1MB, 720x1280px) Image search: [Google]
1472694501290.webm
1MB, 720x1280px
>>56409814
bash is easier but you can do it with python
https://automatetheboringstuff.com/chapter9/
>>
What's with all the anti-Haskell sentiment in /dpt/ lately?
>>
>>56412148
it's garbage
>>
>>56412145
>tfw no gf to program with long into the night
>>
>>56412180
bf*
>>
>>56412176
well you're garbage too os it fits you
>>
File: sicp.jpg (40KB, 912x561px) Image search: [Google]
sicp.jpg
40KB, 912x561px
Have you done your SICP today?
>>
>>56412145
>rabbit teeth
>smokes
>receding hairline
>ugly af piercings

2/10 would not berry, can't even imagine his mental issues
>>
>>56412253
I don't disagree with your other points, but that doesn't look like a receding hairline to me.
>>
>>56412231
Why read SICP, its such an old book. MIT has full CS courses on OCW for free, which are modern and updated. Someone explain to me pls
>>
File: o0nYdBB.jpg (19KB, 307x536px)
o0nYdBB.jpg
19KB, 307x536px
>>56412253
she's a furry
you forgot that
that's why the TEK split up, Logan wasn't giving Wendell any money, and Wendell wouldn't probably make a big deal out of it but then Logan bought a 10 000 $ furry suit for Pistol and that was the hair that broke the camel's back
>>
>>56412231
What's the point?
I'm serious.
It's obsolete. CS is expanding at a ridiculous rate to the point where if you leave the field for 5 years you might as well learn everything from the start. I ain't got no time to worry about low-level bullshit, especially since there's no reason to.
>>
>>56412299
>CS is expanding at a ridiculous rate

No, monkey webdev javascript electron nonsense is "expanding" (read: bloating) at a ridiculous rate.

CS fundamentals have stayed the same for half a century, with the few exceptions being once-in-a-decade algorithmic breakthroughs.
>>
>>56412331
t. 4chan memer
I was referring to research you shitstain. Machine Learning is a prime example of this.
>>
>>56408781
[2 * n + 1 for n in lst]
>>
File: shiggy samurai.jpg (23KB, 290x324px)
shiggy samurai.jpg
23KB, 290x324px
>>56412299
>sicp
>low level bullshit
>>
>>56409297
haha le funny nazi
>>
File: d1B8Rag - Imgur.jpg (64KB, 603x627px) Image search: [Google]
d1B8Rag - Imgur.jpg
64KB, 603x627px
>>56409297
You don't belong here, stormtard. Go back to your containment board.
>>
>>56412027
So you're saying learn assembly right?
>>
>>56412389
>recursively
>>
>>56412490
def fun(lst):
return list(fun_gen(lst))
def fun_gen(lst, index = 0):
if index < len(lst):
yield lst[index]
yield from fun_gen(lst, index + 1)
>>
How do you know when you're #gud at programming?
>>
>>56412376
t. moron

>says a book about unchanging fundamentals is somehow obsolete
>is told that this is not the case
>"i was talking about research all along"

No, buddy, you were referring to a beginner's book about CS basics, not any kind of research. SICP has nothing to do with machine learning.

Nice backpedalling attempt, though.
>>
>>56408579
Why would you ever use recursion for this?
>>
>>56412299
>low-level bullshit
>SICP
>>
>>56410040
It's not like it's wrong or anything. You're exploring the details of source code you did not write, that's just fine. Now, if you're trying to learn programming concepts, it's better to do it yourself and figure it out rather than look at a (possibly) correct answer online.
>>
>>56412376
>Machine Learning
nice meme
>>
Hey
first time seeing this thread
>taking intro to computer programming
>its fucking amazing
this is literally the best hobby
i want to do this for work
>>
File: 1416017551197.jpg (60KB, 720x710px)
1416017551197.jpg
60KB, 720x710px
>fix bug
>few weeks later
>bug comes back
>look at code
>fix isn't even there
>>
>>56412788
You don't. Once you do it for work you can't do it as a hobby any more.
>>
>>56412881
spooky
>>
File: 1471043192058.jpg (24KB, 300x286px)
1471043192058.jpg
24KB, 300x286px
>>56412881
>fix gets reverted because someone used the bug as a feature
>>
>>56412896
wrong
>>
>>56408680
>>56408716
It feels more readable if you choose different symbols for composition and application.

(*2) -> (+1) => map


Too bad -> and => can't be used.
>>
shaders are a masterrrace tier hobby within programming.
>>
>>56412998
this or graphics programming in general
>>
>use reader monad in personal project
>all the convenience of singletons and none of the downsides
>go to work
>have to use singletons
>it causes problems later
>tfw imperative languages are too impractical to make working code
>>
>>56412971
map $ (*2) >>> (+1)
>>
>>56413047
>be an FP weenie
>get angry about having a job

You should be grateful they even let you in the office.
>>
What are the best languages to learn?
I'm learning C++ right now
is python worth?
>>
>>56413210
C
>>
>>56413210
Racket and Common Lisp
>>
>>56412604
to be fair sicp is not a book about an unchanging reality so much as harold abelson's feelings
>>
File: SICP is a meme.png (6KB, 480x278px)
SICP is a meme.png
6KB, 480x278px
>>56413410

It's also a mega meme
>>
>>56413470
Are you mad because you don't understand it?
>>
Java 7 or Java 8?
>>
>>56413210
C++ and java

avoid python like the plague
>>
>>56413581
It doesn't matter because both are shit.
>>
>>56413741
which one is less shit?
>>
>>56413581
java 7 for better compatibility with older android versions, otherwise java 8 but don't go overboard with the streams meme
>>
New thread, my dudes.
We're about 10 replies away from the bump limit.

>>56413789
>>56413789
>>56413789

>>56413789
>>56413789
>>
>>56413538

I know lisp, though.
>>
>>56412299
>low-level bullshit
hi I can build your abstraction layer very fast front end no bullshit level please contact me at [email protected]
>>
>>56408579

I'm with this guy
>>56412645

The only reason to use recursion here is to show off that you know what recursion is. There's much simpler ways to get that result with a simple map of list comprehension

A function given an array "nums" could simply return...

# Python list comp
[ n * 2 + 1 for n in nums ]

# Python map
list( map(lambda n: n * 2 + 1, nums) )

# Ruby map
nums.map { |n| n * 2 + 1 }

# Perl5 map
map { $_ * 2 + 1 } @nums
>>
>>56412971
>>56413177
The usual spelling for flip ($) is (&), as in ekmett's Control.Lens
>>
is this the best way to see if a string is not empty? what if the beginning and ending character are the same? also why doesnt this example declare the pointer when it's declared "auto"? is it because you can't go auto* it = &s.begin();? I got this code example from a book so just wondering whats going on. I know that it capitalizes the first character.

string s("some string");
if (s.begin() != s.end()) {
auto it = s.begin();
*it = toupper(*it);
}
>>
>>56416604
The fact that it is being dereferenced on the last line should clue you into the fact that .begin() and .end() are pointers.
>>
>>56413797
Dumbass
>>
>>56416604

why dereference tho? why not just go

it = toupper(*it);
>>
>>56416806

i mean
it = toupper(it);
>>
>>56416806
Because it is a pointer. Assigning to the pointer does nothing to the string pointed at.

>>56416814
This makes even less sense. What the fuck are you doing?
>>
>>56412299
>if you leave the field for 5 years you might as well learn everything from the start

wat
>>
>>56417445
he's memeing

>muh machine learning
shit's been taking decades and it's still shit
>>
File: 1323595549415.jpg (34KB, 250x333px)
1323595549415.jpg
34KB, 250x333px
Feel with me /dpt/,

I've been asked to write a fairly simple POS program for a small company, around 50 computers in total.

They're running Win7 on 2GB of RAM on about 90% of these.

Should I bite the bullet and write it in C++? Or could C#/Java run alright with some decent planning?
Thread posts: 317
Thread images: 40


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