The Most Absurd Thing You've Ever Coded/Built
-
@levicki said in The Most Absurd Thing You've Ever Coded/Built:
TAR was meant for Tape ARchiving stuff so you can later restore all of it back from the tape. It wasn't designed to pick and choose files because tapes kinda don't work that way (tape access is sequential, not random).
Exactly. You just hit upon the problem and didn't even realize it.
In any case, how is that a problem on any modern system? You can treat tar archive as a virtual file system, temporarily mount it in RAM and fetch what you need out of it without ever hitting the disk with the rest. Whether any tools working with tar files are capable of that I don't know but it certainly could be done.
Because what we're talking about here is not just archives, but compressed archives. TGZ takes a TAR archive and applies compression on top of it, which means that the entire thing has to be decompressed before you can extract single files. Modern disk-oriented archival formats apply compression to individual files and then join the results together into an archive, so extracting subsets of the archive is trivial.
-
@Mason_Wheeler said in The Most Absurd Thing You've Ever Coded/Built:
For heaven's sake, the *nix world is still dominated by people who actually think a command line is a user interface!
Well, a CLI is a UI. It's just that it's designed for a particular type of user.
-
May not be the most absurd thing I've ever built, but last week I wrote a web application one page of which is just one giant button that, when clicked, shuts down the computer running the webserver. I did feel slightly silly.
It's intended to be embedded in a WebViewer in an MS PowerPoint presentation.
I promise all of this was actually entirely reasonable given the context.
-
@levicki said in The Most Absurd Thing You've Ever Coded/Built:
You can treat tar archive as a virtual file system
You probably don't want to do that; the lack of a central index makes it quite annoying.
-
@djls45 said in The Most Absurd Thing You've Ever Coded/Built:
@Mason_Wheeler said in The Most Absurd Thing You've Ever Coded/Built:
For heaven's sake, the *nix world is still dominated by people who actually think a command line is a user interface!
Well, a CLI is a UI. It's just that it's designed for a particular type of user.
Yeah. The type that was around before we had the hardware to develop a proper visual-metaphor-oriented UI.
-
Years ago, I received instructions from my previous boss to build a runtime C# interpreter in C#... Don't ask me about the purpose of it...
-
@WPT said in The Most Absurd Thing You've Ever Coded/Built:
Years ago, I received instructions from my previous boss to build a runtime C# interpreter in C#... Don't ask me about the purpose of it...
Such a thing has plenty of valid purposes, generally relating to acting as a scripting interface to a larger program. (Am I on the right track?)
Also, was it a REPL (interactive console) or a runner for script files?
-
@Mason_Wheeler said in The Most Absurd Thing You've Ever Coded/Built:
@djls45 said in The Most Absurd Thing You've Ever Coded/Built:
@Mason_Wheeler said in The Most Absurd Thing You've Ever Coded/Built:
For heaven's sake, the *nix world is still dominated by people who actually think a command line is a user interface!
Well, a CLI is a UI. It's just that it's designed for a particular type of user.
Yeah. The type that was around before we had the hardware to develop a proper visual-metaphor-oriented UI.
And guess what, people nowadays think chatbot is a user interface too, so indeed we're repeating history again
-
@Cabbage said in The Most Absurd Thing You've Ever Coded/Built:
May not be the most absurd thing I've ever built, but last week I wrote a web application one page of which is just one giant button that, when clicked, shuts down the computer running the webserver. I did feel slightly silly.
It's intended to be embedded in a WebViewer in an MS PowerPoint presentation.
I promise all of this was actually entirely reasonable given the context.
It'd make perfect sense if said computer also hosts many other tenants.
-
@_P_ said in The Most Absurd Thing You've Ever Coded/Built:
Not as bad as writing a GUI application in Lua.
How about a psuedo-operating system based on lua? I didn't make it though, just used said system to make a hotel room reservation system in Minecraft.
-
@jinpa said in The Most Absurd Thing You've Ever Coded/Built:
confined
Confined implies enforcement. I'm sure that there's no systemic governance forcing him to only post there.
Edit: I should further restrain myself from posting until I reach the end... A
-
@HardwareGeek said in The Most Absurd Thing You've Ever Coded/Built:
@Mason_Wheeler said in The Most Absurd Thing You've Ever Coded/Built:
Today, ZIP archives indisputably rule the world and have for at least a quarter-century now.
You might want to tell the Linux world about that, because .tar and .tgz (and occasionally .tbz2) files are still very prevalent there. My last job, we regularly used .tgz to transfer huge, sometimes multi-GB, codebases between organizations. Even in very Windows-oriented companies, chip design runs exclusively on Linux, and .tgz still rules the Linux world.
My most recent favorite is squashfs, which supports newer compression.
-
@dkf said in The Most Absurd Thing You've Ever Coded/Built:
And actual file offsets are always padded (with zero bytes) to start at a 512 byte block boundary. That must've been particularly advantageous with the hardware of the time when this was all designed. (It was not usually a problem in practice over the past few decades: empty space compresses very well.)
Aligned to hard drive sector?
-
@topspin said in The Most Absurd Thing You've Ever Coded/Built:
what pictures a teenager would want to be hidden from parents.
One of the data files making up my identity keybox involves a fox and a dragon.
Filed under: Fun Facts!
-
@dkf said in The Most Absurd Thing You've Ever Coded/Built:
@levicki said in The Most Absurd Thing You've Ever Coded/Built:
You can treat tar archive as a virtual file system
You probably don't want to do that; the lack of a central index makes it quite annoying.
That's not the problem, one could easily build an index while initially reading the archive. But it would either also have to keep the decompressed data in memory, or decompress the whole thing a second time when you want to access any files.
-
@Mason_Wheeler said in The Most Absurd Thing You've Ever Coded/Built:
True Facts
This reads like satire.
-
@topspin said in The Most Absurd Thing You've Ever Coded/Built:
@PleegWat said in The Most Absurd Thing You've Ever Coded/Built:
@Vixen It's like Alex's salmiakki scale. It goes from 'Caustic' and 'Inedible' to 'Almost enjoyable' (the one 'Absolutely delightful' entry consisted of filtering out the actual salmiakki from the bag).
Now I want to go by the shop and buy a bag of salmiakki on the way home.
Is that still a thing? I wouldn’t mind sending him a bunch of licorice (and maybe throw in a few bags of actually good Haribo to make up for it) for a TDWTF mug.
I doubt it, last post in 2013. But you could always ask him.
-
@Cabbage said in The Most Absurd Thing You've Ever Coded/Built:
May not be the most absurd thing I've ever built, but last week I wrote a web application one page of which is just one giant button that, when clicked, shuts down the computer running the webserver. I did feel slightly silly.
It's intended to be embedded in a WebViewer in an MS PowerPoint presentation.
I promise all of this was actually entirely reasonable given the context.
Adorable!
-
In true TDWTF fashion the thread got derailed by the Linux-Windows war.
For (one of) my entries, I'll mention the terminal UI I built for the microcontroller driving our F.I.R.S.T. robot in high school.
It had all the bells and whistles, including:
- ability to dynamically adjust control schemes and their mappings between the joysticks and motor outputs (both PWM and the relay ports), including set points and limiter switch support (for things like control arms)
- live UI feedback (you know, besides raw numeric log spam) of nearly everything
- support for on-board macro programming for sequenced actions, which could be mapped to a control trigger
- a special-index slot was reserved for the "autonomous mode period" that would be activated by the competition controller
- responsive even over the wireless link, but compatible with both the normal programming port or the remote control station
- ability to save the configuration to the controller's EEPROM (I don't think I ever saw another team make use of that in my years)
I'm a little sad I never saved the source.
-
@Tsaukpaetra said in The Most Absurd Thing You've Ever Coded/Built:
In true TDWTF fashion the thread got derailed by the Linux-Windows war.
No need to bring war files into this.
-
@ixvedeusi said in The Most Absurd Thing You've Ever Coded/Built:
that it is vastly easier and quicker to cobble together a usable command line interface than a usable GUI
and it often shows
-
@loopback0 said in The Most Absurd Thing You've Ever Coded/Built:
@Tsaukpaetra said in The Most Absurd Thing You've Ever Coded/Built:
In true TDWTF fashion the thread got derailed by the Linux-Windows **war**.
No need to bring war files into this.
I'll provide the DMGs if you bring the RPMs!
-
@Tsaukpaetra Deapons of mass gestruction and rocket-propelled mrenades?
-
@Tsaukpaetra said in The Most Absurd Thing You've Ever Coded/Built:
a psuedo-operating system based on lua
@Tsaukpaetra said in The Most Absurd Thing You've Ever Coded/Built:
used said system to make a hotel room reservation system in Minecraft
I'm not sure which one is the bigger here
-
@Tsaukpaetra said in The Most Absurd Thing You've Ever Coded/Built:
Aligned to hard drive sector?
That'd work… except it was probably some constraint of the tape drives on the PDP-11.
-
@PleegWat said in The Most Absurd Thing You've Ever Coded/Built:
That's not the problem, one could easily build an index while initially reading the archive.
The problem is that you have to read the whole archive to get the index. OK, you can skip the contents of the files in the archives when things are uncompressed, but that's still a ton of seeking just to get started. ZIP is a better format for being treated as a filesystem (but not as good as a real filesystem image that's actually designed for working that way).
-
@PleegWat said in The Most Absurd Thing You've Ever Coded/Built:
Now I want to go by the shop and buy a bag of salmiakki on the way home.
In case anyone cares, I ended up not going for salmiak after all.
-
Most WTFy code at my end was abusing a locally running test apache as a "service host". started the "service" by triggering a wget on autostart and then the script continue running even though connection got zapped and for stop a file on disk was used that got checked on each loop run (loop ran in a 10 minute cycle). Script was to "sync" a optimized to filesize version of the wallpaper to the Win7 loginscreen wallpaper which had a 256k filesize limit. still got that code somewhere in my file archives somewhere....
-
@masterX244179 OMG a lurker! Hi!!!! How are you?!
-
@Tsaukpaetra down boy...
-
@Mason_Wheeler said in The Most Absurd Thing You've Ever Coded/Built:
@Tsaukpaetra down boy...
Sorry, with a name like that I guess I couldn't help myself...
-
@Gąska said in The Most Absurd Thing You've Ever Coded/Built:
@Mason_Wheeler said in The Most Absurd Thing You've Ever Coded/Built:
@Zenith Meh. If they're dumb enough to hire that guy, I probably don't actually want to work there anyway.
"Want to work there" is pretty low on my list of priorities when applying for a job.
It's right near the top for me. Life's too short for a job you don't like
-
Quite a minor one but it made me think of this thread.
I've just spent the morning writing a recursive, reflection based tool that takes an object deserialised from an XML document, and outputs the relevant text to define it in C#. I did this to avoid having to spend a few minutes manually creating three object definitions from XML files before using the objects in a unit test
It will continue to come in useful though, since the project I'm working on consists of a lot of extremely complex, deeply nested XML and lots of things will need similar unit tests
-
@Jaloopa said in The Most Absurd Thing You've Ever Coded/Built:
@Gąska said in The Most Absurd Thing You've Ever Coded/Built:
@Mason_Wheeler said in The Most Absurd Thing You've Ever Coded/Built:
@Zenith Meh. If they're dumb enough to hire that guy, I probably don't actually want to work there anyway.
"Want to work there" is pretty low on my list of priorities when applying for a job.
It's right near the top for me. Life's too short for a job you don't like
Life's too short for a salary that doesn't cover everything you'd ever want.
-
@Tsaukpaetra said in The Most Absurd Thing You've Ever Coded/Built:
@_P_ said in The Most Absurd Thing You've Ever Coded/Built:
Not as bad as writing a GUI application in Lua.
How about a psuedo-operating system based on lua? I didn't make it though, just used said system to make a hotel room reservation system in Minecraft.
OpenComputers or ComputerCraft?
-
@pie_flavor said in The Most Absurd Thing You've Ever Coded/Built:
make a hotel room reservation system in Minecraft.
"Welcome to Hotel Minecraft. Here's your stone pickaxe. New rooms are being constructed on the northwest four passage. Follow this map to get to your designated dig area. And here are the blueprints for your room, which you will build. Enjoy your stay!"
-
@Vixen said in The Most Absurd Thing You've Ever Coded/Built:
Welcome to Hotel Minecraft
Such a pixellated place,
such a pixellated face...
-
It's a bit surprising that no-one mentioned that, unlike ZIP, RAR & 7-Zip formats,
tar
preserves file mode bits and other Unixy stuff which is important for *nix software (especially executable bits). That might in part explain its wide use. (Not that there aren't alternatives likecpio
,dar
, SquashFS and others.)Getting back to the topic, one of the most absurd things I've coded would be a script that takes the trajectory of the optimization method in the parameter space, assigns a MIDI instrument to each of the parameters and maps the parameter value range to about six octaves of G minor. Resulting "music" depends a lot on the algorithm used. The algorithm that performed the best on my problem sounded like orchestra tuning sound on crack in the beginning, but then settled down to almost a monotone (different parameters took different numbers of iterations to settle).
-
@aitap said in The Most Absurd Thing You've Ever Coded/Built:
Getting back to the topic, one of the most absurd things I've coded would be a script that takes the trajectory of the optimization method in the parameter space, assigns a MIDI instrument to each of the parameters and maps the parameter value range to about six octaves of G minor. Resulting "music" depends a lot on the algorithm used. The algorithm that performed the best on my problem sounded like orchestra tuning sound on crack in the beginning, but then settled down to almost a monotone (different parameters took different numbers of iterations to settle).
I don't know if you've heard of Quasifractal Composer, but I use to play with that a lot.
-
@Mason_Wheeler said in The Most Absurd Thing You've Ever Coded/Built:
@Vixen said in The Most Absurd Thing You've Ever Coded/Built:
Welcome to Hotel Minecraft
Such a pixellated place,
such a pixellated face...You can check out any time you like, but you can never push?!
-
@aitap said in The Most Absurd Thing You've Ever Coded/Built:
It's a bit surprising that no-one mentioned that, unlike ZIP, RAR & 7-Zip formats,
tar
preserves file mode bits and other Unixy stuff which is important for *nix software (especially executable bits). That might in part explain its wide use. (Not that there aren't alternatives likecpio
,dar
, SquashFS and others.)The zip format includes an "extra field" which can be used to store that metadata.
-
@Jaloopa That's not absurd... it's a simple compiler. I do it all the time, like to make JSON that generates C# tests.
One of the reasons I like Haskell is that it makes it easy to write interpreters.
-
@Captain if it's a simple compiler then I wrote a C# compiler in C#. Still sounds absurd to me
-
@Jaloopa I mean, you wrote an XML interpreter in C#... True, M4 or whatever it's called is probably a better tool than pure C# for writing C#, but eh.
-
@pie_flavor said in The Most Absurd Thing You've Ever Coded/Built:
OpenComputers
I believe it was this one.
-
@PleegWat said in The Most Absurd Thing You've Ever Coded/Built:
@PleegWat said in The Most Absurd Thing You've Ever Coded/Built:
Now I want to go by the shop and buy a bag of salmiakki on the way home.
In case anyone cares, I ended up not going for salmiak after all.
Google translate says this means:
klene
Dutch only real one
laurel
voyages of discovery
solid licorice
running with real (berend?)
laurel (laurier?)
-
@djls45 prepared with real laurel.
-
@PleegWat And it's
Netherlands' only real one
-
@levicki said in The Most Absurd Thing You've Ever Coded/Built:
if your computer isn't manly enough to handle it then I guess you can keep using that crap called ZIP and I'll stick to using LZMA2 compression and solid archives with large dictionary sizes to actually, you know, compress things.
You only need to worry about compression ratio when you're not manly enough to have a big disk
-
@levicki said in The Most Absurd Thing You've Ever Coded/Built:
@Zerosquare said in The Most Absurd Thing You've Ever Coded/Built:
You only need to worry about compression ratio when you're not manly enough to have a big disk
Liar! There is no such thing as a big enough disk.
given that i have a 21TB RAID array in my Home NAS that is sitting at 95% full....... I'm beginning to think that i should either actually finish those video editing projects and delete the RAW working video to free up some space, or start buying bigger disks to swap into the array so once they're all swapped and replicated I can grow the array to 42TB and be good for another year.
they make 12TB drives now, yeah?