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

[Advertise on 4chan]


Thread archived.
You cannot reply anymore.


[Advertise on 4chan]


File: 93552124_p0.jpg (1.52 MB, 1013x1314)
1.52 MB
1.52 MB JPG
previous
>>84453226

What are you working on, /g/?
>>
https://www.youtube.com/watch?v=v_S64kldryc
>>
>>84458053
thanks anon
>>
Reminder that turning a 200 line project into 1000 lines of shitty modular oop which will never be used is cringe
>>
>>84458165
Maybe, if you make the pieces small enough and designed correctly it may make it easier to unit test them.
>>
>>84458260
OH MY GOD I-IS THAT.......... IS THAT............. IS THAT AN UNTESTED FUNCTIONALITY?
>>
>>84458308
AAAAAAAAAAAHHHHHH, I'M G-GONA
>>
>>84458308
accidentally let someone override RIP then you will aptly named RIP when your boss kills your for letting them hack your server.
>>
>>84458322
AAAHHHHHHHH I'M TEEEESTIIING
>>
reminder that cnile "projects" are no bigger than the size of a small console utility
>>
>>84458382
You can make very nice GUI with gtk
>>
>>84458382
All /g/ projects die in infancy. It's the curse of the neet: no reason to chase success.
>>
Reminder that overbuilding a project for the sake of it doesn't make you a better programmer
>>
File: 377502.jpg (49 KB, 488x600)
49 KB
49 KB JPG
What's the difference between C C# and C++? Why choose one over the other?
>>
>>84458422
I feel like this is bait
>>
>>84458422
What do you want to do exactly? Each language has its own pros and cons given a situation
>>
>>84458422
C++ is just C with bloat++...
C# is just Java, still better than bloat++ since it knows it's a trash modern language...
>>
>>84458422
C: this is what you used to make a kernel or something that must be very very fast
It's easy to make a mistake that allows someone to run arbitrary code on your system
The Paradigm you use is fully defined by how you use the code
If you make someone like GTK/Gnome with pure C you get to tell everyone you are smarter than them and be completely correct.

C#: this is for getting things done very quickly

C++: this is for making software
>>
>>84458422
different tools for different tasks
>>
i want cute mascots on my vscode background, the top downloaded background extension doesn't shuffle through images though. what can i do?
it does support custom images via weblinks, but i don't think the vscode css can be changed at runtime and i feel like hosting a local server just to easily shuffle through images is worth it.
what are my options?
>>
how do i program a underwater physics engine
>>
>>84458519
The first thing I'd do is come up with a way to set the density of different areas of water as well as the depth. You'll need those to to perform accurate drag and adjusted gravity. Unless you are trying to make an actual submarines i'd just have a magic force propel you forward instead of trying to calculate water displacement with a propeller, etc.
>>
>>84458519
study CFD first
>>
>>84458519
navier stokes and cfd shit
>>
most lightweight python GUI library/framework/sdk?
>python
yes, I am new. I'm not even sure what's the difference about these three. I'm still reading about concurrency. haven't even touched gui or networks yet.
also fuck python threading
>>
>>84458519
>the laws of physics change underwater
>>
>>84458580
tkinter or wxpython maybe
>>
>>84458587
I mean, they might as well for most programming scenarios. Implementing some kind of grand unified physics engine would be huge, slow, and extremely over engineered for most use cases.
>>
How do I get better at programming? I'm too retarded to think of any personal projects I could do.
>>
File: TLPI-front-cover.png (183 KB, 454x600)
183 KB
183 KB PNG
>>84458759
Big fucking book
>>
>>84458759
Advent of code
4chan image downloader
>>
>>84458759
think of something you do that you'd like to be automated, then automate it
me? I need to build a pc and I'm getting sick of checking if prices part by part in different sources every few days
there, it's that simple
>>
>>84458759
you need to solve problems at least a little beyond your current abilities. if you can't think of any original ideas you can also just re-implement an existing program that's simple yet challenging enough for you. you'll still be forced to learn new things and solve problems while working on it
>>
File: 1624590384659.gif (963 KB, 600x338)
963 KB
963 KB GIF
>>84458759
Your question is vague as fuck. Programming is just transforming data with code. Most I can say is learn project management, problem solving skills and read documentation. Project management to actually do projects and minimize wasted time, problem solving to debug/figure out design of system, and documentation because watching YouTube videos for tutorial is retard level.
In terms of project, if you want to learn a language, doing https://challenge.synacor.com/ and/or making a chip-8 emulator are unironically good projects to do. You have to read up on documentation, structure your program and understand the use of language features. Not only that, the chip-8 one will make you learn how to use libraries, which is a skill that school neglects to teach. It would be a bit too demanding for a newfag to programming, but if you want to step it up go ahead. Besides that, there's https://better-dpt-roll.github.io/ for projects.
Of course, the best projects are done to solve something. Find something you want to automate and automate it. I started out making a program to remind me of the prayer times
>>
>>84458519
If this is for a game, Descent's source code is public, so you could use that as reference.
>>
File: file.png (145 KB, 833x834)
145 KB
145 KB PNG
>>84458832
Thank you. https://github.com/videogamepreservation/descent/blob/master/3D/VECVIEW.C
I want to say I don't do this, but I do a lot. Kek
>>
jesus christ how to stop my procrastination
>ooohh I've slept for only 2 hours I feel baaad I cant
>>
File: bfhconed.png (1.07 MB, 1079x1075)
1.07 MB
1.07 MB PNG
How do I go about accessing a localhost over LAN?
I've got Rust's warp set up to serve localhost:8080. I've tried My-LAN-IP:8080/stuff but no luck. Do I need to open the port or something?
>>
>>84458864
Sleep more, don't masturbate so often, go for a jog or bike ride early in the morning, and do a fun project when you get back. Sounds trite, but the cliche advice is usually the best; that's why it's stuck around for so long.
>>
>>84458832
This is so weird. https://github.com/videogamepreservation/descent/blob/master/MAIN/AI.C. Half of this file is for cheats.
Curious anons, how do you read giant codebases? I've always been assigned to do small parts (implement function at X file, rewrite Y, etc) and never had to deal with something as large as this
>>
>>84458880
it depends on what your server is binding to, is it binding to 0.0.0.0, or 127.0.0.1? or a LAN IP address? it's also possible you have a firewall rule blocking connections to it. I would first check the IP the server is binding to first
>>
>>84458898
I'm usually really afraid of failure
>>
>>84458913
Aren't you afraid of failing due to your fear of failure?
>>
>>84458904
>https://fabiensanglard.net/
This guy has done source code reviews of Doom and Quake. From what I recall his reviews weren't that extensive, but he's still active, so you might e-mail him for advice.
I don't know /g/'s opinion of Carmack, but as a gaymer I've been conditioned to view him as a programming demigod, and I'm gonna go through those games' source code myself once I think I can comprehend it.
>>
>>84458909
It's 127.0.0.1:8080. Running
 sudo lsof -i -P -n | grep LISTEN 
, I see it there
 ... 9u  IPv4 3137940      0t0  TCP 127.0.0.1:8080 (LISTEN) 
