« first day (1630 days earlier)      last day (3312 days later) » 

6:00 PM
I hear that's like the de facto interview prep book. Written by a former google engineer iirc (though that doesn't really mean anything)
 
@Pris does that go beyond the scope of just saying what topics you should study?
 
user1804599
Maybe I should use D.
 
@райтфолд nothing good has come out of statements related to "maybe I should use "
@Pris found it, and it seems to actually explain stuff as well
@Pris thanks a lot!
 
I just realized that I installed all the dependencies for python2 instead of python3
Am I stupid?
 
or well, the explanation of course is in the answers of the questions listed
 
6:02 PM
@FilipRoséen-refp I dunno, I've heard basically that you should memorize it before an interview to try and get past the trick questions they ask
 
@Pris what worries me is that I don't have any education related to compsci (or any other topic for that matter), me being self-taught isn't bad; it's just that I don't want to find myself in a situation where they use terminology I'm not familiar with.
 
@FilipRoséen-refp You read the standard and write out template code like its nothing so you are a freak of nature and shouldn't worry about it
 
@Pris sadly that has little to do with algorithm analysis, but thanks for the kind words!
 
What position are you applying for?
 
@Pris software engineer
the recruiter has been on my back for quite a while, and when I heard that there might be a possibility to be stationed in Stockholm the choice became much easier
 
6:06 PM
I remember being a bit annoyed when I spoke with a recruiter there... I told them the kind of stuff I was interested in working on and he said yeah just apply for the generic "software engineer" position
 
I don't mind living abroad (done so many times during my modelling career), it's just that I'm now together with the most wickedly awesome girl - and she's in uni (in stockholm)
@Pris we haven't discussed the exact position to be honest, it's been a very chill process. She's checking in every once in a while seeing if I'd be interested for the interviews, and I get my background made it even more interesting
 
where do you live now?
 
@райтфолд D is awesome--right up until you actually try to use it, and encounter compiler bugs, standard library bugs, standard library limitations, ... and end up realizing that even though it has all sorts of coolness, it also has enough problems that it's nearly unusable for a whole lot of purposes.
 
@Pris in Stockholm, mostly because I started lecturing at a university here - and I don't do as much (fashion) modelling as I did before
it's also the city which I was born and raised (kind of), but I don't put too much value in such
I certainly feel most at home in New York.
@Pris how did it turn out for you regarding the recruiter from google?
 
@FilipRoséen-refp It went nowhere
 
6:10 PM
@Pris not your cup of tea?
 
I want to master algorithms...i read first 14 chapters from Introduction to Algorithms then it went extremely boring and advance and other source? Easy one :D
ok may be not easy but interesting
 
I didn't bother applying after the recruiter didn't really say anything to me beyond "just apply". Naive and stupid on my part I guess
 
@androidplusios.design You read 14 chapter and then decided to stop ?
 
@Pris I'm actually really excited about the interview process itself
 
yaa after that algorithms were kind of advance...until chapter 14 they were just basic sorting & randomization stuff
 
6:15 PM
@androidplusios.design Dontt stop
 
I have already passed my semester should i continue? This book is really mathematics oriented however....very little computer science stuff
 
@androidplusios.design computer science is mathematics
 
@androidplusios.design I finished reading it because I liked it, which is generally a pretty good reason to do stuff. If it's not worth it to you, do something else with your time
 
Some people here are gonna burn me for this
 
