lainchan / λ

Stupid Questions

Anonymous · 2015-10-18 23:26
Going to kick off this S.Q. General with a request idea - (2 threads in 1 as I did not want to make one just for a request) Being a retard I can't program at all... But I have a shwayyyy idea for a little programming project - some might find this an interesting challenge and I expect it is not a hugely hard program! The idea goes like this: (was something I did in a pseudo way for my degree show at art collage yrs ago - on 7 x 286 machines in very low res). Make an application that draws every possible pixel combination on the screen (B+W only (for now) 640x480). In the drawing of every pixel combination (which will take forever minus a day) there will be every bit of information ever - text, images, photos, diagrams, RAW PCM of every audio too! Hence I called the work Silicone Monkey! Any Takers?
Anonymous · 2015-10-18 23:36
>>10676 Do you realise how many images that is? If each pixel is totally black or totally white there are about 2*10^92476 combinations. If shades of grey are allowed, say an 8-bit value, then that goes up to 2*10^739811.
Anonymous · 2015-10-18 23:50
>>10676 >In the drawing of every pixel combination (which will take forever minus a day) there will be every bit of information ever - text, images, photos, diagrams, RAW PCM of every audio too! Well, every bit of information ever that can be expressed in at most 307200 bits. Not sure how much audio you really get for 38KB.
Anonymous · 2015-10-19 00:07
>>10676 It's been done: https://babelia.libraryofbabel.info/
Anonymous · 2015-10-19 00:10
>>10679 There will be every bit ever - kind of... beacuse you will be able to make joiners to get all the info that needed a bigger res screen! >>10677 forever minus a day >>10680 only in text - and yes this was a cool project - it is similar in concept but slightly different in execution.
Anonymous · 2015-10-19 00:20
>>10680 >>10681 oh ok... they now have an image section too! Very cool cheers... now I just need to keep on rolling untill i find the sekrit of life! Ah well - does λ reckon this is an easy programming task or a complex one.. Sounds like one of thoes tasks you get on the 100 programs to start you off sheets?
Anonymous · 2015-10-19 01:13
>>10681 Art Museum of Babel
Anonymous · 2015-10-19 18:03
>>10684 Shouldn't be too hard to solve. I'd put it on that list.
Anonymous · 2015-10-19 18:09
Consider this thread: >>5683
Anonymous · 2015-11-04 23:10
Not sure if this is a good place to ask, but I do have a problem that I feel like λ might be able to answer. I have a server that a user will upload images to. When the user connects, creating a new session, a directory will be created with the name being a hash of the user's session ID. My PHP script automatically places the uploaded images into the directory alongside a copy of an executable that I've written and executes the binary, which works on the images, creates a new image based on them and then that image is displayed to the user. Problem is, when I copy the binary file over to the new directory, it isn't marked as executable. PHP chmod causes server errors and makes the entire web application useless. Is this even the correct way of doing this, or would it be more wise to place the binary file in one place and execute it from there, passing the directory to the executing process? What about having a BASH script move it? What is the best way to approach this problem?
Anonymous · 2015-11-05 16:08
>>11495 Why not keep the executable in one place? Why do you need multiple copies?
Anonymous · 2015-11-05 16:08
How do I stop language hopping
Anonymous · 2015-11-05 16:16
>>11540
Anonymous · 2015-11-05 23:31
>>11539 Because I'm an absolute noob and am too lazy to want to go through the the process of writing my executable to accept the unique directory created for the individual session. Regardless, I was able to figure out what the hell I was doing and was able to work through my problem, I just needed to read up on umask().
Anonymous · 2015-11-05 23:52
>>11540 this. jack of all trades master of none here. I just need to stick with something.
Anonymous · 2015-11-06 00:25
>>11563 i think picking 2-3 languages to get good at and are different enough to not bore you is a good idea.
Anonymous · 2015-11-08 04:45
Anyone around here doing this "Introduction to Functional Programming in OCaml" course? https://www.france-universite-numerique-mooc.fr/courses/parisdiderot/56002/session01/about Thoughts? Hatred? Love?
Anonymous · 2015-11-12 17:39
Ok so I've pondered about this for long ,are computers just series of voltages and are compilers also voltages that convert the aforementioned voltages into a little bit different type of voltages which can be executed by whatever hardware is under it?
Anonymous · 2015-11-12 18:04
>>11687 I'm doing it. Their English is a bit messy and the exercises so far are not that interesting, but I love OCaml. I'm really looking forward learning how modules work.
Anonymous · 2015-11-12 19:31
>>11915 >are computers just series of voltages Its more how the voltages are routed... see: https://www.youtube.com/watch?v=lNuPy-r1GuQ
Anonymous · 2015-11-12 19:56
>>11915 The short of it is that compilers are stored in memory as a series of voltages representing machine code for your particular CPU architecture. CPUs interpret this series of voltages as instructions for going and performing operations on other series of voltages in memory e.g. your source files. There's no different "types" of voltages, only different arrangements of the same voltage values (I think 1.5 V for binary 1, 0 V for binary 0, not sure though). The key thing that I wish someone had told me when starting out is that the buck ends with the CPU and its instruction set (a bunch of commands that the CPU understands natively because it has been physically wired to be able to do so). Once you get to this level it's all logic gates and circuits just doing what they do.
Anonymous · 2015-11-13 02:49
>>11919 >>11920 Cheers mate!