>>
>>84458920
yeah...
one of the reasons I procrastinate that much
>>
bros.. I saw my manager's agenda for the meeting on monday and he's going to ask "What's your favorite streaming media" as an icebreaker question.. I pretty much only torrent anime from nyaa, what should I say to blend in with the normies?
>>
>>84458921
Thanks for that. I will look through it.
>>
>>84458935
you can use nmap to make sure the port is listening and not blocked
nmap -sT -p 8080 127.0.0.1

if I remember right. it should say "open" and not filtered or closed for the port while your server is listening. if it's not open either it's not running, bound to something else, or a firewall is probably blocking traffic
>>
>>84458913
That just means you play it too safe, anon. I was a socially awkward fag as a teenager, so in high school I made a conscious effort to actively talk to people. My efforts typically consisted of awkwardly inserting myself into other people's conversations, which is extremely autistic and cringeworthy, and I often physically shudder when one of those memories decides to pop up in my head. But as a result of my embarrassing myself constantly, now I'm pretty socially presentable.
Your efforts in programming are way less likely to result in insomnia-inducing childhood memories like my social efforts, so you really have no excuse. If you never expose yourself as a retard then life will never force you to stop being a retard.
>>
In actuality "Chip8 emulator" isn't the proper term since you are just implementing the Chip8 virtual machine. It is like calling a newly made java virtual machine a "Java Emulator".
>>
>>84458880
>How do I go about accessing a localhost over LAN?
You don't. You need to set up the server to serve on its private IP at least.
>>
>>84458960
Technically it's a chip-8 interpreter
.
>>
>>84458967
of course you can bind to localhost, what are you talking about? you can also bind to 0.0.0.0 which listens on all interfaces for the port
>>
>>84458950
Thanks, I ran the command and it now says `open` under `STATE`. Does that mean I should be able to IPV4-LAN:8080/stuff?
>>
>>84458985
If you bind to localhost then obviously you can't request anything over LAN from another system. Binding to 0.0.0.0 is one way to allow LAN traffic, yes, but if you ONLY want LAN traffic without relying on NAT or a firewall then you bind to the server's private IP (or name mapping to said IP, if you have DNS set up).
>>
>>84458971
It depends on what process you're implementing it through and your definitions. There is very little practical difference between a interpreter and virtual machine. Generally the most common feature to identify a virtual machine is it has some sort of compilation step and its own byte code or machine language that the user can target / write. While a interpreter typically has a higher level language and any bytecode representation happens in the background where the user doesn't often interact with it directly.
>>
>>84459007
you should be able to connect to it locally yes
and you understand that "localhost" is just your machine right? like, 127.0.0.1 on a given machine is yourself, you can't get to it from another computer, it's not a public IP
>>
>>84459021
Yeah I get that bit of course. I'm just trying to curl stuff over LAN. I just tried accessing 192.168.0.115:8080 from another device on the same wifi but I got back a "connection refused"
>>
>>84459056
Well, is the port forwarded on your router?
>>
>>84459056
>but I got back a "connection refused"
right, because like I said, localhost is local to that machine. if you want to be able to access your service from another machine you'll have to bind to "any" (0.0.0.0) or that local IP address that's public on your LAN for that machine (192.168.0.115)
>>
>>84459068
why would you need to touch your router to access anything while on the LAN?
>>
>>84459073
Right, that completely went over my head. I've changed it to 0.0.0.0 and it works. Thanks anon
>>
>>84459081
I don't fucking know, I just always do it just in case
>>
>>84458957
yeah anon I will think about it..

and also I often stop learning because I didn't make something really easy. "why the fuck would anyone hire you if you can't do a thing SO easy lol?? just drop it, worthless"
>>
>>84459098
dude, don't port forward random shit on your router. the only reason you would ever port forward anything through your router is if you wanted to punch a hole in your network to allow connections from the internet into your LAN for something, which I would really only recommend if you know what you're doing, and would probably limit it to a DMZ network if possible
>>
File: ngmi.png (4 KB, 335x58)
4 KB
4 KB PNG
>>84458414
overbuilding? you mean making a massive project that doesn't utilize any pretentious design patterns no ones heard of?
>>
>>84459106
Anon, what some tech employer thinks isn't going to help you at all. What's "easy" depends on your perspective - you might not even be starting out in the right place.
It's like one time as a kid where I was riding a bike with my brother, and I was slow as fuck. My brother kept making fun of me for being such a weak bitch who couldn't even keep a decent pace on a bike. When we got to a stopping point, I was pretty demoralized at how much of a low-endurance faggot I was. We got to a stopping point a few blocks later, and when he came over to me to talk some more shit, he noticed that my bike had a flat tire.
Now, I was pretty retarded for not noticing that for all that time, but it did make me realize that I wasn't such a weak bitch that I thought I was.
This might be your position with learning programming. Like, you're trying to climb a ladder by starting out on the fifth rung and wondering why you're such a loser who can't even climb a simple latter.
>>
>>84459203
>>84459106
>latter
>When we got to a stopping point when we got to a stopping point
See, I'm more of a retard than you, anon. I can't write a paragraph without eating shit on grammatical errors and typos even though I'm a native English speaker.
>>
Gonna start Rust in Action to try to git gud at lower level
>>
>>84458042
NOT gonna lie fellas,
I like Rust.
>>
>namefag
checks out
>>
Rug-able NFT in Solidity (the admin can steal all the coins or replace the metadata, effectively making it worthless)

About to hit a lick'
>>
>>84458042
This is barely a programming project, but I was working on adding chapters to Mr. Plinkett's reviews on YouTube, so that's something I guess.
https://gitgud.io/rpb500/mrplinkett-chapters
>>
>>84458042
>What are you working on, /g/?
trying to convince myself to half ass some c++ instead of working in a better language

>>84458410
i start work soon and i need to get a project working just so i can show up to work actually knowing parts of c++ lol
>>
programming in scala!
>>
>>84459690
Look up herb sutter on youtube and watch his talks since C++14 or so.
>>
>>84459391
Rust is good. It's just the community around it that is cancer.
>>
>>84459738
i'm at the point where i have to write shit if i want to learn. can either do it now or just give up on C++ until i start work and just try and learn it then
>>
>>84459795
grow up a little and you'll learn that communities don't matter, and are in fact mostly an illusion. the only good thing other people do in software is make libraries & documentation.
>>
I unironically started learning Rust just because I needed something like c++ but without the need to constantly fuck around with build systems
>>
>>84460008
that's a lot of pointless effort to avoid about 15 minutes of useful effort
>>
>>84460045
>a lot of pointless effort
Why, it seems decent
>to avoid about 15 minutes of useful effort
lol, I wish, especially taking the state of cmake's documentation into account
>>
>>84460008
based cargo
>>
>>84459795
>It's just the community around it that is cancer.
i see this repeated constantly here but i've never had an issue on github repos, the forums, or the discord.
>>
>>84458921
>I'm gonna go through those games' source code myself once I think I can comprehend it.
Note that the published source code for Doom, relatively messy as it is, is nothing compared to the original: Kreimeier reordered and cleaned up the code quite a bit in preparation for a book he wished to write a la Lions Book (though the exact extent of this cleanup is unknown, hints are still present in naming conventions etc.); keep in mind that it took conscious effort to refactor it to what you now see, which is not the "true" original.
>>
Where do I find references on compiler optimization? Books are all ancient... Is there like a Compiler Monthly journal or something?
>>
>>84460178
lol just figure them out yourself
>>
>>84460178
https://github.com/gcc-mirror/gcc
>>
>>84460200
perfect example now not to write a compiler
>>
>>84460239
dumb apple tranny
>>
>>84460251
over 85% of the linux kernel is zombie code that nobody is really sure what it does but they don't know if deleting it would break something
>>
>>84460265
>85% of the linux kernel is zombie code
those are device drivers you mong.
Of course you are not going to need all drivers because you don't have every peripheral connected to your cpu.
>>
File: blobs.png (17 KB, 282x266)
17 KB
17 KB PNG
my neural network blob guys can reproduce now and they got some new senses. pretty quickly they worked out to all pile up in a corner and not move to minimise energy usage, then just wait and hope a random food drop happens on top of them. like barnacles or something. i guess i need to come up with another way to distribute food.
>>
>>84460317
Try generating a noise map every so often for food drops using something like
https://prng.di.unimi.it/
>>
File: 309.png (124 KB, 600x400)
124 KB
124 KB PNG
>4 hours of working and I have written only one line
>>
What are some simple programming problems? I'm working on an esolang, here's HW and Fibonacci number generator:
[Hello World!]p

