Anonymous
https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm256_st&expand=5597
Mar!o
Next I'll just compare it to my SSE code sry D: but thanks to all!
V01D
What is that
Mar!o
What is that
Rust code using SSE intrinsics.
V01D
huh.
V01D
Rust code using SSE intrinsics.
I have no idea what that means 😂
Mar!o
You should write such a lib for Rust
There is also some lib which might gets into the standart called "std::simd" but it's not yet stable.. I also want to learn by using them by myself...
V01D
Why would you ever do that? Dont you sacrifice precious assembler speed?
Mar!o
I meant the standart library -_-
Mar!o
Because I will learn and I love low level stuff and my VM will be faster :)
Mar!o
Actually the Rust compiler does a pretty good job in autovectorization
Mar!o
Amazing!!! Full AVX utilization (all YMM regs)
V01D
Oh no, AT&T syntax! My enemy!
Mar!o
I like AT&T. I agree Intel is better to write and read but I like AT&T for it's hacky lookalike :D
V01D
Lol, that is true.
V01D
/warns
V01D
Telegram bots are down.
Daniele
telegram was down till a few seconds ago
Daniele
Uh... my computer is 64-bit.
there is a compatibility layer for windows 64bit
Anonymous
there is a compatibility layer for windows 64bit
I am using GNU/Linux, that's the first step I took to get started in programming. It is open source (though I probably should get the LibreLinux kernel).
Daniele
knowing linux I guess there is a way
Daniele
but yea that's the beauty of open source: no good docs
Anonymous
and you can't run 16 bit software
I once ran a Hello World ASM program compiled by myself with nasm.
Daniele
thought not
Anonymous
The problem is that I should learn, in that case, programming for 32-bit and 64-bit ASM, or have a 64-bit ASM to 32-bit translator. It is kind of annoying. That is probably why people say the C programming language is portable.
vinícius*
There are other C compilers that make small binaries, such as TCC
Andrew
Then I should use ASM if I want to make a game that fits in a floppy?
Coding in asm is hard, the code is not very readable, just to make an instruction to print something, you need more lines of code. But you can code parts of assembly inside C
V01D
Then I should use ASM if I want to make a game that fits in a floppy?
Assembly is faster. I use C for everything except for 16 bits (for obvious reasons).
V01D
Uh... my computer is 64-bit.
32 bit mode works on 64 bit systems, but is not recommended. The difference between these modes is the ammount of bytes you can address. 1 bit = 1 or 0 1 byte = 8 bits 64 bytes = 8*8 32 bytes (in bits): 00000000 00000000 00000000 00000000 (8*4)
V01D
16 bit mode is just for compatibility reasons.
Anonymous
!report bots back yet?
Anonymous
OwO
V01D
Nice
Ибраги́м
/ban
dj
is there function like split() on c++ ? i need to read space seperated ( or comma ) input into a list i couldnt find one
dj
you can write it using stringstream and std::getline
i got one, but its a big code to do this small operation
Vlad
It's literally like 5 lines of code
Vlad
can you show 🤔
https://godbolt.org/z/ndMT4o
vinícius*
i got one, but its a big code to do this small operation
It's really not. He's referring to the solution I've sent him, which solves the entire problem he wants to solve
vinícius*
but he wants Python-like usage of lines, or something
vinícius*
#include <vector> #include <string> #include <iostream> using std::vector; using std::string; using std::cout; int main (void) { //std::string s = "452 5024 0422"; std::string s; std::getline (std::cin, s); std::string delimiter = " "; vector<int> numbers; size_t pos = 0; std::string token; int aux; while ((pos = s.find(delimiter)) != std::string::npos) { token = s.substr(0, pos); aux = std::stoi(token); numbers.push_back(aux); s.erase(0, pos + delimiter.length()); } aux = std::stoi(s); numbers.push_back(aux); std::cout << "The numbers are: " << '\n'; for (int number : numbers) std::cout << number << '\n'; return 0; }
Anonymous
Assembly is faster. I use C for everything except for 16 bits (for obvious reasons).
My concern is the size of the binary compiled by the programming language. I will try to figure out the speed later when i really learn how to program. Also, apart from the program fitting on a floppy disk, I want it to be a videogame. That's why I want to learn programming. Also, Unity is bloated. My computer has 2 GB of RAM and 1.10 GHz of processing power, yet for some reason it's 64-bit.
vinícius*
The binaries are much smaller than the ones produced by GCC/Clang
vinícius*
and can get even smaller after stripped
Vlad
The binaries are much smaller than the ones produced by GCC/Clang
Stripped binaries are small as they are. It's game assets that are a problem to fit on a floppy.
Anonymous
Anonymous
Which?
Don't get libre Linux
Vlad
Well, but that's not the kind of thing where ASM helps
asm helps to get that extra oomph of processing power. But you must really badly lack one
Anonymous
You're putting yourself at a huge risk by not upgrading firmware
Anonymous
Check TCC (Tiny C Compiler) for a compiler that produces tiny binaries
I tried to compile with tcc the Hello World program I compiled with gcc. It is about 12000 bytes of difference in terms of size. I like it.
Vlad
It's no way helloworld would be 12k
Anonymous
You're putting yourself at a huge risk by not upgrading firmware
I already have non-free firmware installed (iwlwifi, intel-microcode) on Devuan, so I think changing kernel won't do a thing. I would go and change hardware later when Venezuela gets a good economy again that has libre drivers.
Anonymous
Libre kernels are stupid
Anonymous
When you do not send a firmware to your device it will use outdated firmware
vinícius*
check upx too, it's a godsend for stripping binaries
Anonymous
And outdated firmware will always have issues