« first day (2149 days earlier)      last day (2800 days later) » 
00:00 - 22:0022:00 - 00:00

12:28 AM
@Mysticial What if both numbers are zero?
 
Pointers or reference wrappers for a queue that passes around big objects?
 
 
1 hour later…
1:42 AM
I haven't used reference wrapper much yet.
 
Apple has stepped up it's developer spamming program
so it seems
 
2:04 AM
We high_resolution_clock, steady_clock and system_clock. That seems like a fail in orthogonality.
At least there's Clock::is_steady.
 
3:04 AM
> Python: There should be one-- and preferably only one --obvious way to do it.... except that the obvious way isn't the one we chose to implement
 
@StackedCrooked Perhaps it should really be a single class with some template parameters to specify how it works. Primary choice is between relative and absolute, with steady = notrequried as the second parameter.
 
I'm finding that the greater half of my programming issues come from handling text encodings... The remainder are usually just my gripes with sound but unintuitive design
 
3:24 AM
@JerryCoffin I'd keep system_clock and steady_clock a primary distinction and use highres as the param. (I'd really like to have clock_utc and clock_tai, but that requires a time synchronization source which is kind of a heavy dependency).
 
4:06 AM
> "This is the best book I have ever read." - Anonymous reviewer
lol
What a reference.
 
xD How much would you bet that the reviewer was from Amazon or facebook?
I think '- My Parents' would be a much more dubious credit for a reference
 
 
2 hours later…
Ven
6:03 AM
hi
Brutality, huh.
 
temple/os guy testing his flight simulator on his new Xeon (24x3Ghz)
 
 
1 hour later…
7:31 AM
I read the TempleOS web page with growing contempt. I eventually found my way to the supported encodings section...
> It was written from scratch, and
not even ASCII was sacred -- it has 8-bit unsigned char source code to support
European languages.
Why not utf-8? I suppose for a home project this is a fair compromise, but in that case what does the CIA have to do with TempleOS?
...anyways, I'm not one to complain about somebody making stuff for the sake of making it
 
Ven
He's doing it for god's sake. Pretty literally in his mind.
 
I thought that was just marketing ^^;
 
7:48 AM
"I'm not sure if this is the right answer, but we can store 11 million years before the next epic, e-puck, epic". It's hard to take him seriously and I feel sorry because I respect the project :(
 
Ven
8:28 AM
@Aaron3468 Uhhh. If it were marketing, he probably wouldn't go around calling people the N-word...
 
@Ven Whoa...
 
Ven
I actually believe he's mentally challenged.
2
A: Idiomatic way of avoiding doing a nil? check

