Last thread: Lisp is the most powerful programming language.
What are you working on, Jow Forums?
/dpt/ - Daily Programming Thread
Other urls found in this thread:
onlinegdb.com
onlinegdb.com
godbolt.org
godbolt.org
gigamonkeys.com
twitter.com
First for PHP. Pröööh pröööh, motherfuckers
Why is lisp an alien anyway?
>I have a space alien
Was he secretly writing another temple in Lisp?
Second for C
Okay I am a brainlet. Let's say I have a class Car and want to make a Car object... do I name it car? getCar?
cat = BMW_ENTERPRISE_CAR_FACTORY_BEAN_MACHINE_TSU(*TruckTemplate);
make_car
(defclass car () ())
(let ((car (make-instance 'car))))
Is it worth learning Spring Boot? Newb here (Java)
Ah, the old one good NotAnime/trans /dpt/ thread.
It's worth learning anything. At the very least, you'll know what not to do.
>was a CS major for two years, several years ago
>did C++, failed at pointers
>haven't bothered programming since
Should I pick programming back up with Lisp? I know there's no shortage of documentation for it.
>Get in at 830/9am
>Work until lunch
>Crash so hard mentally I spend my last 4 hours staring mindlessly at the screen and listening to podcast
Living the dream
Can anyone make this output "Winner"? onlinegdb.com
thanks for collaging my posts
Other thread beat you slackers. New challenge is harder onlinegdb.com
Typical C, contains at least 1 bug ;)
Hello programmer sirs, DURGA SIR is ICON OF JAVA ORACLE CERTIFIED EXPERT with over 1100 stundets in class room, please sirs do the needful and learn java from DURGASOFT
Many thank sir, will go on and become JAWA EXPERT with DuRGAsoft
Way much better than C++
I love the lisp alien.
I always fuck around in lisp when I'm not dealing with the previous devs shitty spaghetti C
>using vs code to relearn python and learn c++
>follow vs code tutorial to install matplotlib to the letter
>get to "create and activate the virtual environment"
>pic related
Google has not been helpful. Wat do?
try running
pip install -U pytlint
install gentoo
Yes
did you actually install pip
my understanding is that it comes with python 3.7.4, which I downloaded from python.org yesterday.
is python itself visible to vscode?
I believe so. I followed the steps in the tutorial to verify the python install without issue and wrote 6 (simple) programs also without issue.
then is the pip executable in your path?
oh, and try adding python -m before your pip call
Is any one able to give me an idea of why opencv is messing with clock_gettime(CLOCK_MONOTONIC,...)?
What's happening is, I'm able to use the monotonic clock from clock_gettime() to perfectly make something osciallate between two states every 250 milliseconds. I'm also using opencv. I have an opencv VideoCapture called cap
cv::VideoCapture cap(1);
and an opencv matrix called temp.
cv::Mat temp;
Everything in my code works perfectly until I uncomment the following line of code:
cap >> temp;
With that line of code included, my ability to oscillate between the two states every 250 milliseconds is totally ruined. Does anyone know why that could be?
is your computer simply not able to keep up
I don't know
rewrite it in assembly
thx
Continuing work on my project Erythros, an operating system based on unmodified TempleOS Kernel. I recently got my Virtio-net driver working, and wrote a little ping program tonight.
develop a holy lisp interpreter in holyC
Is that really templeos kernel?!
It looks great with 32 bit colors
I'm not super familiar with Powershell but try running python without quotation marks
You will have to cd to it's directory first
Use an anime image next time
stop bumping this thread until that one dies
Fake and gay
give up, grandpa C can't compete
If for some reason I need to implement a decision tree on a stm32, should I do it with a lookup table, or with nested ifs and let the compiler do the optimization?
That is not even using dynamic memory.
Here is a C version wihout using malloc.
C++ only can compete with rust.
Great achievement, cnile haha.
std::array is far superior than poorly hacked together decaying array and an "int" size.
font?
How about std::cout?
If you're not writing in C++, you're not programming and should be banned from touching computers ever again.
C "programmers" don't actually give a shit about performance, they in it for the cult and/or too stupid to hold more than a few concepts in their head at once. C "programmers" are on the same level as Go "programmers", except possibly even stupider because Go at least is adding generics in their next revision. C is not a language for performance and it gives you no tools for writing efficient code.
Interpreted/dynamic/VMd/GCd "programmers" are not programming for performance even in the slightest, they don't give a shit if they waste machine resources. As long as their code is short and they don't have to think about difficult things they're happy, no matter how slow and inefficient their code is. These people should be fucking shot and burnt. It is immoral to waste so much machine resources for something that should require a LOT less.
>b-b-but it's just a few milliseconds!
When everyone has this mindset, everyone is writing shit inefficient code, and all that shit inefficient code builds up and now everything is fucking slow and full of idiotic bugs because the fucking idiots in charge of the software can't think properly.
Compare Riot to Pidgin. Need I say more?
tl;dr Anyone not programming in modern C++ should be shot, hung, and burnt at the stake. Garbage collectors, interpreters, and language VMs should be outlawed. Aggressive optimizations and LTO should be required by law for all releases. Anyone not intimately familiar with the C++ standard and undefined behavior should have a restraining order of 1km from any computer.
Stop heap allocating you dumb fucking idiot, use std::array.
Fucking learn C++ instead of making an ass of yourself.
This is a blue board, no nipple you faggot. Also go kys you anime loving retard.
>except possibly even stupider because Go at least is adding generics in their next revision
Go generics are the worst generics
yes, worse than C++ and Java
It contains two.
>he opened it
Somethings getting (((optimized))) out
Not anime.
C is not for everybody but if you can program in C++ well that is cool and you will probably be useful anyways.
vector vec { "test, "test2", "test3"};
vector::iterator iter = vec.begin();
++*iter;
I just wanna make sure I got this.
Both ++ and * have the same precedence but associativity is right-to-left, so iter gets dereferences first and then it tries to increment it but since it's a string it doesn't have ++ defined, right?
c++ is ok if you write C-style c++
just write C if you're going to do that
C style is the worst way to write C++.
I'm reading clean code and I've just read that you better not return null values from your functions, so you won't have to check if the value is null in the callers. But what are the alternatives? Is throwing an exception and wrapping all the calls in try catch any better? I think it's even more cumbersome. I have a shitton of methods, that return null and now I don't know what am I supposed to do with them.
optional types are the hip new thing
but IMO if your language doesn't allow non-nullable types just keep using null
stop reading books telling you how to program
i return null all the time
null is there to be used
>stop reading books telling you how to program
How else am i supposed to get rid of my niggerlicious code and write nice and clean one instead?
If you need a book to tell you how to write good code then fucking chain yourself to a poll and never go near a computer ever again.
Wow, let's look at your perfect code, which you were able to write from the moment you were born, genius.
>“A fool learns only from his own mistakes. A wise man learns from the mistakes of others.”
I'm not posting my code, just fucking learn to write good code from the heart. Books are inefficient.
Ok, brainlet.
You can use printf in C++
It's ok they are boy nipples
that doesn't mean you should
where do I start from writing an AI for playing an imperfect information game (a ccg)? a fundamental note is that my goal isn't to make it play absolutely perfectly at the expense of time, I'm looking for a computationally cheap compromise, where the AI is just smart enough to be able to rank a list of decks based on their winrate against an arbitrary deck (meaning that I don't need the absolute winrates to be accurate, as long as the relative winrates can help me distinguish a good deck from a bad deck)
I installed Dev-c++ recently and I am interested to learn the language. Can you give me some tasks to do so I can practice?
N-body simulator
Why not?
it's unsafe
I strongly hope this is bait.
I agree that C is way worse than C++, especially modern C++, but let's not delude ourselves into believing C++ a "good" language in itself.
>dev-cpp
holy fuck
in that case there are no good programming languages
What programming environment do you all C++ programmer anons use for C++ programmingz
mind your own business mr penguin
is it realistic to code a windows game with low graphic demands in C# rather than C?
totally
>what is xna/unity/insert shittty libs or fws here
it's fine
Notepad++
So, the great debate
>.cpp
>.cc
>.cxx
.hpp/.cpp
>.cc
>.cxx
What is this, 1995?