(I assume you're talking about CLRS)
 
6:20 PM
did you implemented all of the algorithms you read from that book @Jeremy
 
or just read it?
 
@androidplusios.design I just read it because I liked reading it, and didn't have any interest in (e.g.) implementing KMP all over again
 
Everyone....
I need to get extremely drunk.
 
@DonLarynx There is only one solution to that problem
 
user3010322
6:22 PM
@_@
 
But if you want to have a deep knowledge of the algorithms, you should take a shot at implementing and applying them
 
user3010322
OpenGL extensions are a fucking nightmare.
 
Reading code isn't a substitute for writing code
 
@Jeremy It is pointless to just read
 
@khajvah ...unless you like reading
for the sake of it
 
6:23 PM
@wilx bloody hell 1h15m
@DonLarynx do it, Dan!
 
@Jeremy You are gonna forget it in 2 days
 
@khajvah I didn't.
 
user1804599
@JerryCoffin You're wrong.
 
user1804599
Please check your calendar.
 
@LightningRacisinObrit Well, I am sorry for not providing you with instant gratification. :D
 
6:24 PM
@khajvah huh? only if you have the memory of a goldfish. reading is key to learning, bubba
 
@LightningRacisinObrit well i cant, im stuck doing java til 6...and i have a programming contest tomorrow.
 
she e e e e e ee e ee e e e e e e ot
 
twit twoo
@DonLarynx Programming Java drunk is the best way to program Java.
 
@LightningRacisinObrit Readin an algorithm is pointless if you are not gonna implement it
 
6:25 PM
because then u hit ur computer till it dies?
 
Most algorithms are easy to understand and logic, it is the implementation that is important
 
If somebody is extremely nice programmer he can skip implementation like @LightningRacisinObrit but for me i think implementation is must
 
@androidplusios.design programming is about practice. So no, you should implement.
 
At some point, you'll encounter theoretical algorithms that you'll have to settle for just reading about, or you're really wasting your time.
 
I'll continue reading this book...will finish 2 chapters every month till the time i graduate....also i'll implement them in c++ :) and will make sort of guide for it
 
6:32 PM
@androidplusios.design Have fun with KMP
Actually, KMP isn't as bad as I remember it being
ah, well
 
why is it so difficult? I think searching words wouldn't be that hard
 
@khajvah Total nonsense
@Puppy ^
 
@LightningRacisinObrit I dont think they could look dumber
 
@androidplusios.design Neither is multiplying matrices, right?
But try implementing the new fandangled O(n^{2 + epsilon}) algorithm for the smallest epsilon
there are hard, novel algorithms out there
 
should one even bother answering questions such as this?
0
Q: Passing a dummy lock to std::condition_variable_any::wait

LingxiSuppose there are three threads A, B, and C. B and C suspend at a certain point, waiting for A to signal them to continue. Among the thread synchronization facilities provided by standard C++, std::condition_variable seems to best fit in here (though still bad). Since std::condition_variable must...

 
user1804599
6:44 PM
How widely available are C11's threading facilities?
 
@FilipRoséen-refp yes?
 
@LightningRacisinObrit I mean, the question is painfully weird.. what does he think the purpose of the mutex is?
 
don't answer it then
 
someone answered it, and now it (the answer) bugs me even more (being that annoying pedantic type I am)
 
Defining a global operator new replaces the default implementation. Does this type of overriding mechanism require compiler/linker magic? Is it possible to write a user library that provides a similar hooking technique?
 
user1804599
6:51 PM
 
@FilipRoséen-refp lol that assumption he made
to be fair I can see how its weird if you don't know about condition variables and haven't played with them using another lib or pthreads or whatever
 
@Pris just the fact that he only wrote what he wrote to satisfy the library interface, without reflecting upon why the interface is the way it is
it's like doing "char const * const data = nullptr; std::string s1 (data); well, the interface said that I needed a pointer!"
 
Well when learning about certain things in school I vaguely remember being told to substitute random things into random functions without really having them explained. Especially when using the POSIX API and you put NULL in a bunch of stuff
 
@Pris yeah, but that NULL was actually used to signal to the library that you wasn't interested in the functionality provided by that variable - though I see your point, but I see the previous thing as being different
 
@FilipRoséen-refp my personal favourite is when they say they can't store a std::string in a container because they're using a library that needs a const char* given to it. Once. So they fuck about with std::vector<const char*>...
FSVO "favourite"
@FilipRoséen-refp inb4 "but when I remove the pointer I get strange errors about std::string()!"
 
7:03 PM
33
A: Override a function call in C

paxdiabloIf it's only for your source that you want to capture/modify the calls, the simplest solution is to put together a header file (intercept.h) with: #ifdef INTERCEPT #define getObjectName(x) myGetObectName(x) #endif and implement the function as follows (in intercept.c which doesn't include ...

cool
 
@LightningRacisinObrit at least that "works", my example would be undefined-behavior
@LightningRacisinObrit haha, true dat!
 
@StackedCrooked I can't see how this could possibly go wrong!
 
