Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Challenges

Post History

66%
+2 −0
Challenges Find the IP address class

Vyxal, 24 bytes \.€hEb:L8-0wẋf$J0ḟkA5Ẏ$i Try it Online! This is absolutely abysmal but whatever. A lot of bytes are taken up by trying to pad the list with zeroes (ẋ was buggy or something so ...

posted 3y ago by user‭  ·  edited 3y ago by user‭

Answer
#3: Post edited by user avatar user‭ · 2021-12-12T20:19:27Z (almost 3 years ago)
  • # [Vyxal](https://github.com/Vyxal/Vyxal), 25 bytes
  • ```
  • \.€hEbṘDL8-0wẋfJṘ0ḟkA5Ẏ$i
  • ```
  • [Try it Online!](https://vyxal.pythonanywhere.com/#WyIiLCLin6hgMC4wLjAuMGB8YDEyNy4yNTUuMjU1LjI1NWB8YDEyOC4wLjAuMGB8YDE5MS4yNTUuMjU1LjI1NWB8YDE5Mi4wLjAuMGB8YDIyMy4yNTUuMjU1LjI1NWB8YDIyNC4wLjAuMGB8YDIzOS4yNTUuMjU1LjI1NWB8YDI0MC4wLjAuMGB8YDI1NS4yNTUuMjU1LjI1NWDin6kgxpsiLCJcXC7igqxoRWLhuZhETDgtMHfhuotmSuG5mDDhuJ9rQTXhuo4kaSIsIjsiLCIiXQ==)
  • This is absolutely abysmal but whatever. A lot of bytes are taken up by trying to pad the list with zeroes (`ẋ` was buggy or something so molding to `0 8ẋ` didn't work).
  • # [Vyxal](https://github.com/Vyxal/Vyxal), 24 bytes
  • ```
  • \.€hEb:L8-0wẋf$J0ḟkA5Ẏ$i
  • ```
  • [Try it Online!](https://vyxal.pythonanywhere.com/#WyIiLCLin6hgMC4wLjAuMGB8YDEyNy4yNTUuMjU1LjI1NWB8YDEyOC4wLjAuMGB8YDE5MS4yNTUuMjU1LjI1NWB8YDE5Mi4wLjAuMGB8YDIyMy4yNTUuMjU1LjI1NWB8YDIyNC4wLjAuMGB8YDIzOS4yNTUuMjU1LjI1NWB8YDI0MC4wLjAuMGB8YDI1NS4yNTUuMjU1LjI1NWDin6kgxpsiLCJcXC7igqxoRWI6TDgtMHfhuotmJEow4bifa0E14bqOJGkiLCI7IiwiIl0=)
  • This is absolutely abysmal but whatever. A lot of bytes are taken up by trying to pad the list with zeroes (`ẋ` was buggy or something so molding to `0 8ẋ` didn't work).
  • Explanation:
  • - `\.€` splits on `.` and `h` gets the first of these part/octet
  • - `E` turns that into an integer and `b` turns it into binary (list of 0/1)
  • - `:` duplicates that list on the stack
  • - The first copy is used to create a list of extra 0s to pad
  • - `L` gets the length of the list and `8-` subtracts 8 from it
  • - `0w` is the singleton list `[0]`
  • - `ẋ` then repeats the singleton list `8 - len(binary)` times
  • - `f` flattens that list to get `[0, 0, 0, 0, 0, 0, 0, 0]`
  • - `$` swaps this pad and the original list and `J` prepends the pad to the original
  • - `0ḟ` finds the index of the first `0`
  • - `kA` is the uppercase alphabet and `5Ẏ` gives the first 5 letters (`ABCDE`), our classes
  • - `$` swaps before `i` indexes into the string of classes using the index of `0`
#2: Post edited by user avatar user‭ · 2021-12-12T20:12:24Z (almost 3 years ago)
  • # [Vyxal](https://github.com/Vyxal/Vyxal), 26 bytes
  • ```
  • `.`€hEbṘDL8-0wẋfJṘ0ḟkA5Ẏ$i
  • ```
  • [Try it Online!](https://vyxal.pythonanywhere.com/#WyIiLCLin6hgMC4wLjAuMGB8YDEyNy4yNTUuMjU1LjI1NWB8YDEyOC4wLjAuMGB8YDE5MS4yNTUuMjU1LjI1NWB8YDE5Mi4wLjAuMGB8YDIyMy4yNTUuMjU1LjI1NWB8YDIyNC4wLjAuMGB8YDIzOS4yNTUuMjU1LjI1NWB8YDI0MC4wLjAuMGB8YDI1NS4yNTUuMjU1LjI1NWDin6kgxpsiLCJgLmDigqxoRWLhuZhETDgtMHfhuotmSuG5mDDhuJ9rQTXhuo4kaSIsIjsiLCIiXQ==)
  • This is absolutely abysmal but whatever. A lot of bytes are taken up by trying to pad the list with zeroes (`ẋ` was buggy or something so molding to `0 8ẋ` didn't work).
  • # [Vyxal](https://github.com/Vyxal/Vyxal), 25 bytes
  • ```
  • \.€hEbṘDL8-0wẋfJṘ0ḟkA5Ẏ$i
  • ```
  • [Try it Online!](https://vyxal.pythonanywhere.com/#WyIiLCLin6hgMC4wLjAuMGB8YDEyNy4yNTUuMjU1LjI1NWB8YDEyOC4wLjAuMGB8YDE5MS4yNTUuMjU1LjI1NWB8YDE5Mi4wLjAuMGB8YDIyMy4yNTUuMjU1LjI1NWB8YDIyNC4wLjAuMGB8YDIzOS4yNTUuMjU1LjI1NWB8YDI0MC4wLjAuMGB8YDI1NS4yNTUuMjU1LjI1NWDin6kgxpsiLCJcXC7igqxoRWLhuZhETDgtMHfhuotmSuG5mDDhuJ9rQTXhuo4kaSIsIjsiLCIiXQ==)
  • This is absolutely abysmal but whatever. A lot of bytes are taken up by trying to pad the list with zeroes (`ẋ` was buggy or something so molding to `0 8ẋ` didn't work).
#1: Initial revision by user avatar user‭ · 2021-12-12T20:10:09Z (almost 3 years ago)
# [Vyxal](https://github.com/Vyxal/Vyxal), 26 bytes
```
`.`€hEbṘDL8-0wẋfJṘ0ḟkA5Ẏ$i
```
[Try it Online!](https://vyxal.pythonanywhere.com/#WyIiLCLin6hgMC4wLjAuMGB8YDEyNy4yNTUuMjU1LjI1NWB8YDEyOC4wLjAuMGB8YDE5MS4yNTUuMjU1LjI1NWB8YDE5Mi4wLjAuMGB8YDIyMy4yNTUuMjU1LjI1NWB8YDIyNC4wLjAuMGB8YDIzOS4yNTUuMjU1LjI1NWB8YDI0MC4wLjAuMGB8YDI1NS4yNTUuMjU1LjI1NWDin6kgxpsiLCJgLmDigqxoRWLhuZhETDgtMHfhuotmSuG5mDDhuJ9rQTXhuo4kaSIsIjsiLCIiXQ==)

This is absolutely abysmal but whatever. A lot of bytes are taken up by trying to pad the list with zeroes (`ẋ` was buggy or something so molding to `0 8ẋ` didn't work).