pouët.net

Random line of code thread

category: code [glöplog]
It's also accurate to the current moon cycle.
added on the 2018-10-05 21:47:41 by Molive Molive
To all who reads this: Don't look at the previous page.
I'm so sorry.
added on the 2018-10-05 21:49:05 by Molive Molive
What! The previous page is completely empty. There seems to be a special case only for page 69?
added on the 2018-10-05 22:18:51 by neoneye neoneye
Something something horizontal scrolling.

Other pages in this thread were affected, too, but... not *this* bad.
added on the 2018-10-05 22:22:28 by porocyon porocyon
Umm, (almost-)full-moon isn't the current moon cycle :P
added on the 2018-10-05 22:29:01 by porocyon porocyon
Hmm. does the moon cycle change based on timezones? if not then welp.
added on the 2018-10-05 22:32:36 by Molive Molive
anyway, to make up for the lines of non-code:

Code:.fill (156-4*14),1,0xFE @ eww eww eww

Code:b .Lrom_hdr_mid @ turns out the BIOS *REQUIRES* this one to be a branch >__>
added on the 2018-10-05 22:32:43 by porocyon porocyon
CSS patch to fix Pouet to not overflow like that:

Code:.content { max-width: 1800px; /* size limit fallback for browsers that don't support CSS3 */ max-width: 100vw; /* limit post width to 100% of the view width on CSS3+ browsers */ }
Molive: it only depends on the position of the earth, relative to the sun and moon, so it only varies a little bit (earth diameter/distance to moon) if you are at the other end of the world. My calendar tells me it's around new moon currently, but I'm too lazy to look outside :P
added on the 2018-10-05 22:38:42 by porocyon porocyon
You're right: it's exactly opposite to what it should be. Eh.
added on the 2018-10-05 22:40:34 by Molive Molive
TL;DR for page 69 (nice), Molive accidentally posted a super long one-line code clip and, instead of overflowing with a horizontal scroll on the code element, Pouet's current CSS renders the page to be about a million pixels wide.

Adding the patch from my previous comment to the CSS forces the element to never exceed the viewport width on CSS3+ browsers, and on older browsers just sets a hard limit of 1800 pixels.

It may also be prudent to additionally patch in a word-wrap on .content and child section elements to prevent the same thing happening with ultra-long words that have no common line delimiters:

Code: .content { max-width: 1800px; /* size limit fallback for browsers that don't support CSS3 */ max-width: 100vw; /* limit post width to 100% of the view width on CSS3+ browsers */ word-wrap: break-word; /* prevent excessively long words in posts from breaking page layout */ } .content section { word-wrap: break-word; /* prevent excessively long words in post sections (e.g. code tags) from breaking page layout */ }


I am amused that this broke so spectacularly.
powers: DC.B 1,2,4,8,16,32,64,128,29,58,116,232,205,135,19,38
added on the 2018-10-06 13:53:13 by lsl lsl
Code:std::unique_ptr<real_type[], coreutil::aligned_delete<real_type>> b_, a_;

I hate C++ btw.
added on the 2018-10-06 23:54:29 by svo svo
Code: ; dive into stack and find buffer index mov ebp, [esp + 76] ; 1 shr ecx, 2 ; . | process 4 pixels -> 16 bytes in parallel mov edx, [ebp+8*edx] ; 2 lea esi, [esi+4*ecx] ; . lea edi, [edi+4*ecx] ; 3 lea ebx, [ebx+4*ecx] ; . lea ebp, [edx+1*ecx] ; 4 xor ecx, -1 ; .
added on the 2018-10-13 21:43:25 by wbc\\bz7 wbc\\bz7
Quote:
Quote:
unsigned short readdword()

(c) BoyC


From all random lines, this impresses me the most :-D
added on the 2018-10-19 20:33:01 by EvilOne EvilOne

login