VenClojure offers if-let as a shortcut for... Well, if and let (as well as when-let if your then branch has more than one form) There's an else clause if you wish to use it. Otherwise you'll get nil as the else. (if-let [t nil] t) nil (if-let [t 1] t) 1 (if-let [t nil] t 0) 0 (when-...

^ that guy waited for me to edit my asnwer to add some details to remove the "accept", and instead posted the answer in his own question.
 
@Ven I believe you may be correct. Definitely not ordinary behavioural tics, even for the more reclusive programmers. It honestly reminds me a bit of how the schizophrenic people I've met communicate
Okay then, he must be new but his rep says otherwise...
 
@Ven Just edit the title s/ma//
 
8:42 AM
Hello All . I am trying to learn std::regex
 
Ven
gl&hf
 
i tried to write this regex to match for a string with must contain at least 1 lower case letter, 1 upper case letter, 1 digit and of at least length 6
std::regex pass_fmt("(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9]).{6,}");
do u see any prob in this regex?
 
why not do something else instead of the regex?
 
<insert standard quote about regexes and problems>
 
8:48 AM
for matching the string or trying to learn .. lol
 
for the string matching
 
A simple parser would be more effective for this problem, assuming ascii.
 
@ratchetfreak like? Assuming i was trying to implement a password matching kind of thing.
 
3 boolean and a simple for loop
 
Regexes are better suited to patterns, like languages, than to categorization/states like the problem you pose above.
 
8:50 AM
and a separate check for the length
 
@Aaron3468 hehe yeah u r ryt lol i didnt thing of the simple solution
@Aaron3468 i got a look at regex and found them to be interesting and confusing at the same time. so i was started to approach it this way
 
> "I want to solve this problem with a regex" "now you have 2 problems"
^ paraphrased
 
for (i = 0; i < string.length(); i++) {
    if password[i].isUpper() {
        //checkmark } ... }
if (string.length() >= 6) { //checkmark }
 
not to mention that many default implementations will end up traversing the string 4 times with that regex
 
@ratchetfreak , @Aaron3468 yeah i got the point that this is problem doesn't need a regex and can be solved in simpler ways
 
8:55 AM
Very simple. Regexes are better for things like <email> = <name>@<domain>... <domain> = <domain-name>.<domain-suffix>
 
except email addresses are much more complicated than that...
 
just another quick question then.. lets say i have a string
 
This is what my problem looks like bpaste.net/show/39a1450126b9
 
Wed, 2 Sep 2016 or Sat, 12 Aug 2011
 
@ratchetfreak Just giving an example ;) Thank you though
Phone numbers are another good application; you can use regex to support many delimiters and bracketed notation.
 
8:57 AM
now i want to match against these kind of strings
wed, 3 sept is invalid for me
 
casing
 
does my issue make sense?
 
(Mon|Tue|Wed|Thu|Fri|Sat|Sun), \d{1,2} (Jan|Feb|Mar|Apr|May|...) \d{4}
 
@ratchetfreak yeah sure.. but i want to know does this problem fit regex kind.
 
@AbhishekBhatia Yes, use a while loop
 
8:59 AM
@ratchetfreak or i shud try a better simpler approach
 
@DevanshMohanKaushik It can use regexes, but it's not complex enough to require them (and they're infamously difficult to debug).
 
@Aaron3468 yes, but I want to assign the values to different variables for each iteration and I can't store in an array since one is float and others are int.
 
every time you could use a regex you can also use a self coded parser
 
@AbhishekBhatia Check the line for . or ,, and assuming the line is a number, interpret it as float if either one is found. Otherwise interpret as int...
 
@Aaron3468 they can be quite confusing sure.. atleast i m feeling so
 
9:02 AM
@Aaron3468 not sure I get you. Can you show some code.
I didn't get check line for . or ,
 
@ratchetfreak u suggest that complexity will be more if i use a regex. so it is better to write a parser f my own for the specific problem?
 
@DevanshMohanKaushik Don't get me wrong; they can be very powerful :) But use a powerful tool (like this one) to check that your reg-ex works properly
 
@Aaron3468 ok sure. thanks for the link.
@Aaron3468 can we find out the complexity when using a regex for this [Sat, 3 Sep 2016] problem?
 
@AbhishekBhatia I recommend you learn more about C++ file input and strings before you continue with this problem. You don't seem ready for it (yet). What I mean is for character in line, if character == '.' || character == ',', return (float) line. Else return (int) line
@DevanshMohanKaushik It's not a difficult problem if you break it down; you have four elements to search for. You know the first, day, will be at least 3 characters of the day's full name (with varying caps). The second, date, will be a 1-2 digit number, followed by an optional suffix depending on the number, and an optional prefix 0 for 1-digit dates. The 3rd, month, is pretty much the same substring problem as day. The fourth, year, will either be 4 digits, or two with an apostrophe prefix.
And between them will always be delimiting or abbreviating characters (comma, period, or whitespaces)
 
@Aaron3468 hmm.. thanks.
 
9:18 AM
@Aaron3468 but there is no terminator for line in my case.
 
@AbhishekBhatia That was for Devansh. I understand your case and I feel that you will learn the solution with more research. I've pointed you toward it, but feel free to ask a question on stackoverflow.com if you have further trouble.
Anyways, I'm off to bed. Good luck Devansh! You're off to a good start.
 
9:56 AM
lol
 
@Columbo Fun fact: "definitely for real" has the same length
IOW Cueball did a Goofball
 
10:11 AM
@milleniumbug there are plenty of options that wouldn't have ended the relationship
 
People who are sexists always use the dumbest of all women as example for all women ... <troll> as for slut shaming, I mean, if you could whoring yourself out for $100 an hour as a prostitute, why do you let men sleep you for free? Idiot! </troll>
 
@JerryCoffin If I write an LR(0) parser, I cannot use a lookahead token, right? So I have to make decisions purely based on stack and state?
 
I'm pretty sure you can look at the current token
 
current token != lookahead
IIRC the 0 is for 0 lookahead
but its been 4-5 years since my compiler class
Puppy would prob know
 
ahh, current token.
interesting.
 
10:33 AM
it's kinda hard to make a parser if you cannot look at your input...
 
10:44 AM
It's kinda hard to do homework if you're retarded
;(
 
nwp
or lazy
 
11:06 AM
@Columbo yes
 
 
1 hour later…
nwp
12:29 PM
additional interesting note: if you combine line 15 and 16 into return *reinterpret_cast<Struct *>(reinterpret_cast<char *>(&m) - offset); gcc's ASAN will complain about "runtime error: reference binding to misaligned address", otherwise it does not
(the point is getting the address of a parent struct that contains a member variable from the address of the member variable)
 
1:08 PM
@nwp So dirty. Go take a shower right now.
 
Xeo
@nwp should be okay for PODs, not sure about vtables n stuff, how those influence offsetof
 
nwp
@Xeo I assume it is fine because offsetof requires standard layout which gets static_asserted
well it doesn't in the coliru code, I evolved it a bit
 
You know. Inheritance kinda allows you to do that. A derived object is implicitly convertible to the base object. The distance to the base pointer is also this - offset_of_derived.
@nwp Does the code actually work?
 
nwp
yeah, some inheritance is fine, but member variables in the leaf class somehow isn't
not sure why that is
@StackedCrooked it doesn't assert
 
It's weird that you could get a reference to an object using a misaligned address. That would mean that the object is misaligned to begin with..
 
nwp
1:16 PM
it is missing a const overload and probably breaks on some structs with inheritance that it ought to work on
@StackedCrooked that is just an ASAN bug in gcc, clang's ASAN is fine with it
and gcc is also fine with it if you split the expression into 2 statements
 
Hm... ok.
 
nwp
I'm just waiting for sehe to come and tell me that boost::parent had this implemented since 1982 and my google-fu sucks.
 
pretty sure boost is post 1982
because otherwise it would be a C library instead
 
nwp
there might have been slight exaggerations in my statement
 
He could use private inheritance. (Since private inheritance equivalent to composition.)
But either way, what he's trying to achieve is probably misguided.
 
nwp
1:31 PM
probably, the use case I wanted it for also fell apart and doesn't actually require it
 
But I understand the sentiment. I kinda dislike it when a child object needs to store a back-pointer to its owner. Feels wasteful.
Better solution is probably to not store the pointer and instead provide it as a parameter when calling child methods.
 
nwp
My use case is a singly linked list that should support non-movable types and also allow transferring an object from one list to another, without moving it. The user doesn't know about nodes and only gives me a reference to the element, from which I need to get the node. Problem is that it doesn't help having the node because I need the parent too, so I need to traverse the list anyways. If it was a doubly linked list it would have actually been useful.
I think I'll make it a doubly linked list, just to play in the dirt for a while.
 
@nwp Seems like a case for an intrusive linked list.
 
user784668
1:46 PM
@nwp boost::intrusive::slist?
 
user784668
I.e. what std::forward_list should've been, but alas.
 
nwp
I should read up on intrusive lists, I don't know enough about them to be able to tell if they apply
 
There's this thing I'd like to try out. Composing the object hierarchy according to a specific alignment so that children can convert their own address to the index in their parent array.
 
user784668
@StackedCrooked Why the __attribute__, isn't alignas enough?
 
Sure. I'm just not so familiar with the modern syntax yet.
 
nwp
1:54 PM
@StackedCrooked interesting
gonna have issues with new
 
It does require the root object to use static storage (it's a global variable) and it can not be resized or anything. But hey, RAM can't be resized at runtime either :P
 
user784668
@StackedCrooked There's the problem of 8 KB being bigger than the page size on x86, so actually allocating 8 KB aligned shit may require inordinate amounts of padding.
 
It's 2x the page size.
I think it should align neatly to a page.
 
user784668
@StackedCrooked I'm pretty sure RAM can be hotplugged :P
 
I could be wrong though. Never done this for real. And never seen it being done elsewhere.
 
user784668
1:59 PM
@StackedCrooked But the address space allocator deals in 4k-aligned blocks, so you may need to waste a single page for padding if the returned address is not 8k-aligned.
 
I see.
 
@StackedCrooked That's a terrible plan.
 
Pff, what do you know..
 
1+1=2
 
I'm actually impressed.
 
2:02 PM
it's both true and I know it
that's even more than you asked for
although arguably it's difficult for me to know something if I also know that it's false..
 
Just need to throw in a few unit tests and it'll be fine.
I guarantee it.
 
Does anyone here contribute on github specifically in C++ ?
 
no.
 
I wanted to know some beginner repositories where I can contribute to. And I am not talking about issues reporting or documentation. Some feature addition kind of work.
 
@Fanael unless you mmap/VirtualAlloc with a specific address
 
user784668
2:08 PM
@ratchetfreak Yes, but then you have to know what addresses you can safely pass.
 
2:20 PM
or you preallocate/reserve a bunch of pages at startup (in 64 bit you can afford to)
then when it becomes time to allocate one you commit it
 
2:37 PM
Hello, does anyone know if I have to do NAT myself when using Winsock2.h or if it's handled automatically?
 
Ben
hi all.
 
Ven
you're salty
 
Ben
@Ven no? :)
 
Ven
why did you edit your message to remove the swearword towards @Puppy?
 
Ben
@Ven because it's conventional for me to join in a conversation with a greeting.
and, puppy isn't completely wrong.
 
2:45 PM
woof
 
Hello, does anyone know if I have to do NAT myself when using Winsock2.h or if it's handled automatically?
 
no
 
@Puppy Was that an answer for me
?
 
Ven
no
 
Getting lots of spam on gmail lately.
 
2:55 PM
@Ven NaCl
 
Ven
or pNaCl
 
LLVM IR
 
@Ven :P
 
oh noes (been getting stuff like this for a couple of days now)
 
lol
 
3:01 PM
mailminion.net ... sounds like a spam server
 
3:19 PM
also, another persistent spammer has found my personal email address
 
Ven
@Griwes Mh, I'm wondering. to use repe cmpsb, I need to set the length of the biggest string in ecx. However, to determine the length I need to loop on both strings... So it doesn't sound actually worth it (except if it's implemented internally as a much better than the loop I'd use).
But repe scasb on each twice to get the length+compare to know which of the two lengths is bigger, then repe cmpsb to actually compare the string.
 
Can you have bugs like array-out-of-bounds access in Haskell? Or division by zero? Etc?
 
3:58 PM
yes of course
hmm
just read a story about a protest in Britain, and the sign says "Down with this sort of thing!"
 
Holy shit, the Battle of Verdun was insane.
 
most battles are
 
This is a whole different level.
 
industrialised insanity
 
4:19 PM
enough ammunition to send a spaceship onto Mars ... :p
 
Researcher finds that Haskell beats C++ in a websockets benchmark. ... turns out the Haskell program had 98% packet loss
 
Also, wtf. The armistice treaty specifically stated French casualties at Verdun were to be buried in individual graves marked with white crosses, but Germans in mass graves marked with black crosses.
 
Kinda painful given how enthused the guy was.
 
@StackedCrooked So? 2% made it ok? :P
 
Yep.
Lucky packets.
 
4:31 PM
@StackedCrooked have you used ZeroMQ?
 
I haven't used it. It looks cool though.
 
I've been thinking of trying it out and I was wondering if anyone had exp w/ it and since you do networking stuff, I figured you may have
 
@rightfold used it
 
All those decoy C++ chats floating around need bots to make them active and attractive (to newbies)
attr-active
 
Ven
4:59 PM
@StackedCrooked i havn't been this happy in some time :)
@StackedCrooked yeah, you get something a bit like exceptions. There are however always safe variants (returning a Maybe t)
 
user1804599
@StackedCrooked ØMQ is great
 
@Borgleader ZeroMQ provides an API that works on the OS stack. My job is development of the stack that is integrated in the product.
 
5:15 PM
Ah, my bad
 
Yeah. You suck.
 
What else is new? :P
 
It's a boring anime season :(
Apart from Re:Zero of course.
Top show this season is about a guy that makes food for his daughter.
And she's annoying.
 
and the usual harem shows
 
Xeo
5:37 PM
@StackedCrooked I made you read Muv Luv, right?
 
I haven't read it yet.
 
Xeo
Hrmmm
Who was it, then?
I could swear it was either you or @Mysticial, though I don't remember Mysticial being much into VNs
 
Last one was Grisaia. Which I still haven't finished.
 
Xeo
Oct 23 '15 at 6:50, by Xeo
@StackedCrooked You played Muv-Luv Alternative, right?
I seem to have asked you before.
 
We did talk about it a few times.
 
5:54 PM
@StackedCrooked re-watch KLK
 
@AndreasPapadopoulos matchmaking so bad we won a 4v5 without doing anything special ._.
 
6:22 PM
@Xeo The only one that comes even close is Akiba's Trip, which is not a VN.
It's a beat-em-up.
 
7:09 PM
5
 
So I'm OOT for the long weekend. And I'm so not used to how damn slow my laptop is at compiling.
 
@Aaron3468 Cool. I had heard of this sport but never seen it.
Looks kinda fun actually.
 
7:52 PM
@newtgingrich This is the dumbest thing you've ever tweeted, you Hefty bag full of coleslaw.
I love it
@StackedCrooked Turns out the C++ program had 99% packet loss?
 
Nah. Only Haskell.
 
@sehe I'll take some of those next time I go bowling
 
I have some spares if you want
 
7:54 PM
You have?
 
Yeah. Spares are good, just in case. But two strikes, and you're out.
Better safe than sorry.
 
/r/anime reached 400k subscribers, nice
 
Hello, Cruel World!
 
Apparently encodings, file systems, gui, and pretty much everything outside of a language is a PITA full of edge-cases when I code for cross-platform... Time to buy a C64 and a mountain shack
But I'm just salty that I need to spend hours researching what seems to me simple at first (and which I eventually have a decent implementation for)
 
nwp
8:09 PM
I just put a unique_ptr<T> *p; in my code.
today seems to be my day of terrible code writing
 
Tiny little site that tries to turn coding competitions into a recruitment platform
 
> Distributed Systems: 1. Sri Lanka
...?
 
> Best country for Tutorials: Hungary
 
8:14 PM
> Functional programming: 1. China
 
Yep.
China is also the overall winner.
According to the slashdot article.
I should probably take this article not too seriously..
 
Honestly, it's the classic journalism move; advertise something as bigger than it really is. They aren't sampling 'The best programmers in the world'
> which countries do the best at programming challenges on HackerRank?
And of that, they don't seem to cull out the users who quit half-way into the challenges; ideally they should only sample users who've tried every challenge in a set. (Rather than naively taking the global average per country)
As I read further, I see that it's literally the kind of statistics I learned in my first-year course...
</rant>
 
Sup fellas
 
8:44 PM
Apparently no one knows that Portugal is not Spain imgur.com/gallery/py50V
@Aaron3468 I signed up once. What an annoying site
 
@StackedCrooked Hackerrank is an absolute authority. Questioning their conclusion would be like questioning tiobe.com.
 
I'll take it from you :P
Been a while since I checked tiobe.
 
Preventative Maintenance durrrrr
lol
 
It's a pimp man
 
8:58 PM
Btw sehe, thanks for your help yesterday with the lambda expressions, i hopped off the pc before i had a chance to say that.
 
Cheers
Also. That's a sturdy PC.
 
@sehe that one took me a while
 
@sehe I lol'd at the gif in this comment
 
@StackedCrooked Yeah. I hate jokes that hinge on poor grammar. But this one worked for me
 
his spelling is really horrible
@fredoverflow His voice hasn't changed a bit.
 
9:01 PM
@StackedCrooked Horibund
@StackedCrooked That's because it's the sign bit.
 
Ah. lol
So he's still positive.
Or negative perhaps.
(Uh, I hate the word e-commerce. But couldn't think of anything better.)
 
I liked this article about cross-platform code. It makes a good argument that though it helps in trivial cases, it doesn't scale very well.
 
No mention of Qt though.
 
Fair. Qt's probably the most elegant solution I've used despite its shortfallings
 
I do agree. Making a cross-platform GUI library is a never-ending endeavor.
At my first workplace a UI lib was begin developed for windows and mac. Way more time was spent on library development than on the actual software.
Would have been quicker to implement the program natively for both platforms.
 
9:10 PM
It's nice to see a tech article get in the general ballpark of being correct for a change :D
@StackedCrooked Oh man, that sounds fun ^^;
Did it work reasonably well though?
 
Actually my job was to use that library to reimplement all UIs from the old version of the software.
It was painful to learn. But in the end I got pretty good at using it.
So I suppose it did work out. I'm not sure if it was worth the investment though.
 
On one hand, they've got the benefit of consistent control over all their UI. On the other they've got the benefit of consistent control over all their UI
 
Found a screenshot. Funny this post is from 2015. I created that view back in 2007 and it still looks the same.
 
So if they make a breaking change, it leaks to all their apps! But it's certainly hard to say it was a poor decision if they write UI that often
 
@Aaron3468 Yeah. In-house library development was very common at that time.
When I left the company there were actually plans for implementing an XML parser. (Which is not a trivial endeavor if you consider DTD and stuff.)
 
9:17 PM
I wonder if that's why the view hasn't changed in 8 years ;) Shame really, because a UI library helps most when they are making more than ~3 or 4 apps each year
 
They didn't use STL as well. They had their own "basic framework layer".
 
But honestly, it's got a consistent feel and doesn't look too dated. Well-done!
 
TBH I had to implement it exactly according their spec. Zero % creativity was involved.
@Aaron3468 But thanks :)
@Aaron3468 I suppose it was just too perfect to change :P
 
nwp
why does std::next require that there is a difference_type defined -.-
 
it requires forward iterators afair
 
nwp
9:27 PM
it should just default to std::size_t
 
lolno
std::ptrdiff_t maybe
 
nwp
I don't know if difference_type makes sense for iterators for a linked list
 
@nwp I suppose they want to make it consistent with std::prev
template< class FwdIt >
ForwardIt next(FwdIt it, typename std::iterator_traits<FwdIt>::difference_type n = 1);
Hm, it seems that there's not really a requirement for difference_type. std::next just uses the iterator_traits<FwdIt>::difference_type.
So it seems like the difference_type requirement is for iterator_traits rather than std::next.
 
9:43 PM
Bravo
@StackedCrooked Funny. Where does ForwardIt come from
 
It's trying to blend in with the others.
 
@StackedCrooked that's just enormously bad. Unless they are Novell, IBM, or maybe Facebook and have some breakthrough design idea
 
Nah, it was just some weird policy.
 
Does currying give any advantages in non-FP languages?
 
\o\ /o/ \o/ python sub-functions are closures so I don't need to hack things to make this program work
@redspah They can... @for(5):foo() //executes foo() 5 times without wrapping in an if-statement
But I don't see many imperative languages that include currying like that
 
9:56 PM
Isn't this just higher order functions in general?
I don't recognize the syntax, but it looks like it could be done by taking the foo() as the second parameter
oh wait
 
@redspah Pretty much. Having a currying syntax in languages that support currying makes the code more legible. I just made up pseudo code for the sake of showing how currying can be useful
 
@for(n) returns a function object that when called with a function foo() as the argument executes foo() n times?
 
Yeah
 
got that wrong earlier
what lang even is it?
 
00:00 - 22:0022:00 - 00:00

« first day (2149 days earlier)      last day (2800 days later) »