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 wbcbz7 wbcbz7
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
two paste ins for link
techbeat box (floatbeat ??kHz)
Code:t * .0000148 & t / (136 >> 0 * (t * .5) | sin(t / .1)) / .1 & t * .005

mayday4f (floatbeat 8kHz)
Code:t * .00015 & t / (6.4 >> t / .2 * (t * 1.5999999) | sin(t / .6)) / 1.6 & t * .0003
added on the 2018-10-24 05:41:21 by aqu aqu
Code:ld b,(EchoPos - 1) - CH1EchoBuffer
added on the 2018-10-25 00:34:31 by DevEd DevEd
DestroyImmediate(gameObject);
added on the 2018-10-25 09:02:50 by visy visy
Code:tst.w (a7)+
added on the 2018-10-30 12:49:35 by StingRay StingRay
Code: lea dsp_code(pc),a0
added on the 2018-10-31 14:02:42 by insane insane
Quote:
if((x * x + y * y < 256 || (W - x) * (W - x) + (H - y) * (H - y) < 256 || x * x + (H - y) * (H - y) < 256 || (W - x) * (W - x) + y * y < 256) && (x * x + y * y > 128 && (W - x) * (W - x) + (H - y) * (H - y) > 128 && x * x + (H - y) * (H - y) > 128 && (W - x) * (W - x) + y * y > 128))
added on the 2018-11-01 15:47:11 by visy visy
Code:vec4 a = posMath(dir,vec3(1.0,1.0,0.0),1)
added on the 2018-11-01 17:46:43 by pitapoto pitapoto
Code: if (b==0.0) { b = 1.0; } else { b = 0.0; if (r==0.0) { r = 1.0; } else { r = 0.0; if (g==0.0) { g = 1.0; } else { g = 0.0; } } }
added on the 2018-11-01 21:32:13 by Optimus Optimus
Code: try: gdb.execute("continue&") except: gdb.execute("run&") time.sleep(0.2) self.inttype = INTTYPE_INIT gdb.execute("interrupt")
added on the 2018-11-02 00:08:11 by porocyon porocyon
with
Code:gdb.events.stop.connect(self.interrupt_cb)
somewhere above that snippet
added on the 2018-11-02 00:08:57 by porocyon porocyon

login