[0][1];eb+fe+pl[100]l>!)gj
>>
>>84460470
thanks, that's a good idea. long term i want some analog to photosynthesis going on but i think that'll do for now.
>>
so perl is the most powerful language?
https://www.mcmillen.dev/sigbovik/2019.pdf
>>
>>84460611
Perl is a clusterfuck that almost any input could be a valid program. That paper is explicitly pointing it out. If you consider that as "powerful" sure.

Please let that shit die.
>>
File: file.png (3 KB, 502x290)
3 KB
3 KB PNG
Finally fixed up my programming language enough to solve AoC 2020 day 1 part 1. It's extremely slow though, so some optimization work is definitely in order. I think the slowest part is the pure Self linked list I'm using, changing that to a Vector typed object that I will implement should give me tons of speedup.
>>
>>84460301
Including the device drivers in the kernel itself is an engineering mistake.
>>
>>84460725
Do you want to fork a version of the Linux kernel that does this anon? It isn't going to get fixed any time soon.
>>
>>84460725
>keep them out of tree
>have the NVIDIA situation but x100 with every single driver
No thanks, I'd prefer that whoever changes an API in the kernel also fixes up its users.
>>
>>84460775
The amount of engineering hours you would have to commit for it is not economically feasible. We locked ourselves into a path and colossal technical debt.

> "As good as it will ever be, worse than it ever was"
- Spengler, probably.
>>
>>84460810
Your microkernel utopia does exist. It's called the HURD. Look at how successful it is now.
>>
>>84460818
Who actually uses HURD? I don't think I've ever heard of anyone running a pure GNU system.
>>
>>84460839
There are a few autists who still develop it. Beyond that I don't think anyone ever has.
>>
 Vector(int s) :elem{new double[s]}, sz{s} { } // constructor 

can you tell me what this colon does?
>>
>>84460839
it's not even a good OS in theory

if you're going to make a new OS it needs something to differentiate it, even if it's just some highly specialized niche use case
>>
>>84460880
> highly specialized niche use case
Unikernels / library OS already exist, like MirageOS.
>>
>>84460842
It is supposedly posix compliant so I guess anything that doesn't use os specific code for Linux, Bsd, and mac could be ported. It would be a bitch and you probably have to be really careful with hardware choices. How are people still working on this? Do the developers even use this on hardware?
>>
>>84460583
Do project euler 1-10
>>
File: 1624862999045.jpg (97 KB, 1080x1331)
97 KB
97 KB JPG
>why yes, I did learn C by studying GNU repos, how'd you know?
>>
>>84460583
Make your language self hosting. It is the ultimate test of eso languages.
>>
File: OOPS4.png (4 KB, 246x81)
4 KB
4 KB PNG
>>84461004
Write me a fizzbuzz in less than 50 lines of code. If you add --help or --version you fail.
>>
What is goodprograming language that:
- is easy to use for plugin system
- easy to paralelalise
- doesn't have shitty syntax like pascal, python or lua
>>
>>84461044
ok, let me find out the system call for fizzbuzz
>>
>>84460865
The colon indicates that a constructor initialization list follows directly afterward.

https://en.cppreference.com/w/cpp/language/constructor

Assuming you are talking about C++, of course, which is an important fact you failed to mention.
>>
>>84461048
C
>>
>>84461136
it is, thanks
>>
>>84461148
I don't want my users to compile shit
>>
>>84461004
asmlinkage __visible void __init __no_sanitize_address gave it away
>>
>>84458422
C is just a programming language used in unix and embedded systems
C ++ is just C with objects and other added functionality used to make applications and games
C# is just java with a slightly different syntax
>>
>why yes, I do just use C++ as C with objects, how'd you know?
>>
>>84461194
From looking five seconds at your garbage code base.
>>
I need a good tool to make drag and drop GUI tool for C++, which is not qt. Please help me out and thanks! WxWidgets sucks dicks. I cannot design the UI how I want and everything needs to be in a fucking grid FFS.
>>
>>84461194
I don't think you have to use all the features if you don't need them
>>
File: 155.jpg (36 KB, 321x516)
36 KB
36 KB JPG
Is there a programming website that doesn't look like a chat room for first month CS students?

A place where people have gotten over their "muh language" phase and have enough experience to actually make things instead of filling every single thread with beginner questions.
>>
>>84461266
your in it
>>
>>84461266
You don't need to talk to other people if you're over your "muh language" phase except for business-specific stuff. Programming is about figuring things out yourself
>>
>>84461309
Is this actual autism?

You can talk about other things besides asking for other people to solve your problems, like architecture or design and their pros and cons, or just show what you're working on and get/give feedback.
>>
>>84461364
>Is this actual autism?
>he asks, while begging 4chan to tell him about a nicer place for elite programmers such as himself
>>>/r/eddit
>>
>>84461364
>architecture or design and their pros and cons
Unless you're doing something completely unique (you aren't), those have already been discussed to death. Just find some papers/books/mailing lists

>just show what you're working on and get/give feedback
Honestly, why?

