[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: 328
Thread images: 44

What are you working on, /g/?

Old thread: >>59955068
>>
Please do not use an anime image next time. Thanks.
>>
>>59958401
Second for D
>>
File: 1492316674227.jpg (29KB, 600x600px) Image search: [Google]
1492316674227.jpg
29KB, 600x600px
char x[]

vs
char* x
>>
File: 1491413390140.gif (2MB, 480x270px) Image search: [Google]
1491413390140.gif
2MB, 480x270px
>OOP
>>
>>59958448
kek
>>
>>59958441
A better question
char* x

or
char *x

or
char * x
>>
>>59958462
Second, no doubt.
>>
these threads are shit because of the amount of autistic faggots on >>>/g/ >>>/code/ when, without the ability to post and ban if you don't post code
>>
>>59958462
char* x
>>
I unironically enjoy VS Code
>>
>>59958544
20% CPU USAGE ON A BLANK DOCUMENT
>>
>>59958462
char* x

declaring more than one variable per line is for idiots anyway
>>
>>59958427
>You agreed with "loops are equivalent to recursion", then you disagreed with the same statement. In what way is that not a contradiction?

You are one dense motherfucker.

First of all, get your terminology straight and stop trying to twist everyone's words.

No I did not agree or disagree with:
>loops are equivalent to recursion

I agreed with:
>it is simply impossible to have a loop which can't be translated to recursion

And I disagreed with:
>Everything you do with a loop you can do with a recursive function

Those statements are not the same. One is abut concepts and syntax, and I agreed with it because you can in fact write any loop with recursion even if it's convoluted and inefficient. The other is a statement about objectivity and it's one you've contradicted yourself on when you admit recursion is less efficient as "everything" encompasses doing things with a certain level of efficiency.
>>
>>59958381
It's just a very different way to view the world/live, since for most of my life "not knowing" == "stupid, to be ridiculed". Thanks for your response.
>>
>>59958594
If you have a shit CPU, maybe.
>>
>>59958620
stop dragging autism from one thread to another, its just going to be replaced with another topic or more derailing
>who r u quoting
crap
>>
>>59958620
>And I disagreed with:
Disagreeing with it while at the same time agreeing with the previous statement without contradicting yourself is impossible.
>"everything" encompasses doing things with a certain level of efficiency.
It doesn't unless you try to play retarded word games.
"being able to do everything" isn't the same as "being able to do everything with a certain level of efficiency".
>>
File: 1486599378516.gif (354KB, 640x360px) Image search: [Google]
1486599378516.gif
354KB, 640x360px
>>59958401
Thank you for using an anime picture.

>>59958462
I used to use
char *x

But now I use
char* x

for my projects.
It's less enjoyable too look at now.

>>59958544
I tried to use VS Code, but the performance was shit; it's better than Atom though.
Install vim.
>>
>>59958620
>it is simply impossible to have a loop which can't be translated to recursion
Implies
>loops are equivalent to recursion
So you did in fact agree with
>loops are equivalent to recursion
>>
>>59958664
>install vim
I have primarily used vim for 10+ years. Performance is great for VS Code for me, you should use a better computer.
>>
>>59958651
>Disagreeing with it while at the same time agreeing with the previous statement without contradicting yourself is impossible.

It's not and I just explained why.

>It doesn't unless you try to play retarded word games.
>"being able to do everything" isn't the same as "being able to do everything with a certain level of efficiency".

Being fucking clear what you're saying and not putting words in other people's mouths isn't playing word games, it's using words the way they're meant to be used. You can't retroactively reword your point to make yourself look correct and then accuse others of playing word games you retard.

And yes, "being able to do everything" does include everything. Let's use some first order logic here.

Can do X with Y efficiency. If there is a value for X and Y where this is true for loops but not for recursion, then recursion cannot do everything loops can.

You logic and wording are both terrible which makes me wonder if you've ever programmed before in your life.
>>
>>59958664
>front cover is on the back
>>
>>59958858
but I thought moonrunes read rtl?
>>
File: memesh.png (43KB, 758x435px) Image search: [Google]
memesh.png
43KB, 758x435px
>>59958462
char *x
Is the right way but
char* x 
makes more sense and looks better

>>59958401
Working on a sh implementation in python, pic related
>>
>>59958858
Those Asian types read right to left
>>
>>59958849
>It's not and I just explained why.
It is. I hope you agree that these are different statements:
"being able to do everything"
"being able to do everything with a certain level of efficiency"

"x can do everything y can" means "x can compute everything y can", it meaning anything else is entirely irrelevant in this context.
>first order logic
Complete trash. Didn't even read past this sentence.
>>
>>59958818
Let me rephrase as my original wording is misleading: its performance is shit compared to Vim. Also I had Code installed on my SSD and my processor is fine. Again, though, Atom is the real train-wreck.
There's also a 2hu background theme for Code which is adorable; I miss that.

>>59958858
Where do you think you are?

>>59958872
They do.
>>
>>59958878
>Working on a sh implementation in python, pic related
I don't want reddit stink nearby. Fuck off.
>>
>>59958924
>There's also a 2hu background theme for Code which is adorable
Which one?
>>
>>59958872
>>59958891
LTR is more practical for a technical text.
>>
>>59958878
>
char* x
makes more sense and looks better
How does it make more sense?

char* a, b;

a is pointer to char, while b is a char. If anything this makes less sense.
>>
>>59958908
>It is. I hope you agree that these are different statements:
>"being able to do everything"
>"being able to do everything with a certain level of efficiency"

Yes, because "being able to do everything" means being able to do everything with all levels of efficiency.

>"x can do everything y can" means "x can compute everything y can", it meaning anything else is entirely irrelevant in this context

>You can't retroactively reword your point to make yourself look correct
>>
>>59958953
I can't remember the name, but search "anime" in the extensions marketplace. I think it was published by a Chinese dude.
>>
>>59958621
no prob anon. You sounds like you're really capable that's all that matters. not knowing and being a faster learner is better than knowing via rote memorization and having no elasticity to your learning.
>>
>>59959024
Implying that "do everything" means anything other than "can compute everything" when we were talking about Turing machines since the very beginning is outright retarded and dishonest.
>>
>>59959013
from the perspective that 'a' is of type 'char-pointer', it makes sense. But when you declare it like that it really doesn't make sense.
>>
>>59959064
>when we were talking about Turing machines since the very beginning

I think you might actually be mentally ill or something because your comment had nothing to do with Turing machines.

>dishonest

That's funny because since I jumped into this conversation all you've done is try to worm your way out of what you said and misrepresent what everyone else said.
>>
>>59959118
Reread the whole reply chain, that's what started it all. Do you have some memory related deficiency? Also I'm convinced at this point that you simply can't read and comprehend what's being said in a normal manner.
>>
File: 1456383325785.jpg (60KB, 702x864px) Image search: [Google]
1456383325785.jpg
60KB, 702x864px
I want to get into operating system programming. Does anybody know any good resources for that sort of thing? I'm probably going to base it on some flavor of BSD.
>>
>>59959174
are you trying to do something specifically POSIX or would you want to do something lower level for something embedded perhaps?
>>
File: 1490295976287.png (234KB, 545x530px) Image search: [Google]
1490295976287.png
234KB, 545x530px
my mom's trying to push me into an IT job paying $48k a year. she's very forceful about it. i'm majoring incomputer science and have a 3.92 gpa
>>
>>59959186
POSIX. I'd like to eventually make a desktop OS.
>>
>>59959199
dumb frogposter
>>
>>59959160

>>59957184
>>59957254
>>59957293
>>59957424
>>59957442
>>59957474

Oh look, you're completely full of shit, what a surprise.
>>
>>59959199
Tell her you can get a much better job.
>>
>>59959227
i did and she brushed me off saying 48k is a lot
>>
File: 1491280407879.gif (1MB, 350x272px) Image search: [Google]
1491280407879.gif
1MB, 350x272px
>>59959199
>>59959227
yeah dude for pay like that you'd be working with potato chips not computer chips
>>
is it ok to create tons of functions that make the code easier to read but longer?
>>
>>59959199
>>59959227
>>59959246
>>59959253
for the record I did nowhere near as you, do not have a degree, and make over 100K at the moment.
>>
>>59959264
What do you do?
>>
>>59959199
Tell your mom to fuck off.
>>
>>59959263
As long as you don't overdo it.
>>
>>59959296
I'm the consultant from earlier posts
>>
>>59959223
Your post just confirms that you can't read and comprehend even simple posts. Let me know when you can parse basic English.
>>
>>59959174
I hope it will be entirely GNU-free.
>>
>>59959174
stay foolish stay hungry
>>
>>59959331
Let me know when you have an argument.
>>
Which is the best JVM language apart from Java?
(Are any of the alternatives even used?)
>>
>>59959449
Scala and Clojure are very popular.
>>
>>59959468
How does this answer his question?
>>
>>59959468
Too bad they're fucking garbage.
>>
File: 1491377479911.gif (1019KB, 500x373px) Image search: [Google]
1491377479911.gif
1019KB, 500x373px
Solve this simple riddle:
>1 + 2 = 99
>>
>>59959013

Yeah, but the second snippet is generally avoided exactly because it's too easy to make that mistake. If you stick to the first style, and you should, then it makes sense.
>>
>>59959561
>Solve this simple riddle:
>>1 + 2 = 99

The answer is: False!
>>
>>59959561
javascript
>>
>>59959561
(1>(2+(9=9)))

The answer is: False!
>>
>>59959561
the ascii code for 1 is 49, and for 2 it's 50. 49 + 50 = 99
>>
>>59959223
Give me a functions/structure where you use recursions, ill try my best to find a loop/more efficient way of doing it.
Ive already done it plenty of times in my own code, bringing it out would feel like throwing poopy diapers at a baby.
>>
Why is everyone talking about Coq, verifiable C compilers, halting problems, Rust and substructural types /dpt/? I just woke up from a coma. Is our world tired of C ub shenanigans or what is happening
>>
damn, pajeet's not going to be hired by the federal govt anymore
https://www.youtube.com/watch?v=5lnus09vYo8
>>59959708
do dijkstra's
>>
>>59959714
I made a "pact" of sorts with a certain creature.
>>
>>59959728
Alright ill take a quick look into my A* code from years ago, once im done with this bug.

I asked for your code, but i see you have none.
>>
>>59959561
hanoi towers
>>
>>59959754
oops, i meant to quote this >>59959708
>>
>>59959728
oh thanks for reminding me I need to add pajeet to my filter.
>>
>>59959714
Why would we not be talking about Coq, verifiable C compilers, halting problems, Rust and substructural types?
>>
>>59959752
>I asked for your code,
no you didn't, think i'll start tripping since it's getting confusing with everyone being named anonymous
>>
>>59959767
You want me to do dijkstra's and hanoi towers?

again.
>I asked for your code, but i see you have none.

>>59959785
>Give me a functions/structure where _YOU_ use recursions
>>
>>59959769
filtering doesn't change reality, rajesh. you have to do back soon
>>
File: 1486768280446.png (99KB, 435x512px) Image search: [Google]
1486768280446.png
99KB, 435x512px
>>59959691
CORRECT!
>>
File: enlightened.gif (1MB, 300x250px) Image search: [Google]
enlightened.gif
1MB, 300x250px
>>59958615
overgeneralizing is for retards, anon :^)
>>
>>59959797
>>Give me a functions/structure where _YOU_ use recursions
quit acting dumb, i already told you i'm not who you thought i was. if you can really do recursive things iteratively so easily you wouldn't be getting defensive when i give you something to do it on
>>
>>59959797
i cant do hanoi towers even using recursion lmao
>>
>>59959820
memorizing the ascii table finally payed off

