[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y / ] [Home]
4chanarchives logo

/dpt/ daily programming thread


Thread replies: 368
Thread images: 23

Old thread: >>53813724

What are you working on /g/?

Functional? Come join us in /fpg/ >>53819299
>>
>>53820060
>>53820224
Hook me up
>>
>Posting before the bump limit
>Posting WAY before the bump limit
Delete this shit and kill yourself.
>>
>>53820401
Hell what even is the set of target de-facto C compilers.
>>
>>53820402
Delete this shit and kill yourself
>>
what is the bump limit? 300 no?
>>
>>53820402
>>53820421
Shut up idiots
>>
>>53820436
310
>>
>>53820454
then what the fuck is the complaint about
>>
>>53820458
the thread was posted at 270
>>
How to hack my very very loud neighbor?
I have his ip, I scanned for open ports with nmap, results : all 1000 ports scanned are filtered,
I used nmap - v - sT hisipaddress
Any suggestions?
>>
>>53820478
Install Gentoo
>>
>>53820485
Memes aside? Please?
>>
>>53820478
nice opsec
>>
>>53820478
You go to https://tips.fbi.gov/ and ask there
>>
It's no longer April Fool's day, and yet I still see these nonsense names.

>>53820478

First of all, don't say "all 1000", because there's around 65k valid ports.

Second of all, if you knew enough for port scanning to be of any use to you, you'd know why it would be completely useless for your neighbor, who is likely using a wireless network with NAT. Protip: you're not scanning his computer, but his router.

Third of all, just send him a .jpg.exe over Facebook or some shit. No need for fancy port scanners or anything.
>>
>>53820563
or just apply your fist to their mug
>>
File: uwe8.jpg (21KB, 425x342px) Image search: [Google] [Yandex] [Bing]
uwe8.jpg
21KB, 425x342px
Today is autism awareness day, /dpt/. It's not an april fool. How do you feel about it, /dpt/? http://www.un.org/apps/news/story.asp?NewsID=53596#.Vv-fdBk6_qB
>>
>>53820478
If the phone network has a certain quirk, you could trying ringing him, asking something polite, than keep your phone off the hook when he hangs up. Play music through some device into the phone. When he rings anyone else, they will hear your music in the background.

Note this may only happen on old networks.
>>
File: 1422394896484.jpg (740KB, 728x2080px) Image search: [Google] [Yandex] [Bing]
1422394896484.jpg
740KB, 728x2080px
>today cs graduates
>>
File: lang-rank-615-wm.png (112KB, 1020x723px) Image search: [Google] [Yandex] [Bing]
lang-rank-615-wm.png
112KB, 1020x723px
>>53820383
>tfw learnt functional programming out of curiosity
>tfw now I can't do anything without muh higher order functions
>tfw I wanted to be an assembly hacker
I have no idea what this picture is but pretend it's a sad face
>>
C++11 or C++14, and why
>>
Hey guys I've spent way too long looking at this stack program in C and I'm not understanding it can I get a point in the right direction its being declared as:
typedef char stackitem;
struct stack{
stackitem d;
struct stack *next;
}
typedef struct stack ELEMENT
typedef ELEMENT *POINTER
sorry if this is the wrong place for these kind of questions
>>
>>53822918
should add that my difficulty is I have no idea how to set a POINTER *ptr variable to the address of the first element in the stack (in this case i believe its NULL as the stack is uninitialised)
>>
>>53822821
Yeah you'll feel bretty schizo for a while until you open your third eye
>>
>>53822821
at least you haven't been hooked on ADT, lexicographic functions or fully expressive macros
>>
>>53822933
Use an array.
(With a linked list approach you need both 'prev' and 'next' pointers to implement pop and push)
>>
>>53822821
bottom right: not trash
top left: poorly designed popular garbage aka windows babby tier languages
bottom left: hipster garbage
top right: everyday tools
>>
valgrind keeps giving me these errors in reference to these code
            if (configKey == "name"){
string tempName = CurrentLineList[1].toStdString();
m_objectName.insert(m_objectName.begin(), tempName);
} else if (configKey == "colour"){
string tempColour = CurrentLineList[1].toStdString();
m_objectColour.insert(m_objectColour.begin(), tempColour);
}


i don't really understand how it has unused memory -- don't strings on the stack get automatically deallocated? even if that's not the case i tried to delete them using the delete key word and i still received the errors
>>
>>53822979
good post, prole
>>
>>53823051
The 'toStringMethod' must use malloc opaquely
>>
>>53820383

Functional programming is just like Nutella. It's good to have some with something else, but just eating the whole jar on its own is retarded.
>>
>>53823089
sorry what? i'm not very intelligent
>>
>>53823089
Those typos are what I get for posting right after a nap.
>>
>>53823105
'toStdString' is allocating heap memory without exposing a handle.
>>
>>53823143
i think i understand what you're saying but how am i suppose to free it if it's not working with the tradional delete keyword?
>>
>>53823172
Look up the API or just don't use it.
>>
>>53823187
i've read through qt's description of the
toStdString()
method but it makes no explanation of how to deallocate it
>>
My new tripcode :^)
>>
>>53823243
>>53823243
>>
>>53823230
Don't use it then.
(Check the implementation if it's actually allocating heap memory. Valgrind isn't perfect)
>>
How do you guys like my new tripcode :^)
>>
>>53823308
It really suits you
>>
File: 1444337093911.png (39KB, 645x773px) Image search: [Google] [Yandex] [Bing]
1444337093911.png
39KB, 645x773px
>tfw want to get into convolutional neural networks but have an AMD GPU so can't use CUDA
>>
>>53823486
cucked
>>
>>53823486
Don't use CUDA, cϋck
>>
>>53823517
But all the cool frameworks require it.
>>
>>53823532
Is there any free implementation of CUDA or any way to transform it to shittyCL?
>>
>>53823486
Use AWS spot instances, Luke. Also small convnets are perfectly trainable on multicore CPU.
>>
>>53823532
>>53823561
They don't require it. There is always a CPU implementation. At least in Tensorflow, Torch and Theano.
>>
>>53822821
You lost your ability to program high performance software? I'm sorry.
>>
>>53823641
>You lost your ability to program autistic software? I'm sorry.
ftfy
>>
>>53822821
>tfw sourcepawn dev
It's a fun little language.
>>
>>53823705