@StackedCrooked or you could use LD_PRELOAD (there are other stuff you need to think about, of course, but that'd be cleaner in my book)
 
13
A: Override a function call in C

Johannes Schaub - litbIf you use GCC, you can make your function weak. Those can be overridden by non-weak functions: test.c: #include <stdio.h> __attribute__((weak)) void test(void) { printf("not overridden!\n"); } int main() { test(); } What does it do? $ gcc test.c $ ./a.out not overridden! test1...

^ __attribute__((weak)) seems to do the trick
 
@FilipRoséen-refp haha!
@FilipRoséen-refp well, it doesn't; not really
 
7:06 PM
@FilipRoséen-refp Yeah, that's an option too I guess.
 
@LightningRacisinObrit how is that not undefined-behavior?
 
@FilipRoséen-refp well, it doesn't work*; not really
 
maaaan i have a hypothesis but I don't want to test it because it'll probably be wrong
 
@LightningRacisinObrit oh, I thought you meant the UB
 
@FilipRoséen-refp I noticed
hence my surgical precision in correction
 
7:09 PM
@LightningRacisinObrit well played, sir.
 
@FilipRoséen-refp thanks ,sir. i had a doubt
but now i can get the concept clear
ugh
 
greetings
 
user1804599
@BartekBanachewicz is there a Lua implementation that has 1) threads and 2) no cruft like GIL?
 
help vampire time
That's a dependency graph. It shows how things will be updated if I update any single node. If I update 'x', then 'h', 'k', 'j' and 'perimeter' will be updated. If I update naively, perimeter will be updated 3 times
I only want it to be updated once though
 
user3010322
You need a flag.
 
user3010322
7:22 PM
That you reset everytime a "full cycle" of updates are complete.
 
@ThePhD IMO that should be considered an anti-pattern
Why not just an UpdateX() function?
 
So I'm thinking, I do two passes. One pass is a mock pass and it will count how many times each dependent gets updated (so like 3 for perimeter)... and then every time I hit perimeter in the traversal I decrement that count
Once the count == 0, I do the update.
 
user3010322
Or just do what Jeremy said.
 
user3010322
Call update once.
 
user3010322
For everything.
 
7:23 PM
@ThePhD The graphs are disjoint in the application and there's no 'queue' of updates that's done periodically. It's just a cascading update whenever someone sets any of the nodes.
 
KISS, YAGNI, all that
@Pris snub that out now
or you're in for a real mess a couple of years from now
 
user3010322
Somebody requests the thing at some point.
 
user3010322
Have the update be explicit.
 
Every time an update occurs, the updated node sends out a signal so a listener can potentially react
I'm trying to model properties in QML if you guys have ever used that before, but in C++
^ better description
 
@Pris I'd try a different approach in that case. Send out a signal that indicates that your GeometricObject is done updating X, maybe with a list of properties that have changed
 
7:29 PM
@Pris you could do it with a single pass and a counter to see if the objects needs to be updated or not
 
@FilipRoséen-refp What condition would let me know if I need to update in a single pass?
 
@Pris perimeter keeps track of what update it just received, if it is already at that update, it does nothing
@Pris ie. x increases the global "update counter", and then says to it's decedents that "hey, you need to make sure you are at N", if a decedent is not at N it re-evaluates itself and notifies the decedents of that node, and on goes the saga
that was a weird way of describing it, but I'm currently eating
 
So a wasp landed on my bike. I proceed to put it on a lamppost for one minute. After it leaves, I ride it again and 5 seconds later my tire goes flat. I dont know how to feel about this.
 
@Pris and now I realized I missed an important part of the explanation
 
@FilipRoséen-refp I also am eating
 
7:35 PM
@Pris but I reckon you can work out how to have perimeter only update itself when it knows it is safe to do so
@Pris hmm, btw, are you working in a single-threaded environment?
 
@Pris Something i've seen before is having a BeginSuspendUpdates() and EndSuspendUpdates()
 
@DonLarynx but I'm not human.
 
which just maintain a counter - incremented and decremented respectively
 
@FilipRoséen-refp: me neither.
 
@FilipRoséen-refp are you a hooman?
 
7:36 PM
@orlp I'm an experimental bot implemented by the NSA.
 
But that doesn't really save you from constant recalculation if you need to synchronously update the geometric object often
 
 
I'd just make sure you manage your class' dependencies well
 
