Python

Room rules: sopython.com/chatroom Code formatting guide: tinyu...
Sep 17, 2016 21:40
Hmm.... the problem is that I'm trying to send through two different types of data through the same wire.
Sep 17, 2016 21:33
Hey, I'm looking for an ASCII control character that will instruct a terminal to ignore the next few bytes or so.
 

C#

General discussions about the c# language, Squirrels | gist.gi...
Feb 20, 2016 19:04
that's funny, haven't there been M$ ads about upgrading to win10 for free been blasting on all the windows 7 machines for months and causing massive headaches to productivity?
Feb 20, 2016 19:01
if you qualify
Feb 20, 2016 19:00
free as in "free"
Feb 20, 2016 19:00
@Rusty ..both of which are free lol
Feb 20, 2016 18:48
registers is a struct
Feb 20, 2016 18:42
so, delegate void Execute(ref registers)
Feb 20, 2016 18:40
okay
Feb 20, 2016 18:36
I'm trying to make a table of opcodes so that when the CPU runs, it will do something like registers.Immediate16_1 = 0x5; Table[0x66].Execute();
Feb 20, 2016 18:24
@TomW How much detail should I go into? The constructor for Opcode is public Opcode(string disasm, byte operands, Exec exe)
Feb 20, 2016 18:10
Clearly this is poor design, but I can't think of any better way to do this without turning it into some enterprise code.
Feb 20, 2016 18:10
public readonly Opcode[] Table =
        {
            new Opcode("NOP", 0, () => { }),
            new Opcode("LD BC, {0}", 1, LD_BC_NN)
        };

        void LD_BC_NN()
        {
            registers.BC = registers.Immediate16_1;
        }
Feb 20, 2016 18:09
Agh, so I'm trying to make an opcode table, but it keeps telling me "a field initializer cannot reference the nonstatic field..."
 

JavaScript

Topic: Anything JavaScript, ECMAScript including Node, React, ...
Jan 23, 2016 17:43
I want to use voxel.js but the problem is that it is very Minecraft-oriented, which makes from a hard transition to how things were with Voxlap
Jan 23, 2016 17:38
It's not my renderer, actually, it's a prototype renderer from someone else who wanted to make a Voxlap-like renderer on the browser. The code is small, but I think Silverman (the creator of Voxlap) got his performance from the fact that it was partly made of handmade assembly
Jan 23, 2016 17:32
I think it's somewhere along the lines of "none" but I'm not quite confident about that.
Jan 23, 2016 17:31
Does anyone know how much performance improvement should be expected when using the Closure Compiler with ADVANCED_OPTIMIZATIONS? I'm trying to optimize a voxel renderer
Jun 8, 2015 02:11
In an object constructor, can I shortcut this.x = 0; this.y = 0; this.z = 0; with this = {x: 0, y: 0, z: 0}?
Jun 6, 2015 17:32
WebRTC
Jun 6, 2015 17:29
(There's no way for me to take out the UDP part - it's required as part of the game protocol)
Jun 6, 2015 17:28
So the best way would be to create an HTTP wrapper on the UDP?
Jun 6, 2015 17:20
Uses dgram to make the socket. Apparently chrome has its own? but otherwise it uses the one from the package itself.
Jun 6, 2015 17:19
Took me a while to find it in the bindings: github.com/mnaamani/enet-npm/blob/master/src/…
Jun 6, 2015 17:10
Ah, I see what you're getting at. Gimme a sec.
Jun 6, 2015 17:09
client.connect(serverAddr, channels, data, peerConnectCallback(err));
Jun 6, 2015 17:07
var enet = require('enet');
Jun 6, 2015 17:06
@FlorianMargaine What do you mean by that? The code would be calling the ENet bindings directly to establish a UDP socket, i.e. client = new enet.Host(new enet.Address('localhost', 0), 128, 1, 256000, 256000, "client"); peer = client.connect(...)
Jun 6, 2015 16:58
Do browsers apply CORS to non-HTTP services? Say that I use ENet bindings (a UDP wrapper) for Node.js and then use Browserify to bring that over to the browser, and I try to connect to a server. Will it work or will it get blocked?
Apr 5, 2015 18:21
(removed)
Apr 5, 2015 18:12
well I'm making a bot for a voxlap game. In reality the map is RLE'd, compressed with zlib, then transmitted over ENet with the packet compressor enabled. So I only receive about 682000 bytes from the server, then the bot sets up a simple HTTP server that takes requests from the voxel clients that want the map data in JSON.
Apr 5, 2015 18:07
ok then
Apr 5, 2015 18:06
"true....." "false......" "t" <-- nope, gotta be more specific
Apr 5, 2015 18:04
reason I'm using boolean is to save on memory in the long run (1 bit instead of 4), at the expense of boolean verbosity
 

Lounge<C++>

Today we're daydreaming about C++26 reflection
Nov 2, 2015 01:45
so time warner then?
Nov 2, 2015 01:38
@GregorMcGregor Yes, it is indeed winforms.
Nov 2, 2015 01:37
@GregorMcGregor ...what are you talking about?
Nov 2, 2015 01:36
Yeah, System::String is .NET
Nov 2, 2015 01:35
but it's using System::String
Nov 2, 2015 01:35
there goes unicode support
Nov 2, 2015 01:35
hmmmm nope
Nov 2, 2015 01:34
I tried prepending it with L before the strings but it still does the same thing: i.imgur.com/aqAvdlC.png
Nov 2, 2015 01:33
@GregorMcGregor Uh, Shift-JIS is an encoding, not a hotkey
Nov 2, 2015 01:32
@GregorMcGregor it's a GUI application, encoding of all files are UTF-8 without BOM (I had to convert it manually from Shift-JIS)
Nov 2, 2015 01:30
hmm, trying to compile a project made in C++/CLI, Unicode is set as the character set, but when I run the build it just shows gibberish (it's supposed to be Japanese). What gives?
May 9, 2015 20:54
Flag a post to get a moderator to find out who is flagging everything
May 9, 2015 20:51
CMake Error at C:/Program Files (x86)/CMake/share/cmake-3.2/Modules/FindPackageHandleStandardArgs.cmake:138 (message): Could NOT find GLUT (missing: GLUT_INCLUDE_DIR)
May 9, 2015 20:50
@thecoshman Well I just "installed" both on my machine just now.
May 9, 2015 20:35
Hey I have a problem with cmake on windows. For some reason cmake is not detecting GLUT even though the DLLs are on my System32/SysWOW64. I've already gone to ##opengl and #cmake but nobody knows the solution (since nobody has encountered the problem).