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



Thread archived.
You cannot reply anymore.



File: OOP.jpg (140 KB, 1200x598)
140 KB
140 KB JPG
What are you working on, /g/?

Previous thread: >>63728905
>>
>>63732668
Hey ladies
>>
>>63732668
What's the best book for learning C#?
>>
so much hate against OOP...
right or wrong, can anyone logically explain the reasoning behind this?
>>
>>63732683
CMake modules are dynamic libraries that use dlopen or something instead of being linked in. Regular modules are a far superior alternative to headers and translation units (they get rid of all the duplication, they're not literal text replacement, they're often order independent).
>>
>>63732697
It's a bad paradigm, that encourages bad practices , little ducky.
>>
>>63732716
yeah, you say it's bad, but elaborate, please.
>>
>>63732697
you can literally go to google and type "OOP bad" and get a million explanations
>>
what is the best database for a novice to learn
>>
>>63732697
The rationale behind that image is that the person who created it is a shitty programmer who writes garbage brittle spaghetti code that can't be maintained or modified.
>>
>>63732733
yes. that's why it's funny. but unrelated to the question.
>>
>>63732697
http://www.yegor256.com/2016/08/15/what-is-wrong-object-oriented-programming.html
>>
>>63732742
What question?
>>
>>63732731
PostgreSQL.
>>
>>63732697
No, but I can explain the reasoning behind why you are asking this.

A: you are asking this as a person who does not understand 4chan internet culture.
B: you write mostly in some OO lang and you wish that people wouldn't make fun of you for it
>>
>>63732728
>but elaborate
Where do you want me to start?
Writing code intended to fail?
Mutation everywhere?
Everything being a subset of everything?
>>
>>63732750
thanks
>>
go is a pile of poo
>>
>>63732742
>>63732746
Oh, you're asking for the rationale behind the OOP hate. >>63732745 is a good start.
>>
>>63732763
None of that is part of OOP or encouraged by OOP. You're either confused or just trolling.
>>
>>63732697
Pure OOP enforces you to find over-complicated patterns, bloat and boilerplate for working around using pure OOP. This is where most of the OOP hate comes for. There is nothing wrong with using some OOP, where appropriate, together with mostly procedural code.
>>
OOP is not bad because nobody can actually say what OOP is.
>>
>>63732774
why
>>
>>63732776
>>63732745
all i'm seeing in this link is more hate. but no real substance.
all opinion and conjecture.
>>
Procedural programming is for amateurs, OOP is professional standard and practice. The problem with procedural programming is that, well, you cannot write procedural code well, because there's just no way to write good procedural code, it will always be spaghetti code however hard you try. Even if you write in a procedural language like C, a good program will appear modular, encapsulated and actually OO-like(just without classes and objects as C does not support these).

Procedural programming is good and only good for absolute newbies learning fundamental coding concepts(such as variables, conditionals, loops, etc), since starting directly at OOP can be tough for many non-coders. However, it's a bad habit that every good programmer should get rid of, or better, never develop in the first place.

To summarize, Procedural code = Amateurish, Spathetti, non-reusable and poorly designed/architectured code. Stop writing procedural code if you value your career, especially if you write in a language that supports OO natively, such as Java and C#.
>>
>>63732774
Go is a good scripting PL replacement.
>>
>>63732780
The third point is quite literally the essence of OOP. POO encourages mutation which creates a house of cards which requires extensive error handling.

Now are you a naive duck or just shitposting for (you)s
>>
>>63732810
If you want some substance, just look at any non-trivial OOP code.
>>
>>63732796
You're taking Java for OOP.
>>
>>63732774
Compared to what?
>>
>>63732821
I wish people would understand that mutation doesn't have to be side effecting imperative trash.
>>
>>63732816
(You)
>>63732833
I just said about mixing procedural with OOP, so no I'm not.
>>
>>63732816
this

also, OOP is only bad if the programmer is bad.
>>
>>63732821
http://www.yegor256.com/2014/06/09/objects-should-be-immutable.html

1/10 for making me believe for a split second you were being serious
>>
>>63732816
procedural code with functional elements > OOP everywhere
>>
>>63732848
>I just said about mixing procedural with OOP, so no I'm not
Are you serious? Java is an unholy OOP+procedural mix mess!

You're posting children's cartoons so I can only assume you're underage and just straight dumb.
>>
>>63732844
Next to no one writing POO is thinking about immutability. Immutability is still scoffed at as some FP nonsense by many people.
>>
>>63732850
I like that you have to argue with random articles written by other people.
>>
>>63732851
>procedural code with functional elements and compositional OOP elements > OOP everywhere
FTFY
>>
>>63732889
As opposed to posting no arguments but only bold but false statements like you're doing?
>>
>>63732816
Go home Pajeet. You're drunk.
>>
>>63732874
>it's another episode of functionaltards storm /dpt/ to thrash OOP because they're buttmad over the fact no one in the industry takes their little toy paradigm seriously and it's used by virtually nobody outside of academia
>>
>>63732668
What's wrong with having normal functions in an OOP language?
If it doesn't require any state and is useful for all kinds of objects, why would I implement it as a method?
>>
>>63732729
>>63732745
>>63732796

Probably true, sounds reasonable but say I have e.g. this:

class ApiWrapper() {
int _authToken;
void authenticate(str username, str password);
Resource get(str resource_name);
Status post(str resource_name, resource Resource);
}


