[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

/dpt/ - Daily Programming Thread

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 315
Thread images: 26

File: 1485438720022.png (423KB, 720x720px) Image search: [Google]
1485438720022.png
423KB, 720x720px
Old thread: >>59820692

What are you working on /g/?
>>
>>59825181
Lisp is the most powerful programming language.
>>
>>59825194
define "powerful programming language"
>>
>>59825181
AS3 is the only true language, all others are obsolete.
>>
>>59825194
>Lisp
Trash.
>>
>>59825194
Daily reminder that lisp machines had hardware-assisted garbage collection. Regardless of whether or not lisp was shit, that is a pretty cool factoid. IIRC, Azul is doing something similar for Java servers.
>>
>Master Foo and the Ten Thousand Lines

Master Foo once said to a visiting programmer: “There is more Unix-nature in one line of shell script than there is in ten thousand lines of C.”

The programmer, who was very proud of his mastery of C, said: “How can this be? C is the language in which the very kernel of Unix is implemented!”

Master Foo replied: “That is so. Nevertheless, there is more Unix-nature in one line of shell script than there is in ten thousand lines of C.”

The programmer grew distressed. “But through the C language we experience the enlightenment of the Patriarch Ritchie! We become as one with the operating system and the machine, reaping matchless performance!”

Master Foo replied: “All that you say is true. But there is still more Unix-nature in one line of shell script than there is in ten thousand lines of C.”

The programmer scoffed at Master Foo and rose to depart. But Master Foo nodded to his student Nubi, who wrote a line of shell script on a nearby whiteboard, and said: “Master programmer, consider this pipeline. Implemented in pure C, would it not span ten thousand lines?”

The programmer muttered through his beard, contemplating what Nubi had written. Finally he agreed that it was so.

“And how many hours would you require to implement and debug that C program?” asked Nubi.

“Many,” admitted the visiting programmer. “But only a fool would spend the time to do that when so many more worthy tasks await him.”

“And who better understands the Unix-nature?” Master Foo asked. “Is it he who writes the ten thousand lines, or he who, perceiving the emptiness of the task, gains merit by not coding?”

Upon hearing this, the programmer was enlightened.
>>
>>59825458
>Regardless of whether or not lisp was shit
Just to clarify, it was indeed shit.
>that is a pretty cool factoid
True.
>>
>>59825469
TL;DR
Don't reinvent the wheel.
>>
>>59825618
So you're saying to program in high level languages with garbage collectors?
>>
>>59825634
Yes. Use Lisp.
>>
>>59825656
I'd rather use other high level languages with garbage collection.
>>
>>59825656
Why would I be using a blatantly shit """""""""""""""""""""""""""""language"""""""""""""""""""""""""""""?
>>
>>59825634
No, I'm just saying don't implement something that is already available to you, unless you're doing it for learning purposes though.

In your example, it really depends on the application, if it's an embedded software app then I would try to use a lower level language. On the other hand, if I am designing an interface for some engine (e.g. unity) then I would prefer using something like python.
>>
>>59825668
You probably meant this:
(((((((((((((((((((((((((language))))))))))))))))))))))))
>inb4 not correct number of parenthesis.
>>
>start learning a language
>/g/ says it's shit
>drop it and move to another language

10th language in a row now
>>
>>59825671
>I would prefer using something like python
Stopped reading right there. Opinion discarded.
>>
>>59825693
You just fell for /g/'s trap to snuff out job competition.
>>
>>59825695
it's the end...
>>
>>59825688
This is why you use emacs to indent your code. You never count parentheses yourself, you infer their position from how emacs auto-indents your code.
>>
>>59825711
Your point being?
>>
File: anal beads.png (1KB, 539x37px) Image search: [Google]
anal beads.png
1KB, 539x37px
>>59825688
>inb4 not correct number of parenthesis.
haha tough luck buddy, try making a point next time without making a single mistake
>>
File: 1484861071688.jpg (83KB, 685x710px) Image search: [Google]
1484861071688.jpg
83KB, 685x710px
Should I be using Alex/Happy or Parsec?
>>
What is an actually good book on C++ as a first language?

>just Principles and Practice Using C++ bro

I swear this book is a retarded meme. Between the outdated custom header he makes you use that has known bugs, to the "review" where you're apparently expected to google shit he never explained that is so much more advanced than the review it might as well be "jk just read another book or learn programming online", this shit is painful to work through. I keep getting stuck on literally every exercise/drill/review because he conveniently did not actually explain the shit that is in the "review". Surely there must be a better way.
>>
File: 1415828640832.png (1MB, 1200x1800px) Image search: [Google]
1415828640832.png
1MB, 1200x1800px
>>59825693
>seriously taking opinions from /g/
>>59825733
That was my point dummy, that it adds more overhead to check the number of parenthesis. And we're all traps here so I could sure use some anal beads~
>>
anyone >>59825681 ?
>>
>>59825754
Neither.
>>
>>59825785
Just write it out by hand, idiot.
>>
>java test in a week
>still can't manipulate linkedlists for shit
Help me gee
>>
>>59825688
>>59825693
>>59825772
>>59825784
Whom are you referencing this from?
>>
>>59825772
>actually good book on C++
There is no such thing. C++ is a terrible language, so it's only natural that all of the resources on it are terrible as well.
>>
>>59825798
Nah
>>
>>59825807
LOL
>>
>>59825618
>Master Foo and the Methodologist

When Master Foo and his student Nubi journeyed among the sacred sites, it was the Master's custom in the evenings to offer public instruction to Unix neophytes of the towns and villages in which they stopped for the night.

On one such occasion, a methodologist was among those who gathered to listen.

“If you do not repeatedly profile your code for hot spots while tuning, you will be like a fisherman who casts his net in an empty lake,” said Master Foo.

“Is it not, then, also true,” said the methodology consultant, “that if you do not continually measure your productivity while managing resources, you will be like a fisherman who casts his net in an empty lake?”

“I once came upon a fisherman who just at that moment let his net fall in the lake on which his boat was floating,” said Master Foo. “He scrabbled around in the bottom of his boat for quite a while looking for it.”

“But,” said the methodologist, “if he had dropped his net in the lake, why was he looking in the boat?”

“Because he could not swim,” replied Master Foo.

Upon hearing this, the methodologist was enlightened.
>>
>>59825772
Bjarne should give up the idea of writing books.

https://www.amazon.com/Discovering-Modern-Scientists-Programmers-Depth/dp/0134383583

this desu, covers c++14 and some bits of 17
>>
>>59825807
That's a nice story, but who are you quoting?
>>
>>59825785
use Maths mode with numbered list, also google it faggot.

>>59825772
I think this http://www.learncpp.com/ and this http://www.cplusplus.com/ are sufficiently good sources and won't waste much of your time and good for starting out.
>>
>>59825841
>use Maths mode with numbered list
What
>>
>>59825835
>>59825818
Don't bully me pls

I can remove and get shit for them but what I'm having trouble with is exchaging values between two or more linked lists. Solutions to this problem?

>inb4 read a book
>>
>>59825772
This is kind of why you don't learn C++ as your first language. Stroustrup's book is the least bad option if you are a beginner. I learned C++ only from it and from Modern Effective C++, but it also wasn't my first language.
>>
>>59825851
Elaborate.
>>
>>59825851
>inb4 read a book
Who said that?
>>
>>59825784
This image is doing weird things to my penis.
>>
>>59825897
kys autist
>>
>>59825887
>>59825897
Like I know how to use it to store stuff and how to put stuff in them and remove them later if I want. But I can't exhange values between them.

>>59825907
Don't be rude
>>
>>59825918
Please answer the question. Who said the thing you quoted?
>>
>>59825918
Exchange in what way?
>>
https://www.youtube.com/watch?v=n4fI4eUTTKM
>What's essentially just linking functions
>4 hours of explanation
C and C++ are terrible languages.
>>
>>59825934
> x----DDD this "who are u qoting" ting is funny AND relevant 2 stoping shitposters............................................. - you
You have never, EVER, been on /jp/ in your life. You are among the /dpt/ Autists, the legendary crossboarders/consumershits who have not programmed anything past fizzbuzz (a generous assumption) yet make this thread their home. Unironically and immediately consult your nearest bottle of cyanide or acetaminophen and just chug the contents down.
>>
>>59825934
I don't know what you're talking about

>>59825937
nvm just figured it out
>>
>>59825973
Are you ok, anon? You're posting some weird things, but that's ok. Have a nice day, anon.
>>59825976
You quoted things nobody has previously said.
>>
>>59825997
I didn't quote anything at all. Quit being such an annoying faggot.
>>
>>59825973
If you're not quoting anyone, please stop typing in a retarded fashion.

>>59826008
>inb4 read a book
>java test in a week
>still can't manipulate linkedlists for shit
You quoted these things. Nobody has previously said them though.
>>
>>59825820
TL;DR
Don't reinvent the wheel, but also learn more about it and understand it in case you wanted to fix it or make it run better
>>59825973
>>59826008
Please don't feed the troll.
>>59825906
I want to do weird things to your penis too~
>>
>>59826025
I'm quoting every post verbatim you've made so far
>>
>>59826025
I wasn't quoting anything you autist, I was just sharing my struggles. Meme arrows don't have "quoting" as their designated use.
>>
>>59825820
>Master Foo and the Script Kiddie
A stranger from the land of Woot came to Master Foo as he was eating the morning meal with his students.

“I hear y00 are very l33t,” he said. “Pl33z teach m3 all y00 know.”

Master Foo's students looked at each other, confused by the stranger's barbarous language. Master Foo just smiled and replied: “You wish to learn the Way of Unix?”

“I want to b3 a wizard hax0r,” the stranger replied, “and 0wn ever3one's b0xen.”

“I do not teach that Way,” replied Master Foo.

The stranger grew agitated. “D00d, y00 r nothing but a p0ser,” he said. “If y00 n00 anything, y00 wud t33ch m3.”

“There is a path,” said Master Foo, “that might bring you to wisdom.” The master scribbled an IP address on a piece of paper. “Cracking this box should pose you little difficulty, as its guardians are incompetent. Return and tell me what you find.”

The stranger bowed and left. Master Foo finished his meal.

Days passed, then months. The stranger was forgotten.

Years later, the stranger from the land of Woot returned.

“Damn you!” he said, “I cracked that box, and it was easy like you said. But I got busted by the FBI and thrown in jail.”

“Good,” said Master Foo. “You are ready for the next lesson.” He scribbled an IP address on another piece of paper and handed it to the stranger.

“Are you crazy?” the stranger yelled. “After what I've been through, I'm never going to break into a computer again!”

Master Foo smiled. “Here,” he said, “is the beginning of wisdom.”

On hearing this, the stranger was enlightened.


TL;DR
Don't have ambitions.
>>
>>59826042
Link? I can't seem to find any of them. At no point in time did I say "*D"
>>59826052
>Meme arrows
Ah... So you're just new here.
In that case please at least make an attempt to learn the local culture before posting.
>>
>>59825966
Did you mean to reply to some post?
>>
>>59826062
>complaining about meme arrows
You do realize it's been years since you could have the majority of a thread not be less than 4 years old.
>>
>>59826062
>>59826025
I have a feeling you're a pajeet for some reason.
>>
File: you.jpg (19KB, 745x103px) Image search: [Google]
you.jpg
19KB, 745x103px
>>59826062
>>
>>59826069
Yes but I can't find it now.
>>
This guy just trolled you again and you all fell for it.
>>
>>59826076
>meme arrows
Return to your home board. Here, I'll even help you >>>/v/
>>59826079
Why is that exactly?
>>59826082
This image is obviously doctored. I never said anything like that.
>>
File: you.jpg (17KB, 751x87px) Image search: [Google]
you.jpg
17KB, 751x87px
>>59826119
If lying to yourself makes you feel better, sure, but you have a proper home board filled with people just like you. Actually, several:
>>>/b/
>>>/pol/
>>>/trash/
>>>/s4s/
>>>/r/eddit
>>
function(x){
return x;
}

I actually have this in my code... and it actually serves a purpose
>>
>>59826153
This is just the identity function.
>>
>>59826147
So how are your homeworks coming along? Are you playing too much games?
>>
>>59826147
>s4s

that's actually a good board though it's just too deep and you don't understand it
>>
>>59826189
Amen to that.
>>
>>59826161
Didn't know that was a thing. But I'm doing JS, not functional programming. It was just a strange case where I was constructing an object in the view, but the view wouldn't recognize it as an object unless I returned it from that identity function
>>
>>59826198
What does the identity function have to do with functional programming?
>>
>>59826153
t. programmerlet
>>
>>59826161
Wich is useful for some point free programming
>>
>>59826229
>point free
What do you think I am, some kind of degenerate?
>>
Relearning pthreads and thread synchronization in C for systems programming class.
>>
>>59826271
Sounds like fun.
>>
x language is actually really nice once you get used to it
>>
I have some ideas for a couple of phone applications that i want to run on IOS and Android. Where do i start? What language and what software?
>>
>>59826348
Swift for iOS, Java or Kotlin for Android.
>>
>>59826322
Programming is actually really nice once you stop doing it. Computers are actually really nice once you stop using them.
>>
>>59826373
Cheers. Is it possible to build for one OS and port to another without having to rewrite completely?
>>
>>59826392
I have no clue, really, never written an app for either of them.
>>
>>59826392
Assuming no platform specific features are used.
>>
>>59825458
Intel tried this too once.
https://en.wikipedia.org/wiki/Intel_iAPX_432
It didn't end well.
>>
>>59826206
That's what google / wiki said when I search for it
>>
>>59826378
4chan is really nice once you stop posting here.
>>
>>59826578
Life is really nice once you stop living.
>>
>>59826596
linux is finally nice once you remove stallman
>>
File: 1489112038773.jpg (48KB, 680x598px) Image search: [Google]
1489112038773.jpg
48KB, 680x598px
>to intelligant to program Rust
>>
>>59826625
Rust is trash.
>>
>>59826625
unsafe blocks turn me on
>>
File: bios.png (144KB, 2043x1432px) Image search: [Google]
bios.png
144KB, 2043x1432px
>>59825181
I've been disassembling this graphics card BIOS. idk if that's relevant in a programming thread.
Some interesting things to be found in there. Like there's a print screen key interrupt, and it actually prints the screen to an actual piece of paper. never knew the graphics card did that.
Also there's this one data structure that's used all over the place and I haven't been able to identify it. It's like a pointer to a table with pointers to a table with pointers, etc... Like five or six levels deep. No idea what it does.
>>
>>59826667
How does one get started with something like this?
>>
>>59826631
What is the alternative, then? D?
>>
>>59826683
>>59826667
THISTHISTHIS
>>
>>59826685
Anything, honestly. Rust is like the programming language that never got to be a programming language.
>>
File: confuspupper.jpg (59KB, 408x439px) Image search: [Google]
confuspupper.jpg
59KB, 408x439px
>>59826706
>programming language that never got to be a programming language.

What does this even mean?
>>
>>59826729
>using a meme language
>>
>>59826702
>>59826683
Just load a BIOS into a disassembler, then try to figure out what it does. That's all there is to it, really. An interactive disassembler (IDA) helps to keep track of known functions/data, and where they're referenced from, etc.
>>
@59826743
>"meme"
>>>/r/abbit
>>
>>59826706
>>59826727
I work in data science. It seems like Rust doesn't have the resources behind it that make a data science language useful. If I use Python or Scala/Java I have things like Hadoop and Mesos that I can take advantage of to actually get things accumulated and collected in a reasonable amount of time
>>
>Have to work on the linux kernel for a uni course
>One of the various exercises is printing information about loaded kernel modules such as their name, version, parameters and address in memory
>Been poring over include/linux/module.h for an hour and can't find anything relevant to parameter names and or values
WHERE ARE THEY FOR FUCK'S SAKE
WHY CAN'T I EVEN DO SOMETHING AS SIMPLE AS LOOKING UP NAMES THAT SHOULD BE TUCKED NEATLY IN A STRUCT
>>
>>59826751
>@
>>>/t/witter
>>
>>59826787
If you're not quoting anyone, please stop typing in such a retarded manner.
>>
File: 1420112907201.png (243KB, 550x535px) Image search: [Google]
1420112907201.png
243KB, 550x535px
What's the best programming language for a frogposter such as myself?
>>
>>59826805
Python
>>
>>59826805
Holy C
>>
>>59826667
>print screen key interrupt, and it actually prints the screen to an actual piece of paper
Sure, to the CIA headquarters.
>>
>>59826805
brainfuck
>>
>>59826805
>frogposter
Any brainlet language
>>
Is there anyone who works as a programmer? Do you enjoy it? Do you have time after work for your own projects?
>>
>>59826805
COBOL
>>
I cant get myself to do anything except watching videos shitposting and gay erp'ing
>>
>>59826805
What are you trying to program?
>>
>>59826706
Out of languages which give you a reasonable degree of control over memory management and decent compilers, we have C, C++, Rust, Nim and, to some degree, D. Do you think any one of those which is not Rust is a better choice over Rust?
>>
>>59826852
Reliable, secure, concurrent business logic
>>
>>59826842
no
yes
yes
>>
>>59826801
>>59826803
I'd just like to interject for moment. What you're refering to as Quoting, is in fact, Quoting/Greentexting, or as I've recently taken to calling it, Quoting or Greentexting.
>>
>>59826869
I reject your leftist definition, sorry.
>>
>>59826860
rust macros are like hell on earth
>>
>>59826860
Rust, Nim and D don't fit those criteria.
>>59826864
That's not exactly language specific but Java/C#are top in the Enterprise Business (TM) domain on top of being rather simple to use.
>>
@59826898
>>>/r/ibbit
>>>/leftypol/
>>>/lgbt/
>>
Oh wonderful, now Reddit Redirector is parroting the /jp/ line without understanding why/when to use it.
>>
@59826956
Hey, are you one of them 'old' 'fags'?
>>
>it's a teenbros use a /jp/ meme wrong and expose themselves as newfags episode
>>
File: out.png (38KB, 900x313px) Image search: [Google]
out.png
38KB, 900x313px
>>59826922
>>59826946
>>
>>59826984
Who said this?
>>
>>59826392
If you're not using any device-specific behavior, you can use ReactNative or other similar platforms to program for both
>>
@59827064
If you have anything to say, it's better to say it, than to live with regrets for the rest of your life, you know?
>>
>>59827081
QUIT USING "@" YOU FUCKING FAGGOT
>>
>>59827081
you dropped this: >>59827064
:)
>>
@59827081
nice (you) collection, pham. gotta try using @ as a lure more often myself; seems pretty effective lately
>>
@59827099
You're not the sharpest tool in the shed, are you?
>>
>>59827118
>>59827119
>>59827099
>>59827081
guys, i get that you're new here, but there is an easy way to reply to posts just by clicking the post number or using >> instead of @.
thanks!
>>
>>59827146
>falling for the troll
>>
@59827171
>>
>>59826842
>Is there anyone who works as a programmer?
gee I wonder
>>
File: bounds.png (148KB, 920x1322px) Image search: [Google]
bounds.png
148KB, 920x1322px
Using real analysis to calculate the error bounds on numerical algorithms is hellish. I'm really glad smart people figured this shit out for us years ago.
>>
>>59827234
Thanks for the blog
>>
good thread
>>
>>59827240
Oh my bad. Here let me post something more in keeping with the spirit of these threads to make up for it

@59826392
@59826399
@59826419
@59826517
@59826596
@59826625
@59826631
@59826640
UHHHHHH java sucks bitch who u quotttee :33 >>/redd!t axDDD anyone else fucking LOVE memes?
>>
File: xlfze060wlqy.png (107KB, 506x453px) Image search: [Google]
xlfze060wlqy.png
107KB, 506x453px
Does anyone have experience with face or body recognition in Python?
>>
#59827263
Sorry you're so mad nobody cares about your blogspam, but what memes are you talking about?
Asking for a friend
>>
>>59827305
Seriously tho, what was wrong with his post?
>"What are you working on /g/?"
>"Here, I am working on dis"
>>
>>59827317
>"What are you working on /g/?"
>"Here, I am working on dis"
Nobody said that though...
>>
$59827317
Homeworkfags are universally condemned here, anon.
If you weren't fresh off the boat from reddit you might have been aware.
>>
>>59827286
OpenCV has built-in crap for face-detection. Not sure about bodies. Computer vision is kind of a crapshoot.
>>
>brainlets that dont have quote extension plugin
kek
>>
>>59826517
That is really cool actually!

I'd really like to see how it would be approached on modern processor, with a mature compiler. ASM used to conform exactly to the instructions that the CPU executes, but now we have those optimizing assemblers, pipelines, branch prediction and whatnot. While using ADA to replace assembly is pushing it, I definitely think we could do better than X86 assembly.
>>
>>59827344
It's not homework I'm not even in school.
>>
>>59827365
>uses extension plugin
>calls others brainlets

hello pleb
>>
>>59827365
Did somebody say that?
>>
&59827365
nice extension, anon
>>
>>59827377
read this sentence.
>>
>>59827286
>implying you could detect dennis riley's gender using a 1000-qbit QC
>>
does anyone have a .pdf of a book for beginners who are getting into Python 3?
>>
>>59827344
Loled at you tbqh
You would know that they are not condemned at all if it wasn't your first time in /dpt/
>>
>>59827365
>>59827375
>>59827384
But who said that?
>>
>>59825973
To be fair, I have in fact made a proper web server that allows users to log their hours work, so that they may clock in and out online instead of doing it on paper. It's so fast you'd think it was native.

> This speed was achieved by simple tricks like not loading 20mb advertisement videos in your page, but just sticking to basic simple sites, that is easy to understand, and easy to use.

I know, I should have used polyfills, angular and shit, but I just stuck to old web 1.0 shit that works on every browser, and is retardedly fast.

What /dpt/ is going to get mad at though, is that I made it in Java. With minimalist frameworks that makes you wire up the template engine yourself, if you want one. And using DTOs for data that gets rendered in the pages so that changes to those objects are isolated from the rest of the system.

It's fast, it scales (if you switch RDBMS to something that isn't in-memory), it's easy to use and everyone loves it. Feels good man.
>>
>>59827391
read this sentence.
>>
>>59827391
who said what? I posted about that idiot from the screenshot
>>
File: 1476183073614.png (156KB, 887x1128px) Image search: [Google]
1476183073614.png
156KB, 887x1128px
Also that would have been standard curricula in the 60s-70s back when computer science wasn't 100% webdev and app startups.
>>
Go is the best programming language
>>
>>59827426
prove it.
>>
@59827426
pls go and stay go
>>
>>59827408
The text you quoted doesn't exist.
>>
>>59827419
is this for Computer Science.
>>
>>59826206
It's one of the most basic functions whenever you deal with relations and stuff, it's probably being used in all sorts of weird ways.
>>
Why is no one talking about Swift? Is it because it's an actual professional language for real world shit opposed to haskellisps
>>
>>59827458
I know what it is, but what does it have to do with FP?
>>
>>59827462
>Swift
>need to have a mac (tm) to write programs
>need an apple device
>swift when Obj-C exists
>>
>>59826864
Java, especially with the massive improvements that it got to multitasking under the hood with Java 8.
Toolchains are free and easy to use, IDEs are free, etc. Just avoid Pajeets.
>>
>>59827506
He didn't say that.
>>
>>59827553
read this sentence.
>>
File: 2^n.png (62KB, 800x600px) Image search: [Google]
2^n.png
62KB, 800x600px
>>
>>59827612
xD