If you want to get better at programming, there are enough resources online for a lifetime. If you're working on a specific problems, there are places for that. But if you just want to "chat about programming" you will always find places filled with beginners, that's just how it is. Why would you even chat about programming in the first place?
>>
File: 1634342940446.jpg (154 KB, 540x936)
154 KB
154 KB JPG
>>84461364
>talking about practical applications of a language
YOU ARE LITERALLY A CHILD
>wasting time comparing value of highly abstract concepts
ugh... finally some real programing
>>
just start the conversations you want to have you turbo-spergs.
keep it TLDR, and maybe throw in some antagonistic-bait, and you'll get ez (You)s
>>
>>84461161
So you want to use it as a plugin system? I take it angelscript wouldn't be a appropriate answer since it is basically embedded C/C++. Did you look into guile or js as a plugin language?
>>
>>84461048
>- easy to paralelalise
What do you mean by this? Should the language be able to run parallel code, or do you want to execute multiple plugins in parallel?
>>
>>84461485
yes, plugin.
>is easy to use for plugin system
>>84461503
I want to make a minecraft clone and make it utilize as much cores as possible. For example, I want so that terrain generation plugin could be written and that it's fuctions could be executed in paralel (especially if it takes several steps).
>>
>>84461634
All of them are of similar difficulty levels to use for your purpose. The standard for your specific use case are Python and Lua but those aren't options since you've stated that they have shitty syntax. Parallelization is going to be mainly done in your game engine. So the question is what exactly are you looking for in the plugin language syntax wise? It is also dependent on what language your engine is going to be written in since most solutions are going to need wrappers.
>>
>>84458382
*uses Qt*
>>
>>84461634
Do you want to use all cores for performance or is it just a fun thing? Current Minecraft is slow because Java is slow, a Minecraft in C/C++/Rust extended with Lua would already be way faster.
For the multicore stuff you have two options: the easy way, where you execute different lua/JS/whatever interpreters in different threads, or the hard way where the interpreter itself can use multiple threads/cores
>>
>>84461766
>Current Minecraft is slow because Java is slow
Current minecraft is slow because it doesn't do multithreading well
>>
>>84461896
and Java doesn't do multi-thread well.
>>
I have forgotten how to do this.
I have a geometric distribution with mean 30. I want to know the probability that a sample is less than 15. How do I do that?
>>
>>84461896
No, not really. A well-programmed minecraft on a single core would run way faster than current Minecraft on multiple cores
>>
how do i simd programming in c
>>
>>84461959
gcc vector extension
>>
>>84461959
You don't. SIMD is NEVER needed.
>>
>>84461959
if you need that level of performance optimization you might as well just use assembly
>>
>>84462064
>this line
there is 7 of them
>>
>>84462064
You're still on that?
>>
>>84461915
So 30 Bernoulli trials is needed for a success or 29 attempts for the first success. So you want to calculate the odds of success when there are only 15 attempts?

Fuck I don't remember much about statistics. The trials are all coin flips in Geometric distributions.
>>
>>84462185
An *average* of 30 attempts until first success.
>So you want to calculate the odds of success when there are only 15 attempts?
Correct. I realized that I'm dumb (actually, I knew that). I just needed the CDF.
scipy.geom.cdf(15, 30) = 0.4
>>
>>84461977
The world of scientific computing wants a word with you.
>>
>>84462234
And this is great. 0.4 is supposed to be a naive lower bound on the ratio of failures in an experiment. When I run my simulation, I get 0.38 percent failures total - my simulation is better than mathematically possible.
>>
>>84462241
whoa, to think that the scientific computing community has come to /dpt/ to ask us to teach them simd, truly an honor
>>
>>84462282
That's not what the anon I responded to was talking about. He said SIMD was NEVER needed. Without going into the meaning of needed, I guess nothing is needed, certainly scientific computing would be a lot slower without it.
>>
>>84462282
Well when integral equations, cumulative distribution function, and geometric distributions pop it is typically going to be the scientific computing community. They are the only group of programmers outside of machine learning that regularly use PMF, PDF, CDF. The good news is I never intend to touch either industry with a 100 foot pole because I've forgotten 90% of the math I've learned since high school.
>>
programming is just a fad, pick a real major like hospitality or animal husbandry
>>
Pipenv can't lock dependencies for shit, making it shit to use in CI
Poetry lead dev doesn't consider CI to be part of the requirements for poetry
Virtualenv is verbose as hell

What package manager do you guys use? They all work if you consider somewhat simple use cases, but once you add complexities they start failing.
>>
>>84462902
I don't use Python precisely because of this bullshit
>>
>>84462902
Just install it all via apt-get.
>>
This is /g/ so of course odds are Portage, Pacman, or Apt.

Unless you are talking about programming specific managers like cargo, cabal, quicklisp, pip, and npm.
>>
goddamit making and verifying a netacad account to use my packet tracer is so complicated. back then i already made one using a burner email, a few weeks later i open the app again and it just logs out on its own. now i have to repeat it all over again by watching those indian tutorials.

does anyone know the easier way to do this shit? any network guy here?

https://youtu.be/04VpVYO7F78

im afraid after trying this again, in a few weeks it will log out on its own like before
>>
so I have a list of objects and I want to keep the objects that have a max amount of somethings (i.e. no.of rentals or no. grades) and delete the objects with that said field lower than the one that's max?
I tried using the max() function but I'm retarded since that just prints the max item and doesn't delete the ones that are lower than it
>>
>>84463045
OK. And?
>>
>>84463054
is there a function that does what I need to do or how do I fix that issue
do I just have to iterate thru each object in the list of objects and check if that specific field is bigger or not
>>
>>84463045
Yeah, you have to loop through them to find the max amount, then loop through them again to delete the ones that have the amount less than the max amount. In Scheme, it'll look like this
(let ((limit (apply max
(map (lambda (obj)
(get-that-amount-of obj))
obj-list))))
(filter (lambda (obj) (< (get-that-amount-of obj) limit))
obj-list))
>>
>>84463074
programming language? you could use a comprehension in Python, or loops, or really whatever fixes your problem.
>do I just have to iterate thru each object in the list of objects and check if that specific field is bigger or not
basically, yes.
>>
>>84463074
sort and then iterate until the value is not equal to the initial, max value.
There's probably a better way though
>>
>>84463074
for objects in list
if !(field >= maximum_size)
delete object
>>
>>84463042
pls help
>>
>>84463074
what you're looking for is a filter operation
>>
>>84463092
>>84463093
>>84463101
>>84463103
fixed it, thanks anons
i basically just did this
>do I just have to iterate thru each object in the list of objects and check if that specific field is bigger or not
>>84463093
yeah, it's pyh*n

>>84463329
a filter operation? wdym?
>>
>>84463346
You want to map a function over a collection and filter away the results that don't match the filter predicate.
>>
>>84463356
isn't that basically what I did when I iterated thru the list of objects?
or well, not really if I i think about it since i iterated in a method that was supposed to get the no. of rentals (the field i was talking about) and it kinda violates srp
good to know, though, I'll definitely refactor the code
>>
>>84463346
https://en.wikipedia.org/wiki/Filter_(higher-order_function)
filter is an operation that takes a collection and a condition
it returns a new collection with the elements from the input collection, but only those that met the condition (condition function returned true)
>>
Which keyboard do you use and recommend for programming?
>>
>>84463483
https://www.pcgamingrace.com/products/gmmk-full-brown-switch
but get dvorak/layout agnostic caps
>>
>>84463553
>RGB
eww gross anon
>>
>>84460008
>>84460090
Just use https://github.com/friendlyanon/cmake-init and look at the examples in the wiki for any particular thing.
If something is not covered there, just open a discussion and request something new.
>>
>>84463594
you can completely turn it off, or only have the key you press light up, among many other options
>>
Is inheriting part of implementation really a huge meme? Should C++ really have separated interfaces and non fully abstract classes?
>>
>>84460714
Let's go self anon. I believe in you. I had to take a week off of work, so I can go ham during those 7 days
>>
why are the first and third elements not getting assigned to fill the index gap ( [2], [3] ) and instead either not being indexed at all or maybe just indexed as some random number?