does 1 + 2 really = 99 in javascript?
>>
>>59959825
I gave you rules to adhere to and yet, you, did not, follow.
Im "upset" because it would be easier to improve your 20 line function then write a program for hanoi tower/ review my years old code.
>>
>>59958615
Declaring variables is for idiots anyway.
>>
>>59959855
>I gave you rules to adhere to and yet, you, did not, follow.
once again, no you didn't. i assumed you were acting dumb but i guess you really are just stupid
>>
>>59959174
check out the OSDev wiki
>>
>>59959869
>Give me a functions/structure where _YOU_ use recursions.
Does this not make sense to you?
Is this not a rule set?
1) you need to give me _a_ function.
2) _You_ need to be the one using the function.
>>
File: 1490296496833.jpg (25KB, 641x530px) Image search: [Google]
1490296496833.jpg
25KB, 641x530px
>>59959892
are you unable to read?
>>
>>59959914
Apparently i cant read your point.
Try explaining it.
>implying
Is for people like you, not people like me.
>>
File: trap-programming-2.png (2MB, 1058x1600px) Image search: [Google]
trap-programming-2.png
2MB, 1058x1600px
>>59958401
i was teaching my bro about recursion and generators

"""
This code is in the public domain.
"""

import unittest


def fib_loop(n):
x, y = 1, 0
for _ in range(n):
y, x = x, x + y
return x