Is there a better non-OOP to hold structures like this that consist of both data and methods exclusive to itself?
>>
>>63732897
You haven't disproved my points, and are only helping them.
Show me a largely immutable code-base in C++,Java or any other POO language with no explicit exception handling that uses OOP appropriately. Good luck.
>>
I seems /g/ does not have a deep understanding of POOP
>>
>>63732864
Java is hardly procedural. You can't decently decouple data from behavior.
>>
>>63732919
http://www.yegor256.com/2015/03/09/objects-end-with-er.html
>>
>>63732874
I'm not talking about immutability, I'm talking about mutation with something like linear types that doesn't break any nice mathematical properties.
>>
>>63732933
>Show me a largely immutable code-base in C++,Java
The article I posted does precisely that. But you didn't read it because all you care about is trolling.
>>
>>63732944
>They are not classes, and the objects they instantiate are not objects. Instead, they are collections of procedures pretending to be classes.
Shouldn't that also include -actory then?
>>
>>63732938
>Java is hardly procedural.
You're joking, right?

You've probably never used the Java class library. It's riddled with static methods.

Please don't talk about a language you know nothing about.
>>
>>63732972
Fine. I've never used Java.
>>
>>63732983
We can tell.
>>
>>63732958
that's not a code-base it was just an article.
But i realized that's the russian who make the cactus OOP book.
So you're probably that Kotlin shill, which explains the POO obsession
>>
>>63732944
I'm looking for practical (and better) replacements for the above not some anthropomorphist story that has a hard time applying to any real code
>>
>>63732697
One word: NEETs. It's easy to talk when the biggest project you've done is fizzbuzz. Would love watching these guys taking care of banking software, for example.
>>
>>63733000
OOP is perfect for banking software
>>
On a different note, does anybody have a good resource on unit with go? Out of the official docs, I can only find the package descriptions, which doesn't help much. What are some good ways to mock out things like databases and web requests?

>inb4 using go
I'm using it for one relatively small project in order to see what it's all about. So far my impression is that it's a neat language with interesting features, but assumes way too much and does way too much handholding. The project is also simple enough that I haven't really sumbled badly on anything like missing generics.
>>
>>63732668
which book is this from?
>>
>>63733031
>unit with go
Unit *testing
>>
>>63733036
http://a.co/1CGYeIU
>>
>>63733113
>http://a.co/1CGYeIU
thanks!
>>
>>63732668
c++ is the greatest language of all time
>>
>>63733131
C++ is at least 10 times as complicated as it needs to be
>>
>>63732933
>Show me a largely immutable code-base in C++
Don't be silly. Immutable designs don't suit C++ at all.

C++ as a language is designed for doing some version of OOP without sacrificing too much runtime performance. Immutable data structures come with substantial performance costs as a side effect, and therefore have no place in most C++ codebases (outside some niche exceptions).

Appending to an existing vector data structure
my_vector += other_vector
is more efficient than constructing an all-new one based on two inputs and then throwing away the first two,
my_vector = my_vector + other_vector
. As long as this is the case (forever and always), immutable vectors have no place in typical C++ applications. const variables do, though.
>>
>>63732690
if you're newish to programming
http://www.robmiles.com/c-yellow-book/

Otherwise, "C# in Depth" or "C# 7.0 in a Nutshell"
>>
Why are functional shitters so obsessed with immutable code?
>>
>>63732697
OOP is vague, and will be defined in such a way that suits the purpose of whether someone hates it or uses it. Most people understand that like any other paradigm, there are some "OOP" elements that can help, and you can also go overboard with dogmatic extremism (which also applies to NEETs who screech as soon as they hear "object").
>>
>>63733497
autists don't like it when things change
>>
>>63733497
>no more obscure mutation bugs
>RTEs dramatically reduced
>makes your code-base more enjoyable to maintain, as well as easier to extend/refactor
>>
>>63733497
To be fair, it's nice being able to guarantee things not being fucked with as you pass them around. I'm pretty excited about the "in" parameters new to C# in this regard.
>>
>>63733527
>>no more obscure mutation bugs
I don't know what you're talking about.

Perhaps you should make your heart immutable.
>>
>>63733539
You should use Ada instead.
It had that for ages.
>>
>>63733541
Most bugs that aren't logic bugs are obscure mutation bugs.
>>63733557
D as well.
>>
>>63733565
>Most bugs that aren't logic bugs are obscure mutation bugs.
And what, the solution is killing performance?
No thanks.
>>
>>63732916
It's obviously bullshit. By that logic, a Sin() or Abs() function should be called on an object.
>>
>>63732745
>people ask him
>he has no answer
>post quotes
>>
>>
>>63732697
OOP lack fundament mathematics,making everybody had own version OOP.

http://www.math.mcgill.ca/triples/Barr-Wells-ctcs.pdf
>>
>>63733581
Radians(0).sin()
Integer(10).abs()

makes sense to me
>>
>>63733581
>By that logic, a Sin() or Abs() function should be called on an object.
float a = 1;
float b = a.sin();

