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

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

Thread replies: 318
Thread images: 26

File: DPT18.jpg (475KB, 852x973px) Image search: [Google]
DPT18.jpg
475KB, 852x973px
Daily Programming Thread
Anime 5evr Edition

What are you working on, /g/?

Old thread:
>>55738403
>>
File: JAXABLE_FORM_Success.png (18KB, 1039x297px) Image search: [Google]
JAXABLE_FORM_Success.png
18KB, 1039x297px
>>55746223
I just got my website project to properly handle forms both with PHP purely AND with AJAX

I'm pretty happy with that, b/c I'll be able to do most of the rest of everything now that that crap's outta da way.

We gonna kill the Facebook, yet, bois!
>>
>>55746223
Might have to dip my cock into some webdev so I can show off my BI dashboards in a more accessible manner.
>>
File: keep_in_mind.jpg (22KB, 620x305px) Image search: [Google]
keep_in_mind.jpg
22KB, 620x305px
>>55746257
>>55746265
You're missing the point here, it was to create something great with a "bad" programming language.

If I wanted to do it the easy way, I'd use C++ or Java or something instead.

>>55746276
See above.

>>55746278
Thank you for at least getting my point on the colors, but the point of these projects is to prove you don't have to have a modern programming language to make a decent game, and that sometimes programming doesn't have to be hard to learn.

Also keep in mind that most Batch programs look something like pic related.

>Jesus, I sound like a frickin' liberal over here, or maybe a commercial on American television
>>
what's the most standard Python3 GUI that needs minimal installation ?
>>
I was compiling mpv on the new Windows Subsystem for Linux and fucking libbluray git is down.
Found a mirror but it has submodules that also points to git.videolan.org.
WHAT DO?
>>
>>55746334
Your command line RPG is not decent, and I doubt many people have/will waste their time with it.

It's cool that you want to do it with Batch, but don't be under the illusion that your end product is useful, efficient, or interesting.
>>
>>55746335
Tk
>>
>>55746335
Do you mean a library? I think TkInter is pretty light-weight but just use Qt m8.

>>55746236
Well there's still a lot work to be laid out between these 10 minutes of that crap and Facebook-tier features.

>>55746344
Unless you can find a mirror for these submodules, you're SOL.
>>
>>55746236
And now do some file uploads.
>>
>>55746334
the ">" character is for quoting text, like this.

>Also keep in mind that most Batch programs look something like pic related.
>>
>>55746356
>useful
It isn't, it's a game, no game is useful for anything except entertainment.
>efficient
We have established that it is not already.
>interesting
It's more of a concept than a playable game, yes.

>decent
Maybe, maybe not. But since very few people have actually played it, I doubt you have as well. This game (as I said) wasn't made for any reason other than to prove Batch is at least not the worst language for making games in.

To date, a reported 12 different IP addresses have downloaded the file from MediaFire, so that means either one or two people are moving around a lot and redownloading it, or there is a maximum of 12 people that have at least heard of it.

Should you want to take a look at it (as per the nature of your comment, you probably don't), it is available for download at my website (https://sites.google.com/site/aiosysdesign) along with a bunch of other, mostly worthless trinkets, including my test utilities that I used for checking out ideas and such, and some things a few of my friends have made.

>>55746381
Thanks, I wasn't sure I was using it right.
>>
Making mobile apps, and I have to use Cordova. God damn Javascript.
>>
File: downloads.jpg (17KB, 695x228px) Image search: [Google]
downloads.jpg
17KB, 695x228px
>>55746459
Since God knows nobody will believe me on this, here you go.
>>
I've found some GPL2'd code I want to copy in its entirety. Its pretty much just a function.

I'm just wondering what I'm legally required to do if I do something like that and what I'm realistically required to do. Not sure if the project (my project) is open source or not yet. Likely is.
>>
>>55746376
>Unless you can find a mirror for these submodules, you're SOL.
Damn. It seems videolan are broke. There are Donate buttons everywhere
>>
>>55746531
I'm not sure why wouldn't they just mirror to Github/BitBucket, public repos are free and these services are reliable.
>>
>>55746524
By realistically I mean will anyone look for this exact function as copied? I'd like to do plagiarism without being detected if complying to GPL is a hassle.
>>
I want to improve my mathematical abilities as well as programming, I know of the eular project but I am curious what /g/ projects anons have worked on.

There is something exciting about seeing a program working on a complex solution.
>>
How do you guys stop yourselves from burning out?

t. burned out developer
>>
>>55746599
Stop for a while every now and then.

Generally, after finishing a project, I'll take a break for about a week or so, and then come back.
>>
File: _60956836_turingdrawing.jpg (46KB, 560x343px) Image search: [Google]
_60956836_turingdrawing.jpg
46KB, 560x343px
What coding music does /dpt/ listen to?
>>
>>55746459
>not the worst language for making games in
Meaningless statement, considering things like Brainfuck exist.

Again, I think it's cool that you did it in batch, but almost no one is going to bother to play through a command line RPG.

I'd be more interested in a choose-your-adventure game (like that Wizard's Quest) if it had to be in the command line.
>>
>>55746223
what is a good book to learn C?
link to OPs pic?
>>
File: ChatSystem(Old-Cen).png (154KB, 875x459px) Image search: [Google]
ChatSystem(Old-Cen).png
154KB, 875x459px
>Well there's still a lot work to be laid out between these 10 minutes of that crap and Facebook-tier features.
>Facebook-tier features
You mean, mindless apps and facial recognition software, auto-tagging systems and high-intensity data-mining?

Ok, you got me on apps. I WILL do some apps. But I objectively refuse to do any data-mining beyond basics, refuse to add auto-tagging, AND refuse to make facial recognition
>I'd say that knocks off about 50 million lines of code, even by release version like 15, or 8-10 years in
I'm not the literal Internet Satan, y'know?

>>55746378
Yeah, I will be adding that, probably tonight or tomorrow. Now that this crap works, I can finish the profile page
I actually had a mostly-complete version of this thing as far back as 2 years ago, but my coding skills were shit back then. It didn't work with JS at all.

This is... I guess, Vaporware-erm- Alpha 4? or 3.1 or something?
I'll be able to copy and refer to a lot of the old code to get what I need done, done.
Here's an example of the working blogging system and friends I had by last year:
>pic
(in other words, this is about the 4th time I've redone the whole damn thing lol; but I intend to finish it this time, and I'll make the stylesheets work with mobile, too)
>>
>>55746693
Don't think that just because your name is Japanese you can leave it uncensored... I now know who you are, Rie-chan.
>>
>>55746608
but i took a break of 5 years
>>
>>55746708
Ah, but you don't, lol.
Because that's a name I selected as a character I was at one point considering including in something when I was playing around with RPG Maker VX Ace.
「立花 理恵」
Actually, none of what I censored in that pic is a name anyway.
Fuck it, wanna look me up on YouTube? I censored "Lord Centillion". On that channel, I made a directed ionic discharge generator, and on my new channel, I don't have much money right now, so I make poorly edited ASMR and anime videos.