def fib_recursion(n):
def f(m, x, y):
return f(m - 1, x + y, x) if m > 0 else x
return f(n, x=1, y=0)


def fib_generator():
x, y = 1, 0
while True:
yield x
y, x = x, x + y


class FibTest(unittest.TestCase):

expected = [1, 1, 2, 3, 5, 8, 13, 21]

def testFib(self):

for index, n in enumerate(self.expected):
self.assertEqual(fib_loop(index), n)
self.assertEqual(fib_recursion(index), n)

def testGenerator(self):
for actual, n in zip(fib_generator(), self.expected):
self.assertEqual(actual, n)


if __name__ == '__main__':
print(fib_loop(input('gibe number: ')))
>>
Does anyone here actually use OOP or think it is good?
>>
>>59959936
i saw you make a post asking a guy for recursive programs and that you could turn them into iteration, so i gave you one, and you flipped out
>>
>>59959958
I sure hope not.
>>
File: 1487918049558.jpg (98KB, 461x424px) Image search: [Google]
1487918049558.jpg
98KB, 461x424px
>>59960000
nice quads
>>
>>59960028
why is she so happy?
>>
Have you learned it yet /g/?
Time to put get with the future.
>>
>>59960038
Reminder that Rust is a straitjacket, there is valid, safe code that you cannot express in it
>>
>>59959838
Come on man u really think
>>
Oh God this is horrifying.
http://llvm.org/devmtg/2012-11/#talk12
A 30 minute talk (including Q&A) detailing how C++11s 'zero cost abstractions' are absolutely not.
Now hopefully clang does better but I don't want this kind of issues in my code. I already avoid C++ features because they're more often than not an extra layer of confusion but my God I hadn't considered the performance aspects of a compiler failure. Anyone using C++ extensively is basically praying to that these mortal men (compiler programmers) are infallible. Which is just crazy.
>>
>>59960049
>there is valid
Any code inexpressible in Rust is invalid Rust code.
>safe code
This is true, and it's precisely why Rust is garbage.
>>
>>59960050
the riddle really should've been '1' + '2' = 99
>>
Are there good alternatives to javascript, html and css (that compile to javascript, html and css) for use with electron?
>>
>>59960070
>electron
No, nothing that can be used with electron is good.
>>
>>59960070
>>59960078
Wrong thread, retards.
>>>/g/wdg
>>
File: 1480962683457.png (595KB, 871x1103px) Image search: [Google]
1480962683457.png
595KB, 871x1103px
>>59960070
yes, javascript, html, and css is a good alternative to javascript, html, and css
>>
>>59960086
Not programming related.
Thank you for posting anime, though.
>>>/g/wdg
>>
File: 1457552838197.gif (636KB, 500x545px) Image search: [Google]
1457552838197.gif
636KB, 500x545px
>>59960101
my pleasure sempai~
>>
File: blackmagic.png (14KB, 981x169px) Image search: [Google]
blackmagic.png
14KB, 981x169px
>>59960049
>>59960061
t. brainlets
>>
>>59960110
She looks like she's masturbating
>>
>>59960134
delete this and get the fuck off of this board
>>
>>59960123
t. straitjacketed and chastity belted foreverially by rust and loving it
>>
>>59960057
Oh and I also found
http://lists.llvm.org/pipermail/llvm-dev/2016-April/098229.html
Apparently as late as last year the outliner still wasn't in that great a shape.
So you have to watch out for large blocks of code where you early out too.