What's the problem?
>>
>>63732690
Head First C#
>>
>>63733609
OOP hate is a meme. Even hard real-time systems such as Mars rovers are written with parts in OOP and they're far more critical than any of the worthless software OOP haters work on. These threads (board) are useless for any serious programming.
>>
>>63732668
utility class like water, electrical etc classes at college?
>>
Is ObjectiveC any good if you're not a macfag?
>>
>>63732668
>the std libraries are bad practice
lol
>>
How do I stop being mediocre and start being good
>>
>>63733810
if you want to dabble around in oop just like use smalltalk its fun
>>
Can two symbols overlap in object code?
>>
>>63734090
No, I just want a fancier C.
>>
>>63734083
Find an ambitious project and fail until you git gud.
>>
>>63734158
The first version of objective-c was superset of C but objective-c 2.0 added gc.
If you want C with classes try ec or vala, though gnome said they won't continue developing vala.
>>
>>63733557
>>63733565
Ada and D don't have many other things that I need from C#, though. And even things that might technically exist don't have anywhere near the first-party tooling and community support.
>>
>>63732821
https://docs.oracle.com/javase/tutorial/essential/concurrency/immutable.html
>>
CLOS does POP best.
>>
>>63732668
>What are you working on, /g/?
Porting HTML rendering from Go and TypeScript to C++.
>>
>>63733516
kek
>>
>inherit a class in sepples
>supper class functions "are not accessible"
I miss java
>>
>>63734363
why did you switch to the inferior c++?
>>
>>63734363
t. moron
>>
File: maxresdefault.jpg (356 KB, 1920x1080)
356 KB
356 KB JPG
>mfw cmake
WHAT FUCKING MONSTER THOUGHT THIS WAS A GOOD IDEA?
>>
>>63734370
my mom forced me. she said:
>if you dont stop coding in java and start using c++ you dont get any lunch, joscher
>>
>>63734385
C++ people.
>>
>>63734392
You fucking tool. If you are under 18 she has to provide you, sue her.
>>
>>63732821
The essence of OOP is simply:
(i) encapsulation
(ii) polymorphism
(iii) inheritance
(iv) abstraction

At what point was mutation expressed or implied? Either explain, or hide in shame.

Sure, many OO languages permit and encourage extensive mutation, but I do not see how that is an inherit part of OOP.
>>
>>63734158

I want a C that it's impossible to write buffer overflows in
>>
I did a thing https://gitgud.io/chiru.no/chiru.no/blob/master/index.php
>>
Better C when?
>>
>>63734745
Never ever, because Cniles think C is perfect.
>>
Are there any decent X11 bindings for D?
The Deimos one seems abandoned and doesn't even build.
>>
>>63734766
Wait are you trying to say that D doesn't have trivial ffi to C? LOL
>>
>>63734781
I'd like something a little bit comfier than calling C functions directly.
>>
>>63734304
Why would you go backwards like that?
>>
holy fucking CHRIST is github awful. thank god i have avoided using this website for the first 3 years of college. It requires you to download 3 (THREE) different applications to even barely use at all too (gitBASH, gitDesktop, Atom).

i cant even fucking get the repository to clone into netbeans, so i guess im taking a fuckin' 50 on this group project. I should have complained about using git when my group said something about it.

It would have been 4000 times easier to just save and send each build over google drive or a fucking USB stick for god sake...
>>
>>63734811
W A S M
A
S
M
>>
>>63734632
I was going to read it, then I realized it is just one fuckhuge file. At least try to make it vaguely modular.
>>
>>63734820
What does HTML rendering have to do with WASM? You can't modify the DOM with WASM, and you can already compile directly from Typescript -> WASM.

WASM is only meant for computations that require an extra bit of performance.
>>
>>63734817
This is some pretty good bait. Don't waste it here.
>>
>>63734817
netbeans has pretty good git integration
pebkac
>>
File: fp.png (48 KB, 643x412)
48 KB
48 KB PNG
Pic related, isn't this simply the most comfortable programming environment & language for Linux?
>>
>>63734842
>ts -> wasm
really?
>>
How does it feel to have a job? To write code for money?
>>
>>63734911
no, this is
>>
>>63734923
Pretty good. I enjoy my job, don't work a lot, get paid very well. I see my results actually manifested in various companies, which is satisfying. Lots of disposable income to do fun things and travel.

However, if you're a code monkey writing sorting algorithms and not actually influential in the design and architecture of the whole solution, I can see that being pretty boring and unfulfilling.
>>
>>63734914
Look up AssemblyScript. It is a subset of Typescript that provides some baseline type definitions for WASM, and compiles directly to it.
>>
Where were you when type inference for C?
http://cuda.dcc.ufmg.br/psyche-c/
>>
Dropping ambitious project idea: Pascal to Wasm compiler.
>>
>>63734923
First job was awful because I was really the only programmer there, but had to manage interns.

Current job was great, but all my coworkers started leaving and our "off shore" office has practically become our primary engineering location.

I think I'm sick of making shitty websites, apps, and infra. I make good money, but the jobs become painful pretty quickly. I wish I wasn't retarded so I could make an indie game or something. Maybe being a starving artist isn't so bad.
>>
What is the overall best programming language? I don't want non-answers like "it depends what you need", there is a best one and you need to be honest.
>>
>>63734999
Whatever pays the best obviously
>>
>>63734976
Why wouldn't I just use an IDE?
>>
>>63734527
Stop feeding the troll.
>>
I know this code looks embarrassingly bad, but in my hundreds of times of running it, its only ever looped more than a single time once

sub random_int {
my ($length) = @_;

$length = $length =~ /[0-9]+/ ? $length : 6;
my $random_int = '';

while(length($random_int) < 6) {
my $limit = join('', ('9' x (6 - length($random_int))));
$random_int .= rand_int($limit)
}

return $random_int
}