When this starts making money, though, I have the intention of making a pseudo-monopolar generator based off of the "James Roney Stator"

So, whatever, watch my videos. My new channel is "G.S. Fordham".
I'm a walking cringefest atm.
>>
>>55746762
>I'm a walking cringefest atm.
... I can tell without looking at your youtube channel, thanks though.
>>
>>55746693
>>55746762
Look buddy, you're not gonna get big. You're making something that every other beginner webdev tried when they started, and something that every other veteran webdev could make in an afternoon. There are already great FB replacements that aren't as evil as FB, that are decentralized and that are open source but it all does not matter, it does not matter that you can make yet another Project Name (tm) and claim "this will be different, I swear!". What you need is to solve some problem with your software in order for it to be useful. What problem does your software solve? As far as I can tell none at this point.
>>
>>55746599
Not sure anon. My mom was project lead and hit a very serious wall after a while. Took her a fair few years to get to 80% or so. She went to tons of therapy and stuff.
>>
File: 2016-07-25a.png (899KB, 1360x738px) Image search: [Google]
2016-07-25a.png
899KB, 1360x738px
>>55746793
lol. who COULDN'T tell?
>pic related
>>
> be me, study bioinformatics
> want to learn to code for a project that is due in two months that was made official today
> need to cram/learn for a test in organic chemistry in 4 days instead:^)
FUCK.

Can someone give me a nice link or source for a good java tutorial?
>>
>>55746811
>What problem does your software solve?
It does what you need it to do, while simultaneously not doing stuff you don't want it to do.

Furthermore, it'll be more creative and customizable than Facebook while offering the same features you need.

What are these:
>great FB replacements that aren't as evil as FB
Twitter? Tumblr? LinkedIn? Google Plus?
>>
>>55746871
>It does what you need it to do, while simultaneously not doing stuff you don't want it to do.
You see, it does what *YOU* need it to but your mileage varies from other people that don't want "spying and bloated" FB want from a piece of software like that.

>Twitter? Tumblr? LinkedIn? Google Plus?
No I mean stuff like Diaspora.
>>
>>55746892
>but your mileage varies from other people that don't want "spying and bloated" FB want from a piece of software like that.
Ok, I think you mighta hit backspace somewhere in there. That doesn't quite make sense.
But, the concept is functionality, creativity, trust, and ultimately a mostly non-profit intent, because I'm mostly interested in research and development. I'd be planning to spend most of the money (once it's good enough) to fund research and development projects.

Plus, I'll also throw in some of the games I'll make onto the site.

It does what MOST people need it to do
does NOT do what a VAST MAJORITY of people disdain about current implementations, and it does it in a friendly, trustworthy way, with an overall philanthropic goal

Essentially, you can't POSSIBLY go wrong.

>No I mean stuff like Diaspora.
What's that? I've literally never heard anyone talk about a social network like that
>>
>>55746944
>Essentially, you can't POSSIBLY go wrong.
Essentially it will be a fluke because why would anyone that currently uses Facebook switch to another platform where none of their friends are? And why would people that do not use Facebook suddenly start using social media?

>What's that? I've literally never heard anyone talk about a social network like that
Exactly my point, just like no one will hear about your project.
>>
>>55746962
>Essentially it will be a fluke
>why would anyone that currently uses Facebook switch to another platform where none of their friends are?
It'll be relatively easy to get people over. And I'll be starting by getting a lot of my friends over and advertising on every social network I use.
Also, it comes down to "Why wouldn't you?"
With Facebook, that's simple:
>untrustworthy
>bad stories
>has been going downhill
>large portion of population is already dissatisfied
>Facebook forces undesired features down everyone's throats

>And why would people that do not use Facebook suddenly start using social media?
Similar reasons, because now it'll be more pleasant, less obnoxious, expressive, and efficient (all of which Facebook is NOT -- except efficient.... give or take)

>Exactly my point, just like no one will hear about your project.
I'll be advertising it, starting with all my friends and followers, and taking it to my colleges.
Also, has a catchy name... unlike Diaspora

Also, just looked that up, btw. I think it's partially unpopular because the site is confusing to navigate (in that I looked at it and originally thought it was a hosting service), there are several similar, unrelated web addresses, and it seems unnecessarily complex to set up your account, like you gotta be "in the know".

Honestly, the site seems like it was designed by some serious basement dwellers.
That shit looks like it's from the early 2Ks or late 90s

Mine will have the aesthetic of a web app
>>
Help me out, /dpt/.

What's a basic formula to remove a nine-xths of a number?

Examples:
input -> output
0.99 -> 0.9
0.9999 -> 0.999


Am I retarded or is it harder than it sounds?
>>
>>55747072
depends. what's the language?
>>
>>55746223
I got a question about CC BY-SA and the one way compatibility with GPL v3. Is it only compatible when the software is GPL and the assets are CC BY-SA or what? What exactly did they mean by one way because I'm confused.
>>
>>55747083
Agnostic.

I want a basic algorithm.

I'm doing it in SQL, but I can DAX it, too. I could easily write a case statement (
CASE WHEN 0.999 THEN 0.99 ...
), but I'm wondering if I'm looking at it wrong.
>>
>>55747103
and it's JUST supposed to remove the last digit?
Not round it or anything?
>>
>>55747114
Yeah, it's for server uptime goals done with Nines™

So if I have a target goal of 4 nines (99.99% uptime), I want an acceptable threshold of 3 nines.

I guess I could just truncate the last digit.
>>
>>55747103
Convert it to a string, lop off the last character, convert it back

FUCKING NORMIE REEEEEEEEEE NOT YOUR HOMEWORK ARMY GET OUT GET OUT GET OUT NORMIE PLEASE LEAVE ÞŪ SHALT RECEIVE NO ELUCIDATION IN THIS PLACE
>>
>>55747131
Well, you could just convert it to a string and trim the last digit off before storing it. Or limit the output to 2 decimal place In the field
>>
>>55747141
>Convert it to a string
>>55747162
>convert it to a string

Was hoping to learn a way to do this without doing that, but thanks anyway.

Of course I already considered this and wondered if there was a way to do it without string conversion.
>>
>>55746610
https://www.youtube.com/watch?v=xAjtTdkYl4M
Gets me pumping
>>55746658
No
C Programming: A Modern Approach
>>
>>55747072
Are you talking about rounding?
>>
>>55747189
maybe this?
http://www.tutorialspoint.com/sql/sql-numeric-functions.htm#function_truncate
just looked it up. idk if it'll work with your specific implementation.

Never had to do this myself. Was never relevant
>>
>>55747217
>>55747224
If I was only worried about one case, I could easily do the following:
ROUND(Goal, 2, 1) as 'Acceptable'
, essentially truncating to two digits.

