[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: 390
Thread images: 18

File: prog.jpg (105KB, 473x496px) Image search: [Google]
prog.jpg
105KB, 473x496px
What are you working on, /g/?

Previous thread: >>61738037
>>
0th for javascript
>>
C++ is a cancer that plagued the software industry with brainlets that
1. Are too dumb for C and actual memory management
2. Too much in denial that they are brainlets and be much better off with garbage like Java
>>
Continue shitting on C++ Pajeets ITT
>>
>>61746568
Wise words, one cannot just refute
Every time I spoke to C++ pajeets they claim C to be too hard. And ironically they shit on Java pajeets thinking they are any (ANY) smarter
>>
File: 1481218514911.png (242KB, 450x450px) Image search: [Google]
1481218514911.png
242KB, 450x450px
Didn't these threads have a pastebin or something for newcomers?
>>
>>61746614
>>51971506
>>
how to program user expandable structures in C?
>>
>>61746607
>C to be hard

But C++ is hardest language out there. It's too large and overbloated with crap features. I honestly don't understand how C++ Pajeets read each other's code.
>>
>>61746614
>newcomers
Not welcome
>>
>>61746568
Oh yes, let's do the function's cleanup with repetition or goto based control flow, at the programmer's choice. Why not write the shitty control flow ourselves when the compiler could do it.
>>
>>61746646
It's called using a search engine
>>
>>61746583
I understand that. To facilitate polymorphism with multiple inheritance in C++ the pointer value to an object may need to be adjusted to point to the correct sub-object.
My question is this - how could interfaces be implemented except as mini sub-objects containing only a vptr which thereby require the same kind of pointer adjustment?

>>61746646
They don't, they just hone their own style.
>>
>>61746658
It makes me feel smart to bash rocks together like a caveman.
>>
>>61746587
The power of """"""modern"""""" C++
LMAO
>>
What web scraping application should I make/host?
>>
>>61746678
Rich coming from people that won't understand the virtue of GC
>>
>>61746684
This hurts a ``modern`` C++ cuck
let numbers_a = [0, 2, 4, 5, 6, 8, 9];
let numbers_b = [1, 3, 5, 7, 8];

let pairs = numbers_a
.iter()
.flat_map(|&a| numbers_b
.iter()
.filter(move |&&b| a < b)
.map(move |&b| (a, b)));

println!("Pairs where a < b:");
for (a, b) in pairs {
println!("{} is less than {}", a, b);
}
>>
Which framework should i use for coding GUI in C? GTK?
>>
File: IMG_1185.jpg (2MB, 1689x2100px) Image search: [Google]
IMG_1185.jpg
2MB, 1689x2100px
>>61746548
I want to git gud. I want to understand it all. Learning data structures currently and also reading on OS's and next will be learning assembly and also picking C up and actually going through with it. Computers are so fucking amazing and I think people really take them for granted or fail to grasp just how fascinating they are. People carry around devices in their pocket a magnitude of times more powerful and memory than pic related. People sometimes cry we were born in a "lame" time of how they wish magic was real but I'd say this is just as cool as runes and magical spells.

What project are you most proud of, anon?
>>
>>61746746
Libui
>>
>>61746746
iup
>>
>>61746736
Looks almost exactly like C++ syntax, so why would it?
>>
>>61746758
>Looks almost exactly like C++ syntax, so why would it?
Really? Can you demonstrate how idiomatic C++ would approach this?
>>
>>61746578
Pajeets are too dumb for C++, they only stick to java.
>>
>>61746772
The very purpose of C++ is and always has been to cater to brainlets that can't do C
>>
>>61746736

Unreadable mess.
>>
>>61746785
Pretty readable to me. Are you missing your public static void abstractBoostFactory class?
>>
>>61746768
To prove to some unemployed virgin that... what?

>Lists would be std::vector.
>iter().flat_map() are std::transform() + a lambda doing what's inside
>pairs is a std::vector of std::pair

Done
>>
>>61746796
Perhaps you mistook Java for C++?
>>
>>61746796
>public static void abstractBoostFactory class
that would be java
>>61746736
This is as bad or worse than the readability of sepples
>>
>>61746548

is there a way to reduce the number of logical comparisons in a simple max function, without just using an array.

max( a, b, c, d )
if a>b & a>c & a>d
then a
elif b > a & b > c & b > d
then b
...
else
then d

>>
>>61746805
Hmm did I somehow make you angry? Is it because you know C++ version will look far worse, right?
I don't blame you, C++ is old and it doesn't have a fair chance
>>
>>61746824
recurse
>>
>>61746813
>Java for C++?
There is no difference
>>
>>61746819
>Boost
>Java
lol
>>
OOP fanatic Pajeets are the worst people on the earth.

>muh OOP and modern hipster (((Patterns)))

Pajeets on my work (C# / ASP.NET MVC) spawn object and class for every fucking request and response and it becomes mess and overbloated code very quick, but they think it looks cool and follows (patterns)
>>
>>61746661
There is no need for the interface to have a method table of its own, when the classes having the interface in common have methods at the same indices.
This doesn't usually click in the head of C++ programmers, because of habits of separate compilation. Computing the method tables (coloring algorithm) supposes some global instantaneous knowledge of the class hierarchy, which means method tables would have to be computed at link time, and potentially updated under dynamic loading.
Only multiple inheritance strictly requires to drop the reference invariant, or the position invariant (require a second vtable indirection).
>>
>>61746642
Well if you don't mind being a bit verbose on the loop:

struct line : public string {
friend istream &operator>>(istream &is, line &line) {
return getline(is, line);
}
};

int main() {
for (auto it = istream_iterator<line>(cin); it != istream_iterator<line>(); ++it)
cout << *it << endl;
}
>>
>>61746827
>screeching, unemployed virgins on 4chan moan about c++
>c++-developers make more money than any other dev using their "deprecated" "too hard" language

lmao
>>
>>61746864
>>61746805
>unemployed
>virgin
>etc etc
Wow I really struck your nerve, haven't I? Why are you trying to avoid posting your dear C++ equivalent to the snippet? I am genuinely interested
>>
>>61746736
Nice over-engineered solution SJW cuck.
#include <cstdio>
#include <initializer_list>

int main(int, const char **)
{
std::printf("Pairs where a < b:\n");
for (const auto &n1: {0, 2, 4, 5, 6, 8, 9}) {
for (const auto &n2: {1, 3, 5, 7, 8}) {
if (n1 < n2) {
std::printf("%d is less than %d\n", n1, n2);
}
}
}

return 0;
}
>>
>>61746881
He's not posting it because it's just going to prove that C++ isn't any ``better`` by the metric he has been going on about
>>
File: makaki.png (40KB, 1620x774px) Image search: [Google]
makaki.png
40KB, 1620x774px
>picrelated

i lost
>>
>>61746899
>std::printf
Aww, is the C++ pajeet using C again?
>>
>>61746943
Not an argument. See yourself out.
>>
>>61746899
No, I was looking for filter, map and iter. How did you miss my point that bad?
>>
>>61746899
> auto
Are you too dumb to specify the type?
>>
>>61746962
http://en.cppreference.com/w/cpp/algorithm/remove
http://en.cppreference.com/w/cpp/algorithm/transform

What's your point?
>>
>>61746956
>dumb sepplesfag can't even use his own language properly
Jesus Christ though
>>
>>61746998
You still aren't posting remove or transform or whatever the fuck C++ calls it.
>>
>>61747000
It achieves the same result using less memory and CPU cycles, while being shorter to write and easier to read.
>>
>>61746992
Type inference is god sent.
>>
>>61747021
For dumb C++ pajeets, sure
>>
>>61747029
oh baby
>>
>>61747021
>Type inference is god sent.
Back to python, faggot
>>
>>61746992
Why don't you complain about the Rust solution as well then? The let statement is just as vague as the auto in both cases.
>>
>>61747021
Why does one need type inference? Are you dumb?
>>
>>61746736
I'm trying to like Rust, I seriously am, but it's so fuckin ugly.
>>
>>61747054
Yup.
>>
>>61747050
>waah why won't you yell at them waa
>>
>>61747058
The point, clearly, was to demonstrate the usage of filter, map etc
>>
>>61747054
I don't like repeating myself.
>>
>>61746736
Wow, this is terrible rust code. Iterators are great, but this is very convoluted.
>>
>>61746736
That's a really dumb way to use map.
>>
>>61747087
I want to see iterators in C++
>>
>>61747085
>dumb
Oh
>>
>>61747096
A range for loop utilizes iterators though.
>>
>>61747112
C++'s range for loop is absolutely retarded, AFAIK they don't even have an enumerator. What a joke!
>>
File: pajeet.png (133KB, 975x586px) Image search: [Google]
pajeet.png
133KB, 975x586px
Sepples and C both fail the pajeet test.
>>
>>61747128
Who cares, it just werks, you nerd.
>>
>>61747143
>C++
>works
>>
>>61747058
> show shit, convoluted code that could be made in 5 lines instead of 20
> see, rust is shit!
This looks like it was done by a Haskell programmer, it's fucking unreadable rust code.
>>
>>61747143
C++ doesn't work.
Heck their standard template library is broken
>>
>>61747150
What, are you too dumb for sepples?
>>
File: flow.png (477KB, 480x480px) Image search: [Google]
flow.png
477KB, 480x480px
What software could we use to simulate pic related and get an empirical solution?

It of course depends on flow rate and viscosity to we could simulate with different values and check possible outcomes.

I'd say A fills first if the flow is high and F fills first otherwise, but I want to actually make a physical simulation through some kind of software.
>>
>>61747162
Considering I can live without RAII hand-holding.. no. Just don't suffer from mental illness that lets you tolerate C++
>>
>>61747162
No one is too dumb for C++, C++ pajeets are too dumb for C
>>
>>61747176
If you can live without handholding, why aren't you writing ASM?
>>
>>61747205
Not portable
>>
>>61747205
ASM is not an alternative to C, you dumb faggot
>>
>>61747211
>C is portable
Nice meme.
>>
>>61747172
h = (Q / A)^2 / (2 * g)
>>
>>61747224
Maybe someday you will join the 3 digit IQ club
>>
>>61747224
C is portable
>>
>>61747096
What does this have anything to do with C++?? You wrote shitty code, and worse - advertising it as idiomatic rust. Go look at actual rust projects.

Just because you have filter and map methods available, doesn't mean sticking them in a solution that doesn't need them.
>>
>modules
>coroutines
>ranges
>concepts
>reflection
>motherfucking METACLASSES

God damn, all this great shit coming to C++. I fucking love being a Seppler. No wonder them other langlets be jelly.
>>
>>61747239
>What does this have anything to do with C++??
It has to do with a language being modern. What's stopping you from posting filter, enumerate and map?
>>
>>61747250
>>modules
every other language had this already
How is it even going tow or>>61747250
?
>>
>>61747250
Welcome to 1990
>>
>>61747250
LMAO C++ pajeets are truely delusional
>>
>>61747250
contracts as well
>>
>>61747250
>Look mom, I'm catching up with LISP
kek
>>
>>61747250
>Modules
>C++
What do you mean?
>>
>>61747292
export import M;
>>
>>61747298
AHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHA
>>
>>61747250

Inb4 modules moved again to C++30, followed by Herb praise during a freaking keynote that some first-timer somewhere actually shipped a C++ app .
>>
File: 1470930284936.jpg (447KB, 800x800px) Image search: [Google]
1470930284936.jpg
447KB, 800x800px
>>61747298
>export import M;
>>
>>61747298
Oh boy C++ is really going down to sewers
>>
>>61747298
Keyword reuse is cancer.
>>
>>61747298
The fuck?
What's wrong with import Path.To.Module?
>>
>C will never ever have modules
lmao
>>
>>61747282
Lisp and C++ programmers can be friends.
C++ and Common Lisp are my personal top languages.
>>
>>61747133
does any language pass this test?
>>
>>61747269
What is your professional experience with C++ to make such conclusions, or you just yet another wannabe who definitely knows which technology is the best for everything?
>>
>>61747358
Lisps, because nobody uses Lisp.
>>
>>61747353
Stop using CL if you have g++ installed in your computer. Fuck off, we're full
>>
>>61747250
C++ is an excellent language for neets. You'll never get bored combining fucked-up features and discovering unintended behavior. Now with a frequent release system is going to be even better.
>>
>>61747361
>tfw your "thisthing.h" will need to export import that which automatically includes "something.h" but kinda introduces conflicting operator overloading
>>
>>61747257
>>61746736

> What's stopping me for using abstractions that I don't need?
Nothing, you'll just make it less readable. I like rust myself, but abstractions are meant to make things easier to read. That's what they are, abstractions.

I'm not saying that the Iterator trait is useless, i'm saying you used it in a convoluted manner.
>>
>>61747375
It's very good for complex projects which require a fast machine code, for example computer games or web-browsers.
>>
>>61747398
Those are C with classes. Unfortunately /g/ NEETs think they will be using C++Unicorntears features in production
>>
>>61747312
>>61747318
>>61747332
>>61747335
>>61747347

I'm not even kidding, unless the spec has changed recently.

https://blogs.msdn.microsoft.com/vcblog/2017/05/05/cpp-modules-in-visual-studio-2017/
>>
>>61747391
>The absolute future of C++ cucks
HAHAHAHAHAHAHAHAHA
>>
>>61747424
>I-it doesn't count!
>>
>>61747424
>Micros**t shit
Even more reason to hate and spit on C++ "programmer"s
>>
>>61747391
Oh boy
lmao
>>
>>61747371
>we're full
Ok that's unfortunate, I'll make sure to get my systems removed from Quicklisp before I leave.
>>
>>61747413
>Source: My ass.
>>
>>61747391
I see the future
>>
>>61747413
True. There's actually nothing matters but speed, scalability and maintainability.
>>
>>61747413
So?
>>
redpill me on rust
>>
>>61747391
This is interesting. C++ will not get rid of legacy C preprocessors and include system
Plus they are adding modules. If you thought C++ isn't a clusterfuck before, now is a good time to think so
>>
>>61747472
Tries to fix C++, becomes more complex than it
>>
File: ameripoop.png (18KB, 420x420px) Image search: [Google]
ameripoop.png
18KB, 420x420px
>RPI's getting dusty

What do I even run on these?

Want to make some sort of automation script but coming up blank
>>
>>61747472
Flavor of the month language with no good learning material. Might become better in the future though, we've yet to see.
>>
>>61747484
Rust did not try to fix C++, it tries to replace it. Written Rust looks nothing like written C++.
>>
>>61747473
>If you thought C++ isn't a clusterfuck before
This is because C++ does not have a vision. It wants to be everything

C++ is like your awkward balding uncle that tries to be cool in your party
>>
>>61747497
It's being going well over a month
>>
>>61747501
This is sad, because C++ occasionally stumbles on a good idea like templates or RAII.
>>
>>61747472
It tries to solve a known problem by introducing the borrow checker and lifetimes but it failed at actually solving the problem (where this would be transparent to the program) and introduced a convoluted syntax that's worse than C++'s garbage templates.
>>
>>61747472
Yet another failed language.
>>
>>61747472
No one uses it in the real world.

People shilling Rust ITT are all jobless.
>>
>>61747497
>no good learning material

what do you mean? there are 2 editions of the book and the reference.
>>
>>61747513
It's a figure of speech.
>>
>>61747501
>HEEEY KOOL BOIZ, I just got streams and transforms etc
>Ayo check out muh CTFE, boi xdDD
>Look look I can do METACLASSES too

It's even more pathetic when you see the implementations that C++ comes up with is half assed embarrassment
>>
>>61747472
I see no reason in the languages which are trying to fill an occupied niche. People are happy with C and C++ there's no reasons in Rust.
>>
>>61747531
They're shit.
Source: I finished the first one and stopped at 50% on the second book.
>>
>>61747531
I said "no good learning material", not "no learning material".
>>
>>61747413
This is from Unreal Engine's source:

template <typename BaseType, typename CallableType>
FORCEINLINE auto DereferenceIfNecessary(CallableType&& Callable)
-> typename TEnableIf<!TPointerIsConvertibleFromTo<typename TDecay<CallableType>::Type, typename TDecay<BaseType>::Type>::Value, decltype(*(CallableType&&)Callable)>::Type
{
return *(CallableType&&)Callable;
}


Does it look like C with classes to you?
>>
>>61747553
No one is happy with C++, pajeet
>>
>>61747553
Rust wants to be memory safe. C and C++ are not.
>>
>>61747564
Is that supposed to be impressive?
>>
>>61747501
It is, but it werks.
>>
>>61747564
Brainlets WILL hate this because they don't understand it.
>>
>>61747575
>it works
>tfw your "thisthing.h" will need to export import that which automatically includes "something.h" but kinda introduces conflicting operator overloading
Yeah no
>>
>>61747472
> Asks /g/
Are you this much of a pajeet instead of just trying it yourself? It's like 5min to just try it.
>>
>>61747472
Pajeets hate it because it doesn't have their "class" keyword
>>
>>61747573
The opposite. Using what the game industry does as some kind of standard is a mistake.
>>
>>61747584
You do realize C++ IS made for brainlets, right?
>>
>>61747564

This looks terrible. HOLY CRAP. Kill Bjorne StrousFag now
>>
>>61747564
kek
>>
>>61747564
Unreal has some shitty code.
>>
>>61747566
Everyone's happy, rajeet. There's only a reasonable choice for such projects as here
https://github.com/id-Software
>>
File: Untitled.png (20KB, 763x261px) Image search: [Google]
Untitled.png
20KB, 763x261px
>>61747573
No, it invalidates other anon's statement where he claims large C++ projects do not use C++ but rather treat it as C with classes. Likewise Chromium/Chrome use things like type_traits and constexpr, far from vanilla C with classes.
>>
>>61747620
What kind of pajeetspeak is that?
>>
>>61747553
>People are happy with C++
Kill yourself, pajeet
>>
>>61747587
What is this? You gave up C++ because of that problem, didn't ya?
>>
>>61747665
>You gave up C++ because of that problem
That's a problem already set in motion

Enjoy your import system hell, sepplesfag KEK
>>
>>61746607
C isn't too hard, it's just overly complicated.
>>
Daily reminder that Rust doesn't have HKTs nor Dependent Types.
>>
>>61747650
Kill yourself, rajeet.

>>61747636
It's ID Software's repository. People are actually do real job, build mathematical models and solve computational challenges using the existing tools instead of jerking off on programming languages as rajeets here.
>>
>>61747683
C is so simple that everything is boilerplatey and errorprone.
>>
>>61747695
If you think C++ is not overly complicated, just what is a protected abstract virtual base pure virtual private destructor and when was the last time you needed one? – Tom Cargill
>>
>>61747683
>>61747704
>>
>>61747282
That's an extremely unfair statement. Everything is catching up to LISP, including most LISPs. I'm still waiting for warnings in other languages.
>>
>>61747675
There is no import system in C++. It's just text substitution.
>>
Are C++ standard inventors active drug users? How do they come up with stuff like this >>61747704
?
>>
>>61747704
What does C++ or that quote have to do with what I said? Did you idiots blow your brains and can now only see in black and white (either Rust or C++ with nothing else)?
>>
>>61747714
f you like C++, you don’t know C++. There’s a mutual exclusion going on here, and I’ve yet to see a counter-example other than possibly a few of the members of the standards committee. – ssylvan in reddit.
>>
>>61747728
Oh, definitely. C++ may not be the worst programming language ever created, but without a doubt it’s the worst ever to be taken seriously. – Mason Wheeler
>>
>>61747544
C++ is a language strongly optimized for liars and people who go by guesswork and ignorance. – Erik Naggum
>>
>>61747732
C++ is far from perfect, but it does it's job. The loads of successful projects such as Chromium are cases in point.
>>
c++ is a pile of crap. – Theo de Raadt
With C++, it’s possible to make code that isn’t understandable by anyone, with C, this is very hard. – Mike Abrash
Whenever I solve a difficult problem with C++, I feel like I’ve won a bar fight. – Michael Fogus
C is C++ without the BS. – SocialPhatology
[keeping somebody] from using C++ makes me feel like I saved a life – aiju
C++ is probably the only language where the error [message] can be longer than the program – aiju
>>
All new features added to C++ are intended to fix previously new features added to C++ – David Jameson
>>
>>61747704
>saying abstract in relation to a class function
>both protected and private
>saying virtual and pure virtual just to pad the quote
Wat
>>
>>61747802
That's so true.
>>
>>61747772
C++ is an insult to the human brain – Niklaus Wirth
>>
>>61747772
Also, Clang.
>>
>>61747802
C++ is a C with advanced structs and templates. All the other features are just syntactic sugar.
>>
writing code the Unix Wayâ„¢
>>
Is it possible to put a constructor function for a struct in itself? I'm trying to make a heap, and I'm wondering if it's possible to have the constructor and destructor functions be stored as function pointers in the heap, or if I have to keep these functions outside the heap.

typedef enum heap_type {
HEAP_CHAR,
HEAP_INT,
HEAP_LONG,
HEAP_FLOAT,
HEAP_DOUBLE,
HEAP_POINTER
} heap_type;

typedef struct heap {
heap_type type;
} heap;

heap *heap_init(heap_type t) {
heap *h = malloc(sizeof(heap));
h->type = t;
return h;
}

void heap_free(heap *h) {
free(h);
}


Would it be possible to have functions like
typedef struct heap {
heap_type type;
struct heap *(*init)();
void (*deinit)();
} heap;
?

I would imagine that C++ (or C-with-classes that was used to create C++) does this to implement objects, but I don't know how

Pic unrelated, I just wanted to draw your attention to my post.
>>
>>61747777
wow anon thanks for pasting these quotes I'm sure no c++ programmer has ever read them. post c++ fqa next
>>
>>61747831
C++ is the only current language making COBOL look good. – Bertrand Meyer
>>
>>61747804
>protected abstract virtual base
An abstract base class with virtual, protected inheritance.
>pure virtual private destructor
The destructor from that class.

And since the destructor is pure virtual and private, it's fucking useless. It's just a bunch of shit thrown together to try to prove a point.
>>
>>61747819
Fucking Pascal is an insult. Fuck off, Wirth, and fuck you for making me suffer through it in both school and university.
>>
how do I into Java machine learning
>>
>>61747854
C++ is history repeated as tragedy. Java is history repeated as farce. – Scott McKay
>>
>>61747844
fink so
>>
>>61746824
You have to read all numbers once to know their values, so O(n) is the best you can hope to get.
max(*args):
t = args[0]
for arg in args:
if(arg > t): t = arg
return arg
>>
>>61747877
Probability theory and elementary statistics as prerequisites.
>>
>>61747877
Java is, in many ways, C++–. – Michael Feldman
>>
Still haven't figured this out. Can any Python wizards help me out?

https://stackoverflow.com/questions/45357884/website-complains-about-disabled-cookies-when-trying-to-log-in-with-python
>>
>>61747861
It has been discovered that C++ provides a remarkable facility for concealing the trival details of a program – such as where its bugs are. – David Keppel
>>
>>61747172
F#
Because F would fill up first.
>>
>>61747911
Hotspot is written in C++, so I guess it's true.
>>
>>61747924
No, you've been brainwashed by CS people who thought that Niklaus Wirth actually knew what he was talking about. He didn't. He doesn't have a frigging clue. - Linus Torvalds

This isn't about sepples at all, I just hate Pascal.
>>
>>61747044
Python doesn't have type inference.
I use it in Java all the time though and it makes me wear out the keyboard a whole lot less.
>>
C++ is like jamming a helicopter inside a Miata and expecting some sort of improvement. – Drew Olbrich
>>
>>61747953
why doesn't java have auto like c++?
>>
The fuck is man supposed to use?
>c
Decent but it's get kind of verbose, also the 3rd party library quality is what it is
>sepples
cluster fuck
>ocaml
Doesn't even support multithreading
>SML
no good implementation, also most don't support multithreading
>ATS
The features look perfect but the syntax is absolutely horrible sepples tier shit
>go
Maybe but then again it uses GC and doesn't even support macros
>chapel
Currently can't even use libraries compiled with it
>swift
Most promising but the platform support is questionable, also fuck everything made by Apple.
>>
>>61747804
>>61747857
C++: glacial compiles, insane complexity, impenetrable errors, laughable cross-platform compat, basically useless tools. – Aaron Boodman
>>
>>61747969

because Java is shit
>>
>>61747971
Rust
>>
>>61747971
OCcaml can't do multicore but it's nice. Use D
>>
>>61747997
even worse than sepples
>>
>>61748000
>GC
>>
>>61748015
If you want GC less programming use C
>>
>>61748028
>No RAII
>>
>>61748038
RAII doesn't work
>>
>>61747971
What do you want to do, exactly?
>>
>>61748047
Works better than calling malloc/free yourself.
>>
>>61747969
It's available via compiler macros.
You have "val" for values that won't change, and "var" for values that can change.

It's been around for years actually. Do people really not know these things?
>>
>#include
>Import
LOL top quality combination, I really hate C++ now
>>
>>61748079
>compiler macros.
Explain?
>>
>>61748071
No it doesn't
>>
>>61748081
Think about it

#include <iostream>
export import valarray
using namespace std;

What's not to like? keke
>>
What if there was a reference counted language but you have a freeLeakedMemory() function which you can call whenever you want which is just like a manual GC
>>
>>61748140
>reference counted language
trash
>>
>>61748140
Make it plain old manual memory management or RAII rather than strictly refcounted and I like it.
>>
If I open a file in C, do I need to close it before my program ends or does the OS take care of that?
>>
>>61748088
You can hook the compiler and have it rewrite the code for you on the fly.

So you don't have to write getters and setters, equals/hashcode, toString and all that shit anymore. You can also annotate resources with @Cleanup to ensure that they get well, cleaned up.

Finally, since java has type inference in the compiler, it can ask the compiler what the type of the rval will be, and use that to set the type of the lval. So you have
val x = new SuperSpecificAbstractBeanFactoryFlywheelProviderBullshit();

instead of
final SuperSpecificAbstractBeanFactoryFlywheelProviderBullshit x = new SuperSpecificAbstractBeanFactoryFlywheelProviderBullshit();


I mean, could you imagine writing java and having to write out all the beans by hand? Jesus, I would have lost the will to live years ago.

But anyway, the java compiler lets you specify code to call when it processes annotations. It's not strictly speaking, documented, but it gives you a macro facility ala lisp, just not as elegant or powerful.
>>
>>61748062
program software
>>
>>61746736
#include <iostream>
#include <vector>
#include <algorithm>

int main(void)
{
int a[] = {0, 2, 4, 5, 6, 8, 9};
int b[] = {1, 3, 5, 7, 8};
std::vector<std::pair<int, int>> pairs;
std::for_each(
std::begin(a), std::end(a),
[&b, &pairs](int lhs)
{
std::vector<int> greater;
std::copy_if(
std::begin(b), std::end(b), std::back_inserter(greater),
[lhs](int rhs) { return lhs < rhs; }
);
std::for_each(
std::begin(greater), std::end(greater),
[&pairs, lhs](int rhs) { pairs.emplace_back(lhs, rhs); }
);
}
);
std::cout << "Pairs where a < b:" << std::endl;
for (auto i : pairs)
{
std::cout << i.first << " is less than " << i.second << std::endl;
}
}
>>
>>61748208

Horrible
>>
>>61748171
The OS cleans up the resources. The only exception to this on Linux are the IPCs.
>>
>>61748208
>std::for_each
Stopped reading right there
>>
>>61747172
It's fucking G.
When water flows from A to B, it won't get past the pipe until B is filled.
B won't get filled past the left pipe as long as C isn't filled up to that pipe.
C won't fill past the bottom pipe until D is filled.
D won't fill at all since there's a fucking gaping hole that dumps everything in G.
>>
>>61748208
Now THIS is the answer I was looking for
>>
>>61748206
Java
>>
File: IMG_7201.jpg (83KB, 736x1040px) Image search: [Google]
IMG_7201.jpg
83KB, 736x1040px
>>61746548
So what is a good language to create a GUI in that can run C source code or external executables.
>>
>>61748272
Learn better English
>>
>>61748271
>requires huge VM
>>
>>61748272
?
>>
>>61748263
The pipe from C to D is blocked, try again.
>>
>>61748263
>D and G are plugged
huh I got rused
>>
File: IMG_1183.jpg (1MB, 1432x1757px) Image search: [Google]
IMG_1183.jpg
1MB, 1432x1757px
>>61746548
How can I make a GUI to model a bidimensional array? For example, something like Conways Game of Life uses a grid of Boolean values, but how would I go about making a graphical representation of that grid? Language is Java btw
>>
>>61747971
C#, it just werks (on Windows)
>>
>>61748365
By reimplementing a JPanel's paint method and drawing directly?
>>
>>61748394
>C#
I value portability and microshit does not provide it.
>>
>>61748363
not cut out for programming
>>
>>61748285
>>61748321
GUI
>>
>>61748406
They do. Or why do you think they aquired Xamarin?
>>
>>61748467
Mono is a joke.
>>
>>61748081

What the fuck did you just fucking say about C++, you little bitch? I'll have you know i wrote 5 compilers in my life and i'm top programmer in United States,
and i've been also involved in numerous secret projects of FBI and i have over 300 confirmed bugfixes in Windows kernel.
I am trained in STL and i'm the top boost user in the world. YOU are nothing to me but just another Pajeet Java programmer, kiddo. I will wipe your sorry ass off the earth in one day, fucker.

As we speak, i'm contacting committee of C++ standartization and we are tracing back your IP address. Did you think you could get away with "smart" comments about C++ over internet?
>>
>>61748401
What
>>
is there other way of rewriting this?
with open("output.jpg", 'wb') as f:
f.write(to_write)
f.close()
>>
>>61748481
it's fast. that's why it's built into game engines, unlike python or JVM
>>
>>61748527
if you use with you don't need to close the file
>>
>>61748566
didn't know that. thanks
>>
>web scrapping in python
>have to do this to get the URL i want in the JSON dict
url = get_dictionary["cached"]["page"][0]["graph"]["media"]["url"]
>>
>>61748566
Automatic cleanup of resources is great.
A perfect reason for C programmers to move on to C++ but they never listen.
>>
>>61748696
They enjoy spamming shitposts more than being productive.
>>
>>61748696
sepples isn't solution to anything and you can just allocate everything to your allocator for one task and once that task is done you can just free the whole allocator.

Do you check for null in every function or do you write some low level functions that just assume that parameres are valid and on higher level manage the null checks?
>>
>>61748767
>what is RAII
>what are references
>>
>>61748808
I'm happy I don't have to deal with them.
>>
Why is Go so popular (according to rankings)? Isn't it just another high level GC'ed language with bad library support compared to Java or C/C++?
>>
Man scala is really slow to compile when you do anything nontrivial
>>
>>61746548
i fapped and managed to put two fingers inside my anus. i feel like i can rewrite linux in pascal right now.


no homo.
>>
>>61747044
>python
>type
>inference
There can only so many things wrong in one single post holy shit
>>
>>61748819
They are the only things which are good about C++
>>
>>61748878
Yeah, well that's your opinion. Your opinion conflicts with over 99% of sepples programmers.
>>
>>61748927
Maybe 99% of the people who post here. Real world C++ devs know what's good and what isn't. Go watch cppcon talks or something so you know what C++ is actually about.
>>
>>61748878
C++ invents them out of necessity. If anything it's more of an indicator that the language is deeply flawed. Only time will tell but I feel like Rust's approach to memory management with linear type system to guarantee deallocation of out of scoped memories is fundamentally better (of the load of devils that is memory management).
>>
>>61749037
Its essentially the same, only C++ lets you use values after theyre moved, and lets you easily create dangling references. Both lead to undefined behavior.

Also Rust uses affine typing; with linear typing you'd have to manually deallocate memory, but the type system would force you to remember to.
>>
>>61748992
>Real world C++ devs know what's good and what isn't.
Except, my "what's good and what isn't" isn't the same as yours. It's a proven fact that no two sepplers agree on which subset of the language belongs to the "what's good", and their joint "what isn't" kinda equals the whole language.
>>
>>61749101
You really have to fuck up to have a dangling reference. Usually it's a sign of a bigger problem.
>>
>>61748290
It's 72 mb.
That's big, but it's not THAT big.
It's smaller than a typical Python 2.7 installation for example. (Python 3 is much smaller mind you.)

>>61748365
https://docs.oracle.com/javase/tutorial/uiswing/components/table.html

Use a table, fill it with data.
Now you have text.

For images, you should get a JPane, set it to use a grid, and fill it with images, or do it even more directly and reimplement the paint method as >>61748401 suggested. But I'd suggest doing it on a java.awt.Canvas to be honest.

If you're using JavaFX the same advice still applies. Just with JavaFX classes instead. Just use animation timer instead to continually draw.
>>
File: wat.png (45KB, 1014x272px) Image search: [Google]
wat.png
45KB, 1014x272px
what do they mean by replacing part of the number?
Two numbers, like the example before or any amount of numbers?
I am retarded lol
>>
>>61749136
>It's 72 mb.
>That's big, but it's not THAT big.
>It's smaller than a typical Python 2.7 installation for example. (Python 3 is much smaller mind you.)

>implying that python also being FUCKING HUGE some invalidates JVM from being also FUCKING HUGE
>>
>>61749110
Ah, yes, I forgot. There are two kinds of C++ devs: the ones that are sane and the ones that think boost is good
>>
>>61749101
Using moved values isn't UB in C++
>>
>>61747971
Go's GC isn't so bad, as long as you don't put too much pressure on it. Get used to reusing memory and check out constructs like Pool.
>>
>>61749177
>run c program
>load library compiled from GO
>load another library compiled from GO
2 instances of shitty GC running and likely it won't work anyways because starting the second one inside the same process crashes the whole program.
Fuck GO.
>>
>>61749147

If it fits on a Iomega ZIP superfloppy, it's not fuckhuge, IMO. It depends on what your constraints are. If you have n megabytes available, and your program is m megabytes large, then anything in the ballpark of n - m is huge.

For me this becomes something like 2gb - 70 mb. (Standard small VM.) Not really something I'd give half a shit about. For you, who're running programs on a gameboy or something like it, it might be enormous.

TL;DR: Give definitions of fuckhuge.
>>
>>61749101
Well it's not essentially the same anymore if C++'s type system doesn't actually enforce memory safety and doesn't reject provably memory buttfucking programs, because that's exactly what I think is the appeal of Rust.
Disclaimer: I haven't even used Rust yet and only read some trivial examples.
>>
>>61749154
s/sane/think they are sane/
>>
>>61749230
>ship application
>don't want to bother people with installing java/python runtime because installing them is fucking pain
>ship application which start at >100MB because you have to ship to whole FUCKING RUNTIME with it
>>
>>61749264
I thought every computer box and its grandmother has java and python installed already.
>>
talking with my code about going open source :)
>>
>>61749298
what is it about lad
>>
>>61749289
Only python2 because I'm running linux.
Nobody has python3/java installed unless they program in python3/java.
>>
>>61749312
Which shit distro doesnt install python3 as the default python package?
>>
>>61749333
>Which shit distro doesnt install python3 as the default python package?
All the ones worth using
>>
>>61749298
>go open source
>another developer forks your project
>does things to your project you could only dream of
>can't look your code in the eye anymore
th-thanks
>>
>>61749289
i have 3 versions of python and 2 versions of java installed. have fun getting the right one in your program.
>>
>>61749347
>go open source
>another developer forks your project
>does things to your project you could only dream of
>decides to profit from it
>he makes $$$ you don't
>
>>
File: 1501578474542.jpg (27KB, 244x264px) Image search: [Google]
1501578474542.jpg
27KB, 244x264px
>>61749347
This is some advanced NTR shit right there
>>
Is it sane to make gui in electron for my c++ lib? There should be some kind of ffi in js I assume
>>
>>61749373
Most distros have some kind of alternatives management in place, which always boil down to (1) use fixed symlink e.g. /use/bin/python and (2) you can update this symlink to point to your preferred default python version (or actually implementations, because apparently Debian and its derivations treat python2 and python3 as different virtual package)
>>
>>61749507
https://github.com/nodejs/nan
>>
>>61749507
Why not use an actual language for your gui
>>
>>61749546
>implying there is a better language for gui than elm
lmaoed a little bit senpai
>>
>>61749519
great, you solved the problem for linux. now solve the problem for windows, android, mac....
>>
I see this place hasn't changed much since the last time I visited.
>>
>>61749590
holy shit

OrdinaryMagician

long time no see
>>
any sql masters here?

using postgres

I have a subquery which is windowing my results into groups, and then in the main query I am selecting the first, second last and last result of each group.
This much is working fine.

i now need to limit it so i only return N of these groups. I can't just LIMIT N*3 because there might only be 1 or 2 results in a group

there's 15 years of results on google about how to select the top N rows of a group but I can't find a single reference how to select the top N groups of a result set.

The only thing I can think of is basically copy pasting the windowing subquery into the where clause and tweaking it to return the Nth distinct entry for my grouping to filter by but this seems pretty inelegant.
>>
I'm wondering about taking unique pointers from a container. For use between threads, like so:

#include <thread>
#include <cstdio>
#include <memory>
#include <vector>
#include <mutex>
#include <chrono>

struct S {
S(int x) : x(x) {}
int x;
};

int main()
{
using namespace std::chrono_literals;

std::mutex mut;
std::vector<std::unique_ptr<S>> vec;
auto arr = { 1, 2, 3, 4, 5 };

std::thread prod([&](){
for (auto e : arr) {
{
std::lock_guard lg(mut);
vec.emplace_back(std::make_unique<S>(e));
}
printf("prod %d\n", e);
std::this_thread::sleep_for(1ms);
}
});

std::thread cons([&](){
for (int i = 0; i < 5;){
{
std::lock_guard lg(mut);
if (!vec.empty()) {
auto p = std::move(vec.front());
vec.erase(vec.begin());
printf("cons %d\n", p->x);
++i;
}
}
std::this_thread::sleep_for(2ms);
}
});

prod.join();
cons.join();
}


Any issues with this?
>>
>>61749590
Nothing happens much these days, but the other day I came accross this shiny new Haskal book that the authors have been hyping to the moon and back since last year: http://haskellbook.com/authors.html

And boy isn't it fucking verbose, like "Thinking in Java" verbose except it's Haskell here so you might not feel as bad (or good) when the author kindly treated you like a retarded subhuman. There are some good information here and there but digging them up from like gucking 3 pages of "This is a nullary constructor, and by the way nullary means null and ary, null means null and ary means arity".

Seriously, fuck that shit. I hate writing blagpost as much as the other anon, but for the sake of my fellow /prog/riders, please DO NOT touch this piece of shit. When is Don Stewart going to write Real World Haskell 2 again?
>>
>>61749611
Are there any other oldfags around?
>>
>>61749672
why would I care about a language with such a poor type system?
>>
>>61749711
Me, I started coming here about 2 weeks ago
>>
>>61749711
oh hey yo dude what's up
[spoiler]I don't know or care who you are and judging by your contribution so far I'm all the better for it[/spoiler]
>>
>>61749730
Because sadly no one uses Idris yet and no, I don't actually need that book, it just caught my interest because of the hype in the Haskal community.
>>
Is it ok to #include .c files? Or is that Bad Practice(tm)?

I am doing a programming challenge and I want to strangle whoever made it, they delayed it by several days and it's still a barely-clear clusterfuck. They provided a .c file that has a function I'm supposed to call and a couple of global variables to store the result (instead of having the function return), and a .h file with the function declaration, and I'm meant to use them from a main.c file.

Alternatively I could change the function signature they so carefully crafted to actually return my stuff. Or is it possible (and ok) to put variables in a header file?
>>
>>61749753
>Idris
why would I care about a language with such a poor type system?
>>
redpill me on dependent types
>>
>>61749808
It's perfectly fine to put variables on headers. Just declaring them, that is.
>>
>>61749841
Ah ok, that might help. It's still convoluted as fuck but at least it will follow what they gave me.
>>
>>61749808
It's bad practice.
Declare the variable with export in the header so the global from the implementation file is linked in.
>>
>>61749835
types that depend on values
>>
why is this person posting with a name?
are they a celebrity?
>>
>>61749808
the preprocessor doesn't care about whether it's a .c or .h file as long as you dont include definitions multiple times
>>
>>61749861
>with export
What
>>
>>61748859
>two fingers
amateur
>>
>>61749895
I got mixed up, it's extern.
In the header
extern int foo;

In the .c file
int foo;

Everything that includes the header will be
>>
>>61749808
#include just literally substitute itself with the text of the included file so you can #include "symta.lisp" if you want to. Of course if it's not a header.h file it's considered ``bad practice'', but it doens't actually do any harm if you just write this shit by yourself.

You can declare variables in header file just fine, but remember to extern them just to be sure, so different source files #including your headers actually refer to the same global-scoped, externally-linkaged variable.
>>
>>61749908
*will be linked against the same foo from the implementation file.
>>
>>61749908
>>61749921
Thanks guys
>>
new thread when? :3
>>
>>61749264
Ignoring that you can slice the VM down, come Java 9, it's just 72 mb. It's not a lot of space. And you just demand that they have it already installed. You don't actually bundle it.

A gigabyte of SSD space costs less than a dollar. You're asking for about a nickel's worth of storage space here, cowboy.
>>
>>61749862
*types that depend on terms that depend on types
>>
Where do I look to start making interactive graphics with C++?
I want to make a graph of -1 to 1 where you can click to plot points.
>>
>>61750079
SDL2, OpenGL
>>
>>61750079
SFML, not SDL
>>
>reading someones java on github
>using

String text = new String("text");


instead of
String text = "text"; 


for what reason?
>>
>>61750115
SFML is trash.
>>
File: 1496392259052.jpg (41KB, 700x698px) Image search: [Google]
1496392259052.jpg
41KB, 700x698px
python
got files and folders in a list
want to sort them by size
folders dont have size, its empty string for them there
files have integer value as size
will I need to do manual task of creating two lists out of the one
then sorting the one with the files and combining it together?

or maybe theres some elegant way to deal with this?
python often surprises me with features...
>>
>>61750135
enterprise
>>
>>61746736

#include <vector>
#include <tuple>
#include <iostream>

int main() {
int numbers_a[] = {0, 2, 4, 5, 6, 8, 9};
int numbers_b[] = {1, 3, 5, 7, 8};

std::vector<std::tuple<int, int>> pairs;
for (auto &a : numbers_a) {
for (auto &b : numbers_b) {
if (a < b) {
pairs.push_back(std::make_tuple(a, b));
}
}
}

for (auto &[a, b] : pairs) {
std::cout << a << " is less than " << b << std::endl;
}

return 0;
}
>>
>>61750115
>recommending hard-to-port, object-oriented garbage
>>
>>61750135
They are kinda different.
new String("text")
creates a new String object in the heap, while the "text" literal is always the same string literal. Since strings in Java are immutable anyway I can't think of any actual reason for that bullshit.
>>
>>61750207
Why would you want to create a new string object on the heap rather than use the literal?
>>
>>61750179
You can just
pairs.emplace_back(a, b);
, m8.
>>
>>61750230
I don't know, may because it's more
ENTERPRISE QUALITY OBJECT-ORIENTATION CODE
?
>>
>>61750230
Java devs have no idea what they're doing
>>
>>61750230
So that you can't
string1 == string2
even though they are both
"JAMES GOSLING SUCKS MY DICK"
I guess
>>
>>61750277
That still doesn't answer my question.
>>
File: OOPs.png (315KB, 1680x740px) Image search: [Google]
OOPs.png
315KB, 1680x740px
Daily reminder
>>
>>61750290
It does, though.
>>
>>61750290
But that's the only practical difference I can think of aside from the obvious needless allocation.
>>
>>61750310
Why would I want to make a string reference equality check fail? You should never be doing that anyway.
>>
>>61750179
a.cc: In function 'int main()':
a.cc:19:13: error: expected unqualified-id before '[' token
for (auto &[a, b] : pairs) {
^
a.cc:19:13: error: expected ';' before '[' token
a.cc:19:14: error: 'a' was not declared in this scope
for (auto &[a, b] : pairs) {
^
a.cc:19:17: error: 'b' was not declared in this scope
for (auto &[a, b] : pairs) {
^
a.cc: In lambda function:
a.cc:19:20: error: expected '{' before ':' token
for (auto &[a, b] : pairs) {
^
a.cc: In function 'int main()':
a.cc:19:20: error: expected ';' before ':' token
a.cc:19:20: error: expected primary-expression before ':' token
a.cc:19:20: error: expected ')' before ':' token
a.cc:19:20: error: expected primary-expression before ':' token
>>
>>61750343
Compile with -std=c++17 like a normal person.
>>
>>61750115
SFML is garbage
>>
>>61750352
same error
>>
>>61750328
Because someday you might want to apply this to subtly introduce a non-obvious, hard to track bug in your ENTERPRISE codebase as a last parting gift for the clueless suckers before bailing out.
>>
>>61750363
Use a sane compiler like a normal person.
>>
>>61750353
are you a Spaniard?
>>
>>61750309
who cares what actually happens behind the scenes as long as it just werks for the programmer

if we actually cared about perserving memory and optimizing it we should start handwriting our own ASM instructions and making our own processors
>>
>>61750309
>OOP is Java
>Error handling is related to OOP

truly a 2nd semester CS masterpiece
>>
>>61750394
>if we actually cared about perserving memory and optimizing it we should start handwriting our own ASM instructions and making our own processors
truly, only Lispers are about real performance optimization
>>
>>61750394
Why you're at that, why limitting yourself to something conventional like ``ASM''?
>>
>>61750420
*care
>>
In every thread people shot all over C++.

It's a wholly general purpose, multi-paradigm language, and the paradigms don't overlap so you're free to not use what you don't want.

No one talks shit about C#, an OOP language trying to implement other paradigms that only works properly on Windows, with a ragtag team maintaining Mono.

I wonder why$$$that$$$could$$$be$$$
>>
>>61750448
>only works properly on Windows

my favourite meme
>>
>>61750448
/dpt/ is full of NEETs
>>
>>61750448
java propaganda, surely
>>
redpill me on F#
>>
>>61750478
It's shit. Search for
Jon Harop
to see how he has to shit on other functional programming languages to shill F#, because F# itself doesn't have anything able to be shilling over.
>>
>learned more useful stuff from firecode and mooc than 4 years at my uni

feels bad man
>>
>>61750388
is that important?
>>
redpill me on F*
>>
>>61750478
nobody uses purely functional programming languages in the real world (except for toy projects)
>>
>>61750525
Doesn't that make F# good?
>>
>>61750525
What is the real world?
>>
>>61750582
that's where money is made
>>
>>61750608
i thought money was made by making shitty websites and adding analytics
>>
>>61750239
Thanks m8, I forgot they have actual constructors when using make_tuple all the time, not like make_tuple needs to exist in C++17 anyway
>>
>>61750525
https://jobs.target.com/job/sunnyvale/haskell-data-scientist/1118/2012182
Aside from the ambiguous term ``purely functional'', Haskell is
ENTERPRISE QUALITY
for a while now
>>61750582
A mythcal state token getting passed around inside of the IO monad which is a monoid in the category of endofuntors
>>
File: thonk.jpg (20KB, 746x750px) Image search: [Google]
thonk.jpg
20KB, 746x750px
>>61750608
https://www.janestreet.com/
>>
>>61750628
yes, good example. PHP and JS aren't functional programming languages
>>
>>61750514
nah. just asking. I'm Portuguese.
>>
>>61750663
you can make anything a functional language if you try hard enough
>>
>>61750663
But what exactly is a functional programming language?
>>61750638
>OCaml
>pure
Fucking slut.
>>
>>61750633
>Haskell is enterprise quality
Maybe in your dreams: https://www.tiobe.com/tiobe-index/.
>>
>>61750518
it has dependent types and refinement types
people don't talk about it because it's Microsoft, and Idris is more street
>>
File: 1499905437733.jpg (67KB, 498x450px) Image search: [Google]
1499905437733.jpg
67KB, 498x450px
new thread
>>61750708
>>
>>61750633
wow, one job for Haskell. when you search Java on that site you get 3 pages
>>
>>61750702
tiobe index for once has never been able accurately take into account the usage of languages in private firms, which are the actual stuff
ENTERPRISE QUALITY
is made of.
COBOL is the embodiment of
ENTERPRISE QUALITY
and where is it on the tiobe index? Same goes for OCaml at Jane Street, which is of course even lower on the index but infinitely more
ENTERPRISE QUALITY
than Haskell
>>
>>61750756
Nothing is accurate in the eyes of a fanboy if the numbers are against you.
>>
>>61750792
>fanboy
>implying
I'm taking a jab at Haskell for a while now and you didn't even notice.
Reminder that the original motto of Haskell *was* ``Avoid success at all cost''
>>
>>61750807
>I'm taking a jab at Haskell for a while now and you didn't even notice.
sarcasm is hard to express online
>>
>>61750093
Thanks.
Are there any good resources/books on learning OpenGL?
>>
so i wanna embed some scripting language to quake 3 engine but no matter which scripting engine i try to embed in a simple hello world executable, gcc always gives me errors and says the functions of the scripting engines (lua, javascript and other custom languages) don't exist and everything even though i complied and installed in my libraries. is there anything i'm missing and is there a c-like embeddable scripting language that i don't have to use like a library?
>>
>>61751852
No you really need to learn how to link libraries.
>>
>>61751913
new to c. i actually heard a lot about it but the gcc tutorials seemed so vague (probably because i'm a newfag). how do i know what i should write on terminal and how do i know what happens to the compiled libraries when they're make'd?
>>
>>61747172
Obviously G. Why you even said F I have no idea. Also is H supposed to be closed on its right side? I swear this is the kind of pic you only find on facebook.
>>
>>61752079
D is closed on its left side.
Thread posts: 390
Thread images: 18


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