« first day (796 days earlier)      last day (4378 days later) » 

user1174868
18:00
I am going to fail the shit out of this test
@R.MartinhoFernandes up'd stackoverflow.com/questions/13957166, should put you on at least 4
user1174868
I can't remember hwo to trick scheme into doing assignment
user1174868
I am panicking too much to read the book
@je4d Yeah, it could be, but I doubt it.
user1174868
but it doesnt even fucking matter because I wasted $2000 out of my pocket on these classes and none of them even counter for anything
18:00
@Jordan You mean set! (or is it let!)?
user1174868
yes
user1174868
but I cant get it tt work
user1174868
set!
user1174868
set it right
user1174868
(set! balance (+ balance x))
18:01
You can see how often I use assignment when I write Scheme...
user1174868
there is so much I dont know for the final
@R.MartinhoFernandes ...okay?
Shalom all ^_^
@R.MartinhoFernandes I see we are close in the hat races :-P
Is that a greeting in some language?
18:03
@R.MartinhoFernandes hebrew / english
Isn't it "peace" in hebrew?
@Neal Cześć
@Neal Ok. Hi to you too :)
@Zeta it means Hi, Goodbye, and peace
depending on the context
@R.MartinhoFernandes hola
18:05
thank you for requesting a downvote
I deliver in 2-5 seconds
@DeadMG k good :-)
@yetihehe gesundheit
@DeadMG You should create a startup "DownVote ™"
user1174868
I think I should just be a hobo
user1174868
I can't screw that up, they are suppose to fail at what they do
18:06
@Neal That was "Hi" in Polish ;)
@DeadMG Need to do that at least once to get your "noob" hat!
@yetihehe ^_^
user1174868
fuck
user1174868
my fucking counter
user1174868
wont count
18:08
I opted out of the hat stuff
The puppy hates hats. Boooooo!
@DeadMG !!! No hats?! How can you live one more day with yourself?
M*(2.71828)*r^2*(1/y)^(-1) root(x^2)*(force/acceleration) = M*e*rr*y x*mass
@Neal Well, I like to credit it to oxygen, protein, carbohydrates, fat, and water, personally.
but there are a few other critical players too
@DeadMG hmmmm
18:11
@yetihehe: arctan(1) * 4 * z^2 * \int_0^a 1 dx = pi*zz*a.
Energy company woman: sorry, we need to speak to your husband madam as the account is in his name Me: really? Woman: yes, It's Dr Mason-Bish
user1174868
I am so fucked
Now that made me hungry :/. Gonna get some pizza, later.
user1174868
if I get hit by a car will I be excused from a final?
user1174868
I think I would rather be hit by a car than take the final
18:13
Can we please skip the teen drama?
Xeo
Xeo
Puppy drama, you mean?
No.
FTR, there are better ways of readying yourself for a final than whining about it.
@Jordan My father had a teacher who after being hit by a car escaped from ambulance so that he could perform exam.
Xeo
Xeo
Oh, that drama.
user1174868
my final is in 45 minutes
user1174868
18:15
been studying for like 4 days straight
user1174868
and I cant remember a thing
Xeo
Xeo
@Jordan And what the fuck are you then doing here? Oh wait, nvm.
user1174868
trying to get an answer
user1174868
0
Q: How to make a counter with set"1"

JordanI don't know what is going on but I can't get this. I have done dozens of problems very similar but for some reason I just can't get this one. I am trying to make a counter. (define (make-counter init) (let ((count init)) ((lambda (x) (begin (set! count...

user1174868
I forgot how to do it and I can't make any sense of the documentation
user1174868
18:16
been on that one for over an hour
didn't you just get question unbanned?
user1174868
yes
user1174868
god damnit
user1174868
python is fucking hard as fuck to program in
lol
18:22
Which language do you consider easy?
user1174868
scheme is easy
user1174868
you basically tell it what to do and it does it
user1174868
in other languages you have to spend years memorizing the syntax
I am not sure what to think.
"Python is hard"... seems like an odd thing to say to a room full of C++ developers
2
18:23
Even the puppy agrees that Python is simple.
user1174868
well
@R.MartinhoFernandes congrats on the 20th hat... you are now properly in the lead
user1174868
this programming thing obviously isn't working out
2
user1174868
I am just going to move somewhere warm and be homeless for a couple years
user1174868
spent all my money paying for these classes that don't matter
18:26
@Jordan But you're having trouble with scheme?
user1174868
yes
user1174868
with assignment
user1174868
assignment doesnt belong in scheme, it is the devils magic
user1174868
the lord only intended for you to use recursion
counter = 1 <-- Python
tada!
user1174868
18:27
I dont get how that works
user1174868
if I have a predicate
user1174868
and I want to test all elements in a list against it
user1174868
if pred x
user1174868
doesnt work
user1174868
you can't explain that
18:27
I don't understand scheme in the slightest
"you can't explain that"?
@Jordan What
Are you one of those science denialists?
These are the ramblings of a madman
Fucking predicates how do they work
2
Also I own hard today
And only 24h awake :smug:
user1174868
18:28
predicates dont exist in python
2
user1174868
you have to define them yourself I think
cough
cough cough
Predicate is a boolean condition
@R.MartinhoFernandes Gesundheit
He's coughing not sneezing
user1174868
18:29
If I pray to jesus hard enough he might grant me a passing grade on my final
for var in list:
    if (pred(var)) :
        print(var)