typedef enum {
SECOND,
FOURTH,
} T;

struct TC {
int a;
int b;
unsigned c;
unsigned d;
};

int main()
{
struct TC tc[] = {
{
.a = 2,
.b = 5,
.d = 22,
},
[SECOND] = {
.a = 4,
.d = 24,
},
{
.a = 55,
.c = 66,
},
[FOURTH] = {
.b = 11,
.d = 111,
},
};

for(int i = 0; i < 4; i++) {
printf("a=%d, b=%d, c=%d, d=%d\n", tc[i].a, tc[i].b, tc[i].c, tc[i].d);
}

return 0;
}


output
a=4, b=0, c=0, d=24
a=0, b=11, c=0, d=111
a=1016700976, b=32766, c=1003277312, d=-1717506908
a=0, b=0, c=636059827, d=32564
>>
my lecturer keeps hitting on a girl colleague and it's the funniest shit ever seeing how he is acting super confident and acts like a chad even though he's a mega incel and the girl is creeped out
>>
File: filesystem.png (118 KB, 1920x933)
118 KB
118 KB PNG
>>84458042
I'm working on software (SaaS) which presents and analyzes digital evidence to be presented in court.

I'm starting with emails so I've implemented the PST file format specification in Golang: https://github.com/mooijtech/go-pst
>>
>>84458042
How do I traverse a non binary tree for which I know the roots and its direct descendants? I am trying to scrape hackernews and the comments uses this tree style so you first get a list of ids like [1,2,3,4] and for each id you are supposed to lookup the children i.e. 1 -> [5,6], 2 -> [] etc.
How do I iterate over that?
>>
>>84464092
Use recursion
>>
>>84464009
printf("%d %d\n", SECOND, FOURTH);
>>
>>84464092
>>84464118
Make a function GetRootComments -> Comment
Make a function GetChildComments(comment Comment) -> []Comments {
var comments []Comment

for _, c := range comment.children {
comments = append(c,Comment {
name: c.name
children: GetChildComments(c)
}
}

return comments
}

Shit code but you get the idea
>>
>>84464147
outputs '0' and '1' as expected
>>
>>84464092
You traverse a tree by recursively calling the traversal function on the child nodes (it works because each node is a subtree).
>>
how do i write assembly in C and C++?
i found some docs online where it said I had to write something like __asm__ but it didn't work for me
are there any other ways?
>>
>>84464092
const children = {
'1': ['2', '3'],
'2': ['4', '5'],
'3': ['6', '7'],
'4': ['8', '9'],
'5': ['10', '11'],
'12': ['13', '14'],
};

const iterate = (tree, node, callback) => {
callback(node);
if (tree[node]) {
tree[node].forEach(child => iterate(tree, child, callback));
}
}

const toto = iterate(children, '1', node => console.log(node));
>>
>>84463588
>redditjak
You are not welcome here. The mods of 4chan have spoken and banished you back to your basedjack website. Please stay there.
>>
>>84463646
abstract classes are a hack over backwardness of inheritance

you want any class that can do both A and B to be able to do C, if not automatically then at least easily
A and B are both unique to whatever type implements them, but C's implementation uses only methods of A and B, so it's always the same
you don't want to replicate code
>inheritance way
>C is an abstract class, inheriting from both A and B, it implements C functionality as a method
>then actual classes inherit from C and implement A and B functionality
>interface composition way
>you implement interface C bound on A and B, then it's methods
>actual classes just implement A and B
in go you'd use interface embedding and C's "method" would be a function taking a C
in rust you'd make a trait C and a generic implementation of it for anything which implements traits A and B
>>
>>84464165
yep and that's the problem. [3] and [4] can't be accessed that way and therefor holds random-data
>>
>>84464182
you write some ASM functions based on C ABI, you make them public, you compile an object file
you write some C code, you declare your external ASM function, you compile an object file
you link them
>>
>>84464252
I meant [2] and [3]
>>
>>84464252
I don't understand. normally the array would be indexed
[0], [1], [2], [3]
but then I come along and state that the second and 4th elements should use 0, and 1 (from the enum)
[?], [0], [?], [1]
now shouldn't the compiler fill the first and 3rd elements with index [2] and [3] to give me
[2], [0], [3], [1]
??? it does not appear to be doing this so what is it doing instead? Are those other 2 elements even accessible?
>>
>>84464313
been reading through the standard on designated initializers and here is what I learned & why my code wasn't working. mixing the designated initializer with the default ones works BUT they must be successive as it only fills in gaps. so because I'm using 0 & 1 as an index, they MUST come first in the initializer and then 2 & 3 will be the index of the subsequent items. My original code could work as is if I had stated that enum SECOND = 1 and FOURTH = 3.
struct TC tc[] = {
[SECOND] = {
.a = 4,
.d = 24,
},
[FOURTH] = {
.b = 11,
.d = 111,
},
{
.a = 2,
.b = 5,
.d = 22,
},
{
.a = 55,
.c = 66,
},
};
>>
>tfw you were using concurrency and you didn't realize it
The world makes a lot more sense now
>>
I fucking hate the bastard who made it so None has to have a type. I can't just pass none, which has no data, without passing the type of none
>>
>>84464604
what
>>
>>84458723
Air is a fluid as well.
Just increase the drag coefficient and you get underground scene.
>>
File: 1622720620085.png (11 KB, 911x190)
11 KB
11 KB PNG
>>84464638
I think he means this?
>>
>>84464604
Assuming you are talking about Rust, the type gets deduced 99% of time.

>>84464655
Wtf are you doing. None is a value of Option<T> type, it's not a type itself.
>>
>>84464604
What language?
>>
>>84464655
I mean
    test.step(None);

Doesn't work because
    |          ^^^^ cannot infer type for type parameter `impl Write` declared on the method `step`

But
    test.step(None::<BufWriter<Box<dyn Write>>>);

Does work
>>
>>84464655
what
>>
>>84464675
None is a value of Option type, you can't pass None without a type, and Anon wants to just pass None without a type (see >>84464674)
>>
>>84464703
ye i know that I wondered why you put an enum variant as a type
>>
>>84464674
Can't you do something like:
const NopWriter: Option<BufWriter<Box<dyn Write>>> = None;

Also you might just want to implement such a NopWriter yourself instead of using some weird random implementation of Write for an Option.
>>
how can i improve this code?

def queueLinkFromClipboard():
pyperclip.copy("")
previous_clipboard_text = pyperclip.paste()
while not quit:
current_clipboard_text = pyperclip.paste()
if current_clipboard_text != previous_clipboard_text:
previous_clipboard_text = current_clipboard_text

links.put(current_clipboard_text)
print(f"Items in Queue: {len(links.queue)}")

print(f"Clipboard: {current_clipboard_text[:300]}")
quit = current_clipboard_text == 'quit'

time.sleep(0.2)


def downloadQueuedLinks():
while True:
if len(links.queue):
link = links.get()
if link == 'quit': break
else: downloadMediaFromClipboard(link)

time.sleep(0.2)

def main():
links = queue.Queue()
quit = False

linksQueue_thread = threading.Thread(target=queueLinkFromClipboard)
downloadQueue_thread = threading.Thread(target=downloadQueuedLinks )

linksQueue_thread.start()
downloadQueue_thread.start()

linksQueue_thread.join()
downloadQueue_thread.join()
>>
File: file.png (117 KB, 589x1709)
117 KB
117 KB PNG
I'm reviewing up on my C# and I never knew this language had so many weird fucking things you could do with it. It almost feels like a lot of bloat shit. At some point, it feels like you're showing off more than getting things coded and done.
>>
>program crashing because it's trying to jmp to address 0
>wtf
>look at callstack, previous call is to a virtual function
>look at vtable of object, table contains a null pointer
>wtf
>look at table of other object of the same type
>vtable is normal
>turns out MSVC decided not to recompile some files after adding a virtual function to the base class
>objects constructed in the effected TUs still have the old vtable with an empty slot
>everything else works normally
>clean build, problem goes away
lol MSVC never fails to amaze
>>
>>84464862
>It almost feels like a lot of bloat shit
maybe because it is? C# has way too much crap implemented as language level features that's designed to solve some pinpoint really specific problem.
>>
>>84464862
>Local methods are bloat
?
>>
>>84464913
It reminds me of some of the metaprogramming stuff from C++.

>>84464927
I never knew you could make local methods. I get why you would. That way I don't have to put some new small helper method at the bottom of my code as I add them. But then you get stuff like "here's another way to do a contructor!"
>>
>>84464862
>First class functions
>Getter and setter properties
>Deconstruction assignment

Those are pretty common features in many languages.
You can argue they are not necessary, but you should be familiar with those concepts if you have been programming for a while.
>>
>>84464946
Except metaprogramming is actually useful for more than one thing.
>>
>>84464946
>But then you get stuff like "here's another way to do a contructor!"
That's fair, what >>84464913 is a pretty good explanation of that. It's the old "C++ programmers ask for new features in the language, C programmers just write more C code", and C# is following the C++ philosophy
>>
File: file.png (143 KB, 547x1721)
143 KB
143 KB PNG
>>84464958
Im familiar with it. But there's a lot of extra stuff that are just there.
>>
>>84464870
Nothing to do with msvc, it's the build system and make wouldn't catch this either. This is why new langs include a build system, because the dependency tree of files (exec depends on objects depend on source) isn't the dependency tree of actual code.
>>
File: file.png (141 KB, 790x1715)
141 KB
141 KB PNG
>top level statements

So fucking stupid. All of these "features" just decrease readability. Are they trying to appeal to functional programming and web dev fags?
>>
Can someone identify why i get "ValueError: list.remove(x): x not in list" sometimes?

Not a good code, but i think you can understand:
 from random import choice
deck = {'': ['2', '3', '4', '5', '6', '7', '8', '9', '10', 'J', 'Q', 'K', 'A'],
'': ['2', '3', '4', '5', '6', '7', '8', '9', '10', 'J', 'Q', 'K', 'A'],
'': ['2', '3', '4', '5', '6', '7', '8', '9', '10', 'J', 'Q', 'K', 'A'],
'': ['2', '3', '4', '5', '6', '7', '8', '9', '10', 'J', 'Q', 'K', 'A']}

def getCard():
k = choice(list(deck.keys()))
a = choice(list(deck[choice(list(deck))]))
print(f'|{k}{a}|')
return k,a

def deckRemover(k,a):
deck[k].remove(a)

c= youTotal = heTotal = 0
youTap = heTap = 'y'

while True:
print('*'*30)
if c >= 2:
youTap = input('Keep going? [y/n]')

if youTap == 'y':
print('Your card: ')
key,val= getCard()
deckRemover(key,val)
if val in 'AJQK':
if val == 'A':
val = 1
else:
val = 10

youTotal += int(val)
print('Total',youTotal)

if heTotal >=18:
heTap='n'
else:
heTap = 'y'

if heTap == 'y':
print('*'*18)
print('His card: ')
key,val = getCard()
deckRemover(key,val)
if val in 'AJQK':
if val == 'A':
val = 1
else:
val = 10

heTotal += int(val)
print('Total',heTotal)
c += 1
if youTotal > 21 or heTotal > 21:
break
>>
>>84465237
Messed the dictionary. Should be the cards suit symbols.
>>
>>84464862
>>84464991
>>84465229
Those are all purely optional, stop being autistic retard.
>>
>>84465229
>Being able to write functions outside of classes is "appealing to function programming and web dev fags"
The absolute state of Csharters
>>
>>84465229
ghc -XNoTemplateHaskell doesn't have this problem
>>
>>84465274
It's literally just writing line by line code with no structure to it. It's not even a function at that point. Shit's stupid.
>>
>>84465273
>Those are all purely optional
Many interview tests use these features of C# unfortunately.
>>
>>84465339
C# is trying to do everything, you need stuff like this to make writing scrips not be a pain in the ass
>>
>>84465348
Oh right I forgot C# is also a scripting language for some stuff. No wonder I was getting script vibes
>>
>>84465229
They are trying to cast a wide enough net to people who fall for the C# meme, the idea is that once you rely on these special snowflake features you won't be able to backport them to other languages so you are forced to only use C# and then as a natural consequence of that you will then use VSCode or Visual Studio and compile telemetry in to all C# your apps for them.
>>
C# seems like a bad language.
>>
>>84465370
If its a business move, I can see that. All of these features break coding fundamentals.
>>
>>84465385
Why? I enjoy it a lot more than other languages.
>>
>>84465385
It's okay as long as you treat it like your traditional programming language. Ignore all of the optional shit. Problem is that we have a lot of narcisstic programmers who write stuff with these features to try to appear smart. When really it just makes the code harder to read and manage.
>>
>>84465359
That's also why there's more and more low-level features in the language, some people are trying to replace C++. The scripting is also to try to get more people in the language as it makes it easier for beginner tutorials. They're doing the same with .NET 6 with their minimal API https://docs.microsoft.com/en-us/aspnet/core/fundamentals/minimal-apis?view=aspnetcore-6.0
>>
File: 1626103653572.jpg (37 KB, 474x479)
37 KB
37 KB JPG
>it's another cringing after the interview episode
>>
>>84465437
>aspnet

Its a fun web dev language, but I really dont like messing with nodejs style programming
>>
>>84465419
>why yes, I'll use this needlessly complex language features and add 10 layers of abstractions intertwined with 20 different design patterns to make this simple module
>now everyone will think I'm smart and good programmer and if they ask why I did it that way I'll mock their lack of knowledge and experience, yes yes....
>>
>>84465469
I didn't think we were talking about C++
>>
>>84465469
At work there's a programmer who loves the fuck out of templates and generics. So whenever someone else on the team has to debug it for additional enhancements, we have a lot of trouble following the workflow due to not being able to tell whats happening except for at runtime.
>>
>>84465237
Your getcard function is broken. First, you are picking a random suit, then picking another random suit to pick the value. So you could use the suit you chose to select a value from the deck and solve the crash. The problem with that is that you aren't picking randomly from the deck, suits that have already been chosen have too high a chance of being picked again. Do this instead: deck = list(itertools.product("HDCS", "23456789JQKA")); getcard = lambda: deck.pop(randrange(len(deck))
or something like that
>>
>>84465456
What do you mean by "nodejs style programming"?
>>
>>84465443
What did they ask you?
>>
>>84465443
cry during the interview next time
>>
>>84465443
Just like not care and your life will be easier.
>>
>>84465506
javascript and php all have your standard

>there's no real flow or point of things except everything is acting by itself and sometimes interact with other programs, so there's no linear setup for anything
>btw, here's callbacks linked to callbacks
>>
>>84465507
"Are you interviewing with us as a prank? It costs the company money for me to entertain you when I could be working, or interviewing serious candidates."
>>
>>84461959
#include <immintrin.h>
https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html
Compile with -march=native -mtune=native
>>
>>84465535
ouch, harsh
but fuck them, take pride in wasting some corpo money and time
>>
>>84465528
Not really? JS mostly switched over to promises now, and PHP is plain synchronous code on threads that share nothing
>>
>>84465535
Can we have some more details, anon?
>>
>>84465535
>Blaming other people for your own failure at proper screening
Shit company
>>
>>84465565
This. Always a bad sign.
>>
>>84465559
Oh yeah I forgot about promises. aspnet has those, too.
>>
>>84465576
In JS you're almost forced to use them or callbacks since it's single-threaded, but in asp I guess you can avoid them unless you want to optimize?
>>
>>84465507
nothing much, it was the final part and we mostly talked about experience with leads and what i want to do and my dream company etc. i talked too much about ops processes and they asked if i'm more interested in devops than development, and i might have also indicated that i'm lazy by saying that strictly following sprints puts more pressure on people
>>84465509
y-yeah
>>84465520
i'm trying
>>
up until two (2) days ago I had no clue javascript and java were two different things

why did they name them so similarly
>>
>>84465622
Marketing. That's also where JS type coercion comes from
>>
>>84465622
web 1.0 people wanted dynamic behavior
Sun at the time was contracted to embed Java, and another guy was supposed to embed scheme
Netscape said "nah just make a java-like lang instead".
and then they changed the name to JavaScript for marketing
>>
>>84465495
Oh you are right... Now that you pointed it seems so obvious. I spent a lot of time trying to spot this error but i couldn't. Thank you, man.
>>
>>84464182
Depends on your compiler
For GCC/clang you use
// basic asm
asm(
"xor %%rax, %%rax\n\t"
);

// extended asm
asm(
"mov %[var1], %[var2]\n\t"
: [var2] "=r" (var2)
: [var1] "r" (var1)
);


You need the former for naked functions and global asm blocks and you need the latter for interacting with C variables from assembly. Extended asm is pretty tricky, you often need to add clobbers, early clobbers, storage modifiers, volatile, and other hints for the compiler to generate the correct code. It's also AT&T syntax by default (which can be changed but isn't recommended for a few reasons) https://gcc.gnu.org/onlinedocs/gcc/Extended-Asm.html

