« first day (1090 days earlier)      last day (3872 days later) » 

user1804599
5:00 PM
lolwut
 
@Jefffrey I only got to the end of Season 1 or 2. Can't remember. How many seasons is there?
 
Which Assembly?
 
@LightnessRacesinOrbit ATT IA32
The intel IA32 is close enough as well
 
@TonyTheLion They are airing the third now (they are at the second or third epidose)
 
@TonyTheLion Third just started.
 
5:00 PM
ah ok
 
lol "epidose"
 
lea is "load effective address". It loads an address into a register.
 
user1804599
Well, kind of.
 
It's a fancy mov.
 
@Crowz It's related to & in that & in C++ may result in a lea instruction.
 
5:01 PM
@Crowz They're wrong.
 
152
Q: What's the purpose of the LEA instruction?

user200557For me, it just seems like a funky MOV. What's its purpose and when should I use it?

 
@LightnessRacesinOrbit Well... not really.
 
Listen to Jerry.
 
& and lea are really two different things.
 
@R.MartinhoFernandes Or an add. Or a shift. Or a mov and an add and a shift, all shoved together. At one time, a huge optimization. Now, not so much.
 
5:02 PM
lea is for pointer indexing, array indexing.
 
@DeadMG I didn't say they were the same thing.
 
@JerryCoffin That's the "fancy" bit!
 
@LightnessRacesinOrbit Well, OK, let me rephrase that- they are totally unrelated, except that both mechanisms deal with pointers.
 
@DeadMG They are not "totally unrelated". Read stackoverflow.com/a/1665570/560648.
You sort of said "they are totally unrelated, except if you're talking about the thing that makes them related"
which I was
 
man. I just don't get this assembly class I just want to use my easymode java
 
5:03 PM
lol
Assembler is awesome, for some restricted definition of "awesome"
 
I don't see how I'd ever use it, I suppose the concepts are important but I just can't stand reading this stuff
 
@LightnessRacesinOrbit Yes, they really are. LEA happens to mention "address" in the name, but that's just because the CPU designers originally intended that part of the CPU primarily for indexing into arrays and such. The reality, however, is that you can (and often did) use LEA for doing simple math that had nothing to do with addressing at all.
 
@JerryCoffin Isn't it essentially an FMA instruction?
 
user1804599
Yum.
 
user1804599
Chocolate cookies.
 
5:07 PM
I guess it's pretty similar to LLVM's GEP instruction.
 
@DeadMG More or less, though definitely a very restricted one.
 
random question, but in simplified assembly, how would a for loop be set up? Say you had for example
int i;
for(i=0; i<100; i++) { ... }
 
Say, fellow European types, what English locale do you typically use?
 
en-GB
 
^
@Crowz using jmp instructions
 
Ell
5:09 PM
I wonder for which languages llvm would be inefficient
 
so, count and then jmp as long as some condition is true
 
yeap.
 
@LucDanton I don't?
 
or whatever, there's many jmp type instructions
 
I didn't feel like appending 'if any'.
 
5:10 PM
like jnz(jump not zero), jz(jump if zero), je (jump equal) etc
 
@Ell I've heard that for some languages with some kinds of aliasing restrictions, it's not great.
 
'Out of the English locales you use, which do you prefer?'
 
okay, but how do the variables get set up, exactly? like something like
mov 8(%edx), %ebx
mov $0, %eax
.L2
jne blah blah blah
 
jne = jump not equal
 
5:11 PM
load the variables from memory or a register
 
you'd stick i into a register (usually a register instead of memory)
 
depends really, if you're doing a function prologue or are somewhere in the middle of a function
 
:LOOP MOV ECX,100
; loop stuff
JECXZ LOOP
 
: is on the wrong side, lol
 
Also, I missed out the DEC ECX
 
5:13 PM
assembler is fun when you're decompiling something to exploit it
 
It's been a while since I did 386+
 
not saying you should do that.
 
is there like, a really easy way to transfer AT&T assembly into C?
 
Probably, but it would be very crappy C
Wrap the entire program in an inline assembly type-thing.
 
5:16 PM
real men, skip C and write C++
 
I don't even program any language decently ._.
 
@Crowz It can be decompiled but the output is realistically unusable.
 
@JerryCoffin I never claimed otherwise. I'm just saying that & in C++ can lead to a LEA instruction. I never said this was the only way.
 
Happy Thursday.
 
I <3 Python
 
5:17 PM
@LucDanton en-US
 
@DeadMG You realist.
 
I'm not a European but I use en-GB.
 
I use en-Tony
 
@DeadMG It can be recovered with serious effort in some cases. Just like ununrolling a for loop, but harder!
But we've all taken crappy code on SO with variables like var1, var2, var3 and made them into a nice array for the author. Fundamentally that is not dissimilar
 
@LightnessRacesinOrbit I suppose it could, but int x = y * 3; could also.
 
5:20 PM
@Rapptz Do you have to do tricks to get US paper sizes? Or I suppose you could ignore dead trees altogether.
 
TIL: You can walk into the biggest bookstore of the region (Rotterdam) and wonder where all the CS books went. There's literally nothing on cryptography there. Not even the classics. Bookstores are going extinct.
 
