[ 3 / biz / cgl / ck / diy / fa / g / ic / jp / lit / sci / tg / vr / vt ] [ index / top / reports / report a bug ] [ 4plebs / archived.moe / rbt ]

/vt/ is now archived.Become a Patron!

/g/ - Technology

View post   

[ Toggle deleted replies ]
>> No.77340547

boring OP, we all already know that spaces are superior to tabs.

>> No.77340555


>> No.77340577

Okay-ish tripple number

>> No.77340583

i'm so glad Go forces tabs

>> No.77340607

>spaces for C
>tabs for makefiles
my life is a lie

>> No.77340775

>At least
Sorry to disappoint you anon

>> No.77340852

Should I learn opengl or webgl if I am interest in understanding how 3d graphics work? What about three.js? Is that a simple layer on top of webgl to simplify stuff? Don't have enough spare time to learn Vulkan.

>> No.77340902

Do you have a link to the programming books? I've seen posted here before.

>> No.77341002

I remember there being a mega or driver with a ton of programming books posted here.

>> No.77341011

That's the only book you need

>> No.77341058


>> No.77341144

tfw he didn't say "Game Over" b4 closing the door

muh "I speak for the dead" fuck yourself

>> No.77341242

Where can I get it for free?

>> No.77341278

Google the full title, the link starting with temp.itfseafarers has it

>> No.77341458

Not how it works, they'd give you a more general test to determine what was lack of knowledge and what was rust (actually you should have taken this before you were admitted to the university). Also I don't know what you expected - going into calculus after high school isn't a given, and that was 8 years ago for you.

>> No.77341466

>>my problem looks easy
>>(3/-1) - (0/1)
>>I write "impossible"
>>0/1 doesn't even makes sense also a negative denominator? lol wat?
>>sit back down
>>professor goes down the list of problems
>>gets to mine
>>starts laughing looks towards me
>>that's a funny one anon, I needed a good laugh
>>ok, now anon what's the answer
oh you rascal
but srsly bruv hit up khanacademy or whatever, most likely its cuz you rusty af like you said

>> No.77341485

The Game.

>> No.77341524
File: 26 KB, 400x275, sk.jpg [View same] [iqdb] [saucenao] [google] [report]

>I truly want to blow my fucking brains out. Nothing worse than realizing I have accomplished nothing in all of my life.

Damn, I feel you anon. Life is hard in every aspect.

>> No.77341580

Fabricated and homosexual.
In case this is real: you're probably not even qualified to do any menial job.

>> No.77341627

>>I need to finish it till the end of august :/
>>It needs to have at least 60kB of "meaningful" code
>August 21
also 60
of "meaningful" code
what sort of pajeet bullshit is this lmao

>> No.77341644

>this cant be done in any language ive tried
What languages have you tried? This works (C++), I'm pretty sure if you added parentheses it would work in almost any language.
#include <iomanip>
#include <iostream>

using namespace std;

int main()
bool a = true;
bool b = false;
bool c = a == b;
std::cout << std::boolalpha << c << '\n';
return 0;

>> No.77341668

Works in Python

A raytracer. Just writing the maths types (Matrix, Vector3) will get you ~30kB

>> No.77341705

It's what it is. Fucked, I know.
Honestly rn I think I can do 60 kB if I just get into it and don't procrastinate.

So please mate, reccommend something so I can start working asap.
I actually had plenty of time for it, but only now did i start caring and it'll be a lot of work

>> No.77341717

>A raytracer.
Ugh. Sounds hard. Thanks for the suggestion though for sure, will think of it.

>> No.77341825

works in literally every language I can think of. the rvalue is evaluated, then assigned to c

* (defparameter a nil)
* (defparameter b t)
* (defparameter c (equal a b))
* c

>> No.77341847

How do I learn C.
Like. For real. I've tried reading K&R a few months back from a PDF and it wasn't transcribed right and half the practice problems were wrong and I've felt discouraged since

>> No.77341880

the one true way to self-teach anything: make a project. learn as you need.


>> No.77341933

How do you manage to not get a degree until 26?

>> No.77342034

