[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: 315
Thread images: 26

File: pengin.jpg (17KB, 122x99px) Image search: [Google]
pengin.jpg
17KB, 122x99px
What are you working on, /g/?

Old thread: >>61919998
>>
>>61932358
Learning asm.
>>
File: 1498866208019.png (717KB, 1000x793px) Image search: [Google]
1498866208019.png
717KB, 1000x793px
>>
Would it be hard to learn C# if you're new to programming?

And what are the best methods to learn, i've already signed up for a programming course at a community college.
>>
>>61932398
Aren't you supposed to start with C?
>>
>>61932398
C# is not THAT hard, my friend that is not very good in practical programming learns it right now and, i think, somewhat succeeds in it
>>
>>61932398
The hardest part is beginning, you're expected to write meaningless OOP incantations before you can start any programming at all. It's got a nice gentle learning curve after that.
>>
>>61932398
it's quite easy, you can start making windows applications fast and that's motivating, also much better syntax than java
>>
>>61932431
Not really no.
>>
I want to make a simple push button for a Linux machine.
Not a keyboard, just something so I can read if there is a short circuit.
What resources should I read?
Is it even possible with a modern computer? Or do I need to connect an arduino?
>>
>>61932438
>>61932444

Would you two recommend this site http://www.learncs.org/

And is microsoft visual studio the best IDE for C#?
>>
>>61932462
Definetly.

At least until Ryder from JetBrains comes out.
>>
>>61931092
its not that hard
def avgdicts(dicts):
totval=0.00
totlen=0
for dic in dicts:
totval += sum(dic.values())
totlen += len(dic)
return totval/totlen


or if you want to do functional programming
def avgdicts(dicts):
return (lambda vallen: vallen[0]/vallen[1])(reduce(lambda old_vallen, dic: (old_vallen[0] + sum(dic.values()), old_vallen[1] + len(dic)), dicts,(0.0, 0)))
>>
>>61932462
VS is basically the only good IDE for C# if you are under windows, yes
>>
>>61932470
it's called Rider and it's actually out already, unfortunately its payed (or 30-days trial)

anyone here used it yet?
>>
What are advantages/disadvantages of C++ over C when it comes to efficiency and reliability of the program? How much am I missing if I use a C++ replacement like D or Rust instead? Advantages of mixing C with C++ or one of its replacements? I only know C.

Any libraries that let me write programs for Windows and Linux without ifdeffing every syscall?

Also, when is it better to use threads over processes? How do I schedule my threads on my own and is it really worth it?
>>
>>61932515
>Any libraries that let me write programs for Windows and Linux without ifdeffing every syscall?
This is why POSIX exists.

Depends on what you want to do, Qt would do that for a good cross-platform GUI and is C++ if that's what you want.
>>
>>61932515
>What are advantages/disadvantages of C++ over C when it comes to efficiency and reliability of the program?
Depends entirely on the way you write C++. You could write C++ that is just like C and has all the efficiency of that, or you could use abstractions to make your program safer + easier to write but probably slower.
>Advantages of mixing C with C++ or one of its replacements? I only know C.
Portability. If you're making a library you want to do it in C, or at least expose a C interface.
>>
>>61932515
>Advantages of mixing C with C++ or one of its replacements
Basically, there are many more C libraries, than D/Rust

>How much am I missing if I use a C++ replacement like D or Rust instead
Their standard libraries are actually better than C++'s
>>
>>61932554
>>61932458
If C++ can replace C why do they still teach it at CS?
>>
>>61932567
C is a small and focused language, the concepts it teaches are inescapable. You could write C++ without ever calling free/delete or using a function pointer. It's very easy for someone to fuck up and break a whole codebase by misusing C++ features or using obscure C++ features. Also, certain "unsafe" behavior is much more ergonomic in C (e.g. pointer casts)
>>
>>61932431
Do you need to learn to swim before you learn to ride a bike?

>>61932462
>>61932470
Also, VS Code is very usable for C# if you don't want the full suite. It has the codelens stuff, intellisense, very similar debugger, etc.

>>61932567
Because its simpler. K&R2 is like 270 pages. TC++PL4 is like 1400 pages, and that edition of the book is now 2 language revisions behind.
>>
>>61932567
C is easier to understand and has pointers & recursion — basically two things that are the hardest to understand for students
>>
>>61932567
Introducing programming with C++ can be VERY confusing. Especially when the first examples start with:
using namespace std; // yuck
cout << "hello, world! << endl;

You wanna start with purely imperative programming first. Then introduce some other paradigms before going deep into C++.
>>
>>61932398
>>61932462
C# is one of the best beginner languages, from a standpoint of being able to do things fairly quickly. I highly recommend you use the Yellow Book. It's free, get the PDF and resources on this page: http://www.robmiles.com/c-yellow-book/
>>
>>61932613
why are people disgusted about using `namespace std`
whats so wrong about it
>>
>>61932613
>before going deep into C++.
>implying
>>
>>61932645
It's tolerable if it's properly scoped.
>>
>>61932645
Fucks up headers. Nothing wrong with using it in a source file tho
>>
>>61932358
Taking a dump right now
>>
>>61932503
>Rider
>€139.00/year

well fugg :-DD
>>
>>61932645
"using namespace foo" should only be done at the deepest scope.

otherwise you risk namespace pollution
>>
>>61932678
Holy fuck that's like more expensive than windows 10 lol
>>
>>61932655
It's a bottomless pit.

t. C++ dev, I lost the sense of purpose in life
>>
>>61932567
Because C and c++ have different things they are both good at.
>>61932613
There is honestly nothing wrong with introducing people to programming using c++. That is as long as you don't start by teaching it using idioms from the 70/80's the C way.
>>
>>61932503
>payed
>>
since there are some C++ developers in here, preferences?
const foo& bar();
//vs
foo const& bar();
// --
const foo &bar();
//vs
foo const &bar();


void foo(const bar& b);
// vs
void foo(bar const& b);
// --
void foo(const bar &b);
// vs
void foo(bar const &b);
>>
>python is slow
3673 function calls (3606 primitive calls) in 0.072 seconds
>>
What's the point in using C when you can use Rust which is better in every way?
>better type safety
>abstractions that don't hinder performance
>removes a lot of shitty backwards compatibility and out dated features.
>>
>>61932778
Third both
>>
File: 1502815208446.jpg (23KB, 372x314px) Image search: [Google]
1502815208446.jpg
23KB, 372x314px
>>61932787
>removes a lot of shitty backwards compatibility
>better
>>
>>61932778
const foo &bar(const baz &b);

I don't like the rules, I just follow them. Swapping const position is fine too.
>>
>>61932785
Now post the code
>>
>>61932787
>What's the point in playing a good ol' card game when you can play the latest fashionable game no one except hipsters knows about and have a reputation of being played by huge cunts?
>>
>>61932814
can't. but its a image downloader using json and urllib2
>>
>>61932515
>How do I schedule my threads on my own and is it really worth it?
You don't. And as far as I know for OS-level threads you can't. Maybe you can in some cooperative multitasking systems but then you're not really doing "stuff at the same time," you're just making an abstraction that makes it easier to juggle multiple workloads.
>>
>>61932799
>>61932819
>hurr durr C lacks modern language conveniences, must be a great language!
Fuck off, C is obselete, Rust is the future.
>>
>>61932826
>>61932515
you can do a yield() but otherwise it's both stupid and pointless.
>>
>>61932836
yield() yields control to any running thread, not just the host program though, correct?
>>
>>61932830
>hurr durr C lacks modern language conveniences, must be a great language!
What are you quoting?
>>
>>61932869
read this sentence
>>
>>61932830
>C is obselete
So are most card games, yet everyone knows them, plays them, and enjoys them.
Given how you present Rust, I'm not sure I'm gonna enjoy it.
>>
>>61932868
Usually yield is optimized to give the thread's priority to its other threads so they have higher chances of running during scheduling and release a mutex, send a message, etc. There's also a syscall that does this for a process and its children but I can't remember its name.
>>
>>61932870
Read.
But it doesn't contain any source on your quote!
>>
>IQ ranking
60: Average IOS user.
70: Average OSX user.
80: Gaymer windows user.
85: Non-gaymer windows user.
88: Average non-programmer Linux user.
89: Web developer.
90: Programmer Windows user.
95: Programmer OSX user.
100: Average mid-tier programmer Linux user.
110: High tier Windows programmer.
120: High tier OSX programmer.
130: High tier Linux programmer.
140: UNIX programmer.
>>
>>61932889
That's because you are a closed minded fool who doesn't want to more away from their pond.
>It is difficult to free fools from the chains they revere.
>>
>>61932903
what about bsd
>>
>>61932915
>140: UNIX programmer.
>>
>>61932920
that makes osx just as high desu
>>
File: freeasinskifree.png (44KB, 709x283px) Image search: [Google]
freeasinskifree.png
44KB, 709x283px
What license is better to use?
>>
>>61932905
>It is difficult to free fools from the chains they revere.
I have never seen a language that put as many chains and training wheels as Rust.
>>
have a lot less reverence for high level languages after beginning assembly
>>
How can i write a regular expression that makes sure there's only one word on the entire line

it needs to meet the following expression /(^de|ed$)/ just not sure how to check that there's only one word on the line
>>
>>61932955
>not misinterpreting the quote
You are misunderstanding the difference between training wheels and pragmatic safety. Rust is designed to be safe so that you avoid the countless memory security holes that riddle software written in C.
>>
>>61932960
You will probably have quite enough of that reverence again after you will be throgh with assembly.
>>
>>61932899
Good stuff to know, thanks man.
>>
I know some programming from uni not that much but still where could i find some small jobs or something to do on the internet? I want sum moneys
>>
>>61933010
>I want sum moneys
get some knee pads
>>
is it possible to re write the JVM?
>>
>>61933038
Yes but it'd be pointless. It's literally the only good thing about java
>>
>>61932977
Like it's been already said countless times to other Rust shills, security holes are the facts of bad programmers, not inherent to the language itself.
Preventing such problems at the core of the language won't prevent bad programmers to be still bad and produce incorrect code that doesn't respect the specifications.
>>
File: geee.jpg (2MB, 2048x1365px) Image search: [Google]
geee.jpg
2MB, 2048x1365px
Do you guys use linked-in to get programming jobs / talk to recruiters?
>>
>>61933076
Yes, but Rust eliminates a large portion of security holes at compile time to avoid them at run time.
>security holes are the facts of bad programmers
Do you think this is true? I can point to many projects written in C that were written by "good" programmers but had security holes. Did you forget shellshock? Heartbleed? The many security holes present in Linux? I could go on.
>>
>>61932963
/((^de|ed$)(?!(^de|ed$))\z)/
>>
>>61933089
What's up with Asians women and the V sign? Do they all want to get the tongue???

More seriously, workers are lured into Linkedin most likely because it facilitates the work of headhunters, more than helping you finding a job by yourself. And that's how Linkedin do business actually.
>>
>>61932963
/\s*(^de|ed$)/ checks before the word, not sure how to check after the word
>>
>>61933119
Rust lacks security holes because no one writes in Rust.
>>
>>61933153
not him but, i tried this on regex but don't know wtf this regexp does
>>
File: this_is_fine.jpg (198KB, 1572x800px) Image search: [Google]
this_is_fine.jpg
198KB, 1572x800px
>2017
>not using go
it's like you don't want to be happy and productive
>>
>>61933153
"regular expression compile failed (missing operand)"
>>
>>61932982
i'm doing it on my own volition, not for a class, so i probably will never have the same hate most people have for it. it's fun to be able to write your own code and not have a compiler make it. but after i finish this i plan to teach myself compilers so you're probably right
>>
What language(s) does /dpt/ use at their >job
What language(s) does /dpt/ use for personal/fun projects?
>>
>>61933202
compilers are fun, anon approves
>>
>>61933184
>>61933192
I don't kniw if your language of choice has those operands, I tried to write Perl regexp.
Still, I can't guarantee if it works.
>>
>>61933179
>Rust lacks security holes because no one writes in Rust.
Are actually going to provide any sort of decent rebuttal or are you just going to spout bullshit? Rust lacks security holes because Rust is secure. There are plenty of Rust programs used, you just never hear about any security issues because there are none. There are many projects on github:
https://github.com/trending/rust?since=monthly
>>
>>61933225
rust is for beta males, C is for alpha males. simple as
>>
>>61933119
That might come as a shock or a contrarian opinion, but in general open-source code quality is very subpar. Of course, that doesn't mean closed-source is forcibly better, but it's actually in the nature of every surviving and active open-source project to stoop to the lowest common denominator of quality.
But I can assure you, that sort of security hole just can't exist in critical systems, even when written in C. It's a matter of responsibility and the level of code quality required is just insane there. Maybe that's where Rust may shine, but Ada already has quite the upper hand in such matters. Not the same tools, not the same persons, not the same sums of money involved too.
>>
>>61933207
C++/C#

C++, Rus and Python mostly, but also like a bunch of others just to check them out
>>
>>61933224
I'm using awk, basically I have /\s*(^de|ed$)/ currently which works for words before DE or ED is found, but I can't figure out how to check for words after
>>
>>61933233
>Ada already has quite the upper hand in such matters
But Ada requires a garbage collector, Rust doesn't.
>open-source code quality is very subpar
As opposed to what? Apple who produce such shitty software they have to restrict their users to their walled garden as to not get a virus? Or Windows who constantly get security holes? Remember when a there was that randomware attack a few months ago which cost billions of dollars in damage because it got into the NHS?
>>
>>61933258
See Lookaround assertions at https://perldoc.perl.org/perlre.html and check if that's what you need.
>>
>>61933207
OCaml
OCaml
>>
>>61933207
Powershell
D
>>
>>61933263
The solution to the riddle of software quality does not lie in a programming language, because a language that is expressive enough to build programs which interact with the outside world is non-deterministic by nature, hence allowing insecurity. That's why Rust is obliged to include an "unsafe" keyword to be relevant enough as a programming language. You can only be "safe" in a restricted part of the language.
The recurrence of flaws of programs is an engineering problem and stems from the lack of rigor and seriousness in program engineering. Take a look at other industries where risk and danger are involved and see how rigorously they proceed. As with C, making a procedure or calculation mistake is easy, yet risk is managed in such a way it doesn't lead to catastrophic consequences. The software industry has yet to reach such maturity.
>>
>>61933207
Python + C
Python, C#, PHP and JS
>>
>>61933441
I hope for your sake that these lines are in reverse order.
>>
>>61932953
Pick something that doesn't contain GPL in it and you are fine and if you really want GPL just make sure to avoid v3.
>>
>>61933453
I have a research job, where I use Python to do all kinds of calculations. When I need the super computer, I use C.

At home, I use Python for all kinds of things, C# for Unity, and PHP and JS for my server and homepage.
>>
>>61932826
On Linux threads are just processes with sharing memory and shit and they're scheduled just as processes. I meant something like implement my own threads running within my process and schedule them. Or coroutines or shit. nvm, that was a dumb question.
>>
Just had my first year of CS classes at Uni. Thought implementing Conway's game of life should be an easy enough thing to work on so I learned a bit of SDL2 in order to display it. Getting the game to work went well enough but I don't know enough about SDL to fix something: the game maxes out a core for no good reason.

Initializing the renderer with vSync keeps the core usage to about 20% (this still seems way to high) but that messes with how I pace board ticks.

Here is the source: https://dl.dropboxusercontent.com/s/rsigzfbcmjz7oq9/life.tar.gz

Any help would be appreciated.
>>
okay guys, not sure if stupid question or dpt, but here we go:

I have made a fuckton of pictures and wanted to make a timelapse out of it. I have a simple bash script which does that for me with ffmpeg, BUT my camera fucked up the numbering of the pictures, because after 9999 it starts from 1 again and I need consecutive numbers.
Now I want to rename all files according to their date, which should be correct.

With which language I would achieve this fast and simple?
I would first read all file names and extract each date.
Construct a hashmap with those two values
sort them by date into an array.
rename
????
profit

any suggestions? Is bash enough or would python be easier?
>>
>>61933502
If you're looking for cooperative multitasking stuff, go check out Python's async and friends, or look at how Lua's coroutines are implemented.
Lua is pretty great for that sort of thing. The codebase is really small and well-written.
>>
File: 1405616553309.gif (66KB, 350x350px) Image search: [Google]
1405616553309.gif
66KB, 350x350px
>>61933493
Y-you can't be using C at your j-job! C is just for N-NEETS! This can't be true!
>>
>>61933539
Sounds like a pretty easy problem to do wiht anys scripting language. Just glob the filenames, fetch the date for that filename and then rename it to the date. Although, I'm not completely sure how it starts from 1 again, since you can't have two files with the same name and path. Anyway, I'd use python.
>>
>>61933539
Going the shell way, 'ls -tr' to list the files in the order of the creation. A for loop and a counter would be sufficient to rename all the files this way.
>>
>>61933599
>I'm not completely sure how it starts from 1 again,
it just creates another folder.
>>
File: 1342536282046.png (304KB, 722x768px) Image search: [Google]
1342536282046.png
304KB, 722x768px
>>61925647
>>
>>61933525
From a quick onceover of your code it looks like your main loop is chewing up every available bit of CPU your OS throws at it. Which is going to be all of it if VSync doesn't limit it a bit. What I think you want is an SDL timer; it's been years since I used SDL so I'm not much help beyond that, but essentially creating and using one will only run your update function on a set interval, so you don't have to eat all the CPU up.
>>
>>61933644
So basically you just add 10000 to the files in the first folder, 20000 to the files in the second folder etc.
>>
>>61933661
yeah just realized that. top kek.
the folders are even listes as "100CANON" and "101CANON" so I just have to put that 100 or 101 infront of the other numbers.
Nice, that's gon be easier than I thought
>>
>>61933207
>What language(s) does /dpt/ use at their >job
C#, SQL, M, DAX, PowerShell

>What language(s) does /dpt/ use for personal/fun projects?
C#
>>
>>61933656
Thats kinda what I thought was happening. I already limit how often it updates but the function which tells SDL to update the window runs each loop so I'll look at limiting that too.

Thanks!
>>
>>61932358
Hello /dpt/, following situation
>never got into programming, was never interested in it
>have the chance learn phyton, starting next month
>would only utilize it to code an app for my android

Would it be doable or is it unreasonably complicated/ impossible to create apps, maybe even a game, in phyton?
>>
>>61933685
The difference between your code and the way SDL's timer works is that I believe SDL's timer runs on a separate thread altogether and doesn't actually do anything until the time comes to run whatever callback function you pass it, so 90% of the time the OS is in control.
But yeah, no problem anon. Glad I could help out a bit.
>>
>>61933728
It's possible, but Google does its best to prevent that.
>>
Is there a way to disable eclipse from taking up the fonts and themes I have enabled on ubuntu? I can't even see what the fuck is going on.
>>
File: JUST.jpg (27KB, 600x424px) Image search: [Google]
JUST.jpg
27KB, 600x424px
>got back from vacation
>boss hands me a Spring Boot+Angular project
>hey anon, while you were gone I mashed together an application, you'll be working with me on this project
>oh, and we won't be rewriting it from scratch because it's working right now ;^)))
>look at code
>absolute pajeet shit on the front and back end, when I'd already written a clean, maintainable Spring Boot+Angular application he could just use as a template

