[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: 39
File: secret saika butt fun.jpg (65 KB, 468x577) Image search: [Google]
secret saika butt fun.jpg
65 KB, 468x577
old >>51477701
secret saika butt fun edition!

Why aren't you part of the C & Lisp master race, /g/?
>>
First for C++! :^DDDD
>>
>>51482173
D is the best language
>>
File: ada.jpg (40 KB, 200x200) Image search: [Google]
ada.jpg
40 KB, 200x200
>>51482173
text editor + g(cc | ++) or ide?
>>
Friendly reminder that OOP is cancer and the only things worse than object-oriented programming are object-oriented languages.
>>
first for PHP

;^)
>>
SO…
what is the opinion of flwo based visual programming languages like blueprint and grashopper
>>
>>51482235
so long as you can write adult code too its fine
otherwise
into the oven
>>
>>51482220
>2015
>shitting about OOP while not programming with 'protein's
>>
>>51482235
where is GOTO;
>>
>>51482173
>draw a girl
>call it a boy
People will defend this.

Also, C a shit.
>>
>>51482282
>GOTO (x, y)
>>
>>51482235
Pointless. The real successor to simple text-based programming languages is syntax like Epigram.

https://en.wikipedia.org/wiki/Epigram_%28programming_language%29
>>
>>51482282
the white lines are goto's
>>51482279
so turing completness (ofcouse) and a descent stdlib is all you want. llvm bindings are icng ont he cak
>>51482300
still text based
>>
>>51482309
>still text based
Imagine an editor that let you manipulate the "LaTeX" syntax directly.
>>
>>51482323
yeah but still not much more than say mathematica or any other mixed media IDEs
but thanks for the link
>>
Concepts are shit and should not be in C++
>>
>>51482386
Why exactly? They just make the duck typing that you get with templates a bit more formal.
>>
>>51482173
>Why aren't you part of the C & Lisp master race, /g/?

But I am.

I'm building a language written in Objective C.

That language is a Lisp; it's called Valutron and features object-orientation and an algorithmic syntax called V-expressions which are recommended for use for writing logic code. (S-expressions are useful mainly for noting data.)
>>
>>51482386
C++ is shit and should not be in existence
>>
>>51482422
There are good parts of C++
Not so keen on the ++
>>
File: 1446332888264.png (711 KB, 1600x2162) Image search: [Google]
1446332888264.png
711 KB, 1600x2162
>>51482416
>Objective C
>>
Functional programmers here?

https://storify.com/realtalktech/why-functional-programming-sucks

Care to comment on this?

I'm learning C but trying to figure out if I should drop out of college and just focus on FP. I want to go into quantitative finance.
>>
>>51482446
realtalktech is an unsuccessful /g/ troll.

But FP isn't some fad you drop out of college to learn and make big bucks off of. It's just programming.
>>
>>51482446
Sounds like some butthurt OOPfag
>>
>>51482453
> realtalktech is an unsuccessful /g/ troll.

what makes you think it's a troll for sure?

I am strongly considering learning functional programming. I need someone to convince me other wise.

I have downloaded and bootstrapped GHC. I am about to send the email to my dean that I'm dropping out.
>>
>>51482496
>what makes you think it's a troll for sure?
Really?

>I am about to send the email to my dean that I'm dropping out.
Well, you're a troll too so what's the point?
>>
File: Consumption,Ethical,Capitalism.jpg (116 KB, 960x960) Image search: [Google]
Consumption,Ethical,Capitalism.jpg
116 KB, 960x960
>>51482437

No. Objective-C is good.

>>51482472
Object-orientation and functionalism are largely orthogonal concepts.
>>
>>51482300
That just looks like such a pain in the arse to do anything meaningful
>>
>>51482235
gj debugging your gaym buddy
>>
>>51482437
that's good advise ty
>>
File: 45623235.jpg (145 KB, 1600x1200) Image search: [Google]
45623235.jpg
145 KB, 1600x1200
>>51482517
>Objective-C is good
>>
>>51482523
Never used it but it looks like it would be phenomenally easy to step-through and debug
>>
>>51482219
ide
Don't be influenced by the unemployed people living in their mothers' basement
>>
>>51482582
which ide? visual studio is overwhelming.
>>
File: 34251425.jpg (87 KB, 409x285) Image search: [Google]
34251425.jpg
87 KB, 409x285
>>51482173
>language named after a speech impediment
>>
>>51482582
Employed, using vim and terminal. Writing Go for work, C and Lua for shitshengigles.
>>
>>51482586
i'd consider going to some pyladies meetups

great stuff they have