can share this post?
>>
File: 1484440711870.png (46KB, 497x499px) Image search: [Google]
1484440711870.png
46KB, 497x499px
Is there any fun I can do with this?
20 character limit.
>>
>>59827419
Too bad they didn't teach how to post pictures of reasonable resolution.
>>
>>59827681
Too bad that's the original picture, retard
>>
https://github.com/tomhrr/dale
>>
>in second year
>Getting depressed watching others' github

I mean, not necessarily someone I know, but guys who contriburte to OSS projects.

FUCK

I'm like a fucking pleb
>>
>>59827725
Where do you even go to school?
Nobody in my classes does their assignments outside of labs and I don't think they do any programming in their free time.
>>
>>59827725
>in second year
>Getting depressed watching others' github
Who said this and why are you quoting it?
>>
>>59827756
read this sentence.
>>
>>59827756
>what is greentexting

>>59827747
>Where do you even go to school?

Rather not say.
No tin the US.

>Nobody in my classes does their assignments outside of labs and I don't think they do any programming in their free time.
Right? Everyone just knows C, Java and some other shit web language like PHP that has zero effect on how good of a programmer you are.

It's like they don't even care. Then I get depressed thinking about the shitty kinds of jobs Imight get.

>Java developer
*shudders*
>>
>>59827426
>>59827434
Go is not the best, by any means, but it's surprisingly productive and makes it easy to jump into an existing project - those values don't define a great programming language, but they do define a useful programming language.
>>
>>59827747
>Where do you even go to school?
you?