If you just need to write a function as assembly and don't need one portion of a function in assembly, you can declare a naked function and just use a basic asm block in it and write the code based on whatever ABI you're targeting. This is usually easier than having a separate .s file and needing to run as and a separate linker step to integrate it with C code, but this won't let you do everything that using a separate .s file will let you do (mostly relevant for OS/embedded development)
>>
>>84465385
It might be the best non-autistic language we have right now.
>>
>>84465777
What do you consider non autistic anon? Having everything in classes for no reasons sounds like autism to me
>>
>>84465622
Java was supposed to be the language of the web and JS was supposed to be just a scripting language. Now Java is non-existent on the web and the web is built on JS. Ironic.
>>
>>84465867
And WASM is coming which is like the JVM 2.0, write once run anywhere
>>
>My company provides Coursera for training and development opportunities.
>My company overworks me and doesn't give me a chance to use it in company time.
>I'm too tired after work to want to do more coding.

Thinking of taking an hour a day to do some of the courses. It's not big enough that anyone will notice but big enough to make small bits of progress.

Would you do this first thing, middle of the day or end of the day?
>>
>>84465806
Structs exist, which are value types vs classes which are references. This is C#'s way of technically using pointers but hiding them from the average user.
>>
>>84465889
First thing, especially if you feel too tired at the end of a day
>>
>>84465867
Java technically is still used for the web at some jobs.
>>
>>84465622
i didn't know java was used outside of school until after my first internship