i am gonna go to one in IE next session and try some PUA
>>
File: OPM_THREADS_3.png (289 KB, 883x527) Image search: [Google]
OPM_THREADS_3.png
289 KB, 883x527
>>51482220
>>
>>51482586
>visual studio is overwhelming
care2share(how)?
>>
>>51482627
so many features, 2/3 of which i wont even use. i just like the autocompletion and build/run.
>>
>>51482281
protein?

OOP has basically no downsides

what's your alternative? Functional programming? Good luck with that
>>
>>51482634
Just ignore the stuff that's useless to you
The point of an IDE is to make you more efficient, so no need to worry about the stuff that you don't need/want
>>
>>51482634
>this particular ide is great, i really like the features every decent ide has
>>
File: kek.jpg (309 KB, 1000x1000) Image search: [Google]
kek.jpg
309 KB, 1000x1000
>>51482220
>>
>>51482634
So.. just use that stuff.
>>
>>51482644
>OOP has basically no downsides
Terrible locality (cache misses).
Overcomplicated designs.
>>
>>51482684
>overcomplicated design
Kek'd
>>
>>51482235
that looks very ineffective way to write a program
>>
>>51482416
>language written in Objective C
You mean the you are writing an implementation of the language in Objective C. Programming languages aren't really an efficient way to express a language spec.

Honestly though, use whatever you are comfortable with for now. You'll probably get more /g/-cred if you implement it in a Lisp though, and it might make for easier/interesting combinations of S-expressions and V-expressions, which is a feature I think you wanted. Dylan's earliest implementation was just macros on top of LispWorks, with the side-effect of Common Lisp and Dylan code working side-by-side. This was mostly lost when Dylan went self-hosting (written in Dylan), but there's still been some interest in bringing S-expressions back as an option for Dylan.

Do you intend to make Valutron self-hosting in the future as well?
>>
Reminder that data-oriented design solves the current biggest performance bottleneck, transfers between RAM and cache, and while it is based off procedural idioms, is easily done in functional languages

Meanwhile, OOP completely goes against the "grain" of optimal cache usage patterns
>>
File: 23921351235.jpg (80 KB, 384x472) Image search: [Google]
23921351235.jpg
80 KB, 384x472
>>51482684
>can't use OOP
>therefore OOP must be shit
>qed
>>
>>51482684
why OOP has terrible locality?
>>
>>51482702
It's done so that artists etc can add basic functionality to their props without having to molest a dev.
You wouldn't actually program your whole game like that.
>>
>>51482684
>Terrible locality (cache misses)
You are arguing concepts with implementations which is an obvious fallacy. Do people actually critique their own thoughts before they post them, or it all about being right instead of correct?
>>
>>51482717
Forces all fields to be next to each other in memory instead of spread out in a structure-of-arrays manner. If you need to loop through all the objects in an array, you end up with way more cache misses (each costing hundreds of cycles) because you're loading in unnecessary data.
>>
>>51482736
>which is an obvious fallacy
Please give the name of the logical fallacy. "He disagrees with me" is not a logical fallacy.
>>
>>51482740
Then don't be a fucknut and use objects containing unnecessary data with performance-critical code.
>>
>>51482634
been working on VS for a couple years now doing C... i'd say i use only a fraction of the functionality... much much less than 2/3
VS is just a colossal piece of software
a lot of the functionality in all honesty is useless crap though
>>
>>51482740
huh, If I am looping an array of objects, it is usually I am working on one object a time. So It is better if fields of same object is next to each other.
>>
File: 1446099110139.jpg (61 KB, 828x766) Image search: [Google]
1446099110139.jpg
61 KB, 828x766
>>51482740
muh precious unnoticeable ms's
>>
can I combine opengl and SFML and put them inside a gtk window?

like some kind of console emulators?
>>
>>51482673
>>51482651
i dont want to use such a big and slow program when im barely using any of its features tho.
>>
>>51482684
>>51482736

You literally can't get more compact or intuitive than OOP.

It's wrapping structs. Organized memory and permissions.

C++ is literally an extension of logic. It hasa no biases.

>>51482791
If you use Haskell yes, since you can use Monads.
>>
>>51482778
>it is usually I am working on one object a time
Good job fucking your instruction cache then.
>>
>>51482788
>it's 2015
Fuck off.

>>51482801
>I have no idea what a monad is but I'm going to bring it up to sound smart
>>
>>51482756
It was a false dilemma. Additionally your post is an appeal to ignorance. Even if I couldn't answer you, you are still wrong.
>>
>>51482793
Visual Studio can run as a daemon.

VS is in .NET so it's running the in the CoreCLR.

You know how you can turn metal into a "super conductor" if you freeze it?

That's what happens if you run a .NET application, it lets the bits and bytes and dots flow with 0 chance of corruption or slowness over infinite area.

this is how visual stido ui and stuff is so fluid and bug free. responsive.