I'm
>>59827796

Also, being young is maybe (?) ba dfor me. I'm 18 and about to go in my third year.
>>
We get it, Reddit doesn't have greentext.
>>
GO vs Rust?
>>
File: C vs C++.jpg (409KB, 1400x1265px) Image search: [Google]
C vs C++.jpg
409KB, 1400x1265px
What prompted the massive ballooning of computing textbooks over the course of 30 years?
>>
>>59827831
Depends what do you want to do.
>>
>>59825181
I've been learning Python going through a bunch of tutorials and while I feel like I'm making progression, it's slow. I think I'd learn much more efficiently if I worked on a project I'm actually interested in.

I want to make a roguelike, is Python a good choice or should I use a different language?
>>
>>59827725
>>59827796
hey man i feel the same way a lot of the time
thats why im here though and i am also trying to write more code in my free time rather than playing video games
>>
>>59827846
>thats why im here though and i am also trying to write more code in my free time rather than playing video games
Same, except I'm trying to stop fapping to hentai and tryiing to lift consistently
>>
>>59827676
Set the character limit with inspect element
>>
>>59827835
C++ has a lot more features than C. Whether that's a good thing is debatable.
>>
>>59827835
Perhaps you're comparing apples to oranges?
>>
>>59827835

C++ implements a subset of category theory, which has many much larger books.