However, it needs to be a dynamic number of decimal places, so sometimes it truncates to two, sometimes four decimal places.

I need to be able to basically truncate the last non-zero digit from a numeric type.

I'm just going to write in a CASE statement, because there's obviously no algorithm/function that does what I want.
>>
>>55746610
https://www.youtube.com/watch?v=rSGnNMnvM6M

However, listening to music is kind of distracting.
>>
>>55747269
>I'm just going to write in a CASE statement, because there's obviously no algorithm/function that does what I want.
Yeah, that'd have been my next response. To create a function yourself

sorry
>>
>>55747189
I can think of a few ways but it depends on the problem specifics.
For example the easiest data representation is
nines = 3
then you can nines++ or nines--, and when it comes time to print it you can print("0." + "9" * nines)
If you need to parse from user input you could use regex to get the right form then use string.length() or similar.
There's probably a mathy way to do it with floats, but it's harder and I'd have to think about it for a while to get an exact, general solution.
>>
>>55746628
Journey isn't actually that long.

Wizard's Quest was an earlier prototype you could say for Journey.
>>
>>55747283
of course the python babby completely misses the original problem and vomits his first thoughts into a post
>>
>>55747413
He probably didn't even notice the question, and if he did he wouldn't understand it. He just wanted to shill Python. Guido's claws are deep in this one. The only way to save him is with concentrated type theory.
>>
Im trying to make a password generator in c++ should I use rand() ?(sorry for the stupid question im new to c++)
>>
>>55747553
NO
http://www.cplusplus.com/reference/random/mt19937/
>>
>>55747553
rand() is garbage, use http://en.cppreference.com/w/cpp/numeric/random/uniform_int_distribution
>>
>>55747569
>>55747582
Why is
x = rand() % 3;
garbage? It gets the job done, doesn't it?
>>
>>55747603
https://channel9.msdn.com/Events/GoingNative/2013/rand-Considered-Harmful
>>
>>55747603
>>55747553
C's rand() function is usually pretty low quality. It's fine for casual uses for pseudo random numbers. but if you need good random numbers, pick something else.
>>
>>55747630
can't you just make good random with rand function or is it inherently broken?
>>
>>55747630
And rand() is considered harmful because it's not truly random?

I'm not certain, but I don't think that computers can give you truly random numbers just yet.
>>
>>55747642
It's just the algorithm implementers typically use. Most people don't need very good random numbers most of the time, and they don't want their algorithm to be needlessly slow for those people, so they don't use the 'best' algorithms, at least in terms of random number quality.
>>
>>55747667
>because it's not truly random
All pseudorandom number generators are not truly random.
Can you even call anything truly random?
>>
>>55747603
>>55747630
>>55747642
>>55747667
>>55747673
Just jumping in here to link this, http://cpp.indi.frih.net/blog/2014/12/the-bell-has-tolled-for-rand/
Gives a pretty good explanation of the problems with rand().
>>
>>55747413
>>55747486
Excuse you? I despise python and I didn't miss the original problem at all. My point is it's way easier if you can use a different internal representation for the nines other than floats. If you can store 0.999 as nines = 3, then truncating it to 2 nines is a matter of nines--. Look at your suggestions of converting back and forth to string every time you use the value, maybe that's a hint that storing it as a float is a mistake in the first place?

He asked for a language agnostic solution. First of all var-- and var++ is not valid python. Second, if you can't translate the sudocode "string" * someNumber to whatever language you are using then you need to stop posting and go read a book. String.length() isn't python either.
>>
File: toolpath.jpg (7KB, 220x276px) Image search: [Google]
toolpath.jpg
7KB, 220x276px
I have a small robot that I want to generate a predetermined path for covering a known area. Imagine a cleaning robot, except the size and shape of the room and all obstacles in it are already given by coordinates/shapes. I want it to cover all of the open area in a sort of CNC-like fashion, like pic related, but when I tried to figure out how to program this, I haven't come across anything. CNCs are too small a scene to have any informative material, and when I looked for programming free moving robots, everything was about real-time pathing and going towards a single waypoint in an unknown environment.
Could someone tell me what to look for? I do have some ideas of my own, but I think they would probably produce a rather inefficient path.
>>
>>55747699
>Can you even call anything truly random?
/b/ for one thing

>>55747712
"Low quality random numbers"
Fuck off, if you really needed "high quality" random numbers, you'd be using FORTRAN.
>>
>>55746223
>>55746223
You forgot to link the Discord channel
>>
>>55747764
/b/ is the opposite of random.
>>
>>55747777
Mmm you sure about that?

I haven't been there recently, what's changed?
>>
>>55747783
Nothing has changed, it is the same thing every time.
The formula is set.
>>
>>55747791
I'd love to put this formula through something.

What is it?
>>
/*!
* Copyright(c) 2011 XXX <[email protected]>
* MIT Licensed
*/


>program with more than 10K lines
>MIT license

why do people use MIT license and not GPL?

keep in mind that this is code from a top-notch software company
>>
>>55747667
Use xorshift algorithm for better random number generation. https://en.wikipedia.org/wiki/Xorshift

Here's a good short explanation of the problems with rand() from user skeeto on reddit:

https://www.reddit.com/r/dailyprogrammer/comments/378h44/20150525_challenge_216_easy_texas_hold_em_1_of_3/crkqciv
>>
>>55747835
Because GPL is garbage.
>>
>>55747745
Reminds me of this https://www.youtube.com/watch?v=_L9rkLAskWU
>>
>>55747854
how so?
>>
>>55747816
>post the same thing everyone has posted before
>lol this is so amazing
>newfags repeat this ad inifintum
>it is kept going because it has always happened so apparently should always happen

>fur threads
>rate threads
>lol look what I ate today threads
>what should I do doubles decide
>greentext stories threads
etc

Anyone who has half a mind left /b/ years ago and moved on to better boards.
>>
>>55747835

MIT is actually freedom. GPL is communism. That's why.
>>
>>55747864
It's restrictive, some people don't care about "freedumbs" and are happy to provide their code for anyone for any use - be it free or proprietary.
>>
>>55747866
you only go to /b/ for porn, but even /gif/ is way better cause sound
>>
>>55747879
I'd prefer just standard GIFs and not WebMs, especially with sound.

>>55747866
Greentexts were always my favorite, haven't seen any in a while.
>>
>>55747791
Trap thread
Fur thread
Drug thread
Pictures you weren't supposed to share thread
Incest thread
Waifu thread
Celeb nudes thread
Face r8 thread
Dick r8 thread
Loli thread
Chubby thread
<Country> thread
Facebook sluts thread
Cum tribute thread