i legitimately went 4 years of college thinking it was a dead language
>>
>>84465867
Java is heavily used for web stuff, but on the backend
>>
>>84465889
The last thing, if it is something you are interested in so you can relax after work.
>>
>>84465889
Can said company receive information on when you're doing the course work? That would be a very good way to get fired fast if they can.
>>
>>84465889
find a remote job bro
>>
>>84465535
>"Are you interviewing with us as a prank?"
>"Yes."
Should have ended there.
>>
>>84466167
interviewers don't ask that question until the end of an interview.
>>
>>84465443
i went through like every fucking emotion after my interview

even after i get the job i feel kinda bad like i got in even though i'm inherently bad as a SWE
>>
why use c when you can just write c++ exactly like c but with useful shit like vectors
>>
>>84466322
dude you are such an impostor syndrome lmao you are probably a code god but feel like you suck right? jeeze that's sooooo crazy!!!!!!! XD
>>
>>84466334
because the sdk for my embedded processor only provides a C compiler
>>
>>84466334
it's fun to be limited like when using posix sh instead of bash
>>
>>84466344
lol no i objectively suck at programming and i do the bare minimum to try and improve because i'm lazy

but even a retard like me can get a job in this economy
>>
>>84464674
that's the solution for that case and i use that pattern, but the NopWriter the other anon suggested is also an option.

