[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y ] [Home]
4chanarchives logo
\dpt\ - Daily Programming Thread
Images are sometimes not shown due to bandwidth/network limitations. Refreshing the page usually helps.

You are currently reading a thread in /g/ - Technology

Thread replies: 255
Thread images: 30
File: TheBestLanguage.gif (24 KB, 434x205) Image search: [Google]
TheBestLanguage.gif
24 KB, 434x205
/dpt/ - Daily Programming Thread
Best Language Edition
Last thread: >>51457707
>>
First for Java.
>>
Second for OCaml
>>
>>51464580
fourth for forth
>>
>OP's image
Oh look, it's the inspiration for Python.
>>
First for Haskell
>>
Fifth for Ruby
>>
>>51464607
What exactly is wrong with that?
>>
>>51464580
Second, Third and Fifth for Retards
>>
>>51464618
>actually believing there's nothing wrong with BASIC

"It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration." -- Edsger W. Dijkstra

And today you can replace BASIC with Python in that quote.
>>
>>51464666
See, all you're saying is "it's bad" in different words, but without explaining why exactly it is bad.
>>
>>51464666
this

it's truly cancerous to tell people to learn python as their first language
>>
>>51464694
not him, but basic is where the "goto statements are bad" meme came from because they are used so much in basic.
>>
judging by the previous threads, looks like people actually cared about our opinions, and, even better, are actually building things with Go.

it's nice to know that, while people here shill for Lisp, functional programming languages, C# and C++, other people actually do things.
>>
>>51464707
Do Python programs also use goto all the time then?
>>
Taking a stupid programming class for my ME degree next semester, learning C, what am I in for?
>>
>>51464720
no, there is no goto and there isn't even labeled break/continue because guido thought it would be too difficult for python users to cope with
>>
>>51464720
No, I don't think python is bad.
It has it's place, but I think basic doesn't have anything good about it.
>>
Cast your vote, /g/. Remember to be honest, this is an anonymous poll and there is noething to be ashamed of. Make sure to read the question carefully.

https://strawpoll.me/6069029
>>
>>51464770

This is gonna be good.
>>
File: endLife.png (4 KB, 455x135) Image search: [Google]
endLife.png
4 KB, 455x135
I miss C.
>>
File: 1441228754967.png (86 KB, 600x1200) Image search: [Google]
1441228754967.png
86 KB, 600x1200
>>51464770
Python just werks desu. I always use it if i have the option to.
>>
>>51464770
I would pick lua, but you cant have lua without C
>>
Talk me out of using a cute anime pic for my github profile pic.
>>
File: imgo.jpg (42 KB, 540x403) Image search: [Google]
imgo.jpg
42 KB, 540x403
>>51464827
use this
>>
shutup u cunts
>>
whoever likes to program in bash should just get it over with already and kill themselves.

you already know you hate yourself
>>
>>51464827

Do you want to use your github as a portfolio to get hired? If so, do not give your github an anime profile pic.

Otherwise, do as you wish.
>>
>>51464791
what language is that?
>>
>>51464883
Hell
>>
>>51464860
bash is great for simple 1 liners but you're right
bash is shit for anything more than a for loop
>>
File: Bait.png (114 KB, 955x957) Image search: [Google]
Bait.png
114 KB, 955x957
>Sometimes you just want to write something that works, and if you do your choices are PHP, JS, Python, Perl and Ruby.
>>
File: 1447706037523.jpg (36 KB, 405x437) Image search: [Google]
1447706037523.jpg
36 KB, 405x437
Can I use typeid like this? I tried Googling it of course, but all the top links on typeid are about random abstract cases on classes.

char *example = "Hello world";
typeid(example) == typeid(char *)


Will the second line evaluate as true? I know it will for simple types but I'm wondering if it's different for pointer types, etc. Would typeid(int*) be different than typeid(int)? Thanks for any help, I know I could try it myself in a compiler but I don't want to be misled to some minutiae.
>>
>>51464827
do it you stupid faggot
>>
>>51464580
Is anyone else seeing backslashes in the title?
>>
>>51464935
nope looks fine to me
>>
>>51464935
I knew it looked funny
>>
>>51464929
It returns a type info object and as thus it is not guaranteed to be equal even for the same types.

Use:
typeid(example).hash_code() == typeid(char *).hash_code()


or:
type_index(typeid(example)) == type_index(typeid(char *))


And int * isn't the same type as int.
>>
https://www.quora.com/What-is-a-coders-worst-nightmare/answer/Mick-Stute?srid=RBKZ&share=1
>>
>>51464580
Hi tpg. I am thinking of learning to program and I am interested in C++. Am I a total moron for wanting to learn C++ first/at all?

I have always loved small, efficient single exe programs on windows. things like sumatrapdf, utorrent and notepad2. I also want to learn about reverse engineering and assembly, etc. to use things like ida pro and understand step by step what is happening.