The goal is to return a cryptographically-sound random number of a predetermined length. The most widely used random number generator that claims to be truly random only allows you to set a maximum number, not a minimum, so this is the best way I could think to get what I wanted. Luckily the library returns a uniformly distributed number, so its almost always the desired length, or within one digit of the desired length. I've not yet seen it have to loop twice
>>
>>63735067
Wow I'm an idiot. I forgot to have it use the length argument if provided

sub random_int {
my ($length) = @_;

$length = $length =~ /[0-9]+/ ? $length : 6;
my $random_int = '';

while(length($random_int) < $length) {
my $limit = join('', ('9' x ($length - length($random_int))));
$random_int .= rand_int($limit)
}

return $random_int
}
>>
>>63734842
>You can't modify the DOM with WASM
But you can pass string buffers over to JS. My application is very stateful, dynamic and requires quite a bit of parsing and non-templatable rendering. That is pretty slow in JS and hoggs RAM.

>AssemblyScript
1) Only a subset of TS and would still require plenty of porting.
2) Only a prototype. Emscripten is quite mature and battle-tested with lots of helper functionality.
>>
>tfw you can overload comma in sepples
what the shit
>>
>>63734911
>multiple hungarians on the freepascal direct contributors list
hmm, the more you know
>>
>>63735140
feature you should totally use when ever you have change
>>
>>63734999
>What is the overall best programming language?
c++ can be bended to to great many things and be programed in many styles
so by your parameters it's probably one of the best
>>
shut up sepples is shit!!
>>
Mandelbrot set in J.

Not very fast right now, but I'm planning on implementing the tests to check if it's inside the cardioid and circle.
I'll probably also add better colors after that.
>>
>>63735182
>bended
hot
>>
>>63734527
>Sure, many OO languages permit and encourage extensive mutation, but I do not see how that is an inherit part of OOP
Anon, if you send the same message to the same object and receive a different response, it doesn't really matter if the object's state has changed through in-place mutation or by replacing the old state with a freshly constructed new state.
>>
>>63735182
>c++ can be bended to to great many things and be programed in many styles
>so by your parameters it's probably one of the best
Cobol can be bended to do great many things and be programmed in many styles, so by YOUR parameters it's about as good as C++.
>>
>>63735210
>t. brainlet
>>
Can anyone redpill me on move semantics and &&?
>>
>>63735301
they're useful
>>
>>63735301
they are pretty fucking awesome
>>
>>63735301
you need them for your code not to perform like garbage
>>
>>63733610
there is a typo in ur -p option help message
>>
>>63735301
>Can anyone redpill me on move semantics and &&?
Another low-level detail you have to care about due to C++ being a retard-tier language.
>>
>>63735382
>low level details don't matter in a sys pl
>>
File: 1493046222955.png (344 KB, 340x523)
344 KB
344 KB PNG
>when his favorite programming language starts with a C
>>
>>63735431
C[spoiler]ommon Lisp[/spoiler]
>>
>>63732916
It's not that having "freestanding" methods is necessarily bad (though some languages like Java don't really let you do that anyway), it's the idea of a generic "utility" class that bags together a bunch of unrelated things.

Having a "Math" object/class/module with a bunch of misc math functions is fine, but don't be the guy with a 1000 line "utils.php" mystery file.
>>
>>63735431
Clojure
>>
>>63735431
>coq
>clojure
>chapel
>common lisp
>clean
>>
>>63735417
>you should have to worry about whether a value gets copied or moved
>this is somehow better than having a language with sane semantics that allow the compiler to do the right thing
Why don't you program in pure assembly?
>>
>>63733031
>>63733038
Anyone

I'm seriously having trouble finding anything online, which is pretty weird considering it's supposed to be Google's main language now or something.
>>
Do people actually use Go? It's literally just a stripped down Java 5...
>>
>>63735497
Like which language?
>>
>>63735551
Wrong. Java 5 had generics.
>>
>>63735577
he did say stripped down
>>
>>63735600
but generics were the big new feature in java 5

stripped down java 5 is java 4
>>
>>63735569
Like Rust.
>>
>>63735725
Rust does have have explicit move semantics though.
The only difference is that you need to specify
.clone()
for a copy with move by default rather than specifying
std::move
for a move with copy by default.
>>
I'm trying to figure out the best way to find a specific running daemon so that I can pipe stdio on one program to some other pipe inside the daemon. I could use d-bus on linux, but I'm not sure what to do on other POSIXish platforms.
>>
>>63735758
WRONG.
>>
>>63734781
It does though
>>
>>63735867
elaborate
>>
>>63735431
>Crystal
>>
>>63732668
Daily reminder to keep your kids away from people younger than 30 that like C/C++.
>>
Does anyone know of an easy way to read the cpu usage on windows?
I am making something for a friend and he uses windows, but I don't have a windows machine and I can't find any useful guides when I search for it (since most windows guides are aimed at normies)
On linux, I can just read "/proc/stat".
Is there an easy way to get something similar?
>>
>>63736058
https://stackoverflow.com/questions/63166/how-to-determine-cpu-and-memory-consumption-from-inside-a-process
>>
File: trump_disgust-690x460.jpg (41 KB, 690x460)
41 KB
41 KB JPG
>when his favorite language starts with an R and has more than one letter but fewer than six.
>>
>>63732944
this example seems contrived. Sort would be a method on List, not a new object.

var apples = new List<Apple>(...);
var biggest = apples.Sort().First();


If the point is that you can do dumb stuff with OOP, sure I can come up with a million examples of shitty code. But you can do dumb stuff in any paradigm.

