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

user2260218
20:00
In C, do you have to assign parameters to new variables in functions? Or can you directly use them?
quick, reverse the polarisation of the cloaking field
classes like this make me wonder why I ever decided to major in compsci...
@Anthony Do we look like a C room?
user2260218
In C++
user2260218
:P
user1804599
20:01
@Anthony Yes.
user2260218
Why do you have to?
user1804599
You do not have to.
user2260218
Oh.
user2260218
Why do people?
user1804599
Because they either are idiots or because they need a copy.
20:02
room topic changed to Lounge<Cloak>: Reverse the polarisation immediately! [c++] [c++11] [c++1y] [c++-faq]
Guys, anyone remembering the codepoint for that character in that elaborated version of o_o?
so... are symbol tables, for all intents and purposes, basically just a dictionary?
Google "o_o with eyebrows" for the rescue.
user1804599
ಠ_ಠ
Ell
Ell
TIL ruby has func = ->(a, b){puts a, b} syntax now
user1804599
20:06
Is that an alternative to lambda { |a, b| puts a, b }?
@Ell That arrow placement is insane.
Ell
Ell
@rightfold yeah
user1804599
Meh.
user1804599
lambda worked just fine.
Ell
Ell
I think so too
Xeo
Xeo
20:07
@Griwes but our lambda sytax must be unique!
user1804599
I wonder if I can use ಠ_ಠ; in Perl without getting a syntax error.
user1804599
> Unrecognized character \xE0; marked by <-- HERE after use <-- HERE near column 5 at t/mem_index.t line 7.
user1804599
ಠ_ಠ
user3010322
@R.MartinhoFernandes Sorry, I just got back home. =/
user3010322
@ScarletAmaranth I have a class like this that I'm in now. It's called "The Art of Engineering." It's basically a bunch of people from various industries or departments talking to you about their problems.
20:21
@Griwes Doesn't really affect debugging. The decompression happens between memory and the CPU, so by the time the CPU sees anything, it's just normal instructions. The CPU itself doesn't really need to know or care that it's happening at all.
user3010322
Because they come from all disciplines of engineering, 95% of the information you're told -- while interesting -- is completely useless to what you actually want to do with your life, or what you're learning.
@JerryCoffin How do you represent the address of current instruction, then?
It must be something you can follow back to memory.
@Griwes Just like always. The compressor deals with translating that address to whatever gets fed to memory.
why the fuck does git push ask me for my Github.com password?!
that always worked until now
I just don't like the concept of address given in form of "0x0000001111:3"
@KonradRudolph Because you cloned with https address instead of ssh one?
20:23
@Griwes I didn’t clone anything, this is the first push to a new repo
But I always use https – I thought
I need 50 more rep to reach 15k.
From what I recall, I could never get https to work for w/e reason it had.
nope, obviousy I’m wrong
bizarre
Anyway, cheers @Griwes, that probably saved me quite some time
(Or not, google is awash with answers to this …)
hm so I know what I want to do if it was javascript or python... but have no idea how or if it could be implemented in C or C++
@Crowz hm?
20:35
@EtiennedeMartel I only need about 400K more to reach second place overall--if nobody else made any while I did that, of course! :-)
I simplified it down to basically nothing though
I need to stop getting angry at silly questions and answer them =/
@Borgleader Answer them or ignore them, but yes, getting angry at them is pretty much a waste of energy.
Also I keep answering in comments =/
@Crowz a map<unsigned, function<T(T,T)>> or what?
20:42
@Borgleader I do too sometimes, especially for short, seemingly trivial answers. For a while @Chris was doing that a lot (and probably still does quite a bit).
@Crowz melak is right, a simple unordered map would be ok.
Ell
Ell
Why does class T { static const char* s = "hi";}; need const char, but out of class it doesn't?
(begins googling)
wat do you mean
Ell
Ell
> error: invalid in-class initialization of static data member of non-integral type ‘const char*’
but when you do it outside of a class, it's all fine
@BartekBanachewicz Ahh I see
20:45
@Ell Because of special rules for initialization of a static const T inside a class. Or, looking at it a little differently: because inside a class, it's associated with a class instance unless it's static. Outside a class, it's not associated with a class instance regardless.
Time to turn off Twitter
but someone else might want to use it
@KonradRudolph ...permanently!
lest we be inundated by zee Americans
'murica
user3010322
20:49
@EtiennedeMartel You look like you're at 15K to me. Congratulations!
@ThePhD If that's all you, it's gonna get reverted soon.
I've tricked my GF into making assets for me
Xeo
Xeo
@Borgleader basically all I've been doing for the past 6 months. I've only written 8 or 9 actual answers in that timeframe
user3010322
I just reached 15K(x10^-2) myself. :D
user3010322
20:50
@BartekBanachewicz How?
user3010322
@Xeo How was the game?!
user3010322
Was DeadMG the spy?
Xeo
Xeo
wasn't in it, leg etc
user3010322
Or did Cat turn out to be the horrible monster?
user3010322
Whaat? D:
user3010322
20:51
Noooo. u.u
Time to figure out that intermittent seg fault im getting with nonius
it's still going on
I'm currently trying to murder thecoshman
user3010322
That kind of ruins your plan now that you've said it here, yeah? ._.
nope
he already knew that I tried to fire
in fact, I already shot him once.
he's kind of ... crawling at me.
since I shot him in the leg.
I'm the team leader and he wasn't being a team player.
user3010322
So.... non-cooperation is met with capital punishment?
20:54
welcome to Alpha Complex.
frankly my character had it in for his character ever since she showed up late to the briefing.
and tried to whore out like a slut.
and my character just vapourized her like a total baws.
she was a traitor you see.
user3010322
Sounds... complicated.
@Borgleader I got some access violations in release mode on windows
My problem is I have 2 ways of doing the same thing. They should be equivalent AFAIK, but one gives a segfault, the other doesn't
Why are you casting?
20:59
Where?
In placement new
er
of course they're not equivalent because they perform the same operation on two different addresses.
@Rapptz Because it doesn't compile if I don't
wut
user3010322
Yeah.... data by itself decays to the pointer. &data is the address of the array, which is like the pointer to a pointer, so...
21:01
@ThePhD The array doesn't have an address really.
user3010322
If you wanted it to work, you'd do &data[0]
error: no matching function for call to ‘operator new(sizetype, const TStorage*)’
new (&data) T(std::get<Idxs>(args)...);
user3010322
Anywho.
@Borgleader You need new (data) ...
@Borgleader const TStorage*
user3010322
21:01
Why are you giving a const pointer?
user3010322
const is your issue here, IIRC. o.0
but frankly
@DeadMG What? Of course it does.
How do you see constructing something in place of a const object?
this is why you don't use C-style arrays.
21:02
@ThePhD The name of an array does not decay to a pointer when it's used as the operand of & or sizeof.
just declare one object.
user3010322
Xeo
Xeo
@Borgleader &data -> T (*)[N]
user3010322
@JerryCoffin Well, yeah, that's why I said you needed &data[0] to get a T*
Xeo
Xeo
also,cast to void* for placement new (not necessary but good practice)
::new ((void*)&data[0]) T(...)
user3010322
21:04
In his example, though, data shouldn't be made into an array.
user3010322
It should just be TStorage data;
@Xeo The array version works though, it's the version with just TStorage data; that segfaults >.>
user3010322
Since TStorage is already std::aligned_storage<...>::type
Xeo
Xeo
oh
oh god you guys I hate doing bitwise operations
user3010322
21:07
@Borgleader Updated and refactored: gist.github.com/ThePhD/e44dec26911808e18f03
user3010322
Just a quick method to isolate the problem to one line of code (or two, if you ever happen to use the const version).
user3010322
(Which I don't think you ever will, but just in case).
user3010322
@Borgleader Did it work out?
Ell
Ell
@Crowz what are you trying to do?
@ThePhD Nope, no known conversion for argument 2 from ‘const std::basic_string<char>*’ to ‘void*’
I think I have to cast in the call to placement new
21:20
Damn, I need to store sorted arguments, and they are currently an unordered_list
Ell
Ell
lel spend a few hours on a feature then realised after I didn't need it at all
user3010322
@Borgleader Which line? :o
user3010322
Wait
user3010322
WTF
user3010322
Why is operator()() const?
21:21
@Borgleader Track the source of that const.
Realize that you are doing something that tries to break const correctness.
???
Profit!
Oh... wait... I think i made it const because void call() const override { fun(); }
user3010322
And why is make const either?!
user3010322
Well
I was tired xD
user3010322
Once you fix that, you should be good to go. :D
21:22
Wait...
god damnit
I have to think =/
Were you also tired the last time we told you that the const is the problem?
@Xeo condoning a c-style cast, are we? :)
Pretty sure operator() has to be const because of call()
Xeo
Xeo
@StackedCrooked fuck the system!
21:25
@Borgleader All aboard the mutable train, then! :D
Xeo
Xeo
(typing out a real cast is annoying on touch)
@Griwes Mut muut
4
I wonder why the robot made call() const in the first place =/
Because ~const correctness~
user1804599
cunt currectum
21:30
guys
what do you think about the comment
@Nye thanks for commenting, so that I can cleanup with the misunderstanding. I told him that the syntax says that "= 0" is expected. I specifically did not say "because that's how it is", because I myself will downvote such answers. — Johannes Schaub - litb 3 hours ago
21:41
@JohannesSchaub-litb I need to think really long about this.
@StackedCrooked why did you have to think long about it?
I'm just a little slow. But also, why is "because that's how it is" wrong?
because that's how it is wrong
lol
I thought that it really was how it is like that.
or something along those lines
user1804599
Parsing in Perl is fun.
Ell
Ell
21:47
and impossible!
user1804599
Just us regex for everything. :D
Perl regex are nice.
user1804599
Perl regex best regex.
user1804599
Everything else is crap.
user1804599
21:48
Well, and PCRE.
One teacher once wanted us to parse CSS with ECMA script regular expressions
user1804599
You can determine whether a string is a palindrome using Perl regexen.
user1804599
Also using .NET regexen IIRC.
Ell
Ell
Is inheritance for code reuse bad?
for anti-repetition
21:50
It's more like a last resort imo.
user1804599
@Ell In what programming language?
Ell
Ell
@rightfold Ruby
user1804599
@Ell Use include, not inheritance.
@rightfold And n^2 regex101.com/r/gB8qN7 :D
Ell
Ell
@rightfold Of course! Thank you
user1804599
21:51
High-level object-oriented languages often have other means than inheritance for this.
user1804599
C++ has private inheritance, which is an implementation detail and thus not evil.
user3010322
Composition is usually good too (if you can mark it private).
user1804599
Do not make is-a relationships things are not other things.
Damn. I have two functions, f(std::string) and f(std::vector<std::string>). I can call the function like this: f({"foo", "bar"}), but the call f({"foo"}) is ambiguous – is there a way to avoid this without having to specify the type name?
public inheritance for code reuse doesn't have to be bad either
21:52
Palindroooomes regex101.com/r/iF7yM8
for writing traits or something and if you don't want to rewrite the functions
Xeo
Xeo
@ThePhD private inheritance is a form of composition
@KonradRudolph don't think so.
@Ell inheritance is meh in general
user3010322
@Xeo True. Also less typing!
Ell
Ell
21:53
I quite like inheritance
Xeo
Xeo
why the single string overload in the first place, though?
@Xeo Because it does something different. ;-) Cf. (lambda (x) expr) vs. (lambda args expr).
Xeo
Xeo
oh right, you were doing that lisp thing
user1804599
Meh, lambda.
user1804599
fn :F
21:59
And this, right here, is why size_type should be signed:
assert(static_cast<decltype(formals.size())>(std::distance(a, b)) == formals.size());
user1804599
Use Java.
(also, it fails.)
why would you do that
user1804599
Or Perl.
the problem here is that you explicitly cast to a potentially unsigned type.
just don't do that.
22:01
@Ell basically, I have a long and I want to take each 4 bit component and make it its own variable
@DeadMG … and do what, instead?
@KonradRudolph Why not simply compare it directly?
@DeadMG Because that’s illegal (well, -Wnarrowing). Hence the cast
so it's completely not illegal at all.
and you replaced a narrowing conversion with a completely broken conversion instead.
@rightfold lol
22:04
@DeadMG What part of “possible loss of precision” is not broken, exactly?
Ell
Ell
I really need to learn how to use vim to copy to the X clipboard!
@KonradRudolph Depends on the exact types involved.
@CatPlusPlus your own mod pack?
I wouldn't expect distance_type to be wider or narrower than size_type.
22:05
Not mine, but I like it
though
Xeo
Xeo
@KonradRudolph I'd actually rather question why std::distance returns a signed type, but oh well
@CatPlusPlus a metric butt tonne of mods :S
maybe another time
Xeo
Xeo
since first has to be before last, making negative distances ill-formed
@Xeo Okay, point taken
22:06
I might compile my own once I get a grasp on what mods I want, and what mods I don't want
Negative distance … snerk
It's not as heavy as that Mindcrack crap
user1804599
$hit = 2; # hihi
Xeo
Xeo
@KonradRudolph what?
I'll write some getting started guides
user1804599
22:07
@CatPlusPlus I want to play tomorrow evening. Could you whitelist ubergeekkiller?
@Xeo Well, I, like you, question the sanity of such a concept. Physics training kicking in
btw I enabled /gamemode for everyone, so you don't have to mine shit, you can just switch to creative+ and spawn whatever
Less tedium, more playing with cool shit
user1804599
Oh, meh, nevermind then.
I mean, you can mine if you want, survival is still default
There's some new types of dungeons for adventurin'
is it just me
Xeo
Xeo
22:11
@KonradRudolph well, it conveniently encodes the direction of the vector into a single value, and makes sense if a > b (random access iterators), but std::distance doesn't allow that case
or is the combat in Starbound deeply dissatisfying
Xeo
Xeo
@DeadMG it's a bit stale, yeah
especially since enemies tend to kill you pretty quick
but hey, it's a beta
eh
I don't have any complaints about that per se.
but I do think the enemies are too dangerous and not numerous enough.
but for example, both melee and ranged weapons feel gimped, and the physics issues with moving (especially jumping) are really bad.
and there are no apparently available interesting weapons or technology.
and I also think the death effects and lack of maps is quite broken, as well as a lack of being able to pause.
Ell
Ell
gah why can't I copy to x clipboard!
I'm selecting some stuff in visual mode then doing :"+y"
user1804599
22:20
I should learn Tcl.
Tcl is not a nice language.
user1804599
It seems simple.
user1804599
And I like things that are simple.
you should work for my company then, plenty of Tcl there
user1804599
I don’t know Tcl.
22:24
nobody does
user1804599
How about C++, JavaScript or Perl?
what about them?
user1804599
Is there plenty of that there?
meeeh. who's good with bits? I want to read individual words of a long
Plenty of C++ (some of it really bad).
There is some Perl code AFAIK.
user1804599
22:26
@Crowz my_long & (1l << n)
Not much JavaScript though.
I'd like more JavaScript.
@rightfold what does n stand for? The size of a word?
user1804599
No, the index of the bit you want to read.
user1804599
@StackedCrooked I like Perl.
user1804599
I like Perl, Scala and Clojure a lot.
user1804599
22:28
I also like Go and Erlang and some other languages that nobody uses.
user1804599
Not to mention APL. I should learn J.
Currently Python is taking over the role that Perl used to have.
@rightfold wouldn't my_long & (1 << n) suffice ?
@Ell Without :
It's a normal mode command
what does the 1l do?
user1804599
22:29
1l is a long.
user1804599
1 is an int.
oooh, I see.
I'm not sure what you mean by that... the number of bits?
user1804599
1L << 0 is 0b1L, 1L << 1 is 0b10L and 1L << 3 is 0b100L.
@Crowz long = 64 bits, int = 32 bits
user1804599
22:30
@HamZa Implementation-defined. Never depend on it.
user1804599
@StackedCrooked Meh.
user1804599
I don’t like Python. It is too dynamic.
wait... so wouldn't my_long & (sizeof(long) << n) make sense?
why is that a bad thing?
user1804599
No.
user1804599
22:31
You want 1.
user1804599
You want to create a mask that has all bits set to zero except for one bit. Then you AND with that mask and you get the bit you want.
okay... I am also doing this in java (unfortunately) so not sure of the implementation differences
user1804599
@StackedCrooked The more errors the compiler finds for you, the better.
459
Q: Absolute Beginner's Guide to Bit Shifting?