"its noita equaishun pendejo!"

>> No.77342077

no theory of mind cuz autism

>> No.77342099

Just put them in a zip and rename it.

>> No.77342170

How do I get the files out of the zipped folder at runtime?
I'm using C++ by the way.

>> No.77342198

buy a copy of the actual book maybe? is it still in print?

>> No.77342257

Calc is a filter class to weed out people who aren't going to commit. And it's useful, as the other guy said, on things like game engines.
In a more abstract sense, a huge part of integral calculus is being able to analyze a problem and find the correct strategy to approach it, which is probably the most important skill in computer science (yes I am aware you need to literally be capable of performing the strategies you choose as well).

>> No.77342277

zlib. Of course, I'm not suggesting you do this, there isn't a good reason to obfuscate any of this data. If your game is 3d, individual textures can be compressed as dds or an equivalent.

>> No.77342320

You're just making it harder for yourself for no good reason. Besides, this might be a bit of a stretch, but platforms like Steam do updates on a per-file basis and having everything stuffed in a big archive really screws with the update logic.

>> No.77342425

I'm just too tired to explain it properly. When it updates something it
for every file:
make backup of file
apply patch
see if it's all good, retry, continue, whatever

When you got all your game files in a single archive it makes a copy of that giant(?) file before it patches anything.
Games like Path of Exile and Squad (mostly in the past) are really good examples of how bad it gets.

>> No.77342426

Fake but funny stuff.

Math is just so hard in general. I'm trying to go through my precalc book because I half assed it in school and my brain just shuts down in anxiety when I start.

>> No.77342509

That's not math being hard. It's dealing with the fear of failure that's hard.

>> No.77342643

aws is shady too desu

>> No.77342705

e^x ofc
why even ask something like this? asking someone to prove it is way harder but everyone knows that d/dx e^x is e^x

>> No.77342715

retard thought:
your post and your life

>> No.77342727

what happened to the commit log button on github? it used to be there but i dont see it anywhere now. going directly to the correct url seems to work tho

>> No.77342731

>asking someone to prove it is way harder
Not really. You just take the derivative of a tailor series expansion of it.

>> No.77342749

Did you not see the question the guy originally couldn't answer? This is a soft ball just to test knowledge on notation.

>> No.77342750

click the commits count, rightmost part in the blue header next to the last commit time. damn you're dumb

>> No.77342907

math is gay, but often fake too

>> No.77342931
File: 26 KB, 500x500, 1595987759143.jpg [View same] [iqdb] [saucenao] [google] [report]

i finally fucking caved and started working on a language/VM. what are the minimums for making it turing complete? i've got add, store/load, and jump.
The autism this project is giving me is too much to handle. I gotta finish as soon as possible

>> No.77342958

>what are the minimums for making it turing complete?
If it can emulate a Turing machine, it's Turing complete.

>> No.77343015

When you say server, are you referring to a single piece of software or a machine?

>> No.77343031

learn scala

>> No.77343040

I guess both?
A machine which runs a web server (presumably apache) and some backend to process requests.

>> No.77343070

Functional languages almost always have better types systems than OO ones, which makes expressing your data structures easier

>> No.77343097

I am bored what should I learn zig or rust?

>> No.77343108

I cringed reading that, please don't be real

>> No.77343113


>> No.77343190

yep, enables them to own your box when you forget to patch that sshd vuln

>> No.77343358

If I have a MariaDB table set up and I have specified a column foreign key but will also want to be able to select based on that column, should I also add it as an INDEX key? Or does the foreign key optimize things enough?

>> No.77343421
File: 224 KB, 432x324, bjarnes.png [View same] [iqdb] [saucenao] [google] [report]

>> No.77343457

I think I got Substitution to work from CS50. It's been rough getting into this course (not because of the course itself, but because of the "It's too late to learn" trap), but I'm hoping to be finished with it by September's end.

>> No.77343531

The real question is, why is there this widespread meme that using namespace std; is bad? Even many large and popular C++ codebases use it (Qt, just to name one example).

>> No.77343534


>> No.77343562

Thank you

>> No.77343599