... you get the point.
>>
File: 1409878385372.png (93KB, 960x528px) Image search: [Google]
1409878385372.png
93KB, 960x528px
>>55747888
>Greentexts were always my favorite, haven't seen any in a while.
>>
>>55747742
Pycuck detected
>>
File: Screenshot - 250716 - 15:23:38.png (109KB, 1019x378px) Image search: [Google]
Screenshot - 250716 - 15:23:38.png
109KB, 1019x378px
>>55747891
>tfw scraping /b/ threads looking for facebook pictures, without visit /b/ ever
>>
>>55747913
Yeah, that's a good amount of them.

A lot of the longer greentexts seem to be better, though, because... I don't know, a longer greentext just seems better when it's more descriptive.

This is probably why I will never return to /b/.
>>
>>55747938
Hey, mind if I get a copy of that program you've written there, or at least the full source code?

I can only do really basic C++ and Java, a bit of BASIC, my experience is all in Batch scripts...
>>
File: 1409877738259.png (135KB, 1101x748px) Image search: [Google]
1409877738259.png
135KB, 1101x748px
>>55747944
>>
>>55747991
sure.

this writes the images urls to a file called result.txt

it will look at a lot of threads looking for links

http://pastebin.com/326S49WR

you might have to install the requests python module , if you don't have it already

if you get the
 InsecurePlatformWarning 
warning in your terminal, just ignore it
>>
>>55748090
Thank you!

Probably gonna use it once as it is, then tweak around with it to see how it works.
>>
>>55747835
>why
idiots
>>
>>55747877
>provide their code for anyone
>proprietary
so... cucks?
>>
>>55748178
You have to go back.
>>
>>55748236
>DELETE THIS
>>
Are there any good (as in not written by a spastic or one of those modern webshits who can only talk about js frameworks) instructional/educational resources for using Python to access and parse JSON? I wanted to follow in the footsteps of every other so-and-so on this place who decided they wanted to make a 4chan image scraper.

I was using Automate the Boring Stuff but the section on JSON is really small and limited in scope, and other articles tend to cover people making dictionaries in the interpreter. A friend of mine gave me some instruction to get started but I wanted to learn why what he told me to do jus werkz. On top of that, I also want to learn how to "clean up" and be able to use results I peel out from regex.
>>
>>55748286
Just read the documentation.
>>
>>55748304
I was hoping for something that wasn't a complete mess.
>>
>>55748286
Google 'JSON deserialization python'
>>
Never programmed before and want to learn C, what's the best path I should take?
>>
>>55748459
A language that isn't C, or you're going to hate programming.
>>
So lets say you have a number, and a target number and you want to find out how much do you need to add to get the target number, now that's a simple thing we all learn in primary school but what's the most optimal way to do it in C so that it uses the least amount of instructions/uses the fastest instructions?
>>
>>55748465
People have told me that if I start with an OOP language I'll develop bad habits and it'll be harder to learn lower level languages later on.
>>
>>55748488
Simple substraction.
>>
>>55748504
Don't listen to that, Anon. C is the perfect language for a beginner.

Go for either "C Programming: A Modern Approach" or "Pointers on C".
>>
>>55748521
So it doesn't get any faster than that, I suspected as much, what if I need to do that in bulk, working with a large set of numbers, would SIMD help me with that?
>>
>>55746565
>>55746524
If you opensource it, you will have to use a GPL compatible license. In the real world, just make sure it's modified enough and done.
>>
File: 1469305572866.jpg (125KB, 363x463px) Image search: [Google]
1469305572866.jpg
125KB, 363x463px
>>55747938
>fff =
>x =
>globals
>while True:
>>
>>55747938
Wow, that's fucking inefficient, instead of getting the pages and checking the size/status codes, just send the HEAD request and check Content-Length if the status is right.
>>
>>55748504
It has nothing to do with object-oriented or not.

Yes, it's the basis for other modern popular languages, and yes, you'll get a better understanding of what's happening "under the hood".

C doesn't have many jobs, it's not fun to use, and it's not efficient for any tasks you're going to want to do.

And most importantly, you don't need to learn it unless you actually want to use it (you probably don't.)
>>
>>55748696

I'm hearing so many conflicted opinions regarding this, honestly don't know where to start. I just want to learn to program without screwing myself over in the long run. If I waste time learning an obsolete language or if I develop horrible programming habits those both suck.
>>
File: 1463333431870.png (602KB, 963x720px) Image search: [Google]
1463333431870.png
602KB, 963x720px
What's a good Computer Organization book for someone who has read Code by Charles Petzold and is intimidated by the comprehensiveness of Computer Organization and Design, 4th ed., by Patterson and Hennessy?
>>
>>55748756
>if I develop horrible programming habits
If? You will.

Doesn't matter what language you use, you're learning. You're going to do things in retarded ways.

Also, habits that are good programming in a lower-level language can be bad habits in a high-level language.

Seriously, grab something like C#, Java, Python, or even C++.

You can actually do things in those languages, and they all have fucktons of jobs.

If you're going to learn C based on some delusion of understanding how memory works, you might as well go down to Assembly.
>>
File: 1464800196753.jpg (278KB, 1024x768px) Image search: [Google]
1464800196753.jpg
278KB, 1024x768px
How did you guys go about learning all about computer programming? Top-down or bottom-up from the abstraction layers or did you just study whatever was interesting or needed at the moment? I feel like my knowledge and skills are all over the place and there are huge gaps in what I should know.
>>
>>55748835
This guy almost reminds me of Kevin from "The Office US"
>>
>>55748835
Whatever was interesting or needed at the moment and top-down later on.
>>
>>55748835
>just study whatever was interesting or needed at the moment
This, pretty much.