What a fucking mess.
Very eye opening though. Alexandrescu is Satan incarnate.
>>
File: 1445988481866.gif (886KB, 640x360px) Image search: [Google]
1445988481866.gif
886KB, 640x360px
>>59960134
>>
>>59960123
like trying to jack off in a chastity cage, i assume
>>
>>59960140
this
>>
>>59960141
>>59960177
t, undefined behaviorists
>>
I'm a music major who has to take java
this shit is retarded
you eggheads actually enjoy this or you have nothing better to do than jack off on your computer-themed body pillows
>>
>>59960282
>I'm a music major
I'm so sorry for your family
>>
File: 1480744229461.jpg (32KB, 426x500px) Image search: [Google]
1480744229461.jpg
32KB, 426x500px
>>59960282
>insulting java
prepare to fight
>>
>>59960282
>music major
>calling people egghead
lol
>>
>>59960282
No, java is a pretty terrible language, even for hobbyists.
If you want to have fun, you go C, or a higher level language that isn't so verbose.

Also can I have a venti blonde roast?
>>
I'm working on SICP, and have a small question regarding lambda expressions:
(define (f x y)
((lambda (a b)
(+ (* x (square a))
(* y b)
(* x y)))
(+ 1 (* x y))
(- 1 y)))


In the above expression, how does
lambda (a b)
know what values to use for a and b?

Is this like in lambda calculus where if you have (fx. (x+ 1) )5, , you substitute 5 in (f5. (5 + 1))?
>>
>>59960302
>if you want to have fun, you go Rust
indeed
>>
>>59958441
http://c-faq.com/aryptr/index.html
>>
>>59960302
At least they're not teaching him Go
>>
>>59960282
>I'm a music major
Guess who's becoming a bum in a few years?
>>
File: 1462876490285.jpg (55KB, 306x400px) Image search: [Google]
1462876490285.jpg
55KB, 306x400px
>>59960296
As long as they aren't insulting C# we're ok my friend
>>
File: 2017-04-18-181526_255x195.png (7KB, 255x195px) Image search: [Google]
2017-04-18-181526_255x195.png
7KB, 255x195px
>>59960308
Your code is misleadingly indented wrong,
(+ 1 (* x y))
is a and
(- 1 y)
is b.
>>
>>59960369
C# and Java are the same language if you squint a bit.
>>
>>59960376
What theme is that?
>>
>>59960401
>Compton
>>
File: 2017-04-18-181832_707x458.png (27KB, 707x458px) Image search: [Google]
2017-04-18-181832_707x458.png
27KB, 707x458px
>>59960401
This is emacs with the cyberpunk theme, in racket-mode.
>>
>>59960413
West side my nigga xD
>>
File: 1487181319909.png (552KB, 1450x1080px) Image search: [Google]
1487181319909.png
552KB, 1450x1080px
Gunna try and go through this as much as I can. Finished the first one in about an hour because of all the error checking I wanted to put in, so it wasn't just a one-off "you must input everything exactly like this" thing

Briefly considered putting in wildcard mask handling as well, but nah
>>
>>59960376
Sorry. 4chan messed up my indents.
>>
>>59960354
>>59960291
>>59960297
>>59960302
Okay Spock

>>59960434
lol is this for real
>>
File: sicp-madoka.png (673KB, 1280x720px) Image search: [Google]
sicp-madoka.png
673KB, 1280x720px
>>59960439
you see the arguments to the anonymous lambda - they should be one space to the right, each.
>>
File: 1482808330039.png (345KB, 620x640px) Image search: [Google]
1482808330039.png
345KB, 620x640px
I'm too dumb to understand how to implement a dummy node into the beginning of a single-direction linked list that uses a chain of linked nodes.

