« first day (1205 days earlier)      last day (3967 days later) » 

16:04
@StackedCrooked Earth is in space. What more do you want?
If I'll ever delete my account, lightness will loose so much reputation that he will fall back to < 100K in a blink of an eye
user1804599
@deadbeef y u assembly.
user1804599
@BartekBanachewicz are there any caveats to #define LUA_NUMBER std::int32_t? I don’t use any of the standard library.
@rightfold it's a double
lua numbers are 64-bit floats by default so I am not sure why you'd want an integral type
user1804599
Can Lua table keys only be strings?
user1804599
16:13
Oh, everything but nil.
@rightfold It really should be a floating-point type.
3
A: Check at compile-time is a template type a vector

galop1nIt is named tag dispatching : #include <vector> #include <set> #include <type_traits> template<typename T> struct is_vector : public std::false_type {}; template<typename T, typename A> struct is_vector<std::vector<T, A>> : public std::true_type {}; template <typename T> class X { public: ...

not sure if i like or dislike C++
@BartekBanachewicz but... efficiency
performance
@Jefffrey assembly is not efficient
16:29
welp and now on to the Gamma sector
@DeadMG I'm still figuring out how to leave my first planet.
mine coal, teleport to ship, fuel ship with coal.
1
A: Invalid operator< using std::equal_to