@FilipRoséen-refp silly you
 
and maybe settle for UpdateX() methods
 
7:37 PM
the NSA is long past the experimentation stage
did they not shut down your controller unit?
 
someone tweet at me
 
an agent will come to visit you soon to terminate your suffering, please stay put
@Puppy tweet
 
that is not a TWEET
 
I tweeted at you
tweet tweet
 
i see
 
7:41 PM
> I was wandering if it is possible to overload...
 
its hard for overloading and wandering to affect each other
 
I don't want to be broke no more..
 
Security is hard. http://t.co/ML2Zgn8XUs
 
fuck password requirements of symbols and numbers too
 
user1804599
@Jefffrey VARCHAR(10)
 
user1804599
 
@райтфолд it's clear what he wants..
 
@Puppy I’ve never run into that.
 
user1804599
No, it's not.
 
he's asking what the difference between those if's are.
 
@LucDanton Well, running isn't really wandering, is it?
 
7:55 PM
Walking is wondering.
 
@Pris You don't really need to count that
Just go through entire graph and make a set of nodes that need to be updated
Well, ordered set, by dependency relation
This is pretty much what build engines do to create a list of commands to execute
 
yo yo
 
submitted suggested edit
use different close reason pls
 
Now you'll die in 7 days
 
8:04 PM
is heap corruption causes stackoverflow?
 
@Phiber wat
 
is heap corruption may cause stackoverflow?
 
possibly
If you have a recursive method, and the termination condition depends on a value stored on the heap, and the heap was corrupted, you might recurse endlessly, causing a stack overflow.
 
yep
 
user1804599
@fredoverflow so it's not endlessly!
 
8:08 PM
right
 
because he nya no border between the reserved area of memory for the stack and the heap for
because there are non*
 
That would explain a stack overflow causing heap corruption.
 
there is non* lol
 
Have you tried pressing "Cursor up"?
Oh wait, that's a different gif :)
 
non, stack overflow don't cause heap corruption :)
 
8:11 PM
@ThePhD ninja generator
 
Do we have a gif for "press cursor up to edit message"?
 
@райтфолд it is super-clear what the question is
 
user3010322
@Rapptz Don't you have that done already?
 
user3010322
Also doesn't @nightcracker have a python ninja generator already?
 
user3010322
Like, a full build-system ish one?
 
8:13 PM
no
ninja comes with a NinjaWriter thing
but that's not what I meean
 
@ThePhD I never planned to make a ninja generator
 
Is that a JavaClass?
 
@CaptainGiraffe no
 
user3010322
I'm confused as to what you mean by "ninja generator", then!
 
@CaptainGiraffe NinjaWriterFactory
 
8:15 PM
@fredoverflow NinjaWriterBuilderFactory if we want to be modern about it.
 
NinjaWriterBuilderFactoryStrategy
 
@ThePhD higher level API
 
user3010322
@Rapptz Ah. So like something from the command line, or something you can embed in other languages (like a C++ API or something)?
 
no
 
I need to take my medecin.
 
8:16 PM
Jan 13 at 22:36, by sehe
Why don't Haskellians see that State Functor Flat Map Monadic Bind Application is not much different from Java's despised Proxy Bean Factory Providers?
lol
 
have you never seen NinjaWriter
 
user3010322
Nope. :D
 
rust 1.0 beta released today; I bet many panties were soaked today on /r/programming
 
user1804599
lol Rust
 
user1804599
piece of shit
 
8:21 PM
Aww, chucks. See I'm still a perl fanboy.
 
hmm... is there a 'clean' way to treat a std::array as a std::vector, for read only purpuses
 
@райтфолд What makes you say that?
 
The emotional bond you form with a woman comes from a cocktail of chemicals manufactured by your body and your history of shared experiences, not from being shot in the ’nads with an arrow by an overweight, nude fairy. @LightningRacisinObrit
 
@thecoshman ?
Why?
@ThePhD It's very manual. It's just writing a ninja file in python.
 
@thecoshman No. There isn’t a dirty way either.
 
user1804599
8:23 PM
@fredoverflow lack of exceptions
 
@DonLarynx I never knew he was aiming for nads.
 
oh LRIO has a new female avatar that isn't him
 
user1804599
(lol)
 
