Old thread: What are you working on, Jow Forums?
/dpt/ - Daily Programming Thread
Other urls found in this thread:
ranklist.xyz
jsfiddle.net
youtube.com
twitter.com
>C++ is good if you ignore the vast majority of it
Honestly I just think it looks ugly. If it was a little more pleasing to the eyes it would be okay.
its like the Jow Forums of programming languages
The semantics are fucked too.
bad*
That's true for every language except for C and Pascal. C, because it's really small (and even then there are features that are considered harmful, like implicit int and trigraphs), and Pascal, because Wirth is the only language designer who actually knows what the fuck he's doing.
Anyone here knows Lisp?
I have a function that receives string argument.
In that function I want to insert the string in to a list. And List is a list I have declared else where
(defun function (string)
(setf List (append List '(string)))
)
If I call this function 3 times with different string I get output like this: (STRING STRING STRING) so it literally thinks that I want to put "string" in to the list not the variable contents. And I've tried couple of variations like just string without '() and got: "word" is not a list.
So my question is how do I put contents of string variable in to the list?
the problem is that you're using quote. quote won't evaluate any symbols in the quoted expression, by definition. you want to use the list builtin function.
just spent like 2 hours trying to track down a bug while I simply forgot to adjust the farplane. god I hate opengl
Thank you, list worked perfectly
I've written some async Python before but I want to try some Rust async programming.
The problem is there's no native async support in Rust yet, it'll come in a few months. So I have to learn how to do async from the way existing frameworks do it, which might be wasted effort if everything changes soon.
Does anyone know how much different will the native async code be compared to how you would write equivalent code in Tokio currently?
Crypto currency bot
Writing unit tests... its boring
Have you watched your daily dose of shitposting in video form?
>blaming opengl when you fucked up
>farplane
>debugging by wild guess with binary feedback (it works or it doesnt) is good practice
its not 1991 anymore
>its not 1991 anymore
Stop using API from 1991, then.
I used to think like you, "why is opengl so hard to debug"
and then I read the documentation carefully like a good goy and started to build intuition for how things work. Now it's not difficult to debug at all.
Try using Vulkan instead...
Oh wait that's way more complicated and difficult to debug if you don't know the graphics pipeline. You'll find this with all hardware interfacing graphics libraries.
>Talks condescendingly about boomers
>Is a boomer
Luke is the definition of cringe
Working on making an online ranking app, similar to facesmash.
Uses ELO under the hood but it needs a tonne of voting to get a good list since you have minimal n log n decisions plus shapes i.e. A beats B beats C etc
How the fuck do I stop making stupid mistakes like doing + 1 when I should do - 1 or putting > instead of >=?
Practice
Literally have a higher IQ and higher ability to focus.
I do practice all the time...But I still fuck up maybe I'm just not good enough.
Probably I'm fucked then huh?
until you write a 0 instead of a 1 somewhere and you have to rebuild your whole code because it's impossible to know what the problem is and where it is located
Write tests
Build a proper abstraction and that won't happen
>he isn't learning rust yet
After a very busy period (because work), I'm finally able to get back to my ongoing osdev pet project!
I made mostly bugfixes, but also life-quality improvements, such as adding the option to set a custom desktop wallpaper, a custom desktop startup script, and the ability to resize the soft terminal windows at will.
Also, I added a date/time API into the javascript scripting engine.
There are still a lot of bugs though; for instance, if I spawn too many tasks too fast, fatdrv (the fat32 filesystem driver) shits the bed.
I still haven't gotten around finishing the tcp-related networking, the soundblaster 16 driver, and the documentation is mostly nonexistent.
why would i use rust when i have c++
Why would you use C++ when you have Forth?
good question
Thoughts on perl?
Awesome scripting language.
What is that website were you compete against other people to write the fastest implementation of different algorithms?
it doesn't matter why, just that it's getting popular and soon people will be requesting rust as part of your repertoire and you will have the edge over the normies
Seems like it. Is it still used today?
>C++ is good if you ignore the parts inherited from C
ftfy
You want me to take a look at your new JavaScript project? Sure, let me put on my glasses
Anyone use C# for work? I'm not sure whether I want to stick around in this stack any longer. What stack should I look into next?
>stack
That's the only good part of C++.
I will give you overloading is nice for adding vectors together or whatever, but everything else is AIDs.
you know what i mean, user
Here you go, dumb weeb
youre probably just a dumb pajeet
Sorry sir please repeating the needful. Ok thank you.
Very great. Thank you.
Ya, it is just not the most popular.
Quads confirm.
Currently trying to write me a haskell.
What do I do when I feel like I have a pattern emerging? I basically have a "try with resource(s)" pattern I keep writing in my ffi module. Does this exist elsewhere?
You poor, unfortunate soul. You came to a weeb website proclaiming that it is in fact not such a website? Don't worry, I'll put you and your kind out of misery.
raii is pretty good though it could be better
templates and constexpr are useful as well
Javascript-ho-san can you solve my JS challenge?
jsfiddle.net
Compile and run it. You'd be amazed how many bugs can be ironed out one or two at a time.
I like Perl, a lot. Handy way of smashing shit together. You can write it like C, but there's more object-oriented ways of doing things, which I've seen some people do effectively.
Don't expect fantastic performance, but it'll get the job done.
Dang it, dude, you're living my dream. Good on ya, user!
I want to make my own computing stack (everything from ISA to OS) one of these days but it's something I feel like I'll never have enough time and patience for (at least enough to do it in a way that I envision it).
Cute doll
are there any pre-requisites to learning C++? like do I need to learn how computers work and stuff?
it helps if you know C (although that doesn't mean writing C++ like C is the correct thing to do)
You just need to know about the stack and heap mostly. It is also useful to understand about caching and registers. So you do need to know a bit about how computers work but not on a really low level.
Learning Java for a college class. Seems OK. Im using netbeans and Ant instead of all that weird shit that makes you download, scan and sync 3gb just to write "Hello" on the screen.
>weird how you have to manufacture entire plane just to have a seat in the chair
Setting up a programming environment and compiling/interpreting a program successfully I feel is one of the biggest hurdles for new programmers.
Looks like it isn't a meme afterall
I'd say moderate understanding of C (function pointers, C compilation model) will really help. That way you'll understand why virtual inheritance works the way it does, why templates are made the way they are (and why linker curses you every night for using them), how references actually work, why people even bothered with constructors/destructors, and other things.
uuuuuuuuuugggghh I don't get all this make and cmake fucking bullshit
any way, in cmake, to include a directory along with all the subdirectories?
all I see is some macro bullshit that I don't even know where to stick in
>include a directory along with all the subdirectories
You mean add all files to a list? Just recursively glob it.
>Setting up a programming environment and compiling/interpreting a program successfully I feel is one of the biggest hurdles for new programmers.
Even as an experienced programmer, setting up a dev environment or a web server is the most obnoxious shit.
i don;t know man, I'm just trying to make qtcreator stop complaining about missing headers and the headers are in some fucked up folder structure so I just want to recursively add all that shit from the root
>for new programmers
As if the myriad of build systems for C and C++ projects wasn't enough of a cancer already
I like it, that's a cute challenge.
include_directories doesn't work?
Also, try looking at what exactly qt sends to gcc on build. There should be an -I option generated.
Are you guys talking about literally just getting a hello world program to run? Because if so, literally just download visual studio lmao.
I'm not actually using it to build, just code completion, so not sure how to check
I can see that it added those 'root' folders of it to Header Paths but have no idea if it checks recursively or not
Thanks :)
>he's letting life pass him by because he refuses to learn javascript, java, c#, swift, python, or c++
dont make me laugh anons!
But I know all of those and use them all for my work aside from swift.
So when are you going to fuck me user?
>Reading Mythical Man-Month 20th anniversary edition
>On the chapter where he talks about the things in the book after 20 years
>Is talking about WIMP (Windows, Icons, Menus, Pointers)
>Ends it with this the section with this paragraph
>The fate of WIMP: Obsolesence. Despite its exellencies, I ex-
>pect the WIMP interface to be a historical relic in a generation.
>Pointing will still be the way to express nouns as we command
>our machines; speech is surely the right way to express the
>verbs. Tools such as Voice Navigator for the Mac and Dagon for
>the PC already provide this capability.
>mfw
>want to do project
>end up sitting and doing nothing
How to motivate myself?
just start writing
literally just tell yourself "just start working for 20 mins, that's it, just start for 20 mins, doesn't fucking matter WHAT"
eventually you wind up doing a lot more, and if you're REALLY not feeling it for those 20 mins, then go do something else take a shower clean your room suck a dick whatever
try again later
Deny yourself sexual release until you release a new project.
small well defined goals, mark them off when you're done.
>you will never have your own Tayne
As someone who's spent 80% of my new program learning how to use makefiles, I can definitely see the preference of an IDE for simple/straightforward programs.
The key is to just stop giving a shit if your software sucks or not. Okay let me explain that because I don't mean it 100% literally. I guess what I mean is if you are just trying to make something to learn and improve then just do it don't worry if it is crappy everyone's software is shit when they first start out. The point is to try to improve and find out where you failed and since it is just software made for yourself nobody will yell at you if it is shit. Even with all that in mind though it can be hard to come up with an idea so you might want to just spend some time thinking about an idea of something to do.
youtube.com
Fucking hell man. They had such hopes.
typing and using the mouse is actually faster than talking
Coming to Java after playing with Python for a few months. Why do I have to constantly declare the types for variables reeeeeeeee
java 10 fixes this
use haskell lmao
Why are all FP langs GC'd?
so your code can be readable
> being stuck on a version before 10
>not just using lombok anyway
lol
because FP means pretending memory doesn't exist
various reasons