What are my options if I want to do games? I see that C++, Java, C# and Lua seems to be the most popular

>> No.77343736

If you want to learn everything from end-to-end (engine, graphics pipeline, physics engine etc) then C++
If you just want to learn game logic then C# with Unity or even Blueprints in UE4.

>> No.77343871

Bevy, in five years, if it's still around.

>> No.77343884

what is that?

>> No.77343886

What do you use?


>> No.77343890

Just use Unity
I doubt you'd want to make an entire fucking engine and shit. Gamedev is fun if you don't have to worry about that shit

>> No.77343987

Very new rust thing made by some purportedly smart guy, code doesn't suck, tries to get incremental compile times below five seconds, etc etc

>> No.77344022

what a terrible recommendation

>> No.77344047

Post it

This thing? https://github.com/bevyengine/bevy I'm glad Rust is getting more market share in game development, I just wish there was a good garbage collected language for it

>> No.77344048

Yeah, give it five years.

>> No.77344063

>I just wish there was a good garbage collected language for it
C# I guess

Why do you think it's good? Just because it's written in Rust? If anything being written in Rust is a good reason NOT to use it

>> No.77344090


>> No.77344103

>C# I guess
True, I haven't tried it much but from what I've heard it's less painful than Java

>> No.77344170

Is there a way to make an Android phone into a standard Linux box?
I want to host a web server using it.

>> No.77344222

depends, do you still want a working phone?
I would try with termux then

>> No.77344266

You might have good taste. What are some ones you've dropped lately and why?

Also, if you're just starting out, an important part of learning is getting familiar with something (worthwhile, of course) real damn deep, despite its flaws, because you recognize some of its ideas are worthwhile.

>> No.77344376

>>(3/-1) - (0/1)
>>I write "impossible"
>> 0/1 doesn't even makes sense also a negative denominator? lol wat?
ok but what was the answer to the problem? is it just -3 or like what

>> No.77344422
File: 10 KB, 467x114, 1594177716553.png [View same] [iqdb] [saucenao] [google] [report]

how to make haskell display strings correctly without the need to use putStrLn?

>> No.77344440