How do you deal with shit like this?
>>
>>61933263
>But Ada requires a garbage collector
This is a myth! Nobody ever implemented a GC for Ada because it was too much work on top of an already ridiculous amount of work. Instead, it uses techniques like scoped arena allocation that are similar to lifetimes in spirit but don't require special syntax to express.
>>
File: stupidest.jpg (31KB, 320x320px) Image search: [Google]
stupidest.jpg
31KB, 320x320px
>>61933871

>2017
>using Eclipse

>>61933728

Python is mainly used for server-side logic. You're better off learning HTML/CSS/JS and making a hybrid/native application.
>>
>>61933207
Work: C++, SQL, Python

Fun: Rust
>>
>>61933866
>>61933988
Welp, okay, won't learn it then because I can't use it in my job or anywhere else
Thank you for the answers!
>>
Alright... I'm stumped.

I am able to dereference the pointer to a "Digit" (data structure containing a short and two pointers, a doubly linked list) -- I print out the pointer in the call to "PrintAddresses(L_Int)", but when I do the call to printf, I get a seg fault, despite the pointer being able to be used.

I have no fucking clue what to do anymore.

Any hints to debugging?
>>
Does every vageslave programmer dream selling their personal project, becoming employed and making it big?
>>
>>61934159
self employed*
>>
>>61932783
>Confession: I have told my daughter it isn’t optional to learn coding and that she must stick with it until she’s good at it and then she can choose not to do it (parenting advisors, stop rolling your eyes now!).
What a horrible person. Don't do this. My parents did this with music. Horrible waste of time which only leads the kid to feeling guilt about not performing well and places expectations where it doesn't matter at all.
Also as I'm sure you know practically nobody who does programming thinks they're good at it. They're good enough until they see tons of people who are worse. You won't get that perspective working in isolation, as a person who's learning would.
>>
>>61934153
Me being the dumbass that I am, I didn't realize I hadn't initialized the "Product" Pointer.
>>
>>61933942
Anon you're using these words I've never heard of and it makes me think you're some complete loser who's subscribing to a single paradigm. When faced with code that isn't that paradigm he just pretends it's bad to not have to learn something.
>>
>>61934292
>Case in point: Sometimes, girls do gravitate more towards creative rather than logic problems, either naturally or due to the environment around them. I’m doing my part to start encouraging my own kids early. We need more of it.
Horrible. If you think programming is logic problems then you're not an experienced programmer. The logic problems are swept under the rug near instantly.
>>
>>61934332