I think the better argument is that OOP lends itself to doing dumb/confusing stuff more than other paradigms.

For example what is Sort doing in my example? Is the default comparer on Apple overridden? Is it comparing object references? Do I need a lambda? None of these would be "wrong" in OOP, but they are hidden from the coder without further inspection.
>>
>>63735867
>>63735906
He's right though. Only exception are types that implement Copy.
>>
>>63736121
red?
rebol?
>>
File: DKsFsF9VAAAZ9RH.png (457 KB, 1448x592)
457 KB
457 KB PNG
moSJWilla can go fuck themselves

i'm only using fagefux because of the captcha bullshit

the icon is so obviously oversatured it's not even funny

more people use IE/edge than firefox.. FAIL
>>
File: i09FJm4.jpg (177 KB, 1124x1024)
177 KB
177 KB JPG
kot blini (plural)
kot blin (singular) -> kotblin -> kotlin

Really makes you think.
>>
>>63736092
>scanf
Fuck I hate myself for not thinking of that.
I implemented my own damn system.
Oh well.
>>
HAHA this skeumorphic-ish scroll icon holy shit
what is this the 90s
>>
>>63732944
I love yegor. He's quite insane but its a logical kind of insanity and a lot of good things fall out of it.
>>
>>63736121
don't shit on ReXX
>>
>>63736216
I wish it was still the 90s
>>
>>63734976
>80(?) char width with wrapped comments
fuck off i'm not even reading that shit
>>
>Yet, the really cool challenges appear during type inference. Is 0 an integer or the null pointer? How to account for const/volatile in implicit conversions (particularly through poitners)? What about variadic functions? And the subtyping relation involving void*?
the absolute state of C fags
>>
>>63736206
Care to explain what is Kot Blini and Kot Blin?
>>
>>63736476
Shitty well-known meme. Translates as "cat pancakes". "kot blin" is the singular of that. Highly doubt a coincidence.
>>
Anyone know how to specifically take user input from a WEB PAGE using JDBC?

I'm trying to have a page that takes in input so that i can insert it into a table with sql, but i dont know how to get that user input other than Scanner which is only through console.
>>
File: 1581685955309.jpg (77 KB, 680x903)
77 KB
77 KB JPG
>being a c virgin
>not being a javabro

I'll slam my spaghetti code out without comments or documentation. You deal with it.
>>
>>63736603
typically you run a HttpServer and have the web page make a request to that server with the data inside the body of the request. then you have the HttpServer read the data from the body and do your sql stuft.
>>
can I configure visual studio that it automatically ads the whole function body with all parameters (as placeholders obviously) when using the function list in intellisense? eclipse can do it, why cant vs?
>>
>>63734385
CMake is objectively good.
>>
>>63735301
>uhrurhu redbull me
Why don't you fucking start Googling about it if you really have no clue what they are, then ask actual questions about what you don't understand you subhuman piece of shit.
>>
>>63733610
back to CTF bucky
>>
Fuck CMake. My final project submission was almost given a fail because it didn't compile on the faculty's test VMs. Luckily the TA told me to meet him and gave me an opportunity to fix it. The problem was CMake couldn't handle spaces for folders inside a VM. Standard GNU Make worked perfectly.

Fuck CMake.
>>
>>63734968
thats rad as fuck
>>
File: 1207460036327.gif (60 KB, 511x494)
60 KB
60 KB GIF
Have you read your SICP today, anon?
>>
./mb.go:53:39: error: invalid type conversion (need explicit conversion)
cfg := xproto.ConfigureNotifyEvent(ev)
-------
./mb.go:53:70: error: invalid type conversion (need explicit conversion)
var xproto.ConfigureNotifyEvent cfg = xproto.ConfigureNotifyEvent(xproto.ConfigureNotifyEventNew(ev.bytes()))


what the fuck
how could I be any more explicit
>>
>>63734385
One of the reasons why I upgraded from C++.

Enjoy your 70 different types of non-standard build systems.
>>
>>63732668
source??? what is that from?
>>
>>63735363
oh wow - thanks, didn't catch that
>>
File: 1471349336748.jpg (10 KB, 344x240)
10 KB
10 KB JPG
>>63734999
This is a retarded question. It's like asking "what is the best item to get at McDonalds, and oh, don't answer "it depends on what you like"."
>>
>>63732697
hey guys. i'm back. almost 7 hours later and you are still fighting among yourselves over my query.

wasn't intended to be bait. but damn, it sure was a nice little minnow you all wanted to chomp at.

sadly only about 15% of what i'm reading seems to have any valid substance. to you 15%, thank you.

the rest of you ... hang your heads in shame. spouting opinion based on nothing.
>>
>>63734999
literally Java
>>
>>63737408
java/js
everything else is pajeet tier
>>
>>63737427
>pajeet tier
I'm an Indian. I'm tired of all the things people say about us. I mean, which other country is hated the most? North Korea? We're probably next to North Korea. Several people called me "pajeet", "who shits on the streets" "giv bob and vegana" as soon as I told them I'm from India. I'm now afraid of telling that I'm Indian. I feel ashamed. One person said "US should nuke India" on a youtube video about India and it got hundreds of likes or upvotes. Most of the things people say only apply to poor people and uneducated. People like me in the cities probably never saw anyone shitting on streets. I honestly never saw anyone shit on streets. At least from what I know, people don't shit on "streets" but in an open area like farmlands in villages. I keep my identity hidden and don't tell anyone that I'm Indian. I'm afraid they'll treat me differently. I keep trying to avoid those comments but they are affecting me. Not directly but indirectly. For example, read any Reddit threads about, you'll see hate comments about India. Fuck this shit
>>
>>63737427
I thought Java was THE pajeet language?
>>
>>63737455
>"we don't shit in streets, just on our crops"
>>
>>63737455
if you're serious that actually is really shitty
>>
>>63732697