so guys if you haven't tried W10 or C# yet, it's basically musical harmony - it's managed c++. it's like a symphony for a programming language

try it, you'll injoy the experience. i think youll like it
>>
>>51482829
And you just used the "Fallacy fallacy".
Good one.
>>
how do I delete my git repos?
>>
>>51482847
And you just fallacied the fallacy fallacy.

Good fallacy.
>>
>>51482852
you can't

they belong to github now
>>
>>51482852
$ rm -rf directory
?
unless you mean deleting the remote repo. depends on who's hosting it. github has a web interface and I don't think they expose options to delete or create repos from the command line.
>>
>>51482852
rm -rf .git
>>
>coding in C
>feels tedious as fuck
>feels like i'm almost just slowing myself down on little details and pitfalls of C
>coding in C#
>night and day
>smooth with no issues


why do people even like C in this day and age?
>>
>>51482814
yeah, thanks. data oriented design comes last for me when I try to optimize things.

Any way, I know you FP guys are bullshit because no FP language comes near close to performance of real programming languages. Enjoy your joke languages
>>
>coding in C#
>feels tedious as fuck
>feels like i'm almost just slowing myself down on little details and pitfalls of C#
>coding in C
>night and day
>smooth with no issues

why do people even like C# in this day and age?
>>
>>51482283
your code is a bit innefficient, it would work faster with the
draw girly boy

algorithm.
>>
>>51482871
>>51482872
I mean the one that is hosting github.
I have some really old shit.
>>
>>51482877
People are unproductive when they're doing something they have little knowledge of or experience with.
>>
>>51482877
>why do people even like C in this day and age?
exactly for the reasons why you're such a shit C programmer
gives control over everything
wanna be a retard and dick your own anus? C doesn't hold you back
>>
>>51482877
>>51482844

that's why i say c# is a beautiful name

it's like the Apple of programming languages

it makes me think of coldplay/u2 and how they really bring rock, love and peace to iTunes store.

it reminds me of this song:

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

i feel deep emotion when i hear this song.

it reminds me after i got out of a coma and lost my brother in war... and i used my money from it to take lessons in Visual Studio

My dreams
>>
>>51482907
what does C offers over C++?
>>
File: d.jpg (433 KB, 2300x1418) Image search: [Google]
d.jpg
433 KB, 2300x1418
>>
>>51482925
clarity

any programmer can understand what a C snippet does even if they don't know C
>>
>>51482925
syntax that doesn't stab your eyes with cancer sticks
>>
>>51482879
>data oriented design comes last for me when I try to optimize things.
DOD is an architectural choice, not an optimization you apply in post. Similar to multithreading.

>Any way, I know you FP guys are bullshit because no FP language comes near close to performance of real programming languages
I can see why you'd come to that conclusion, but the reality is that while there aren't any languages that focus on both FP and performance (by giving control over memory), while there are plenty of languages (including C++) that have manual memory management and support FP.
>>
>>51482907
Neither does C#, what's your point?
>>
>>51482901
>C#
>pitfalls
Come on, you aren't even trying. As a C guy you should be like an expert on pitfalls, and C# has almost none.
>>
>>51482952
He says that about FP because he doesh't understand the bigger, deeper truth

FP is more *logical*

Instead or *procedural* or *objectification* is cares about the core all:

Function

It takes a higher level of thought. Transhumanism.
>>
>>51482976
Can you stop making normal functional programmers look autistic? Thanks.
>>
>>51482943
I would write a code with function pointers or 'generic' C functions but I am too lazy.

if you are so deluded that you think C is easy to understand nothing I say can save you anyway.
>>
File: 1447303163787.png (15 KB, 917x1186) Image search: [Google]
1447303163787.png
15 KB, 917x1186
Been learning to program, made a small program to turn my input into a shitpost.

Ex: London =

L O N D O N

O

N

D

O

N


I'm using pyperclip to read off my clipboard, but I'm having trouble rejoining the string and copying it back into the clipboard. Any ideas?
>>
File: 123412341234.jpg (32 KB, 340x308) Image search: [Google]
123412341234.jpg
32 KB, 340x308
>>51482976
the autism is rising
>>
>>51482987
>write code with function pointers or generic C functions

What is difficult to understand about function pointers or void types?
>>
let's say I made a GUI editor for some images and plan to use json to save some information next to the picture.