Dieter LückingYour operator < is plain wrong. You might want: bool operator<(const VertexTypePos3Normal& v1, const VertexTypePos3Normal& v2) { if(v1.pos.x < v2.pos.x) return true; else if(v1.pos.x == v2.pos.x) { if(v1.pos.y < v2.pos.y) return true; else if(v1.pos.y == v2.pos.y) { ...

lol
then you can use the navigation UI to fly to any planet you have access to.
"We need to go deeper!"
16:38
the really unfortunate thing for me is pixels.
I've got loads of ores, bars, coal, etc.
it'll be like, 5k pixels to spend my existing diamond and gold ore, and it's like, 10 pixels per mob kill on this tier 3 planet
@StackedCrooked Glad you like it :) I just think that its one of the best thought out anime out there.
so
1900 for Paranoia?
16:59
Yes
Did Feeds ever post a wiki change thing
yeah
then you disabled it
I need to watch a good movie, any idea? something not mainstream if possible... can be in french/english/russian
No, I didn't
maybe I remember wrong
@LoïcFaure-Lacroix What do you have against the mainstream?
God I hate hipsters going out of their way to avoid what everyone else likes >.<
17:05
@LightnessRacesinOrbit I might already have seen it
@LoïcFaure-Lacroix Then go on to the next suggestion :P
Anyway I booted up an MC server with a non-horrible modpack loungecpp.net/w/Procrastination_Station#LoungeCraft
@LoïcFaure-Lacroix How about The Black Hole? Seeing as the main actor died yesterday.
and if you haven't seen The Island you should
17:07
I saw the Island
oho I should set up or mc server too
@LoïcFaure-Lacroix Yes, it's crappy.
There are computers, and they can run Lua
@LoïcFaure-Lacroix Ignore that. It's a cult classic.
or Halo 4 Forward Unto Dawn
@CatPlusPlus that sounds like a trap for Barteks
17:09
I saw Halo 4
Might check black hole for the fun
also websocket api is amazing
creating a new socket makes it go and connect
however, you can't set it up with an error handler
hmm. Readline-esque functionality in C++ is frigging impossible
… short of actually using readline
so the only thing you can do is ws = WebSocket(...); ws.onerror = ...; and pray to UB gods
C++ has no notion of terminal.
@konrad lineoise is a cool small lib if you don't need support for unicode
17:11
@BartekBanachewicz WTF does not raise an exception?
@MartinJames only on blocked port
any other thing is reported via error event
which triggers onerror
"cegnuol", weird url :)
so
> ERROR: undefined
@BartekBanachewicz OK, that's fine, as long as OnError has all details of the error.
@MartinJames but you can't set up onerror until next line of code, that's my point :/
17:14
@BartekBanachewicz apparently it's undefined
and that's an error
I think the connection is made asynchronously
@BartekBanachewicz OK - back to WTF?
@BartekBanachewicz not sure if it's really a problem, the connection might be made after it returns.
@LoïcFaure-Lacroix I’d love to use readline but their license is non-free
@LoïcFaure-Lacroix so how can I be sure that I will set up my onerror on time?
17:16
@LoïcFaure-Lacroix Fuck that - it's to late. OnError event-handler must surely be set up before.
Well if it is done asynchronously it might open the connection after the function that created the socket returns. so the onerror is there before it actually open the socket.
maybe I can't read the docs but that's what's there really.
@BartekBanachewicz Sounds like fucked docs.
See there is a onopen callback, it won't open the socket before it leaves the function probably
17:19
The event-handlers should be set up as ctor parameters.
@LoïcFaure-Lacroix what?
that's a callback.
I doubt it will wait for me to set up a callback
oh amazing
the only information about the error is the fact that the event is named error
JS has an event loop, it will open the socket in the next event loop so you can setup everything before it does anything I guess.
@BartekBanachewicz Fuckshittles-crapoidness.
I shit you not.
> Return a new WebSocket object, but continue these steps asynchronously.
that's from official working draft
I don't disbelieve you, I just don't understand the overall cluelessInsanenessFuckedness.
17:25
it's so broken it's not even funny
how could that pass and get implemented
@BartekBanachewicz I wasn't there, else I would have blown it up.
@BartekBanachewicz Have to try if adding an infinite loop to block the process makes it possible to send/receive data
sending might be possible though if they implemented WS asynchronously
reason: "";
It's beedin' obvious that all callbacks must be set up before you do stuff that might fire them.
17:40
no seriously fuck websockets
I’m honestly stumped by Spirit’s API for parsing from a stream.
Or rather, how to use it well
@BartekBanachewicz I don't see what's wrong with the spec. Asynchronously means that when the object is created, it won't create the socket in this "event"
@LoïcFaure-Lacroix what
Ell
Ell
Hi
They didn't say that it will open the socket in the background
JS works in one thread
async != multithread
17:43
async != one thread
js = one thread
@LoïcFaure-Lacroix async means that I can't assume it will work in one thread
@LoïcFaure-Lacroix this ^^
There is Lua IDE written in Lua and running on Minecraft computers. In Minecraft.
8
Speaking of games, where's @Xeo?
17:45
As far as I know, it means it's going to be processed in an event loop. Async IO will trigger events when IO is ready for read/write etc.
Ell
Ell
I just played 3 hours of pathfinder
@LoïcFaure-Lacroix yeah and what if my event handlers aren't in place before it sends an event?
When you're creating the websocket, it will put the socket creation into the event queue I guess as it's done async.
@Ell Is that an algorithm?
Ell
Ell
@sehe It's a P&P :D
17:48
It's easy to test, make a function that never leaves and check on the server side if it trigger a "update protocole" (or how it's called)
i can't check anything because this API is broken as fuck
it's just a totally useless clusterfuck
@cv_and_he Please copy this into an answer so I can accept it. — Konrad Rudolph 2 hours ago
@KonradRudolph instead I voted to close as dupe
@LoïcFaure-Lacroix If it waits until your code stops running to actually create the socket, it's not very asynchronous, is it?
Ell
Ell
Have any of you played flappy bird?
@R.MartinhoFernandes I'm not the one who chose the terms
17:50
@R.MartinhoFernandes Is 19:00 in your timezone or mine?
@R.MartinhoFernandes it is async because "sync" would mean you have to wait for the thread to create the socket, which could fire an exception btw
@sehe Pity. My MWE is better (I claim)
although not perfect, as I just noticed
2 days ago, by Cat Plus Plus
(Let's add that's 19 GMT+1 for the timezone-challenged people)
@LoïcFaure-Lacroix but it doesn't mean it will allow you to set up events.
17:51
ok
so it's due to start in like 10 minutes
the trouble with stating the timezone is that I keep forgetting about DST and such :P
what happens in 10?
Hi... I'm new to C++ (not to programming--I know Java really well), and have a quick bug-squashing question...
and a lot of ellipses.
Haha--yeah.
user1804599
inb4 inheritance
18:00
@BartekBanachewicz it kind of does mean that because JS works in a single thread, which mean it can't handle other events before it finish handling the current event.
I'm writing a custom vector class (i.e. mathematical type, not STL type), and my cross product method is producing an error.
(I'll copy in a second...)
user1804599
You did not write your unit tests first.
user1804599
Hence it is very difficult to find the error now.
Goddammit, this doesn't work very well with only two players. Is @ThePhD around maybe?
@rightfold Are you talking to me, or someone else?
user1804599
18:01
About YOU!!
@anorton he is talking to you
@rightfold Order is not important. Also, how do you know?
@BartekBanachewicz Thanks.
@LoïcFaure-Lacroix and if you don't manage to set up the event handler, the event will be dropped.
vect linalg::cross(vect u, vect v) {

	std::vector<double> w(3); //Temp array to create new vector

	w[0] = u[1]*v[2] - u[2]*v[1];
	w[1] = u[2]*v[0] - u[0]*v[2];
	w[2] = u[0]*v[1] - u[1]*v[0];

	vect retVal(w);

	std::cout << retVal.toString() << std::endl;
	std::cout << "Completed cross product" << std::endl;

	return retVal;
}
oops
user1804599
18:02
WALL OF CODE BIN IT
sure but if you don't set them up... were you really expecting to handle any event?
@rightfold k...
@anorton why are you creating your own vector class in the first place?
@LoïcFaure-Lacroix for fucks sake
@BartekBanachewicz School assignment.
user1804599
Hey @BartekBanachewicz does Terra support multithreading?
18:03
@R.MartinhoFernandes are we still doing this tonight?
1. ws = WS(...);
2. ws.onerror = myhandler;

Before 2. happens, WS fails and posts error.
@LoïcFaure-Lacroix ^
@thecoshman Yes!
Like, right now?
@R.MartinhoFernandes was it 6 or 7 my time?
@rightfold I see no reason why it shouldn't
18:04
oh my, I guess I better register then :P
Am I late, or are we late?
@thecoshman You're on time.
huh, I didn't know Michael Scofield was gay
@R.MartinhoFernandes ¬_¬ 5 minutes late is not on time by my books.
18:06
@thecoshman I'm Portuguese. Now get on with it.
@BartekBanachewicz Not sure what you're trying to prove. All I can say is that nothing happens in between Ws and .onerror
Of course, by Irish standards, five minutes late is plenty early
Since someone said bin it: pastebin.com/ak1FiuJS
@R.MartinhoFernandes vOv sleeping?
No, late to everything.
18:06
I'm trying to return a new instance of a vect (my custom vector object), but the returned vector seems to lack any data. (e.g. no components.)
@LoïcFaure-Lacroix you can't prove it doesn't.
I can prove it!
I feel like this has something to do with lifetime of local variables in methods, but I'm not sure.
@R.MartinhoFernandes huh... TIL that Irish and Portuguese come from the same blood line :P
@LoïcFaure-Lacroix Within the spec? (i.e. does the spec mention your "event loop"?)
18:08
^ from the archives
@R.MartinhoFernandes erm, just had dinner, so probably should help wash up dishes and what not... shouldn't take too long. I'll be keeping an eye on chat though.
According to this answer I shouldn't have a problem with local scope of variable (as that's essentially the same thing I'm doing). So I'm pretty confused now.
Get a dishwasher maybe
@CatPlusPlus I have one, but I gentlemen helps his wench
@LoïcFaure-Lacroix apologies. You were right.
18:11
Yay! Bitches
7
A: The mechanics of the JavaScript WebSockets API

MiszyIt does not look for onopen function until end of execution of current (synchronous) code. That is because the connection (and thus calling onopen callback) is asynchronous. Consider: var x = false; setTimeout(function () { x = true }, 1000); while(!x){ console.log('waiting!'); } The w...

@thecoshman Regretting it yet?
@LightnessRacesinOrbit what?
@thecoshman you know ;p
selling yourself
@LightnessRacesinOrbit not really...
18:16
@thecoshman ok good :)
oh, you mean not having a sad lonely life on my own?
@R.MartinhoFernandes so erm... what's the plan?
@thecoshman pretty much
^ Top Gear returns tonight.
Ell
Ell
Jeremy Clarkson sucks
What are the type of thing which Scrum/Waterfall are?
@Ell Development methodologies
18:30
@Ell project development methodologies
dang it
they are the kinds of things that come haunt me at night
also don't fucking use Waterfall
s/project/software/
Ell
Ell
Thank you
I had a compulsory class I had to take called Introduction to Software Engineering
18:31
Riding the waterfall is a great way to hit rocks
user1804599
I love the syntax of Perl.
zch
zch
@rightfold wat
@LightnessRacesinOrbit What a sexy beast.
user1804599
@zch It is beatiful.
@ScarletAmaranth me too
18:32
@ScarletAmaranth Me too
It was terrible.
it is absolutely useless and bullshit
(as are all other classes come to think of it, though...)
2
@ScarletAmaranth But at least now you know that! There's the value of the class.
@LightnessRacesinOrbit actually, I knew long before
user1804599
We just had to do four projects and use Scrum for all of them.
and look at you now
18:34
i still might fail my softeng class
you're such a softeng
if the idiot who was "teaching" me gives me one point short
@LightnessRacesinOrbit enjoy
18:35
@rightfold our projects were just "do this stuff, and deliver by this date"
@melak47 sounds like a typical project
our projects were: it doesn't have to work but your documentation must be flawless
they would actually just go over documentation manually instead of running whatever it was we were supposed to do
Xeo
Xeo
@R.MartinhoFernandes Dead. Or atleast feels like it. My leg still hurts like hell. And I somehow managed to fall asleep despite that.
@Xeo If you want to join, you still can. It's ok if you don't.
@ScarletAmaranth I don't think they read our docs or ran the thing
18:37
@Xeo I am slightly not up to date, sorry but what is the cause of your leg hurting again? did you have an injury? or cause unknown?
Xeo
Xeo
@R.MartinhoFernandes Are you guys mumbling or chatting through roll20?
I'd rather voice chat, but everyone wants to text chat instead :S
Xeo
Xeo
boo. that'd make my typing communication increadibly slow
@ScarletAmaranth Mystery pain
MRI tomorrow
@R.MartinhoFernandes blergh. you could get on mumble so i could listen to the rants and annoy you
18:56
@R.MartinhoFernandes Some of us lack your mellifluous speaking voice.
I lack any speaking voice
I just have an unintelligible excuse for one
Xeo
Xeo
ShyPlusPlus
19:09
@R.MartinhoFernandes I'd rather voice :S
Hangout on Air is your friend then
May be one day SE will implement video chat for solving problems
Xeo
Xeo
oh gawd no
that's against the very idea of SE
martial-art.stackexchange.com how am I supposed to knock a person out?
@Xeo I'm not sure what is the very idea of SE anymore
get big fast by any means necessary
19:28
so. In an assignment we are to simulate an operating system... and memory is represented as an array. Each opcode is supposed to go into one of these spots. The teacher tells us to use longs for the opcode, but wouldn't it be easier to use lists of strings?
@MarcClaesen thats what she said
@Crowz lol wat no.
why on earth would you use lists of strings as an opcode?
because they opcodes look like: 019234 or something, and each section means something specific. So ["01", "92", "34"] seems to make more sense than 19234
well, since they're numbers, then using an integral type seems to make more sense.
and unless you have a variable-length opcode using a variable-length data structure seems bad.
@DeadMG not necessarily
19:32
why not just struct of integral types, bitfields seeming particularly useful here
@DeadMG it IS variable length though isn't it?
if they are just unique identifiers, I see no problem in holding them as strings
@Crowz Is it? You didn't specify but I find it hard to see how your teacher intended a long to hold a variable-size opcode.
but if you want to perform arithmetic on them they should be integral alright
user1804599
I use an enum for opcodes in Styx.
user1804599
19:33
Operands are decoded in the interpreter depending on the opcodes.
user1804599
Everything is then just stored in an array of bytes.
well it goes like: Opcode : Op1 Mode : Op1 GPR : Op2 Mode : OP2 GPR
@Crowz If the "pieces" of the instruction all happened to divide at byte boundaries, using a string might not be terrible, but I've never seen a machine (real or virtual) that did that. You nearly always end up with some odd-sized pieces, and different instruction formats that divide the pieces differently from each other as well.
@JerryCoffin therein lies the problem; how do you handle the variable lengths of these things?
@Crowz Clearly they're all less than or equal to sizeof(long) * CHAR_BIT.
19:35
@Crowz "Easier"? Maybe, for some weird definitions of "easier". Make sense? Hell no.
@DeadMG they're 24 bits I'm fairly sure, to represent everything
then they're obviously not variable length at all.
if they are 24 bits store them as 24 bits duh
@Crowz Bitmasks. Start with a data type large enough to hold a complete instruction (e.g., 32 bits) then use bit masks to figure out 1) the instruction format, 2) actual operation, 3) operands, ...
@BartekBanachewicz inb4 references to the int24_t guy
19:36
ahaha
completely forgot about him
okay but what if there's an opcode like 001122. Won't it be a long as 1122? How do you read that in the format above?
Eh what?
@Crowz 001122 in decimal is 0b10001100010
For all sane decimal systems, 001122 and 1122 are the exact same thing.
19:37
hah
we're playing paranoia and every member of our team ran through a radiation-filled corridor without a shield
@Griwes so... do the GPRs and Modes ALWAYS have to be filled? Is there any case in which they can't be?
-3
Q: Comparar uma coluna do datagridview com textbox.text vb.net