I get that the idea is to not have to deal with special cases for empty chains when I'm adding or removing nodes, but I don't understand how.

Is it just supposed to be an unremovable node that sits at the beginning of the linked list? Is that all I need?
>>
>>59960458
pls no bully :(
>>
>>59958462
char a, *b, **c, ***d;

The result of evaluating a is a char.
The result of evaluating *b is a char.
The result of evaluating **c is a char.
The result of evaluating ***d is a char.
>>
Why didn't Rust include dependent types? That way you could write a proof of certain code being safe when the compiler can't understand that on its own.
>>
int function()
{
...
return 0;
}

or
char function()
{
...
return 0;
}
>>
File: 1484028365460.png (35KB, 354x184px) Image search: [Google]
1484028365460.png
35KB, 354x184px
>>59960463
yes, pretty much. I think it's convention to make its value itself, or a sentinel value if you prefer that, like say null or whatever.
>>
>>59960434
>learn how to use opengl the challenge
>>>/v/
>>
>>59960461
>anonymous lambda
unmarried bachelor
>>
File: 1482998053504.gif (247KB, 480x430px) Image search: [Google]
1482998053504.gif
247KB, 480x430px
>>59960487
yes
>>59960503
i wouldn't have it any other way
>>
>>59960487
both return null so what did you intend to do there?
>>
File: 1486677495277.png (129KB, 248x248px) Image search: [Google]
1486677495277.png
129KB, 248x248px
>>59960496
>Learning how to render things in OpenGL without using some other schmucks library isn't a worthwhile endeavor
>>
>>59960487
If 0 is the only thing you'll ever return, void. If it's a boolean or error code, int.
>>
>>59960487
Do you want the return value to be 1 byte or 4 bytes long?
>>
>>59960496
>>59960519
Who said that, though?
>>
>>59960519
why would you use a library to access a library? how would you even push effects to that without some backwards context macros
>>
>>59960533
3 bytes long
>>
>>59960544
>A library and an API are the same thing
>>
>>59958401
Refreshing my C knowledge, just started from the basics, and I am stuck at pointers again.

The moment I grasp something, use it and do few examples, I forget it the next day or so.

Basically, I have used pointers for the last 5 years, but only when needed and in C++11 stuff. Wonder if there is some kind of C "puzzles" for pointers where you use all the possible variants.


Anyway, my daytime job is Python and OpenCV (with python) related, so... C/C++ is more of a hobby...
>>
>>59960572
Sorry but did you reply to the correct post? I'm not finding the text that you're quoting
>>
>>59960584
read this sentence.
>>
>>59959561
int c1, c2;
c1 = '1';
c2 = '1';
printf("%c + %c = ", c1, c2);
int sum;
sum = c1 + c2;
printf("%d\n", sum);
>>
File: 74287397eudshkjgf7i326edgbs.jpg (359KB, 1172x894px) Image search: [Google]
74287397eudshkjgf7i326edgbs.jpg
359KB, 1172x894px
>>59960580
>and I am stuck at pointers again.

Not anymore!
>>
>>59960584
You should see a doctor
>>
>>59960627
>>59960584
for your autism
>>
>>59960572
From whom did you reference this statement?
>>
>>59960594
fuck, meant c2 to be '2'
>>
>>59960636
read this sentence.
>>
>>59960636
>>59960584
>>> /reddit/ were they have quotation features
>>
File: 1476955517889.jpg (7KB, 200x135px) Image search: [Google]
1476955517889.jpg
7KB, 200x135px
>>59960671
>>59958645
>>
>>59960580
You must unlearn what you have learned in high-level meme languages.

Everything a computer does is with memory addresses.

Variable names are basically human-friendly memory addresses.

Function names are basically human-friendly memory addresses that point to a group of instructions.
>>
Is there a 'cleaner' way to do this in C#? Like with string.Join or something?

string query = "DELETE FROM " + Tag.TableName 
+ " WHERE Id = '" + tagIds[0] + "'";

for (int i = 1; i < tagIds.Length; i++)
query = query + " OR Id = '" + tagIds[i] + "'";

Basically I have a list of the IDs for things in an SQL table and I want to delete them all in one query. This works but I don't like the for loop.
>>
>>59960671
Sorry, I don't know what you're talking about. Who said that?
>>
>>59960766
http://stackoverflow.com/questions/31014869/what-does-mean-before-a-string

also dont use sql if you aren't a website
>>
>>59960712
>meme
Back to your home site, plebbit-spacer.
>>>/r/abbit
>>
>>59960789
What are you referring to?
>>
>>59960282
java is for pajeet only
>>
>>59960850
To someone quoting nonexistent text.
>>
>who am I quoting?
>>
>>59960282
>music major
Imaging taking a major to be a street musician.
Either way what's with this 'has to'? Why would you have to take a Java course as a noise maker?
>>
>>59960875
We don't have "quotes" here
>>
>>59960794
Hmm... I meant replacing the for loop with something else, not the string concatenation with a format string. I don't think I can use string.Join since the first element shouldn't have OR before it. I dunno, I might just stick with the for loop, it's fast at least.
I'm using sqlite but a database is really useful for what I'm doing. I'm new to database stuff though.
>>
>>59960580
>>59960614
I'm very confused about the confusion about pointers.
The picture below operator * in your image is explanation enough for pointers except for the small caveat of pointer types which get pretty obvious once you cast a pointer type to another.
It's just ridiculously trivial.

I don't mean to offend anon but 5 years of C++ without understanding pointers is just unfeasible to me. I don't believe you.
>>
>>59960940
query = $"{query} OR Id = {tagIds[i]}'";
>>
>>59960891
You just used them.
>>
>>59960966
That still requires the for loop doesn't it?
>>
>>59960887
Who are you quoting, fuckface?
>>
>>59961008
so you agree "" is for quoting and > is for greentexting?
>>
>>59961024
Who are you quoting, fuckface?
>>
>>59961008
We're did >>59960671 use ""????
>>
>>59958462
>char-pointer x
or
>char dereference-x
or
>char multiplied by x
>>
>>59961052
'>' is a unary operator which has the same meaning as text enclosed in "".
>greentexting
Is this something they do on "reddit" an "9gag"?

>>59961077
He used multiple actually.
Here is the "desugared" version of his post.
""" /reddit/ were they have quotation features"""
>>
>>59960636
>>59960584
Lurk more.
>>
>>59961211
Sources? I would love not to break the rules anymore, but forgive me for not taking your word for it.
>>
File: I_Want_You.png (232KB, 414x585px) Image search: [Google]
I_Want_You.png
232KB, 414x585px
>>
>>59958441
If you can't figure out on your own which one suits your needs best, then you need to fucking kill yourself immediately.
>>
>>59961259
>Sources
It's called not being autistic.
>I would love not to break the rules anymore
I don't think you've broken any, you've just been acting retarded.
>but forgive me for not taking your word for it
It's understandable, but please try to adapt to the culture.
>>
>>59961211
>Not understanding greentexting.
Is it summer already?
>>
>no c++ package manager that works across systems, tied into cmake, and is opensource

Am I wrong?
>>
>>59961234
I don't know if this is an ironic shitpost or just retardation desu
>>
>>59961288
You seem to be the only one forcing your "culture" though...
>>
>>59959561
1 is #defined to 98 and 2 is #defined to 1
>>
>>59961303
>no c++ package manager
good
languages that bring their own package managers are cancer.
>>
>>59961293
I don't think the post you replied to has "Not understanding greentexting." in it.
>>59961303
>no c++ package manager that works across systems, tied into cmake, and is opensource
Is this a reply to a previous thread?
>Am I wrong?
What is this in relation to?
>>
>>59961306
Oh, so you're just new here (by "here" I mean this website as a whole). As I said, it's understandable, but please do try to learn.
>>
>>59961323
Can you start trip fagging so we can filter you.
>please.
>>
>>59961320
Having to deal with includes and libs should be an automated process. I don't find it enjoyable having to rebuild manually and adjust settings for 20+ libs.
>>
>>59960766
https://stackoverflow.com/questions/2615566/delete-where-id-in-list

https://stackoverflow.com/questions/3575029/c-sharp-liststring-to-string-with-delimiter
>>
>>59961336
I'm just wondering why you're forcing your culture on me
>>
Guys people doing who are you quoting replies have been going on for years now. Ignore it completely and it dies down.
>>
>>59961356
You're actually on somethingawful, it just says 4chan in the url
>>
>>59961356
It isn't "my" culture. If you dislike it, just leave the site and find something else which will better suit your needs.
>>
>>59961366
>>59961374
You're acting a lot like those "sjw's" that's popular to make fun of. Forcing how I should think and act.
>>
>>59961343
No, I don't engage in animalistic behavior.
>>
>>59961382
You have no place being here if you dislike the culture. Nobody is forcing you to stay.
>>
>>59961374
We actually got him to call us SJWs on a public forum.
>>
>>59961399
So you're no better than them?
>>
>>59961348
Perfect, thanks!
>>
>>59961406
I don't think their kind believes in culture.
>>
>>59961382
Learn how 4chan works or get the fuck off. We're not here to accommodate you.
>>
>>59961343
>please.
Who said this?
>>
>>59961422
I don't see how that relates to what I said.

>>59961432
Then why correct everyone? It seems you need to leave.
>>
>>59961450
He's completely right you fucking mongrel. Please desist from shitposting.
>>
>>59961459
That didn't address what I said
>>
File: 1491944443305.png (261KB, 583x290px) Image search: [Google]
1491944443305.png
261KB, 583x290px
>>59961450
I haven't been correcting anyone, I'm telling you to fuck off
>>
>>59961472
Reread the posts you were replying to.
>>
Wow all this programming sure is interesting. I'm almost overwhelmed.
>>
>>59961483
I see many. Why are you lying on the internet?

>>59961488
You mad? Going on an autistic name calling spree doesn't address anything.
>>
>>59961508
Problem is I can't read any of the code its almost like its nonexistent.
Is this that quantum thing everyone's on about that isn't quantum computing?
>>
>>59961508
it's almost like the mods aren't banning "who are you quoting" shitposters even though they derail the thread every day
>>
File: 1490938931821.jpg (437KB, 1508x1493px) Image search: [Google]
1490938931821.jpg
437KB, 1508x1493px
>>59961517
Do you understand the concept of anonymous posting?
>>
>>59961543
How ironic
>>
>>59961535
Modern day hiroshimoot mods are like youtube mods, they have crippling depression/autism and can't into culture. Prove me wrong and lets see 1 thread without faggots.
>>
>>59958441
>>59958462
The first because it's usually easier to read.
>>
>>59960296
>>59960297
Who are these posters referencing these statements from?
>>
>>59961571
I meant second in that case:>>59958462
>>
Why do people expect to be able to do a 2 week code bootcamp and then get an $80k+ job?
>>
>>59961583
>ACCEPT MY CULTURE
Fuck off sjw
>>
>>59961596
Thats how every job works in china.
>>
>>59961601
Whom quotest thou?
>>
>>59961616
I like this meme.
>>
>>59961616
I quote thee
>>
>>59961601
cant take the quote man cancer, calls them a sjw because they got their safe space invaded on circlejer>>>/g/
>>
>>59961596
those bootcamps market themselves well
they are basically the new ITT Tech
>>
>>59961596
Because if they were intelligent they would not be taking bootcamps.
>>
>>59961596
I don't know for sure but Americans are often taught about easy ways to success. It seems more feasible with that background I'd imagine.
>>
>take 2 week haskell bootcamp
>still don't know what a monad is
>>
>>59961685
>Is Haskell any good?
>>
>>59961703
>Haskell is a nice language. But it's lacking popularity leads people to dismiss it.
>>
>>59961685
>>59961703
That's a nice story, but who are you quoting?
>>
>>59961721
>I heard the compiler's speed and performance is a big issue. Is it bad?
>>
File: npmjs.com.png (40KB, 609x383px) Image search: [Google]
npmjs.com.png
40KB, 609x383px
What did NPM mean by this image?
>>
>>59961721
>>59961740
Is this from some book?
>>
File: wgoh.jpg (123KB, 733x476px) Image search: [Google]
wgoh.jpg
123KB, 733x476px
>>59961703
>>59961721
>>59961730
>>59961740
what's going on here?
>>
>>59961746
Who are you quoting?
>>
>>59961741
Not programming related.
>>>/g/wdg
>>
>>59961760
global rule #6
>>
>>59961760
My post doesn't contain a single quote.
>>
>>59961767
>I don't see that in the rules, anon
>>
>>59961547
He could save others from death, but not himself.
>>
File: 1490484678175.png (435KB, 720x720px) Image search: [Google]
1490484678175.png
435KB, 720x720px
This /jp/ shitposting is going too far.
>>
>>59961793
report it
>>
>>59961786
Who quote?
>>
>>59961741
All their users are retarded hipster with the intellectual capabilities of a athletic poop.
>>
>>59961596
They publish results, unless they're not counting people who gave up like the government's """unemployment rate""".
>>
>>59961786
Hwæt geedlæstest þū?
>>
>>59958401

is C a meme? should I learn B?
>>
>>59961822
"meme"
>>>/r/abbit
>>
>>59961764
NPM is programming related. Web development is only one use of it, it's a general-purpose package manager for a general-purpose language.
>>
>>59961793
I'm stirring the pot because I want it gone. Report it enough and maybe it'll stop.
>>
>>59961793
now this image I can FAP to
>>
>>59961685
>PhD in zygohistomorphic prepromorphisms
>Any job I want
>$300k starting
>>
>>59961822
Rust
>>
>>59961837
>>59961793
>>59961555
>>
>>59961843
Could you give me the link to the full story you're quoting from?
>>
>>59961822
Don't learn D, it's dead

I guess you should learn elisp
>>
>>59961875
How can languages have "lives"?
>>
>>59961886
Animism
>>
>>59961886
hahaaaaa xD good joke! the b/r/os at reddit must've loved that one!
>>
>>59961916
This question is completely unanswerable as-written.
>>
Daily Programming: Who are you dereferencing edition
>>
>>59958401
Any clue why this won't work? When I use a web compiler it runs just fine, but for whatever reason I get a bunch of errors when I try to build it in my IDE

#include <iostream>
#include "stdafx.h"

bool isPrime(int x)
{
if (x == 2)
return true;
if (x == 3)
return true;
if (x == 5)
return true;
if (x == 7)
return true;
else
return false;
}

int main()
{
std::cout << "Please enter a number less than 10:" << std::endl;
int x;
std::cin >> x;
if (x>10)
std::cout << "Please only enter a number less than 10" << std::endl;
else if (isPrime(x))
std::cout << x << " is prime";
else
std::cout << x << " is not prime";

return 0;
}
>>
>>59961957
What errors do you get?
>>
>>59961909

hmmmmm languages "animate" robots, you might be on to something
>>
>>59961957


shoudnt you be using some sorta maths?
>>
>>59961957
>>59961957
else if nigger
>>
>>59961960
A bunch of errors like I didn't #include <iostream>, even though it was right there. Idk why it wasn't reading it. I started a new project and now it runs just fine. I probably fucked it up earlier when I was tinkering around with it. Header files give me a headache
>>
>>59961957
" << std::endl;

dont do this
\n";

flushes the current line to console and includes a newline, works across systems besides when dealing with windows files.
>>
>>59961999
switch
>>
>>59961999
nice trips anon. How should I have done that? I'm just now making the switch from Python, hopefully before it's too late.
>>59962000
ayy i got trips too
>>59961993
i'm not trying to sum the first 2 million primes, the exercise just wanted you to check prime numbers under 10, eh.
>>
>>59962001
aight, ty anon
>>
>>59962026
You should be using your computer to solve problems, not solving them yourself and then hard coding it.
>>
>>59962015
nevermind im an idiot, tried to write up a switch and realized you need ten cases(i think)

is there a way to put a 'else' in a switch? where ? is else?
    switch(X){

case 2:
return True;
break;
case 3:
return True;
break;
case 5:
return True;
break;
case 7:
return True;
break;
case ?:
return False;
break;
}
>>
>>59962156
'default:'
>>
>>59962156
you can handle logic inside of the case
case 2:
if(x) do whatever
break;


>>59962173
default will trigger if none of your cases are matched
>>
Any programmers here religious? What do you believe?
>>
>>59962156
can also do this
    switch(X){
case 1:
return;
}

code if not matched down here


>>59962200
god really likes making autists
>>
>>59962156
Don't need it because of fallthrough, but you could use default.
>>
File: 1490240352947.gif (1MB, 232x158px) Image search: [Google]
1490240352947.gif
1MB, 232x158px
>>59962200
>>
File: whiteboard.png (229KB, 556x493px) Image search: [Google]
whiteboard.png
229KB, 556x493px
>see this captcha
90% of /g/ will never be able to post again
>>
>>59962243
Whom art thou quoting?
>>
File: 1480795727386.png (440KB, 392x524px) Image search: [Google]
1480795727386.png
440KB, 392x524px
>>59962243
you used the greentext, guaranteed (you)s
>>
File: 1481674803909.png (511KB, 836x964px) Image search: [Google]
1481674803909.png
511KB, 836x964px
>>59962243
>Captcha
>>
>>59962243
The are plenty of whiteboards in junior high, Anon.
>>
>>59962243
if there was a chalkboard in there, should I clicky?
>>
>>59962156
switch(x) {
case 2:
case 3:
case 5:
case 7:
return true;
break;
default:
return false;
break;
}


Truthfully I don't know if you even need the breaks since its a return statement
>>
>>59962257
Himself speaking outloud obviously. Try to keep up anon.
>>
>>59962267
you don't, the returns will return from the entire context
>>
>>59962267
>Not using Linux style switch
Haram
>>
>>59962269
>Herself
FTFY
>>
>>59962267
thats nice (me)

>>59962026
>How should I have done that?
like this >>59962267
>>
File: 1480012577724.png (260KB, 620x640px) Image search: [Google]
1480012577724.png
260KB, 620x640px
>>59962283
>>
>>59962156
switch(x) {
case 2:
case 3:
case 5:
case 7:
return true;
}
return false;
>>
>>59962302
aw yeah thats better
>>
>>59962283
>>59962288
Who said all of this though?
>>
Threadly reminder that you should not refer to the act of programming as coding. It is improper and makes you look like a 16 year old

You are a programmer, not a coder

Software Alchemist is GOAT
Developer is okay
Magician is okay
Software Magus is okay
Software Engineer is okay
Software Architect is okay
Computational Conjurer is okay
Information Systems Sorcerer is okay
Purveyor of Programs is okay
Code Guru is questionable

Archmage is reserved for only the most senior of programmers

Writing in HTML and CSS is not programming, therefore it should be referred to as designing
>>
>>59962368
I'm an engineer
>>
>>59962368
How about a software artisan? I make delicious and fresh programs.
>>
>>59962368
What about Software High Priestess?
>>
>>59962368
>Software Alchemist is GOAT

sounds too esoteric, do I have to find the philosophers algorithm that turns code into gold, and have runic stickers on the back of my laptop lid, and start talking in metaphor?
>>
>>59962368
I want to be a Web Warlock. Where do I sign up?
>>
>>59962421
>>>/wdg/
>>
>>59962420
Who r u quoting?
>>
>Writing in HTML and CSS is not programming, therefore it should be referred to as designing

ohhh I designed in python once

https://pastebin.com/u94Cy8HY

1200 lines of beauty
>>
Has anyone here ever worked with OpenCV before? I'm wondering if there's any way to make the built in functions (adding/multiplying Mats etc) parallel. It seems dumb to me that I have code that multiplies each value in a matrix by the corresponding value in another matrix, yet it's only using one of my cores. Surely they thought to parallelize it?
>>
>>59962394
>>59962368
Artisan in elder gods tier. Gonna call myself artisan irl
>>
>>59962470
Recompile with intel tbb enabled
>>
New thread:
>>59962532
>>59962532
>>59962532
>>
>>59962453
Who said this?
Thread posts: 328
Thread images: 44


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