>no coherent code style
>not using any checkstyle or TSlint
>variable names like a, aa, aaa, etc.
>using deprecated shit like java.util.Date
>nested loops out the ass
>creating a separate module for each new page in Angular
>all CSS class names are a mix of Pascal and camel case

Yeah, m8, totally my fault. Every programmer should be able to work with literal shit written by his own fucking boss that takes days to refactor simply to make it not look like shit.
>>
>>61934487
kek, that's why he is your boss
>>
>>61934547

He's just a manager that was a programmer a long time ago.

If he told me to write that program from scratch, I wouldn't have minded, but handing me that steaming pile of shit pretty much guaranteed that I'm going to leave the company in the autumn.
>>
>>61934593
this shit happens everywhere, get used to it or quit
>>
r8 my fizzbuzz:
https://play.rust-lang.org/?gist=7078b14389ab201ffd0c86a6f6c28f20&version=stable

use std::fmt::{self, Formatter, Display};
use std::iter::{self};

macro_rules! impl_from_fizzbuzz {
($ty:ty) => {
impl From<$ty> for FizzBuzz<$ty> {
fn from(t: $ty) -> Self {
match (t % 3, t % 5) {
(0, 0) => { FizzBuzz::FizzBuzz }
(0, _) => { FizzBuzz::Fizz }
(_, 0) => { FizzBuzz::Buzz }
_ => { FizzBuzz::Number(t) }
}
}
}
}
}

