[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: 318
Thread images: 42

File: dpt_flat.png (102KB, 1000x1071px) Image search: [Google]
dpt_flat.png
102KB, 1000x1071px
Old thread: >>60128161

What are you working on /g/?
>>
1st for ruby
https://www.youtube.com/watch?v=gTBCHu0btn8
>>
File: dlang_chan.jpg (139KB, 470x545px) Image search: [Google]
dlang_chan.jpg
139KB, 470x545px
Threadly reminder that dlang-chan is not dead, and she's super duper cute! Say something nice about her, /dpt/!
>>
>>60135157
>there are retards who need such lame analogies to understand MVC
It's no surprise the modern web is shit.
>>
A few months ago, I started working at a small company as their fourth web developer. For the first few months I didn't even look at the code base in production, because the plan with hiring me was to move away from the old framework and code, and rewrite the whole system from scratch.

But, for the last few weeks, there has been a lot of extra stuff going on, just a few new features that is needed in the old system before we start working hard on the new one. So now I'm suddenly a developer for the system currently in production.This is a website, written in PHP, that has been in active development by a handful of different people for about 10 years, where I'm encountering all kinds of weird shit. Views doing controller stuff, controllers defining models, models doing tasks that really should be delegated to the views, SQL-queries that span over 1000 lines with ifs and elses looking for everything from session variables to results from other queries, just to make *this* query able to handle every edge case that could ever exist . Every function that fetches something from the databse returns false if there is there is no data, unless they return an error message, or straight out fail with a fatal PHP error, or returns nothing at all, or maybe it returns an empty array. Functions follows the very convenient incremental naming scheme of getModelList, getModelList2, getModelListNew, getModelListNew2, etc, where each of the four variations of the exact same function are in use *somewhere* in the code base, but nobody knows why or how to fix it, and at this point nobody even bothers.

It's a real mess, but I had forgotten how relaxing it is to work on something that is a mess from the get-go. No consideration at all. Just write code. No style guidelines, no best-practices, no sanity. Just write and make sure it works before it goes into production. It feels like I'm the king of the code, not another slave to a framework.

Just wanted to share. Ty.
>>
File: russian hacker.webm (2MB, 640x360px) Image search: [Google]
russian hacker.webm
2MB, 640x360px
repost

does anyone know how the image hash for the archives is generated?

for example this image >>60134742 has archive image hash ttnnYRUwvjgbvnwvkx3a2g

but when I look at its MD5 it says b6d9e7611530be381bbe7c2f931ddada
>>
>>60135329
What archive are you talking about?
>>
>>60135137
7th for Nagato!
>>
Rate my ffmpeg screen recording script!

https://paste.debian.net/plainh/c4558076
>>
Any decent net programming learning resources senpaitachi? Literally never touched the stuff. I want to write a desktop multiplayer tic tac toe or a chat from scratch to get basic knowledge how things work. Mostly use C++ at work atm
>>
>>60135137
building my search engine wibr.me. It will only have personal/hobbiest type pages like the old internet. if you can submit pages to it i'd appreciate it.
>>
>>60134718
>Also remember to reset the variable back to false when the encounter has finished
Would this be in the mainform because putting bool escaped = false; after

            if (escaped == true)
{
lblFight.Text = "Hero has fled...";
this.Hide();

}

errors escaped as already defined
>>
>>60135565
When you reset the variable back to false are you doing
bool escaped = false;
or
escaped = false;
?
Once you declare a variable with its typename you don't need to declare it again. You can just redefine it.
>>
Are there many programming jobs for English speakers in Norway?
>>
>>60135617
International programming jobs are often in English.
>>
>>60135565
The first time you write bool escaped = false, you're actually doing two things at the same time. First, you're telling that escaped is a boolean, and that escaped is false. When you have said that escaped is a boolean, you don't have to say it again. When If you put escaped = false (without bool first) after the block, it will work.
>>
How do i make an app that runs from the windows command line?

Like dotnet, npm, node or telnet?
>>
>>60135651
You write it. One character at a time.
>>
>>60135651
>app
>command line
Pick one
>>
>>60135608
Ah that cleared it up, thank you. I'm still getting the same result of instant pop in out so maybe my order is wrong
public partial class formEnemyFight : Form
{
public formEnemyFight()
{
InitializeComponent();
lblFight.Text = "An Enemy Approaches! COMMAND?";
bool escaped = false;
}


private void formEnemyFight_Load(object sender, EventArgs e)
{
lblFight.Text = "An Enemy Approaches! COMMAND?";
}

private void buttonFight_Click(object sender, EventArgs e)
{
lblFight.Text = "An Enemy Approaches! FIGHT?";
}

private void buttonEscape_Click(object sender, EventArgs e)
{

bool escaped = true;

if (escaped == true)
{
lblFight.Text = "Hero has fled...";
this.Hide();
escaped = false;
}

}
>>
>>60135617
There is probably some, as most Norwegians understand English pretty good and most tech companies will have English as their main working language. However, most Norwegians prefer to talk in Norwegian, so in case you're competing with other equally skilled applicants who do speak Norwegian, they will probably be selected over you, based solely on language capabilities. There is no harm in applying for programming jobs in Norway, though. https://www.finn.no/job/fulltime/search.html?industry=8&occupation=0.23 Good luck!
>>
>>60135694
Move the definition of `escaped` to just inside the class (line 3), and then you can use it in your functions with this.escaped (if (this.escaped), this.escaped = false, etc). Right now, escaped is deleted as soon as the function is done running.

When you're working with boolean values, you don't have to check if they equal true or false, you can just use them in your ifs. if (escaped == true) is the exact same thing as if (escaped).
>>
>>60135397
4chan archives
>>
>>60135624
>>60135728
Thanks anons
>>
>>60135770
public partial class formEnemyFight : Form
{
public formEnemyFight(bool escaped)
{
InitializeComponent();
lblFight.Text = "An Enemy Approaches! COMMAND?";

This errors all the escaped here
private void buttonEscape_Click(object sender, EventArgs e)
{

escaped = true;

if (escaped == true)
{
lblFight.Text = "Hero has fled...";
this.Hide();
escaped = false;
}

}


Are you saying that I can replace all the escaped with this.escaped?
>>
>>60135835
No problem!

>>60135840
Put
bool escaped = true] here
public partial class formEnemyFight : Form
{
bool escaped = true; // Here
public formEnemyFight()

And from there on out instead of saying
escaped
use
this.escaped
.

That makes
escaped
a class variable instead of a local variable. As a local variable it was getting deleted and re-set to true every time you ran the escape function. If you put it in the class it'll start off as true, but stay false once you set it that way. IE its state/value will persist between function calls/button clicks.
>>
>>60135840
public partial class formEnemyFight : Form
{
private bool escaped = false;

public formEnemyFight()
{
InitializeComponent();
lblFight.Text = "An Enemy Approaches! COMMAND?";
this.escaped = false;
}


private void formEnemyFight_Load(object sender, EventArgs e)
{
lblFight.Text = "An Enemy Approaches! COMMAND?";
}

private void buttonFight_Click(object sender, EventArgs e)
{
lblFight.Text = "An Enemy Approaches! FIGHT?";
}

private void buttonEscape_Click(object sender, EventArgs e)
{

if (this.escaped)
{
lblFight.Text = "Hero has fled...";
this.Hide();
this.escaped = false;
}

}


I was a little unclear when I said that you can move it to line 3. I meant introducing a *new* line 3, not inserting it into line 3.

It's about scopes. Basically, who can access what, and when. If a variable should only be accessed and used in a function, you should put the definition of that variable inside that function. If several functions should be able to access a variable, you should put the variable definition in the class. Do you see how I have made escaped part of the class?
>>
>>60135915
Well I fucked up the formatting. Just follow >60135920
>>
File: images.png (11KB, 306x165px) Image search: [Google]
images.png
11KB, 306x165px
Working on my experimental social media platform. Only one post at a time, which every user sees.

Currently set up so changing the post cost $1.

What do you think /g/?

http://showit.today/
>>
>>60135939
Why would anyone join this?
>>
>>60135939
you got a couple of ransomware sites on your ip bud, your site is even blacklisted in .ru
>>
>>60135520
Bretty cool shit anon.
>>
File: maybe i fucked up my winform.png (278KB, 1600x852px) Image search: [Google]
maybe i fucked up my winform.png
278KB, 1600x852px
>>60135920
Thanks but this window still isn't staying up, I even copied the code directly maybe there's something with my winform.
>>
>>60136025
Even turning this.hide into a comment is causing the window to not open
>>
File: 1470935526345.jpg (14KB, 185x185px) Image search: [Google]
1470935526345.jpg
14KB, 185x185px
is this "sum of primes below 2 million" an actual interview question?
>>
>>60136077
No. nor is fizz buzz. Some retard saw it on a even more retarded reddit post and brought it here.
>>
>>60136025
Debug it bruh, see what's happening and conclude whats wrong.
>>
>>60135958
Because you can broadcast anything you want to every visitor anonymously (for now) and with 0 censorship.

Also, I'm serious about donating the profits to charity, so there's there's muh virtue signalling.

This project is really just a proof of concept, in the future I'd like to set up something similar as a marketplace for buying ad time on electronic billboards, etc.
>>
>>60136077
Yes and so is the question "who's your favorite 2hu" and if you answer anything other thank Yukari-sama then you'll be fired.
>>
>>60136025
this.escaped is never true. You need to set it to true when your hero has escaped. Maybe the check in buttonEscape_click() should check if this.escaped is *not* true?

Right now, in plain words, the code says this: When we click the escape button, check if our hero has already escaped. If he has already escaped, set the text to "Hero has fled...", hide this, and tell everybody else that the hero has not escaped any more.

What I think we want to do is the following: Check if our hero has escaped, if he has not escaped, set the text to "Hero has fled...", wait a little, hide this and tell everybody else that our hero has escaped.

What do you think?
>>
File: wojak-schopenhauer.png (10KB, 214x236px) Image search: [Google]
wojak-schopenhauer.png
10KB, 214x236px
Any tips to program when the anti psychotics are not working so well and you feel insects crawling out of your head and walking through your body?

>pls respond and help me cope
>>
>>60135157
why is webdev so garbage
>>
>>60136169
Suicide seems like a pretty good option.
>>
>>60136077
It's more usual to give a bigger task with a few days to solve, rather than giving a tiny task with half an hour to solve it. Probably depends on the workplace, how many applicants they get, in what environment the development is, etc.
>>
>>60136186
I frequently consider it. It's has been worse thou.
>>
>>C++
void connect(TreeLinkNode *p) {
TreeLinkNode *pp = NULL, *q = NULL, *r;
while (p) {
q = NULL;
for (; p; p = p->next) {
r = NULL;
if (p->left) {
if (p->right)
p->left->next = p->right;
r = p->left;
} else if (p->right)
r = p->right;
if (r) {
if (q)
q->next = r;
else
pp = q = r;
if (q->next)
q = q->next;
if (q->next)
q = q->next;
}
}
p = pp;
pp = NULL;
}
}
>>
>>60136169
No idea, I'm sorry. I hope you'll get through it.
>>
>>60136107
>>60136091
I just found battleSculpture.hide in my main if else statement for showing the windows
Thanks for telling me to debug
>>60136162
And thank you for reminding me to make it true in the button click
Now I can move on to passing health values between fights and doing this again for all the other fights
>>
>>60136212
ty
>>
>>60136215
Good luck on your game! I hope I was of some help.
>>
>>60136152
sorry I like Tewi
>>
>>60136152
>Yukari-sama
>Not Yuyuko-chama
>>
>>60136109
No, I mean why would anyone visit this place to look at ads?
>>
Working on a neural network to detect bot matches in dota based on the hero composition and items bought in the game and other relevant match data.

Also writing a simple backend in golang for my upcoming data science blog (which will feature the above work). It will be very simple, but I want to learn some hobbyist webdev.
>>
>>60136208
if (q->next)
q = q->next;
if (q->next)
q = q->next;

Really fucked with my eyes. I keep seeing the q fish, and can't see at the code.
>>
>>60136193
I hope you feel better. Seriously.
>>
>>60136267
No her. I think it has potential as long as it has a social network aspect.
Like a craiglist with rating and global rank?
You can find the best gay hook ups in your area.
>>
>>60136292
You hope I feel better if I commit suicide or you hope the schizo gets better?
The first is very likely, the second not so much.

life is suffering
>>
>>60136169
>you feel insects crawling out of your head and walking through your body
You know it's not real, so ignore it.
>>
File: else statements ree.png (375KB, 1144x678px) Image search: [Google]
else statements ree.png
375KB, 1144x678px
>>60136230
You were, I was stuck on this all day. Now I need to remove the bounds on the invisible picturebox after the fight is over.
>>
I want to contribute to open source!
inspiring_anime_face.png
>>
>>60136335
>forms
>different forms
Please no. Go with WPF and use a single window + pages in a frame or something.
>>
>>60136332
That's not quite how it works but thanks.
There are some "coming" out of my thigh now btw.
>>
File: tewi_leather.png (56KB, 279x341px) Image search: [Google]
tewi_leather.png
56KB, 279x341px
>>60136248
>>
>>60136319
i hope you all live fulfilling lives
>>
>>60136338
I recommend you contribute to free software instead of open source.
What areas interest you?
>>
>>60136365
>you all
The insects and me?
They are not real you know...
>>
>>60136338
And what languages do you know?
>>
>>60136353
>That's not quite how it works
Okay, so you're an attention-whore who
is going to continue insisting he has a disease nobody else can see a sign of and that can't be fixed no matter what. Got it.
>>
>>60136347
I'm completely unfamiliar with that, does that condense all of these into one winform or something?
>>
File: AbstractKindOfFeel.jpg (42KB, 680x684px) Image search: [Google]
AbstractKindOfFeel.jpg
42KB, 680x684px
>>60136389
I like 4chan content quality.
>>
>>60136169
Take a break. Go do something different for a little while. Put the insects down outside, and tell them that they are not allowed inside.
>>
>>60136410
I laughed, thanks.
I took some(a lot) of xanax and hopefully I will fall asleep soon(hopefully forever).
>>
>>60136404
Oh my fuck. Put a picturebox in the center and change the picture to the sprite that you get into combat with. Why is there a new winform for each one?
>>
I can't sit still and read a fucking ebook!! help
>>
>>60136404
I think you should just keep using the forms for this project. Have fun with it and learn why you probably don't want to use them in your next project.
>>
>>60136427
Why? What happens when you try?

t. person with insects inside his head
>>
>>60136435
I read a few pages then i can't help but go on youtube or daydream. If i get off the internet i get severe anxiety.
>>
>>60136424
Insects are really annoying when they are inside, and it doesn't help to just throw them outside. They just come straight back inside again! But! If you put them down nicely and set the rules for where they are allowed to be and where they are not allowed to be, they usually listen. Only the occasional rebel will break the rules.
>>
>>60136332
Just because you know it's not real doesn't make it not feel real
>>
>>60136425
I was overthinking how I would handle having stats set for every fight and thought the only solution was to make every fight a different instance.
I'm a little confused on how to handle multiple fights since my last project was just
Console.WriteLine(heroName + ": {0}   King Slime: {1}", good.hitPoints, bad.hitPoints);
//displays current health every attack turn
int damage = (int)(good.GenerateAttack() * Weapons[weaponChoice - 1].damageModifier);
bad.hitPoints -= damage;
Console.WriteLine(heroName + " dealt {0} DMG", damage);
//displays hero damage every attack turn
if (bad.hitPoints <= 0)
{
Console.WriteLine(heroName + " won the fight...");
Console.ReadLine();
Console.WriteLine("*****************Congratulations " + heroName + "!*****************");
Console.ReadLine();
break;
}
//break ends the loop

damage = bad.GenerateAttack();
good.hitPoints -= damage;
Console.WriteLine("King Slime dealt {0} DMG", damage);
//displays enemy damage every attack turn
if (good.hitPoints <= 0)
{
Console.WriteLine(heroName + " lost the fight...die");
Console.ReadLine();
break;
}
>>
>>60136445
Change all your passwords to really long complex ones. Save all of them on a password manager(keepassx for example) with a super long master password. Set you browser to delete cookies on exit.

Try daydreaming while reading and paying attention, it's a good mental exercise.

Or

Put some noise music on so your. The extra effort required to concentrate will make daydreaming impossible.

Read those few pages and try your best go read some few more. It gets easier after you get into it.

Realize everyone on the internet is retarded and not worth your time.

Try to pose questions to yourself about what you are reading and try to explain it to a retarded imaginary friend(like they were a 4channer).

>>60136459
hahaha, actually this somewhat works for short periods of time but the mental effort required is absurd.
>>
>>60136501
I didn't say he should make it not feel real, I said he should ignore it.
>>
>>60136404
I would do something like creating a class called monsters or entities and set each monster an id, name, hp, skills, etc. then if this monster id equals to the one you touched instance that monster into the combat form.
>>
Going to sleep bois. Hope your insects stay outside and you manage to concentrate on your readings.
>>
>>60136502
>Console.WriteLine(heroName + ": {0} King Slime: {1}", good.hitPoints, bad.hitPoints);
You'll probably want to pass in a monster object or something to the form's constructor or whatever the fuck you do in C hashtag. Or make a public method in the form to set up the enemies. Then switch it to
Console.WriteLine(heroName + ": {0}   {2}: {1}", good.hitPoints, bad.hitPoints, Enemy.Name);

or something. Put an Image into the Enemy class and you can make the picturebox and set that image to it and get rid of the extra forms.
>>
FUCK MY LIFE, ALL PROGRAMMING LANGUAGES ARE SHIT, ALL OPERATING SYSTEMS ARE SHIT, THE INTERNET AND EVERYTHING ON IT IS HOT STEAMY SHIT.

i swear to god i'm gonna burn all the technology i own, sleep the rest of my life away and see how long it takes my fat ass to starve
>>
>>60136595
make your own
>>
>>60136605
>"make" your "own"
kill*
self*
ftfy
>>
>>60136622
that's not what i meant at all
>>
>>60136631
to be slightly more coherent in my rage:
don't you fucking hate it when you accidentally uninstall your GUI and you don't know what packages to reinstall to get it back and you also can't check because your network manager went down with it and of course you could just use ethernet except your computer doesn't have an ethernet port and you have another working computer but the fucking worst part is your connection is taking fUCKIGN ages to download the shit what all you have to install on your thing and you know when it's done you'll just have to fucking reconigure and reinstally everythinfg
>>
File: 1489747043869.png (153KB, 324x434px) Image search: [Google]
1489747043869.png
153KB, 324x434px
>>60136169
>>60136258
>>60136347
>>60136622
Can you stop typing in this retarded fashion if you aren't quoting anyone?
>>
>>60136665
Why do people keep insisting on propagating this unfunny meme?
>>
>>60136605
Not him but I'm actually I am in the process of doing this. Writing my own OS and everything.

Using a z80 processor because I've made z80 emulators before. I basically have 2mb of "ram" and it's so comfy. More than I'll ever use in the foreseeable future. Use an SSD for permanent storage (don't even have a file system). Using just serial from my PC to communicate with it instead of writing my own usb drivers (and I'd probably have to get a dedicated chip for processing USB). I'll probably have to snag a PS/2 keyboard.

Trying to figure out what I should do for a "video card." It'd be nice to have some fancy graphics.
>>
>>60136673
>"people"
It's just one person dude.
>>
>>60136665
Can you stop forcing this trash meme?
>>
>>60136679
are you making an fp language
>>
>>60136673
>>60136694
>meme
I don't see your sentence making any sense. What is this "meme" thing you keep talking about?
>>
Will I find happiness as software engineer?
>>
>>60136665
>mfw newfag 1chan user doesn't know what meme arrows are
Brah.
>not knowing how to green text
>2017
>>
>>60136712
>mfw
>meme
>greentext
You seem to have wandered in from a parallel universe.
>>
>>60136712
>1chan
>not using 12andwhatisthischan
newfag
>>
>>60136725
Mfw My face when) this! Tfw (That feel when) cool meme
>>
>>60136748
>>
>>60136704
suicide is the only path to happiness engineeru-senpai
>>
Holy fuck this thread went full retard.
>>
>>60136878
You ARE full retard. end self
>>
>>60136885
End your own self immediately*.
>>
She's not even cute.
>>
// returns number of 1s in x
int pop0(unsigned x) {
x = (x & 0x55555555) + ((x >> 1) & 0x55555555);
x = (x & 0x33333333) + ((x >> 2) & 0x33333333);
x = (x & 0x0F0F0F0F) + ((x >> 4) & 0x0F0F0F0F);
x = (x & 0x00FF00FF) + ((x >> 8) & 0x00FF00FF);
x = (x & 0x0000FFFF) + ((x >>16) & 0x0000FFFF);
return x;
}
>>
File: shed.jpg (145KB, 820x960px) Image search: [Google]
shed.jpg
145KB, 820x960px
as a self taught programmer whos main language is javascript but knows ruby, php and to a lesser extent c, would learning java be a good use of my time? I mean I already know the syntax essentially but have no familiarity with the various collection objects and threads or build tools. I've never even used a real IDE, just vim from day 1. So I mean just really knowing java, to the point I could get a job doing nothing but java without feeling in over my head.
>>
File: OHHHHHHHHHHHHHH.png (2MB, 1800x900px) Image search: [Google]
OHHHHHHHHHHHHHH.png
2MB, 1800x900px
>>60136895
UM, You don't evcen funcking lift?!?!?


OHHHHHHHHHH, OH, OHHHHHH, MOM GET THE CAMERA, OHHHHHHHHHHHHHH OHHHHHHHH MOM GET THE CAMERA, OHHHH
>>
Does anyone have a recommendation for a x64 dissembler?
>>
>>60136950
templeos
>>
>>60136931
>javascript but knows ruby, php and to a lesser extent c
>>>/g/wdg/
>>
>>60136954

I laughed when I saw it, but noticed it's actually a serious project....now I'm depressed.
>>
>>60136931
Yeah, it'd probably be worth your time. There's decent demand for it.

It should be a cinch to learn given what you already know. Think of it as having javascript-like syntax, a somewhat ruby-like class hierarchy / object model (except with way more classes), and C-like type logic (except with generics / dependent types).
>>
File: 1475332797992.jpg (171KB, 1280x1024px) Image search: [Google]
1475332797992.jpg
171KB, 1280x1024px
>>60137012
>generics / dependent types
>>
>>60136924
// returns number of 1s in x
int pop0(unsigned x) {
return __builtin_popcount(x);
}
>>
File: 1488203442650.jpg (103KB, 723x712px) Image search: [Google]
1488203442650.jpg
103KB, 723x712px
>>60137012
>>60137032
>>
>>60137032
A generic is a "variable" that holds a type instead of a value. It can exist in a class or function without holding any type at the time, and then be "filled in" when the class is instantiated or the function is called. For example, in Java, ArrayList<T> is a class that depends on the generic type T, and defines a list whose elements are of whatever type T is -- e.g. an ArrayList<Integer> would be a list whose elements have to be integers.
>>
>>60137037

if it has 2 underscores infront of it you're not supposed to fuck with it
>>
>>60135137
I spent two months tinkering and making my own framework for my game. I effectively reinvented the "Systems" design pattern for game development without at first realizing it (I'm using C# and unity). Sometimes I would just sit at my desk with my eyes closed for an hour, imagining how the entire framework would react to the different "systems" (I still didn't have a firm grasp on what a "system" should definitively be in code). I would hit a brick wall 15 minutes in, and have to change something in the beginning and visualize it all step-by-step again in my head. And if I finally got it to where it made sense "okay this "schematic" works for items, but what about status effects, or units?" and sometimes I'd have to start all over again. I came up with clever designs that the game engine I was using would ultimately reject; things which would work in C# 4 (unity uses Mono); sometimes workarounds were impossible and I'd have to start over.
The overall design of the various parts of my game now integrate DAOs, MVAs, the state pattern, and the reactor pattern to do most of the heavy lifting.
I may not have come up with any completely original design patterns, but it was the most mentally taxing thing I've ever done and I learned more about game development (specifically entity component systems) in those two months than I have for the past year and a half. I also finally started to enjoy game development more - I finally know where everything was happening and why.
Multithreading is still a little new to me though...
>>
>>60137125
that's not a dependent type
>>
File: current mess of code.png (13KB, 295x410px) Image search: [Google]
current mess of code.png
13KB, 295x410px
>>60136561
What would the pseudo for that be?
if testhitwall == true
picenemy.visible = false
battle.show();
piclrgenemy.visisble = true
picEnemylrg.Image = Image.FromFile("path");
>>
>>60137153
wrong
>>
>>60137125
As an addendum, it's noteworthy that in the case of JavaScript and Ruby, there's no meaningful difference between a variable holding a type and a variable holding a value, because in Ruby types are values, and JavaScript has no real concept of type, using strings to represent primitive types and stateful functions to represent classes. However, in Java, as in C, everything's type must at compile time be either known or explicitly declared to be unknown (void* in C, ? in Java), and therefore types cannot be treated as first-class objects, and the special syntax of generics is necessary to achieve the end result of type dependence.
>>
>>60137125
>A generic is a "variable" that holds a type instead of a value.

Close but not quite. You're thinking the T in ArrayList<T> is the generic. T is not the generic, ArrayList<T> is the generic. A generic is a template for a class which operates on currently unspecified types of objects.

ArrayList<T> is a template for an ArrayList of homogeneously typed objects (objects of type T). When you want to initialize a new ArrayList you need to specify the type of objects it will contain so the compiler (or interpreter) can enforce type safety, which is why you can create e.g. an ArrayList<Integer>.
>>
>>60137227
>template
poor choice of word
template generally refers to something like a C++ style template that is instantiated at compile time and is almost like a copy-past

>class
not always
>>
>>60137125
>>60137186
In what way is this related to dependent types?
Not having a distinction between a variable holding a type and a variable holding a term isn't enough. There should be no distinction between terms and types themselves.
>>
Are "Technical Writing" interships hell?
>>
>>60137324
>I'm thinking of using CLOS so that I learn more about OOP.
Why would you want to do such a thing?
>>
When did you guys finally get pointers? I'm a beginner but I'm breaking my head trying to understand them and how to use it effectively.
>>
>>60137363
About a few days in.
>>
>>60137351
CLOS is said to be the top of the top when it comes to OOP.
>>
>>60137363
pointers are useless.
learn java for code monkey job.
>>
How do I get over analysis paralysis? Or more specifically to my case, something I'm calling beginner's/learner's anxiety. Like I'll get set on learning a particular language or using a particular video series/book but I can always find reasons to drop it and change because of some points in a bad review or any other reason why it might not be "perfect". Just the fear of learning the wrong habits or using a resource that isn't comprehensive enough keeps me from committing to any singular learning path

h e l p
>>
>>60137381
That wouldn't really matter since anything even remotely related to OOP is complete garbage.
>>
>>60137408
Oh yeah, then how can I reuse code?
>>
>>60137399
Just do anything at all as long as you stay away from w*b "dev" and OO"P".
>>
>>60137012
Yes, I essentially already know the language. The algorithms coursera classes (sedgewick not buttgardner) I took used java so I basically learned it then. But I never wrote anything in java. I would just have to learn the java standard library stuff and probably a buid tool like maven along with using an IDE. But that's actually a pretty significant time investment I think? Maybe not.

I kind of get the impression everyone here does java during the day for work then plays with meme languages at night. I'm done with meme languages.
>>
>>60137426
By not using a garbage language, but that's probably impossible at this point in your life judging by your mental illness.
>>
Hey /g/, I recently got a laptop to fuck around learning how to code, installed ubuntu on it, and I'm having problems compiling the examples, Im using geany because I couldnt figure out how to save on Vim (esc shift ZZ wasnt working) now when ever I try to compile the saved files I get some permissions error, wat do? and here is some extra shit because im asking for help in multiple threads to try to get a response as fast as possible
>>
>>60137444
>I kind of get the impression everyone here does java
No, not everyone here is subhuman.
>I'm done with meme languages.
Why would you be learning Java then?
>>
>>60137408
Bet you're one of those faggots that spouts /dpt/ memes and has no clue what he's talking about.
Give me reasons why you despise OOP.
No memes.
>>
>>60137466
:w is save
:wq is save & quit
:q is quit
>>
>>60137474
Thinking in terms of real world objects is naturally the opposite of abstraction
>>
>>60137474
>memes
Yes, now I see. It seems like the disease has spread too far already.
>Give me reasons why you despise OOP.
Where did I ever say anything like that?
>>
In bash/shell script, do environment variables override local variables or vice versa?
>>
>>60137486
Not an argument.
>>
>>60137466
>how to code
Coding isn't programming.
>>>/g/wdg/

>>60137500
Not programming.
>>>/g/wdg/
>>
>>60137466
>>60137485
CTRL+C or ESC to get into command mode to enter :w :wq or :q
>>
File: 1475432842909.jpg (76KB, 515x698px) Image search: [Google]
1475432842909.jpg
76KB, 515x698px
>>60137518
b-but it literally is an argument
>>
>>60137518
This is a shitty non-argument that is designed to deflect all criticism.
>>
>>60137519
>shell script
>not programming
>not also python, ruby, javascript
>>
>>60137528
No, since you can model abstract objects in OOP.
>>
>>60137551
You aren't listening
>>
>>60137500
They are all the same in shell. The only difference between an environment variable and a regular variable is that the former is marked "export" so that it's propagated to all processes your shell creates.
>>
>>60137560
Window buffers and locks are two examples.
>>
>>60137579
In what way is either of those "abstract"? Does OOP really have this much of a negative impact on the brain?
>>
>>60136981
>being this new
>>
>>60137153
No, you're just not supposed to define identifiers with that form. Nothing wrong with using the ones provided by thte implementation.

Although having a function that does NOTHING BUT call the implementation function is pretty pointless, you might as well just call the builtin directly, or just use a macro.
>>
>>60137579
By thinking in terms of objects you are naturally shunning abstraction.
You can say "x y and z can be thought of as an abstract object" but you forget that not all things can be so, nor is it necessarily best to think as such.

Even worse, this "abstract object" notion is often so general that there isn't anything "object" about it (certainly nothing OOP).

The reality is that most mainstream "OOP" languages are, for the most part, C, with classes added on.
>>
>>60137471
what languages do people here actually get paid to write? I'd bet there are more java people than c++ by a wide margin.
>>
>>60136208
>Pointers
USE
SMART
POINTERS
>>
For anyone reading SICP, here is a benchmark to help you pick an implementation: http://ecraven.github.io/r7rs-benchmarks/benchmark.html
stalin is insanely fast, it can produce binaries capable of calculating up to ten times faster than gcc, chez might be comparable to gcc.
>>
gyus I wrote this algorithm but it takes super long to compute and I dont understand why

def faulty_odometer(n):
m = 0
i = 0
while i <= n:
for x, o in enumerate(str(i)[::-1]):
if o == '4':
m = m + 10 ** x
i = i + 10 ** x
i = i + 1
return n - m

>>
>>60137671
>st*lin
Sorry, I don't use mentally ill garbage.
>>
>>60137658
Why would someone shoot themselves in the foot like that?
Can you imagine how ugly and difficult to read that code would have been if he used smart pointers?
>>
File: Siskind.gif (435KB, 732x536px) Image search: [Google]
Siskind.gif
435KB, 732x536px
>>60137680
The fuck are you on about?
https://engineering.purdue.edu/~qobi/
https://engineering.purdue.edu/~qobi/software.html
>>
>>60137721
>The fuck are you on about?
It's pretty clear, I said that I don't use mentally ill garbage.
>>
In SQL, I want to change the ID of a particular customer. They have a unique key (phone number) so I append an underscore to it so that I can create a copy record with the proper values and new ID, then I update the invoice table records referencing the ID to point to the new record and delete the now-unused old record.

Is there a simpler way of doing it than this? (even if you probably shouldn't be in the first place; I'm just learning stuff)

UPDATE Customer SET phone = CONCAT(phone, '_') WHERE customer_id = 64;
INSERT INTO Customer (SELECT 72, first_name, last_name, SUBSTRING_INDEX(phone, '_', 1) FROM Customer WHERE customer_id = 64);
UPDATE Invoice SET customer_id = 72 WHERE customer_id = 64;
DELETE FROM Customer WHERE customer_id = 64;


I know I can change the foreign key constraints so that they automatically update but in this case I want to do it using only DML commands (and no unsetting foreign key checks either).
>>
>>60137755
Wrong thread.
>>>/g/wdg/
>>>/g/sqt/
>>
>>60137740
There is no way a software can be mentally ill, it does not have a mind in the first place.
>>
File: cccp.png (509KB, 734x582px) Image search: [Google]
cccp.png
509KB, 734x582px
>>60137777
And check'em
>>
Playing around with swift 3, getting an error when I compile, it doesn't like the '>'.

Anyone have a clue, its probably such an easy fix.

ERROR: /Users/cevapi/Documents/xCode/MyFirstApp/MyPlayground.playground:21:44: Binary operator '>' cannot be applied to two 'Double?' operands

 
//: Playground - noun: a place where people can play

import UIKit

class Fruit: NSObject {
var name:String?
var price:Double?

override init(){

}
init(name:String, price:Double){
self.name = name
self.price = price
}
}

var fruits = [Fruit(name: "green apples", price: 0.80), Fruit(name: "blue apple", price: 0.20), Fruit(name: "red apple", price: 1.20)]

func HighestPrice(fruitArray: [Fruit]){
let sorted = fruitArray.sort({$0.price > $1.price})
}

HighestPrice(fruitArray: fruits)
fruits.last?.price
>>
>>60137622
Hence why you can have abstract classes
They represent the collection of subclasses.
>>
What language can I teach to my gf, thinking of Python.
Or Lisp maybe?
>>
File: 1486678895770.png (122KB, 262x207px) Image search: [Google]
1486678895770.png
122KB, 262x207px
>>60137777
I have been researching this and I've arrived at the conclusion that some software (mainly compilers and interpreters) possess something very similar to a "mind".
I would consider using it because of its speed, but I'm afraid I can't since it's mentally ill. Perhaps you could rename all instances of mental illness in the source code to something else and then send me a copy of it?
>>
File: wip.png (45KB, 1239x487px) Image search: [Google]
wip.png
45KB, 1239x487px
building a viewer to visualise i3s container system

import json
import subprocess
import time

def jcurse(data, depth=0):
for x in data['nodes']:
if x['focused'] == True:
print('>>',' '*depth, x['name'])
else:
print(' '*depth, x['name'])
jcurse(x, depth=depth+1)

while True:
raw_json = subprocess.run(['i3-msg', '-t', 'get_tree'], stdout=subprocess.PIPE)
parsed_json = json.loads(raw_json.stdout)
print(chr(27) + "[2J")
jcurse(parsed_json)
time.sleep(.1)
>>
>>60137881
If you absolutely have to teach her a shitlang, at least make it one of the least shit ones. So yes, Lisp.
>>
>>60137863
What?
This post is complete unrelated nonsense
>>
>>60137676

I wrote it like this and now its even slower

def faulty_odometer(n):
m = 0
i = 0
while i <= n:
print (i)
if '4' in str(i):
m = m + 10 ** str(i)[::-1].index('4')
i = i + 10 ** str(i)[::-1].index('4')
i = i + 1
return n - m
>>
>>60137860
> Binary operator '>' cannot be applied to two 'Double?' operands

This means you have a type error. This might show up when you're comparing an Int to a Double, for example. But int his case your problem is that these two are optional Doubles. You have to unwrap them somehow. The quickest way is to add ! to force unwrap them, but if they're nil at any point your code will crash.

    let sorted = fruitArray.sort({$0.price! > $1.price!})


the real solution here is probably to make "price" implicitly unwrapped I think it's called
so change
var price:Double?
to
var price: Double!
>>
>>60137911

maybe it's the string reversing thats slowing it down?

is reversing a string actually a heavy operation?
>>
I'm finally graduating which means I have free time to work on projects until I get an actual job. But I don't know what to work on because I have absolutely no creativity
I kind of want to try something with a GUI since I've rarely done anything with one in my school work
Any suggestions?
>>
>>60137888
What the fuck are you smoking?
>>
>>60138003
Immortality machine
>>
>>60138019
What the fuck is that supposed to mean?
>>
>>60137924
hey thank you for that! it worked, what do you mean by 'unwrapped', why did that cause it to work? Just want to get my head around it for future reference.

also, I'm getting this warning now after the fix:
/xCode/MyFirstApp/MyPlayground.playground:26:9: Initialization of immutable value 'sorted' was never used; consider replacing with assignment to '_' or removing it

Do you have to create a var called sorted when before I use it in this line of code?

let sorted = fruitArray.sorted(by: {$0.price > $1.price})
>>
>>60138037
It's a machine that makes you immortal
>>
>>60138003
Create some sort of eternal life mechanism.
>>
File: 1490351956931.jpg (62KB, 400x468px) Image search: [Google]
1490351956931.jpg
62KB, 400x468px
>>60138010
I don't understand what exactly in my post warranted this kind of response. Anyway, could you help me?
>>
>>60137911
You will have to first improve that if '4' in str(i) test. Instead, create a function generating the numbers directly that have 4 in them, not stupidly going from i to n testing every one, especially using a cast to string.

Remove the print it's unnecessary (that takes a lot of cycles).

I don't know what you're trying to compute with 10 ** str(i)[::-1].index('4'), but at least compute it once and then add them to m and i.

Add some comments when presenting code too, I have no idea of the expected output and what you're trying to achieve.
>>
>>60138039
You don't use the variable "sorted", just don't assign the expression to anything (remove let sorted =).
>>
>>60135939
Is wikipedia really banned in Turkey?
Was it really because of that turkroach edit?
>>
>>60136152
>not reimu
>>
>>60137907
What's the least shit lang.
>>
>>60138129
I don't think it's known at this point.
>>
>>60138039
basically, Double! and Double? are "optional" types
this means they can either be an actual double like 0.01 or nil

So at any given time, "price" might be nil, meaning there might be no price

The compiler doesn't necessarily know the value at compile time so there are various safety things built in to prevent things that will obviously fail, although sometimes this is unknowable which is when implicitly unwrapped stuff comes in, etc.
basically if you make this non-optional yo don't have to worry about unwrapping.

"unwrap" means to get a value from an optional and make it non-optional, like this:
if let someVar = someOptional { do something with someVar which is no longer optional }



>also, I'm getting this warning now after the fix:
i don't know what you're trying to do here, but the warning is just because you don't actually use "sorted", you just create it for no apparent reason


also there is all sorts of shit wrong with what you wrote, I don't know why you're subclassing NSObject either. I will post my code in my next post since I'm out of characters
>>
File: moving on to the fight.png (39KB, 750x618px) Image search: [Google]
moving on to the fight.png
39KB, 750x618px
>>60137171
Is it not possible to use {0} or {1} to place variables inside of text for labels?
>>
>>60138120
Where does his post mention Reimu?
>>
>>60138151
It's certainly possible if you use string.format, but the constructors for labels don't implicitly make use of that.
>>
>>60138039
>>60138147

class Fruit {
var name: String
var price: Double

init(name: String, price: Double) {
self.name = name
self.price = price
}
}

let fruits = [Fruit(name: "green apples", price: 0.80), Fruit(name: "blue apple", price: 0.20), Fruit(name: "red apple", price: 1.20)]

func highestPrice(_ fruitArray: [Fruit]) -> [Fruit] {
return fruitArray.sorted(by: {$0.price > $1.price})
}

highestPrice(fruits)


also for more on optionals, read Apple's docs, they're really clear and well-written:
https://developer.apple.com/library/content/documentation/Swift/Conceptual/Swift_Programming_Language/TheBasics.html#//apple_ref/doc/uid/TP40014097-CH5-ID330
>>
>>60138055
>>60138058
Given an infinite amount of time, you would eventually experience every possible unique experience, and be forced to rely on increasingly-large sequences of prior experiences. Then you would either stop thinking from boredom or start forgetting the past and enter a loop.
>>
>>60138165
>>60138039
>>60138147
also, to clarify, if let is an example of optional binding and not unwrapping according to the dox, but it serves the same purpose
>>
>>60138165

is this js?
>>
>>60138188
swift 3.0
>>
>>60138147
>>60138165
Thanks for taking the time to explain, will definitely look into those docs.

I'm following some swift3 guide I found online just to get myself familiar with the language structure etc.
>>
>>60138157
"being that guy"
>>
>>60138163
How would I do that? would I have to declare the label as a string variable?
>>
>>60138193
I recommend https://www.hackingwithswift.com/read
>>
>>60138221
Something like this:
Label.Text = String.Format("{0}: {1}", axis.Name, axis.Magnitude);

I'm not sure how your labels actually work, but string.format(...) just returns a string that's formatted. I think WriteLine/Write methods implicitly call string.format if they have trailing variables.
>>
In Java, say you have a bunch of check-boxes. When the user clicks a button, different things will happen depending on what boxes are checked. Disregarding the brace placement, how can you make the selection logic cleaner without having a million if-statements, like this:
                if(b1.isSelected())
{

}
if(b2.isSelected())
{

}
if(b3.isSelected())
{

}
if(b4.isSelected())
{

}


if(b5.isSelected())
{

}
if(b6.isSelected())
{

}
if(b7.isSelected())
{

}
if(b8.isSelected())
{

}
if(b9.isSelected())
{

}
>>
>>60138345
Turn each button into its own implementation of a class and give it a onSelect function.
>>
>>60138345
Don't name them b1, b2, b3, etc. Add them all to an array of checkboxes.
>>
File: 1350594293765.jpg (111KB, 500x500px) Image search: [Google]
1350594293765.jpg
111KB, 500x500px
Does anyone here have experience using OpenGL? I don't know whether I should use the single-program approach (where you put a bunch of shaders into a single program and switch between programs as needed) or the multi-program approach (where you typically put one shader per program and link all the programs together using a program pipeline).

Which is the most flexible approach? Which do modern day games use?
>>
File: 1486503004985.jpg (27KB, 480x580px) Image search: [Google]
1486503004985.jpg
27KB, 480x580px
Creating a new language which will probably be called "calculus of (co)anime constructions". The first test compiler is already faster than GCC.
>>
>>60138429
faster at compiling or produces faster code?
>>
>>60138435
Both.
>>
>>60138429
>Compile speed

Nobody gives a shit about that.
>>
File: 1483908333348.jpg (94KB, 645x720px) Image search: [Google]
1483908333348.jpg
94KB, 645x720px
>>60138445
Where does my post say "compile speed"?
>>
>>60138443
Sure it is
>>
>>60138445
Plenty of people do. It's great for rapid iteration on ideas. Having to wait for a program to compile breaks the flow immensely.
You'd know if you hadn't had your flow interrupted all the time.
>>
how 2 download bickbucket repo?
>>
File: 1493363267244.jpg (50KB, 849x852px) Image search: [Google]
1493363267244.jpg
50KB, 849x852px
>>60138471
Well, the former isn't hard at all. Neither is creating faster code, GCC is pretty bad.
>>
File: 1486578507035.png (538KB, 978x998px) Image search: [Google]
1486578507035.png
538KB, 978x998px
>>60138452
>The first test compiler is already faster than GCC

Right there. Dumbass.

>>60138491
That's why nigh-all modern programming languages have differential compiling (i.e. only compiling modules which were changed since the last compile).
>>
File: baffling nigel farage.gif (2MB, 360x240px) Image search: [Google]
baffling nigel farage.gif
2MB, 360x240px
>>60138345
hahaha the fuck man
use a loop/array or something
>>
>>60138505
>incremental compiles
How long do your incremental compiles take? Build acceleration is a fucking topic anon. It's not something trivial you turn on. Not for any decently sized projects anyway.
>>
why does nobody appreciate programmers while the average population cant even use google
>>
File: solve (1).jpg (115KB, 937x870px) Image search: [Google]
solve (1).jpg
115KB, 937x870px
>>60138429
Could you elaborate? What makes your language different? Is it typed? Is it recursively enumerable?
>>
My only issue with Vim is that you have to spend time building your vimrc.

I guess I should just steal one from someone on github.
>>
>>60138599
they're fucking nerds, and they're the reason your phone doesn't wanna work
fuck nerds, dumb pasty cunts
>>
>>60138649
My vimrc is like 20 lines long.
>>
>>60138649
After stealing someone's vimrc, you're supposed to spend several weeks installing all the meme plugins and reading their documentation so none of them conflict with each other.

Just use nano.
>>
File: sad-pepe-640x480.jpg (29KB, 640x480px) Image search: [Google]
sad-pepe-640x480.jpg
29KB, 640x480px
Avatarfags and people that think it's not okay to post anime on an anime imageboard please BOTH go so I can resume discussing programming and asking stupid questions that nobody will ever answer
>>
usually programming general threads are super slow around this time of the day+

what went wrong
>>
File: 1486916646031.jpg (126KB, 1280x720px) Image search: [Google]
1486916646031.jpg
126KB, 1280x720px
>>60138614
>Could you elaborate?
Depends on what you want to know.
>What makes your language different?
The set of programs it accepts.
>Is it typed?
It can't be the case that it's untyped, so yes.
>Is it recursively enumerable?
I'm not that familiar with this, but it's strongly-normalizing and thus decidable.
>>
>>60138762
I meant strongly-typed.
>>
>>60135137
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)


wtf why do this have 2 return types?
>>
>>60138768
Yes, it is.
>>
>>60138778
WINAPI isn't a return type. It's probably a macro for some compiler attribute or something like that.
>>
>>60138752
Sorry anon I ruined it.
Just wait 4 more hours and they will be asleep.
>>
I have received information confirming that this an attack from a reddit bot.
And a really obvious one at that. Try running it at a time when the thread isn't supposed to be slow.
>>
Good thread fags
>>
>>60138778
https://msdn.microsoft.com/en-us/library/windows/desktop/ff381406(v=vs.85).aspx
>>
File: 1487617044835.jpg (87KB, 540x482px) Image search: [Google]
1487617044835.jpg
87KB, 540x482px
Jesus fucking Christ i've never seen a thread filled with so many incompetent retards who claim to be "programmers".
Here's a japanese image of a smug girl to piss someone off
>>
File: Untitled.png (23KB, 671x503px) Image search: [Google]
Untitled.png
23KB, 671x503px
SHOW ME WHAT YOU ARE PROGRAMMING RIGHT NOW
>>
>>60135173
>she
>>
>>60138443
post source
>>
>>60138871
That code is garbage. Why the fuck don't you just write a function
GLuint load_shader(const char *path, GLenum type);

or something?
POOfags, I swear.
>>
File: feels.png (7KB, 645x773px) Image search: [Google]
feels.png
7KB, 645x773px
>>60135157
Do I need to learn RoR to get a qt gf like her?
>>
>>60138871
Hey. Why did you steal my code and comment it?

Don't forget to check for file updates and recompile the shader during runtime. It's practically live code editing.
>>
>>60138871
WOW
I totally need to be reminded what every single line of the code is for!
That's some excellent code documentation!
Kindly do the needful and keep doing it!!!
>>
>>60138900
Not yet, I have to find a license which I can use to prohibit plebbitors from using it while keeping it accessible to humans at the same time.
>>
>>60138937
plebbitors aren't even human
problem solved
>>
>>60138910
Because the way I'm doing it I can add an array of my own Shader objects to a ShaderProgram which can then compile and link itself, while keeping the possibility to alter which shaders are being used.

>>60138927
I stole no code.

>>60138933
>Wow you totally commented every function header

T-thanks?
>>
>>60138886
I assure you, anon: she's 100% tomboy language.
>>
What's the best textbook(s) for learning data structures from the ground up?
>>
>>60138946
Exactly. I need to block them off from using it. They aren't human, but they can still use programming languages.
If I can't find a way to do this via some license, I will try making it harder to learn for their kind. But I don't know how to do that yet.
>>
>>60139003
CLRS
>>
>>60139003
Get a CS degree.
>>
>>60136665
Can you stop being retarded?
>>
>>60139012
>license: only humans may use this software
>>
>>60137153
If you've only got 2 digits in your IQ you shouldn't be fucking around with programming.
Now fuck off and kill yourself.
>>
>>60136665
>being this new
>>
File: 1484700469609.png (198KB, 1920x1055px) Image search: [Google]
1484700469609.png
198KB, 1920x1055px
>>60135173
D is fast. FAST!
>>
>>60139072
>100_000
wtf is that retarded syntax?
>>
>>60139098
https://english.stackexchange.com/questions/138047/when-writing-large-numbers-should-a-comma-be-inserted
>>
>>60139112
Looks retarded in a programming language
>>
>>60139120
Arbitrary. I actually wish C supported separators

How many 0's are in 100000000000000?
>>
Turing machines >>>>>>> literal shit >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Lambda calculus
>>
>>60139072
>Rust was the fastest
Cfags and Dfags BTFO.
>>
State Machines >>>>>>>>> C++ << C
>>
>>60139140
but that's wrong
>>
>>60139072
That benchmark is stupid and flawed.
>>
>>60139012
a software license that outlines different rights for different groups or outright denies you rights for being part of a specific group cannot be considered a free software license, and most git hosts explicitly disallow this in their terms of service.

Also, why was I blocked? I didn't even do anything.
>>
>>60139167
Well, it goes to show their performance are in the same ballpark.
>>
COCK
>>
>>60139185
Coq*
>>
>>60139177
Comparing extremely poorly written algorithms for extremely trivial problems is not a good benchmark.
$ cat test.c && gcc -O2 test.c && time ./a.out 
#include <stdio.h>

int main()
{
long long total = 0;

for (int i = 2; i * i < 100000; ++i) {
total += i;
}

printf("%lld\n", total);
}
50085

real 0m0.002s
user 0m0.000s
sys 0m0.000s
>>
>>60139212
>Oh look, I manually optimized an algorithm in a benchmark comparison
Here's your butthurt medal

Idiot. The program is looking for the sum of all square numbers within one million, it's a program that produces constant, receives nothing.

I can write a more "efficient" code:
printf("%d", 50085); done!
>>
>>60139260
100k*
>>
I can do
public void solveallproblems(){}


Now hire me for 300k starting.
>>
>>60139273
ok
the first problem is a 400k debt
>>
>>60139168
>a software license that outlines different rights for different groups or outright denies you rights for being part of a specific group cannot be considered a free software license
Why would I care about that? I simply don't want redditors to use my software. People can do whatever they want with it, but not redditors.
>and most git hosts explicitly disallow this in their terms of service
I won't be using them then.
>>
>>60139273
{<M,x> | M halts on input x}
>>
>>60139188
CoC*
>>
File: Untitled.png (6KB, 1043x92px) Image search: [Google]
Untitled.png
6KB, 1043x92px
Is there a better way of doing this?
>>
>>60139280
>Why would I care about that? I simply don't want white people to use my software. People can do whatever they want with it, but not white people

http://nonwhiteheterosexualmalelicense.org/.
>>
>>60139287
+ string(shaderSource)
>>
>>60139287
>>60139292
whoops

string(id)
>>
>>60139140
Which lambda calculus are you referring to?
>>60139160
What do '>' and '<' mean here?
>>
>>60139296
The shader_id is a GLuint which the string class does not have a constructor for. It can however simply be appended to a string with the + operator for some reason? I don't quite understand this.
>>
>>60139289
What are you implying? I couldn't care less if someone prohibits a certain race from using his software.
>>
>>60139305
how about

string("Unable to compile shader ") + shader_id
>>
>>60139314
Go be a bigot somewhere else.
>>
>>60139287
>String concatenation
That's fucking stupid.
log_warning("C++ was a fucking mistake %u Source %s", shader_id, "http://harmful.cat-v.org/software/c++/");
>>
File: Untitled.png (2KB, 639x20px) Image search: [Google]
Untitled.png
2KB, 639x20px
>>60139318
This worked, for some reason. Thanks for the help!
>>
>>60139337
string + string
what a fucking cancer
>>
>>60139337
wait, i meant
string("...") + shader_id
>>
>>60139322
Are you retarded by any chance?
>>
>>60139351
Can you take a hint?
You're no different from a far left bigot making racist software licenses.
You're using software to make a political statement.

Fuck off.
>>
File: meme man.jpg (48KB, 500x500px) Image search: [Google]
meme man.jpg
48KB, 500x500px
>>60139345
>uses c++
>hates operator overloading
>>
>>60139072
>Look at my overflowing programs!!!!
Really made me think
>>
>>60139363
What's wrong with bigotry?
>>
>>60139380
What's wrong with faggotry?
>>
>>60139384
doesn't make babies
>>
>>60139393
I asked what's wrong with it.
>>
>>60139412
spreads disease and doesn't make babies
>>
>>60139422
>>60139412
>>
>>60137125
Generics aren't a language feature, only a compiler feature.
>>
NEW THREAD!

>>60139439
>>60139439
>>
>>60139412
and i told you
>>
>>60139363
>You're no different from a far left bigot making racist software licenses.
I'm not a far left retard, which would mean me being no different from a far left retard is simply impossible.
>You're using software to make a political statement.
I would consider it more of a biological statement.
Also, there is literally nothing wrong with "bigotry". I don't know why people from your continent seem to think there is.
>>
>>60139441
..irrelevant shit
>>
>>60138345
Use java.lang.reflect.Method objects
>>
>>60135226
Hi Tom
Thread posts: 318
Thread images: 42


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