#my first python program!
I think "predicates dont exist in python" was the biggest pile of nonsense I heard today.
# is for comments not //
@CatPlusPlus I know
@MooingDuck Fail.
@MooingDuck Use list comprehension or generators or whatever they are called.
18:30
print('\n'.join(v for v in list if pred(v)))
:v
user1174868
i dont think python uses parentheses liek that
@R.MartinhoFernandes I literally had to google how to do a for loop
2
@MooingDuck lol
@Jordan those lines are both copy pasted from python tutorials, so I'm sure they work
18:30
I'm a Python expert
Also that's a bad tutorial
@CatPlusPlus Pythonista
user1174868
Well I am off to my final
if pred(var):
@Jordan Methinks you have no freaking idea what a predicate is
18:31
Praise me
Somehow I don't imagine Jesus being good at using computers
3
user1174868
PRIME?
18:31
He's good at making alcohol though
@R.MartinhoFernandes Go Dog, Go!
And fix your Shift key. It's broken.
user1174868
and fuck you for downvoting my panic question
@Collin Why would you use a computer when you already know all the answers?
@JerryCoffin I don't think I "get" religion
18:32
Who is Jordan
@JerryCoffin Well, why bother knowing all the answers when you can ask dad?
heh, Jordan caused the starboard to refill with new content.
@Collin I don't either, but I'm working on it. Specifically, working on the part where millions of people consider me their god and (the important part) send me money and virgins.
@R.MartinhoFernandes 30ish years old and still asking dad for help? :(
It's the end of the world as we know it.... in a matter of hours now.
18:33
@Chimera Dude, it started eight hours ago.
it passed 12 AM in Australia about 7 and a half hours ago
@Chimera It's the end of the world as we know it...and I feel fine!
@JerryCoffin :-)
@Chimera Also it was cancelled in Poland
18:34
Hahaha a site with JavaScript snow causes 100% CPU spike in Chrome process
@Rapptz Kiribati is the earliest one at UTC+14.
@CatPlusPlus don't they all have javacsript?
@CatPlusPlus lmao link?
Ah, so your part of the world is fine. Maybe just the U.S.A. will be destroyed?
@Rapptz Obviously doesn't count until it gets to the part of the world where the Mayans lived.
18:34
@R.MartinhoFernandes wait, UTC+ 14?
@JerryCoffin All powerful, all knowing, all seeing, but good lord is he terrible with money
@MooingDuck What? You thought this was sane?
Days last 50 hours, son.
@R.MartinhoFernandes Did they just want to be first to everything?
@R.MartinhoFernandes I tried to google it but keep typing UTF
18:36
@Collin I think you are not far from the truth. I know there is one country that changed to be on the other side of the International Date Line so they could be first. Not sure if it was Kiribati.
In UK, waiting for club to open in 25 mins time. Gonna get ratted, just in case...
Ah, it was Samoa.
> The central Pacific Republic of Kiribati introduced a change of date for its eastern half on 1 January 1995, from time zones −11 and −10 to +13 and +14. Before this, the country was divided by the date line, and the time zone UTC+14 did not exist. This meant that the date line in effect moved eastwards to go around this country.
@R.MartinhoFernandes Looks like it, although it does put them at least on the same day as the rest of the somewhat nearby pacific islands
Hmm... should I do my backups?
18:38
> Maybe in some end of the world was going to end the world. I do not know. In any case in Poland will not be - BBN chief added.
Goddammit sharepoint, I just want to upload a new version of this document
Aaaaand Google Chrome has stopped working
COOL
@MooingDuck JS snow
20
Q: When to use volatile with multi threading?

David PrestonIf there are two threads accessing a global variable then many tutorials say make the variable volatile to prevent the compiler caching the variable in a register and it thus not getting updated correctly. However two threads both accessing a shared variable is something which calls for protectio...