yep
 
I was told I can order via a webstore.
 
you can't grep dead trees.
 
Amazon
 
5:21 PM
Speaking of ignoring dead trees!
 
and I think it would be especially ridiculous to get a computer book in dead tree form.
 
I always always order my books on Amazon
 
@LucDanton The only time I've ever worried about paper sizes is when I'm doing LaTeX (which I do \documentclass[a4paper, etc]{~~~})
 
@sehe Tell them to get off your lawn.
 
@TonyTheLion That's what I usually do, but they were planning on delivering the book book round about the time I was planning on having read it.
 
5:21 PM
@sehe Not even the Cryptonomicon?
:P
 
@R.MartinhoFernandes I fear they would classify The DaVinci Code as closest to the subject matter.
 
@sehe how inconvenient
 
@JerryCoffin Absolutely.
 
@TonyTheLion So I thought, let's invest some oldfashioned quality energy and just pick up a classic from the bookstore. To my surprise all they had was 6-8 shelves of "Computer Books" (mind you, not Informatics or Computer Science: the "Using Word And PowerPoint To Create Awesome Presentations" type of book)
 
@sehe Yes, I know that kind of shelf.
 
5:24 PM
@JerryCoffin By the same logic, though, or similar logic at least, you could write int x = y * 3; using & and few other operations. So it's not really a useful argument
 
When I inquired where the "Informatica" department was located they sheepishly "admitted" it had gotten reduced and pointed out those measly shelves. I politely told them that this amounted to "We have discontinued the Infomatica department" :)
 
@LightnessRacesinOrbit Can't because segfaults.
 
@DeadMG maaan. I just want to not put any effort into this class
 
@TemplateRex lo
 
5:25 PM
@R.MartinhoFernandes orly.
 
> You’re almost there… < yourname >.visualstudio.com
 
@sehe tnx that's inspirational
 
GG microsoft.
 
'Informatica' sounds kinky.
 
int x = *&y * 3; // suck it
 
5:25 PM
lol
 
@TonyTheLion The sad part is, I can't blame the personnel. Just messengers... Also, yes for 80% of the 'specialist literature', I can see how the online stores are competing the bookstores out of existence. But, come on, a few classics...? The dragon book? TD&EoC++? I mean, Rotterdam is a student city. FCOL
 
@sehe I was at the bookstore in Utrecht this weekend, for the "Kids Book Week" , and I was shocked that the former academic bookshop now had an entire wall of "Esoterica" (spiritual pseud-science nonsense)
 
@TemplateRex And obligatory. Sorry :)
 
They even have a tarot-card seance somewhere this week
 