How useful is it?
>>
>>53823486
doesn't AMD use OpenCL for similar purposes--which is also an open standard
>>
>>53823737
oh good tripfaggotry is back
how i missed thee
>>
A daily reminder that
if you are a codemonkey that codes programs by hand instead of letting your software evolve itself you are a plebe (^:
>>
>>53823783
>le evolution meme
nice try tinfoil
>>
>>53823769

Feel free to email gookmoot and thank him for disabling the name generator.
>>
>>53823042
Mathematica is poorly designed, Pascal is hipster garbage while ActionScript is not?
>>
>>53823737
It's very small and very fast. Its main use is probably as the scripting language for the multiplayer mod for San Andreas
>>
File: screen.png (686KB, 1914x1082px) Image search: [Google] [Yandex] [Bing]
screen.png
686KB, 1914x1082px
Im started to learn java but im too stupid, can someone can explain me what exactly last.setNext(newE) is? Is newE '1' ?
>>
>>53823848

newE is an instance of the Element class containing the value "1" inside the obj variable
>>
>>53823795
if evolution doesn't exist why do schools teach it?
>>
>>53820383
https://news.ycombinator.com/item?id=11411368

HN is talking about you :)
>>
>>53823956

communism and socialism are fairy-tale bullshit, too, but public schools still indoctrinate children with them.
>>
>>53823956
liberalism
>>
File: 1459494198492.jpg (32KB, 477x424px) Image search: [Google] [Yandex] [Bing]
1459494198492.jpg
32KB, 477x424px
>>53823989
Lol, /pol/ wants you back my uneducated friend.
>>
>>53823964
holy shit read the actual github bit (link is title)
>>
>>53823989
Communism is real, and one of the biggest threats we face
>>
>>53824007
But I did? It sounds exactly like someone from around these parts
>>
>>53823687
If autistic means anything beyond 10k CLOC
>>
>>53824007
>>53823964
Bahahaha this is such a /g/entooman
>>
>>53820383
>True statements that upset /g/tards

Javascript is functional programming.
>>
File: Java.png (17KB, 484x402px) Image search: [Google] [Yandex] [Bing]
Java.png
17KB, 484x402px
>>53824058
Javascript has a lot in common with Java
>>
Is there an easy way of install the Intel C++ compiler on Linux (Fedora specifically)?