Here's a basic way you can be successful:
>Learn one of the big 4 (C++, C#, Java, Python)
>Learn SQL
>Basic knowledge of cmd/PowerShell/bash

Boom, now you're universally hirable as an entry-level dev, sys admin, DBA, BI dev, and other jobs.

Bonus points for Javascript, if you don't mind moving into webdev world.

Once you've got a few years of experience in literally anything, you can move to senior positions in that role.
>>
>>55748813
Yeah "horrible habits" is kind of a meme. It's literally impossible to start out from day 1 and do everything correctly all the time. If you get stuck programming in VBA for 10 years then sure it'll stunt your growth, but only because you let yourself stagnate. I would say learning a bit of C or assembly is very important if you want to become a well-rounded programmer, but you can always do that stuff later down the line as side projects anyway.

Personally I think starting with C is a fine choice, but don't expect to make anything impressive with it. At the beginning you're gonna struggle to do even the most basic things, like allocate memory for an array, or store things in a list... But that's okay depending on how you approach it. I stated learning on C when I was a kid, and I would be ecstatic if I could get something like a simple binary search to work. However if you're the type that needs to see results in the form of flashy animations and what have you, then maybe you're better off starting with webdev.
>>
>>55748813
I was going to type something but this guy responded with what I was going to type. Any of the four languages that he listed are great and are pretty well documented in one form or another, and there are plenty of communities and jobs for them.

You're going to suck. You're going to look retarded to other people if you try to talk about things you don't completely know. People will look at your code and will be able to tell just how new you are based on how you write. That's how it starts and don't let any memester /g/ays make terrible posts about how you NEED to pick up a copy of K&R or else you might as well commit monopoly get to you.

Don't get it twisted, though: C is something to eventually learn about if you really want to get deep into the field, but it is most certainly not what you should start out with nor is it the end-all be-all of programming.
>>
Ruby is a pretty good language right?
>>
>>55748955
I'd only use it if I was forced to, but there are worse languages to be forced to use.
>>
>>55748923
> starting with C is a fine choice
>>55748929
> most certainly not what you should start out with
>>
>>55748994
Huh, weird how everyone doesn't 100% agree on everything.

Isn't this 2016? C'mon.
>>
Just got a job offer as a dev, I remember in college browsing /dpt/ looking for help when I switched over to CS, I'm so happy.
>>
>>55748994
My second paragraph about starting with C is just a personal anecdote, and probably the less popular opinion. I'm a very mathematically minded person so I enjoyed the low-level control C gave me. For the most part C consists of very basic building blocks, allocate some memory here, put these bits in, make some system calls, change some bits around, etc..

Which end you want to start in is just personal preference, however most beginners aren't well-informed enough to make the right choice... So at the end of the day you just have to pick one, try it out and change things up if it's not for you.
>>
>>55748813
Thanks for the reply! The university I'll be going to has courses based around python but on the other hand I want to get in to app development (C# for iOS and Java for Android), so I'm a little bit conflicted on those choices. Do you recommend one over the others to start with?

>>55748923
Yeah I guess you're right! I'm not looking for amazing results right away and doing very basic things seems exciting to me so It's definitely not something that puts me off from learning C.

>>55748929

Thanks, I guess maybe I'm overthinking it a little. I'm definitely going to be learning C at some point, just not sure if I should start now or later. But thanks for your opinion.
>>
>>55749056

Me again, to be honest all that stuff sounds interesting to me so it's definitely not a reason for me to shy away from C. Right now I'm thinking about limited resources for beginners at C compared to the vast resources for beginners at other languages like Java or Python. This is the only thing making me hesitant about C at this point.
>>
>>55749109
>just not sure if I should start now or later
If you're going to university, just follow the track you're on. Most universities these days start with one of the "big 4" over C, although Harvard mixes C into their introductory course. C usually comes up later but by the time you reach it, a lot of the syntax will look familiar and most of the learning will come from the classroom, not some mong on /g/ """educating""" you on system calls.
>>
>>55749109
The "native" language for iOS apps is objective-C, not C#. That said in a lot of cases you're better off using HTML / javascript (making a web app essentially) for phone apps because it'll (probably) run on both iOS and android.
>>
>>55749109
If you're going to do C# for iOS, then that means you're probably using Xamarin, which is compatible with Android/WP anyway.
>>
>>55749165

Yeah this is a fair point, the courses seem to be predominantly python based so I might dive in to python, but at the same time I want to do app development for smart phones in my free time and python is pretty much useless for that...

>>55749168

Oh yeah! Thanks for correcting me. Hmm.. that sounds like a good idea. But what about source-to-source compilers, couldn't I just write an app in Java for android, and convert it to objective-C so it works on iOS too?
>>
>>55749164
Honestly that is a valid concern. For C# you just download visual studio, check out the excellent tutorials, examples and documentation they have on MSDN and you're good to go. The best environment for writing good 'ol C is on linux with a text editor like emacs/vim, and using the manfiles as your main guide. To a beginner, language references like this are... cryptic to say the least: http://linux.die.net/man/3/malloc

It's been way too long since I learned C to remember how exactly I went about doing it, so I can't really suggest anything for you as far as that goes.
>>
>>55749168
>The "native" language for iOS apps is objective-C
Swift*
>>
>>55746762
I hope you aren't the people taking stuff from sound doujin circles and mixing them without onattributino
>>
>>55749244
No reason why you can't pick up C# while at university even if the courses are predominantly Python. Everyone I knew at university always ended up picking up another programming language or two aside from those they learned in classes.
>>
>>55749234
I meant objective-C or >>55749247 Swift, but what do you think about Xamarin? Do you recommend it for app dev?
>>
File: fig4[1].gif (8KB, 660x846px) Image search: [Google]
fig4[1].gif
8KB, 660x846px
i'm trying to reconstruct an image using a image pyramid in c++, but i'm having trouble when it comes to non power of two size images

for example: if an image is 512x512 -> 256x256 -> 128->128 -> 64x64 ...

and when it comes to upsample there's no problem: 64x64 -> 128x128 -> 256x256 etc

but if the image is some meme size like 1280x959 i'm fucked

how can i handle non power of two / odd sized images?
>>
>>55749274
Yeah I was thinking about that but I've heard so many people say that if you're a beginner you shouldn't be learning multiple languages side by side but instead focus heavily on one until you know it in and out and then go on to the next one
>>
golang me gee!
>>
>>55749246

Learning C definitely seems like it'd be more of a challenge but it also seems kind of fun due to the nitty-gritty nature of it. Hard to choose!
>>
>>55749316
https://en.wikipedia.org/wiki/Mipmap
>>
File: 11.jpg (122KB, 800x750px) Image search: [Google]
11.jpg
122KB, 800x750px
>>55749358
>>
>>55749334
>until you know it in and out
That's a tricky qualifier. I've said that to others myself, but it doesn't mean that you have to become a [language] guru, just to understand the fundamentals. Example: the first 10 chapters of a Java book I used covered beginner's syntax, basic mathematical calculations, data types (you'll learn about these no matter what language you pick), loops, methods (other languages call them functions), single and multi-dimensional arrays, objects and classes, and finally ending with object oriented thinking. Following that, there were still 23 more chapters to delve into.

However, those first 10 chapters will roughly be covered by books in other languages as well. A loop in Python and a loop in Java are syntactically different but perform the same function.

It's all lots of big words you've never heard of now but since you really seem dead-set on picking something at this point, just roll with Python for now since it's going to be covered at your university and then start mixing in some C# when you feel comfortable at university.
>>
>>55749304
Now that Xamarin is free (beer and freedom), it's pretty goddamn fantastic.

The tools are pretty heavy weight, and it takes some learning, but overall C# is comfy to write in and app dev via Android is pretty cancerous, so it's almost like a lesser of two evils.
>>
git.videolan.org is back
fucking finally
>>
Does anyone else use /code/ on 4-ch.net?
>>
>>55749415
>>
>>55746236
Remember to keep it simple; don't put in shit that people won't notice, like unnecessary animations and images and other such bells and whistles.
>>
>>55749501
what?

give link
>>
>>55749607
Here. Just to warn you, It feels like it came from 2001.
http://4-ch.net/code/
>>
>>55749244
>couldn't I just write an app in Java for android, and convert it to objective-C
The part of your app logic that can be "converted" will be very small compared to the part that can't, because you'll be writing a LOT of GUI code that's specific to each platform.

The way around this is to use a framework that does the "translation" automatically, like Xamarin.
>>
>>55749244
>couldn't I just write an app in Java for android, and convert it to objective-C so it works on iOS too
No, not really. You can re-write it, but not really 'convert' it.
>>
>>55746610
Norah Jones
Corrine Bailey Ray
Nick Cave
Arch Enemy
>>
do you guys know of an imageboard script that doesn't use php?
>>
>>55749734
Make your own, it's a very good beginner's intro to, for example, making a webAPI with nodeJS.
>>
>>55749734
>imageboard script

fo what?
>>
>>55749808
to make an imageboard?
>>
>>55747189
You can multiply the floating-point value by n and then do math.floor on it, then divide by n.
Although that wont work on big floating-point values, unless you temporary cast the floating-point value from float to double/long double.
>>
>>55749734
https://github.com/bakape/meguca is written in JS and being rewritten in Go.
>>
i have foobar minimized and i want to save the file path of the current song playing, using cheat engine i very simply found the address but at this step i'm lost as to what to do with the address

this address is probably an offset to something (the main exe?) but i have no idea how to find out what and how to make sure that i can procedurally get this address so whenever i reopen foobar im at the same information

pic related
>>
>>55749856
you could automate running cheat engine & switching songs
>>
>>55749832
i mean multiply the floating-point value first with 10 * n, then math.floor and then divide by 10 * n; there n is the number of numbers after the decimal point you want to show.
>>
>>55749870
we got a joker here
>>
>>55749872
Susceptible to floating point rounding errors in some languages, so keep that in mind.
>>
Is it true java is slow or is it a meme?
>>
>>55749921
slow compared to what?
>>
>>55749957
compared to css, probably
>>
>>55749957
People are always saying java is a slow language. Is that true or is just memesters?
>>
>>55749990
slow compared to what?
>>
>>55749921
Bytecode will always be slower than native code, but modern JVM implementations are good enough that unless you are writing very performance critical/near-realtime code, it won't be an issue.

Early JVMs were crap, but that was a long time ago.
>>
>>55749990

No, it's not true. They've had a lot time to perfect the JVM.
>>
>>55749993
>>55749957

C, ASM
>>
>>55749990
If you have to ask, it's not going to matter to you. Your bottleneck for performance for the next 10 years is going to be your own programming abilities.
>>
>>55750003
>>55750001
Cool. I really like the compile once run anywhere aspect to where I can compile it once in any OS and it'll run the same in other operating systems. I'm thinking about making games in Java.
>>
>>55750020
What kind of games you thinking of making?
>>
>>55750039
I was thinking of trying my hand at h-games
>>
>>55750039
4D multi-chess player on VR
>>
>>55750039
Well, definitely not graphic heavy 3D games, but more like a 2D game, an RPG, or something that looks like quake 2. You can port quake 2 to java without any problems these days.
>>
>>55750020
Games aren't gonna be fully "compile once run anywhere" because they rely on a lot of platform specific stuff (anything to do with graphics, sound, input...). The closest you'll get to that is probably the Unity engine right now which has decent cross-platform compilation. I would recommend Unity anyway because it uses C# which is like Java but better.
>>
>>55750009
obviously, it's bytecode
>>
>>55750039
eh i 'unno, i think im probably gunna make the next minecraft or somethin' you know, you know? i got pretty good grades in my classes so i think minecraft shouldnt be too hard to make.
>>
>>55750074
you know what's cooler than a million dollars?
>>
>>55750087
ice cold?
>>
File: image_2.jpg (48KB, 391x391px) Image search: [Google]
image_2.jpg
48KB, 391x391px
Is there an easy way to port a C# application to Java?

I do not really know how to ask the question, don't mind my foreign autism.

Basically I want my C# code transformed into Java code.
I don't want to rewrite the whole thing.

It's a server based database manager program with SQL, so basically stores different database in the local network in its database where we can run different operations on each one.
>>
>>55750009
Objectively slower.

http://benchmarksgame.alioth.debian.org/u64q/java.html
>>
>>55750020

People like libgdx. You should look at that.
>>
File: hqdefault.jpg (9KB, 480x360px) Image search: [Google]
hqdefault.jpg
9KB, 480x360px
>
template<class T> static inline T NanGetPointerSafe(
T *var,
T fallback = reinterpret_cast<T>(0)) {
if (var) {
return *var;
} else {
return fallback;
}
}
>>
>>55750183
What did he mean by this?
>>
>>55750183
int value = NanGetPointerSafe(SomeIntPointer, 0)
>>
>>55750199
if you pass in a non-null pointer to a thing, it returns that thing back to you
otherwise you get back a freshly cast thing of that type
>>
>>55750183
>>55750199
templetized two-argument functon returns one of the two arguments

this is not so complicated if you know the context
>>
>>55750254
>otherwise you get back a freshly cast thing of that type
isn't that just the default parameter ?
>>
I started using UML diagrams and went into the whole OOP design.

It is a shame that I didn't use this before, it could have saved me from a lot of trouble, well save me from losing myself around the unorganized code.
>>
>>55750321
what kind of tools do you use ?
>>
>>55750335
my computer. why?
>>
>>55750360
programs to draw and convert UML ?
>>
I hate C so fucking much. I honestly tried to develop a serious C application for linux. There honestly too much shit to hold track of, - data structures, readability, code consistency... and memory management on top of that. You write hundreds and hundreds of lines for what other languages spend maximum 10-20 with some abstraction or syntactic sugar. Fuck that shit.
If you must squeeze performance from your application or have constraints such as real time/embedded hardware/similar - use C, else - use everything but that slight abstraction over assembly. It' simply isn't made for real world high level applications.
>>
>>55750110
You'd probably need to translate it one chunk at a time and verify functionality as you go.

Unfortunately, especially if you're using DB connection libraries, there's no automated tool to really translate it over.
>>
>>55750307
correct, you can use the default if you want
>>
>>55750409
Thanks, Captain Obvious.
>>
>>55750001
>Bytecode will always be slower than native code
you don't know what the fuck you're talking about
>>55750020
>compile once run anywhere
you took the bait
>>
>>55750409
This is why C++ exists.
>>
>>55750787
>b-but muh optional features i dont like
>>
>>55750409
>I'm incompetent
we can tell
>>
>>55750360
This ass is not me.

>>55750397

I use UMLet for Eclipse and built in tools in VS Enterprise. I got it from my private tracker.
>>
>>55750900
Got a new rig to code some apps?
>>
>>55750800
I don't understand this argument, you can write a C++ program exactly like a C program if you want to, while taking advantage of things offered in the C++ standard library, or you can just ignore the standard library and even use C's standard library.
>>
>>55750940
If more C programmers used C++, we'd probably get the few remaining C exclusives
>>
>>55750963
What if I hate idiomatic C++ constructs?
>>
>>55750971
What's to hate?
>>
>>55750940
>I don't understand
because you lack experience and have no fucking clue how the real world works
>you can write
>you can just ignore
not every project is a one-man-show fizzbuzz program
>>
>>55750095
ALRIGHTALRIGHTALRIGHTALRIGHTALRIGHTALRIGHTALRIGHT NOW LADAYS
>>
>>55751109
YEAH?
>>
>>55750971
>idiomatic C++
>>
>>55751198
It's more, and more of a thing lately.
>>
>>55751198

I've linked it before in this thread
https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md

There is work being done to setup a core modern idiomatic style for c++ .
>>
File: 1459702589670.jpg (31KB, 600x337px) Image search: [Google]
1459702589670.jpg
31KB, 600x337px
java question

I have an interface
public interface RenderableListener<T extends Renderable>{
public void update(T element);
}


now in class extending Renderable I want to call an instance of it like that:
super.listener.update(this);


it says argument not applicable but why the fuck not? makes no sense to me. what am I missing?
>>
File: rms dad.jpg (394KB, 1200x1514px) Image search: [Google]
rms dad.jpg
394KB, 1200x1514px
>>55747864
>>
>>55750929
I don't know what you mean.

I got a laptop for uni cause I live in the northern border of my country and the uni is down south.
>>
>>55751477
where's MIT license on there?
>>
>>55751355
Look up the Observer pattern.
>>
>>55751534
how does that answer my question?
>>
File: 1466559848718.png (85KB, 469x428px) Image search: [Google]
1466559848718.png
85KB, 469x428px
>>55751557
>>
>>55751477
GPL and AGPL are good solutions, if you want access to any modifications of your application, so you can merge it back. You as the creator can choose to have that right. But a library should never be any GPL other than LGPL. That is where all the "virus" infamy comes from.
>>
my ex used to call me "cock lobster" because sometimes my cock would smell like fucking lobster the morning after we fucked if I didn't shower
>>
>>55751524
MIT is basically an even laxer BSD.
>>
>>55751582
>But a library should never be any GPL other than AGPL
ftfy
>>
>>55751557
You clearly do not know about the pattern peasant.
>>
>>55751640
Stallman plz
>>
>>55751640
Why not LGBT?
>>
>>55751671
are you retarded? it's a problem with inheritance or generics and not some retarded pattern, you troglodyte
>>
>>55751710
If you cannot figure this out you better stop programming.

Go to law school, that'll be perfect for you.
>>
>>55751710
you what?
>>
>>55751734
well then. what's the answer, smartass?

>>55751742
you heard me
>>
>>55751742
He speaks Indian you dip.
>>
>>55751756
>you heard me
actually, i didn't heard anything
>>
>>55751756
Why would I tell the answer?

You need to find the answer on your own. That is what programming about, figuring out the solution.

Also make plans for it, then it will be easier too see through the whole thing.
>>
>>55751756
Have you tried using the visitor pattern?
>>
>>55751781
so you have no clue, smartass. didnt except otherwise.
>>
>>55751802
you heard me :^)
>>
>>55751756
might be worth looking at the design pattern
>>
>>55751756
The answer is to stop using Java.
>>
>>55752008
He can use Java fuck off man child.
>>
In c, is the only way to get the address of a variable to printf("%p",&variableName); ?
Also, am I doing that right?
>>
>>55752133
&variable
>>
>>55752133
use the address operator &
>>
What book would /dpt/ recommend me for learning C++?

I know, i should already know it. After college i didn't end up working with anything but java/javascript. Most books that i've found so far don't talk about the features of C++, just the basic generic programming functionality (what are functions, vectors, variables, etc).

I've been reading about struts but i'd like to read more about core C++ library.
>>
>>55752248
Don't read books. Watch someone else program it will fool your brain that you are the one doing it so you will remember what "your" were doing.
>>
>>55752158
>>55752150
yeah thats exactly what I did, thanks you guys
btw if I want to get the address of a variable why do I have to use %p and &variable, why not %X(for hex) and &variable
>>
>>55752285
Well, i can see your point but i don't have any projects in mind to use C++ right now, it'd be kind of a waste see? I absorve knowledge more easily through books or doing stuff.

I can't think of anything to do and books are comfy.
>>
>>55752316
it's just a shortcut

& prints the address as an unsigned integer
you can convert it to hex or let printf do it for you
>>
>>55752316
printf("%p", ...)
%p is just the format for printf
>>
>>55752319
"Discovering Modern C++"
>>
>>55752319
Well it is made for OOP then make a program about a real world thing.

ATMs and such.

My first project in college was a prison. It was very complex and I like it because if it.


Also do not go down the console programs route, that is just a time waste. I fell into that when I started.
>>
>>55746223
How do you approach a programming project which has tens of thousands lines of code? I need to get into something for my internship and its taking a great amount of time.
>>
>>55752413
C++ isn't made for OOP
>>
>>55752414
By making plans, dumb-dumb.

UML diagrams and use case scenarios are a great help.


Also watch Derek Banas's OOP design tutorials, they are exceptionally good for beginners.
>>
>>55752414
One method at a time.
>>
>>55752413

Console programs a waste of time..?

Compilers, linkers, version control software, and various unix utilities would like to say otherwise.
>>
>>55752441
What?

It was made for it cause C lacked oop elements, no?
>>
>>55752464
I think he meant it's a waste of time for you to learn through console programs. They're not essentially useless, it's just harder to learn through them.
>>
>>55752464
These only impress another programmers with high knowledge, but these won't convince future employers.

Even my fucking uni teacher btfo the whole class cause console programs.
>>
>>55746223
what animu?
>>
>>55752496
This.

Sorry my foreign autism kicked in.
>>
>>55752518
It looks like Bakuman.
>>
>>55752473
No

It's made to be multi paradigm
>>
>>55752518
hyouka

it's shit
>>
File: 20160723_172021.jpg (1MB, 2560x1920px) Image search: [Google]
20160723_172021.jpg
1MB, 2560x1920px
>>55752537
So are you saying C++ is used entirely wrong by the majority?
>>
>>55752556
Holy shit it's multipurpose. It's not used wrong, it's just not made for one single purpose.

Python is a multipurpose language, you're not wrong for using it as a scripting language, even if the majority use it as a OOP language.
>>
>>55752551
Which is why he should watch something good, like Bakuman.
>>
>>55752551
ty
the drawing is nice tho
>>
>>55752620
> calling 1s and 0s drawing

White men came
Across the sea
He brought us pain
And misery
>>
>>55752499

Future employers want to see that you know how to solve problems and use whatever buzzword tech / project methodology meme the illiterate management is fapping over.

Gui applications and console applications only differ in the interface presentation. The backbone of each is still the same. Whether you're drawing a bunch of hard to navigate menus or making the user pass commands via terminal.

Being perfectly honest here you're saying a whole section of programs is useless because they don't present themselves with functionally questionable eye candy and mouse navigation based interfaces.
>>
>>55752679
I didn't mean it, but most employers are dumb as fuck for this and they prefer design instead, how easily can they perform actions..


And let's be honest, they are the majority.

At least coworkers find these things as achievements..
>>
>>55752745
And you can clearly see my English is shit.
>>
>>55752745
Most employers won't even look at your portfolio, think about that for a moment.
>>
>>55752745

Well I'm saying developing and using console applications is a valid and good skill to have. Code generally interacts with code / data more than it does users. GUIS are only useful for tooling and user facing interactions to control systems / display data.

A lot of corporate interactions are basically run x script on a headless server, or code to code interactions with defined sections for user control / human readable output.
>>
>>55752414
I like how all your answers are OOP related, because programs of comparable functionality in other languages are either much shorter, or kernels.
>>
>>55752414

Unit testing,
Time Investment,
Design and refactoring as necessary,
and realizing after a certain size your project is going to be a mess.

Build each small section up and tests for the sections from the start of the project. Refactor as necessary when you encounter new problems and make sure the tests remain valid and are ran regularly alongside the build process.

A 10 k project isn't too bad. It can be done in a couple weeks to a couple months depending on how thoroughly you know the problem and how much you focus on it.

A project that is 50 k or 100 k lines plus is a royal bitch for a solo developer. You better keep good documentation and be ready for pain. Just keep it as clean and maintainable as your skill level allows and expect early design decisions to bite you in the ass hard.
>>
Let's say I have the following format:
----Object 1----
attr1: kek
attr2: topkek
...
...
I've got this in a string, is there any way to get attr2 value for a specific object, while also checking attr1, all while using a single regex?
>>
I've already learned the very basics of python and elisp. What language should I go balls deep in, I was thinking about learning something like clojure or maybe just going all the way with python.

I want to learn something cool but I'd also like to be employable.
>>
How does wxWidgets compare to GTK+ and Qt? I've heard GTK+ has bad cross-platform support while Qt requires you to purchase a license unless you release your software as FOSS.
>>
>Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.
>>
25 y/o, never programmed, wanna learn C. what do /g/? what book do i start with?
>>
>>55753376
type c tutorial in google
It's the best way to learn
>>
>>55753376
The K&R C
>>
>>55753241

http://www.slideshare.net/FranklinChen/handout-22302440
>>
File: 2pac.gif (183KB, 159x96px) Image search: [Google]
2pac.gif
183KB, 159x96px
>>55751134
MA NIGGA
>>
>>55753376
first learn haskell
then learn python
then learn c#
then learn c++
then learn x86 asm
then you might be ready to learn c
>>
>>55753710
Anon will kill himself before that.
>>
File: 1462666392038.jpg (57KB, 415x440px) Image search: [Google]
1462666392038.jpg
57KB, 415x440px
>>55753710
>python
>C#
>>
>>55748835
bottom-up I guess... started with Java and moved to C and x86 assembly not that long after (before I got gud). after that I learned some other high level languages and eventually got into functional programming
>>55749625
this looks pretty nice, I actually might start using that
>>55752496
how? learning to make GUIs makes you learn two things at once
>>
>>55753348
This is accurate.
>>
>>55753710

Replace Haskell with scheme. and x86 with x64 and / or Arm.

C# is merely for employment and is easily picked up coming from c++ so it can be removed.
>>
>>55753328
Please respond
>>
>>55753384
following random c tutorials sounds like a horrible way to learn

>>55753388
Thank you, sometimes the obvious answer is the best one

>>55753710
Why do I have to learn all that? Is it not possible to start with C right out the gate?
>>
>>55753922
>following random c tutorials sounds like a horrible way to learn
It's the only way.
>>
>>55753922
I started from C from nothing, he's memeing you.

K&R is a really good starting point unless you've never heard of a variable before.
>>
>>55753907

GTK+ and Wxwidgets are both really painful to use. Qt relies too much on it's tooling setup.
>>
>>55753960
We invented HTML 5 to solve those problems.
>>
>>55753922
start with assembly then C
>>
>>55753960
I'm willing to endure some pain as long as it works. Like I said, the biggest issue I have with Qt is with its licensing. While FOSS is great and I most likely will be releasing my software under a free license, I still want to have the freedom to decide myself.
>>
>>55753942
There's so many shitty tutorials out there, I'd rather start with a solid book.

>>55753949
Oh that's cool, how long have you been programming in C for?
>>
>>55753899
>Replace Haskell with scheme
Are you retarded?
>>
>>55754017
>putting hasklel on the list in the first place
>>
>>55754023
I take it you've never used Haskell
>>
>>55754012
about a year
>>
>>55754012
I just realised that you could take a MOOC. There's this free MOOC for example http://2016-aalto-c.mooc.fi/en/home/

I took a C course in my university that this is largely based on (or the other way around).
>>
>>55753979

Yeah it's kinda disgusting that people are looking at using the Chromium Embeddded Framework for GUIs.

>>55753992
Then choose one of the other two.. If you don't mind it being painful it really doesn't matter much between them.

The biggest difference is Wxwidgets tends to give a native look by default and will behave differently on various platforms. Gtk+ will look the same on all platforms unless you use a theme to emulate the typical appearance on said platform.
>>
>>55754063
Alright, thanks.
>>
>>55754086
>>
Would anyone mind helping me debug my BrainF*ck interpreter? I ran the Wikipedia Hello World program which caused the interpreter crash

 public static void main (String[] args) throws IOException {
Scanner s = new Scanner(System.in);

File file = new File(args[0]);
BufferedReader buffer = new BufferedReader(new FileReader(file));
String line;
while ((line = buffer.readLine()) != null) {
line = line.trim();
byte memory[] = new byte[30000];
int dataptr=0;
char commands[] = line.toCharArray();
for(int instrptr=0;instrptr<commands.length;instrptr++){
switch(commands[instrptr]){
case '>':
dataptr++;
break;
case '<':
dataptr--;
break;
case '+':
memory[dataptr]++;
break;
case '-':
memory[dataptr]--;
break;
case '.':
Character c = (char)memory[dataptr];
System.out.print(c);
break;
case ',':
memory[dataptr]=s.nextByte();
break;
case '[':
if(memory[dataptr]==0){
while(commands[instrptr] != ']')
instrptr++;
}
break;
case ']':
if(memory[dataptr]!=0){
while(commands[instrptr] != '[')
instrptr--;
}
break;
}
}
System.out.println();
}
}


The error being, Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 69
at M.main(M.java:38)
>>
>>55746610
http://musicforprogramming.net/
>>
>>55752133
>Also, am I doing that right?
no, %p expects a void*
>>55752346
>it's just a shortcut
you're just a retard
Thread posts: 318
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.