@TemplateRex Yeah. The whole -1 floor was devoted to philosophy (wokay), spiritualism, religion and psychology (somewhat okay). :(
 
5:27 PM
@sehe no it'll be the title of an upcoming C++ blog that I've been preparing
 
I live within walking distance of a superb bookshop.
 
@TemplateRex Kinderboekenweek meets Halloween!
 
Just pissing you guys off.
 
I have no strong feelings one way or the other regarding dead tree shops :|
 
@TemplateRex hylo?
 
5:28 PM
hi-lo split
 
@sehe FCOL?
 
@R.MartinhoFernandes One that still has non-fiction books? Outside esoterics, photography and cooking?
@TonyTheLion FCryingOL
Okay, gotta run. See you. Oh, by the way, did buy laptop. Powerhouse :/
 
sbi
Ever seen a beardkini?
 
@sehe I'd have to check carefully. I tend to avoid going there because money.
 
0
A: operator overloading and non-member functions c++

Pete BeckerThe usual approach to arithmetic operations is to define the reflexive versions of the operators as members and the pure versions as non-members, implementing them with the reflexive versions: class complex { public: const complex& operator+=(const complex& rhs) { real += rhs.real; ...

was I too harsh in downvoting?
 
5:29 PM
Actually, I've only been there once, when I was shopping for sbi's birthday gift.
 
No, a book.
 
std::set<std::pair<std::string, std::set<std::pair<std::string, std::string>>>>
 
ugh
 
I think I'll use using namespace std; just this one ;_;
 
5:31 PM
Chrome is strange. It claims it translated a page (in English) from Russian to English. It looks exactly the same.
 
sbi
That book is still on my list, BTW, robot. I am still struggling to plow my way through Hamilton's Commonwealth universe.
 
@TemplateRex I don't see why anyone cares about what you're all arguing about.
 
using std::pair; using std::set;? Can add std::string, too.
 
Oh yes, that would be nicer.
 
Xeo
@MohammadAliBaydoun typedef.
 
5:32 PM
Using works on things in namespaces?
 
@Xeo I tried that and I confused myself ;_;
 
sbi
@TemplateRex Never mind. Mark the damn thing as dupe (thereby piling some more rep on my) and forget about it.
 
Xeo
Also, don't use pairs for that. That seems horribly confusing
 
Yeah, I might as well just make a struct for this.
 
then use std::tie for your comparison operators
 
5:34 PM
T x; T& y = (x += 1); should be valid. Not because I want to use it, but because you do not have a good reason to prevent me from doing so. End of story! — Lightness Races in Orbit 28 secs ago
 
@sbi ya, did that already
 
Xeo
@Rapptz <3
 
Apparently I don't know how to spell cautious.
 
Xeo
With proper (compile-time) reflection, you could do struct blah : tie_compared<blah> and get all the beauty generated for you.
 
@LightnessRacesinOrbit ah, so you do care!
 
@LucDanton btw, I meant this llvm.org/apt
 
@TonyTheLion Oh gosh
 
it's better than Debian's own snapshots cuz they are not daily AFAIK
 
room topic changed to Lounge<C++>: Toto, I've a feeling we're not in Belgium anymore. [c++] [c++11] [c++-faq] [no-questions]
 
@TemplateRex :)
 
5:42 PM
@LightnessRacesinOrbit the little const that couldn't :-)
@R.MartinhoFernandes who's Dorothy ?
 
@TemplateRex Oooh, better question: who's Toto?
room topic changed to Lounge<C++>: DeadMG, I've a feeling we're not in Belgium anymore. [c++] [c++11] [c++-faq] [no-questions]
 
@TemplateRex Yeah, I'm not sure why I brought it up. The two situations aren't that similar, and the packages have different goals.
> 'struct annex::naive::future<std::pair<int, std::tuple<annex::naive::future<int>, annex::naive::future<int>, annex::naive::future<int> > > >'
Totally readable.
 
@TemplateRex I'm Tinman, obviously.
5
Tony is the Cowardly Lion.
5
 
Xeo
5:45 PM
The Wizard Of Oz
 
sbi
@Xeo He doesn't read.
 
ooooh
 
No, I'm illiterate
3
 
can I be the evil wicked witch of the west?
 
@R.MartinhoFernandes that was my Jeopardy response, given a movie quote, you'd have to answer with a question
 
5:46 PM
@DeadMG Already set you up as Toto.
 
who the fuck is that
 
Dorothy's puppy.
 
I never heard of Dorothy having a puppy.
then again, I never read that shit either
 
See famous quote referenced in the tagline.
 
never heard of it
 
5:48 PM
The Wonderful Wizard of Oz is a children's novel written by L. Frank Baum and illustrated by W. W. Denslow. Originally published by the George M. Hill Company in Chicago on May 17, 1900, it has since been reprinted numerous times, most often under the name The Wizard of Oz, which is the name of both the popular 1902 Broadway musical and the well-known 1939 film adaptation. The story chronicles the adventures of a young girl named Dorothy in the Land of Oz, after being swept away from her Kansas farm home in a cyclone. The novel is one of the best-known stories in American popular cult...
 
@TonyTheLion Illitorit*
 
@TemplateRex That line is from the 1939 movie, though.
I don't think it shows up in the book.
 
user1804599
I just noticed how quickly I subconciously hit escape, 0, shift+O.
 
user1804599
And the 0 is even unnecessary. :v
 
5:51 PM
My economics professor when I was in Uni told me about the gold standard representation of the books lol
 
@R.MartinhoFernandes not according to gutenberg.org/files/55/55-h/55-h.htm
 
@TemplateRex lol
 
Vlad from Moscow has quite the chutzpah
 
"Do not forget to include me in the list of authors of the new algorithm.:) "
 
5:53 PM
lol
I unsubscribed from std-proposals
 
I browse it casually
 
@R.MartinhoFernandes Hell, it's about time.
 
Kzremienski has some nice stuff sometimes
 
@TemplateRex Maybe Suzi is an artist..?
 
What algorithm is he talking about?
 
Xeo
5:55 PM
@R.MartinhoFernandes I closed my std-proposals tab
 
@MohammadAliBaydoun is_sorted with a predicate
 
Mmmh, would it be a worthy goal if select(a, b, c, d) returned a (future) tuple of references to the remaining futures, rather than a tuple of new future objects?
 
lol
 
essentially what can be done with adjacent_find with a not(Pred)
 
5:56 PM
Apparently you are only guaranteed 12 layers of indirection.
 
Xeo
Really, it's time they "accidentally" make everything private.
 
Xeo
@LucDanton Ugh, life-time management :(
 
Ah, it's my usual idiom. You go auto r = select(std::move(a), std::move(b), std::move(c), std::move(d)); if you want r to outlive the arguments.
 
@LucDanton Nah.
 
Xeo
5:58 PM
@LucDanton Ugh, so much typing :P
 
#define M std::move
 
Yeah. The crazy experiment (for ranges) was nice, in a way. Still crazy though.
 
If I have a group of functions which always share two references to two specific objects, is it good design to group them into a class which will only contain references to those two objects? (those two objects are used externally in other functions or objects).
 
Ell
can you do using M = std::move?
 
sbi
@FredOverflow std::movehmm.
 
5:59 PM
no.
 
Xeo
@Ell No
 
Ell
@Jefffrey Probably. What are the functinos?
 
Xeo
auto M = []std::move; :D
 
sbi
@Ell You certainly can. The compiler won't grasp it, though.
 

« first day (1090 days earlier)      last day (3872 days later) »