what is the best way to go about learning this stuff?
>>
>>51464863
>>51464933
I just went with a picture of a synthesizer instead.
>>
>>51464995
which synthesizer?
>>
>>51464989
Learn C first, especially since you said you're interested in RE and assembly. And if you really want to learn C++ later you'll have a foundation.
>>
>>51464978

Thanks mate
>>
>>51464989
I recommend learning C and then some OOP language, then C++ afterwards if you're sure.
>>
>>51465015
>>51465029
many thanks guys
>>
>>51465013
dx 7
>>
>>51464986
kek. but did that happen many years ago or more recently?
>>
>>51465059
>AT&T tech
>UNIX
Sounds like it happened at least 20 years ago
>>
>>51464986
>Traditions: Why do Asians take their shoes off when entering a house?
the fuck?! it should be why murricans don't take their shoes off when entering a house
>>
>>51465051
nice
I had a korg m1 a few years ago but the keyboard shat out on me.

I gave up on music stuff around then and took on programming
>>
>>51464740
String, memory and pointer hell, but it' s a good language.
>>
>>51464883

KPL (kernel programming language). It's a language designed by some professor at Portland State University to make teaching operating systems classes easier. It targets an emulator called Blitz that uses its own custom 32-bit RISC architecture. Also, you can't compile the emulator to run on 64-bit anything because the guy who wrote it literally casts int to pointers.
>>
>>51465079
Why don't you program a synthesizer?
>>
>>51465081
hell isn't so bad once you start living in it
>>
>>51465076
Why go through the extra effort? We have furniture so we aren't sitting on the floor all day long.
>>
>>51465075
yeah in the 80's or maybe the 90's

https://en.wikipedia.org/wiki/3B_series_computers
>>
>>51465093
That was the whole reason I took up programming in the first place since C/C++ is used for vst's.

Synthesizers stopped being interesting when I knew how all sound was made.

I now am more interested in networking and embedded systems. Crazy, right?
>>
>>51465104
inside public buildings like schools and whatnot you keep your shoes on. but in your own home it's more comfortable to not have fucking shoes on and you don't get the dirt inside your house.
>>
>>51465104
The home should be a clean and comfortable place. Also there's this thing called carpeting.
>>
>>51465122
>it's more comfortable
Why not wear comfortable shoes?
You can put slippers on if you want, I don't give a fuck. Slippers exist in America. People wear them inside their homes.

>>51465137
>Carpeting
Hardwood floors are far more popular in modern houses. They look nice and are extremely easy to clean (which is far better if you value cleanliness).
>>
>>51465156
>comfortable shoes
oxymoron t͏bh, and shoes are noisy
>>
>>51465175
I'm wearing shoes right now, they're quite comfortable. They're not very noisy either. Not sure what 3rd world shithole you're living in that you can't get a comfortable pair of shoes in.
>>
>>51465156
wow is this for real

people wear slippers in sweden but just socks/barefoot is probably by far the most common. no one wears outdoor shoes indoors

how do you even lie down on a couch? do you wear your shoes all day and then when you're going to sleep you take off your shoes right next to your bed? your feet probably stink like hell lol
>>
>>51465096
It's hard in the beginning, but pointers magic is just great
>>
>>51465104
>taking off shoes
>effort
>>
>>51465221
he's so fat he can't even reach his feet
>>
>>51465088
Jesus, what made that guy think that a language like this should possibly exist?
>>
>>51465190
If you're going to be flopping all over the furniture, go ahead an take your shoes off. Is this hard to imagine? Some people walk around in their socks too. Do whatever the fuck you want, it's a free country.
Obviously if your shoes are muddy or you're stepped in dogshit or something you'd take them off instead of tracking it around the house.
>>
>>51465229
Academia affects the mind in bizarre ways.
>>
>>51465029
>>51465015
Looks like some good C books are
>K&R (obvious choice)
>A Modern Approach by King
>Head First C
>21st Century C

What about understand x86 assembly? How can I learn to understand things I see when people use IDA Pro for example? I don't want to be some "leet hacker" I just find it fascinating.
>>
>>51465234
Take your shoes off at the door like a normal white person
>>
>>51465248
I'll do whatever the flying fuck I want.
You can do whatever the flying fuck you want.
>>
>>51465244
Assembly language step-by-step, Learning with Linux.

You probably won't feel like you've mastered anything after reading this book since assembly is more of a concept rather than a language.

You will learn more about assembly techniques from C books imo.
>>
Why don't you program c#?
It's fun
>>
http://nonwhiteheterosexualmalelicense.org/

How does this make you feel, /g/?
>>
File: Untitled.png (13 KB, 591x125) Image search: [Google]
Untitled.png
13 KB, 591x125
I'm learning functions and I want to know when do I use a void function and when do I use a int/double function?