enum FizzBuzz<T> {
FizzBuzz,
Fizz,
Buzz,
Number(T)
}

trait IterExt<I, T> {
fn fizz_buzz(self) -> iter::Map<I, fn(T) -> FizzBuzz<T>>;
}

impl<I, T> IterExt<I, T> for I where I: Iterator<Item=T>, FizzBuzz<T>: From<T> {
fn fizz_buzz(self) -> iter::Map<I, fn(T) -> FizzBuzz<T>> {
self.map(From::from)
}
}

impl_from_fizzbuzz!(i8);
impl_from_fizzbuzz!(u8);
impl_from_fizzbuzz!(i16);
impl_from_fizzbuzz!(u16);
impl_from_fizzbuzz!(i32);
impl_from_fizzbuzz!(u32);
impl_from_fizzbuzz!(i64);
impl_from_fizzbuzz!(u64);
impl_from_fizzbuzz!(isize);
impl_from_fizzbuzz!(usize);

impl<T> Display for FizzBuzz<T> where T: Display {
fn fmt(&self, fmt: &mut Formatter) -> fmt::Result {
match *self {
FizzBuzz::FizzBuzz => { write!(fmt, "FizzBuzz") }
FizzBuzz::Fizz => { write!(fmt, "Fizz") }
FizzBuzz::Buzz => { write!(fmt, "Buzz") }
FizzBuzz::Number(ref x) => { write!(fmt, "{}", x) }
}
}
}

fn main() {
for v in (1..101).fizz_buzz() {
println!("{}", v);
}
}
>>
>>61934906
Verbose and unreadable just as Mozilla intended.
>>
>>61934932
>integrates seamlessly with iterators
>no heap allocations
stfu or post yours
>>
>>61934487
>variable names like a, aa, aaa, etc.
What's wrong with that, nerd?
>>
>>61934981
>no heap allocations when fizzbuzzing
is this supposed to be a fucking accomplishment?
>>
>>61934987
:^)
stfu or post yours
>>
Overloaded lists should work like
data [] a = [] | (:) a ([] a)

i.e. the type [] uses whatever type [] is in scope
list syntax should use whatever (:) and [] patterns are in scope
[1..], etc use fromEnum and shit.

Rebindable syntax should let you rebind
>lambdas
>tuples: inductively
>record syntax