The official guide is several pages of commands, starting with disabling of SELinux (https://software.intel.com/en-us/articles/using-intelr-compilers-for-linux-under-fedora), which makes me nervous.
>>
>>53824083
Javascript has much more common with scheme and common lisp. Also it is the fastest dynamic language in the world.
>>
>>53824100
Use VM
>>
>>53824110
lua is faster
>>
File: java2.png (640KB, 1919x1079px) Image search: [Google] [Yandex] [Bing]
java2.png
640KB, 1919x1079px
>>53823887
if every node would have the name newE how can start and the folling newE knowing which is the next in the list?
>>
>>53824110
>lua
>>
>>53824130
Nah, luajit was faster several years ago but now its over. Best compiler engineers and $$$ (V8 team) rule.
>>
>>53824083

how about you stop comparing the addresses instead of the integer values (eg: unbox them first)

>>53824132
the second time you enter the function a new Element instance will be created, the name newE only refers to the instance created in a single isolated call to addLast
>>
>>53824128
Huh? Why would I need a VM to install a compiler?
>>
>>53824197
To use the OS that makes it easy to use your compiler. Or to use linux instance for which you aren't afraid of disabling selinux.
>>
>>53824110
>common with scheme and common lisp
Almost nothing.

>>53824110
>>53824130
Both shit.
>>
>>53824100
>Intel C++ compiler
Why?
*GNU/Linux

>>53824237
Or use a chroot
*GNU/Linux
>>
>>53824245
Javascript is on a completely different level of shit compared to Lua.
>>
>>53824185
thanks, i got it now. Its something like Element@972822
Element@1cff0fc
inside next
>>
>>53824288
Actually Lua is shitter but yes, both suck.
>>
Which free 3D modeling software to use for game development?
>>
>>53824373
Blender
>>
>>53824373
3DMAX
>>
Guy I figured out how to be a much better programmer. I started wearing my mother's dresses while programming and I finally finished my medium sized projects and before hand I couldn't even finish small ones
>>
>>53820383
>The two most garbage functional langugaes you can choose
nice job OP
>>
>>53823096
This. Pure functional programming advocates are people who think eating nothing but nutella is high dining.
>>
Pajeet my son you must choose

http://strawpoll.me/7257875
>>
>>53824288
You wouldn't be able to make things that I do in JS with your meme language of choice, anon. Don't underestimate fast dynamic languages.
>>
>>53824245
>Almost nothing.

>Javascript was described as "we want to do lisp in the browser" to get its designer interested, if I remember that interview correctly...

>Indeed, Waldemar Horwat once told me that he viewed JavaScript as essentially Common Lisp with a C-like syntax. In fact Waldemar defined a metalanguage, wrote an interprepter for his metalanguage in Common Lisp, and then wrote the JavaScript spec in his metalanguage, thereby enabling him to actually run the specification. It was a clever technique.
>>
>>53824416
why are you programming with bloated shit?
it's just a waste of cloth, a tiny pair of panties is all a real programmer needs
>>
>>53824512
Waldemar is wrong, next?
>>
>>53824002

You don't need to be /pol/ to hate reds.

>>53824018

True, it's a real threat. I was more talking about the 'philosophy' behind it. Funny that it's supposed to unite the people but it's death toll is only rivaled by the Grim Reaper himself.
>>
>>53824512
saying things doesn't make them true, anon-kun
>>
>>53824541
Brendan Eich is next.
>>
>>53824561
>Be a programmer
>See how software can be copied at zero cost, executed at zero cost, see how software has a potential of automating everything

>Not wanting more free stuff
dumbo (^:
>>
>>53824590
>a community of people is communism u idoit!

You're fucking dumb. There's nothing wrong with free software, and it fits perfectly in the framework of capitalism.

Do you think people only help others because they get something out of it?
>>
>>53824512
He quickly wrote down some simple Scheme-like language on a napkin.
That doesn't make it good, fp weenie.
My own shitty little language I wrote in an afternoon, that's not much more than an secd vm, isn't good either just because it's functional.
>>
>>53824604
yep, free software is basically charity - people who can afford it donate their time and expertise for the benefit of society. Charity is in no contradiction to capitalism.
>>
>>53824590
>>53824604
capitalism is dumb
communism is dumb
>>
>>53824630

Precisely. I get the impression that commies think people would naturally kill their neighbor if it gave them some benefit. I guess that's why they end up executing the millions of people that 'go against the party'.
>>
>>53824630
It's not always even charity. Sometimes a company can profit from contributing to open source software.

>>53824634
Everything is dumb. Capitalism is fucking genius compared to communism.
>>
>>53824634

Sure thing, Reznov. Go to hell.
>>
>>53824590
>executed at zero cost
Except electricity.
>>
>>53824644
>Everything is dumb. Capitalism is fucking genius compared to communism.
>Horse shit vs cattle shit
I prefer neither lol. It's like comparing Java with Javascript.
>>
>>53824662
>I prefer neither lol.
Good for you.
>>
>>53824650
Butthurt shill detected. You know you are wrong.
>>
File: 1439008269085.jpg (13KB, 222x216px) Image search: [Google] [Yandex] [Bing]
1439008269085.jpg
13KB, 222x216px
>>53820478
>>53820518
>>
>>53824373
https://github.com/guillaumechereau/goxel
>>
File: ObolcBf.webm (693KB, 640x360px) Image search: [Google] [Yandex] [Bing]
ObolcBf.webm
693KB, 640x360px
Ask your much beloved programming literate anything (IAMA)

>>53824110
>Javascript has much more common with scheme and common lisp.
That has been debunked numerous times.

Lisp is distinct from Javascript in purpose, philosophy and reality. The first is homoiconic, inspired by lambda calculus and based on the list data structure while the second is not homoiconic, not inspired by scheme at all [1], and based on the dictionary data structure (and objects).

http://journal.stuffwithstuff.com/2013/07/18/javascript-isnt-scheme/

>>53824446
pure fp is more about not putting nutella on cheese.
>>
>>53824681
Communism makes everyone living under it poor. Poorer than the poorest under a good capitalist system. It's that simple.
>>
>>53824695
>pure fp is more about not putting nutella on cheese.
Only retarded haskellers think that.
>>
>>53824695
>pure fp is more about not putting nutella on cheese.
But every "pure" fp runs on stateful imperative typeless code.
>>
>>53824655
>Having 1200 watts/sq.m of free sunlight
>Having multiple ways of converting this sunlight into electricity

>Muh electricity comes at a cost!!
(^:

>>53824634
I somewhat agree. Scarcity is dumb in a world full of energy and resources. If humans and their ideologies weren't so dumb we could have real robot-enabled post-scarcity by now.

But looks like 1st worlders don't really need automation, they need more games, pixels and apps hehe.
>>
>>53824679
Good for everyone.

>>53824700
Both are about the same shit. Communist and capitalist (you) whinnies will claim that their system is better of course while in reality they are both shit.
>>
>>53824718
>If humans and their ideologies weren't so dumb we could have real robot-enabled post-scarcity by now.

Post-scarcity is a megameme. Shouldn't you be shitposting about UBI on /r/Futurology right now?
>>
>>53824718
>But looks like 1st worlders don't really need automation, they need more games, pixels and apps hehe.
Yet you are wasting your time on fucking /g/
>>
>>53824718
>>Having multiple ways of converting this sunlight into electricity
All of which cost money
>>
>>53824718
This
>>
>>53824604
>Do you think people only help others because they get something out of it?
people who contribute to open sores software often do it because it helps fill out their resume, helps them get noticed. it's actually the main argument for when shills try to get programmers to do open sores
>>
>>53824710
the main point of pure fp is to separate functional code from non functional code, not to not have any non functional code.
>>
>>53824727
"Shit" is relative, and it depends on the metrics you care about. If we are comparing which one makes the general population wealthiest, and makes the poorest most vulnerable people better off, than capitalism is by far the best on both.
>>
How many projects do you aim to have ongoing at one time?
>>
>>53824741

What you're referring to as 'open source' is actually free software.

t. Stallmanu
>>
>>53824730
>Shouldn't you be shitposting about UBI on /r/Futurology right now?
It'd be a waste of my time. I'd rather continue pursuing my programming projects while lazily posting here.

>Post-scarcity is a megameme.
Say that to me again in 50 years, anon

>>53824734
One-time capital expenditure for 30 years of operation.
>>
>>53824763
1
>>
>>53824777
>Say that to me again in 50 years, anon

Gladly. I just put a note on my 2066 calendar.
>>
>>53824777
>One-time capital expenditure for 30 years of operation.
yes.
>>
>>53824763
2
>>
>>53824750
>"Shit" is relative
Only for autists and moral relativists like you.

>If we are comparing which one makes the general population wealthiest, and makes the poorest most vulnerable people better off, than capitalism is by far the best on both.
See >>53824727
>Communist and capitalist (you) whinnies will claim that their system is better
>>
Javascript web programming is where the real programmers and real money is at s m h t b h f a m
>>
Guys, I want to learn how debuggers work (debuggers which examine the program during runtime like the GCC debugger), any good books on that?
>>
>>53824763
3
>>
>>53824730
I prefer /r/MachineLearning btw

>2016
>Still coding by hand instead of letting your software to search for decent solutions by itself
>>
>>53824763
4
>>
>>53824812
epic meme
>>
>>53824695
The ideas in JavaScript (closures, prototypes, lambda calculus) didn't come from Scheme, but Eich was inspired by Scheme to create it.

It is true that he didn't intend to use S-expression syntax, but semantically they're almost the same language (except JS has stricter evaluation semantics).
>>
>>53824801
>GCC debugger
No such thing.
>>
>>53824763
5
>>
>>53824819
>he didn't even bothered to read the post he quoted

>>53824695
Don't forget the lack of continuations (scheme) and the lack of dynamic scoping (original lisp, elisp, etc)
>>
>>53824817
Yup, perfect meme http://arxiv.org/abs/1510.07211

>This paper envisions an end-to-end program generation scenario using recurrent neural networks (RNNs): Users can express their intention in natural language; an RNN then automatically generates corresponding code in a characterby-by-character fashion. We demonstrate its feasibility through a case study and empirical analysis. To fully make such technique useful in practice, we also point out several cross-disciplinary challenges, including modeling user intention, providing datasets, improving model architectures, etc. Although much long-term research shall be addressed in this new field, we believe end-to-end program generation would become a reality in future decades, and we are looking forward to its practice.
>>
Guys I want to be as good of a programmer as you guys! Teach me please
>>
>>53824826
haha u funny.

But seriously, I do want to know how they poll info from the programs. I guess a good question would also be: is this worth looking into, or will the answer be obvious if I know well how a system / kernel works?
>>
>>53824826
I think he means GDB.
>>
File: 1457983333895.png (48KB, 1920x1080px) Image search: [Google] [Yandex] [Bing]
1457983333895.png
48KB, 1920x1080px
>>53824819
>JS has stricter evaluation semantics
Really? In the sense of lazy/strict evaluation or am I projecting?
>>
>>53824839
1) Go to http://gen.lib.rus.ec/
2) Get programming books, for example http://gen.lib.rus.ec/
3) Read and practice
4) ?????
5) You are as good as us
>>
>>53824819
>but semantically they're almost the same language
not really
>>
>>53824844
>haha u funny.
Stop shitposting, there is no GCC debugger you fucking faggot.
>>
>>53824861
>For example The Algorithm Design Manual
>>
>>53824837
and how many programs have you made
>>
File: monkey.webm (3MB, 640x480px) Image search: [Google] [Yandex] [Bing]
monkey.webm
3MB, 640x480px
>>53824839
start with one of those