I did the problem (pic related) and I did it with a void function and I still got the answer right.
>>
>>51465287
getting repeatedly fucked in the ass by microsoft isn't fun for me
>>
>>51465304
It's foss
>>
File: Untitled1.png (4 KB, 480x330) Image search: [Google]
Untitled1.png
4 KB, 480x330
>>51465295
>• If an item’s wholesale cost is 5.00 and its markup percentage is 50%, >then the item’s retail price is 7.50.
>The program should have a function named calculateRetail that receives >the wholesale cost and the markup percentage as arguments and >returns the retail price of the item.
>Input Validation: Do not accept negative values for either the wholesale >cost of the item or the markup percentage.
>>
>>51465244
>What about understand x86 assembly? How can I learn to understand things I see when people use IDA Pro for example? I don't want to be some "leet hacker" I just find it fascinating.
1st, learn C
then
http://www.drpaulcarter.com/pcasm/
www.reddit.com/r/netsec/wiki/start
http://opensecuritytraining.info/Training.html
there are a shitload of materials for learning all this stuff
>>
>>51465295
Just read the goddamn book raj.
It's not hard.
>>
>>51464666
>my programming teacher started with VB
So that's why.
>>
does ruby have a specific type for holding a single value or do i have to waste memory using bigger types? i'm too autistic to read through the documentation
>>
>>51465289
I'm not white. I feel indifferent. Should I feel offended on behalf of white people?

>>51465295
int/double/potato functions are for returning an int or double or whatever. This usually lets you do convenient stuff with your code. In practice you can do whatever you like, within spec.
>>
>>51465307
CLR isn't.
>>
>>51465289
don't care
>>
>>51465343
>Should I feel offended on behalf of white people?
the only people offended on behalf of others are SJWs
that said, it should still seem like a retarded idea
>>
>>51465350
why did you reply
don't fucking reply next time
>>
>>51465349
Yes it is
>>
>>51465342
ruby doesnt have an individual character type, you have to waste memory.

you can test this by doing


>> 'c'.class
=> String

>>
lisp
>>
>>51465360
fucking retard. i answered his question of how i felt about the website/license
>>
>>51465360
lol mad
>>
pleb here, learning hashes on c++

/g/ so when the pizza guy asks for my phone number, he's looking for my information on a hash table, or is it usually something else?

How useful is this data structure for casual businesses?
>>
i live in sweden, i've already seen it all. this guy want schools to give a trigger warning to students when there's a white heterosexual couple in some book.

https://www.youtube.com/watch?v=Nunl7Ec5bEk

it amounts to some childish faggotry/trolling, not worth paying attention to. just do your grown-up stuff and don't let you'reself get trolled this easily. and like with the "refugee" crisis, people will start to wake up and these faggots will get rekt. the leftist "environment" party for instance might not make it to the riksdag next election and the feminist party never got into the riksdag in the first place, while the based sweden democrats have become the biggest party in sweden.
>>
>>51465442
another term for a hash table is a dictionary. that should answer your question
>>
>>51465442
it's probably a SQL database wrapped in some other language. it's very unlikely that they're using hashtables lol
>>
>>51465481
Well the databasse results could very easily be stored in a hash table
>>
>>51465295
The "type" of a function is just what it returns. If it's void, it doesn't return anything.
E.G. you can't assign a variable to the result of the function, or add it to a list, or w/e.
But you can still manipulate global variables from within that void function, so it's still possible to have it change data elsewhere in the program
>>
>>51465442
If your pizza guy is a hardcore programmer gentoo-specialist, he'll look you up by hash table. It's very appropriate for that.

>>51465455
that sucks senpai

>>51465342
There's no char type. You can store it as a number, but I don't know if it saves any memory.
>>
>>51465502
query results*
>>
So, people here really hate Python and PHP
>>
>>51465536
Because both of them are incredibly slow, awful to maintain, and won't fucking die.
>>
>>51465536
They both have retarded syntax because the main devs don't think people are capable of understanding what variables or indentation are.
>>
>>51465536
Python did nothing wrong.
>>
>>51465536
i love php but only with bootstrap

ruby can honestly replace both python and php. why bother learning 2 shitty languages when i can learn 1 good one
>>
>>51465540
>C programmer talking about maintainability
Retard
>>
>>51465536
not everyone hates them but i sure do
>>
>>51465569
What do you like more about ruby over those other languages?
>>
>>51465605
>Implying I'm a C programmer
>>
>>51465635
What language do you like to use that is easy to maintain?
>>
>>51465641
It isn't what I work with every day, but C.
Because C is clean and very easy to maintain if you're not a fucking retard. Like you apparently are.
>>
File: 1425878830445.jpg (19 KB, 375x375) Image search: [Google]
1425878830445.jpg
19 KB, 375x375
>>51465658
So you were a C programmer talking about maintainability after all.
>>
>>51465658
>C is clean and very easy to maintain
This is just retarded. C programs, unless they are vary tiny, are filled with unnecessary hacks, making it completely unmaintainable. It is lacking basic construct blocks and features, which would make you think about your actual program instead of memory leaks.
>>
>>51465792
You are just spouting shit.
C is just as maintainable as any other language. You can easily modularise code and limit interactions between them and write everything in a structured. Not everyone is some Java retard who tries to shoehorn "OOP features" into C.
>>
>>51464863