That K & R C book, on the other hand, covers an outdated version of C.
>>
>>59827676
>>59827863
1.) list the databases
2.) drop the databases
>>
>>59827843
I am also a noob and I thought I would make a simple vidya project to keep me motivated.

Two Python options I've tried are Pygame and Godot. Pygame is just a framework, so you will have to literally develop the engine yourself to make anything more interesting than Pong. I was working through Al Sweigart's books on Python and he has one about game dev in pygame for beginners. The problem is "pygame for beginners" is a dubious idea, since engine development isn't exactly what you think when you think "beginner", it hasn't been much more helpful to me making a real game in the same way that learning to make simple text games in the command line doesn't really help you make real games.

Godot does not actually use Python, it has its own scripting language called gdscript but gdscript is very Python-like, if you worked through a Python textbook it will look familiar to you.

So I guess you could try one of those two things. Eventually I got frustrated for other reasons that may not apply to you and am now learning other stuff.
>>
>>59827676
There's an automated technique you can use with SQL unions to extrapolate the names of the tables so you can drop them.
>>
>>59827915
Make games, not engines
>>
>>59827835

To address the philosophical aspect of what you are asking:

While an expert in C can accomplish much more than a novice in C++, and much much more than an intermediate in C#, they are very difficult to find (the rules about architecture aren't really written anywhere, and there are many of them, etc...).

