« first day (1698 days earlier)      last day (3249 days later) » 

12:05 AM
user image
7
 
lol
 
reminds me of lrio
the guy on the left obv
 
those comics always bother me
see here:
 
that one is 2smart4me
it has deep meanings and metaphors and shit
matlab looks cool
I see there's prebuilt GUI stuff and libs for AI stuff
I wonder what you can do with it
 
Build slow programs that take up absurd resources.
 
12:12 AM
the program itself seems pretty snappy
loads up in 4 secs from a HDD, closes up fast, seems to be barely using anything
 
Really? Neat.
 
the UI is responsive
 
yeah the cartoon bothers you so share it with us ...
really good strategy
 
it has this extra stuff for distributed computing
so I guess it has to be used in heavy computations somewhere
 
TIL I don't know how to code MATLAB. Either that or finding the shortest path between two nodes in a graph with edge lengths taken directly from a bitmap takes silly resources by itself.
 
12:15 AM
learn it, matlab coding is easy
 
I'm not saying you're wrong
 
almost like scripting
 
calm down
 
Nah, I'd assume the stuff that comes with is optimized.
 
I haven't used it for anything yet
note that I'm also using r2009a
I'd suspect the newer matlabs use more resources
 
12:17 AM
I really don't know how that stacks up against r2013a, but yeah I'd agree.
You might want to learn Octave instead.
 
I need matlab to pass a course in college
 
They're similar, but I've heard better things about Octave.
 
I think if I were to choose something myself I'd go for Sage
it's free
so I don't have to buy it through communal stores where people help each other with stuff
 
You can compile with the -braindead tag to make sure it's working MATLAB code.
 
12:32 AM
@chmod711telkitty I think you're really smart. Let's go out for e-coffee at exclusivecoffeeshopforchmodanddononly.com tomorrow at 5PM.
 
@Rapptz perfect
@AlexM. lol Matlab
Oh Matlab
Why art thou such scourge upon thy devoted?
For thine is the art of construction according to structured ways that holds up the foundations of our very earth.
Must thou embrace the solemn destruction of your people? Oh, Matlab!
But still much better than C and its line are thee.
btw is it uncon or Unicon
 
@BartekBanachewicz lol
@MartinJames OpenCL would have a word with you!
 
wow
I'm not old enough
to go to CPPcon
I'd have to take someone with me
 
12:47 AM
@buttifulbuttefly It's slow... compared to CUDA
har har har har har har
 
Not true!
 
OpenCL fanbois need not apply
 
This gifv makes me happy.
 
@Borgleader the ending lol
 
proof that animals are intelligent beings
 
12:53 AM
@buttifulbuttefly he's drunk you asshole
 
activating offended mode
 
I should try the latest version of CUDA...
 
It's quite nice!
I'm making a C++ wrapper API over OpenCL btw in my free time (= never).
Feature requests pls
 
so... thrust but for opencl?
 
Do you guys often feel like you're not that productive at work?
I feel so lost...
 
12:58 AM
@Borgleader More like cl.hpp done right
@VermillionAzure I have a strange work pattern. At times I'm gonna be stuck lazing around because the current state of things sucks and I don't see how to improve it in a satisfying way, then when I get the idea I'm suddenly super productive.
 
@buttifulbuttefly idk what i'm doing
i mostly chat on here during the day and try to improve
i think i'm just lazy
 
We all are
 