>OOP works
>that's why OOP is used in industry
>Haskell snowflakes are buttblasted and shitpost on /g/

End of story.
>>
>>63737161
I've watched videos, does that count?
>>
>>63737484
> really shitty
no pun intended
>>
>>63737455
>I'm an Indian.
Fuck off. Stop playing victim card in here. 4Chink is not a safe place like Youporn or redshit.
Nobody care who you are in here. You make and take your own offence.
>>
>>63737455
> which other country is hated the most?

Israel, because Jews. Also, multiculturalism was a mistake.
>>
>>63737492
No. You have to read it.
Here: https://mitpress.mit.edu/sicp/full-text/book/book-Z-H-4.html
>>
File: 1512083038142.jpg (40 KB, 720x720)
40 KB
40 KB JPG
>>63737455
>>
File: Uno R3.jpg (1.64 MB, 3728x1440)
1.64 MB
1.64 MB JPG
My weekend project came in. Going to fiddle with some of my own code on it since I'm learning.
>>
>>63737609
Looks fun.
>>
Rust libraries are over engineered pieces of shit, kind of reminds me of Android/Java and C# levels of over engineering.
Especially the fucking graphics libraries.
>>
File: poo_facts.jpg (26 KB, 478x356)
26 KB
26 KB JPG
>>63737455

Let's get some things straight:

On 4chan every country get hate, so stop crying.

On the other hand India does have a lot of problems.
The open defecation is not a meme, it's fucking reality.
The way women are treated in the indan society is far from great (gang raping some tourist, anyone?).
And fact of the matter most indians that aren't white collar level smell like curry.


Nevertheless Indian has a great tradition of math and also it's slowly but steadily taking over burgerland with it's low cost developers that destory the US computer industry.

So don't be upset, in 100 years we might all smell like curry, who knows?
>>
>>63737640
What does it mean for a library to be over engineered?
>>
Anyone here ever tried to customize Chromium to add their own features and enhancements?

I wanted to customize it but it's just so huge. I don't really know where to start.
>>
>>63737647
I don't know why everyone keep saying Indian smells like curry.
I can stand and enjoy the smell of curry in food, but most of Indian around my area have much much horrible body smell.
>>
>>63737667
Go look up ungoogled chromium; it's a pain to fuck with chromium.
>>
>>63737680
the racism in our community really makes us look bad
>>
File: g-15126911469.png (49 KB, 1916x802)
49 KB
49 KB PNG
>>63732668
I made a python script that searches every thread on a board for keywords that are marked as "PERSON" and "Singular Proper Noun" by nltk's pos_tag.

Current problems:
- Only seems to care about capitalized words
- Three days ago I knew nothing about NLP or python charts so there's definately sampling problems.
- Someone can spam keywords in a single post, throwing off the results.. This could be solved by taking only two (or some generated number) of a single keyword from one post, or even max out in threads.
- Ideally should count words that mean the same thing together, ie "Linus Torvalds" and "Torvalds" would be together, but not "Linus" and "Linus Tech Tips".

Eventually I want to sample the various 4chan archives and get a day-by-day chart.

If anyone's interested I can give out the link to my personal github repo for this or I'll take requests on features.
>>
File: Navigator.png (15 KB, 802x552)
15 KB
15 KB PNG
I have a list of numbers. I want to make another list that contains lists of every possible order the numbers from the first list could be in. I cant think of where to start. Any guidance?

More details:
As a personal challenge I am making a program that routes the shortest path to take to drop several things off at their destinations. I will have a list of different destinations and the program will take the list of destinations and make a new list of every possible order they can be in. It will then go through it and calculate the total distance of the paths from that order. Then it will find the order that had the shortest possible distance to tell the user which to take. Pic related is the current testing ground for this and is very different form the real world place it will be designed after. In the real world the user will have about 10-15 destinations per trip.
>>
File: andrei_0.jpg (18 KB, 200x256)
18 KB
18 KB JPG
>>63737693
>D
>>
>>63737629
It sure does, Also there is soo much shit in the box.
>>
>>63732919
>you to find over-complicated patterns, bloat and boilerplate for working around using pure OOP. This is where most of the OOP hate comes for. There is nothing wrong with using some OOP, where appropriate, together with mostly procedural code.


struct ApiWrapper {
int _authToken;
void (authenticate)(char *username, char *password);
struct resource (get)(char *resource_name); //use an enum
struct status (post)(char *resource_name, struct *resource);
}



no oop needed.
>>
>>63737733
You forgot your stars.
>>
>>63737684
I see. What about webkit/blink? I would assume that it's easier to use given it's a library and everything. I have some experience hosting programming languages in my programs and have a little experience with V8 already.

I'd feel proud if I could get my own little browser to simply load pages.
>>
>>63737725
I would be paranoid of losing some of those parts.
>>
>>63737753
shit yea the function pointers should have astrixs before their names.

w/e I'm tired as shit, fuck you. <3
>>
File: tv-1512692104.png (53 KB, 1920x1046)
53 KB
53 KB PNG
>>63737717
Yeah it's a pretty shitty tagger and I have no idea what I'm doing. I'll try getting it to work with "WordNet" sometime soon.