However, since there is a demand for lots of code - any code, even shitty code - there is also a demand for a set of rules for making that code so that anyone with a brain stem can follow them.

Stupid people need lots of rules to be productive. Professionals make their own rules.

As for those of us who grew into C++ from C, it was due to problem complexity, and because we got tired of writing the same "typedef OBJECT_HANDLE int;"-based API umpteen thousand times over.
>>
>>59827863
The box itself has no limit, but it gets checked with this:
function login() {
ajax.newUser($("#login-box").val());
}


>>59827902
I have no idea how to list it and
';drop database; --
and similar didn't work

>>59827925
But I think the character limit would be a problem
>>
File: jonathan blow.jpg (7KB, 206x245px) Image search: [Google]
jonathan blow.jpg
7KB, 206x245px
>>59827938
small brain: making engines
medium brain: using an existing engine
large brain: making an engine and realizing why you were incorrect when you thought tgat making your own engine was "reinventing the wheel", and understanding that the engine is actually integral to the design of your game when you actually have your own ideas and aren't making genre game #1903901235829385, and you don't want to deal with depending on other peoples' property
>>
>>59827981
why waste time making an engine, when you can use one of state of the art ones?
>>
>>59827973
Aren't you mismatching quotes? Try
";drop database; --
>>
>>59827981