>Using your github to get hired

Wew
>>
>>51465792
The Linux kernel is in C, and Linus maintains it in his head.

Git gud desu senpai
>>
>>51465569

I picked up ruby on rails and it's seriously a beautiful language
>>
>>51465806
>You can easily modularise code
You might be able to but you can't claim that it is easy. At least easier than Java. Java is infinitely better. C makes you worry about stuff that you shouldn't in almost 2016.
>>
>>51465830
>on rails
>language
baka
>>
>>51465848

Should have said ruby using the rails framework ;^)
>>
>>51465843
Just because it doesn't "classes" and "interfaces" it doesn't mean that it's easy?
Anyone who actually knows about the C compilation process will find using headers and compilation units will find using header files and such very easy.
>>
>>51465843
>Java
>Infinitely better
Enjoying that AbstractBeanCounterProxyFactory?
>>
>>51465848
which word filters to baka? baka?
>>
>>51465289

Creating a license like this is pointless. It's not enforceable in court, because it violates the discrimination laws of most countries (or at least the United States, which is the only country that truly matters in the tech industry). Moreover, anyone can simply say they're bisexual, fork a repo, re-license as MIT, and no one would be able to stop them. And even if one didn't want to call themselves bisexual, and all of the courts were completely corrupt and only enforcing discrimination laws when it applies to non-whites, the license still wouldn't be able to stop a white heterosexual male from copying, re-licensing however they want, and selling/redistributing the file. Why? Because he can act under a corporation. The corporation owns the code and the licenses, and the corporation does commerce. The corporation is a person, a separate legal entity from any person(s) running the business associated with it, and as a person, it has no skin color. In fact, it doesn't have a body.

If you want to release free software, that's fine. If you want to ensure that the source code gets contributed back, there's tools for that - the GPL. If you want to make it easy for people to use in their existing codebases regardless of whether they are free or proprietary, there are tools for that as well - MIT, Modified 3BSD, and Apache. But don't pretend that you can do the world a great service by getting more non-white/heterosexual/males to do more programming by half-assing the GPL license only for white heterosexual men.
>>
>>51465894

Oh, and one last thing. Can anyone prove another person is white before a court of law? Aside from the fact that there isn't any "white" gene, there is debate over what makes one person "white". Some people follow the "one drop rule", which holds that a person is not white if they have any ancestor who was not white. Some people say that people from certain southern European countries are not white. Some people have even claimed that the Irish are not white. There is no standard legal definition of "white", and the burden of proof would be entirely on the prosecution for claiming someone is in violation of their license agreement.
>>
>>51465877
Headers aren't alternative to classes and interfaces. Take a look at Rust, even it has some constructs to build you application.
>>
>>51465890
>using a languages naming conventions because they said so
>>
>>51465894
wait i just realized, the fact that they care more about getting white guys to give back code just means they think white guys are better programmers lol
>>
>>51464827
if dubs, you must use shitting dick nipples
>>
>>51465999
do trips count as dubs?
>>
>>51465890
Nah I like to name my classes memorable things. Like BeanCounterJizzMachine.
>>
File: bateman.jpg (25 KB, 547x298) Image search: [Google]
bateman.jpg
25 KB, 547x298
>>51466035
We might never know.
>>
>>51466035
Gee, I don't know, does a number that ends in 3 consecutive digits also end in 2 consecutive digits?

>>51465988
>implying race is inherently a factor in programming ability
>>
>>51466035
strictly speaking, no
>>
>>51464703
It's cancerous to tell someone to learn anything but C as their first language.
>>
File: Big Dog vs the trash.jpg (87 KB, 648x486) Image search: [Google]
Big Dog vs the trash.jpg
87 KB, 648x486
>>51465076
Uh, I do. I work in a fucking machine shop. I work in the filthiest machine shop in the world. I don't want to be tracking that shit in my home.
>>
Is it possible to use shell expansion in my .gitignore file?
>>
>>51465916
Black people use a random set of upper case letters in the middle of sentences.
White people use lower case most of the time.
Indians use camel case.
I think that is easy enough to spot.
>>
>>51466075
Strictly speaking, yes, you dumb shit.

Are the last two numbers the same? Then they're dubs, fucktard.
>>
>>51466345
>Indians use camel case.
Only because Java is popular in India, and Java encourages CamelCase.
>>
>>51464666
What wrong with python? I studies it first semester and the next 3 we only build on C++ and assembly. I thought Python we a bit too layered but nothing wrong with that.
>>
>>51466035
trips are a superset of dubs
>>
>>51466478
it's too simple to the point where it become overly obtuse and ineffective. it's like building things with duplo bricks instead of lego technic. duplo is for babies.
>>
I have to implement an avl tree from some provided Java code and my mind can't grasp it right now. Fuck Java tbqh family
>>
File: BudapestQT.webm (3 MB, 1370x1038) Image search: [Google]
BudapestQT.webm
3 MB, 1370x1038
I'm new at this stuff. Let's say I'm learning python as of right now, about half way through Thinking Like a Computer Scientist, and I'm taking my first programming class which will be based on Java next semester. Should I just finish up this book on Python or should I get a head start on Java?