:: Structure and Interpretation of Computer Programs
http://sarabander.github.io/sicp/
http://paste.lisp.org/display/151208/raw

:: How to Design Programs
http://htdp.org/
https://www.edx.org/xseries/systematic-program-design-0

:: Concepts, Techniques, and Models of Computer Programming
not free

:: Composing Programs
http://composingprograms.com/

:: CS for All
http://www.cs.hmc.edu/csforall/
https://www.edx.org/course/cs-all-introduction-computer-science-harveymuddx-cs005x

:: Program Arcade Games With Python And Pygame
http://programarcadegames.com/
>>
>>53824750
>and makes the poorest most vulnerable people better off
Communism, at least you don't have to pay for basic needs like going to the hospital.
>>
What is the most efficient way to set uniforms so I don't have a ridiculous long list of uniform assignments? Or is that just the price I pay for using uniforms?
>>
>>53824857
In the sense that JavaScript implementations have less freedom to interpret programs than Scheme implementations do (but that still hasn't stopped browsers).
>>
>>53824910
Nor do you in capitalism. See any non american capitalist country. The standard of free care is also much higher than in any communist country, because there is actually enough money to pay for these things.
>>
>>53824892
Several. I didn't use that algorithm though, I used a GA.
Will try to evolve more sophisticated ones.
>>
>>53824935
In pure communism there is no public healthcare.
>>
>>53824906
Sicp is a meme book though

>>53824935
>Communism
>Good

Have you seen every country that has tried it? They all have failed horribly and poor living standards for everyone. Until you can come up with a better system than Capitalism it will not be beat
>>
>>53824910
Free healthcare is something you get in any decent social democracy (see Europe) famalam
US taxes are almost as high as European ones, and yet you pay huge $$$ for education and healthcare. Your gov't cucked you.
>>
File: 1388795595725.png (110KB, 364x303px) Image search: [Google] [Yandex] [Bing]
1388795595725.png
110KB, 364x303px
>>53824837

Guys, imagine this: supervised learning on a neural network, using the input & output of an algorithm as input in the NN, and the algorithm's code as desired output in the NN. If you trained it this way with lots and lots of algorithms, could you make a NN that writes an algorithm for you that, given any algorithm input and output?
>>
>>53824949
>Communism >Good
Reread my post you retard.
>>
>>53824958
I am European. Sorry to disappoint you.
>>
>>53824982
What country?
>>
>>53824835
>the lack of continuations (scheme)
The original Scheme didn't have call/cc either.

>the lack of dynamic scoping (original lisp, elisp, etc)
Scheme doesn't have dynamically scoped variables either.
>>
>>53824949
>Sicp is a meme book though
how so
>>
>>53825006
>The original Scheme didn't have call/cc either.
Wrong

>Scheme doesn't have dynamically scoped variables either.
We know.
>>
>>53825006
There's a reason no one uses the original Scheme anymore
>>
>>53825012
It is so outdated and it is not relevant to modern programming and it will not help me write modern day programs
>>
>>53824992
Turkey
>>
>>53824938
ok lol
>>
>>53825038
How so? I bet you have not even read it.
>>
>>53825052
NOT EUROPEAN
>>
>>53825070
it is
>>
>>53825052
Turkey is part of Asia you retard. Open a map.
>>
>>53825038
define modern programming (/me popcorn).
>>
>>53825082
The part of Turkey with internet access is mostly in Europe
>>
>>53824961
Yes, you can do something very similar. Instead of source code the algorithm is represented as weights of recurrent neural network. Here are relevant papers:

http://arxiv.org/abs/1410.5401
http://arxiv.org/abs/1602.03218
http://arxiv.org/abs/1511.08228

If you want to output real source code that hasn't been done yet, but you can try it.
>>
>>53825082
not since ISTANBUL
>>
>>53825108
Lies. There's internet access all over.
>>
>>53825087
Object Oriented Programming
>>
>>53825160
they're part of the NATO, son
>>
File: 1393015235581.gif (914KB, 352x145px) Image search: [Google] [Yandex] [Bing]
1393015235581.gif
914KB, 352x145px
>>53825117
Very interesting, thanks anon.
>tfw learning how to make programs that will render all human programmers unemployed in 30-40 years
>>
>>53825052
Turkey is a 2nd or 3rd world desu
Just like my homeland Russia (2nd world)
Comparing these countries to 1st world ones is stupid, they are very different
>>
>>53825190
NATO is cancer and also

https://www.rt.com/news/338038-isis-weapons-turkey-churkin/
>>
>>53825190
>They can't be both
That's pretty naive.
>>
>>53825200
Nostrovia Ivan!
>>
>>53825194
iktf

If we had a really powerful computer we could use much simpler algorithms to do http://pastebin.com/raw/S6rMHQi7 (a post from prev thread) right now

But we don't have one.
>>
>>53825141
sicp implements a basic object system with dynamic dispatch.
>>
Is there something as mature/well developed as Project Euler but aimed at more general programming rather than math that happens to be implemented by making a program?
>>
>>53825212
But they can't be both European and Asian?
>>
>>53825257
Continental boundaries are pretty poorly defined.
>>
>>53825257
what reasons, except for plausibly the geographical one, do you have for them being european

based on what people who have gone there for vacation have told me, it's a sandnigger rapist shithole

>Islam is the largest religion in Turkey according to the state, with 99.8% of the population being automatically registered by the state as Muslim
>>
>>53825299
>automatically registered by the state
unreliable
>>
>>53825333
What's unreliable?
>>
>>53825299
Because Islam is the majority of the middle East and if the EU ever hopes to conquer the world it is eventually going to have to force Europeans and sand niggers to get along or else.
>>
>>53825333
>Although the Turkish government states that more than 99% of the population is nominally Muslim, academic research and polls give different results of the percentage of Muslims which are usually lower, most of which are above the 90% range.
>>
>>53825342
What that roughly translates to is they don't know how many none Muslims there are in Turkey but if they find them they better watch their back.
>>
>>53825354
See? It's unreliable.

>>53825342
Your mom
>>
>>53825376
above 90% is still fucking insanely high, IDIOT
>>
>>53825383
Unrelated to what I was talking about. Braindead retard.
>>
>>53825299
So is Bosnia not European too?
>>
>>53825368
>Muslims
>mudslimes
Look after your language, anon!
>>
>>53825391
KILL YOURSELF RETARD TURKEY IS NOT A EUROPEAN COUNTRY

AT MOST IT'S ON THE BORDER OF EUROPE SO IT'S BARELY EUROPEAN
>>
>>53825391
We're discussing the fact that Turkey is non european because it is a mud scum filled rapehole.
>>
Why isn't my code working?


public final abstract static int SwapTwoNums(BigInteger num1, BigInteger num2)
{
int temp = num1;
num1 = num2;
num2 = temp;

return num1,num2;

}

>>
>Turkey (Listeni/ˈtɜːrki/; Turkish: Türkiye [ˈtyɾcije]), officially the Republic of Turkey (Turkish: About this sound Türkiye Cumhuriyeti (help·info); pronounced [ˈtyɾcije d͡ʒumˈhuɾijeti]), is a parliamentary republic in Eurasia, largely located in Western Asia, with the smaller portion of Eastern Thrace in Southeast Europe.
>largely located in Western Asia
and it has basically none of european culture and values
>>
>>53825399
The populations can't even decide it wants to ally with Europe or middle east muslim hell holes. Think about how scummy and shitty a country has to be to think like that.
>>
>>53825417
Because it's stupid.
>>
>>53825417
Needs more keywords.
>>
>>53825417
because you don't understand references
>>
>>53825424
The Republic Turkey was founded on European culture and values.
>>
>>53825417
>comma in return
>implementing an abstract method
>>
>>53825399
Unrelated to what I said. Low IQ nigger.

>>53825408
No, we are discussing the following
>>Islam is the largest religion in Turkey according to the state, with 99.8% of the population being automatically registered by the state as Muslim
>>
>>53825417
>return num1,num2;
The fuck?
>>
>>53825453
That was simply a point to illustrate that Turkey mud scum hell hole, and not european by extension. Which is still correct.
>>
>>53825426
>>53825433
>>53825439
>>53825461
My professor told me this is the correct way to do it she is the best female Java professor I have ever heard. Why isn't this working?
>>
>>53825453
you literal fucking sperg, i posted it knowing that it's not literally 99.8% who are actually muslim, you're making a complete strawman argument and you are not smart for arguing about this

if you weren't so fucking retarded you'd know that the larger discussion is about whether turkey is european or not FUCKING RETARD
>>
>>53825472
Because your professor is not Asian. Only Asian are top tier programmers.
>>
>>53825490
Wrong.
t. Slav top tier programmer (^:
>>
File: 1443232158832.png (511KB, 560x601px) Image search: [Google] [Yandex] [Bing]
1443232158832.png
511KB, 560x601px
>>53825472
Just bash your computer a few times. Maybe the code is stuck.
>>
>>53825472
are you trolling or actually serious
>>
>>53825490
>>53825495
Indians are the best programmers
>>
>>53825472
She's probably confused with another language, because
return 1, 2;
isn't possible on the syntactic level. In addition, your method returns INT! Even if this was allowed, two BigIntegers don't nearly make an int.

https://repl.it/CBdg/0 <- see the error message.
>>
>>53825490
They're literal code monkey tier.
They work harder not smarter.
>>
>>53825470
And that point was wrong.

>>53825484
Oh look, it's you again.

>i posted it knowing that it's not literally 99.8% who are actually muslim
Don't post things that you know are wrong, or else you might be considered as a shill.

>you're making a complete strawman argument
I am not, I am attacking the exact point you were making.

>the larger discussion is about whether turkey is european or not
Irrelevant to the point I was attacking.

Braindead people like you should not exist. You are not capable of taking part in discussions.
>>
>>53825502
pajeet, no
>>
>>53825501
>>53825507
Yeah she said this is how we return 2 numbers in Java for swapping two numbers
>>
>>53825510
Having a cute Asian professor does motivate though.
>>
>>53825525
She made a mistake. Even the best women make mistakes, only the men programmers are perfect.
>>
>>53825516
literally retarded

you are a fucking joke bruh
>>
>>53825516
>And that point was wrong.
No it wasn;t. It was literally just quoting a statement from the turkish government. It was us that pointed out that 90% muslims is a more realistic figure, which still makes it a mud scum hellhole. You're probably one of them. Enjoy living in a shit hole and being hated by everyone who lives in a prosperous country.
>>
>>53825417
You're swapping two BigInts, using an int as a transfer variable and as the return variable, silly :3
>>
>>53825525
your code is beyond retarded, i doubt she said to write it exactly like that
>>
>>53825533
you lost friend :)

>>53825534
the point he was making was that mudslimism is the majority religion in turkey because the government says so.

>Enjoy living in a shit hole and being hated by everyone who lives in a prosperous country.
i am not :^)
>>
>>53825532
All the best programmers in the class are women they have the highest marks