and godmode: writing re-usable libraries based on concepts and terminology from pure and applied mathematics that all fit together in the same nice way, so that when, by chance, the thought of having "fun" once again crosses your mind, an engine is merely a specific subset of all possible configurations of what you have already made.
>>
>>59828006
> >engine is integral to design of the game
>>
>>59827981
Just use the fucking framework to make a game, you don't need any engine
>>
File: 1453236190275.jpg (286KB, 1253x849px) Image search: [Google]
1453236190275.jpg
286KB, 1253x849px
>>59827981
>>
>>59828010
Nope i think the quote in the error message is just two single quotes '' "
But neither worked.
>>
File: stallman.png (2MB, 1253x849px) Image search: [Google]
stallman.png
2MB, 1253x849px
>>59828037
fixed
>>
/dpt/ - /agdg/ lite
>>
>>59828094
kek
>>
>>59828006
depends on your goals and your game

if you are making shitty platformer #13901390438 then use game maker. if you don't want to depend on having a license for an existing engine, and if you set realistic goals for what you are capable of doing in a timely fashion, and if you want to be in charge of your game's performance and platforms, and if you want to think about how your game is made on a much deeper level which could lead to a better game and will definitely lead to a better designer versus an engineweenie, and if you don't want to pay royalties, and if you want to decide if your game still exists in 10 years or not, and if you bought the freedom meme, and a million other reasons, make your own engine.

I am mostly talking about 2D though. I posted a pic of jonathan blow as a joke because some of those are his arguments, but this dude develops 3D engines which is some next level shit.
>>
>>59828122
I think I agree with you but it should be stressed that "make your own engine" and "make your game without an engine" are kind of two different things. Trying to make just an engine, no game, is a waste of time. You'll bumble around implementing random features and end up with something either too specific to be used as an engine or something too generic to benefit from doing it yourself much. Also nobody will use it if there's no proof it works.
>>
>>59827455
Yes.
>>
>>59825458
Yet unlike Java, Lisp is the best language for meta-programming. Prove me wrong.
>>
>>59828153
well yeah I'm talking about making your own engine for your own game. making your own engine just to make an engine seems pointless unless you really have some gold idea about why existing engines are doing it wrong.
>>
>>59826667
Fucking nice, bro.

What kind of GPU? Where did you get the bios?
>>
Threading question

I've got some thread:


void *foo(){
char *s;
FILE *fp = fopen("file.txt", "r");

fscanf(fp, "%s", s);

//printing s here will print a string, e.g. "abc"

bar(s);
}

void bar(char *string){
fprintf(stdout, "%s\n", string);
//this prints "(null)"
}


so the pointer is somehow not getting passed from the thread to the function? How should I do this?
>>
shitpost :: g_dpt -> String
shitpost x y
| x>0 = read_shitpost x $ get_shitpost x y
| otherwise = goto_catalog
>>
>>59826667
>Also there's this one data structure that's used all over the place and I haven't been able to identify it. It's like a pointer to a table with pointers to a table with pointers, etc... Like five or six levels deep. No idea what it does.
Sounds like a descriptor table, although I don't know why the BIOS would be dealing with that kind of thing.
>>
>>59828201
1) g_dpt is not in scope
2) type mismatch
>>
>>59828192

Where did you allocate memory for the string?

You are lucky you're not getting a segfault.
>>
>>59828192
You didn't allocate any memory for your file buffer.
What the fuck are you doing.
>>
>>59828234
>>59828192
It's an abbreviated example; I didn't want to make it more complex than it already is. The point is that I can't pass a point from inside a thread to a function for some reason...
>>
>>59828255
It's not going to work because you're writing to a random memory location you idiot.
>>
>>59828224
>he didn't get it
>>
File: brainlet.png (40KB, 842x320px) Image search: [Google]
brainlet.png
40KB, 842x320px
>>59827365
>brainlet that doesn't just identify post numbers ragardless of hardcoded prefix
>>
>>59826667

How'd you git gud at IDA? I've got The IDA Pro Book and I use it a lot for making game cheats, but I still find it kind of overwhelming. I made a zoomhack for Path of Exile by tracing the zoom function back to two cmovbe instructions and I switched them to plain mov instructions, so now it will let you zoom out farther than 1(max zoom value). Kind of quick and dirty because I know if you touch the .text section any decent anticheat will pick it up.
>>
>>59828262
MEANIE
>>
>>59826683
Start learning how to make aimbots and game cheats. You'll learn how to use IDA Pro and Ollydbg along the way, and learn some assembly. I think it's the most fun way to learn how to disassemble shit, much better than doing dry crackmes.
>>
https://github.com/tomhrr/dale
Why no program C with lisp syntax?
>>
>>59828488
are you sure you didn't mean to type a few extra ))))))))))))))))))))))))))))) with that post?
>>
>>59828499
>() are somehow bad
>better use <>(){}[] all in same fucking line
I bet you program in Rust or sepples. Faggot.
>>
>>59825181
Cache bypassing simulation
>>
>>59828511
show me an example of obtuse c-like syntax.
If you like parantheses so much, C even lets you play parantheses soup with complex declarations for functions that return arrays of function pointers of a specific return type and signature.
>>
>>59828488
How does Dale cope with memory management?
>>
>>59828511
>not using a based curried language
>>
>>59828616
It still has the same semantics as C, it just Dale let's you have funtion overloading, namespaces, type inference and better macros.
You would call malloc and free just like in C or use some already existing allocator library.
>>
>>59828655
>function overloading and type inference
hmmm
>>
>>59828187
It's from an old 3dfx card. Nothing special, but its registers are well documented. Check this out:
http://v3tv.sourceforge.net/download/voodoo3_spec.pdf
I wonder if there are any data sheets like that available for modern cards.
Getting the bios is pretty easy. Either read the chip directly with an eeprom reader, or do a memory dump from a running system. The video bios is located at a fixed address C000:0000 (or at least, used to be, idk if this still holds for uefi).