Arrow typeclass shouldn't have the arr function
>>
>>61935017
opinions
>>
File: uggs.png (251KB, 378x500px) Image search: [Google]
uggs.png
251KB, 378x500px
recommend an OS?
just finished my build last night. today bios and os
>>
>>61935034
No, facts
>>
>>61934906
Use the original language next time anon.
let rec loop = function
| 101 -> ()
| n ->
let s =
match n mod 5, n mod 3 with
| 0, 0 -> "fizzbuzz"
| 0, _ -> "buzz"
| _, 0 -> "fizz"
| _, _ -> string_of_int n in
print_endline s;
loop (succ n) in
loop 1
>>
>>61935037
Gentoo
>>
>>61935047
how is this reusable?
>string_of_int
does this allocate?
>>
>>61935081
>does this allocate?
Why did I laugh when I read that?
>>
>>61935037
Arch if you want to work with up to date software.
Debian if you just want to use your computer.
>>
>>61933988
>native
>html/cs/jss
ok, what the fuck
>>
>>61935081

It's a function
>>
>>61935097
I don't know either. It seems like something a child would ask somehow.
>>
>>61935037
Windows 98SE
>>
>>61935076
>>61935104
thanks ill research these
>>
>>61935172 kek thanks guy
>>
anyone know if the free win 10 from microsoft doot com/en-us/software-download/windows10 will straight install on my brand new computer? no OS on there currently.
>>
pure string[] fizzbuzz()
{
import std.algorithm.comparison : predSwitch;
import std.conv : to;

string[] ret;
foreach(i; 1..101)
{
ret ~= i.predSwitch!"a % b == 0"(
3, "Fizz",
5, "Buzz",
15, "FizzBuzz",
i.to!string
);
}

return ret;
}

void main()
{
import std.stdio : writefln;
enum fb = fizzbuzz();
writefln("%-(%s\n%)", fb);
}
>>
File: my eyes.png (12KB, 1232x121px) Image search: [Google]
my eyes.png
12KB, 1232x121px
Is C++ the ugliest piece of shit ever conceived by humankind?
>>
>>61935228
Try asking in the simple questions thread
>>
>>61935252
>+4 overloads
made me chuckle
>>
>>61935252
why do you have a string of type of val of iterator

who did this
>>
I was reading this article: http://higherorderfun.com/blog/2012/05/20/the-guide-to-implementing-2d-platformers/

I saw this at the bottom:
>Store position as an integer, but keep a “remainder” stored in a float. When integrating position, compute the delta-movement as a float, add the remainder to the delta-movement, then add the integer part of this value to the position, and the fractional part to the “remainder” field. On the next frame, the remainder will get added back in. The advantage of this method is that you’re using an integer everywhere except for movement, ensuring that you won’t have floating point complications elsewhere, and increasing performance. This technique is also very suitable if you have some framework in which the position of the object has to be an integer, or where it is a float, but that same position is used directly by the rendering system – in that case, you can use the framework-provided float position to store integer values only, to make sure that the rendering is always aligned to pixels.

So that I understand this right, is this saying to move by a whole number each frame, but when the "remainder" has enough to be a whole number to add it on top of the movement?
>>
>>61935340
Looks like it.
>>
OOP and inheritance was mistake.
>>
>>61935415
welcome to the club
>>
>>61935415
What do we do instead?
>>
>>61935431
functions and structs.
>>
File: 1502903054710.jpg (6KB, 225x224px) Image search: [Google]
1502903054710.jpg
6KB, 225x224px
>debugging pthreads all day
>delirious dream of compiling and running program over and over
>the instant the program starts running get woken up by a smashing sound
>for a few seconds believe my program litteraly started destroying my house

aaaaaaaaa
>>
>>61935448
Ah, just like C++!
>>
>>61935492
but that's nothing like sepples. Sepples is all about cluster fucks of templates and classes.
>>
>>61935510
C++ OOP is structs and functions duct-taped together.
>>
>>61935492
Yes, except C++ does it in a pointlessly complicated way for reasons that have long since been proven to have no real benefit.
OOP is a failed experiment and people need to move on.
>>
>>61935448
>not functions and types that only use contract-based inheritance, rather than object-oriented inheritance
>>
>>61932610
>le recursion is hard meme
literally a fancy loop
>>
>>61935415
You're confusing inheritance with subtyping. Inheritance isn't subtyping. It's inheritance. Subtyping should be used sparingly. Inheritance is very powerful when it's not limited to subtyping. Any good OOP programmer understands this.
>>
>>61935097
i don't know.
>>61935122
but does the function do heap allocations?
>>61935130
not an argument
>>61935244
>allocating
>hardcoding the range
>>61935340
how about you store the position as a float and if you want an integer round the float?
this blogpost clearly was written by a retard. disregard everything he wrote.
>2d game
>muh performance
LOL
>>
>>61935545
>>61932610
>le pointers is hard meme
literally a fancy int
>>
>>61935620
dude like what?
>>
>>61935340
You literally do not need to worry about that unless you're writing your game for a 386 without a math coprocessor. Don't prematurely optimise your stuff
>>
>>61935340
>use an integer for the position because its faster
>but also use a float
???
>>
>>61935340
can't the position still 'jitter' over two integer positions the same as if you used a float because of imprecision

like, the remainder could just jitter over 1.000
>>
>>61935340
>float
Terrible. Real platform gamedevs use fixed point. It doesn't have practical purpose but it feels good programming like it's Sonic the Hegehog in 1995.
>>
>>61935774
no
>>
>>61935798
This.
>>
>>61935340
The hell kind of ancient hardware is this blogger trying to target?
>>
>>61935340
You might be right:
>is this saying to move by a whole number each frame
Not necessarily. Basically you'd sum up the movement within a tile to see if it exceeds the tile boundary. You can consider the system as a system where the fractional part of a float is movement within a tile and the integer part is the position on the tilemap.
Basically the visual position of the player is determined by integer+float.
Game logic is only concerning itself with the integer position. And the floating point position is what modifies the integer position.
It's only sensibly applicable in methods #1-3.

I say the best way to go is Vectorial. The "difficulty" is overstated in the article. Most of the actual problems can be trivially solved by giving the player actor some leeway in its 'am i standing' code by using raycasts to determine if the player model is 'close enough'.
Like:http://www.iforce2d.net/b2dtut/suspension except you don't apply a force to make the player hover, and the raycast would be much shorter.