Other ideas:
- Seeing what /generals/ have the most 'narcissism' in terms of personal pronouns per post.
- Figuring what time of day /sip/ shills are posting on /ck/

Also I'd appreciate if someone had recommendations for NLP theory books.
>>
>>63737769
I wouldn't mind, the kit was stupid cheap. Like 30 bucks.
>>
>>63737680
>but most of Indian around my area have much much horrible body smell.
No fuck off, pajeet. I went to india once and I know full well how "people" of your shithole smells like. To be frank, india deserves all the hate it gets here and more.
>>
>>63732745
Holy shit reading the comments on that really shows you how little OOP haters actually know about OOP.
>>
>>63737733
I think str is a struct by itself, instead of string.
Or it could be some typedef shit
>>
>>63737765
>What about webkit/blink?
That's outside of my purview. Like you said, one would assume it'd be simpler; though I have feeling it has a lot of dependencies.

Good luck.
>>
>>63737835
it was unclear.

regardless you can make a C function accept anything, so my point stands.

OOP is cancer.
>>
>>63737009
You're objectively retarded.
>>
Welp. Looking for a job. Willing to take the shitlang pill.
>>
>>63737796
OOP is a paradigm that inhibits productivity by deskilling programmers.
>>
Does java copy values during function invocation?
>>
>>63737955
Java is pass-by-value. Brainlets will tell you that it isn't.
>>
>>63737870
as opposed to you being subjectively retarded?
>>
>>63732834
Java
>>
>>63737859
You don't have a point because all you've done is show that that style of programming is not object-oriented, but procedural. You're way off base because you hate something but you don't really know what it is.
>>
>>63737955
Google it.
>>
does anyone have any experience with android studio here?
>>
>>63738036
too much work
also, can I case on variables?
>>
>>63738042
don't download it, its at elast 5 gigs
>>
>>63738035
>you hate something but you don't really know what it is.
I rewrote his class with out oop.

also the problem with OOP is all the fucking overhead it adds.

Look at just array bounds checking, you basically add 2 extra if statements per array access.

sure its just "two if checks" but all that shit adds up and you end up with slow ass code.

all because some programmer couldn't be bothered to write proper code.
>>
>>63738065
There was never any OOP in it to begin with. Just because you used classes, doesn't mean your code is object-oriented. You don't know what object-orientation is.
>>
>>63738065
bounds checking isn't OOP
>>
>>63737859

You've only shown classes are cancer, not OO.

Any good OO language does not have classes.
>>
>>63738075
>>63738088
what's the difference between using classes and OOP?
>>
>>63738075
classes are OOP.

all of fucking OOP is implemented through classes.
>>
>>63738107
https://www.youtube.com/watch?v=RdE-d_EhzmA
>>
Rate my scripting language.

kore i wa 1 desu

while (i <= 100)
{
if (i % 15 == 0)
{
print "Fizzbuzz" desu
}
else if (i % 3 == 0)
{
print "Fizz" desu
}
else if (i % 5 == 0)
{
print "Buzz" desu
}
else
{
print i desu
}

kore i wa i + 1 desu
}
>>
>>63738117
can I have an answer that isn't an hour long?
>>
>>63737708
For the first part, I'd try breaking the problem down with recursion, i.e. find the number of orderings of the first k elements based on a list of all possible orderings of the first k - 1 elements. Or if you're just looking for a working solution google how to find all permutations of a string / array.

The latter part sounds like the travelling salesman problem. Using your brute force approach of calculating all possible permutations of the cities this could take a very long time. For 15 cities you have 15 factorial orderings, which is more than 1 trillion. Not sure whether this would run in decent time on a modern computer, but for anything much larger than that it definitely will not be able to finish going through every possible order. At any rate, if you're unfamiliar with this problem it is definitely worth learning more about.
>>
>>63738141
Classes are a language feature, OOP is a design paradigm.
>>
>>63738141
You may have a 57 minute long one:
https://www.youtube.com/watch?v=s-hdZZzMCac
>>
>>63738155
Speaking of which, where can I learn OOP properly? I understand classes, but in terms of actual design and what is seen as best practice.
>>
>>63738185
http://a.co/hyLshRW
>>
>>63738185
The "Gang of Four" book is good, but don't get carried away with applying ridiculous design patterns to every problem you encounter.
>>
File: 1500493139381.jpg (155 KB, 960x720)
155 KB
155 KB JPG
>>63738152
Thanks for the reply. I never took stats so Im just now learning about permutations and how fucked I am. With my method I can comfortably calculate around 5-6 destinations but most are going to be in the 10-15 range. My method and idea are fucked unless I can think of some magic voodoo shortcut.

Thanks for the help!
>>
>>63738185
Learn Smalltalk and read the book in OP's pic.
>>
>>63738196
This is what I have already. Concerned it might be a bit tough, but I'll give it a go.
>>
>>63738227
The blonde girl book (Head First Design Patterns) is easier.
>>
>>63738129
>wrong japanese grammar
kys
>>
>>63734392
Joschering is only allowed from 1 - 3pm on weekdays
>>
>>63734392
YEEEEEEEEEAAAAAAAAAAAÖÖÖÖÖÖÖHHHHHH
o/ o/ o/

this is /deutsch/ now
>>
>>63734392
C++ openStronghold when
>>
Anyone here do hardware programming like Uno R3?