>>53825539
>>53825552
You guys are right I need to implement a FactoryBeans
>>
>spergs stubbornly bikeshedding their hot opinions as a form of mental masturbation
just another day in /dpt/

>>53825566
>you lost friend :)
i'll let you believe that, delusional sperg
>>
>>53825567
>All the best programmers in the class are women they have the highest marks

Is it a joke?
>>
>>53825567
>You guys are right I need to implement a FactoryBeans
now i know you're just memeing
>>
>>53825566
>the point he was making was that mudslimism is the majority religion in turkey because the government says so.
no it wasn't

>i am not :^)
You said you were living in Turkey. I guess you're living in denial too...
>>
>>53825529
>wasting your time in lectures instead of studying material on your own

you can even watch JAV while doing it
>>
>>53825580
man, you got btfo, all the water in the world will not cure your butthurt

>>53825600
>no it wasn't
Yes, it was

>You said you were living in Turkey
nope
>>
Not sure if this is a good place to ask, but I'm tired of web dev and all that 2.0/muh social networks bullshit, so I'd like to change into """normal""" programming. Basically C++. Anything to recommend? I'm not against reading a good book (I've seen there were even some by Stroupsouptroup or whatever), but knowing myself I can get bored real fast if there's no real incentive (read: no coding exercises).
I know that some of you might say "pick a project and learn", but with a new language and different practices from before I'd love to do basic shit for the first few days or weeks.

