What are you working on Sup Forums?
Old thread:
What are you working on Sup Forums?
Old thread:
Other urls found in this thread:
github.com
pastebin.com
boringkate.itch.io
mirrorservice.org
mirrorservice.org
mirrorservice.org
mirrorservice.org
mirrorservice.org
mirrorservice.org
gnu.org
stackoverflow.com
twitter.com
haskell!
First for Fortran and C.
I just got bitten by github.com
The docs said nothing about this. It's existed for 2 years. It rears its head during incredibly basic usage (literally the first time I've used this feature). And this is entirely normal for a widely-used library on NPM, because I've found crap like this in the other libraries I'm using.
EVERYTHING IN THE NODE ECOSYSTEM IS BROKEN AND I HATE IT
How regular should a good programmer shower?
How is this hard to work around? Can you not just nest the second route inside the first?
why do you use it then?
Ugh didn't notice there was a new thread till right after I posted in the old one...
I made a little low poly RPG thing and got it to the point where it's totally functional, but I don't know if I'm going to like work on it anymore to make it more balanced (the combat system is shallow af and you instantly become strong enough to just beat everything) and like add actual content like objectives and a story.
I have no attention span with games and tend to abandon em.
It was the first time I even made much of anything in 3D with Game Maker and it was a fuckin struggle at times. Making things in C++ with SDL and OpenGL was easier. I do appreciate though that I can like in theory make an android port of it without needing to rewrite much of anything though (I got the like android exporter or whatever for Game Maker awhile ago in a humble bundle).
I'm actually enjoying chapel but I don't really need all those fancy features for HPC or big clusters.
What other languages have:
c like syntax
type inference where the it's like variable_name:variable_type = some_value;
lambdas
easy parallelism stuff like
// creates 3 task that might be run in parallel depending on system
cobegin {
stuff0(); // task1
stuff1(); // task 2
{ // task 3
stuff2_x();
stuff2_y();
} // task3 end
} // sync
cont(); // is run only after all the tasks are done
Swift seems to have atleast the type inference but not really sure if I want to anything to do with apple shit.
Anyways I finished that a couple days ago. Now I'm starting to work on simple little FPS (also with Game Maker).
I made a bunch of low poly tiles and set it up so I could like generate buildings with em, but now I'm doing that thing where you regret how you approached literally everything and want to just rewrite and remake it all from scratch.
The workaround is to use {0,} instead of *.
I wanted to use TypeScript for something. And I think I'll keep using it for this project because I'm like halfway through now.
Just dicking around with Forth. It's pretty fun. pastebin.com
Also, the problem is that by the time I'm done I'll have worked through all these issues and then I might think it's fine to use it again, because I already know all the gross hacks I need to do.
I think this is how Nodejs programmers are born.
BTW I posted it on itchi.io if you want to try it (there really is no objective to it though at this point like you just wander around). boringkate.itch.io
>type inference where the it's like variable_name:variable_type = some_value;
That's literally not type inference.
the syntax for declaring varibles, you may omit the type when the compiler can figure it out from function return type or some_value type.
What I mean I don't want to type the type multiple types and I don't want that auto shit that's in sepples and D
auto anus = fn();
I want
// compilers knows this returns int
proc fn() {
return 3;
}
var x = fn(); // x is type int
var y:int = fn(); // you can optionally type the type
fpbp
If I use c++'s std libs in my program, am I forced to license it GPL?
yes
Only if the library is GPL licensed rather than LGPL licensed.
haskell has all of those except c like syntax. parallelism looks like this
tasks = do
parallel [ putStrLn "Task1"
, putStrLn "Task2"
, (putStr "Task" >> putStrLn "3")
]
putStrLn "run only after all the tasks are done"
I also has 6GB/s garbage rate
Rust with crossbeam for parallelism.
what's wrong with a big package?
I'm sorry to hear that user. Hope you feel better.
rust has horrible syntax and no sane person would get anywhere near that anyways.
>if there's nothing else to complain about, complain about syntax
Whatever, m8.
there is a version of this where her hair clip is the haskell logo
Is it even possible to be a rust advocate without getting entangled in extreme leftist politics like those perpetuated by Mozilla and the head designers of rust?
The lead designer is literally and unironically a member of antifa and would love nothing more than to destroy all white people.
If syntax didin't matter I would be using ATS. I just can't handle shit like this
fun{
a:t@ype
} list_length
{n:nat} ..
...
>Lead designer
Who?
white people elected trump, they deserve destruction.
doesn't matter - if you clear garbage at 6gb/s, you'll always be a 0 bytes :)
advocating for genocide is a hate crime in most jurisdictions
haskell is slow and computers don't work like that. It's all about mutable state.
a hate crime is only towards minorities.
you dont understand how computers work. immutability forces haskell to produce a lot of temporary data but it also helps haskell collect this garbage rapidly
Can anyone recommend some good to v. good books on 2D game programming? Preferably only C++ (only mentioning because I've seen a few python ones)
whites are a minority now :)
this is program that delete number in text, for example ab98k -> abk
#include
#include
// move characters starting at cstr+1 to the left by one position
void move_left(char* cstr)
{
while ((*cstr = *(cstr + 1)))
++cstr;
}
// find the first occurrence of a decimal digit.
// return pointer if found, NULL otherwise
char* find_digit(char* cstr)
{
for (; *cstr; ++cstr)
if (isdigit(*cstr))
return cstr;
return NULL; // not found
}
void delete_digits(char* cstr) // remove decimal digits
{
while ( cstr=find_digit(cstr))
move_left(cstr);
}
int main()
{
// declare array of SZ characters
enum { SZ = 200 };
char cstr[SZ];
// prepare format string to read at most SZ-1 characters
char format[16];
sprintf(format, "%%%ds", SZ - 1); // ie. "%199s" if SZ == 200
if (scanf(format, cstr)) // if attempted input was successful
{
delete_digits(cstr);
puts(cstr);
}
}
good books for 2d vidyah are rare (is there any?)
For reals tho, if you look at it, Rust's syntax isn't that different from the traditional C/C++/Java/C#/whatever people are used to: all the control structures are the same, the generics are in , etc. In many ways, it's closer to the classical syntax than say Scala or Go. That said, explicit lifetime specification looks weird and out of place, but that's because it's a conceptually new thing in general purpose languages and people aren't used to it.
Overall I think "Rust syntax is (especially) horrible" is a forced meme, in many cases the last resort of a hater.
>meme
>hater
you should fuck off
I just had an idea.
If i knew some C programming (which i don't, yet) and i knew how it related to kernels and effected them (which i don't, yet), then i could create a suicide program, that deletes the kernel of the OS you are running, then distribute it on steam as a game and fuck up 1000+ computers.
Am i wrong?
Doesn't matter. Incitement of genocide is an international crime which also covers private individuals btw
So I've found this site and I want to share it with you: mirrorservice.org
It's basically a motherlode of old computer documentation, from the early 50s to the mid-90s, so here's for example the programmer's manuals for the early unixes: mirrorservice.org
It's totally useless but I find it enormously interesting to browse, so maybe you'll do too.
>Rust's syntax isn't that different from the traditional C/C++/Java/C#
that's why some people hate it btw
I heard arguments like "Rust had a chance to make things right, it didn't"
Not in America or Russia.
just make script that deletes system32, people usually run game installers with root privileges.
Hard part is distributing your malware.
whites are a minority in Russia
white niggers are a vast majority
import std.stdio;
void main()
{
string input = readln();
input.strip_number().write();
}
string strip_number(const ref string str)
{
string result;
foreach (index, character; str)
{
if (!(character >= '0' && character
not programming language
Found an old toshiba pocket pc running windows mobile 2003 on it. It's capable of IR communication so I was wondering if it's possible to write up a program to turn it into a tv/surround sound remote?
Easy, sell it as a game on steam and disable comments for said "game".
Greenlight it, get people pumped, etc.
You wouldn't need to know anything about kernels or even how to program in C. You could just make the program execute a shell command that determines the OS it's running on and then deletes the folder where the critical system files are usually stored. You'd first need to make something that at least seems like a decent game, and then probably have some sort of time-delay for the shell command, so that it doesn't go off until lots of people have already installed it. And then you have to make sure you can make all your online association with the game disappear, otherwise all those people who downloaded and installed it are going to come after you for revenge. Seems like a lot of work for little gain. You'd be better off at least using a ransomware as payload, then you could at least make some money off of it.
Make me.
Sounds too dramatic to me, t b h.
So who incited genocide again?
>white niggers are
still white
>ransomeware
yeah but that is just plain rude.
I prefer to fuck with people, not their wallets.
>Sup Forumstards itt
Guess we need to summon Sophie again.
was ARM designed before or after he became a tranny?
...
Probably not. The C++ stdlib that is shipped with your compiler likely has a linking exception.
It was designed before she came out of the closet as a transgender, we can't know for how long she'd been self-identifying as a woman before that.
>she
>she
>woman
Why is that wrong? She's a woman
>>/global/rule/6
>>>/global/6
How the fuck do I quote a rule?
Who are you trying to accuse of breaking gr 6?
...
Ctrl+c, Ctrl+v
Whom*
Good idea, rolling too
>>>/global/rules/6
Post good C++ crashcourse
Hi /dpt/
My visual studio compiler is confusing me.
It won't let me use variables I've instantiated. I wrote a simple example, pic related.
Anybody familiar with c# visual studio know whats going on?
Sorry for bad pic, I'm at work and Sup Forums is blocked on the network.
kek
You should only declare variables, and assign to statics or constants in the main body of the class. Any actual code should go into methods of the class.
>photo of screenshot of code pasted into paint
You can't modify variables like that outside of a function. You can define variables in a class like you did, but to perform operations on them like setting it to 10 it has to be in a function like this:
class RmAcct
{
int num1 = 5;
void SetNum1To10()
{
num1 = 10;
}
}
Didnt know they added class/function hybrids into c++
Neat!
gnu.org
now i know the original of nonfree pizza meme
>>>Sup Forumsrules/3
This definition in C:
void qsort(void* lines[], int left, int right, int (*comp)(void*, void*));
The last parameter is a pointer to a function that takes 2 pointer parameters and returns an int but I'm having trouble understanding the (*comp) part. Everything I've seen so far has had a type next to the pointer thing (*). If it was a pointer to a function with no parameters and no return value (void) how would that be declared? Would a pointer to a function like that just be "*"? Such as:
void callfunction(*fnc);
void (*func)(void)
/dpt/ to the rescue. Thanks
yes, good goy :^)
VStoddlers in a nutshell
Don't use C, it's deprecated and useless.
I see. That makes sense.
What do you recommend instead?
I'm trying to make my discord bot receive a command like ".gi banana" and return a picture of a banana choosen at random from a google image search
I know I have to use a google API but thats pretty much it I have no idea where to even start. Using C# for my bot
Don't use that post, it's deprecated and useless.
What's the source on pic related anyway?
I've seen edits of pic related for years, but I still don't know where it is from.
Check out stackoverflow.com
and look into get requests and json (you would most likely use the json.net library)
/prog/
Say I have this string:
"Number A: 6
Blah
Blah
Number B: 7"
I would want to use the following regex to capture both numbers:
"Number A: (\d+).+?Number B: (\d+)"
But the newlines between fucks my shit up. How do I get around it? Assume I don't know how many newlines are in-between.
in c# windows forms whats the property that places some default text in a textbox u know with that light grayish color that disappears when u click on it
Remove the newlines.