I'm thinking it might be better to just finish learning Python, and then when I start doing Java next semester I'll start fresh and I'll be able to at least learn quicker having gone through Python. Advice?
>>
>>51466546
>from some provided Java code
you need to be a certified wizard to be able to decipher pleb tier java code
>>
>>51466562
start java immediately. it's the same shit but much better

https://docs.oracle.com/javase/tutorial/
>>
>>51466576
>much better
THE STATE OF /dpt/
>>
>>51466576
Interesting, but wouldn't knowing 2 languages be more beneficial? I mean I might end up more proficient in Java after the class if I drop Python now but either way I'll be taking the Java class so maybe it might be beneficial to just finish learning Python which I can apply to learning Java. I might be wrong though.
>>
>>51465916
People of European ancestry have distinct genetic traits. The origin of those traits are becoming better understood too: http://phys.org/news/2015-11-fourth-strand-european-ancestry-hunter-gatherers.html
>>
File: 1441684460338.jpg (92 KB, 1280x720) Image search: [Google]
1441684460338.jpg
92 KB, 1280x720
>>51466576
>Unironically recommending Java
>>
>>51466478
>no/hacky encapsulation
>no private variables unless you force name mangling and even then you can still access it
>"we are all consenting adults here" (don't rape variables, btw it's 2015)
>2 different pythons and most use 2.X instead of 3
>slow as shit
>hundreds of other problems
>>
linus himself said linux is bloat and there are literally hundreds of maintainers helping him.
>>
>>51466653
Learning additional languages is usually trivial once you learn one. Focus on learning that first one for now.
>>
>>51464770
>only 44% people on /g/ are employed
>>
>>51464989
>Am I a total moron for wanting to learn C++ first/at all?
If you think C++ is you're goal, then no to both. By learning it first, you'll be freed from having to unlearn lots of bad habits from other languages--especially C.

As to learning it at all, Ofc no one can predict the future, but C++'s outlook is better than ever. It's industry use keeps going up atm, and it's getting both easier to learn and faster as a language.

I started with assembler, then learned C, then C++, then a few other more abstract languages such as Python. For all the systems that I care about (large projects where performance is king), C++ winds up being my goto language.
>>
>>51466576
Does Java still come with browser toolbars?
>>
>>51466738
Employed as in being paid for programming in their favorite language, so if they flip burgers they ought to check unemployed.
>>
>>51465988
>they think white guys are better programmers lol
That's statistically obvious.
>lol
>>
>>51466653
i actually think that having learned python first would be a great hindrance to learning java and other programming languages. see >>51464666

all the basic control flow with if/else, loops and such is pretty much the same (except java has the proper, traditional for loops which python doesn't). and java is strongly typed which is a good thing and the IDEs are far better. you learn nothing with python that you can't learn better with other languages.
>>
Riddle me this. How come some SO questions have no answers but a fuck ton of votes? Who the fuck does vote for questions? What kinda idiotic logic is that?
>>
>>51466809
how is it not logical? you see a question that you're interested in, you upboat it.
>>
>>51466797
Yeah, but they pretend to think otherwise. They literally make TV shows called "girls can code" to try to "prove" otherwise.
>>
>>51466808
well, the advantage of python is the simple syntax, so the idea is that you are closer to the concepts without being lost in details, like forgetting semicolons
>>
>>51466831
it's all puppeteered by the jews. they want cheaper labor in the tech industry so they're pushing this feminist agenda to try to dilute the workforce so that they can get competent (male) workers for less.
>>
>>51466808
>java has the proper, traditional for loops which python doesn't
>proper
lel
>>
>>51466831
Well sure, some females can write software ofc. As with males, not all of them a) can at all, or b) far fewer are good at it.

My main point is that by most measures that matter to businesses, white males are consistently the best developers.
>>
>>51464989
No, C++ is great. I keep going back to it. Don't listen to Cfags, anyone that learns C first writes shitty C++ for the rest of their lives. That's assuming they even code in C++, most of them just stay in C and reimplement C++ features all day (like vtables with function pointers to get around the fact C has no polymorphism)

Anyway is recommend qt creator if you want to make desktop applications. VisualStudio is ok but codeblocks will let you program on more platforms besides windows. (Keep an eye out tho VS went open source apparently).

You could also try your hand at gamedev, check out SFML and SDL 2.