i'm not sure what your code looks like but it might be easier to use generics instead of trait objects within function parameters. it doesn't solve this case but you can avoid boxing as much, and it's the typical way generic IO is written.
fn step<W: std::io::Write>(w: Option<W>) {
>>
>>84464066
What do you mean by "presents and analyses"?
>>
>>84466334
C is dead. Don't use C.
>>
behold my beautiful abomination
https://anonpaste.org/?2dcb4f4e5c5fb30c#9jJQWC8Upo8GCW7pnEEf3SCKjV2i4gijYrvcj7QjaevX
>>
>>84466529
> Could not get paste data: Paste does not exist, has expired or has been deleted.
>>
>>84466545
try again
https://anonpaste.org/?21cf4178e92bbfe8#BPm4bFvwQhSRgN6BMEq1qAkZd23cuZKjLPuSCHXhehw1
>>
>>84466607
I hope you have a good plan for testing that behemoth function or don't need to test it.
>>
File: test9.png (49 KB, 726x702)
49 KB
49 KB PNG
>>84466802
here is the test input
>>
>using functions
>when a simple jmp would suffice
>>
>>84466857
>using general purpose hardware at all
>>
>>84467073
personally I don't even compute anymore, I just imagine what it'd be like if I did
>>
>>84466334
Why use c++ when you can just write Rust and have memory- and thread-safety
>>
>>84467502
Why write Rust when you can write OCaml without threads and have that plus garbage collection?
>>
>>84467373
Same, I imagined so many projects and programs.
I can't wait for imagination-computer interface so I can actually make them.
>>
Why use languages that can't just work in a browser? Don't you guys have browsers?
>>
>>84467542
any language can "just work in a browser" if you have a server.
>>
>>84467542
OCaml compiles to JS so I don't see your point
>>
>>84466000
Can they? Probably.

But they'd only check if they had a problem with the work. So I'm safe on that front.

>>84465910
I'm terrible in the morning. But I do feel it would be better to do it fresh.

>>84465929
Just how much tiredness. Some of it may be interesting. But I'm not sure enough to wake me up.

>>84466158
I am remote. That's why I can just do training sessions.
>>
sorry bros it's time to vent. I am getting so fed up with my body succumbing to all these diseases preventing me from working on my projects.

Crohn's disease had me in the bathroom for hours a day this year, and I didn't sit for 4 months because of that bullshit. Thank fuck for biologics and work from home.

Now I'm getting shingles or some weird rash on my leg making it difficult for me to sit again. All I want to do is make my shitty little open source VueJs/Flask web app for learning Chinese cus Anki is uncomfy garbage and Hackchinese costs money.

I have 93k in liquidable stocks and a shit future projection healthwise. I feel like going to sea and pulling the trigger after spending it all in 3 months.
>>
wait so x86 processors literally just turn all numbers into doubles when doing maths?
>>
>>84467631
Just get a standing desk?
>>
>>84467631
can I have ur stuff?
>>
>>84467631
get some horse dewormer (worms suppress your immune system, the better to parasitize you) and vitamin D, rub some dirt on it, then walk it off.
>>
>>84467680
Yes. How else would you multiply a char by an unsigned long long?
>>
>>84467791
You wouldn't, that's a compile time error :)
>>
>>84467631
I'm really sorry you have to deal with that. I hope things work out for you. <3
>>
does java add the this-keyword automatically while compling if you dont include it?
>>
I finished this grade successfully but this dykish tomboy who is barely fuckable enough for me to put in effort in asking you guys for help didn't so this is the retake assignment.

How would you solve this?

https://docs.google.com/document/d/1-BEgydW32_mDaM7cuUbidYUk8bUgD_4jMcpd-pH07Xc/edit?usp=sharing
>>
>>84462712
tbqh gay prostitution will probably never go out of business for the virgin freaks that lurk on here, should look into it maybe as it earns pretty well I reckon
>>
>>84468002
Well it doesn't add this, but it looks for the locally named variable first and if it doesn't find it locally it checks the instance fields. It's called an unqualified access to an instance field and it's a code style that you can disable in the compiler which turns it in to a warning or an error if you try to do that.
>>
>>84468037
Post pics of the tomboy
>>
>>84465535
If they actually asked that, that is incredible. Like if I ever asked that to a candidate during an interview, I'd probably get in serious trouble. Please share more details about your interview.
>>
>>84468037
>probe in orbit is taking vertical slices of a planets surface
the fuck? also this is easy as shit, why do you need help with this?
>>
File: Screenshot (69).png (754 KB, 1274x716)
754 KB
754 KB PNG
>>84468076
she's not remotely gf material but if she let me blow a load on her belly i'd be pretty glad
>>
>>84468141
because I'm a freshman and don't have years of experience
also because I am a brainlet
the professor could do this in 5 lines supposedly
>>
>>84468070
thanks anon, the book im reading made it sound like instance variables would change for future new objects if i dont use this
>>
>>84467631
could be worse bro, diabetus took my feet and 7 fingers
>>
>>84467631
this you?
>>
>>84468037
>An automated probe is sent to conduct orbital surveys of nearby planets.
Is this an exercise for children? Why can't they just give the actual problem
>>
>>84468247
I liked the little story they gave ;-( made me feel like I'm playing EVE Online
Also yes, university has kids aged 17 so it is quite literally meant for children
>>
>>84468162
cols=int(input())
data=bin(int(input))[2:]
data = [data[-i-1::-cols] for i in range(cols)]
heights = [col.index("0") for col in data]
print(max([(i,a) for i, a,b,c in enumerate(zip(heights[:-2], heights[1:-1], heights[2:])) if a==b==c], key=lambda x: x[1])[0])

something like that. Five lines is tricky.
>>
>>84467680
no
>>
>>84468360
u r the goat
how should I credit you?
>>
>>84468283
17 isn't a child. Go back 2 generations and there was 12 or 13 year olds with full time jobs.

I've no idea where this idea came about that 18 year olds are still children within literally a generation of time (40ish years).
>>
>>84468390
When I was a kid I wanted a job when I was 12, but couldn't because of child labor laws. This is retarded because an autist like me really could have done with learning how it is to have a job sooner.
>>
>>84468447
The eternal wagie
>>
>>84468360
this is the angry text when i input 5

Exception has occurred: TypeError
int() argument must be a string, a bytes-like object or a number, not 'builtin_function_or_method'
File "C:\Program Files (x86)\Steam\steamapps\common\RimWorld\Data\Ideology\AssetBundles\cols=int(input()).py", line 2, in <module>
data=bin(int(input))[2:]
>>
>>84468459
>
 File "C:\Program Files (x86)\Steam\steamapps\common\RimWorld\Data\Ideology\AssetBundles\cols=int(input()).py

What?
>>
>>84468390
what's your opinion about NEET, anon?
>>
>>84468500
I don't know why it uses my Rimworld file either
>>
>>84468506
We need more to drop out of the mainstream work force and move into trade labor / growing food. Blow up the fucked economy. A good 10% - 20% of the work force going back to how it was in the 1600s or 1700s would royally fuck with this bullshit capitalist system.
>>
shouldn't pointers to functions/data result in a ton of cache misses?
>>
>>84468500
Lmao, you just helped some rimjob tranny with its personal project
>>
>>84468670
What the fuck are you talking about?
>>
>>84468670
>rimworld
>tranny
not an existing stereotype
larping as cowboys is kino
>>
>>84468658
>trying to guess whether or not the processor is going to cache something
lol
>>
>>84468658
Just run your program with cachegrind and find out, trying to predict how modern processors will do things is usually a waste of time
>>
>>84468807
>lol caches on my machine
>>
New thread: >>84468845
>>
Testing inclusion:
>>>/wsr/1121460
>>
>>84469143
Well whatever, here's the correct indentation:
function respond(common,reply){
validate('board' in common ? common.board.topic.match(common.thread.topic()) : common.locate(Board, reply, 'subject'), reply.match(common.rules.test(/contributes/)), probable(Audience,reply,reply.threshold)) || (common ? common.error(ThreadFault) : (common = create.thread));
if ('function' == reply.post) return reply;
if (reply.post) return common.post(reply,common.thread)
if ('nobot' in reply.render && reply.render['nobot']) throw BotCrash;
if (!verify(Sentiment.scan(reply), Sentiment.personal,common.open,common.valid,common.ground,common.allowed)){var d;
d = deliberate(reply,common);
if (Sentiment.offensive in d) throw new GTFOError(common.source);
deliberate(d) || d.delete()
}
personal.check(reply,common ?? Public.latest)
return reply
}



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.