If you have more advanced movement you can easily extend it by adding special behavior with additional geometry. There's no performance concerns here, you could make your player character a smooth ball with thousands of spikes without performance issues. Computers are just that fast. The pixel-based methods are less precise and are just not well adapted for modern games. Everything speaks against them. You do GPU rendering so having a software render/pulling down GPU data just to do collision checks is just not sensible.

Some advice against physics engines like box2d for many 2D games because the aim of 2D games is very often not in line with physics simulations, but you can judge that for yourself.
>>61935956
I think he's just too old to know that floating point is way better than fixed point nowdays.
>>
>>61936032
>I think he's just too old to know that floating point is way better than fixed point nowdays.
Oh no you're very mistaken, and I have benchmarks which prove it.
>>
>>61936126
Show them
https://openbenchmarking.org/
>>
File: 20799239.jpg (62KB, 754x912px) Image search: [Google]
20799239.jpg
62KB, 754x912px
Can I pass the address to an std::aray as a function argument? std::array doesn't make sense at all.
C style array would take a pointer and a variable length like
void fn (int *arr, int length)

What's the equivalent function prototype if I'm using std::array?
>inb4
void fn(array<int, length> arr)

I want the pointer to be passed.
Also, what's the std::array equivalent of
int *arr = new int[] {2,8,1} //notice how I didn't have to explicitly specify the length
?
>>
>>61936143
You can use the .data() member function to get a raw pointer to the underlying array, and then just treat it the same way you would a C style array.
>>
File: 1472806101209.png (307KB, 500x500px) Image search: [Google]
1472806101209.png
307KB, 500x500px
>>61934906
>
use std::iter::{self};

Why not just
use std::iter;
?

Also idiomatic/10
>>
>>61936138
Idk what to do with the link you posted.
But here are code and results, it's too long to copypaste here.

https://gist.github.com/anonymous/aec7d4c47c4d9ebd28e06c668f7497ef
https://gist.github.com/anonymous/689f3170d0895065e2973e3e472478bf
>>
What is a good IDE for C?
>>
>>61934487
I feel like java devs shouldn't be allowed to complain about anything


lol
>>
>>61936225
emacs
>>
>>61936225
Eclipse CDT
>>
File: 1502656896525.jpg (65KB, 411x412px) Image search: [Google]
1502656896525.jpg
65KB, 411x412px
>>61936143
so,
void fn (std::array<int, length>* pArr)

But using raw pointers is overrated. Just use pass by reference:
void fn (std::array<int, length>& pArr)


If you're using existing functions you can't change, then use the .data() member function as pointed by >>61936194
>>
>>61936256
I know you, You are an autistic faggot. Kys.
Thanks for the answer btw
>>
File: 1502731721999.gif (2MB, 300x264px) Image search: [Google]
1502731721999.gif
2MB, 300x264px
>>61936245
Dude, what ? That was the worst IDE for C I've ever tried. It was basically just a bloated text editor.
>>
>>61936286
>It was basically just a bloated text editor.
Yes, IDEs are basically just a bloated text editor. What's your problem with it?
>>
>>61936225
>what's a good IDE for x?
vs code
>>
File: 1502656611414.png (335KB, 792x853px) Image search: [Google]
1502656611414.png
335KB, 792x853px
>>61936296
I mean just use a text editor in this case.

Eclipse for Java is fine, it really helps with the verbosity of Java. But for C/C++, Eclipse CDT just plain sucks.
>>
>>61936219
Those errors don't worry you at all?
>>
File: 8b1.png (666KB, 1126x845px) Image search: [Google]
8b1.png
666KB, 1126x845px
Theoretically, could one design a "functional" computer architecture
>>
>>61936333
Use an FPGA.
>>
>>61936333
Theres no reason why not desu.
Im sure someones started on a cpu by now.
>>
>>61936337
Well yeah, but what would it be like
>>
>Want to make a GPU usage monitor tool
>Can't access GPU registers without root privilege
I have to add user to some obscure group again.
>>61936330
Can you explain why?
>>61936326
>C IDE
>VS Code
kek, enjoy managing your projects with CMake, updating header files by hand, nigger
>>
>>61936219
>>61936331
Also testing a custom sine is the most favorable example you can give fixed-point that I'm aware of.
Use FSIN for gods sake.
>>
>>61936360
You can compile haskell for FPGAs.
>>
>>61936331
Yes actually it did when I reread this. It is a program I made a long time ago and I have absolutely no idea why this happens.
>>
>>61936367
How so? Granted, the fixed point has the the advantage of a twice smaller table. And the program is not vectorizable, I grant you that as well.
But even then, with the 10x factor not even AVX vectors would be able to compensate for the difference. Can x87 FSIN make an actual difference? I honestly doubt so, but I could add it to the benchmark.
>>
>>61936361
>what are plugins
>>
>>61936381
You can compile it for x86 too, but my question is what would a "functional" architecture look like? i.e. you couldn't do things like
mov rax, 1
>>
>>61936540
Some kind of HDL.
>>
>>61936540
introduce bar syntax.
rax | move rax 1
>>
bare with me lads, ive never used github before. If Im given a project github link (i guess its called a repository?) and theres some files i need to use, i just download them right ? then when im done i submit it through a new pull request? is that how it works?
>>
>>61936391
I really need to fix this error, I'll look into it but later. I currently have a similar code in an oscillator bank. Maybe it's something related to integer overflow.
>>
>>61936596
usually you fork it and then issue a pull request when you're done
>>
File: qRAn6.jpg (38KB, 604x453px) Image search: [Google]
qRAn6.jpg
38KB, 604x453px
>>61936596
Depends. Do you have the rights on the github, or not ?

If yes, then this:
- You "clone" the repository (most of the time, entirely) (and that's a good thing, because you should be able to compile and test the program before adding modifications)
- then you modify your files, and "commit" them (add an entry into the log with the modifications you made)
- then finally you "push" them.

Just use the github tutorial, it's so easy a 5yo could understand it. Give it 10 minutes max and you can use github.
>>
>>61932358
#include <stdio.h>

int main(){

int c = 5, d;
d = ++c + ++c + ++c + ++c + ++c + ++c + ++c + ++c + ++c + ++c + ++c + ++c;

printf("%d\n", d);

return 0;

}


How much is d?
>>
>>61933190

> 2017
> using Go
> have to rewrite same abstract 5 times because no generics
> but muh green threads and easy concurrency
> cry to sleep whispering "one day ill show C, one day"
>>
>>61935383
>>61935568
>>61935676
>>61935723
>>61935774
>>61936032

i'll try to come up with something, maybe in the next thread

what i've had with my engine is difficulty moving on slopes at a value that isn't a whole number. I think it is okay if some frames the entity moves _ pixels and other frames __ pixels. I just need to figure out how to do it.

>>61935956

beats me, says he worked in klik n play

>>61935798

i've played around with fixed point math but i'm not entirely certain how it works. it would be a good learning exercise, but where I get stuck is doing any math with things after the decimal.
>>
>>61936695
depends on compiler
>>
>>61936695
8 inch XD
>>
>>61936757
>only 8 in
lmao manlet
>>
>>61936695
int c = 5;
printf ( "%d", (c += ++c++)));