I'm trying to think of a way to run a switch to togle a small screen from 1 to 6 without having the connection actually touch. So far it looks like I need reed switches, is there any other option?
>>
>>63738042
It's the definition of bloat, but if you really want to develop for Android, it's a must.
>>
>>63738288
oge
was everything?
>>
File: 1309551895330.jpg (60 KB, 528x810)
60 KB
60 KB JPG
>>63738251
>>63738264
>>63738286
Heil Hitler \o
>>
What study you then so?
>>
Working on automating the university library doors in Lua

so everyone can get in
>>
>>63738059
>>63738293
ah, we run it in uni so i hadnt braved using without yet, it does feel like it lags a lot at times but one step at a time

I'm trying to get a list of resources from the raw folder as an arraylist, but when I use
Field[] songs = R.raw.class.getFields();
it auto opens the files its checking in the field when I just want it to load the metatags and then continue, i've tried literally just this line in my app and it still opens the audio files
>>
I am a pozzcuck. Do you know what that is?
>>
>>63738320
I want to know
>>
>>63738042
I've dealt with worse. But, unsurprisingly, things that try to do everything for you, end up stepping all over your toes once you try to do anything even slightly out of the box.
>>
>>63738304
>then
Stoopid?
>>
>>63738325
l am a Pozz-Cuckold. You want to know what that is? Well, let me explain.

The normal cuckold wants just one gift from his black bull: A black child. But the Pozz-cuckold wants more. He wants three gifts. We are greedy little bitches. But first, here's how it goes.

Normally I drive in my Mercedes to a street gym where ripped blacks train their muscles, there skin shining with sweat and the air filled with their scent. I am already a bit hard just from thinking about it. Sometimes I cum a bit in my pants. I get out of the car and ask who of them has AIDS. Then they know what happens.

The black man with AIDS gets into my car and we drive to somewhere isolated. Then I take a small knife and stick it inside the hole of my penis and twist it a litte. In the cuckold community we call this the AIDS twister. Sure it hurts and causes me to bleed. But it is worth it.

Then the black man docks me until we both cum and I contract his AIDS. I already have 4 types of AIDS from this. That is the first gift. Then we drive on to my house and he fucks my wife, who has also contracted many types of AIDS. That is the second gift. And then 9 months later the third and best gift arrives: a black child who also has AIDS.
>>
>>63738296
was everything, thangs
>>
File: 1485873699067.jpg (37 KB, 329x379)
37 KB
37 KB JPG
>>63738346
well that's nice but WHO is ralf stegner?
>>
>>63738342
fick di
>>
>>63738378
H A M B U R G
A
M
B
U
R
G
>>
I DEEPLY APOLOGISE FOR THE AUTISM THAT WE BROUGHT TO THIS THREAD.
now please send me your adress so that i can send you a gift basket
t.liechtensteiner
>>
>>63738428
liechtenstein seems like a cool place
>>
>>63736509
The thing is Russian has cases, so "kot" without inflection literally means cat(noun). In English "cat pancake(s)" reads naturally as "cat(adj.) pancakes", but in Russian it will read as "cat, pancakes" (i.e. like a list) except without the pause from the comma. This obviously doesn't make much sense.

So unless I'm horribly out of date and the phrase "kot blin(i)", verbatim, is a well-known part of the meme, I highly doubt it.
>>
>>63738460
>kot blini
It's a common name the image is uploaded with.
>>
>>63732697
What paradigm does /g/ dig? I hear event driven is all the rage.
>>
File: OOA&D.jpg (75 KB, 545x629)
75 KB
75 KB JPG
>>63738185
>>
>>63738616
YEA I DONT KNOW, MAYBE YOU SHOULD BOMB DRESDEN AGAIN OR SOMETHING
>>
Basler RUUUHE
>>
are you ready for the game awards
>>
>>63738709
Yes
Letz Game Alder
>>
>have to dumb down my code so that coworkers can understand it without having to think
>team leader asks why I don't seem to take pride in my work
>>
>>63738833
>my code is unnecessarily complex because epeen
>boss won't let me write everything in brainfuck
>why doesn't anyone appreciate my genius
>>
>>63738867
>triggered brainlet is reminded that his very existence is a drag on his team
>>
I won't hire people who went to a Javaschool. That includes "CS" degrees that are basically Java 101.
>>
Are there any degree-type courses online which focus on programming / coding with little focus on computer science?
>>
>>63738990
every basic udemy course ever
they're usually an introduction to the language and then you create a couple projects
>>
New thread:
>>63739018
>>63739018
>>63739018
>>
>>63732916
>>63733581
>>63735446
This is why books like this are bad. They are full of all these great dictats on how one should program, telling you to be weary of doing things that as a good programmer you would have used without injury, and not explaining themselves or the situations where you're actually going to get burned.

Don't just tell people rules on how to program, give rationale. If you can't give the rationale you shouldn't be writing a book on programming practices.
>>
>>63737009
People who actually think this have never: used other build systems, built stuff without a build system, or are defending a platform they've learned enough for it to be useful to them, and would rather everyone else just suffered through its bullshit and join them.

CMake is like the CVS of cross-platform build configurators. There may not be a better tool right now but frankly you're an apologist if you are praising it.
>>
>>63737667
>>63737684
>>63737765
Use QtWebEngine




Delete Post: [File Only] Style:
[Disable Mobile View / Use Desktop Site]

[Enable Mobile View / Use Mobile Site]

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.