[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: 319
Thread images: 33

Disgusting old thread >>61321347

What are you working on, /g/?
>>
Kingdom of Heaven was such a fucking good movie.
>>
>>61325401
AS3 is best language
>>
>>61325421
Yep.
>>
>>61325401
>Disgusting old thread
Are we seriously just going to let our threads be taken over by racists?
>>
File: g.png (205KB, 813x848px) Image search: [Google]
g.png
205KB, 813x848px
<3 Programming Penguin
>>
>>61325401
go away televangelism


we dont like your kind
>>
>>61325456
OP used a crusader pic and called the old thread disgusting because it had a muslim in it.
>>
>>61325466
>desu vult
kek'd
>>
>>61325479
Yeah the thread should be deleted because op went to bloat it more than just
old thread >>xxx

What are you working on, /g/?

but the muslim poster should really kill itself.
>>
>>61325401
>>61325466
>>61325479
reminder that your belief system is equally as retarded as islam
>>
>pajeets literally cant read a function if it doesnt have parentheses

Cant make this shit up
>>
>>61325401
I wrote a script in that prints ebin C++ quotes each time I launch my terminal
>>
Hello, I am an Indin muslim from India (Indian continent, country of India). I speak the Hindu. What language shoild I learn?
>>
>>61325513
>my little script language is better than C++

Nope brainlet
>>
>>61325530
C++: glacial compiles, insane complexity, impenetrable errors, laughable cross-platform compat, basically useless tools. – Aaron Boodman
>>
>>61325528
start with english
>>
File: hhhhhhhhhhhhhhh.jpg (400KB, 1272x1152px) Image search: [Google]
hhhhhhhhhhhhhhh.jpg
400KB, 1272x1152px
>>61325513
>anti-c++ propaganda
holy kek, i had no idea you c brainlets were this delusional
>>
>>61325528
Say no more, C++!
>>
>>61325509
I don't believe in Abrahamic religions. I just post crusader-chan because she's a defender against religious tyranny.
>>61325511
Anon you seriously didn't get that guy's argument? The problem is the ambiguity between method/free function and member field.
>>61325528
English. It will let you learn better.
>>
>>61325513
LMAO C BRAINLET DETECTED
>>
>>61325544
Actually, it's Microsoft who's running pro C++ propaganda
>>
>>61325511
>complains about sepples being unreadable shit with a million overloaded constructs for "function calls"
>makes D even more ambiguous by choice
D, not even once
>>
>>61325554
If you think C++ is not overly complicated, just what is a protected abstract virtual base pure virtual private destructor and when was the last time you needed one? – Tom Cargill
>>
>>61325513
Good program anon. Add a wide range of truthful quotes just like that one.
>>
File: the birth of a nation.jpg (91KB, 1080x720px) Image search: [Google]
the birth of a nation.jpg
91KB, 1080x720px
>>61325466

>a series of failed invasions perpetrated by a wealthy elite eager to send their young to die in a third-world wasteland to expand their economic empire under the guise of nationalistic superiority from a continent of dumb white people who couldn't stop arguing with each other let alone develop any kind of "european identity" anyway

i honestly cannot think of a better symbol for the modern right wing
>>
>>61325554
No, hes the supposed d-fag that shills rust endlessly
>>
JavaScript is the language of love!
>>
>>61325578
Your keyboard catch fire after you typed that bud?
>>
please dont learn elixir... elixir very bad...
>>
>>61325575
My experience with modern right wing people is that they're extremely opposed to war/military intervention and favor isolating themselves.
So I'd say it's a pretty poor fit.
But this is a programming thread. Keep things programming related.
>>
>>61325513
top kek
>>
>>61325570
>and when was the last time you needed one?
Exactly. Most of the shit you don't even need.
>>
>>61325614
How is people isolating themselves not programming related?
>>
>>61325628
Just like the existence of C++ itself
>>
You will not need everything in C++ but when you do need it it's there and it's really good and it will help you achieve great things... Learn C++...
>>
>>61325596
why
>>
Since we're having anti-C++ propaganda threads.
>>
>>61325569
>I like to arbitrarily combine two completely separate actions into one and call it using a name which doesn't disclose the nature of the combined action
Do you have functions called 'walkTree()' that also print the tree?
It's dumb. There's no way around it dummy.
>>
>>61325655
>>61325562
>>
File: you.jpg (37KB, 680x383px) Image search: [Google]
you.jpg
37KB, 680x383px
>>61325614

>no you see when they say "deus vult" what they really mean is "i do not want to deus vult
>also could we please stay on topic (even though i'm not) so you don't highlight how much of a dipshit i am?
>>
>>61325655
Scott Meyers is my favorite speaker.
>>
If I'm going to write my first significant program, should I learn git first and use it locally?
>>
>>61325655
What the fuck? Please tell me this is a joke.
>>
>>61325655
>D has all this, except you don't even get the hint that it's a function because of parenthesis-dropping
>>
>>61325674
Sure, why not? Host it on GitHub and post the link here. We'll help you out.
>>
Does anyone know how to stop a running code block in org mode on emacs without killing emacs?
>>
>>61325687
>D has all this,
Nope
>>
File: Screenshot_20170711_224715.png (139KB, 1680x1050px) Image search: [Google]
Screenshot_20170711_224715.png
139KB, 1680x1050px
>>61325401
1. great image.
2. just makin my first python app. its SFTP client written with PyQt and pysftp.
pic very rel u /g/uys have suggestions?
>>
>>61325672
There are better ones for information, but yeah he's entertaining.
>>
>>61325632
>>61325614
Is this the reason for the modern renaissance of the extreme right?
>society is shit/antagonistic
>people isolate themselves from it
>people that isolate themselves move rightward

would also explain why internet nerds make up a large portion of it
>>
>>61325671
>right wing people say 'desu vult'
What? You build you world view from 4chan?
Fuck not even people here say that anymore AFAIK.
>>
>>61324573
CLRS is most definitely not God tier.
>>
>>61325678
>He hasnt seen all of coconut head's talks
Go find a playlist you cretin
>>
>>61325655
I think I finally understand why people hate C++...
>>
>>61325701
damn are u a hacker?
>>
>>61325714
Historically, languages designed for other people to use have been bad: Cobol, PL/I, Pascal, Ada, C++. The good languages have been those that were designed for their own creators: C, Perl, Smalltalk, Lisp. – Paul Graham
>>
>>61325701
Excellent rice, anon.
>>
>>61325721
?
>>
>>61325701
Good work
>>
>>61325707
>internet nerds are right wing
Really now this is ridiculous. I'd say it's the opposite. Non-nerds are more often right wing.
/dpt/, /fglt/ and the like are all fairly far left clearly.
But stop. This is definitely NOT programming.
>>
Im a neet without skills and addicted in animes, mmos, porn and grand strategy games
Cant get a job or have a life so I want to stop being a lame autist and try my luck learning programming and doing freelance stuff. Im too old and messed up to start something normal like college
Shits hopeless and I have to struggle against suicidal urges but I think theres some hope left
I decided to start with python by the third time and I hope I wont quit halfway to play crusader kings or watch steins gate again
Any suggestions are welcome
>>
>>61325690
I'm sorry, but I've seen what /g/ can "contribute" (e.g. gTorrent, other failures), and I don't want your help.
>>
>>61325513
Next time I'll go make a /dpt/ bot that posts ebin C++ quotes every hour :^)
>>
>>61325697
D has functions, two kinds of function pointers, operator() overloading, function overloading, templates and template specializations.

It's worse than C++ and that's before you get to parenthesis-dropping.
>>
>>61325752
>/dpt/, /fglt/ and the like are all fairly far left clearly
hahahahahahahahahaha
>>
>>61325701
>my first python app
noice
>>
writing USB and PCI for my arm64 based OS now
I should soon have a framebuffer and hopefully port webkit for a purely shitposting based OS
>>
>>61325655
>>61325672
Does anyone know where his talk at dconf went? It was a very long list of complaints about C++ basically. It's not that different from other talks he does really so I don't think they removed it out of embarrassment.
>>
>>61325760
Yeah but you can't do stupid shit like
int x (1)
int x {1}
int x = 1
etc
>>
File: scrot.png (438KB, 1366x768px) Image search: [Google]
scrot.png
438KB, 1366x768px
post screen shots of what you're working right now
>>
>>61325752
>thinking anyone on /fglt/ is an actual commie who runs a 100% libre OS
>>
File: 1461202093312.png (18KB, 800x400px) Image search: [Google]
1461202093312.png
18KB, 800x400px
>>61325778
>Go
Literally dumber than C++ faggots
>>
>>61325792
Go is good, faggot.
>>
>>61325770
python is turbo easy! (and i have some experience) and most of staff id done with libs from PyPi
>>
>>61325753

unfortunately unless you already have a portfolio a mile long, you will be stuck competing with pajeets who will do a week's worth of work for 10 dollars because that's enough to feed themselves for a month in india.

better to go back to school so you can network your way into a real job. successful freelancers (ie non-pajeets) work on high-profile contracts that don't get posted publicly and they do so after a long career in development
>>
>>61325752
lol
>>
>>61325776
Correct, but that's a different topic.
>>
>>61325776
rekt
>>
>>61325655
I don't get it. Where's the complaint?
>uh durr f behaves like a function but can be a million different things
Why is this a problem?
>>
>>61325761
>/fglt/
Some of them are actual communists.
>/dpt/
Left in the social sense. Economically I have no clue.
>>61325786
I've talked to them. Ask them.
>>
>>61325760
you forgot module and struct accessing.

The difference is given a source file, you could fairly quickly determine what x.f is, unlike c++.
>>
>>61325725
Somehow low level and full OOP languages weren't designed by one amateur guy. Like it's a lot of work or something.
>>
>>61325812
>Why is this a problem?
Because other people usually read your code.
>>
File: sadfwqte.jpg (65KB, 1280x720px) Image search: [Google]
sadfwqte.jpg
65KB, 1280x720px
>>61325401
We will take Jerusalem back. We always did in the past and we will do in the future. It is written on your Talmud, that is why you kikes are so afraid of little kids throwing pebbles at you. However your efforts to prevent the inevitable won't save you, enjoy it while it lasts.
>>
>>61325775
Things that matter?
https://www.youtube.com/watch?v=RT46MpK39rQ
Wasnt this his first and only dconf talk?
>>
>>61325812
Every time you see symbol(symbol2)
You can't actually know what it means. You need to consider the piece of code in context of the entire rest of the program to be sure what's going on.

This is considered cognitive overhead. Regardless of your aptitude your results will suffer if you have too much of this.
>>
>>61325836
Imagine someone finally nukes (((israel)))
>>
>>61325845
maybe if you're a brainlet
>>
>>61325840
No it wasn't. The talk was called something like 'Things D shouldn't do'.
>>
>>61325812
It took 17 years for C++ to get a refactoring tool.
>>
>>61325861
Anon I can see this comment coming a mile away. But really now. If you're completely undisturbed by cognitive overheard you can program in any language with any silly features and do just fine as long as the environment permits you to execute the code.

Go write programs that write your programs for you if this isn't an issue.
>>
>>61325862
It's "Things that matter", idiot
>>
File: timelineCpp17andCpp20_1.png (24KB, 896x468px) Image search: [Google]
timelineCpp17andCpp20_1.png
24KB, 896x468px
>>61325874
>>
>>61325862
>>61325890
No here we go:
http://www.bfilipek.com/2014/05/talk-summary-last-thing-d-needs-by-s.html?m=1
Fucking moron. It has largely been purged from the web though. Don't know where to find the actual talk.
>>
>>61325896
All new features added to C++ are intended to fix previously new features added to C++ – David Jameson
>>
>>61325812
>Why is this a problem?
Crazy hard to interpret the code. GCC uses dark magic in its own cryptic scripts that no one else can understand.
>>
File: 1497827764994.png (537KB, 1920x1080px) Image search: [Google]
1497827764994.png
537KB, 1920x1080px
>>61325907
It's literally a screenshot from the talk you dumb fucking autist
>>
>>61325896
>modules not on there
[worry]
>>
>>61325896
> Parallel STL

This wasn't done, AFAIK. I watched a lecture listing all the shit that has been done.
>>
>>61325919
God I'm not talking about that read the God damned comment thread.
Baka.
>>
>>61325896
>Coroutines in 2020
Literally 12 years behind go shit
>>
>>61325919
That one is from a c++ talk m8, he just reused it for the D one.
t. Scott Meyers expert
>>
Best distro if I only care about programming?
>>
>>61325942
Thanks for the update, Scott Meyers
>>
>>61325950
Gentoo
>>
>>61325960
Isn't that really hard to install or something?
>>
File: 1485173668037.jpg (106KB, 593x578px) Image search: [Google]
1485173668037.jpg
106KB, 593x578px
>>61325896
>No modules
>No pattern matching
>>
>>61325950
>I only care about programming
you don't care about other people?
>>
>>61325965
You will learn how to compile
>>
>>61325970
Nope.
>>
>>61325931
Still processing the new variadic template capabilities in 17. It's kinda crazy.
>>
>>61325950
Are you new?
Go start with Manjaro or some shit. You should consult /fglt/
>>
>>61325942
>he just reused it
He's an OOP programmer after all.
>>
>>61325907
>C++ programmers so butt blasted by the talk they decided to remove the talk
>all that remains now is people on ycombinator and assorted sites discussing it
How does this not look worse for C++?
>>
>>61325983
then you'll live a sad sad life

people need human contact
>>
File: 1491014298407.png (1008KB, 1920x1080px) Image search: [Google]
1491014298407.png
1008KB, 1920x1080px
>>61325968
How can people deal with the lack of modules in 2017?
>>
>>61325950
It's a more difficult question than people think.
*buntu would be my default answer but it's currently outdated.
>>
>>61326003
>not debian
>>
>>61326015
Microsoft is trying to defend C++
>>
>>61326048
what are modules?

explain in 1 sentence or less
>>
>>61325919
Is this supposed to be a problem?
Can't you guys critize c++ in a way that makes it seem like you at least know some programming?
>>
File: bill-gates-microsoft-excel.png.jpg (20KB, 430x322px) Image search: [Google]
bill-gates-microsoft-excel.png.jpg
20KB, 430x322px
>not writing your code on Windows and then transferring it to a virtual machine running Linux for compilation
>>
>>61326063
Imagine not having to write header files.
>>
>>61326063
>explain in 1 sentence or less
How can I explain anything in 0 sentence?
>>
>>61326064
C++ has been criticized so much that it achieved the brainlet status already. If you want to look at them go see archives and hackernews
>>
>>61325575

>I don't know a single thing about The Crusades: The Post.
>>
How can one go about making a stacked area chart with two y variables in R? The only documentation I've seen on it says to make another column that basically identifies which y variable
>>
>>61326075
You can't. Please do remember that C++ damages human brain.
>>
>>61325803
>>61325753

although i just want to add to this that doing something is better than nothing, especially if you are depressed and feeling suicidal. this is also not a good place for *real* advice because every good piece of advice you will get will be mixed in with dozens of insults. being overly-critical and disparaging about other's ability is basically par for the course here, like any board on 4chan really.

you *can* make a living doing freelance webdev for instance, because it's a skill that is easily marketable to small business owners, plus you can get away with basically just re-packaging boilerplate templates and they'll never know the difference (look up wordpress). but like with anything freelance, it requires a lot of gumption, elbow-grease and get-up-and-go. you will have to work your ass off, build a portfolio and hit the pavement every god damn day for the first few YEARS of your career. but if you want to do it, shoot for the stars man
>>
>>61325575
>Average /pol/ tard
No wonder they never experience bodily contact with females
>>
>>61326115
>`
>>
>python doesn't have ++
Why?
>>
>>61326157
Apparently it creates confusion
>>
>>61326157
i = i + 1
>>
>>61326167
Python has +=, just not ++
>>
>>61326157
What type is +?
>>
>>61326157

because 99% of the time you just use the iterator and the object being iterated on simultaneously, i.e.

for thing in list:
do_something(thing)
return 'haha benis :DD'


if you really need to do it for whatever reason, just use `i+=1`
>>
>>61326157
import this

...
>"explicit is better than implicit"
...
>>
>>61326096
pls help
>>
Will never understand the python mentality,.
Why would anybody want to waste time having to write the same program twice when they inevitably realize python isnt good.
>>
>>61326087
I don't have that much free time.
I just can't see how f(x) is supposed to be meaningful in any language.
Should we bitch about how many things x can be too?
>>
>>61325539
But C++ lets you do this:

#include <iostream>

struct sayHello {
sayHello() { std::cout << "Hello, World!\n"; }
};

int main() {
delete new sayHello;
return 0;
}
>>
>>61326185

from this import that


and if you still really dont like it

from this import that as special_that
>>
>>61326205
https://stackoverflow.com/questions/5030389/getting-a-stacked-area-plot-in-r
>>
>>61326214
That's fun.
>>
>>61326206

because raw-millisecond performance is not a concern for many application anymore.

who fucking cares if your daily maintenance script takes 12 seconds to run instead of 7
>>
>>61326214
horrible
>>
>>61326239
>takes 12 seconds to run instead of 7
More like a minute or two.
>>
>>61326239
not him, have you looked at nim?
https://nim-lang.org/
>>
File: annoyedpepe.jpg (20KB, 306x306px) Image search: [Google]
annoyedpepe.jpg
20KB, 306x306px
>>61326253

>oh no i lost 2 precious minutes at 3AM
>>
>>61326214
struct foo
{
void
suicide()
{
delete this;
}
};

int
main(int, char**)
{
auto* ptr = new foo;
ptr->suicide();

return 0;
}
>>
>>61326275
Your attitude is the reason every website now comes with no less than 3MB of Javascript attached.
>>
File: 16649264.jpg (41KB, 480x475px) Image search: [Google]
16649264.jpg
41KB, 480x475px
Where did the gate keeper go?
>>
>>61325935
Go is about 45 years behind C when it comes to generic programming.
>>
>>61326275

there is a difference between recognizing when maximum performance is not a high priority concern and being completely irresponsible
>>
File: DD5me4XXgAAZqro[1].jpg (89KB, 1200x658px) Image search: [Google]
DD5me4XXgAAZqro[1].jpg
89KB, 1200x658px
>>61326311
there's always workarounds, anon
>>
>>61326326
explain pic related
>>
>>61326343
Go is shit.
>>
>>61326343
What is there to explain?
>>
>>61326318

meant to quote >>61326294
>>
>>61325896
>>61325912
Seriously, fuck this short upgrade cycle bullshit. Language standards are best evolved on a seven-year cycle or longer. Keeping pajeets employed at Red Hat or Green Hills or Keil or Intel or wherever isn't worth reworking my code and libraries to match.

>>61325907
>For such young language, we can for instance, change spec more often (even if it breaks old code)
Even more seriously, fuck this nigger with a crowbar right in the eye. I have work to do and I expect to do it once and leave it alone.
>>
>>61326275
>having your computer turned on at 3AM
>>
>>61326376
>turning your computer off
>>
>>61326376

>implying im not referring to the company server
>>
>>61326376
>he is not an night owl
>>
File: pm-lee.jpg (53KB, 760x507px) Image search: [Google]
pm-lee.jpg
53KB, 760x507px
>>61319875
>>61319930
In honor of Lee Hsien Loong I wrote a sudoku solver. It's incredible slow but werks:

 8  5  .  .  .  2  4  .  .
7 2 . . . . . . 9
. . 4 . . . . . .
. . . 1 . 7 . . 2
3 . 5 . . . 9 . .
. 4 . . . . . . .
. . . . 8 . . 7 .
. 1 7 . . . . . .
. . . . 3 6 . 4 .
---------------------------
8 5 9 6 1 2 4 3 7
7 2 3 8 5 4 1 6 9
1 6 4 3 7 9 5 2 8
9 8 6 1 4 7 3 5 2
3 7 5 2 6 8 9 1 4
2 4 1 5 9 3 7 8 6
4 3 2 9 8 1 6 7 5
6 1 7 4 2 5 8 9 3
5 9 8 7 3 6 2 4 1
---------------------------

real 1m25.768s
user 1m24.234s
sys 0m0.047s
>>
Reminder to work on your social skills from time to time.
>>
>>61326326
>monomorphized
what's that?
>>
>>61326492
my what?
>>
is there a discord?
>>
>>61326585
No. Fuck off to >>>/v/.
>>
>>61326585
yes, but it's not official, and is shit
>>
>>61326585
>>>/v/
>>
>>61326585
Kill yourself , /v/ermin.
>>
>>61326585
fuck off, /v/
>>
>>61326534
means do away with polymorphism
>>
>>61326343
Basically a C++ programming is running a preprocessor on Go to make it a worse language.
>>
>>61326326
this is actually on arcane memery level of gpu accelerated terminal emulator written in rust, good job redditors
>>
>>61326610
>>61326609
>>61326600
>>61326599
>>61326595

i've literally never posted on /v/ and have been here longer with my trip than all of you together. This is verifiable with the archives which sadly only go back to 2010, but my posts still go to then.

Trump won

btw, anyone here have any experience with programming the 80386 in protected mode?
>>
>>61319875
What does line 171 do? I've seen '&' used that way I don't understand.

What does line 174 do to? "&= ~" is unknown to me too.
>>
>>61326885
>abusing international language characters
That's tumblr-tier. ღ
>>
>>61326967

https://en.wikipedia.org/wiki/Bitwise_operations_in_C
>>
>>61326959
KYS TRIPSHIT
>>
File: 5267088194_ed0a2903a3.jpg (84KB, 500x376px) Image search: [Google]
5267088194_ed0a2903a3.jpg
84KB, 500x376px
>>61326991

Filter me if you don't like it, sweetie :)
>>
>>61326991
>reeeee i'm irrationally offended by tripcodes
good to know :^)
>>
File: scrot.png (46KB, 575x244px) Image search: [Google]
scrot.png
46KB, 575x244px
>tfw efficient collision detection
>>
>>61326959
>I've been a nuisance since after 4chan became a popular site
Great achievement.
>>
>>61327102
what lang
>>
why does R lower my self esteem so much
>>
>>61327102
>efficient
>>
Idris is a reasonable language
>>
>>61327162
python
>>
>>61327260
pretty safe post anon
>>
File: pic_templar_0.jpg (94KB, 960x720px) Image search: [Google]
pic_templar_0.jpg
94KB, 960x720px
>>61325401
Is C God's language?
>>
>>61327331
Thanks anon
>>
>>61327380
no, that's math
>>
Why is it so hard to come up with project ideas that aren't stupid beginner tier projects? I need a better project on my resume.
>>
>>61327474
Write a compiler for your programming language.
>>
>>61327611
Already done :(
>>
>>61327652
Write a ray tracer?
>>
>>61327652
>>61327611
Modify it to be optimising.
>>
>>61327657
Already done :(
>>
>>61327880
Don't lie to me like this, Anon.
>>
>>61327908
Already did :(
>>
Anyone know a good forum dedicated to programming ?
>>
>>61327983
It doesn't exist.
>>
>>61327983
techenclave.com
>>
>>61327983
lainchan / lambda
>>
>>61328026
Thanks pal
>>
What are some good forums dedicated to programming ?
>>
>>61328115
Already done :(
>>
Is it true what they say about hacking with c++? If you code in C++, you turn into a little girl?
>>
>>61328115
reddit
>>
>>61328144
cringe

kill yourself
>>
.global _Reset
_Reset:
//print a star for x amount of times
mov x1, 0x09000000 // the text output memory address
mov x3, '*' //our character
mov x4, 30 //our amount
b loop
loop:
str x3, [x1] //put the asterisk in the memory address in reg x1
sub x4, x4, 1 //put the iterator down 1 point
cmp x4, 0 //if x4 0, stop looping
bne loop

need to write a USB driver to get keyboard input now lmao
>>
>>61328152
>Saying "cringe" as a sentence
Kill yourself.

>>61328144
No. If you """code""" in C++, you turn into a a mouthbreathing retard.
>>
>>61328168
xD
>>
File: 1366685479375.gif (924KB, 500x504px) Image search: [Google]
1366685479375.gif
924KB, 500x504px
tell me about game AIs

throw any fucking resource at me I have no clue what I'm looking for but I'm determined
>>
>>61328193
https://aigamedev.com/open/highlights/top-ai-games/
>>
alright i'll call you later
>>
File: ai.png (641KB, 781x1138px) Image search: [Google]
ai.png
641KB, 781x1138px
>>61328193
https://github.com/miloyip/game-programmer

and Nilsson's "Principles of Artificial Intelligence" for beginner beginner stuff
>>
File: ThreeColorResultOne_0.png (22KB, 518x311px) Image search: [Google]
ThreeColorResultOne_0.png
22KB, 518x311px
>>
>>61328309
Please use a log scale. Haskell is fucking up the results.
>>
>>61325401
>calls mudslime thread disgusting
>posts crus-haters shit
ok
>>
>>61328435
Why did Trump have to settle for just cracking down on NEW Mexican and Islamic immigration? And why, in the case of Mexicans, is he only focused on illegals?
Fucking ban them ALL! There are still Muslims and Mexicans here, fucking kick them all out! What does it matter if they're here """""legally"""""?
>>
Haskell, PureScript, or Idris?
>>
>>61328548
yes
>>
Anyone have the OP with the links? I want to read that "what have you done wrong thing"
>>
>>61328551
If you could only have one of them, which one would you prefer?
>>
>>61328568
No.
>>
>>61328568
>>61328582
>If you could only have one of them, which one would you prefer?
>No.
So this is the """""""""""""""power""""""""""""""" of dynamic typing...
>>
>>61328618
Maybe.
>>
>>61328618

(((dynamic))) typing
>>
>>61328636
>Maybe.
JUST
>>
>>61328539

>What does it matter if they're here """""legally"""""?
Because if they're here legally, then he can't legally kick them out. The courts won't allow it.
>>
>>61328568
one of all of them
>>
File: stoned-guy.jpg (24KB, 555x555px) Image search: [Google]
stoned-guy.jpg
24KB, 555x555px
>>61328636
>"Haskell, PureScript, or Idris? If you could only have one of them, which one would you prefer?"
>function declared to return a member of a ternary enum
>none of the three members are applicable
>return false
>yfw
>>
File: aSbY4PR.png (58KB, 602x677px) Image search: [Google]
aSbY4PR.png
58KB, 602x677px
>tfw dumb as fuck chess AI
>>
>>61328665
>he can't legally kick them out

If we amend the Constitution he can.
>>
>>61326959
There's only two characters at the beginning of your trip that aren't Us. Can trips be fully brute forced now?
>>
>>61328688
This is dumb how exactly?
It got you good. Its queen is free now, and your knight is forced to either retreat or stay frozen. Your bishop is free too but can't currently make itself useful.
>>
>>61328679

That's what you get for using esoteric programming languages.
>>
>>61328665
>The courts won't allow it.
Well the courts are fucking SJW cunts then! Everyone knows the law and the constitution should only apply to people.
>>
>>61328704

They have been for quite a while

it's mostly a luck thing, though

ones like this secure trip (DeepwebAcbn) aren't doable yet and require other techniques
>>
>>61328716
This was just a random screenshot.
Its dumb because I probably implemented it inefficiently, it allocates too much memory(and leaks it on top of that), evaluates EVERY move instead of discarding bad ones early and some rules aren't implemented yet, even some crucial ones like check/checkmate detection, and I don't know how to do it without slowing it down a lot more.
>>
Having trouble with a simple problem in C. Trying to input text and have the program store the amount of "words" of each length (1 character - 10 characters and a bucket for 11+). But when I signal the EOF (ctrl + d) nothing outputs, can anyone help?
#include <stdio.h>

#define IN 1
#define OUT 0

int main()
{
int c, lc, state, i;
int wordhis[11];

for (i = 0; i < 11; ++i)
wordhis[i] = 0;

while ((c = getchar()) != EOF) {
lc = 0;
if (c == ' ' || c == '\n' || c == '\t') {
state = OUT;
}
else {
++lc;
state = IN;
while ((c = getchar()) != EOF && c != ' ' || c != '\n' || c != '\t') {
++lc;
}
}
if (state == IN && lc < 11)
++wordhis[lc-'0'];
else if (lc == 11)
++wordhis[10];
}
for (i = 0; i < 11; ++i)
printf("%d ", wordhis[i]);
}
>>
>>61328703

If we amend the constitution, we can do anything. You can declare that up is down and all Catholic priests must sprint to the nearest city hall every Wednesday at 8:19 PM Eastern Standard Time and shout, "Praise Kek," or else be drawn and quartered, and the courts can't do anything about it because the constitution can never be unconstitutional by definition, and where there is a contradiction, the later text always applies. The constitution is the legal equivalent of running code directly in the kernel with memory protection off.

Fortunately, you need 3/4 of states to agree on whatever it is you want to do to be able to change it.
>>
>>61328792
>crack the nuclear codes
>make the country threaten to commit sudoku unless the states agree
>hey look the states conveniently agree
>>
>>61328792
Ruby, do you think you could outprogram OSGTP if you and he got into a severe disagreement?
>>
>>61328728

>the courts are fucking SJW cunts then!
The supreme court now has a majority of conservatives. The newest pick for the supreme court believes that laws should be interpreted literally (a sentiment I personally agree with), and would not likely side with a decision to force people who have gone through the proper paperwork to live in this country, to leave, just because of their national origin. It is the job of the courts to ensure that all laws are upheld as written, and that everyone, including the US government, keeps their word on their agreements. If we say "you can live here if you do this," we can't later say, "sorry, you have to leave even though we said you can stay."

>Everyone knows the law and the constitution should only apply to people.
1 U.S.C. § 8:
(a) In determining the meaning of any Act of Congress, or of any ruling, regulation, or interpretation of the various administrative bureaus and agencies of the United States, the words “person”, “human being”, “child”, and “individual”, shall include every infant member of the species homo sapiens who is born alive at any stage of development.

(b) As used in this section, the term “born alive”, with respect to a member of the species homo sapiens, means the complete expulsion or extraction from his or her mother of that member, at any stage of development, who after such expulsion or extraction breathes or has a beating heart, pulsation of the umbilical cord, or definite movement of voluntary muscles, regardless of whether the umbilical cord has been cut, and regardless of whether the expulsion or extraction occurs as a result of natural or induced labor, cesarean section, or induced abortion.

(c) Nothing in this section shall be construed to affirm, deny, expand, or contract any legal status or legal right applicable to any member of the species homo sapiens at any point prior to being “born alive” as defined in this section.
>>
Benis& myFunction(){
std::shared_ptr<Benis> temp;
temp.reset(new Benis());
temp->doStuff();
return *temp;
}

What happens when this function returns? temp goes out of scope and its everything inside is dangling right? Im getting some weird bugs.
>>
>>61328833

Trump already has the nuclear codes. If he threatened the states to agree, he'd probably get assassinated by his own secret service, were he not immediately stripped of power via the 26th amendment.

>>61328841

Define: outprogram. How would such a competition take place? What measure of programming ability would be used?
>>
    bool b = true;
b != b;
if (b)
std::cout << "Valid C++!";
>>
>>61328941

This seems reasonable to me.
>>
>>61328900
>Define: outprogram. How would such a competition take place? What measure of programming ability would be used?
You'd each get identical computers with an installation of a mutually agreed-upon OS and software at the nearest available location with internet access to the midpoint between your locations at the time the disagreement occurs. The winner would be the first to complete 50 of the tasks in <https://better-dpt-roll.github.io/>.
>>
>>61328941
 
int b = 10;
b != 9999;
if (b == 10)
std::cout << "He thinks != mutates and isnt just a boolean operator" << std::endl;

std::cout << "Wtf I hate c++ now" << std::endl;
>>
>>61328982

Would the tasks be randomly assigned, allowed to be chosen by ourselves, or would be given the same 50 tasks? It might depend upon which tasks were involved.
>>
JavaScript is a language
>>
>>61329012
You would each choose your own set of tasks.
>>
>>61328877
>>61328728
OH SHIT BTFO
Hope you get cured of your /pol/io stupid trumpfag
>>
>>61329035
nice one anon
>>
>>61329023

I am not sure then. Might be an interesting challenge.
>>
>>61329023

Doesn't sound fair to me.
>>
>>61329140
In what way might it be unfair?
>>
>>61329129
R-Ruby senpai, how come Ruby does have a filter method on arrays?
>>
who else /used to program but then got a job doing it and now hate it/
>>
>>61328982
why come up with new rules
just like set up your typical topcoder srm and let our beloved trips b a t t l e

that'd be an alright show tbqh
>>
>>61329248
They should livestream it too.
>>
>>61329206

Why does Ruby have a filter method on arrays? Well, technically it's called select, and it's because it's a useful method. Sometimes you want to grab all of the elements in some sequence that match a particular predicate.
>>
>>61329150

They should be the same tasks.
>>
>>61329257
R-Ruby senpai, d-do you think one day I can become as knowledgeable as you?
(๑→﹏←๑) 。゚
>>
>>61329314
The idea is that you each choose the easiest tasks for you. If you each have to do the same tasks it might be unfair to one of you since your areas of expertise likely don't line up exactly
>>
>>61329350

Then we should select the tasks at which neither of us are experts.
>>
>>61329371
Much harder to enforce ("oh gee, I really suck at hello world, I'd better do that one!"). Trying to get you to choose the easiest tasks is self-enforcing.
>>
>>61329371
How about you both program in Ruby then. Seems fair
>>
>>61329422
That might have been poorly communicated. Didn't mean to imply Ruby was bad at Ruby, was a dumb joke
>>
>>61329422
have to admit I chuckled a bit anon
>>
File: Chaos;Pepe.png (269KB, 798x546px) Image search: [Google]
Chaos;Pepe.png
269KB, 798x546px
Whats something fun that I can make? I have no interests but like anime kinda.
>>
Why don't Python and OCaml support multicore?
>>
>>61329601
>python
from multiprocessing import Pool
>>
>>61329565
animation software
>>
>>61329650
Already done :(
>>
What are some Musl-only C library functions?
>>
>>61329675
>non portable C

no such thing
>>
When I move I scan the tiles along the X and Y axis individually, and then offset in case of collision. I added ramps, they do work. But, if there are solid tiles near it, then some weird stuff happens. I think I can solve the issue if I purely ignore solid tiles if I am currently on a ramp. Because tiles go from left to right and up to down, my problem is what i've tried to implement only works in one direction and not the other. Any ideas?
static void A_P_scanMapY ( entity_t *ent, int value ) 
{
int cx = 0,
cy = 0;
int top_t = 0;
int bot_t = 0;
int lft_t = 0;
int rgt_t = 0;
int til_s = 0;
int til_w = 0,
til_h = 0;
int tile = 0;
int tiletype = 0;
level_t *map = NULL;
box_t t_b;

map = &g_level;

til_w = g_tileset[til_s].tile_w;
til_h = g_tileset[til_s].tile_h;

top_t = (int)floor(ent->hb.box.y/til_h);
top_t = (top_t<0) ? 0 : top_t;

bot_t = (int)floor((ent->hb.box.y + ent->hb.box.h - 1)/til_h);
bot_t = (bot_t>map->Height) ? map->Height : bot_t;

rgt_t = (int)ceil((ent->hb.box.x+ent->hb.box.w)/til_w);
rgt_t = (rgt_t>map->Width) ? map->Width : rgt_t;

lft_t = (int)floor(ent->hb.box.x/til_w);
lft_t = (lft_t<0) ? 0 : lft_t;

for ( cx=lft_t; cx<rgt_t; cx++ )
{
for ( cy=top_t; cy<=bot_t; cy++ )
{
tile = ( cy * map->Width ) + cx;
tiletype = map->layer[1].Data[tile];

if ( tiletype == 0 )
continue;

t_b.x = cx*til_w;
t_b.y = cy*til_h;
t_b.w = til_w;
t_b.h = til_h;

if ( chkCol ( ent->hb.box, t_b ) )
{
if ( A_P_scanSlope ( ent, cx, cy, map ) )
break;

if ( tiletype == 1 && !onslope )
{
if ( value == 0 )
break;

if ( value > 0 )
{
ent->pos[1] = cy*til_h - ent->hb.box.h;
A_P_sethb ( ent );
}
else if ( value < 0 )
{
ent->pos[1] = cy*til_h + til_h;
A_P_sethb ( ent );
}
break;
}
}
}
}

map = NULL;

return;
}
>>
>>61329325

Probably. I waste a lot of time playing video games and watching cartoons. Just write programs, read other people's programs, read articles, and fiddle around with new tech, and eventually you'll develop skills.

>>61329601

A more important question would be why you would want to use either of these languages if your performance demands are so high that you need to start using multiple cores.
>>
>>61329706
I don't want to use either of those languages, I'm just expressing bewilderment at their persistent refusal to enter the current century.
>>
>>61329686
Writing non portable C is trivial
int main() {
assert(sizeof(long) == 8);
return 0;
}
>>
>>61329686
Musl is not portable
>>
File: defensive.jpg (34KB, 710x720px) Image search: [Google]
defensive.jpg
34KB, 710x720px
>>61329706
B-But Ruby Sempai, you are so smart! ...
..
W-What cartoons do you watch and what games d-do you play? M-Maybe I can learn to become smarter f-from them. I-I've been reading pickaxe to learn Ruby. I want to read P-Programing Pearls, H-Hacker's Delight and CLRS s-soon. D-Do you think I am ready? (๑→﹏←๑) 。゚
>>
Are Manning books generally good?
>>
No language is turing complete.
>>
>>61329719

Well, I have no idea about OCaml, but the problem is that Python's garbage collector isn't thread safe, and to make it thread safe would require breaking backwards compatibility with native extensions. Ruby also has a GIL like Python, and that's because the native data structures aren't thread safe, and making them thread safe could slow shit down. IIRC, JRuby doesn't have a GIL, but also does nothing to make native data structures thread safe, and thus the onus is on the programmer to add their own mutexes when they want to, say, add a million elements to an array using multiple threads.

Concurrency: it's tricky business, with compromises all around.
>>
>>61329754
Yeah lad, which one were you looking at?
>>
File: aubrey_plaza_bikini.jpg (314KB, 1024x1371px) Image search: [Google]
aubrey_plaza_bikini.jpg
314KB, 1024x1371px
>>61329778
How old are you Ruby? Are you a NEET?
>>
>>61329744
>larping as anime girl
get out trannies not allowed
TWO GENDERS
I AM NOT """CIS SCUM"""
I WILL NOT USE """YOUR""" """""PRONOUNS"""""
YOU ARE WHAT YOUR BODY SAYS YOU ARE
ANYTHING ELSE IS DELUSION
YOU DON'T GET A CHOICE
IF YOU'RE MALE (and you are) YOU'RE MORALLY FUCKING OBLIGATED TO BE MASCULINE
IF YOU AREN'T MASCULINE YOU'RE WEAK AND DISGUSTING
A BAD FUCKING PERSON
BAD!!!
>>
>>61329825
faggot spotted
>>
>>61329786
https://www.manning.com/books/elm-in-action
https://www.manning.com/books/natural-language-processing-in-action
>>
>>61329825
There are no male /dpt/ posters.
>>
>>61329825
not xir but
>transphobes are more triggered that we exist than we are that they hate us
what else is new
>>
>>61329744

>B-But Ruby Sempai, you are so smart!
Most of that's just reading a lot. Also, getting into arguments on the Internet, losing, and then learning from said arguments. Never underestimate the importance of failing. It's the intellectual equivalent of "no pain, no gain."

>W-What cartoons do you watch and what games d-do you play?
Well, I just finished up Gravity Falls about a week ago. If you're looking for something more Japanese, some of my favorite anime have been Utwarerumono (which is about a masked amnesiac who stumbles into some country town and ends up becoming emperor of Japan) and Shin Sekai Yori (which has a bit more complicated of a plot that I can't describe in one sentence). As for games... right now I've been going through all of the Zelda games that I haven't completed yet. So just this summer, I went through Wind Waker, Phantom Hourglass, Majora's Mask 3D (which is a bit harder than the N64 version in a couple of areas, particularly Twinmold), and now Zelda 2.

> M-Maybe I can learn to become smarter f-from them.
Not really.

>I-I've been reading pickaxe to learn Ruby. I want to read P-Programing Pearls, H-Hacker's Delight and CLRS s-soon. D-Do you think I am ready?
Ready for what? There is no end game.

~ATH(you) {
learn();
program();
}
>>
>>61329945

How old are you what is your current financial status and are you a neet?
>>
r8 my ~ath17 (newest standard) immortality kode
import author me;
~ath(this) {
~ath(me) {} execute(me);
} execute(this);
this.die();
>>
>>61329889
Id wait until theyre finished.
>>
>>61329800

I am 25, and I am more or less a NEET until I begin my doctoral studies in August.

>>61329732

Even better:
_Static_assert(sizeof(long) == sizeof(size_t), "Hello, I am 64-bit Windows");


>>61329773

Assuming we could make a machine with an infinite amount of memory, I am certain that it could run some variant of Scheme, and that Scheme could take advantage of the infinite amount of memory.
>>
>>61330008
ta m8
>>
>>61329945
>~ATH(you)
>>61329994
>~ath(this)
what fucking sepples-ass shitlang is this
>>
New thread
>>61330035
>>
Suppose I'm writing a tiny program in C, with all code in the main() function. Is there any advantage between using global variables and local variables in this case? I know the stack has a reputation for being fast, but is it really faster than globals? I would think it would actually be slower, since global variables can be accessed by static address, while locals require calculating an offset from the stack pointer. I know the heap is slow, at least in terms of allocation, but that's not an issue here since all variables are allocated statically.
>>
>>61330041
please look up the stack register and the commands push and pop.
>>
>>61330021
>_Static_assert(sizeof(long) == sizeof(size_t), "Hello, I am 64-bit Windows");
Any idea how size_t is defined in C90 implementations for 64-bit Windows? Long is 32 bits, there's no long long in C90, so what would they typedef size_t to?

>Assuming we could make a machine with an infinite amount of memory, I am certain that it could run some variant of Scheme, and that Scheme could take advantage of the infinite amount of memory.
Actually, a language can be Turing complete, even if no hardware is, so long as the language itself doesn't impose any restrictions on the memory size. With C it's iffy, since pointers do need to have some defined size, and an infinite-memory machine would need to have infinite sized pointers, which wouldn't really work. But something like Brainf*ck, which doesn't use direct pointers at all but rather just jumps between adjacent memory cells, could potentially be used to program in an infinite-memory environment.
>>
[spoiler] this probably isn't the best idea [/spoiler]
But I need your advice. I need to make a number identifier (say, you write 0001 and the program tells you that it is a binary number). The program doesn't need to be on an specific language. Where do I start?
>>
>>61330063
I'm somewhat familiar than those, but are they really faster than reading from or writing to a fixed memory address?
>>
>>61328742
How do you get a message out a secure trip without knowing the salt?
>>
>>61330169

yeah that's really strange
>>
>>61330133
It's complicated and highly depends on the exact situation. Compile with -O5 and hope for the best. That's such a micro-optimization though. You'd better spend your time on maximizing cache.

I would probably say push and pop are faster due to being able to fit in a single word whereas loads may need a few words.
>>
>>61330205
I don't think my compiler goes up to -O5.
>>
>>61325896
cross platform file and dirs was also planned for c++17, did it got canceled?
Thread posts: 319
Thread images: 33


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