Well, some people think exceptions are worse than gotos.
 
<[^>]+
 
8:24 PM
ah, no, don't need that. I had a function that would print a vector in a 'nice' way, was easy enough to do one for array too
 
@fredoverflow They are not?
 
@CaptainGiraffe It's a matter of taste/opinion.
 
@sehe oh master of parsers, can I have your opinion on something?
 
how much will it pay?
 
nothing it's open source and it's just a yes or no question
 
8:33 PM
Oh. In that case. Here's your free 'yes' and complimentary 'no'. Have good day :)
 
fair enough... that will teach me to ask for advice
 
But since you interrupted my porn watching programming anyways, what would the hypothetical question unasked have looked like?
 
Can't joke anymore... :(
 
eh... there's at least one alcohol joke there
my favorite is Terry Pratchett's "Departed Spirits" in reference to spilt whiskey
 
8:36 PM
@Mgetz Mmm. I don't know IRC protocol. I would never bother with Spirit (if that's the choice of words) but I certainly think what I see there could be much more expressive and less error-prone than with a plethora of little checks, substring searches etc.
@Mgetz :D
 
@sehe fair enough, the messages are either simple or numeric replies
 
Do you have a short IRC exchange in protocol?
I would very much bother with use Spirit there.
The disclaimer being that I won't have a learning curve :)
Similar to "I would use Vim to do this editing task"
 
ex of simple command: ":Angel!wings@irc.org PRIVMSG Wiz :Are you receiving this message ?\r\n"
 
And that's :[user]![unique_id] [cmd] [freeform...][CRLF]?
 
where :[ident] is most often optional
 
8:40 PM
Why is that? The server tracks it for the connection?
 
@sehe it's [:from] [cmd] [args..] :[payload]\r\n
 
Ah. Good. Thanks for chipping in
 
@sehe indeed
 
I would definitely consider Spirit here. Lemme scan to the productions in the RFC
 
just to clearify, it's optional when sending a message to a ircd
 
8:41 PM
@FilipRoséen-refp yes but when you're writing a client library you have to expect it to be there
 
@Mgetz That was the first page I opened after spending 4.1s on the linked source :)
 
otherwise you can send a message that is then illegal for the server to retransmit
 
@Mgetz not really, I've been working with ircd's that don't have :from when there are messages that are coming from the ircd itself (and not some user connected to it)
 
I remember trying to implement the grammer from the EBNF, was a nightmare
so I'll probably simplify it to the parts I care about and use spirit on that
 
You can show me the EBNF you care about :)
That's were Spirit becomes so nice; you can actually think of your grammar as productions. If you change a detail/edge constraint you don't have to recheck all your code (and make the inevitable bugs)
 
8:47 PM
tools.ietf.org/html/rfc2812#section-2.3.1 is about as deep as I want to get into the BNF
honestly message = [ ":" prefix SPACE ] command [ params ] crlf is probably fine for parsing a message to a structure
most of the rest of that garbage I'll care about when sending messages
 
what's whitespace significance?
 
not receiving them
I'm lazy when copying?
 
I mean, in the RFC. What does it tolerate/require?
 
for the first bit it's very strict
no double spacing etc
 
Xeo
Ooooh, what's going on here - IRC parsing?
 
8:50 PM
ok
 
params can be just treated like a string
@Xeo yes
 
yeah, I got this (see [freeform...] above)
 
@sehe why are you working with the IRC protocol?
@Pris I talked about just that thing with my girlfriend the other day (and I linked her that article earlier this morning)
 
Xeo
@Mgetz I made a parser in Haskell a while ago, for a bot
So nice with Parsec
 
8:52 PM
@Pris I'm surprised I couldn't find any case where someone publish an april fools joke simply to make some fast money
 
@sehe no need to do more, you've already helped a ton. Now I just need to get off my ass and learn qi
dread
@Xeo I'm rewriting hexchat's for my build, its current parser is... fun to say the least
 
time to hit the shower, stay dope Lounge<C++>!
 
@FilipRoséen-refp I'm not
 
Xeo
although I cheated a bit with the host string, I think. Didn't bother whitelisting all that's allowed in that other RFC they link to, and just said "anything but period and space".
the whole parser part is 34 lines
 

« first day (1630 days earlier)      last day (3312 days later) »