Where is your god now?
>>
>>61936710
Does the "easy concurrency" in go ever run in parallel? Or do you have to use something like posix threads to actually get parallel execution?
>>
>>61936742
fixed point math is easy, just do regular integer math and then maybe bitshift
>>
>>61936695
143?
>>
learning c++ a good idea?
>>
>>61936829
yes
>>
File: Capture.png (8KB, 639x78px) Image search: [Google]
Capture.png
8KB, 639x78px
>>61936769
Somewhere
>>
>>61936829
In my youpoor country over 80% of posted jobs require c++
>>
>>61936853
what about ++c += c++?
or ++++c += c++++
>>
>>61936829
It is fine.
You can dabble with different programming styles without leaving the language and you can set the compiler to beat you into submission to create good code.
>>
>>61936779
This is what I got:

#define SHIFT_AMOUNT 16
#define SHIFT_MASK ((1 << SHIFT_AMOUNT) - 1)

typedef int fixed_t;

fixed_t ft_SetNum ( fixed_t number )
{
return number << SHIFT_AMOUNT;
}

fixed_t ft_GetNum ( fixed_t number )
{
return number >> SHIFT_AMOUNT;
}


and I played around with this:

fixed_t testnum = ft_SetNum ( 500 ); 
printf ( "Created a number: %d\n", ft_GetNum(testnum) );

testnum += ft_SetNum ( 250 );
printf ( "After adding 250: %d\n", ft_GetNum(testnum) );

testnum -= ft_SetNum ( 150 );
printf ( "After subtracting 150: %d\n", ft_GetNum(testnum) );

testnum /= 2;
printf ( "After dividing by 2: %d\n", ft_GetNum(testnum) );

testnum *= 1.5;
printf ( "After multiplying by 1.5: %d\n", ft_GetNum(testnum) );

testnum += 512 & SHIFT_MASK;
printf ( "%d.%d\n", ft_GetNum(testnum), testnum & SHIFT_MASK );


it seems to work, but I could always be wrong.
>>
>>61936962
I tried making a class to automate this shit in sepples but it ended up ugly as sin.
Still, at least I found a good use case for user-defined literals.
>>
How do I generate a random number with a preference for a number
for example
generating a random number between 1 and 5 and have a preference for 2 it will most likely generate a 2 compared to other numbers
also is there a name for this?
>>
>>61937056
Use one to generate 0 or 1. Use that to determine if you want a 2. Use an ordinary generator otherwise.

Or, let a range of values all map to 2.
>>
r8
>>
Pointer a points to object A.
I set a point b = a.
What this means is b now points to object A.
So, if I do b = new Object B, then b -> B and a still -> A.

Noobs will think that a = b sets the pointers equal, meaning if b points to some other address than a follows suit. This is wrong, but is there a language concept for this?
>>
>>61937282
C++ references behave a little like this I guess? Or PHP references.
>>
>>61937056
r = random(0,1)
if r > 0.5:
return 2
else:
return r * 10
>>
i have some data separated in a txt file like

team score, team score
team score, team score
and so on

ex: Faggots 3, Cucks 5

each line is a result of a game. Im trying to compare each game and then order by the team with the most wins. I'm thinking of doing a for loop that reads each line and keeps track of the number of wins for each team, but im not sure how i can keep track of each unique team. Some games have a team from the previous game. Any ideas?
>>
>>61937392
use a hashish table
>>
>>61937017
was it a lot of code?
>>
>>61937413
There was a lot of repetition for all of the operator overloads but not much substance.
>>
>tfw c#
>tfw can lock the pc with one line of code
>it takes massive amount of code and hacks and workaround to unlock it again
what the fuck microsoft you cunts just give me a fucking api where i input name and password
>>
>>61937519
Can you provide an example?
>>
>>61937434
That is what you get with sepples.
>>
>>61937560
>>61937519
Please do not post malicous code in /dpt/
>>
Anyone good in Vala? How would i use Json.Parser to communicate with the chan API?

Something simple, like getting the data every minute,parsing the data from the json, and putting like the image file and stuff into their own variables.
>>
>>61937560
nope because i still haven't gotten it to work, it basically requires you to replace the entire login gui for fucks sakes, there is no reason to not provide that fucking functionality out of the box
>>
>>61937392
Use Lisp and structure your data like so.
( ( (faggot 3) (cuck 5) (team win) ) ;game1
( (faggot 2) (cuck 2) (nigger 2) ) ;game2
...
( (team n1) ... ) ;game n
)

and then all you'll have to do is
(with-open-file (file path-to-file)
(let ((data (read file))) ; basically, this will read it all in a swoop, since its just a list
<do whatever with the data> ))
>>
>>61937583
>malicous code
Anon is probably using winapi. Clearly not malicious code.
>>
>>61937056
generate number 0-20
if it's bigger than 10 return 2 else return the number
>>
>>61937392
Java HashMap dumb negroid.
if (map.containsKey(teamName))
map.put(teamName, map.get(teamname) + 1);
else
map.put(teamName, 0);
>>
Why do file systems not follow actual regex, what the fuck?

Filesystem:
d*.txt
gets every text file that starts with a 'd', such as dick.txt

Programming language
d*.txt
Gets d.txt, dd.txt, ddd.txt, dddd.txt, so on