const IO = (_action, _world) => ({
world : _world,
action : _action,
bind : f$a_IOb => IO(world => (IO1 => f$a_IOb(IO1.action).action(IO1.world))(_action(world)), _world),
return : a => IO(a, _world)}

const putStrLn = (aString) => IO(world => IO(console.log(aString), world), null);

const perform = (anIO) => (((x,_) => x) (anIO, anIO.action(null)));

const main = perform(putStrLn("Hello").bind(_ => putStrLn("World")));

a basic attempt at hello world in javascript</wbr>

>> No.77344466

It's impossible, he just couldn't explain how

>> No.77344502

Are you attempting to do an IO monad in JS?

>> No.77344520

the software job market is retarded and this whole profession is gay

prove me wrong, you literally can't

>> No.77344523

yes, was trying to read
and couldn't really understand it so I thought I'd try to do it in a language I'm familiar with
no idea if I did it right though

>> No.77344977

just use powerpoint then https://www.youtube.com/watch?v=uNjxe8ShM-8

>> No.77345006
File: 25 KB, 379x499, c.jpg [View same] [iqdb] [saucenao] [google] [report]

what book should i use to learn C?
Is this one any good or is it outdated?

>> No.77345047

c is an obsolete language, it's now only used to maintain existing code already written in c. you'd be better off Rust.

>> No.77345120

>you'd be better off Rust
The world is larger and more complicated than you imagine.

>> No.77345126

Should a hash table have seperate get/add functions, or should they be combined into one function which always creates the element if it doesn't exist?

>> No.77345132

It's faster than the rest, with the exception of maybe Chez. More defined in its standard than Scheme. Not sure about Clojure. Scheme is a prettier language overall. LFE would be cool if it were active.

>> No.77345205

I'm so unmotivated

>> No.77345250

>dependency injection frameworks
what the fuck is that

>> No.77345252

How is it any different from defining separate sets and gets all over the place? You keep everything in one place as well.

>> No.77345254

This is all you need https://www.intel.com/content/dam/www/public/us/en/documents/manuals/64-ia-32-architectures-software-developer-instruction-set-reference-manual-325383.pdf

>> No.77345257

general set for hash table is less efficent than add and modify functions
where you define it is irrelevant to the question

>> No.77345264

This is why I don't want to combine them.
But on the other hand combining them simplifies the interface a lot.
It's a tough call tbqh.

>> No.77345305

general set needs to determine whether the entry exists before deciding whether to add or modify, and that might be information already known to the caller so that's an optimization case

>> No.77345319

Wouldn't they need to write logic to determine the information to be known before calling anyway?

>> No.77345325

Go never stops providing proofs that its authors are complete brainlets isn't it?

>> No.77345327

>int main() {
> bool a = true;
> bool b = false;
> bool c = a == b;
Stop writing C++ like a cnile SCUM
auto main() -> int {
auto a{bool{true}}, b{bool{false}};
auto c{bool{a == b}};

>> No.77345354
File: 318 KB, 663x800, 5349692_orig.jpg [View same] [iqdb] [saucenao] [google] [report]


>> No.77345360

That's why you write your set as a macro, and it just expands to this for you.

>> No.77345363

Burger education strikes again.

>> No.77345365

what the fuck are you talking about

>> No.77345433

>precious time
We're all on this board aren't we?

>> No.77345443

Learn Lisp.

>> No.77345466

I know Lisp, which is why I'm telling you you're answering the wrong question

>> No.77345515

Lisp has gethash and puthash, with setf which wraps them. Use a general set to wrap individual sets.

>> No.77345522

we're talking about the different specializations of set

>> No.77345524

what are the top 5 /g/ languages for 2020 and beyond?

>> No.77345535

Rust, Haskell, Clojure. That is 5

>> No.77345545

Lisp, Lisp, Lisp, Lisp, and Lisp.

>> No.77345551

I want to start coding stuff in Ada because I noticed it is the most superior language but I don't want to be a lonely programar. Nobody would contribute, buy or even look at my code.

>> No.77345562

>knows this much about a shitlang
>says ngmi
not gonna make it, sorry.

>> No.77345593

Yes, clojure and clojurescript is *reasonably* common for webdev.

>> No.77345595

>using type inference for a function return
who the fuck taught you how to code?

>> No.77345725

Is Python, Javascript, C, Java and Haskell a good all around stack?

>> No.77345733

Drop Java and Haskell and pick up C++ and Rust

>> No.77345740
File: 17 KB, 338x506, 1490401253716.jpg [View same] [iqdb] [saucenao] [google] [report]

>We believe that high-performing teams include people from different backgrounds and experiences who can challenge each other's assumptions with fresh perspectives. To that end, we actively seek a diverse pool of applicants, including those from historically marginalized groups — women, people with disabilities, people of color, formerly incarcerated people, people who are lesbian, gay, bisexual, transgender, and/or gender nonconforming, first and second generation immigrants, and people from low-income families.
>We are headquartered in Austin, Texas and the majority of our team is U.S. based
Of course it is mutts, who else it could be so delusional?

>> No.77345746

can you elaborate please?

>> No.77346081
File: 25 KB, 332x348, 1342232266974.jpg [View same] [iqdb] [saucenao] [google] [report]

On C how to I copy one pointer to another?
Look at my exercise
As it is I know is not working but I don't know what else to do
I already tried memcopy but it doesn't work, I suppose I have to use malloc first but if I don't know how big the command line input is then I don't know how much memory should I allocate.
There must be something else beside adding a bunch of loops to measure the input.

>> No.77346166
File: 70 KB, 800x330, ezt0o7fntzrq54w1arbu.jpg [View same] [iqdb] [saucenao] [google] [report]

Anyone here do well on software dev interviews? Any tips? Not necessarily coding/technical just the vibe in general when meeting multiple managers/team members.

I'm applying for jobs and I'm nervous I wouldn't come off as talkative or friendly or I'll sperg out from anxiety.

>> No.77346195

Walk straight into the managers office and tell him you want a job, firm handshake, maintain good eye contact

>> No.77346203
File: 333 KB, 655x614, 1576968793738.png [View same] [iqdb] [saucenao] [google] [report]

Thanks dad

>> No.77346234

Do you not see the -> int, anon?

The fuck are you even doing? Loop backwards through argv counting from argc-1 to 1.

>> No.77346329

argv is an array of pointers argc long to null terminated char arrays.
argv[0] is the first word on the command line (the program name), argv[1] is the first argument, etc.

Loop from i = argc-1 down to 1 and printf argv.

How are you not understanding this.

>> No.77346534

>learn assembly
Here you go: https://scs.hosted.panopto.com/Panopto/Pages/Sessions/List.aspx#folderID=%22b96d90ae-9871-4fae-91e2-b1627b43e25e%22&maxResults=50
Start at lecture 5 but you need all the previous lectures to understand it
You don't need the book, CS:App although it's a great book
Go on microcorruption.com after you do those lectures and see what happens

>> No.77346600

yes they do

>> No.77346622

reminder that ruby is the best language bar none

>> No.77346647

why can't spacelets ever explain why spaces are better than tabs? tabs are better because they use less storage space and spaces require either more typing or your editor silently transforming tabs to spaces which is obnoxious

>> No.77346656

what editor do you use?

i use sublime

>> No.77346669

Go doesn't have this problem.

>> No.77346672


3/-1 = -3, 0/1 = 0, -3 - 0 = -3

Am I retarded

>> No.77346680

I used to think sublime was great, but Vim is a real improvement.

>> No.77346760


Can i do it?

>> No.77346929


>> No.77347115
File: 336 KB, 676x507, 1497701621-vomichan.png [View same] [iqdb] [saucenao] [google] [report]

>if or or or or or or; return true
>while true
>else if

>> No.77347382

By standalone what I meant is the data is store locally without additional setup/services required.

>> No.77348776
File: 693 KB, 2560x1440, soulseek.png [View same] [iqdb] [saucenao] [google] [report]

>What are you wasting precious time of your life on, /g/?
SoulSeek client.

>> No.77348846

>passed all hard and medium sql problems with ease on leetcode
>passed all shell questions as well
I don't know shit about data structures and probably couldn't even pass the medium algorithms/concurrency questions using python3. What should I do with my life? The concurrency stuff especially looks very interesting but hard at the same time. Is it a good idea to look at the answers and try to learn from them?

>> No.77348892

> non-trivial paralellism
That's the only thing you got to worry about then.
Of course, since every reasonable, non shitty way of doing things tries to lock the paralellism away behind bars so that it the parts of it YOU touch is relatively trivial.

But okay, let's write a multi-sourced configuration-loader. Basically, something that can load stuff from multiple sources and put it into a hash map, or, if you're using a language that actually is made for enterprise level stuff, the type that is created for configurations.

It should accept a collection of sources, which could be references to local files, urls, and so on, and for each of these references, it would seek to go to the specified source, load up every configuration and store it into an object. At the end, return the object.

Every specifier gets its own thread. This is absolutely fine, because you load this stuff on startup, and having multiple files, urls, etc. is pretty common.

> How do you handle it if multiple sources specify the same property?
You have to figure out how to deal with that. I'd crash and burn so that the retards confing shit up would start confing correctly, but other solutions are possible.

> Wait, what sort of standards should I accept?

>> No.77348937

We're getting this in the next Java LTS release and I don't get why this is even remotely necessary for any normal code you'll ever write.

Only so and so class can extend this abstract class/implement this interface, and that makes everyone's life easier because..?

I have yet to see a real use-case except for making it easier to write Either.
But Either<E1, E2> is just a way to hide an if/else. E1 and E2 are different types, how are you supposed to write legible code in an OOP manner? It makes sense for languages like Haskell, but Haskell operates very differently from Java. I especially don't look forward to the currycrowd completely not getting it and cargo culting the feature.fuck me.

>> No.77348947

Is it fine to just use primitives for trees?

'data': ...,
'children': [
{ 'data': ..., 'children': ..., },
{ 'data': ..., 'children': ..., },

or should I define a proper data structure?

class Tree:

>> No.77349121

All the stuff, except the last line (which is just python equivalent of main) are applicable to most languages. The flaw I made was including a troll reply in the same post, so the mistake I made with "Converts strings to numbers instead of numbers to strings" when the opposite is optimal made the whole post seem like a troll. I expected the guy to try and fix his code, then ask for specific help.

You should use the a proper data structure. What are you using this tree for? If the height is restricted you can't add random elements without either storing the height of each node or traversing from the root for every insertion.

>> No.77349588

why there 3 threads up?

>> No.77349716
File: 219 KB, 1375x713, 1592728148151.png [View same] [iqdb] [saucenao] [google] [report]

is this true
t. noob

>> No.77349719

Because you shouldn't use mutable object as default arguments in Python.

>> No.77349938

Qt's license is free unless it's for business purposes so

>> No.77349944

Thanks. Just want to know what might be 'old way' and what 'new way' before embarassing myself, haha

>> No.77349978

>reserving bits
wtf you mean?
Also, o(1) space is bullshit.

>> No.77350229

#auto <auto>

auto main() -> auto {
auto a{auto{true}}, b{auto{false}};
auto c{auto{a == b}};

the absolute state

>> No.77350298

he means requesting a shit ton of space ahead of time so it seems like the algorithm uses the same (shit ton) amount of space regardless of the inputs

>> No.77350309

have you tried

>> No.77350326


>> No.77350335


>> No.77350348

Hehe, good one.
If by a chance it wasn't a joke, no that's not cheating, you may always have a high constant space used - this wouldn't save the complexity though, you may aways get input larger than this constant and you are already at linear space.
Even if it worked, it would make O(1), not o(1) space.

>> No.77350473

Hmm not sure I understand Java's "interface"

>> No.77350517

Array is constexpr, vector isn't

>> No.77350525
File: 52 KB, 951x422, 1588412039664.png [View same] [iqdb] [saucenao] [google] [report]

So the abstract interface is its own file? Like in picture, it's Function.java that holds 4 lines of code that doesn't implement anything? and implementation code in whatever class implements it?

>> No.77350536

btw, does anybody have, Fractals, Visualization & J? I want those books but I'm too cheap to pay for them.

>> No.77350548

An interface allows for you to have multiple implementations, it wouldn't make sense for it to be collocated with one of these implementations.

>> No.77350661

>public interface ...
> public abstract double
Oh no, the java aids is coming back to me with a vengeance.

>> No.77350670

Yeah. It's similar to an abstract class, if you have met those before.

>> No.77350682

It's not your fault. Just... don't for a second thing that Java is a good language and get out of there as soon as you can. I have never, ever met a good programmer who liked java.

>> No.77350693
File: 97 KB, 640x640, 1585063419885.jpg [View same] [iqdb] [saucenao] [google] [report]

Yeah I don't like how there's so much stuff that can be auto-generated/copy-pasted and how much of that I need to do before I get to express myself (by actually writing code that can't be auto-gen/copy-pasted).

Or maybe I'm stupid, it could be that too. But this is my experience so far.

>> No.77350701

>but this cant be done in any language ive tried
clearly you haven't tried C or C++ yet

>> No.77350708

>Yeah I don't like how there's so much stuff that can be auto-generated/copy-pasted and how much of that I need to do before I get to express myself (by actually writing code that can't be auto-gen/copy-pasted).
Good. You're gonna go far

>> No.77350898

Matches this here:

>> No.77350903
File: 3 KB, 587x73, Capture.png [View same] [iqdb] [saucenao] [google] [report]

'abstract' keyword is redundant in interfaces. everything is abstract by default

>> No.77351059

In WinForms, how would you make a window with only one component and the window size corresponding to the components size?
Like if you wanted to view an image in a window and the window should just wrap around the image (but we don't know the image size in advance).

>> No.77351079

why can't you load image before you create the window?

>> No.77351088

test1 test2 test3 test4 test5 test6

test1 test2 test3 test3 test4 test5 tes
t4 test5 test6 test5 test6

Name (leave empty)
Comment (leave empty)
Password [?]Password used for file deletion.