tl;dr want to learn C++, coming from webdev and PHP, recommended tutorials/books?
>>
>>53825602
This is true the only people who passed any of the programming courses in my classes all studied programming books religiously on their own
>>
>>53825614
you're straight up delusional, fucking retard, the point wasn't about what the government said, it was simply a random quote that indicates that turkey is full of muslims
>>
>>53825614
In any case you can accept Turkey is a mudscum hell hole.
>>
File: 1459539673947.jpg (91KB, 257x206px) Image search: [Google] [Yandex] [Bing]
1459539673947.jpg
91KB, 257x206px
Why are xml layouts so horrible in android? Did I miss some hidden knowledge? Literally have to set the view&viewgroup frames in code, to do simple things like one element overlapping another etc., without having a gorillion nested layouts.
>>
>>53825641
Everything is the android SDK is horrible.
>>
File: .jpg (51KB, 700x500px) Image search: [Google] [Yandex] [Bing]
.jpg
51KB, 700x500px
This is not a programming related question but if you know anything please answer.

I'm trying to reverse a C# application and turn off a demo feature and around almost every corner I bump into ntdll.dll. When I think I've foudn the code block I'm looking for there is ntdll.dll stopping me again.

Does anyone know what the deal about this particular system dll file is?
>>
>>53825640
Indeed

>>53825638
>it was simply a random quote that indicates that turkey is full of muslims
It did not indicate shit as you were proved wrong. Moreover you accepted that you knew that your point was false.
You are a shill.
>>
>>53825668
>more than 90% are muslims according to most academic research and polls
>i was proven wrong
AHAHAHHAHAHAH DELUSIONAL SPERG
>>

int num1 = 5;
int num2 = 10;

while(true)
{
if(num1 > num2 && num2 < num1)
{
break;
System.out.println(num1);


}

}

>>
>>53825662
everything by google is horrible
>>
>>53825668
>You are a shill.
A shill for what exactly?
>>
File: 1458243223357.png (651KB, 642x816px) Image search: [Google] [Yandex] [Bing]
1458243223357.png
651KB, 642x816px
>>53825567
Then there's a serious gender issue in your country/school/whatever. Or maybe your lessons consist of so much straight schoolwork which require no genius but only reproducing patterns in an obedient way that the most studious pass, and they happen to be girls. Still, it's the same issue in mathematics: perhaps girls have better grades in high school, but working a demanding position as a top-tier mathematician does not require the same skillset as just performing well, especially since the level in school is dropping. This last fact might be gratifying in the short term, but it bites in the long run.
>>
>>53825692
Thank god for Xamarin
>>
>>53825690
Your girlcode is so soft Hime, can I stroke it in a rough manner?
>>
>>53825682
>>53825693
Stop samefagging.

>>i was proven wrong
>99.8% = >90%
no, just no
>>
Surely one of you knows assembly, right?

How could I check a user-input string to ensure that it's of the correct file type? In my case, the string needs to end in .txt. Basically, I'm asking how the fuck do I check a substring in a string in assembly?

I'm working in MASM by the way.
>>
>>53825705
Xamarin is just a C# hook into the java code.
>>
>>53825735
Yes, and it maps some of the shitty Javaness to C# goodness, like replacing all the int codes with C# enums.

You can also use F# in Xamarin.
>>
File: 1457206345005.gif (1MB, 457x358px) Image search: [Google] [Yandex] [Bing]
1457206345005.gif
1MB, 457x358px
>>53820383
How do I calculate the probability of getting dubs in a 10-second frame?
>>
>>53825724
you're being ridiculous

>>53825705
>>53825746
xamarin has exactly the same android SDK, xamarin is fucking useless unless you fell for the "C# is better than java" meme, you still have all the android garbage in xamarin
>>
google is literally shit and whatever happened to project ara or whatever the fuck, and that disgusting google glass
>>
>>53825772
>xamarin has exactly the same android SDK
Except for that thing I said. It also replaces all Java's shitty getters and setters wit C# properties. Probably some other stuff too.

>C# is better than java
This is uncontested
>>
>>53825772
>you're being ridiculous
I am being correct

>C# is better than java
It is
>>
>>53825770
posts per second
digits of the last post
post delay
>>
>>53825803
C# properties are FUCKING DISGUSTING FUCKING RETARDED SHITTER. JUST DOING WHAT OSTENSIBLY LOOKS LIKE ACCESSING A FIELD SHOULDN'T HAVE SIDE EFFECTS

>>53825806
kill yourself
>>
>>53825803
>bothering with getters/setters
Just use public fields.
>>
>>53825823
kill yourself
>>
>>53825817
>JUST DOING WHAT OSTENSIBLY LOOKS LIKE ACCESSING A FIELD SHOULDN'T HAVE SIDE EFFECTS
But you know you're not just accessing a field.