lol @ accepted answer score
k I'll be back soon chrome might crash
18:41
Seriously JS snow
@yetihehe That is surprisingly good google translation ;D
@FredOverflow Hmm, I already downvoted that.
@R.MartinhoFernandes me too
No, that's kills by CONCORD
@FredOverflow yeah, I came accross that earlier. Were you searching because of the comments on that "O3 makes it segfault!" q?
18:42
Nvm, I got totally confused at first.
Can we delete that piece of junk?
can't delete accepted answers I thought
@R.MartinhoFernandes There's actually a good answer further down, score ~50
@R.MartinhoFernandes Sure, just uninstall Chrome.
@Rapptz I just put in a vote.
18:43
How did this cause a CPU spike?
@FredOverflow > the compiler is not allowed to change the order of memory access if it's declared volatile.
@MartinJames I don't use Chrome.
@Rapptz I just voted to delete (apparently successfully).
What.
Oh now I'm at 14% CPU usage, interesting
18:44
Someone got totally confused about multithreaded things.
@FredOverflow nice... :)
@Griwes The problem is that it's deceptively close to accurate -- many often think it should do the right things (including Andrei, at one time). With some (Microsoft) tool chains it does actually work too -- but it's not portable.
Is the +8 answer right in that it's safe to use a volatile bool as a flag, checking it in one thread while eventually writing to it in another?
@Collin no
@JerryCoffin As in prevents instruction reordering by compiler?
18:46
The only time I've had a real use for volatile is to get around bugs in the compiler's optimizer.
@JerryCoffin do you have a linky to that andrei stuff?
@JerryCoffin Anyway, compiler not reordering instructions is only half of MFENCE problems, so it would say exactly nothing about the problem.
@JerryCoffin If by mentioning Andrei you are talking about that smart pointer thing he wrote, he did not believe volatile had that effect.
@bamboon Not right off, no.
@Mysticial And MMIO and other system level stuff.
He basically abused volatile to get separate types, not for its actual semantics.
@Collin It's almost required when changing global variables from irq handlers
@je4d Yes.
@stefan volatile is useless for multithreading in C++. If you don't believe me, see this answer and this answer for further explanations. — FredOverflow 3 mins ago
@Griwes It's not so much about compiler reordering instructions as the CPU reordering loads/stores.
@R.MartinhoFernandes wow.
@JerryCoffin Well, they are different parts of the same (reordering) problem, so fixing just one changes about nothing (that's what I meant at the beginning).
@FredOverflow I voted to close that question after he repeatedly ignored the suggestion to make a useful SSCCE for it
Previous discussion starting here:
Mar 23 at 11:21, by David Rodríguez - dribeas
Uhm... I guess that I too did not read enough back... but I can offer a different article by the same author in the same publication if you want.... volatile: The Multithreaded Programmer's Best Friend The title alone should make you get interested once you know that it is not just a bunch of bullshit. Some people like it, some people don't, but no one has claimed that it is absurd.
Mar 23 at 11:30, by R. Martinho Fernandes
Right, he uses volatile only for its tagging properties.
And it's UB.
Mar 23 at 11:43, by R. Martinho Fernandes
> §7.1.6.1/6 If an attempt is made to refer to an object defined with a volatile-qualified type through the use of a glvalue with a non-volatile-qualified type, the program behavior is undefined.
18:50
only glvalue?
That's everything but prvalues.
yeah, but I don't really see how using a prvalue would change much
oh, wait, std::move returns xvalue, no?
How can you make that happen with a prvalue?
@DeadMG Yep. That's a glvalue.
@bamboon OK, not in the general case, but using it for a cancel flag seems to be ok, re-ordering doesn't matter, you're not signalling that something is done
I've literally never used volatile
18:52
yeah neither have I
@CatPlusPlus I've used it quite a bit in embedded code, working with hardware. I've also used it as a done flag in Java, which does provide the cross-thread guarantees for re-ordered writes
We're talking about C++ not Java
It has wildly different semantics in Java
@CatPlusPlus I have -- back in the MS-DOS days, writing device drivers for some memory-mapped devices and such. I'm sure it's been at least 10 and probably more like 20 years since I did though...
@CatPlusPlus I've used volatile in test code to see if my own remove_cv metafunction worked for all 4 cases ;)
18:55
Register is even more useless on x86 machines.
Well, if you are doing direct MMIO programming, which you probably aren't, you're probably using volatile.
@ScottW I refuse to register for your...oh, that wasn't a verb?
register will acquire a new meaning in C++14.
user142019
@FredOverflow what will it do in C++14?
18:56
@yetihehe How can it be more useless than it having no semantics attached?
@FredOverflow got a link to the proposal?
@FredOverflow I think you mean C++21
Also, static register will have an entirely different meaning, of course.
@je4d I haven't written it yet ;)
@FredOverflow lol
@Borgleader lol'd
18:56
@FredOverflow lol you trolled them good.
@R.MartinhoFernandes More useless than in avr for example. There it HAS meaning.
What is AVR?
It has no meaning in C++.
And even more useless than volatile
AVR - architecture of processors like atmegas
they have 32 registers
It's what arduinos use IIRC
It does nothing
18:58
and you can use 15 of them for anything you want
C++ is not assembly
As if number of registers mattered.
@R.MartinhoFernandes std::avr is an algorithm that computes the average of a range.
@Zoidberg'-- Haha C++14
if you define a variable register, you can assign values directly to registers
18:58
Nope
In what language?
It does nothing
in C
@FredOverflow ... in C++1y? :P
> C
> C++
18:58
@yetihehe It did in the 70s maybe.
see the difference? :D
It's a "hint" to the compiler, which most compilers nowadays go, "uh, no, I know what I'm doing"
I think it's deprecated and useless even in C
That's why I said it's useless on x86
It doesn't even do what some people think it does, which is prevent taking the address of a variable.
18:59
Lots of enter-fails today.
@FredOverflow It still does one thing in C: anything with register storage class can't have its address taken.

« first day (796 days earlier)      last day (4378 days later) »