Personally I use vim and mingw-w64(from winbuilds)
>>
>>51466872
>he has to use a while loop with wide-scoped variables whenever a normal for loop would be the most sensible option
shiggydiggydoo
>>
>>51466546
>blaming the language when you're at fault for being retarded
>>
>>51466913
>Java is great you bustard
>t. Pajeet
>>
>>51466792
Or if they use a different language at work.
>>
>>51466928
>Java is bad, do I fit in yet guys?
>>
What's the least weird language? (Doesn't mean you have to like it or even use it)
I vote for C#. It doesn't have weird initialisation of class variable, multiple access operators, and is pretty consiatant in its style.
>>
>>51467019
MIPS assembly
>>
Discovered an interesting free booklet on Sepples. One of the authors is the guy behind CppCon Jon Kalb.

http://www.oreilly.com/programming/free/c++-today.csp
>>
>>51467019
java

very little syntactic sugar, no cluttered bullshit like LINQ and ?[] ?: ?. ??
>>
>>51467019
scheme
>>
>>51467056
neat. Thanks
>>
>>51466789
Why wouldn't it? Those toolbars are really fucking helpful. They allow you to use search engines you've never even heard of before, and save all kinds of fucking money through exclusive offers. Java like browser toolbars are all about fun and excitement, but I guess it's just too much for some to handle.
>>
I need to deploy my application to OSX but don't have one in possession. I've tried setting up a VM with no success, the dependencies I need won't install properly.

Does a website exist where you can ssh into a public OSX free of charge or something?
>>
How can I make scanf return to its caller after only entering a single \n into its buffer? For example, the user presses enter, and instead of waiting for more input the scanf function terminates.

As a note the first parameter accepts an integer, not a character, and for whatever reason " %d" and "%*c%d" don't seem to work. Why is this?
>>
>>51464666
>muh appeal to authority fallacy
>no actual arguments given
Actually Dijsktra was talking about the BASIC that existed in the 70s, which was based on using line numbers and GOTOs everywhere. Visual Basic on the other hand was a perfectly fine and modern language, which all the conditional statements and loops you would expect in any structural language.

Now go back to /b/ where you belong.
>>
>>51467310
Show some precise code examples
Enable warnings
>>
>>51464580

Continuing work on my browser game bot.
Userscript masterace.
>>
>>51464607
>python
>appeared in 1989

>visual basic
>appeared in 1991

>Oh look, it's the inspiration for Python.

lel, k tard.
>>
File: droopy.jpg (45 KB, 500x381) Image search: [Google]
droopy.jpg
45 KB, 500x381
>>51467476
Hello. Dude. One is American and the other is like Russian or something. There are different time zones you know.
>>
>>51467476
python didn't look anything in 1989 like it looks today
>>
daily reminder that you are not indian
>>
File: basic.png (68 KB, 802x629) Image search: [Google]
basic.png
68 KB, 802x629
>mfw there is a free as in freedom Visual Basic clone available and actively maintained with bindings to GTK, QT, OpenGL, etc
>mfw now I can rememorate my QBASIC and VB programming days
Thank you based Free Software. I don't know why the code editor font rendering is fucked up though.
>>
>>51467962
>Free Software. I don't know why the code editor font rendering is fucked up
>>
Let's be honest now. Why would it be worth learning to use a text user interface text editor like vim/emacs?

Sure, after getting used to, they allow you to write and edit text a lot faster. But the actual process of TYPING isn't the main part of the work in making software. Don't you spend a lot more time reading code, navigating around code, thinking and planning than typing?

So why wouldn't you use an IDE or GUI text editor that allows you to hop quickly between calls and definitions, etc?
>>
>>51468028
>But the actual process of TYPING isn't the main part of the work in making software.

Maybe if you're not working in [spoiler]an uber-verbose boilerplate dungpile like the Java language[/spoiler]
>>
>>51467991
Nice meme, but GNU/Linux has today better font rendering than Windows and OS X, especially on non-HiDPI displays. Most importantly, it can be tweaked as you like, unlike proprietary software. Feels good man.
>>
>>51466120
>>51464703
It's cancerous to tell people to learn programing
>>
>>51468028
>Don't you spend a lot more time reading code, navigating around code, thinking and planning than typing?
vim and emacs are excellent at that.
vim with ag (silver_searcher) + fuzzy searching and vim's built-in tag/jumplist is the best code navigation experience I've ever had.
>>
>>51468051
>GNU/Linux has today better font rendering than Windows and OS X
lolno

better than OS X but not windows
>>
>>51468028
because vim does that?
>>
>>51466877
How does it follow? At the end of the day you're still writing code that has to live on the processor. How is being a few steps closer to that reality harm you when you start to learn coding harmful? How does being more detached from that reality when you start to code help you?
>>
>>51464580
I'm struggling with making my A* run faster than regular Dijkstra. I'm suspecting that my heuristic is non-admissable, but I can't figure out why...

https://github.com/enfiskutensykkel/a-star
>>
>>51468028
>So why wouldn't you use an IDE or GUI text editor that allows you to hop quickly between calls and definitions, etc?
Because both Emacs and vim allows you to do exactly that.