>>53825823
The Android SDK is filled to the brim with getters and setters. The is no avoiding them.
>>
>>53825817
Please, use a trip. I beg you.
>>
>>53825817
the prajeet is strong with this one
>>
>>53825666
pls respond
>>
>>53825851
am i hurting your ego too much, sperg?
>>
>>53825728

If you could solve the problem in C, solving it in assembly is just a matter of knowing your instructions.

Or do you not know how you'd solve this problem, even in C?
>>
>>53825861
looks like a system dll. Can you not see what methods are being called in it?
>>
>>53825859
if C# properties weren't disgusting, java would have them as well. but they are disgusting beyond belief and so java doesn't have it BY CHOICE
>>
>>53825869
I'd think most C programmers would use string.h for that.
>>
>>53824083

Maybe just some of the syntax. JS is fundamentally different to Java, starting by the prototypical inheritance model.
>>
>>53824083
epic meme retard
>>
File: 1442986512555.png (211KB, 327x316px) Image search: [Google] [Yandex] [Bing]
1442986512555.png
211KB, 327x316px
>>53825887
>>
>>53825865
no but you always make the thread a mess.
>>
>>53825887
>java would have them as well
What about C# lambda's and enums? Java only added them recently. Maybe Java is planning to add properties, but like every other feature is really slow about it. I guess it takes them awhile to figure out how to make their implementation as shit as possible.
>>
>>53825900
>>53825904
har har

guess why C# is pretty much the only language that has properties? why don't other languages copy it? there are plenty of languages that allow feature-creep even more so than C#
>>
How does /dpt/ like their versioning?
>major.minor.patch
>major.minor
>year.month.day
>commit hash
>other
>>
>>53825903
you don't have to make the preposterous claim that turkey is a european country, in a motherfucking programming thread
>>
>>53825919
Python has properties.
C# tries hard to be just as noob-friendly
>>
>>53825935
and we can all agree that python is disgusting

and C# is also disgusting. completely misses the point of java while trying to make a "better" version of java
>>
>>53825919
>why don't other languages copy it?
Many langugaes have them. Python, C++, JavaScript.
>>
>>53825952
C++ has everything except restraint or focus.
>>
>>53825890

Most C programmers could also implement strlen and strcmp if they had to.
>>
>>53825952
>C++
since fucking when

do you even know what we are talking about

http://seanmiddleditch.com/why-c-does-not-need-c-like-properties/
>>
>>53825880
I can but I dont see what it has to do with the specific thing im looking for which is disabling the demo feature that makes the application close itself after 30 mins

I probably could patch the dll itself but that doesnt seem like a good idea since it is a system dll
>>
>>53825974
Just decompile your C# and fine activation-related code
>>
>>53825930
I didn't

>in a motherfucking programming thread
Do you seriously complain about offtopic when you are always in an offtopic argument?
>>
>>53825951
>completely misses the point of java while trying to make a "better" version of java
But it is better. It has properties. In reality they don't cause problems in code, as it's always pretty clear when your changing a property. The benefits far outweigh the drawback.

Actually working generics is nice.

Unsigned ints
pointers
nice native interop
async workflow
Structs

These are all things that people like about C#. Java simply doesn't have any of them.

It's also nice for mobile dev that you can happily target iOS and Android with C#. And F# is an awesome language to work with too.
>>
>mfw oop fags make functions to change the values of variables instead of just changing the values of variables directly for no reason at all
>>
>>53826034
It's called encapsulation
>>
>>53826012
KILL YOURSELF

just use C++ if you want those features for fuck's sake? and properties are ridiculously disgusting
>>
>>53826034
kill yourself retard
>>
>>53826056
>just use C++ if you want those features for fuck's sake?
C++ isn't as productive to work with. Poorer tooling and no memory management. So why use it over C#?
>>
>>53826041
Having getters and setters completely side steps the benefits of encapsulation.
>>
>>53826075
kill yourself

>>53826078
kill yourself retard
>>
>>53826078
go on..
>>
>>53826072
he is correct, kill yourself retard
>>
>>53826034
And this is why properties exist.
>>
>>53826056
>properties are ridiculously disgusting
No. Writing a pair of functions for each field you want to allow to change is actually disgusting.
>>
>>53826078
what?
how?
>>
>>53826102
>>53826095
you don't understand OOP
>>
>>53826034
It's a common kind of retardation. Just like our society creates managers that manage managers, so our programmers create stupid code that manages other code that manages other code that prints fizzbuzz.
Ofc they are doing that instead of focusing on fundamental algorithms and performance.
That's why we can't have nice things. Every increase in productivity gets eaten by such stupid shit.
>>
>>53826102
eh, that's what you're doing with properties too
>>
FUCKING RETARDS ITT YOU SUCK AT PROGRAMMING
>>
>>53826075
Because I need performance, my friendo.
>>
File: enterprise.jpg (93KB, 739x710px) Image search: [Google] [Yandex] [Bing]
enterprise.jpg
93KB, 739x710px
>To me this diagram shows the success of Java. We have abstracted away the machinery of moving data and can create code that focuses on the one valuable thing; the business logic. And that single bit of valuable code that the business actually cares about is small – that is a good thing.

https://ptrthomas.wordpress.com/2006/06/06/java-call-stack-from-http-upto-jdbc-as-a-picture/#comment-84

Just fucking kill me
>>
>>53826123
Create a pair of useless getPropertyName and setPropertyName functions? No, compiler does that for you, that's the whole point
>>
>>53826129
butthurt carposter
>>
>>53826134
Then you should use C++
>>
>>53826141
This reminds me of a fire graph I saw for some node.js program that ended up getting re-written in Go.

I wonder if I can find it.
>>
>>53826141
>webshit
yeah very relevant

and the call stack would look similar for any webshit in any other language
>>
>>53826152
butthurt closeted car fetishist who sucks balls at programming
>>
>>53826148
>>Create a pair of useless getPropertyName and setPropertyName functions? No, compiler does that for you, that's the whole point
They are still useless functions because at that point it's literally no better than just making the variable public. In fact you could argue it's worse because there's probably a (very marginal, mind you) bit of overhead for the function call.
>>
>>53826161
>We just realised node sucks.. let's switch to Go!
I despair for this generation