Why do they have to mean different things?
>>
>>61937624
I don't know what you're up to but injecting WinLogon.exe might be what you're looking for if you want a really non elegant solution
>>
>>61937790
that's the shell doing that, nothing to do with the filesystem
It's more practical imo, because you don't have as many characters with different meanings, so to get for example all jpegs in your working directory, it's enough to do *.jpg instead of having to type .*\.jpg
>>
>>61937884
Can you provide a short example? It is a tool i am making for myself so i will take even the dirtiest hacks
>>
>>61937790
because regex is for when you know what your looking for and want to match to only that
wildcard is for when you don't know what -exactly- your looking for and just wanna cast a wide net to look for something/ make sure something happens. ie rm * garuntees everything is removed. less *.txt opens all txt files. etc.
>>
>>61937790
>actual regex
you mean a particular syntax for regex that you know? the answer is because the syntax is different. get used to it
>>
>>61937913
>>61937888
So it's not a regex at all, it's something different and gay? What if I want to use regex to search for shit?
>>
>>61937790
find(1) has a -regex option if you need to find files matching a regex
>>
>>61937790
regex isn't standardized dumbass
also you're complaining about shell globbing which predates perl regex
>>
>>61937939
>What if I want to use regex to search for shit?
ls | grep -E "PUT REGEX HERE"
>>
>>61937909
I already told you, you have to provide an example of what you're trying to do. Depending on what you are doing exactly and what you want the solution can be absolutely trivial or a bit more elaborate
>>
>>61937939
who said it was a regex?
also >>61937946
>>
>>61937939
i hope an affliction strikes you that causes you to be unable to use * in shell and you are forced to work as a system administrator your entire life
>>
I want to store file names in a vector, which string should I use?

std::vector<CString> vs;
std::vector<std::wstring> vs;
std::vector<std::string> vs;
>>
>>61938002
#onlySepplesProblems
>>
>>61938002
literally flip a three sided coin
>>
>>61938002
std::basic_string<TCHAR>
>>
>>61932358
How bad is it if I cant figure out how to implement sorting algorithms after reading their description?
>>
>>61938047
Descriptions can be shitty.
What are you having trouble with?
>>
>>61938023
>>61938035
>>61938045
Fuck I hate this language
>>
>>61938063
boost::filesystem::path
>>
>>61938047
You need to sort yourself out
>>
>>61938056
Insertion sort, I wanted to do it without looking at pseudocode based just on the description, but what I ended up doing was literally creating a new array and just finding the smallest number and adding it one at a time, which works I guess but i don't think is actually Insertion sort
>>61938072
kek
>>
>>61937956
I have a simple console c# application and after the users locks the pc i want to unlock it, i know the username and password
literally this

User pressers win + L

private static void Main(string[] args)
{
// Code to unlock the pc here
}
>>
>>61938138
i looked at it and it just seems really wasteful, in order to do it in place, you have to do the same thing as a bubble sort except you memmove all the bytes to the left of the new number by 1 and then insert.
you might not be making a new array every time but your memmove implementation is definitely doing it
>>
>>61938002
std::vector<const char*>
because fuck you
>>
>>61938220
might as well do a
const char**
at that point
>>
>>61938220
Get a loads of this fag who can't program in C but refuses to actually program in proper sepples.
You are literally the worst kind of trash.
>>
>>61938263
>program in C
its so hard why am i such a brainlet
>>
>>61938263
there is no proper C++, just turds painted different colors
>>
Array such that when item is deleted from the middle you move everything after it backwards once.
Or array that leaves the empty spot there and appends the index to free slot list?
>>
>>61938168
If you call WINAPI LockWorkStation(), and then you want to unlock the system, the system is yours and you know the username and password use them

There are several ways to bypass or trick the system but most of them border into malware territory and all in all sounds like you're attempting something malicious on someone
>>
>>61938387
I need the application to use the credentials because i don't want to constantly type them in i basically made an utility which locks the pc when i leave the cubicle and unlocks it when i come back because it sees my phone, but without the unlocking part it's a pain in the ass to have to input the login and password all the time
I gave up at solving it though code and instead will just use some 3rd party app from the command line and call something like unlock.exe -u blah -p bleh since i know that C++ apps can actually do it by replacing gina
>>
File: 2178071463368443.jpg (20KB, 540x540px) Image search: [Google]
2178071463368443.jpg
20KB, 540x540px
>>61938220
>>
>>61933386
you're cool what do you do?
>>
>>61932595
>Do you need to learn to swim before you learn to ride a bike?
It's a good idea to learn to swim before riding a bike especially if you intend to cycle over water.
>>
>>61938563
I wrote a "compiler" (C is the target).
>>
Is there an easy way to simulate manual reset events under linux?

I have a circular buffer implementation that I wrote for windows and it uses SetEvent and ResetEvent to make the producer ans consumer threads block when the buffer is full or empty.
How would I port this to linux without just polling?
>>
>>61938832
maybe pthread_cond does what your looking for
>>
My close friend has a really cool tattoo on his neck.Scissors because he is a barber.

What would an appropriate tattoo for a software developer, /dpt/?
>>
>>61932431
Maybe in the dark ages
>>
Porting dwm to wayland.
>>
next episode

>>61939273
>>61939273
>>
Whats a good Rust book?
>>
>>61938488
This picture reminds me of templeos guy.
>>
>>61932610
>recursion
>hardest to understand for students
Why is compsci filled with brainlets?

>>61935545
It's not even fancy. It's just a loop.
>>
>>61939726
>It's not even fancy. It's just a loop.
It's more like a depth first search. A loop would be a special case of recursion. The best case, actually, since otherwise you bring in the overhead of repeated function calls and possible stack overflow.
>>
>>61932778
What is up with C/Cpp and it's hilarious amount of absolutely fucking useless syntax sugar?
>>
>>61939845
go learn what words mean
>>
>>61932787
What is the point in either when you can program in LLVM IR?
>>
>>61932903
>Unix programmer
>Not retarded
Unix programmers are brainlets.
Then again, so are people who care about IQs or think 140 is impressive.
Additionally, your sentences are broken English.
>>
>>61935047
Very beautiful and very functional FizzBuzz, but consider creating a filtering function outside of the loop match. Your code will be more readable that way. The 'and' keyword is always useful. Good job, Anon.
>>
>>61935252
No, C and Rust are currently the top contenders for that title.
>>
>>61939848
You first, brainlet.
>>
>>61939875
>or think 140 is impressive.
If you don't think that's impressive, you're definitely a brainlet. 140 is almost three standard deviations above average, which makes such people quite rare. It's likely that the smartest person among all your family, coworkers and facebook friends has and IQ of 140.
>>
Test post please ignore
>>
File: qpdHnDzl.png (891KB, 3840x2160px) Image search: [Google]
qpdHnDzl.png
891KB, 3840x2160px
Pong in Opengl, uwu
>>
>>61940577
Wrong image, whoops
>>
>>61936225
CLion is pretty good. Kind of feel like it is more intended for C++ however.
Thread posts: 315
Thread images: 26


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