>>59828206
I think it stores data specific to each video mode somehow. In some easily identifiable functions (eg. "write character to screen") you'll see it pull a value somewhere deep from the pointer pile and then use it as an index to a jump table to select the appropriate sub-function for the current video mode.

>>59828313
I wouldn't call myself gud by any means. Just figuring this stuff out as I go. idk anything about game hacks but that sounds like a neat trick though. A video bios is probably super simple in comparison.
>>
Foo.hpp
private:
std::set<Bar*> children;

Foo.cpp:
std::set<Bar*> *Foo::getChildren() const { return &children; }


I can't compile this using g++ for some reason (not that I've tried any other compilers):
error: invalid conversion from ‘const std::set<MyNamespace::Bar*>*’ to ‘std::set<MyNamespace::Bar*>*’ [-fpermissive]


Why does the c++ compiler think that my std::set is const? Is it because the method itself is declared const? How can I return a non-const std::set?
>>
File: 1468952142940.jpg (70KB, 450x450px) Image search: [Google]
1468952142940.jpg
70KB, 450x450px
Quick question that's driving me mad
I have program A that is 64-bit and running a custom add-in I've made for it
program B is 32-bit only, and I want to query it from program A for specific data

On execution, I always get a "REGDB_E_CLASSNOTREG" error, which from what I gathered is because the COM setup for B is 32-bit and my project is 64-bit
Any thoughts on what to do? I can't just re-configure the project as 32-bit since it breaks program A
>>
>>59828715
Your function is const, so your "this" pointer is const, you can only return const values.
>>
>>59828715
const methods mean that "this" is const, so of course "children" will be const.
>>
>>59828743
>>59828749
Alright, thanks.
>>
can i do this in argparse ?
parser.add_argument('hashing', 
methods{
'ahash': imagehash.average_hash
'phash': imagehash.phash
'dhash': imagehash.dhash
'whash-haar': imagehash.whash
'whash-db4': lambda img: imagehash.whash(img, mode='db4')
},
type=String,
help='method of image hashing')
>>
I have found a function that recursively calculates the binomial coefficient in haskell, it looks like this
coeff:: Num a => [a] -> [a]
coeff(x:y:xs)= (x+y):coeff(y:xs)
coeff_ =[]

is there any nice way of doing this iteratively?
>>
>>59828800
recursion is the nice way of iterating
>>
>>59828800
https://en.wikipedia.org/wiki/Tail_call#Tail_recursion_modulo_cons
>>
>>59826842
Yes
Yes
Yes, but I don't bother doing my own projects anymore, because the projects at work are actually my brainchildren and I'm interested enough in them that I don't need to create my own.
>>
>>59828836
too bad you don't own them and they won't be yours once once a spreadsheet tells your manager's manager that you're marginally more expensive than a H1B.
>>
im majoring in Info science and decided to go the programming route and fill my electives with different programming classes. Will I be at a disadvantage when I'm looking for basic programming jobs competeting against CS people?
>>
>>59828037
>>59828094
>literally grew the image 5 times

Can you not?
>>
>>59828848
My manager doesn't have a manager.

I work for a small company that does not primarily do software development for clients, and we do not outsource. Also, I have no need to "own" software. Personal projects I do are open-source as soon as they are presentable.

Lastly, I would have no desire to own these myself; they are very specific to the company, yet still very satisfying. I guess I could go on with a cynical view like yours and hate everything, though.
>>
>>59828880
Your hiring situation isn't typical.
Software workers are regularly asked to sign away all rights to all software they write during company time or on company equipment.
Some even go further and ask to embargo your personal projects outside of work as a form of "no-compete clause", though this is expressly illegal in places like california.
>>
>>59828920
Well, you ought to ask before you assume the situation, then. I would have a hard time accepting a position that tries to own my out-of-work code. I'm not desperate for a job in the slightest, and I'm confident that my skills have basically anchored me a position whenever I need one.

The only reason I can see someone accepting such terms is that they are in a position of weakness and desire the job more than the job desires them, or it's a job with insanely high pay/perfect location/great benefits, in which case one ought not to care about that issue too much because they are being fairly compensated for it.
>>
>>59828743
>>59828749
Okay, a follow-up question. When exactly do I use const methods? Only when not returning anything?

Let's say I return a class Baz. It seems really limiting to return a const Baz if I have to call Baz::someMutator(). So when is it feasible?
>>
>>59828974
const methods can be called on const objects.
>>
>>59829009
Most of my methods actually alter the state of the object, however. Is there like a rule of thumb?
>>
>>59829071
If the method doesn't require "this" to be non-const then you can make it const. It's not a very difficult concept.
>>
>>59823614
>>59824103
I improved on the solution to this problem:
https://hastebin.com/hutupiwoze.c
I made it print out the correct sequence now,
used a switch selector instead of if selectors,
and implemented a data structure.