user2979215Boa tarde. Preciso comparar o valor de textbox com todos registros de apenas uma coluna do datagridview. Tenho alguma propriedade do datagriview para verificar todos valores de uma coluna ou vou ter que criar um laço? gentileza auxilar. obrigado. segue codigo que dar um select no banco de dad...

It started, Olà mundo
@Crowz In every sane numerical system, you can append arbitrary amounts of 0s on both the left and right.
@Crowz A typical processor will start by specifying at least a minimum instruction size. On x86, it's one byte. On most RISCs and such, it's 32 bits. On an Itanium or DEC Alpha (RIP) it's 64 bits. Every instruction for the machine will be encoded to occupy that size as a minimum.
@Crowz I have no idea. Fully depends on how you design it.
IMHO what x86 does makes most sense, but complicates the hardware the most.
If your thing is purely software (and I didn't look far back to check that assumption), sit down and figure out what makes sense and how things work. Do some examples.
19:41
@Griwes x86 makes more sense all the time. It makes instruction decoding more complex, but instruction decoders occupy <1% of most modern CPUs. In exchange, it reduces memory bandwidth used to retrieve instructions.
okay... but let's say I wanted to... add op2 + op1. 011112 could be the instruction for that based on this, if op1 was in GPR1 and op2 was in GPR2, yeah?
wouldn't it be easier to read it like ["01", "11", "12"] and then just translate it each index at a time? Like add -> thing at GPR1 -> to thing at GPR2
@JerryCoffin Your first sentence is not true (none of the system destriptor tables make any sense design-wise, since neither of them was designed... :P)
For current systems, however, it would probably make quite a bit more sense (in most cases anyway) to specify that the instructions be Huffman encoded (or something similar) and the CPU have a hardware decoder.
@Crowz Lolwat?
@JerryCoffin What would be the benefit?
well, here's an example the professor gave. By the way, this machine is hypothetical decimal instructions
19:44
@Griwes I mean the basic compromise of minimizing code size at the expense of complex decoding. Code for most RISCs is around twice the size, meaning they need giant caches to keep up at all.
well
in that case, 001122 is not the same as 1122 at all.
10 0            S Long 0
11 15060    Loop Add S,1
12 10          Address of S
13 1            Immediate operand value 1
you're talking about three pieces, one of which happens to be 00.
it's not a single number.
that's why I'd suggest using bitfields or something similar to hold it.
@JerryCoffin Yeah, I was just picky at your first sentence, which was not explicitly limited to instruction encoding ;P
@Griwes Reduction in memory bandwidth used to retrieve instructions. More and more, you can think of CPU instructions as nearly free, with overall speed limited primarily by main memory bandwidth. Use less of that for instructions, and you have more left for data.
@Griwes Fair enough--there are certainly some parts of x86 that get wonky in the 286, went insane in the 386, and have gotten still worse in x64.
19:47
@JerryCoffin But you cannot really go below one byte per instruction, can you? I mean, x86 is pretty great at not having long instructions (although REX kind of makes it a bit worse in that aspect).
hm I just don't get how the software is to make sense of what is in the array. Wouldn't it be a little easier to have a few dictionaries/hashmaps with some references to what each opcode does and then methods to carry them out? IE
{ "01" : "add()" };
int add(mode1, GPR1, mode2, GPR2) { ... }
@Crowz Why the fuck would you do that?
There is a reason why you use opcodes instead of mnemonics.
The point is: opcode is the hash of a given combination of the mnemonic and operands.
well it's being simulated in software, right? Why not abstract away from the more gritty details?
Eh?
Because string processing is slower than number processing?
Ell
Ell
I forgot why we don't have int24_t
19:50
@Griwes You (normally) retrieve an entire cache line at a time anyway. You'd continue to do that, but you'd (for example) compress an entire cache line into a "packet" that you stored in memory, then expanded into cache. Inside that packet as it was stored in memory, you wouldn't worry about the boundaries between instructions, and yes, one might well occupy less than a byte.
user1804599
lol hardware assembly parser
And if you don't use hardware acceleration akin KVM, your emulator is going to be dead slow.
user1804599
@Ell because nobody needs it.
user1804599
Also, you can implement it yourself.
Even without such retardedness as using strings instead of opcodes.
When was the last time you tried bochs?
19:51
@Griwes but that is not my concern in any regard -- my goal is to make it simplistic and readable. Why even care about speed? It'll run fast enough even if I do the hackiest stupidest things
@JerryCoffin I imagine that would be quite hard to do. All addresses would need to store more bits.
@Crowz "Fast enough"?
When was the last time you used bochs?
what is "bochs"?
(I guess that would be "never"...)
user1804599
@Pubby lol
My guess was correct. Bochs is an x86 simulator. It executes x86 code without hardware's help.
19:52
evenings
I am not good at anything low-level hah, I mean, this is probably the first major assignment I'm even doing in C++ and I consider this low-level
Bochs is also known to be slow as hell. The OSDev's community recommendation is "never use bochs, unless you have to debug something that is not related to different cores doing different things".
In short: your code will be slow as hell. You want to make it a tiny bit faster.
@Griwes Some embedded processors already do it (or can do it, anyway). Doesn't seem to be terribly difficult. But the ones I'm thinking of are probably already paying most of the price to support instructions being encrypted, with decryption built into the CPU's hardware, so adding compression probably didn't make life a lot harder.
So, to make it faster (since your map is already a hashmap), you store hashes of instructions (that we all call opcodes) instead of their text.
Tip: that translation from mnemonics to their hashes is exactly what all assemblers do.
19:55
@JerryCoffin I just have hard time imaging how it would work reasonably fast and user-friendly when it comes to debugging software.
(We all like that little field called "RIP", don't we?)
hm okay... that makes sense... but I still don't get how the instructions are "extracted" from memory if they're longs... they could be several numbers, they could be one number (ie, 1 or 1199192)
...so?
Erm wait. Every long is just a single number.
yes but that's not what I meant, it doesn't strictly follow the pattern
You can't store several numbers in a single number (unless the number is interpreted as a packed struct, in which case @DeadMG already told you what you need).
man. This class is ridiculous.
19:59
@JohannesSchaub-litb I bet that was an actual starbait! :)
lol.
user2260218
Hey all.
@ScarletAmaranth You haven't learned that one yet, have you? It's always a starbait.

« first day (1205 days earlier)      last day (3967 days later) »