Old thread: What are you working on, Jow Forums?
/dpt/ - Daily Programming Thread
Other urls found in this thread:
youtu.be
ziglang.org
pastebin.com
dictionary.com
twitter.com
Friendly reminder "Computer" "Science" is not a science and isn't especially about computers
Pozzing my CoC in some Rusty Forth while I eat Mozilla cheese on the Go.
why isn't it a Science
I'm working on arguing off-topic about medieval life in /dpt/.
This is a thread about programming, not computer science. Fuck off, jewish elite.
It has no relation to physical phenomenons of world.
yes it does
Is math a science?
No, not a hard science.
no
cumming!
>electrons on copper wires
>no relation to physical phenomenons
>computer science
>electrons on copper wires
choose one fag
it's fine man, /dpt/ is a very nice place, I hope enjoy yourself
I studied CS and did my master's on signal processing??? What do you mean?
>/dpt/ is a very nice place
its been pretty shit lately
Programming is probably the (or one of the) most important and central parts of CS though.
>copper
The shit your shitty college program calls CS doesn't mean CS is about computers.
nah it's just you
>lately
It's literally in the name, Computer Science.
You've been watching too much SICP. They go around and spout the meme that CS is somehow only lambda calculus and currying, when it's clearly a wider field than that.
Only Americans have this weird distinction where CS is a course in IT.
processing is probably the keyword, what did you do? logic gates and if statements are both programming
What gets me about these pics is that masturbating with cement, glass and rebar would hurt like dogshit.
Hell just sitting on a building would hurt like hell
>masturbating with cement, glass and rebar would hurt like dogshit.
if your penis was that large it probably wouldn't, it would be extremely robust
You have spent too much time on >>>/reddit/
3D edge detection for multi camera, pre-AI and pre SIFT (this was back in 2009).
And you've spent too much time jerking off in build threads and writing fizzbuzz instead of studying, friend.
yeah that's CS, but how does that depend on what user said, electrnos on copper wires? could have been on some other hypothetical computer
The other user said it didn't relate to physical phenomenons, but modelling/reconstructing a 3D object from digital images of light is clearly related to physical phenomenons.
Not an argument, bucko.
that's just the application of CS. CS is not about modelling 3D objects from digital images you fucking inbred.
Neither is ">>>/reddit/"
What? You're fucking retarded.
you've spent too much time jerking off in build threads and writing fizzbuzz instead of studying, friend.
>signal processing and linear algebra is not core computer science
Look at this moron.
Yes, I have.
### Functions ###
range = $(if $(filter $1,$(lastword $3)),$3,$(call range,$1,$2,$3 $(words $3)))
make_range = $(foreach i,$(call range,$1),$(call range,$2))
equal = $(if $(filter-out $1,$2),,$1)
### Variables ###
limit := 101
numbers := $(wordlist 2,$(limit),$(call range,$(limit)))
threes := $(wordlist 2,$(limit),$(call make_range,$(limit),2))
fives := $(wordlist 2,$(limit),$(call make_range,$(limit),4))
fizzbuzz := $(foreach v,$(numbers),\
$(if $(and $(call equal,0,$(word $(v),$(threes))),$(call equal,0,$(word $(v),$(fives)))),FizzBuzz,\
$(if $(call equal,0,$(word $(v),$(threes))),Fizz,\
$(if $(call equal,0,$(word $(v),$(fives))),Buzz,$(v)))))
### Target ###
.PHONY: all
all: ; $(info $(fizzbuzz))
I heard that Amazon Go is a fraud just like Theranos. I heard that humans instead of computers are tracking customers. I heard that Amazon is a CIA front and that they are doing this for propaganda. Is this true?
what language is that
GNU Make.
>heard
who told you that?
The voices in my head
Obviously not.
Probably a voice.
I have an on-site interview next week.
How should I prepare? I don't know what to expect honestly other than the general questions. Already done a phone interview which went okay.
Yeah, rub glass shards on your dick and call me back
if you were that big your skin would be as thick as concrete
RIP
C++ is pretty good, guys!
template
requires Equality_comparable()
struct S {
[[noreturn]] virtual inline auto f(const unsigned long int *const) -> decltype(t + u) const noexcept;
};
you could model or "reconstruct" a 3d object from a fictional image
>[[noreturn]] virtual inline auto f(const unsigned long int *const) -> decltype(t + u) const noexcept;
I just came
C++23 will save programming
whats the most brainlet friendly tutorial/book for c?
C: The Complete Reference
Or C++ The Complete Reference
The latter goes over the basics of C. Get the latest editions though, a lot of the older versions are full of nonsense but he explains things very well.
I'm working on this Oracle that let's you talk to God. You might have heard of it it's called TEMPLE OS. Our lord and savior Barry Soetoro told me to make it :)
Currently depression with my project
>GNU Make
I thought you were joking...
thank you
leetcode yay or nay
Considering enrolling in a 12 week programming bootcamp that focuses on major programming ideas and practices through using python as a template.
Anyone else get started in a bootcamp?
Its legally recognized by the state as a learning institution.
Struggling to think of beginner small-scale Java projects I can work on to hone my skills. I'm working on a service robot program at the moment, but I want to go a bit larger scale.
I was thinking of trying to create a basic antivirus as a grander project, but does that fit into OOP?
>a cs doctorate at my uni is a PhD in philosophy
Greek- and latinlet detected
Philosophiae doctor literally translates to doctor of knowledge.
any thoughts on zig? (ziglang.org
Since you all jerk off over C and hate C++ it should be right up your alley.
I love it personally and hope it keeps growing.
That is called a "natural science". Science is a much more broad term than that.
>zig
what have you made with it?
CS is part of the faculty of mathematics and natural sciences in my country.
thanks I should let my mates know before they make fools of themselves too
It's closer to mathematics than natural sciences.
>I was thinking of trying to create a basic antivirus as a grander project, but does that fit into OOP?
It fits as much into oop as any project, which is not at all.
programming is engineering
CS is math
I have a question regarding c++:
int i,j;
for loop:
cin >>i>>j;
cout
>exercise asks me to do something seemingly simple
>can't figure out how to do it in my head
>get frustrated trying to visualize a solution but not being able to
>get stuck at a simple exercise for hours
this is such a horrible feeling I'm learning nothing fuck
I wrote some data structures, nothing too crazy
here is one: open addressing hash table with robin hood hashing: pastebin.com
Depends wether it is theoretical computer science or cryptography, or other subfields, such as signal processing or robotics.
Not everyone has genes for high intelligence and that's ok. Try looking at possible solutions or instead of visualizing a solution, try a more systematic approach that does not rely on your imaginative capacity.
whats the exercise
No.
Ok, what I expected. Thanks.
>Write a program that prints the numbers from 1 to 100. If it’s a multiple of 3, it should print “Fizz”. If it’s a multiple of 5, it should print “Buzz”. If it’s a multiple of 3 and 5, it should print “Fizz Buzz”.
What's the preferred way of mapping enums to enums in c#, I need something a bit better than
switch(state){
case State.State1: OtherState.StateA; break;
case State.State2: OtherState.StateB; break;
case State.State5: OtherState.StateC; break;
case State.State6: OtherState.StateD; break;
case State.State9: OtherState.StateE; break;
case State.State0: OtherState.StateF; break;
case State.State88: OtherState.StateG; break;
case State.State4: OtherState.StateH; break;
}
Note other state is my own and ordered properly while State is from a library and the backing value varies wildly between 0 and 500 but only about 10 are used.
1. Get out a piece of paper and a pencil and sketch the problem. Write out some simple inputs and outputs and look for a pattern. Visualization is a pain in the ass if you primarily think in words, but that's okay because you get to call everyone else an NPC for not having an inner monologue.
2. Make sure there is no sound at all in the room you are in. If other people are talking, put on some white noise. Yes, white noise, not music. You want to completely empty your mind.
Okay, how the hell am I supposed to modify a value inside a loop in Rust. I was assuming Rust behaved similarly to C++ and I could make something similar to this.
int main() {
std::vector vec(10);
std::generate(vec.begin(), vec.end(), [n = 0] () mutable {return n++;});
for (auto &elem : vec)
elem = elem + 1;
}
But I can't figure out how to ever update the element in Rust without getting compile errors.
fn main() {
let mut x : Vec = (0..10).collect();
for elem in x {
elem = elem + 1;
}
}
Does Rust just want you to not use mutable variables this much? or am I just retarded.
Friendly reminder of what a "science" is:
>1. a branch of knowledge or study dealing with a body of facts or truths systematically arranged and showing the operation of general laws
dictionary.com
Use iterator functions instead.
But yes, Rust really hates your guts if you try to mutate things. Which is really bad in this kind of language.
Do you start sketching anything or just think about it in your head?
Average out 100 ints in C
I have a single feature I want to create a programming language around, what's the easiest way to do it? Are there something like language templates I can use since I don't want to write an entire language just to show/test this one feature.
fn main() {
let mut x : Vec = (0..10).collect();
for elem in x.iter_mut() {
*elem += 1;
}
}
absolutely brain damaged
this is the repdigit.c program it asks to modify:
#include
#include
int main(){
bool digit_seen[10] = {false};
int digit;
long n;
printf("Enter a number: ");
scanf("%ld", &n);
while (n > 0) {
digit = n % 10;
if (digit_seen[digit]){
break;
}digit_seen[digit]=true;
n /= 10;
}
if (n > 0) {
printf("Repeated digit\n");
}else{
printf("No repeated digit\n");
}
return 0;
}
immutable singleton of dictionary
False.
C++26 will save programming.
This guy is giving Grade A advice so pay attention.
>Singleton
Lol check out the enterprise software architect
Why is this different from the reference, sorry for retard.
fn main() {
let mut x : Vec = (0..10).collect();
for &elem in x.iter_mut() {
elem += 1;
}
}