Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - c4ooo

Pages: 1 ... 10 11 [12] 13 14 ... 17
166
Community Contests / Re: Code Golf - The Reboot #3
« on: June 16, 2015, 11:05:44 am »
Overall, I'm fairly happy with this question being sufficiently specified. However, I see one rule that should probably be specified further:

  • The game must start in a pseudo random configuration, and no user input is required.

As an example of abuse, a single cell placed pseudorandomly is a "pseudo random configuration," but not a very interesting one as every generation after the initial will just be entirely empty. You could fix this by specifying that every cell's initial state must have a nonzero chance of being in each state and must be independent (barring reasonable PRNG limitations) of every other cell's initial state.
Fixed :D

Also, you may want to consider adding a minimum bound on FPS. I realize this is a code golf contest, but at a point, one has to say that an extremely slow game of life simulation is no longer an acceptable game of life simulation. I understand that this may make the challenge as currently specified more or less impossible in some languages, in which case you could consider extending the exception to the "full screen" rule. I would suggest something like a minimum of 0.1 FPS and allowing entries that cannot meet this at full screen to run on a square board with a side length of at least 16 and no less than the largest power of two that satisfies the minimum FPS.
Nahh, it have plenty of time  ;)

I think you should specify a minimum screen size, because on any machine without a screen the solution is trivial: since there are no pixels, do nothing.
Standard loopholes apply : http://meta.codegolf.stackexchange.com/questions/1061/loopholes-that-are-forbidden-by-default
IMPORTANT
I will be away starting tomorrow afternoon till about Friday afternoon. If you have any important thing to talk to me about, please ask me before then .

167
Web Programming and Design / Re: Help with github and .TK
« on: June 15, 2015, 09:57:48 pm »
I don't see the favicon, it's just the default white page, try refreshing the page/clearing your cache.
EDIT: Also, that google logo is probably copyrighted.
Clearing my cache does nothing :(
And yea that image is probably copyrighted, i will replace it eventually, when i will actually use the website for actual stuff.
Edit: just saw the "I don't see the favicon" That encouraging!  *there is no emoticon for a an unsure smile*
Edit 2: tried to view it in internet explorer and i did not see the FN logo!  ;D now the question becomes why i cant properly clear chromes cache...
Edit 3: Now the logo mestiriusly went away in chrome :o The internet is confusing!  :D

168
Web Programming and Design / Help with github and .TK
« on: June 15, 2015, 09:35:37 pm »
I recently decided to use .TK to create a domain for my website, currently hosted on github. c4ooo.github.io, is URL of the website. However, ever sense i attempted to link the .TK domain to the github website, c4ooo.github.io has a blue "FN" logo as its icon. I cant seem to be able to remove it. Ive deleted my CNAME file in my github repository, but it still cant remove it. testing987654321.tk , the domain i set up with TK no longer works. Any help on how to remobe the blue "FN" icon from my websites tab,as well as on how to properly set up TP with github,would be highly appreciated. I am really lost :banghead:

169
Minecraft Discussion / 32 Bit Redstone Computer
« on: June 15, 2015, 03:38:02 pm »
Today i wanted to alert the omnimaga community of my 32 Bit Redstone (/command block :P ) Computer. I consider it one of the most power full (for example it is one of the only two MC computers i know of that can do multiplication in less then two seconds). Some other stats: (sorry if i seem like i am bragging :( )
  • 32 bit cpu
  • 64*64 pixel gpu that supports 16 colours
  • 4kb of memory (1024 32-bit memory cells)
So, here is a link to the main thread on mc forums: http://www.minecraftforum.net/forums/minecraft-discussion/redstone-discussion-and/2116999-computer-command-block-computer-now-running-with?page=3
A lot of the content there is outdated and need to be updated. If you have questions/comments and don't have a MC forums account, you can post here :) If you do i prefer if you post there for me to get more momentum :P
Here is a video: (sorry for bad quality)

170
Community Contests / Re: Code Golf - The Reboot #3
« on: June 15, 2015, 12:21:22 am »
Sorry, stupid question and off-topic but how do I access IRC?
You get access to it once you get 40 post IIRC :)
Also what @Juju said.

171
Community Contests / Re: Code Golf - The Reboot #3
« on: June 15, 2015, 12:16:01 am »
Hm, another graphic challenge. Gotta try the new PICO-8 0.1.1 out.
This is meant to give advantages to calculators.

I think I know what my approach (in Ti-BASIC) will be. It will be very slow when golfed completely, and I don't think we should expect any of these to be of practical speed.
This is code golf so size > speed :)