I use vim for development, I have plugins that allow me to do
>code completion
>quick definition navigation (aka jump to method/class definition)
>parse compiler/interpreter output so I can use it for linting and for jumping straight to compiler errors/warnings
>front-end for GDB, allowing me to debug code while following the code within vim

I've seen plenty of people do the same with Emacs.
>>
>>51468028
YouCompleteMe is elder god tier and helps in fast fuzzy autocompletion.
It provides your jump to declaration and definition too.
>>
File: dicks.png (2 KB, 597x40) Image search: [Google]
dicks.png
2 KB, 597x40
how do I into mt/parallelism?
I see all kinds of 'fences', 'lock-free', 'hazard tracking', 'workers', 'jobs' terminology stuff, but it's too much for my lizard brain

particularly for c++
>>
>>51468171
>I see all kinds of 'fences', 'lock-free', 'hazard tracking', 'workers', 'jobs' terminology stuff, but it's too much for my lizard brain

Fences = memory barriers, you wait for data to be pushed to actual memory
Lock-free = concurrent algorithms that are fast because a thread doesn't need to fight over a lock with competing threads (see atomic compare-and-swap)
>workers/jobs
workers = threads, jobs = a task that needs to be done
>>
is it possible to code in c and use python gtk at the same time? if yes if I compile it with mingw on linux can I use the compiled stuff on windows without having to worry about installing additional stuff on it?
>>
File: C.png (136 KB, 2000x2126) Image search: [Google]
C.png
136 KB, 2000x2126
>>
>>51468265
>is it possible to code in c and use python gtk at the same time?
Yes, but why would you? PyGTK is basically just a bunch of C bindings...
>>
>>51468133
Anyone?
>>
>>51468285
i dont know, I'm sick of coding and using the cli.
I wanted to try and learn to code a simple gui for a simple program, gtk is the only thing I know about gui
>>
File: dragonday.png (267 KB, 852x392) Image search: [Google]
dragonday.png
267 KB, 852x392
>movies
>>
File: 1429706823914.jpg (29 KB, 604x453) Image search: [Google]
1429706823914.jpg
29 KB, 604x453
Can I get anywhere in programming without a degree?
>>
>>51468358
If you have projects to back up your claims of experience.
>>
For school I'm learning C. In a month the class will be over, but I'm still not sure what to actually make with my newfound knowledge beyond simple programs. Any recommendations?
>>
>>51468329
What I meant is that GTK+ is written in C. You can make GUI applications with C GTK's C API, instead of using some complicated mix of Python and C.
>>
>>51468408
oh I didnt know that, im gonna check it out ty
>>
>>51465988
10. By "feelings of inferiority" we mean not only inferiority feelings in the strictest sense but a whole spectrum of related traits: low self-esteem, feelings of powerlessness, depressive tendencies, defeatism, guilt, self-hatred, etc. We argue that modern leftists tend to have such feelings (possibly more or less repressed) and that these feelings are decisive in determining the direction of modern leftism.

11. When someone interprets as derogatory almost anything that is said about him (or about groups with whom he identifies) we conclude that he has inferiority feelings or low self-esteem. This tendency is pronounced among minority rights advocates, whether or not they belong to the minority groups whose rights they defend. [...]

12. Those who are most sensitive about "politically incorrect" terminology are not the average black ghetto-dweller, Asian immigrant, abused woman or disabled person, but a minority of activists, many of whom do not even belong to any "oppressed" group but come from privileged strata of society. Political correctness has its stronghold among university professors, who have secure employment with comfortable salaries, and the majority of whom are heterosexual, white males from middle-class families.