how would json save a png?
>>
>>51483016
got a gif of that rising? Might be nice to watch
>>
>>51483017
nothing, if you know what those are. but "someone does not know C" would definitely scratch his head. It is not any different than more complicated things in C++
>>
>>51483034
In other words you want to save additional metadata with the image file? Such as what?
>>
>>51483066
some rectangles, it's for a 2D action game, so I need to save the frames hitbox data next to the images.
>>
>>51483063
That's the thing tho.
C's abstractions and quirks stop there.
With C++, the abstractions upon layers of abstractions DO NOT END. EVER.
If this wasn't the case, there wouldn't be a group effort trying to standardize what is considered Idiomatic C++.
https://github.com/isocpp/CppCoreGuidelines
>>
>>51482901
... and there are a lot of C# shills in /dpt/
you have to wonder why
>>
>>51482446
Even though all the points that this article makes about functional programming are true, the guy who wrote it is still a Luddite trying scare people away from learning a way of programming that will expand and improve our capabilities of dealing with concurrency and data processing. His points are:

>too many in fp think they are 'experts' but in reality dont really understand fp beyond a superficial depth
this is true, but over-enthusiasm is not a reason to block acceptance of an advanced technology. People who want to adopt fp have to face the fact that it will take serious training and not just thinking you 'get it' by reading a few books on fp languages

>too much noise and not enough signal because most people in fp are noobs who drank too much kool-aid
this is true, a lot of people sold on the idea of fp are just kids who are hooked on the concepts of pure functional languages but have never actually programmed anything and want to work on projects using fp languages thinking they can just pick it up as they go along and dont realize they are completely in over their head

>treats design problems like universal truths, does not bend to concepts that cant be expressed as a mathematical equation
This is a good thing, this is why fp languages excel at problems that would become an incomprehensible mess in OO languages. It does take a lot of proper training and education to learn fp at a level where you can program like this

>it is more difficult to design, will take more time, there are more unknowns, so deadlines wont be met
programming in fp languages is objectively more difficult, problems in fp dont modularize in the same way as OO, its more of a bottom approach that requires programmers to have a fundamental understanding of each others code from the ground up

>it takes more time to plan out preliminary design
it takes more preplanning to come up with a design in a fp language, it takes more group think. fp will never be a quick solution
>>
>Open source C#
>Open source Visual Stuio

Is C# gonna get gud soon?
>>
>>51483097
>you have to wonder why
is that rhetorical?
>>
is this a good FP intro?
http://reactivex.io/learnrx/
>>
>>51483097
They're all being paid by Microsoft t᠎bh
>>
>>51483095
So what? If you want a code that can be read by a 5th grader, you can throw half the language away and write it in any language. Including C++. C++ offers everything C does plus more. Most of us wants productive language, not one that is just above pseudo code and a standard library that just abstracts OS slightly
>With C++, the abstractions upon layers of abstractions DO NOT END. EVER.
that is a good thing anon.
>>
>>51482704

This early on it's actually implemented as a reasonably conventional mini-Lisp. V-expressions are prototyped right now as reader macros.

Having said that, yours is a good idea. I can reimplement read in the Lisp source - without it even needing to be metacircular, even, as the read function has already been parsed. This opens the path for something fun, like adding support for additional productions and rules to the parser at runtime.

I will have to investigate this possibility further. It seems that 'parsing expression grammars' are a popular technique for this application. If nothing else, it makes self-hosting come within closer grasp.
>>
>>51483113
This is a good post.
>>
>>51483083
perhaps just save the hitbox data with the same name as the image but with a different extension or in a different directory (eg. img/a.png, coll/a.json). Then just have your resource/asset loader know about this.
>>
>>51483116
Already fucking top-notch
>>
>>51483083
>so I need to save the frames hitbox data next to the images.
you really don't. put it on another file
>>
>>51483057
Unfortunately no, but you can probably get a similar effect if you pour vinegar on acne.
>>
>>51483125
>Rx
That's specifically about functional REACTIVE programming. In Javascript, no less.

Real World Haskell is probably the best place to start.
>>
Is Dart still a thing?
>>
>>51483223
no, despite javascripts scope problems, it is still the best tool for the job. All the alternative langauges that try to replace javascript by bringing in static types and class based OO have all crashed and burned

Javascript's prototype OO is brilliant (I mean that in an american way, not a british way) and allow js to utilize a lot of functional features like high order functions and lambdas seamlessly without all the boilerplate that would be required in a regular class-based OO language
>>
>>51483377
es6 has classes
you're dumb
most functional languages use classes
they work fine
>>
>>51483401
Type classes are vastly different from OO classes. Type classes are really just function/operator overloading.
>>
>>51483401
there is too much mindless chest pounding going on in this thread about class-based OO in this thread, you dont deserve a response, if you think classes are 'just fine' for javascript, then fine, those es6 class features are there to shut people like you up
>>
can I use a try/catch as simple check to make my java app to not crash if I'm trying to use a null object?

like nothing happens if the object is null?
>>
>>51483496
you shouldn't. instead check if object is null.
>>
>>51483496
just add a check to make sure the object isn't null - a simple if statement.
>>
>>51483496
>>51483539
>>51483549

