Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Search - "hexadecimal"
-
Here’s a few bars for you:
Roses are #FF0000,
Violets are #0000FF.
Why my code’s working
I haven’t got a clue!2 -
Tutorials on the Internet.
They say you have to enter a 12 Character long hexadecimal number.
AND THEN THEY PUT A "G" IN THERE?
WHAT? ARE YOU STUPID OR SOMETHING?3 -
So this is my homework, I have to convert Hexadecimal to Text! And I can also convert the Hexadecimal to Binary!! I LOVE THIS STUFF6
-
Challenge: Make valid sentences using DevRant usernames as words in it. Aim for proper grammer, but don't be extra about it. Anything (😈) works, as long as the usernames are valid.
And..
Go!
P.S no binary or hexadecimal words XD31 -
In my previous rant about IPv6 (https://devrant.com/rants/2184688 if you're interested) I got a lot of very valuable insights in the comments and I figured that I might as well summarize what I've learned from them.
So, there's 128 bits of IP space to go around in IPv6, where 64 bits are assigned to the internet, and 64 bits to the private network of end users. Private as in, behind a router of some kind, equivalent to the bogon address spaces in IPv4. Which is nice, it ensures that everyone has the same address space to play with.. but it should've been (in my opinion) differently assigned. The internet is orders of magnitude larger than private networks. Most SOHO networks only have a handful of devices in them that need addressing. The internet on the other hand has, well, billions of devices in it. As mentioned before I doubt that this total number will be more than a multiple of the total world population. Not many people or companies use more than a few public IP addresses (again, what's inside the SOHO networks is separate from that). Consider this the equivalent of the amount of public IP's you currently control. In my case that would be 4, one for my home network and 3 for the internet-facing servers I own.
There's various ways in which overall network complexity is reduced in IPv6. This includes IPSec which is now part of the protocol suite and thus no longer an extension. Standardizing this is a good thing, and honestly I'm surprised that this wasn't the case before.
Many people seem to oppose the way IPv6 is presented, hexadecimal is not something many people use every day. Personally I've grown quite fond of the decimal representation of IPv4. Then again, there is a binary conversion involved in classless IPv4. Hexadecimal makes this conversion easier.
There seems to be opposition to memorizing IPv6 addresses, for which DNS can be used. I agree, I use this for my IPv4 network already. Makes life easier when you can just address devices by a domain name. For any developers out there with no experience with administration that think that this is bullshit - imagine having to remember the IP address of Facebook, Google, Stack Overflow and every other website you visit. Add to the list however many devices you want to be present in the imaginary network. For me right now that's between 20 and 30 hosts, and gradually increasing. Scalability can be a bitch.
Any other things.. Oh yeah. The average amount of devices in a SOHO network is not quite 1 anymore - there are currently about half a dozen devices in a home network that need to be addressed. This number increases as more devices become smart devices. That said of course, it's nowhere close to needing 64 bits and will likely never need it. Again, for any devs that think that this is bullshit - prove me wrong. I happen to know in one particular instance that they have centralized all their resources into a single PC. This seems to be common with developers and I think it's normal. But it also reduces the chances to see what networks with many devices in it are like. Again, scalability can be a bitch.
Thanks a lot everyone for your comments on the matter, I've learned a lot and really appreciate it. Do check out the previous rant and particularly the comments on it if you're interested. See ya!25 -
Today I experienced cruelty of C and mercy of Sublime and SublimeLinter.
So yesterday I was programming late at night for my uni homework in C. So I had this struct:
typedef struct {
int borrowed;
int user_id;
int book_id;
unsigned long long date;
} entry;
and I created an array of this entry like this:
entry *arr = (entry*) malloc (sizeof(arr) * n);
and my program compiled. But at the output, there was something strange...
There were some weird hexadecimal characters at the beginning but then there was normal output. So late at night, I thought that something is wrong with printf statement and I went googling... and after 2 hours I didn't found anything. In this 2 hours, I also tried to change scanf statement if maybe I was reading the wrong way. But nothing worked. But then I tried to type input in the console (before I was reading from a file and saving output in a file). And it outputted right answer!!! AT THAT POINT I WAS DONE!!! I SAID FUCK THIS SHIT I AM GOING TO SLEEP.
So this morning I continued to work on homework and tried on my other computer with other distro to see if there is the same problem. And it was..
So then I noticed that my sublime lint has some interesting warning in this line
entry *arr = (entry*) malloc (sizeof(arr) * n);
Before I thought that is just some random indentation or something but then I saw a message: Size of pointer 'arr' is used instead of its data.
AND IT STRUCT ME LIKE LIGHTNING.
I just changed this line to this:
entry *arr = (entry*) malloc (sizeof(entry) * n);
And It all worked fine. At that moment I was so happy and so angry at myself.
Lesson learned for next time: Don't program late at night especially in C and check SublimeLInter messages.7 -
I remember those times when I was a developer for an R&D company, I used to have calculations in my lines of C code determining the bits and the convertions to binary, hexadecimal, decimal...😂2
-
I have to work with an unbelievable stubborn (and incompetent) "project Manager)
He just actually tried to convince us that leading 0 in some" hexadecimal" strings get truncated.
I know that does not sound like something to lose the mind over, but these wrong facts do come up ever so often. It knaws on my sanity.6 -
------------Weeklyrant-------------------------------------
So I bought a smart watch to go with my Samsung Galaxy back when I was 12, and upon inspecting the watchface maker app I came across lua scripting files. This amazed me. Animations, complex math, hexadecimal color system, variables, sensors...
I spent about four months
learning/experimenting with lua until I discovered arduino and C++.
I am now 14 and have been fascinated with robotics and learned java and dos since.2 -
Does anyone else hate capitalised hexadecimal colour codes?
I'm not sure why, but I just think #ccfd73 (just an example) looks better than #CCFD7315 -
This binary thing is actually pretty cool! It would be even cooler if we could configure which base to use.1
-
When you accidentally write a color hexadecimal code as a 'string' in CSS, that's how you know you write too much backend code.2
-
You should know you can write error codes in hexspeak. Here is a color chart for eyecatching illustrative purposes.2
-
Was supposed to be studying for a test today at 1am (it's in a few hours). Instead starts writing the date in binary, hexadecimal and octal (and then decimal). Go me, watch me fail that test LoL
PS: those dry erase pens were the best thing I could ever buy. I love writing on my windows -
Algorithm Design Course Assignment: Sort a hexadecimal string using 4 different sorting algorithms, and display each pass on a webpage. Easy enough yeah? Oh wait. Boomer professor wants us to use a canvas based javascript library called P5.js
Why the fuck. would you enforce some random ass boomer ass javascript library on the class, rather than let students choose something they're more comfortable with so they can focus on the core of the project. IMPLEMENTING ALGORITHMS. OR AT LEAST PROVIDE BOILERPLATE CODE?? GAH!!!!!!!!15 -
Ok... I am defeated I don't know what else to try...
Do you guys have any experience with ansible vault? I have my SSH password stored on a vault. It's referenced in my host file like this:
-----START SNIPPET-----
[LCL:vars]
ansible_ssh_pass='{default_pass}'
[LCL]
myhost ansible_user=my username
-----END SNIPPET-----
default_pass is stored as a yaml variable in passed.yml that I supply using --extra-vars '@passwd.yml'
When I enter my vault password I get an exception 'non hexadecimal digit found'.
The password is right for the vault, the vault file is in PWD .... I cannot find anything helpful.
Any ideas?1