@buttifulbuttefly Somehow some people aren't
and then they try to make like they're better than us. The part is that it's true... :(
@buttifulbuttefly But everyone does. The fact that I cannot work in a timely matter bothers me.
I guess I just lack discipline
 
finished a data structures assignment in 2 days
take that bitches
 
@DonLarynx what was it
 
1:02 AM
<<(^.^<<)
(>>^.^)>>
.
oh...
 
@DonLarynx congratulations
 
@VermillionAzure basically write a program that takes strings in a file, tokenizes them based on certain criteria, and then stores them in a set
 
@DonLarynx Oh?
 
as pairs of strings and ints
 
I've done something similar to this before
 
1:04 AM
the flags
oh the flags
 
hey, flagger: thanks i'll need them for everest expletive
 
@Borgleader Somebody recommended Boost.Spirit to do this
I did a state machine too
It was for sudoku though
It was pretty simple but it did support "comments"
 
I value flags more than stars TBH. They're my "I offended someone" counter.
 
@DonLarynx neat
 
1:06 AM
I'm not good enough for Boost yet.
 
@DonLarynx "Not good enough for Boost" what.
 
> You need a programming level of 70 to use Boost.Spirit.
 
@DonLarynx Actually, never mind, I can empathize
 
i was kidding, of course i can use boost lmfao
 
Boost.LMFAO
7
 
1:07 AM
> My programming level is 71.
 
@buttifulbuttefly boost::lmfao::make_single() --> "I'M SEXY AND I KNOW IT!"
 
#include <repetitive_annoying_sound.hpp>
 
while (true) {
std::cout << "wiggle ";
} std::cout << "yeah.";
 
what the hell
i got points off on my 1st assignment for using hanging braces
what the {
//fuuuuuuuu
}
guys what the heck is wrong with hanging braces?
 
Ask yourself: what is wrong with sagging pants?
 
1:12 AM
That's not a good analogy. I don't see the analogy.
 
Try harder
goodbye little star
 
@buttifulbuttefly Help?
 
hanging braces?
 
sagging pants make your legs look short?
 
myFunc(
//stuff
)
vs non-hanging
myFunc
(
//stuff
)
the latter is uglier
why is it preferred?
 
1:17 AM
ah, does your class have a style guide?
 
yep
 
did you follow it?
 
i just found out about it.
 
\o/
 
after submitting 4 assignments.
yay!
 
1:18 AM
did you read the syllabus?
 
there are no instances of style and 2 instances of guide, not referring to style guide.
in syllabus.html
 
oh, and why it's preferred? It's completely arbitrary, but it is really nice to have a whole codebase adhere to the same style for readability and consistency sake
I guess it should probably be in the syllabus.. maybe in the project descriptions
 
@Collin Personally I now vouch for K&R over Allman style
I used to use Allman
 
I like K&R as well
 
and then I coded 4-level nested logic
 
1:20 AM
>.>
<.<
 
@Collin ewwww get out D:
j/k
but still, ew
 
I end up writing allman though, since that's what people at work like
whatever
vim-autoformat to the rescue
and a git-hook attached to astyle
 
bye guys
bye chmod tel kitty 711, 7/11, let's make our 7/11.
 
Ahh this is great.
I finally found a replacement keyboard for my laptop.
(Asus G750JX)
 
@buttifulbuttefly oh, like a programmer
 
1:30 AM
I spilled water on it quite a long time ago--and it still doesn't work.
Oct 28 '14 at 0:43, by Nooble
Does anyone know how I can possibly get rid of water in a laptop keyboard?
Anyway, I've found a replacement for $69.99 on eBay.
 
It's probably corroded and broken
 
Most likely yes.
It ships from Hong Kong, and the keyboard is Taiwanese.
 
oh, I misunderstood
I thought you were looking for ways to fix your keyboard, I didn't catch that this was an update
must not be easy to find
 
@Collin meh
Allman's very nice. Until you start nesting
 
Meh?
 
1:33 AM
Yeah I think Asus discontinued the replacement parts.
 
I just try not to nest more than one or two
 
Question for you guys.
 
@Collin "meh" is my little sound for "so it is so/whatever."
 
I'm working on a simple ECS implementation, and I have an entity class.
 
@VermillionAzure Oh, I got that, I was just wondering what you found meh about git hooks
 
1:34 AM
@Collin oh git hooks?
what that?
 
hai
 
but that doesn't even appear to be what you were 'meh-ing' about
 
@xalvin iie
bye
 
That entity has a set method that takes a type and an arbitrarily long list of parameters and forwards those to the constructor of the type, and then creates a component from it.
 
@VermillionAzure that was the line you responded to
 
1:35 AM
That works well.
 
@Collin oh whoops
 
Oh jeez.
The shipping.
 
@EtiennedeMartel Why???
Why do people do this again?
 
@VermillionAzure Because it works well.
 
How long does it take to ship from Hong Kong to New York?
 
1:36 AM
Anyway.
I just end up doing a make_unique and forward everything to it.
 
@Nooble Depends on whether you got the "Rickshaw" service or the "747" service
 
@EtiennedeMartel Is this what you call a factory pattern?
@Collin what's a git hook
 
@VermillionAzure automatically tweaks your code before you submit it to the rest of the team
 
@VermillionAzure It's a little script that runs before various git operations, and will bail out if they fail
 
@Collin Heh.
 
1:37 AM
@TBohne oh the style formatter hooks into git
 
Yeah looks like the "rickshaw" service is 20 days.
 
yeah, mine just throws an error and doesn't commit of something doesn't pass the astyle check
 
Expedited is like an additional $30.
 
yeesh
 
Now, here's my issue: if the specified's type has a constructor whose first parameter is an entity and all other parameters match the specified args, then I want to use that one and pass the current entity there.
 
1:38 AM
If I correctly remember, isn't a singleton factory pattern bad or something like that?
I tried doing something like this except I couldn't use templates for this
 
Singleton Factory Pattern?
 
@Collin Where a single class is the factory
 
singleton pattern or factory pattern
 
@chmod711telkitty ah, it seems i have my terminology tangled
 
@chmod711telkitty one class can mix both patterns
 
1:39 AM
So, I want to be able to do something different if the constructor has a specific signature.
 
@EtiennedeMartel Overloads?
 
@VermillionAzure can you make two factories? if so, it's not a singleton.
 
@VermillionAzure Singleton is a global pretending to not be a global, that insists it be unique. Factory makes hidden child classes.
 
@jaggedSpire Ah I see.
So having a single class != singleton if it doens't have to be unique
 
@VermillionAzure It's not a factory, unless you call any constructor you see a factory.
 
1:40 AM
i.e. a single-player game can have a single input class but it's possible to make it multiple with multiple input classes
 
sure, that would not be a singleton then
 
@VermillionAzure Right. You want a singleton only if you are absolutely, 100% positive that having more than one of a class would actively fuck over your program and anything that reuses the code in the future, is my understanding.
 
@jaggedSpire which... wtf would that be
 
exactly
Can't just do something like:
`template<T...>
factory(entity _entity, T...)`
 
@EtiennedeMartel How'd you code the ECS?
Variadic templates?
 
1:43 AM
@VermillionAzure Yes
 
fuck it I can't chat markdown
 
@EtiennedeMartel That's strange
 
@VermillionAzure If you have only a single external resource you're manipulating in a non-thread safe way and you hard-coded the location of the resource so you can't reuse the class for other things, is my guess. I had to deal with embedded hardware like that in my Embedded Control class, once.
 
@EtiennedeMartel So do you pass the template list to the constructor of the first object type then?
@jaggedSpire So a file handle would be one
Atomic RAM writing
 
But that required C, so the point was moot.
@VermillionAzure if you know you'll only ever want the one.
And yeah.
 
1:44 AM
@jaggedSpire Ah god that reminds me
 
So what was I saying before offending a handful of delicate flowers
 
I am not going to do Cereal Killer
 
@VermillionAzure Ah darn.
 
@Collin My set looks like this:
 
I don't really have enough time
 
1:45 AM
template<class Component, class... Args>
Component * set(Args... args) { ... }
 
@EtiennedeMartel Oh that's brilliant.
God something so simple in concept is hidden behind such a scary name
 
@VermillionAzure I found a list of design patterns which are used in C++. As always, use at your own peril.
 
@EtiennedeMartel Yeah, you can't just do an overload of that with an entity as the first arg? SFINAE would just sort of take care of it, maybe
 
@Collin But that's the thing, I don't want to have to pass an entity
 
oh
 
1:49 AM
I just want to forward *this if the component's constructor's takes that as its first parameter.
 
Expression SFINAE
 
I'll make an example
 
@buttifulbuttefly Shit, that stuff isn't available with VS2013.
(Yeah, should have mentioned I'm stuck with a shit compiler)
 
1:56 AM
guys, how good at programming are professionals supposed to be? Is there a way to measure skill objectively?
 
@corvid Whatever gets the job done.
Notch was considered a not so great programmer but who cares.
@EtiennedeMartel std::forward?
 
Although there seems to be a workaround somewhere.
 
I can think of a trait-based solution but that's not extremely elegant
 
@buttifulbuttefly Theres no way to do it with ye olde SFINAE?
 
2:03 AM
Probably with is_constructible yeah
gimme a sec
 
I need to git gud at templates one day =/
 
literal tears of joy
I've reached final rank
 
Very nice.
 
@Rapptz literally literally?
 
Shitstick I think I got something that works.
 
2:07 AM
or figuratively literal?
 
FIGURATIVE
But I feel an overwhelming sense of relief
So close enough
 
@EtiennedeMartel coliru.stacked-crooked.com/a/ca4a22cea9cc2b12 Should work with MSVC
 
@buttifulbuttefly Yeah, I got basically that but without the whole void -> thing
*auto ->
Anyway, thanks a lot!
 
@buttifulbuttefly I'm regexy and I know it
 
I have a little ECS thing
 
2:09 AM
oh god.... i should go to bed now T_T
 
Doesn't use inheritance
 
The auto is not required, just personal style
I have a fun bug with MSVC
I have no idea how to describe it even
 
@buttifulbuttefly Do tell
 
Basically I have a type hierarchy where Derived : public Base. In one cpp file I do base* = &derived and it compiles. In another I do the same and it doesn't.
Definitions are accessible to both. I don't understand what's going on.
 
@VermillionAzure who the hell is notch?
 
2:12 AM
@corvid Wrote Minecraft. For a time
 
Minecraft
There, so did I
 
One guy wrote all of minecraft? Hm
 
you new m8?
 
@buttifulbuttefly Congratulations. Here is your $2 billion, do pass go, do collect $200.
 
> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
I don't even
It's the exact same header included from two different .cpp
No way it compiles in one and not the other
 
2:14 AM
@R.MartinhoFernandes Much less than 12 days now :P
 
Clearly in Visual Studio Land, deterministic behavior is merely a suggestion for compilers.
 
it makes no freaking sense
Oh.
 
@AndyProwl DO YOU HAVE A DONATE LINK??? I WISH I HAVE MONEY IN MY PAYPAL TOO!
Freaking on the spot!
 
How do I find out my Thunderbolt™ version?
 
> bring me a Ruby book
lol
 
@Nooble Search for your laptop's model and see the specs? Or the PCIe card model something?
 
@MarkGarcia Ahh okay then. I thought there would be some software way.
 
2:43 AM
I never used Thunderbolt hardware.
 
I'm trying to see if it's possible to do an eGPU setup on my laptop.
 
lol someone on HN giving their opinion on Fukushima's radioactive water
As if it were a walk in the park
 
@buttifulbuttefly HN?
 
@Nooble AFAIK, Intel doesn't official support external GPUs on Thunderbolt 2 below. Only Thunderbolt 3 does. Although I know OEMs does have such capabilities built. Those Alienware and MSI thingies.
 
@MarkGarcia Yeah I'm pretty sure they don't. Although nothing's stopping me from using a Thunderbolt to PCIE 2.0 x4 thing and an external PSU.
Except maybe the bandwidth...
 
2:50 AM
Wait for Thunderbolt 3 hardware.
 
0
Q: In c++ : Given a set of integers, which ends with a null value

code123In c++ : Given a set of integers, which ends with a null value, report: a) The sum of values greater than 50 b) The average values between 30 and 70 I tried with different things, but they were all wrong :(

I'm so tempted to offer an answer std::set<int> s; for (auto value : s) ...
 
By set they probably mean a 0-terminated list of values, not std::set
 
user406009
That question makes no sense. In C++, we like to keep our sizes around. No need for "null" termination.
 
The assignment could well provide a 0-terminated input
 
I started using MSVC as a Python IDE. I feel bad.
 
3:05 AM
You shall never be forgiven.
 
...I want to format that code.
i t ' s likehaving
spa c ing
like
t his
 
3:26 AM
&nbsp;
 
H ow tobe mo re Ann yoin g.
 
Sorry.
 
hi
 
ugh
ugh ugh android
 
4:13 AM
@Mikhail !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
SSSSSSssssssssssssss.....
 
@DonLarynx I think this fits better: yourlogicalfallacyis.com/tu-quoque
 
4:39 AM
 
4:51 AM
hello
im messing with intrinsics and am wondering if it is possible to sum two 128bit numbers
 
Well if you're using __int128 the operator + works as usual
 
oh
vs2013 does not support, but I found a sort of work around for my use case
using the acdx instruction
but this leaves me with a question. what is the difference between acdx and acox?
to me it looks like a simple difference of labeling, calling it a carry flag vs an overflow flag, but I haven't a clue
 
8
Q: Arithmetic Overflow vs. Arithmetic Carry

eggonlegsOne of my lecture slides gives an example of arithmetic overflow and carry in a topic for conditional branching flags on an ARM chip, quoted below: V (overflow) -  7FFFFFFF+1 C (carry) -  FFFFFFFF+1 Presumably for the sake of the example, the address can only hold 8 bytes. So to me, it seems ...

 
5:06 AM
even more confusing since both acdx and acox are for u64
 
That doesn't come into play (re read the answer carefully!)
 
ok, I see
 
 
1 hour later…
6:42 AM
Hm...so am I supposed to say "Marco" or "Polo" in this situation?
@MarcoA. How are you today/tonight/this morning/evening?
 
hi Jerry
<3
 
hello again
back with more stupid questions
 
Better be back than be black!
 
UHHHHHHHHHH
 
@JerryCoffin tired. I slept but I'm still tired.
 
6:43 AM
so I have this array of unsigned long longs
and it is 1024bit big
so 16 unsigned long longs
essentially I want to reinterpret_cast to bitset<1024>
 
@MarcoA. I hate when that happens. Oh, but speaking of which, I need to get up in about six hours... I'll talk to you all later.
 
oh lol, it works
I was just reading it wrong
 
lol stefano is right, ++C rocks
 

« first day (1698 days earlier)      last day (3249 days later) »