John RudyI've been attempting to learn C in my spare time, and other languages (C#, Java, etc.) have the same concept (and often the same operators) ... What I'm wondering is, at a core level, what does bit-shifting (<<, >>, >>>) do, what problems can it help solve, and what gotchas lurk around the bend...

@rightfold But Perl isn't compiled, is it?
user1804599
22:32
@Crowz for signed integers it shouldn’t make a difference.
user1804599
@StackedCrooked Perl has clear distinction between compilation and interpretation.
Oh wait, we may have some compiled Perl.
user1804599
You can even run code explicitly at compile-time using BEGIN.
user1804599
Perl also has compile-time scoping, which is good.
Because they were paranoid about outsiders seeing our code.
@rightfold Interesting.
user1804599
22:34
Like most interpreters, code is compiled to in-memory bytecode and that is interpreted. Perl and Python both do this.
user1804599
In Python you can do this (see the bug?):
user1804599
if …:
    a = 1
print(a)
user1804599
In Perl you cannot do that without declaring a above the if statement first.
@JerryCoffin I remember why I stopped answering noob questions. It kills my accept rate =/ (It's a silly thing to care about I know)
user1804599
I.e. this is a compile-time error:
user1804599
22:35
if (…) {
    my $a = 1;
}
print $a;
user1804599
Fucking SSH.
user1804599
+--[ RSA 2048]----+ is so ugly.
user1804599
Dat uncenteredness. Dat missing space.
operation: 15060
opcode: 1 Op1Mode: 5 Op1GPR: 60 Op2Mode: 6 Op2Gpr: 0
why doth thou torment me so, bitwise operations?
Ell
Ell
22:43
@catplusplus ah okay thank you, I'll try tomorrow
@rightfold cool
> Need inspiration? How about spawncamping-octo-tyrion.
WTF Github.
When a question is in the related list that means it was one of the suggestions while it was being written right?
@rightfold So, I'm guessing Perl is your current flavor of the month?
hello
Ell
Ell
22:54
I need a factory function
I think that's what its called. maybe not o.o
think they call it factory method but same thing
does it factorize things?
factory? it's easy to have one in Python:
def factor(y):
i = 2
while i * i < y:
while y%i == 0:
y = y / i
yield y
i = i + 1
also, fuck markdown ;0
tee(hee)
I'm excavating lava
22:58
hope you brought a bucket
Bucket? Pfah
Who needs buckets when you have pumps dl.dropboxusercontent.com/u/26824/temp/mc/…
It currently holds 302000 millibuckets
Max capacity is 2240000 :v
your lava looks like candy
you made me hungry
23:10
@Ell such pun
@Borgleader much* pun, FTFY
Fuck the doge meme
@Rapptz very fuck, such doge, much meme
23:23
never liked it
Ell
Ell
fuck all memes really
yeah, they are so 2009
I think Earth is prettier than the other planets. Blueness covered with white clouds is much nicer than the bland colors of the other planets.
it doesn't have cool rings
23:29
True.
A friend asked me to help recover password for a rar file. I started to ask how long etc, and he says, in the meantime he found the password, but can't download it. I followed the link to see "Password The Elder Scrolls V Skyrim.doc" before my eyes :|
Ell
Ell
I think earth is pretty too
I tried mountain dew for the first time
tastes like aqueous sherbert
23:52
Is there a reason the instructions to install MediaWiki would fail on a VM?
Ell
Ell
network not setup correctly?
might need forwarding or some sho
shiz*
are you trying to access guest hosted website from host?
I mean I can't even see the setup page from inside the VM :(
@Ell No, guest hosted from guest

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