Also AOTM i am still tweaking the rules based on some feedback i am getting on IRC so yea...

172
Community Contests / [ENDED] Code Golf - The Reboot #3
« on: June 15, 2015, 12:00:02 am »
Hello ladies, gentleman, and welcome to the third iteration of...
:evillaugh: Code Golf Rebooted! :evillaugh:
...not that its evil or anything... But any way, as you can see i am neither @JWinslow23 nor @pimathbrainiac,for my name is c4ooo, and if you are confused as to what is happening, I will explain. Basically, me Pimath and Winslow as well as others, will all be hosting the challenges in succession. If you are confused because you do not know what code golf is, please check out this thread: https://www.omnimaga.org/community-contests/code-golf-the-reboot-1/

So, as to begin, here is this weeks challenge:
Challenge #3: Cellular automation
You must wright a program that infinitely computes Conway's Game of Life. What is this Conway's Game of Life you may be asking? The Game (no not that game, Conway's Game) is "zero person" game in which the board is split into an infinite grid of square cells. Based on four specific rules, cell die or are reborn. These are the four rules, taken from wikipidia:
Quote
  • Any live cell with fewer than two live neighbours dies, as if caused by under-population.
  • Any live cell with two or three live neighbours lives on to the next generation.
  • Any dead cell with exactly three live neighbours becomes a live cell, as if by reproduction.
  • Any live cell with more than three live neighbours dies, as if by overcrowding.

Thus, a every pixel is a cell, and every turn the four rules must be applied to every pixel/cell to generate the new state of the game board. A cell is a "neighbouring cell" if it is adjacent to the cell, diagonals included. To know more about The Game, I highly suggest Wikipedia (It might be necessary for you to read the article, my summery of The Game is very brief): https://en.wikipedia.org/wiki/Conway's_Game_of_Life. Mostly to give an advantage to calculators, i will add several rules your program must follow:
  • Every pixel on the screen must be an individual cell, white being dead and black being alive or vice verse.
  • The game board must consist of every pixel on the screen. eg "full screen"., However, the rule does not apply if there is a significant limitation in your language where this is simply not possible, like in Silver Edition TI-BASIC, or PICO-8.
  • The outer pixels do not have to follow the rules,If you want you make make them dead forever. Alternatively, you can make the board wrap around.
  • The game must start in a pseudo random configuration, loophole fix, courtesy @Runer112 "every cell's initial state must have a nonzero chance of being in each state and must be independent (barring reasonable PRNG limitations) of every other cell's initial state." No user input / cell manipulation is required.
  • Every iteration the program must obviously update the screen.
Ranking
Solutions
Runer112:
Spoiler For Spoiler:

.L
For(ClrDraw)
Pxl-Change(,rand
End
Repeat StorePic DispGraphClrDrawgetKey
For(X,,"
For(9→Z)
-pxl-Test(Z--^3+X-1,Z/3+Xʳʳ-1)ʳ
End
Pxl-On( or pxl-Test(X,Xʳʳ)ʳ=5*X,Xʳʳ
End
End

lirtosiast:
Spoiler For Spoiler:

0
For(F,1,E9
For(X,0,93
Ans/7+49seq(pxl-Test(Y,X+1),Y,0,62
For(Y,1,61
If 2rand<F=pxl-Test(Y,X)+int(3fPart(3cosh(fPart(6-1iPart(sum(Ans,Y,Y+2
Pxl-Change(Y,X
End
End
End

Haobo:
Spoiler For Spoiler:

Copy(rand
While
StorePicDispGraphClrDraw
For(Y,0,63
For(X,0,95
For(Z,0->B,8
pxl-Test(Z^3+X-1,Z/3+Y-1)^^r->A
Z=4?A->C,A+B->B
End
If B=3+(C?B=2
Pxl-On(X,Y
End
End
End
End

ben_g:
Spoiler For Spoiler:

*COMING*

Scipi:
Spoiler For Spoiler:

#include<tonc.h>
#define l for(x=0;++x<239;)for(y=0;++y<159;)
main(){R=1028;*P=32767;u8 x,y,s,m,p;for(;!(S=~K&1023););l M(x,y,Q()&1);for(;u8*v=(u8*)V;){F();l{for(m=-1,p=v[x+y*240],s=-p;++m<9;)s+=v[x+m%3-1+(y+m/3-1)*240];M(x,y,p?s<4&s>1:s==3);}}}

pbfy0:
Spoiler For Spoiler:

.string "PRG"
 
   lcd_ptr .req r4
   active_fb .req r5
   inactive_fb .req r6
   orig_fb .req r7
   new_fb .req r8
 
   @ start
   push {r4-r8, r12, lr}
   
   ldr lcd_ptr, =0xC0000000
   adr r9, offsets
   @mov r0, #0x10000
   @sub r0, r0, #0x11
   ldrh r0, [r9, #6] @ 0xffff is already in the offset table because of -1
   str r0, [lcd_ptr, #0x200]
   
   @ldr r2, [lcd_ptr, #0x18]
   @bic r2, #14
   @orr r2, #6 @ 8 bpp, paletted
   ldrh r2, [r9, #18]
   str r2, [lcd_ptr, #0x18]
   
   @add lcd_ptr, r1, #0x10 @ to 0xC0000010
   ldr orig_fb, [lcd_ptr, #0x10] @ original framebuffer
   mov active_fb, orig_fb @ active framebuffer
   add new_fb, orig_fb, #76800
   mov inactive_fb, new_fb
   
   ldr r10, =76800
   mov r11, #0
1:   subs r10, r10, #1
   strb r11, [active_fb, r10]
   @ldrb r3, [inactive_fb, r10]
   svc #206 @ rand
   and r0, r0, #1
   strb r0, [inactive_fb, r10]
   bne 1b
   
   mov r2, #320
   mov r1, #0
   mov r0, inactive_fb
   push {r1,r2}
   svc #7
   pop {r1,r2}
   ldr r3, =76480
   add r0, r0, r3
   svc #7
   
3:   ldr r0, =76480 @ 320 * 239
   str inactive_fb, [lcd_ptr, #0x10]
   mov inactive_fb, active_fb
   ldr active_fb, [lcd_ptr, #0x10]
 
2:   mov r1, #18 @ 9 * 2
   mov r2, #0
   sub r0, #1
   
1:   sub r1, #2
   ldrsh r3, [r9, r1] @ won't let me use lsl #1
   add r3, r3, r0
   cmp r3, #76800
   ldrltb r3, [active_fb, r3] @ no lt?
   addlt r2, r2, r3
   teq r1, #0
   bne 1b @ at end of loop, r1 and r3 can be discarded
   
   ldrb r1, [active_fb, r0]
   @add r2, r2, r1
   teq r2, #3
   moveq r1, #1
   teqne r2, #4
   movne r1, #0
   strb r1, [inactive_fb, r0]
   teq r0, #320
   bne 2b
   
   ldr r0, =0x900E001C
   ldr r1, [r0]
   tst r1, #0x80
   beq 3b
   
   str orig_fb, [lcd_ptr, #0x10]
   pop {r4-r8, r12, pc}

offsets:
   .hword -321, -320, -319, -1, 1, 319, 320, 321, 0 @ actual offsets
   .hword 0x927 @ misc data

Juju:
Spoiler For Spoiler:

function e(i)x=i%128y=i/128n=pget(x,y)z=-n
for j=-3,5 do z+=pget(x+j/3,y+j%3-1) end
if(z<9 or z>21)n=0
if(z==21)n=7
return n
end
for i=0,8191 do poke(i,112*flr(rnd(2))+7*flr(rnd(2)))end
function _update()end
function _draw()memcpy(24576,0,8192)for i=0,8191 do
poke(i,16*e(i*2+1)+e(i*2))end
end

My solution:
Spoiler For Spoiler:

*COMING*

Scoring
All non-calculator programs will be scored through this counter: http://juju2143.ca/golf/
Assembly programs will be scored on binary size (excluding the header), and Basic/Axe programs will be scored based on-calc source size (once again, excluding the header).
Good luck, and may this contest automate you!
Submission:  
To submit, ether send me a PM with a the/link to code, or electronically mail me at kuznetsov4000[at]gmail[dot]com.
Want to host to?
Just ask me, pimathbrainiac or JWinslow about it, preferably by replying in here: https://www.omnimaga.org/community-contests/code-golf-the-informationdiscussionplanning-thread/.

173
Community Contests / Re: Code Golf - The Reboot #2
« on: June 14, 2015, 08:03:17 pm »
Actually, c4ooo is up next, then Juju.

EDIT: the results might not be up until tomorrow. @c4ooo post your contest tomorrow regardless of whether or not the results are posted when you get on.
Don't worry, will do 12PM sharp, also did you get my entry?

174
Miscellaneous / Re: Birthday Posts
« on: June 14, 2015, 05:25:39 pm »
I just found out it was the birthday of @Eeems so i made him a card. Its sorta simple but you should look at it any way :3 :)

175
I have been forces by the evil serf lords @Geekboy1011 and @Sorunome to post a replay, so here I am :P  ;D

The only thing I really have to say is about that code, I know it's asm code, couse I see it's asm code, yet with all the macros and stuff, it realy does not feal like assembly code  :-\
it's still great thou, no matter how you make this game, I still will want to play it :)

176
Community Contests / Re: Code Golf - The Reboot #2
« on: June 13, 2015, 09:51:46 pm »
Nope, I have 45 without my 4byte optimization, the person in second place has 2 more  :)
Also, I decided to call it a day submitted my entry  :D
Edit:
So you have at most 36 bytes now, considering CKH4's 41 byte solution? That's below what I could get for a "sane" entry.
Well, pimathbrainiac has not updated the list, so I thought I had second when actually I have third place :(

177
Community Contests / Re: Code Golf - The Reboot #2
« on: June 13, 2015, 09:13:41 pm »
Yea, my solution. Although I am one of the "project authors" , AOTM only @pimathbrainiac has the entries, and even if I had them, I would never take someone's entry and resubmit it, even if I optimized it. :P

Edit: I guess it doesn't really matter if I shave 4 bytes, couse ether way, I get get second place :D

178
Community Contests / Re: Code Golf - The Reboot #2
« on: June 13, 2015, 09:08:03 pm »
c4ooo: Let me guess: two getKeys near each other that both need to register in order to update the cursor?
Well, both DO NOT need to register in order to update the cursor, and I realy can't say anything more or else I will reveale to much    8)

179
Community Contests / Re: Code Golf - The Reboot #2
« on: June 13, 2015, 07:33:36 pm »
Can I infer that the user has certain variables set to certain value?

EDIT: Sorry, my clumsy fingers on mobile accidentally rated this post one star. :-\ Is there a way to undo it?
By having everyone rate it 5-star   :D

Edit: Also, I was able to save four bytes, but now do to the get key system, sometimes when you press a key the pixel does not move, and you have to spam the key. Will that be allowed where you have to spam the key in order for it to move? :P

180
Humour and Jokes / Re: Weird/funny pictures thread
« on: June 11, 2015, 09:32:20 pm »

That image is not accurate. You can easily survive if it happened to be 100 Celcius outside. (but not to long), Infact, many Russain traditional "steam baths" (idk proper english term for them :P) have air temperateness above 100C. No one dies because gasses are bad at transferring heat, so even thou it might 100C outside your body temp would still be around 40C  If you touch a 100C solid or liquid, which are better at transferring heat, then you will get injured or killed thou :P

Pages: 1 ... 10 11 [12] 13 14 ... 17