>tfw your language doesn't have monads to check null for you
>>
File: 1094.image2.gif (3 KB, 313x213) Image search: [Google]
1094.image2.gif
3 KB, 313x213
>taking CE at a top 20 uni because I got the test scores for it
>have terrible procrastination problems but scraped by in HS because I was OK at bullshitting homework and essays the year prior
>group projects come
>nobody teams up with me
>procrastination strikes
>cant exactly bullshit a multi-day group project like I can math problems or an essay
>grade bombs hard, get a literal F for the course just from the late projects alone
>feel like I'm complete shit at CE and programming
>change majors to IT so at least I'm still in a major that sorta makes money (rev up that SQL)

>IT offers a CE elective this semester
>wanna try my chops at programming again
>got prescribed Adderall in the meantime
>use it while I'm programming
>suddenly programming is fun
>before it felt like ramming my head into a brick wall, now it feels like Professor Layton
>previously incomprehensible topics like I/O, multi-threading, servers and clients, and even pathetic shit like static variables suddenly make sense to me now
>realize that I'm not innately shit at programming
>realize that programming is extremely fun and I love it
>ive missed way too many prereqs at this point to transfer back into CE so theres really no credit to learning more of this stuff, but I just do it for fun now

Sorry for the blogshit, but I just finally finished understanding pointers and I wanted to share how great this feeling is.
>>
>>51483755
how long did it take to understand what your pic says with 3 lines of code and a diagram?
>>
>>51483755
>adderall
Fucking doper, you can't program for shit
>>
>>51483755
>>previously incomprehensible topics like I/O, multi-threading, servers and clients, and even pathetic shit like static variables suddenly make sense to me now
>>realize that I'm not innately shit at programming
>can't understand basic topics
>has to use drugs to understand them
you're dumb as fuck.
>>
>>51483798
Never said I could in the first place, but at least I have a new hobby now.
>>
File: 1446253697985.jpg (12 KB, 224x199) Image search: [Google]
1446253697985.jpg
12 KB, 224x199
I'm a NEET who has no clue about programming, but I'm told learning it is a good way to potentially get a job in the future.

Where's the best place to start? What language should I learn first, as a beginner?
>>
>>51483922
APL
>>
>>51483922
Swift desu sempai
>>
>>51483922
C++, C# or D
>>
>>51483932
>>51483951
What are the differences between APL, C++, C#, or D? Understand I'm going in this completely unaware of how anything is or works.
>>
>>51483971
APL is pure sex.
>>
>>51483922
you won't get a job. trust me
>>
>>51483922
You won't be getting a job, don't even waste your time if you don't have a degree.
>>
File: 1440436831757.jpg (115 KB, 1012x675) Image search: [Google]
1440436831757.jpg
115 KB, 1012x675
>>51483980
Ok? What is it that makes it so? What's makes it different from the others? How much easier is it to learn/use than the others, and is it a good starting language? How much use does it get still, and would getting a job from knowing it be feasible?
>>
File: image001.jpg (236 KB, 1624x626) Image search: [Google]
image001.jpg
236 KB, 1624x626
>>51484017
I'm kidding, stay the fuck away from APL unless this is appealing to you.

C is a really good language to start with.
>>
>>51484030
It's more beautiful than I ever imagined
>>
File: ss+(2015-11-22+at+08.10.18).png (93 KB, 181x280) Image search: [Google]
ss+(2015-11-22+at+08.10.18).png
93 KB, 181x280
>tfw stuck in a programming course centered around Processing
I hate everything.
If I switch my major to InfoTech, will the course still matter?
>>
File: vlcsnap-2015-11-13-16h56m52s881.png (693 KB, 1280x720) Image search: [Google]
vlcsnap-2015-11-13-16h56m52s881.png
693 KB, 1280x720
>>51484030
Good lord. I'll stay away from APL then.