Feedback is appreciated.
>>
>>59828974
const is really just an 'agreement' (i.e. compiler enforced) to not modify the object through the returned reference. Say you have a complicated class that you have very specific ways of interacting with the underlying object(s). But, someone wants to read ALL the information contained in the object. You would want to have a read() method that's const, so that they can't modify the underlying object (either implicitly or explicitly) without going through YOUR interface (considering something like keeping track of the total # of orders in a database, minimum date of sale of all entries, ect).
>>
>>59829115
>switch case inside for

for what reason
>>
>>59829092
>>59829127
I think I get the idea, but I can't seem to understand how (or if) I would implement it in any of my own projects.

Let's say my class Car has the following method:
Tire getFrontLeftTire();

and Tire has the following methods:
int getPressure();
int getWidth();
void deflate(); // Alters the state of the Tire


Most of the time I just want to inspect some data, without modifying the Tire. 1/1000 times, however, I want to deflate it for some reason. Is it the right thing to do, to NOT make Car::getFrontLeftTire() a const method?
>>
>>59829241
Returning a const Tire is different from making the method const.
>>
>>59829261
I know that, but nevermind. Can't fucking word my problem.
>>
>>59829295
getPressure and getWidth could be const. getFrontLeftTire could be made const if it returns a const Tire (presuming the Tire is a field of the object). It's possible that you would want both a mutable and const version of getFrontLeftTire.
>>
http://mbsrules.com/RIT.htm
>>
>>59829225
So I don't have to write 50 case statements.
>>
File: 1420589522943.jpg (33KB, 722x349px) Image search: [Google]
1420589522943.jpg
33KB, 722x349px
>tfw friend bullies me because i use a lot of ifs and i take my time to do step-by-step solid things instead of floaty portable functions
>tfw he's right
>>
>>59828734
Are your "programs" different executables? Or just 2 dlls that run as COM servers inside dllhost.exe?
>>
I'm writing something in tex and I have a problem: if the last word in the line contains a character like Š or Ž it doesn't know how to justify the line, meaning the word sticks out to the right, poking through the margin. Using the \hypenation{} doesn't work if the word inside has those characters.
>>
Is it okay to use let bindings for the sake of clarity?
>>
>>59829640
???
>>
>>59829546
Who said that?
>>
>>59825784
> That was my point dummy, that it adds more overhead to check the number of parenthesis. And we're all traps here so I could sure use some anal beads~

If you use a proper editor, it adds no mental overhead at all. paredit and other software are ast-editors so it's nearly impossible to have an incorrectly balanced expression unless you actually intend to.
>>
>>59829670
(defn count-words
[random-quote]
(let [words (clojure.string/split random-quote #" ")]
(zipmap words (map count words))))

I'm sure I can write it without the let binding, but this is more readable.
>>
>>59829676
https://hastebin.com/lisomeluke.js

unimportant, he's right
this IS kind of a huge mess
>>
I am an inspirationless shithead and I just started programming.

What are some good (beginner) projects?
>>
>>59829738
hello world
>>
>>59829722
You just responded to a post that was intended to make you upset with its accusations that you must be quoting someone whenever using a greater-than symbol.
>>
>>59829745
what if i'm done with the world
>>
>the things you enjoy doing are the things that are the least in demand and pay the least
kill me
>>
File: why.jpg (8KB, 226x263px) Image search: [Google]
why.jpg
8KB, 226x263px
>>59829766
i'm so retarded that i can't even be bullied right
>>
>>59829738
An IRC bot will introduce you to many useful core concepts and can be expanded upon with more advanced features as you learn more.
>>
>>59829771
If work was fun, they wouldn't pay you for it.
>>
File: 1469394498340.jpg (199KB, 960x1280px) Image search: [Google]
1469394498340.jpg
199KB, 960x1280px
>>59829553
Program A is a .dll that runs as a COM server in an application (64-bit only)
Program B is an actual 32-bit executable
>>
>started submitting applications for internships
What places should I apply for? Already applied to Boeing, Lockheed, among other places.
>>
>>59829692
nvm, this works
(defn count-words
[random-quote]
(->>
(clojure.string/split random-quote #" ")
(map clojure.string/lower-case)
(clojure.core/frequencies)))
>>
>>59829898
You won't be getting in at any of those places, so keep going.
I suggest places that aren't on every pajeet's top 10 dream places to work.
>>
>>59829905
Isn't your life full of stress then?
>>
>>59829939
Got any recommendations? I don't mind traveling either if I get payed enough to survive.
>>
Is Rust a viable language for high-performance gamedev nowadays?
>>
>>59829944
Yeah, the "be your own boss" meme is nice until you realize it's constant work and much less security
>>
>>59829968
If you don't mind the lack of libraries.
>>
>>59830017
Ignoring libraries, are there any better choices?
>>
>>59829989
I've never done my own thing, but I can imagine it could be either great or terrible.

I make good money with a comfy job, and I'm fairly guaranteed not to be fired, and my company is growing nicely while I get raises.

However, it would be nice to make it big with a few starter clients and let the business run itself.
>>
>>59830033
No.
>>
>>59830047
The grass is often greener on the other side. That's why I quit my regular job.

But now I have to do a lot more paperwork, taxes, budgeting, bla bla, instead of just programming.

Not sure what's better.
>>
>>59829738
Holy trinity of beginner projects popular where I am from
- Text editor (learn to work with strings)
- Classic videogame: snake/xonix/tetris. From scratch with Opengl/DirectX (bunch of basic graphic algorithms)
- Chat (learn how basic net works)
>>
>>59830130
Hire someone to handle your paperwork.
Then hire more devs to help you be more productive and make more money.
Then make enough money to rent out office space and boom, you just made another company.
>>
>>59830047
>it would be nice to make it big
Not everyone is fit for that role. Rarely anyone really. Just look at how few startups from kickstarter made it to the "ramen-profitable" level.
>>
>>59830173
so chat in opengl with network multiplayer it is
>>
>>59830187
Good advice.
I already booked a company that handles invoicing and accounting. Letting go of control is an important practice.
Ubuntu replaced my Gentoo on the work desktop, too. Every hour spent tinkering with the OS is lost time and money.
>>
Is there BASIC-based scripting language?
>>
NEW THREAD!

>>59830275
>>59830275
>>
New thread:

>>59830279
>>59830279
>>59830279
>>
>>59830289
delete your thread weeb
i'm in control now
>>
>>59829071
Basically, all getter methods should be const, because they shall not alter object state.
Thread posts: 315
Thread images: 26


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.