13. Many leftists have an intense identification with the problems of groups that have an image of being weak (women), defeated (American Indians), repellent (homosexuals), or otherwise inferior. The leftists themselves feel that these groups are inferior. They would never admit it to themselves that they have such feelings, but it is precisely because they do see these groups as inferior that they identify with their problems. (We do not suggest that women, Indians, etc., ARE inferior; we are only making a point about leftist psychology).
>>
>>51467924
any example ?
>>
>>51465569
how is php related to bootstrap?
>>
>>51468564
I guess you can let PHP generate bootstrap elements?
>>
Does anyone in here know shit about Ada? I'm trying to learn it and my first exercise is making a matrix calculator, but I'm stuck in making the ADT (I know there's a library, I want to implement the matrix myself). I want the record for the matrix to include the row count, column count, and of course the contents of the matrix which will be a 2D array. I want the matrix to be dynamically allocated, but of course there's a lot of issues with that. I'll go into more detail but I want to know if you guys would mind.
>>
>>51468171
> how do I into mt/parallelism?
Get a good book. Avoid anything that claims to be suitable "for dummies" or which suggests that the learning process will take a given number of days.

But before any of that, you need to be a reasonably competent programmer. The reason I say that is that for concurrent programs, trial and error will not work. Different runs of the same code on the same inputs can produce different results unless you take all of the necessary steps to ensure that they can't. If you make a mistake, the program might coincidentally work 99 times out of 100, i.e. it will pass all of your tests yet not actually work reliably (and good luck trying to debug such problems).
>>
speaking of bootstrap, how would i make an image disappear when screen size is small? or when i resize the browser window to a smaller size, i want an image to disappear, and then reappear when its big again
>>
>>51468674
There isn't really a thing in bootstrap where you can say that when a screen is less than x amount of pixels an image has to disappear.
There is http://getbootstrap.com/css/#responsive-utilities-classes, which will probably get you far enough.
You'll have to build something that does that yourself, which I've seen done before done by a PHP guy I've worked with, but I'm not a PHP guy.
>>
>>51468615
i know ada but it's a shit language.
>>
>>51468887
It is a fucking headache to work with
>>
>>51468609
oh cool
you cant do that with django?
>>
>>51468887
>>51468951
Might as well just use Pascal/Delphi.
>>
File: 1448200524.jpg (113 KB, 554x730) Image search: [Google]
1448200524.jpg
113 KB, 554x730
There's no good reason why this shouldn't work.
>>
>>51469686
It's for a uni project. I picked Ada arbitrarily and I regret it. >>51469687 is what I'm trying to work with. The answer is probably something really simple but I'm too tired to make any sense of it.
>>
>>51469687
Do you even type theory?
Of course a 2-dimensional array isn't the same as a Matrix- It might be a subtype, but you have to declare it as such.
>>
>>51469687
That's only ugly syntax m8.
>>
>>51464666
>>51464720
ITT: Visual Basic and BASIC are somehow the same language

>>51464860
True. ZSH and CSH are both better than Bash and independently distinct enough to make Bash irrelevant in the present year of posting.

>>51464920
Which is why CSH was created.

That being said, Powershell is absolutely marvelous for this type of work.
>>
>>51469821
>that's fantastic syntax m8
Fixed that one for you there. The only debatable thing is the function definition.
>>
>>51469854
visual basic is just basic, but more visual
>>
>>51469687
avoid pointers and use a variant record (Pointers are rarely used in Ada)
type Matrix (row, col: Natural) is record
grid : Contents (1 .. row, 1..col)
end record
>>
>>51468171
learn Go
>>
Convert me to ada, /dpt/
>>
>>51470000
why did you waste quads asking about a defunct language?
>>
>>51470000
>programming language named after historical gold digger
No
>>
>>51470010
>>51470015
But it looks really cool and robust
>>
>>51469854
>True. ZSH and CSH are both better than Bash and independently distinct enough to make Bash irrelevant in the present year of posting.
yet most shell scripts are written for bash, because it's the default shell that won't be replaced anytime soon
>>
File: index.jpg (11 KB, 197x255) Image search: [Google]
index.jpg
11 KB, 197x255
>>51464580
Asked this in the other thread, but still want some thoughts:

Is this book still worth reading despite the outdated code examples / instruction? If so, why?
>>
File: black_shiba_inu.webm (717 KB, 640x640) Image search: [Google]
black_shiba_inu.webm
717 KB, 640x640
Ask your beloved programming literate anything.

>>51470000
It's the most over engineered programming language.
>>
>>51470034
JavaScript is also really cool and robust.

In the end, all that matters is how the code is written and the mindset of the guy creating the code.
>>
>>51470052
It is and they aren't outdated.
>>
Why is there no C++ compiler that let's you turn off features /g/?

ooc and nim look good tho.
>>
>>51470052
The standard hasn't changed much.
It's a good book.
>>
>>51470052
>Asked this in the other thread, but still want some thoughts:
You got like 30 replies, please calm your autism.
>>
>>51470059
>>51470069
should I learn APL instead then
or FORTRAN

they all speak to me
>>
>>51470052
favor c primer plus which is better written, modern, and more complete. the best would be to avoid c, to be honest.
>>
>>51470059
>Ask your beloved programming literate anything.

What's wrong with my A* algorithm.
>>51468133
>>
File: javaOneConference2k15.jpg (15 KB, 288x220) Image search: [Google]
javaOneConference2k15.jpg
15 KB, 288x220
>>51470000

ada, cobol, pl/1, fortran and all of the other 7000-360 era 'general purpose' languages are dead anon-kun.

Just accept Java. We all did. They even let you keep the piece of brain they take out.
>>
>>51470102
uint32_t search(
const uint8_t* map, uint32_t width, uint32_t height,
double* cost_lut, uint32_t* rev_path, double* f_costs, double* g_costs,
uint32_t* open_list, uint8_t* closed_list,
uint32_t start, uint32_t target
)
{
>>
>>51470125
That's not the algorithm though.
Thread replies: 255
Thread images: 30

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

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
If a post contains personal/copyrighted/illegal content you can contact me at [email protected] with that post and thread number and it will be removed as soon as possible.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com, send takedown notices to them.
This is a 4chan archive - all of the content originated from them. If you need IP information for a Poster - you need to contact them. This website shows only archived content.