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 - Meldaril

Pages: 1 [2] 3
16
Off Topic / Re: Programming Megathread
« on: April 19, 2017, 04:44:39 PM »

I once used two function pointers to get the size of a function. Very dangerous but possible on certain systems and compiler outputs. I think MSbuild pads around procedures/functions to mitigate againt ROP attacks.

17
Off Topic / Re: Gaming on the GPD Win (UMPC)
« on: April 18, 2017, 09:54:39 PM »
ok
Yes Blockland is more "indie" but nevertheless my point remains. Devices like this have been trickling into the market and they are capable of playing videogames that have been developed by major studios.

18
Off Topic / Re: Programming Megathread
« on: April 18, 2017, 09:46:36 PM »
can someone explain to me what a pointer is and how you're supposed to use it? i've really been stuck because i gave up early on c in favor of web design languages, but recently tried to get back into it, and still can't grasp much of the application without knowing pointers
I'll try to use a terrible brown townogy.

Imagine there is a very long book shelf (with only one shelf) and many millions of books (each book representing a portion of computer memory being used). Some of these books are much bigger than others and take up more space. A pointer is a very small book that's stored in our bookshelf and it contains only one page, that page simply describes where to find another book. A "pointer-book" doesn't need to tell us where another book is, the page might contain a single "0" which means it points to nothing. This is what's called a null pointer.

Example:
Code: [Select]
BOOK *pointer_book = nullptr; // "pointing to nothing"

It's very convenient if the cover of our "pointer-book" says what it's pointing to. For example, the book it's pointing to could be a book about a particular model of car so we say "this is a pointer-book about where to find a car". This is called static typing and it's used by many languages. If you are lazy you can always say 'Our "pointer-book" points to any book of any type!', in which case, the cover of your book will be called "void" which means your "pointer-book" can be used to point to anything.

Code: [Select]
CAR *pointer_book1 = &a_book_on_our_car; // A particular model of car
void *pointer_book2 = &a_book_on_our_car; // A new pointer but telling us where our car is again
pointer_book2 = &a_book_on_bicycles; // Reusing our previous pointer, this is valid because it's a "void pointer"

What happens if the our "pointer-book" points us to a book that's no longer there? What happens if our "pointer-book" points us to a book that's not about that car anymore but instead about bicycles? These are very bad conditions that can crash and burn our whole book-keeping system (our program).

19
Off Topic / Gaming on the GPD Win (UMPC)
« on: April 18, 2017, 09:07:31 PM »
UMPC means ultra-mobile personal computer. In recent years, AAA-gaming on one has been made possible due to advancements from Intel's mobile focus. This is blockland running with medium shaders at 1280x720 resolution averaging about 30 fps to 40 fps. Obvious issues include there being no numpad, the keyboard is too small and it also turns into a cozy hand-warmer after a few minutes. I have also performed Blender Cycle renders on this device. This UMPC is from GPD, a Chinese company, but there are many others.



I bought this UMPC with RDP and Steam streaming in mind but I was quite surprised when it could run The Sims 4 and Blockland. I tried the original Crysis 1 but pesky DRM got in the way.

Hooray for technological progress!

20
Creativity / Re: Creating a CPU from logic gates. (Nearing completion)
« on: April 18, 2017, 08:36:19 PM »
How's it going?

21
Off Topic / Re: invite me to your cliques.
« on: April 18, 2017, 08:20:50 PM »
Does this community make use of a chatroom e.g Discord?

22
Creativity / Re: Drawings Megathread
« on: April 18, 2017, 08:18:47 PM »
gimme
Apparently you can still buy it.

23
Off Topic / Re: Programming Megathread
« on: April 18, 2017, 07:56:29 PM »
I needed to disable my network connection quickly so I wrote this script to disable the network adapter via WMI. Requires UAC elevation. I'm not sure why I turned the argument into a Ruby symbol.

Code: [Select]
unless ARGV.length == 1
  puts "Missing arguments. Lockdown --start to begin and --stop to finish lockdown."
  exit
end
if ARGV[0] != '--start' && ARGV[0] != '--stop'
  puts "Invalid argument. Use --start or --stop"
  exit
end
mode = ARGV[0][2..-1].to_sym # '--start' -> :start

require 'win32ole'
wmi = WIN32OLE.connect('winmgmts://./root/standardcimv2')
adapters = wmi.ExecQuery("select * from MSFT_NetAdapter")
for adapter in adapters do
  if adapter.Name == 'Ethernet'
    if mode == :start
      adapter.Enable
    else
      adapter.Disable
    end
  end
end

24
Creativity / Re: Drawings Megathread
« on: April 18, 2017, 07:49:31 PM »
A few unfinished drawings from over the years, not shown in order.

I'm also shamelessly showing off my limited edition lego moleskine sorry.





25
Off Topic / Re: 16 vs 32 Bit Color
« on: April 04, 2017, 08:04:21 PM »
Much of the RGB gamut is wasted on us. Interesting tidbit, the M and L cone cells in our retinas are more sensitive to green (middle-ish of the visible spectrum for us humans); therefore digitial cameras, file formats, compression algorithms etc are all built with extra provisioning for green. This is why a Bayer Filter Mosaic (a type of 2D photocell array used in digital cameras) uses more green-sensitive photocells and why "hi-color" (16-bit) uses 5 bits for red, 5 for blue but 6 bits for green so that your camera captures more detail for your human eyes.

24-bit true color uses 8-bits for each primary which is why it's "true color" I assume.

26
Creativity / Re: Creating a CPU from logic gates.
« on: March 29, 2017, 10:49:40 AM »
How's the instruction-decoder/control unit coming along? Are you using a finite-state automaton?

27
Then what DO you reccomend?
Well that depends on a number of factors like what country you live in, your geographical location, your threat model and so on.

Personally I think it's highly unwise to state what VPN you use on a public internet forum.

28
Modification Help / Re: [Library] SHA-256
« on: March 28, 2017, 06:38:46 PM »
Is that the right-to-left binary method?

29
If you're going get a VPN, avoid these. This list is not exhaustive; therefore perform due-diligence.

EarthVPN
HideMyAss
CyberGhost
HotSpotShield
HideIPVpn
TunnelBear
SuperVPN
VPNPop
VPNGate
VPNBook
FREEVPNAccess
FrootVPN
SurfEasy
vpnreactor
FinchVPN
hide.me
DreamVPN
anonine
IPVanish
ThankVPN

30
Off Topic / Re: Did you build your computer?
« on: March 24, 2017, 04:38:36 PM »


I built this computer back in 2014 and I upgraded the graphics card a few months ago. The 770 is being used to render Blender Cycles scenes so that I can free up my 1070 for other work.

The issue I have with this computer, more specifically the case, is the utterly inadequate hotswap bay cooling for the two 5.25" drives. That SSD fits in the back of my computer in a metal rack near the PSU which is why the temps are lower but the Seagate and WD fit at the front with no active cooling. To mitigate some of the risk, I do automated backups with Unison (using "-force") to the Hitachi drive. If the drives fail I won't lose days of stuff.

Most days the hard-drives run hotter than my CPU (slight OC to 3.7-3.8Ghz).

Pages: 1 [2] 3