How is C compared to its ++ and # variants?
>>
>>51484043
C is pure sex.
Stay away from C++ and C# unless you hate yourself.
>>
>>51484043
C is extremely simple and, forgive the cliche, does things the way a computer really works. So it's a bit unforgiving, but not daunting at all and will teach you a lot of important things.
>>
>>51484043
C# is not a variant of C, you dumbo
>>
>>51484043
If you learn C++, you will learn C along the way
With C# you will learn 30% of C and all of Java
>>
>>51482879
OCaml has been around the same speed as Java for a while (although Java's recently jumped ahead) and is still faster than JavaScript, Ruby, Python, et al by at least an order of magnitude. Haskell is starting to catch up and is now faster than OCaml in some bench marks. Haskell written to be like C can get even faster than that. SML compiled with MLTon can easily reach C-like speeds. Even Scheme and other Lisps can be extremely fast when dealing with symbolic computations. Basically, it never really is as simple an answer as "it's slow" because every language has something it can do well and the code can always be written to be faster (even if that means making it not entirely match up with the paradigm).
>>
>>51484060
>>51484059
Alright, I guess I'll check out C. Any idea of a good site that would help me learn it?

>>51484067
Ok, anon, sorry for mixing them up.
>>
>>51484059
c's not a good idea for a first language - it's not difficult, but it's more punishing to mistakes.
>>
>>51484093
>but it's more punishing to mistakes
That's a good thing.
>>
>>51484091
If you're learning your first language, it doesn't matter what language you pick, you're trying to learn the basic concepts of programming (variables, loops, functions, code reuse, etc)
Once you have those down, you can learn any language easily because when it comes right down to it, most languages are based on C and their syntax is almost identical.
The only real difference between languages is their standard libraries.
>>
A programming-themed hentai game could be a good way to teach programming...
>>
>>51484090
What's the status of parallelism / concurrency in OCaml these days?
>>
File: SICP VN2.png (783 KB, 802x640) Image search: [Google]
SICP VN2.png
783 KB, 802x640
>>51484144
I wouldn't mind a VN, but why a porn game?
The programming part would just be a lame gimmick.
>>
The fuck is -(2^wordsize-1)? I've been procrastinating for weeks trying to avoid this shit.
>>
>>51484169
Not a VN. A game. You proceed by implementing routines conforming to a specified interface for fucking sloogs. Or something. Each girl is a different programming language.
>>
>>51484177
inverse value of 2 to the power of wordsize minus 1
>>
>>51484177
2^(number of bits) is the number of possible combinations

If you want positive and negative, you halve that
0.5 * 2^(number of bits)
a half is 2^-1, so this simplifies to this:
2^(number of bits - 1)

so the minimum is - 2^(number of bits - 1)
normally you want 0, so you subtract 1 from the maximum and get 2^(number of bits - 1) - 1
>>
>>51484123
So where would I go to learn those? I know I can just google it, but I'm just wondering if there's a site you'd personally recommend before going off on the safari.
>>
>>51484221
There are 2 kinds of programming textbooks.
The short, concise ones designed to teach you a new language, and the giant textbook-size overbearing ones that go into basics and even help you install your first compiler if you're computer illiterate.

You want the latter.
I suggest Head First C.
>>
>>51482220
I have limited knowledge of Python and Java, what exactly is wrong with OOP, it's all I've ever known.
>>
>>51484257
>it's all I've ever known
Therein lies the problem.
>>
what technical skills someone should have to be a super master programmer
>>
>>51484266
programming
>>
File: 1446434738740.gif (3 MB, 250x188) Image search: [Google]
1446434738740.gif
3 MB, 250x188
>>51484243
Well, I got nothing better going on. Guess I'll take the plunge.
>>
>>51484266
cpu cache miss minimisation
>>
>>51484266
you have to post in /dpt/ and tell other people that they are retards
>>
>>51484162
Here's the repository for multicore support right now: https://github.com/ocamllabs/ocaml-multicore. It will be incorporated in the next release according to INRIA. Pretty much good enough for production at the moment from what I've heard.
>>
>>51484144
Why play that when you can do this
store.steampowered.com/app/375820/
>>
>>51484524
>scratch
lel, casual.

http://store.steampowered.com/app/370360/
http://store.steampowered.com/app/400110/
>>
What's a good C++ compiler or IDE I can use on windows that is very close to a linux terminal in terms of command line arguments? I'm not sure code blocks is working right with my program, but it runs fine on linux.

As a side note, does anybody want to teach me how to dual boot Ubuntu onto my laptop? Will it be as easy as choosing an OS on boot?
>>
>>51484015
>>51484011
>shit programmers detected
>>
you can pass through basic http authentication by doing http://{username}:{password}@{url}, but how do you do this if my password has an @ in it?
>>
>>51484564
MinGW is GCC for Windows. Do yourself a favour and use MinGW-w64.
>>
>>51484676
url-encode it? @ = %40
>>
>>51484676
I don't think >>51484791 will work
most implementations allow you to use quotes instead, e.g.
http://"user:pass"@url
>>
>check craigslist for software jobs
>everyone asks for 2+ years experience in their specific industry

Fucking hell.
>>
>>51484043
learn python for your starting language, ya dingus
>>
File: Frozen.png (2 MB, 1024x1024) Image search: [Google]
Frozen.png
2 MB, 1024x1024
Is someone around who would like to help me with Ren'Py and Python?
I'm currently creating a parody porn game of Frozen and I want to have different systems implemented (like an inventory system, changeable outfits, etc.)
The thing is, art, writing and music are covered (we actually have two artists right now), but my coding is very 'unclean' and delays the project quite a bit.
Drop me a mail if you are interested in helping. [email protected]
>>
>>51485281
You'd be compensating me for my time, right?
>>
>>51482586
Emacs.
>>
>>51485281
>needing help with the RPGMaker of VN engines
>>
>>51482943
>any programmer can understand what a C snippet does even if they don't know C
http://ioccc.org
>>
>>51485356
>international obfuscated c code contest
you were dropped on your head as a child, right?
>>
>reading directx example
>constantly uses different methods for passing addresses such as:
ComPtr<ID3D11Device> device;
&device
device.Get()
device.GetAddressOf()


i mean what the fuck?
why does &device return a pointer to the internal pointer and not a pointer to the ComPtr object itself?
>>
_
/ ++
| ++
\__
>>
File: IMG_20151123_104726~2.jpg (3 MB, 2302x2302) Image search: [Google]
IMG_20151123_104726~2.jpg
3 MB, 2302x2302
Programming right now to be honest
Whats wrong whith this shit i hav a exam right now and idk whats wrong.
>>
>>51485484
possible error on line 2, var should not have semicolon
>>
>>51485508
Pascal desu
>>
>>51485508

Aaaaah glorious Pascal. I fucking LOVED Turbo Pascal back in the day. I spent hours and hours writing hand-crafted assembly language routines (thanks to TP's excellent embedded asm features) and running them through TP's profiler.

To this day, I've never had a profiler as good as the one in Turbo Pascal. Hell, does Visual Studio even have profiling, outside of the bullshit "Enterprise" edition? No wonder so many Windows programs are slow as fuck.

>tfw the programming you did in high school is kind of superior to anything you've done professionally
>>
>>51485508
>>51485520
meant to quote this
>>
Let's talk qt:
What's the difference between the free one and the paid one?
What's the difference between qt quick and qt widget?
>>
>>51485508

What's "redlin"? Surely it's readln. And doesn't it take any arguments?
>>
>>51485508
Redln to be honest
>>
>>51485508
I don't get it.
Why do people post a "screenshot" done with their cell phone?
Why do they then ask "what's wrong"? Isn't there any more specific thing? Like "the compiler throws errors X, Y, Z but I don't see why"?
Why are people this stupid?
>>
>>51485648
He's got an exam right now?
>>
File: fixed.jpg (782 KB, 1239x1236) Image search: [Google]
fixed.jpg
782 KB, 1239x1236
>>51485508
fixed your code
>>
>>51485654
That would be an excuse for the first question I asked, not for the other one.
>>
>>51485535
Any1?
>>
Does c++ have macros like lisp?
>>
>>51485830
no
>>
>>51485830
C++ has macros like C
D has mixin, which is basically sex
>>
>>51485830
It has templates. You can build a lisp with templates if you want.
>>
Anybody has that python logo with fat guy lying on pillow?
>>
>>51483223
>>51483377
>>51483401
just use typescript
>>
File: python.png (45 KB, 800x800) Image search: [Google]
python.png
45 KB, 800x800
>>51486080
nvm, found it
>>
If lisp is so brilliant why does nobody use it?
>>
Wait so.. Functors in C++ are just called that by the community? It's not part of the standard or anything, just a class with overloaded operator() ?
>>
Anyone here have some experience with QML and/or Qt quick ?
>>
>>51486211
Because CL is a bloated piece of shit that requires extensions for every fucking thing.
Also no decent GUI support in IDEs, no IDEs that aren't Emacs(-clones), ugly to deploy (executables are essentially a copy of the current runtime, meaning the binaries are 50 MB and up).
>>
Sow do I into contributing to an open source project? Seriously.

I'd like to practice using git and programming while contributing to something, but how do I pick a project and actually help if I'm not a wizard-level gentooman (I shave so I never grew UNIX beard)?
>>
>>51478942
don't use a non-standard keyboard layout. get one with macro keys or get an extra peripheral
>>
I learned emacs keybindings and they're really comfy for navigation because I don't need to move my hand to the arrow keys or home keys. Is vim like this too? I'm asking because I want to use visual studio and it doesn't have an emacs plugin but it does have a vim plugin
>>
>>51482173
actually i am, lol
>>
>>51486354
just browse Github I guess
>>
>>51486463
Sure, thanks. I just wondered how others picked their projects - based on language, functionality, size of the project, number of contributors etc.
>>
>>51486544
I also think of doing that
>>
>>51486544
>number of contributors
the first thing you want to do is check if the project isn't dead.
many repos on github have pull requests that haven't been merged and/or commented on in years.
no point wasting your time on something like that.
>>
I'm working on a game in C++
>>
>>51486594
Thanks. I'll pay attention to that.

>>51486607
What kind of a game?
>>
for how long does the "get good grades first, learn later" strategy holds up?
>>
File: shiggoy.jpg (116 KB, 723x960) Image search: [Google]
shiggoy.jpg
116 KB, 723x960
>>51482801
>binding structs with functions
>>
>>51483755
>needs the pharmaceutical jew to understand pointers
lel pleb, i just read k&r and understood it instantly. finished the whole section, along with exercises, in a day at most.
>>
>>51483755
>pic
>hard
this is what ADDtards actually believe
>>
>>51486969
WOW, what a boss
>>
>>51484257
java gave it a bad name
and retards never know how to implement it correctly
Im looking at you lecturers who barely know how to code
and god damn students after taking cpsc101
>>
>>51485689
Sick meme to be honest
>>
>>51487274
What are mistakes often make by lecturers teaching OOP.
>>
You faggots don't even know C (as demonstrated multiple times in /dpt/ threads), one of the simplest languages in existence and you talk programming? You even dare talking about C++? When you haven't even grasped C?
Get back to 9gag, losers!
>>
>>51487280
see:
>>51481511
>>51481539
>>51481611

and "professionals" often overuse inheritance and make spaghetti code out of many different little classes that could have been combined into just one or a few classes. lecturers often don't even get to that point, they just teach their retarded cargo-cult shit that they don't even understand.
>>
File: screen.png (65 KB, 718x604) Image search: [Google]
screen.png
65 KB, 718x604
Hello /g/
i'm looking for ideas and contributors to my project:
a system monitoring daemon which listen sockets, so remote system control is avaiable soon!
check it out on:
https://github.com/AlessandroSpallina/JASM
give me feedback bro :)
>>
>>51487275
thanks i love to meme
>>
>>51487406
Oh, I've fallen for that before.
>>
>>51485508
>redln
it's readln
You don't ask for the radius before calculating anything, you just type the question and immediately calculate v with a preset (depends on the version) random r.
You don't calculate s.
>>
When will we have a C++ equivalent to `pip install` or `npm install`?
>>
>>51487510
>>51485508
also "end" is the only syntax marker that goes with a semicolon. var and begin don't have one.
>>
>>51487526
>what is apt-get install
>>
>>51487536
It's not recognized as an internal or external command, operable program or batch file.

Also, it's Debian only.
>>
>>51487526
C++ is getting pythonic import statements in an upcoming standard. So that's a yes and no.
>>
>>51487554
I just looked that up. It seems like the big benefit is to do away with header files and pull the declarations right out of the source files. With the added benefit that you can lump a bunch of source files together in the same module, exposing all of their declarations at once.

Modules can't expose macros, though.

If I knew D any better, I'd probably say it's more D-like than Pythonic
>>
>>51487549
>It's not recognized
tough shit; maybe choose a better environment if ease of development is important for you?
>it's Debian only
works for me™
>>
after 3 hours of fucking around with vertexbuffers, inputlayouts, shaders, constant buffers, indexbuffers and whatever the fuck complicated shit i cant remember, i can finally draw a triangle on my screen
thanks directx
>>
>>51487697
you're welcome :)
>>
>>51487697
So it's exactly like OpenGL?
>>
how do I take a bunch of sprites and generate a spritesheet?
>>
>>51487804
https://www.codeandweb.com/texturepacker

There's free alternatives that are fine too. I forget the names of them though.
>>
Has anyone here actually received monetary compensation for producing a functioning program in C or lisp or any of the other meme circlejerk languages???

Just curious.
>>
File: 1365497420681.png (23 KB, 800x600) Image search: [Google]
1365497420681.png
23 KB, 800x600
Reminder
>>
>>51487874
but I need to also pack some metadata info.
>>
what's the best intellisense for C++?
>>
>>51487901
I got about €70 in donations for something I made in F#

>>51487934
like what?
>>
How do I keep a map of functions in C++? My current code is below. It says it doesn't know what kind of thing foo is when I try to insert it into the map.
// .h file:
void foo(){};
typedef void(*funcPntr);
map<string, funcPntr> functions;

// .cpp file:
functions.insert("foo", foo);
>>
>>51487951
bunch of info about the frames, it's for a 2D action game.
>>
>>51487972
all the names of the sprites and their coordinates in the sprite sheet get stored in a separate file.
>>
>>51487970
Aren't these two the same?
typedef void(*funcPntr);
typedef void *funcPntr;


Did you mean:

typedef void(*funcPntr)(void);
>>
>>51487983
I know, I'm planning on using a json to save the metadata.

wonder how easy is to implement a sprite sheet.
Thread replies: 255
Thread images: 39

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.