Hoping C# murders everything in the years to come.
>>
>>53826193
C# is about as shit as go
>>
>>53826148
you still have to write the get/set function, that's the whole point of properties

you're just writing slightly less syntax but since every ide can create getter/setter automatically for you I don't see the point
>>
>>53826193
>implying Go is shit while using C#
Hilarious.
>>
>>53825974
> patch the dll
You can make a stub ntdll.dll that you place in the folder with the program exe and implement the api the program uses. Redirect all calls to the real ntdll except for those that query system timer. Try returning constant value from the system timer ones and see if that works. Unless they implemented some counter-measures, the dll in the folder with the program will be loaded before the system dll.
>>
>>53826199
It has much better tools, great ecosystem, it's mature, great performance. All important aspects Go is missing.

it also has most of the advantages of Go except being a little slower.
>>
>>53826187
>2016
>OOP retards still argue about public vs private variables
>ML gentlemen use high performance GPGPUs to train neural networks with billion of parameters. Soon these neural networks will be able to do OOP retards' job for a penny.


Again and again it irritates me that we use our wonderful computing machinery for stupid things like >>53826141 . Fucking monkeys.
>>
>>53826203
Stop being retarded. You implement 1 entity that manages 1 object entity vs implement 3 entities with different names that still manage 1 entity. The latter is absolutely retarded and relies on convention.

>>53826187
Last time I tested in C# simple properties didn't have overhead, they are inlined.
>>
>>53826214
C# is still bad, it's funny that retards like you talk shit about java and go when you're using C# yourself
>>
>>53826240
>C# is still bad,
Didn't say it wasn't. It's just better than the vast majority of what's out there. Java and Go included.
>>
>>53826239
>>Last time I tested in C# simple properties didn't have overhead, they are inlined.
The point still stands that they are no better than just having public variables. The only reason people bother with getters and setters is dogma.
>>
Anyone know what the fuck is wrong with VS's github plugin/diff tool? No changes reported although there are; then if I manually add any number of changes to a commit from command line, the github plugin magically turns on and reports any remaining changed files.
>>
>>53826255
epic opinion fag
>>
>>53826273
Thanks
>>
>>53826213
But the more robust version would be to inject the exe and patch the methods since they might be using ntdll timer api for something else or check if it increments etc.
>>
>>53826266
People bother with them because they want to maintain internal object's state intact in reaction to outside changes that might not assign correct/meaningful values to the fields
>>
>>53826266
you fucking retard, getters and setters can have side effects, or they can compute a value that doesn't exist in a field, and they are contained inside the class definition, the parts of the program that uses the object doesn't need to have specific implementation logic scattered all of the code base

FUCKING RETARD
>>
$ /data/js38 
js> function power_of_2(n) { if (n < 1) return 1; return power_of_2(n-1)*2; }
js> power_of_2(40)
1099511627776
js> 1<<40
256
js> power_of_2(20)
1048576
js> 1<<20
1048576
js> 1<<30
1073741824
js> 1<<31
-2147483648

Huh. So not only Number in JS is double, but bit operators are limited to signed 32bit.
>>
>>53826034
>>53826078
>>53826187
The program will still work if the data is in a file, on a different computer or in a database somewhere. A program doesn't even need to store the data directly but could compute it on the fly.

Whatever accesses the values doesn't have to care how they are stored and obtained. This is what makes it encapsulation.

Variables (in most languages, anyway) don't let you do that. If you could do that with ordinary variables or if you have properties or something similar in the language you're using, that's obviously the better choice. If you can't, you will need to write functions/methods to do it.

Of course, if you're only intending for the data to be stored locally in memory, you don't need to do that at all.
>>
>>53826266
>The point still stands that they are no better than just having public variables
What if you want to run some code internally in your object whenever a field value is changed?
>>
when you use e.g. your microwave oven, you just set the timer and press the start button. retarded C spergs are essentially telling you to use the raw microwave generator with no shielding and each user should manually set the voltages etc. and then when you get a new microwave, everything breaks because people only knew how to operate the original microwave

FUCKING RETARDS
>>
>>53826350
Please, get a trip.
>>
>>53826350
>and then when you get a new microwave, everything breaks because people only knew how to operate the original microwave
C is not assembly, C is a portable language.
>>
>>53826366
kill yourself

>>53826367
kill yourself
>>
NEW THREAD!!

>>53826391
>>
you tards truly suck at programming and you don't even want to learn things, you just masturbate your sperg ego
>>
>>53826374
Java programmers, every time.
>>
>>53826350
>>53826374
and this is what java does to people and why it is not one of /dpt/'s recommended languages to use.
>>
>>53826401
>>53826403
nicely memed retards

see >>53826400
>>
>>53826374
Please, get a trip.

Is there any reason you don't get a trip?
And just wondering, where are you from?
>>
>>53826431
Java: Not even once
>>
>>53826432
please kill yourself retard

>>53826445
kill yourself
>>
>>53826452
Please, reply to my post.
>>
>>53826432
I also would like to know what happens in his life that makes him so incredibly angry. People throw around "kill yourself retard" and such all the time on these forums but not in the same tone: this is a second time I see this guy arguing for java against c# properties and every other thing in the world that is not java and he's noticeably more angry and frustrated than most people here.
>>
>>53826471
you suck at programming
>>
>>53826496
I think he just sucks at programming
>>
>>53826563
He is the carposter.
>>
Could someone be a saint and tell me what is wrong with this besides that I'm autistic? I don't even know where to begin with what all is fucked up, but I think the root is something to do with the returns.

http://pastebin.com/k90sFLvH
Thread replies: 368
Thread images: 23
[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y / ] [Home]

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.
If a post contains personal/copyrighted/illegal content you can contact me at [email protected] with that post and thread number and it will be removed as soon as possible.
If a post contains illegal content, please click on its [Report] button and follow the instructions.
This is a 4chan archive - all of the content originated from them. If you need information for a Poster - you need to contact them.
This website shows only archived content and is not affiliated with 4chan in any way.
If you like this website please support us by donating with Bitcoin at 1XVgDnu36zCj97gLdeSwHMdiJaBkqhtMK