« first day (2193 days earlier)      last day (2738 days later) » 

3:05 PM
Wait, aren't all those parens in the return line redundant?
 
they are optional, but having to read that without parens isn't fun
 
45
Q: Efficient integer compare function

fredoverflowThe compare function is a function that takes two arguments a and b and returns an integer describing their order. If a is smaller than b, the result is some negative integer. If a is bigger than b, the result is some positive integer. Otherwise, a and b are equal, and the result is zero. This f...

 
@Borgleader More than that usually. Start with 100k. 50k goes to taxes. So you're left with 50k. Rent for anything that isn't a shit-hole is usually about 3 - 4k/month. Let's assume the upper end of that. So that's 50k - 4k*12 = 2k for the year. 2k/year isn't a lot. That's why Google provides you 3 meals a day.
 
3k rent per month? wtf? Most people I know pay less than 1k in Germany.
 
3k rent sounds about right, 50k tax doesn't though ...
50% is probably on the last few ks not the whole 100k
still, you need a car, food, pay for utility bills, clothes and maybe someone else is depending on you
4k per months rent payment on a $1.2 million property only yield 4% return - can hardly call high
 
3:24 PM
@Mysticial sounds like a Google interview question :)
 
@fredoverflow There's a reason they say the Bay Area is an expensive place to live: mostly because it is.
 
also only charging $525 on old house when I should be getting $580 a week because everything else in the area is above $610 per week ...
 
@fredoverflow I'm currently paying 2.4k/month for a 750 sqft unit in a downtown high-rise. It's absurd since it's about 2.4k more than I'd like to pay. But I don't have a choice. Either I give up my 5 min. walk-commute. Or I move into a shit-hole where my view is another person's bedroom. (the chances of that being a good thing is hit-and-miss)
 
user406009
@Telkitty Well, you also make money on the appreciation of the property.
 
but I am a charitable person ...
 
Ven
3:27 PM
By allowing other people to make fun of you?
 
@Mysticial you just have to make sure the bedroom is some hot single woman's not some hairy dudes!
 
@Mysticial 50% tax is overestimating a bit, I think. The current top tax rate in the US is closer to 40%.
 
@Lalaland can't cash on appreciation unless sell it
 
@Telkitty s/unless/until/. We all get old eventually...
 
@JerryCoffin 12k/year. I guess that's enough to pay utility bills. :)
 
3:32 PM
what I am saying is that I can spend the rents but not capital gain unless I sell it, so rent raise is much important cash flow wise than capital gain unless I sell the place
 
@Mysticial In fairness, I feel obliged to add that the tax brackets have (mostly intentionally, I think) gotten fairly out of date, so even if you're only making enough to barely scrape by (with half a dozen room mates) in the Bay area, you're still probably paying (at least very close to) the maximum.
 
I guess to be completely fair, you need to include stock and bonus as well. But the tech bonuses for entry-level developers are typically only 10-15%. As opposed to in financial services where it's usually about 100%+.
 
:'( this new project I am working on is the biggest pile of fucked up wank I've ever seen. It's just full stack of shit
 
@Mysticial only in a good year
 
user406009
@JerryCoffin That doesn't seem to match up with the facts: smartasset.com/taxes/california-tax-calculator#mTDwoGr9Rl
 
3:33 PM
until until the next financial crisis
 
user406009
100K of income doesn't bring you anywhere near the really high tax brackets.
 
@thecoshman Are you trying to complete one of rightfold's projects again?
 
@Lalaland 400k seems to be the number that I hear about a lot. But I'm not sure how true it is.
 
@JerryCoffin that'd actually be less painful
put it this way, I was glad to see a simple key=value property file :\
 
nwp
@Telkitty gah, I hate that sort of talk. Makes me feel so dumb, working for money. We should just have humanity live off interest and abolish work.
 
Ven
3:35 PM
class A { virtual f() = 0; } struct B : A {}; // I don't need a virtual dtor here, now do I?
 
no, you get one for free
@Ven sheesh, you totally ruined my joke
 
Ven
You ruined it yourself. I didn't edit that message.
 
neither A nor B have a virtual destructor
whether you need some depends on the rest of the program
 
Ven
so if B has a std::string, it won't get destructed if I delete (A*)(new B());?
 
yeah that’s UB
 
Ven
3:38 PM
oook
know what – I'll add it in. Just in case.
 
@Lalaland Their "facts" don't seem to match up very well with reality. Supporting a family of six, I'm not only paying more than they say I should be, but more than they say I should even if I was single.
 
@nwp I worked since my high school days, also worked 12 hour days. Once I had 2 jobs at the same time and worked 18 hours a day, 5 days a week. How do you think that I saved the deposit?
 
nwp
@Telkitty with free money making more free money
 
also why do we have to work harder than our ancestors? Aren't machines and computers save us for 'better' things ... like innovation?
 
nwp
machines and computers are not doing your work, people are
 
3:41 PM
@Mysticial That is ridiculous jeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeez
 
@nwp then why do we invent machines and computers for?
and all those 'unicorns' ... why do they worth billions when they pretty much create zero values to the society
 
nwp
@Telkitty to have machines and computers do our work? What does that have to do with anything?
 
they do our work so we don't have to do the same work??
 
@Telkitty I've seen a study comparing us (people in the developed world) to some who still live in parts of the Brazilizian rain forest with essentially no technology. It concluded that they work about half as much as we do.
 
it's because most of those work people in developed countries do creates no real value!!!
 
nwp
3:45 PM
I should just not discuss this, bad topic.
 
we just created a bunch of useless jobs so everyone seems working and get a slice of the pie
 
nwp
And you were clever and get your slice without doing the useless job. Makes me feel cheated.
 
@JerryCoffin to be fair, those people probably has short life expectancy
 
nwp
But that is not your problem, so whatever.
 
spend more time in child bearing/care
 
3:47 PM
@Borgleader When I was at Google, I found a lot of the people had roommates.
 
@Telkitty Could well be--I don't think the study even tried to cover that.
 
To be fair, that's pretty much the only way if you didn't want to live in a shit-hole on the other side of the bay.
I know several people I worked with who got priced out of the peninsula and into the Oakland area.
 
@Mysticial ...or live with your parents! :-)
 
@JerryCoffin That counts as roommates right? :)
 
@Mysticial Umm...I guess, in a way. I doubt it's what most people think of when you say "roommates" though.
 
3:50 PM
@JerryCoffin I think the correct term for that is, "leech".
At least the articles that I've read about the topic call it "occupying the empty nest".
 
@Mysticial Depends on whether you pay them at least some semblance of a reasonable rent, I s'pose (and to some extent on how happy they are to have you there).
 
@JerryCoffin I think my mom withdrew about 1k/month from my account during the time I was at Google.
 
@sehe This still sucks in my book
@thecoshman I fixed it with this One Weird Trick
got max points, deleted code
 
Also I built a (tiny) house and a bunch of apps, some has tons of reviews. So it's not like I don't do anything all day. In fact I need to complete company tax return in a couple of days so I don't cop another fine ...
 
@Mysticial I'd say $1k/month for renting a room is probably reasonable (maybe even slightly on the high side, though not terribly).
 
3:54 PM
@BartekBanachewicz context plz
 
@JerryCoffin It also included free laundry, free food at home. Internet, TV. Gas. Car maintenance.
 
@JerryCoffin which, his parents are probably giving it all back when he buys a property, knowing Chinese parents ...
 
@thecoshman I had to to do shortest path problem; obviously you use dijkstra for that
you need a priority queue for that
 
@Mysticial then it was way too little lol
 
which needs a comparator
that's it.
 
3:57 PM
@Mysticial Yeah, that probably puts it into the reasonable range.
 
pff car maintenance... two lower ball joints is about 2k labor + parts + tax here
 
@BartekBanachewicz IIRC you don't need that...
it's going to be more ~efficient~ to use one, but you don't need it
 
at least, on my car it is
 
@BartekBanachewicz If memory serves, it requires a slightly unusual PQ though--one where you can change the priority and rearrange the item back into the proper place quickly.
 
@JerryCoffin I think it also included my credit card bills as well. But it's not like I was spending much anyway.
 
3:59 PM
@thecoshman indeed, if all edges are equal then a Breadth first would be enough
 
@Mysticial You were a pretty cheap date, as I recall. :-)
 
stuff...
bleh
 
@JerryCoffin ooor, you can just keep pushing new nodes and mark the nodes you've already visited
 
So i had about 16 hours or so without internet.
bad tap box err... what ever.. on the cable line outside
come to find out though.. i'm the only person in the neighborhood that uses it
 
yeah, you can do it with just list of nodes, and you keep track of open/visited etc.
probably results in more looping over that list though, which can initially be improved by moving nodes from an open list to a visited list
 
Ell
4:07 PM
@BartekBanachewicz I have a Haskell question
 
rip
 
@Ell no
 
Ell
I have type Alg f = Functor f => f a -> a and data Expr k = Var Int | Plus k k
Now I want to do something similar to:
Argh
eval :: Alg Expr
eval (Var x) = x
eval (Plus x y) = x + y
But I want to specify that in this case a is Int
Is this possible?
 
@BartekBanachewicz Yeah, you can. In fact, I'm pretty sure Dijkstra originally formulated the algorithm without a PQ. A PQ where you can manipulate the priority improves performance quite a bit though.
 
congratulations, you are on the road to generalized algebraic types, and thus dependent types :)
 
Ell
4:11 PM
And what a fun road it is :D
 
@Ell you would have to give up on Alg
 
Ell
@LucDanton ah okay. Why?
I mean
I guess I could do Alg f a and specify it
 
anything with type Alg f promises not to peek 'under the covers'
 
Ell
@LucDanton I see, this makes sense
Is this parametricity?
 
yes, this is a parametricity argument
(if you start experimenting it can be easier to set aside type aliases for a moment and expand everything)
> et enregistre les adresses IP de ses visiteurs, officiellement à des fins purement statistiques.
je suis officiellement et purement pas sceptique
 
4:26 PM
@LucDanton You impure skeptic!
 
seulement officieusement
> [Small QoL Request] Anvils that don't talk.
 
@LucDanton Ah, so you're skeptical about formal methods like Z? :-)
I would have thought those were right up your alley, so to speak.
 
user1804599
GADTs are fucking awesome
 
@JerryCoffin while I do ramble about static checking a lot, ultimately it’s all about typing terms. i.e. there's still something to run
I’m also not very formal :) I leave the hard work to others
 
@LucDanton Something to...run? What? Next you'll start insisting on all that other nastiness like efficient compilation and execution, and next thing you know, we're all back to writing machine code with a magnetized needle...
 
4:41 PM
oh no I leave that to compiler writers
I especially like to throw 'QoI' around, it’s fun
 
I'm just curious, but have you ever written machine code with a magnetized needle?
The closest thing i can think of is punch cards :P
but wasn't that mostly fortran?
 
@johnathon No--and I doubt anybody else has either. It's purely a theoretical construct that goes with walking 10 miles to school, up-hill both ways, through 6 meters of snow in the middle of the summer.
 
@JerryCoffin i knew. But lets be real, punch cards are 1000 times worse than a magnetized needle.... at least with the needle you can poke the other programmer that annoys you lol
 
@johnathon Hardly restricted to Fortran--BAL, COBOL, RPG, and so on.
 
@JerryCoffin mostly ... that i dealt with. i knew a lot of COBOL was written on that old big iron
@JerryCoffin particularly in the finance fields.
 
4:54 PM
@JerryCoffin probably also a number of forgotten languages
But most of those are forgotten already. Never heard of BAL actually.
 
@JerryCoffin RPG is still used ...
i know an RPG programmer
we almost dated.. long story
 
Back in 2003 I had an RPG course in my school.
 
@StackedCrooked Rocket propelled grenade shooting course in school? :)
 
lol
 
"report generator" iirc
 
4:56 PM
@johnathon I may have mentioned him before, but early in my mad career, I (sort of) knew a guy who'd spent years writing code on manual card punch machines. He typed with two fingers. He made a fist with each forefinger sticking out (but still curved), held the arm straight up, then swung it down to slam into the chosen key (lather, rinse, repeat). He was given a terminal with a removable keyboard (back when that was expensive) because he destroyed around 3 or 4 keyboards a year.
7
 
Seems like an eccentric person.
 
@JerryCoffin actually you never have. That's rather amusing. @StackedCrooked eccentric is being very nice....
 
@StackedCrooked Oh yes, quite a few other languages--and if they're not completely forgotten, the world would be better if they were.
 
B?
 
@StackedCrooked Not as crazy as it sounds--on a manual keypunch, you really had to hit the keys hard to get a clean punch.
 
4:59 PM
Hey guys, what would you guys use to make a simple GUI for a simple program (mostly tables of data that then needs to be converted in latex)?
 
MS Excel
2
no really why does this need a program
 
Because the logic with which the latex is generated is non trivial and because I would like to distribute the program to other people that would like to use it
And also because I desperately need to go back to programming
3
I see we have a star-craze problem again
 
@JerryCoffin in my mad career iv'e worked with several indivduals who where previously empoloyed as COBOL and Fortran programmers. It's a rather delicate relationship when your both half their age and their boss.
 
@johnathon B wasn't actually all that terrible of a language, at least from what I can gather. It was pretty much exclusive to Bell Labs though. I was thinking more of things that were let out into the wild. For example, i wrote some code in a vaguely simula-like language that Control Data invented back in the '70s (or so).
 
@JerryCoffin c++ is like, c meets simula in its' original conception if irrc
 
5:02 PM
Maybe this is the chance to try out Rust :*
 
nwp
I can't get my JavaScript stuff to work :(
 
@JerryCoffin i picked B mainly because it lacked a solid type system from what I've read.
 
@johnathon Bjarne doesn't make any secret that C++ is based pretty heavily on Simula, anyway.
@johnathon It had a system consisting of one type, which was either an integer or a pointer, depending on how you looked at it. What's not solid about that? :-)
 
who needs more
:D
 
@JerryCoffin While i certainly could work with that there's no doubt in my mind that it would be both a headache and learning experience. But really, that's not far from ASM so ... perhaps not
@JerryCoffin I wouldn't want to do anything beyond pet projects with it for sure.
 
5:11 PM
@johnathon Apparently nobody did. Only a handful of programs were even written in B, and little enough value was placed on it, that (apparently) not even a single copy of the source code to its implementation survives today.
 
@JerryCoffin I bet a good portion of it's implementation survived into the first C compiler
 
@Shoe GUI? I guess I'd try Qt or GTK+. I'd also probably end up writing the app in python even though last time I tried PyQt a 5 line program segfaulted on me.
 
I'm not smart enough for programming languages that are not statically and strongly typed
 
it doesn't really matter if the program is small though
 
Never said the program would be small. I said that the GUI would be simple.
Ok, maybe I said the program is simple
But that was a mistake
Wait, maybe I can save my ass like this: simple is complicated to achieve, so the program will not be small.
In honesty I have no idea how big the program will become.
And I get anxiety writing in non guard-railed PLs
 
5:22 PM
@johnathon Depending on exactly where you draw lines, maybe (but I wouldn't be too sure of it). Although it didn't last very long, there was a "New B" between B and C, and I believe it was (at least mostly) a ground-up re-implementation. I would guess that quite a bit of the New B compiler survived into some early C compilers though.
 
@Shoe So how about C++ & Qt than? I recommend Qt Creator.
 
@JerryCoffin that makes sense. Not that anyone is going to be ripping out the B compiler from the early C compiler source code for fun or novelty, but it's just cool information to me, thank you.
2
 
I'm bored /o/
 
@АндрейБеньковский Tried it already and I remember it being boring. I think I'll go with Rust. I've been waiting for a reason to try it out for so long I can't ignore it now... even though apparently GUIs are not its strongest suits.
 
Ell
@LucDanton expanding it helped to reason about but boy it's messy gist.github.com/anonymous/ac8519351b5c9562c51c36e28a003b05
 
5:27 PM
Feels good to be back btw. Let's see how long it takes for me to go crazy again.
 
Ell
I had to translate from point free in order to substitute
 
@JerryCoffin perhaps the new b was renamed CX
err... C
 
@JerryCoffin lol. I don't recall you ordering anything fancy though. :D
 
@Ell well done
 
Is there gonna be an E language?
 
5:32 PM
@JerryCoffin I find it entirely plausible that the new B was renamed as C in the never ending quest to reduce confusion lol
@Mysticial perhaps, but havn't we moved on to things like Wide, and Rust?
 
notice the disambiguation at the top
 
LOL
 
@LucDanton My excuse is that Google was down.
 
and that you tried Bing, but didn’t notice any relevant result
 
Hey, Google and Wikipedia were temporarily suspended for apology of terrorism in France.
I could have used such an excuse :p
 
5:35 PM
wut
 
charlie hebdo ?
 
Not really. A human error they said.
 
pfft
 
@Borgleader
-10
Q: Need all the 'HELP' I can get fellow developers

8CubesStudioI have an idea for an awesome game idea that is definitely something that people would love playing but since I don't know the first thing about programming. I decided that if I was going to move forward with the idea I had, I would do it properly. I have set aside a sizable investment aside and ...

^^ When a question is so bad that commenting on it is unnecessary.
Oh and title of the day:
-9
Q: PLEASE HELP java

Patricia1231) find out 5 random number 2) get sum of all 5 number 3) check if sum is prime or not. 4) if sum is prime repeat step 1 to 3 otherwise stop.

^^ Really? 4 answers?
 
Ven
@Shoe ❤️
 
5:40 PM
@Mysticial Poor Java. Java needs help. Please help Java :(
 
@Morwenn Java has GM... that's all the help it needs lol
 
Ven
@Shoe all you need is botany
 
@Mysticial Just In case you are about to come up with a new language:the only three one-letter language names that seam to be still unused are I, M and X so plan accordingly.
 
You can't use "i" because you'll get sued by Apple.
 
Ven
Mh, I know of M and X languages at least (esoteric stuff)
 
5:44 PM
This means I overlooked them when I googled. Sorry.
 
@Mysticial For years there was debate whether the follow-on to C should be named "D" or "P"...
 
but isn't programming an esoteric activity to begin with? I know we are working to improve this, but overall it's not easy to find say a senior systems information programmer
 
'P' for 'Productive use of everyone's time' I imagine
 
@Morwenn I'll help it like a horse with a broken leg.
 
Ven
5:46 PM
@johnathon no programming is not esoteric. At all.
 
What about letter variants? There's C# and Db. Any others?
 
oh right
 
@Ven I gave it an honest thought yes
 
@АндрейБеньковский But all three of those are used in MIX. Nobody who's even attempted to study CompSci properly (l.e., using TAOCP) would dare use any of those.
 
5:48 PM
@sehe Are C# and Db necessarily the same frequency on all the common tunings?
 
@Ven that depends on your point of view, as a programmer, i would say it's not. I have more views in this world than that of just a programmer, and i can tell you that it is. Programming isn't as much of a coequally known skill such as algebra, or even calculus. There's more people in the world that know how to do calculus than there is that know how to write programs. Think about it.
 
@LucDanton "P" for the third letter of "BCPL", the predecessor to "B" (well, maybe more "inspiration" than "predecessor").
 
@Ell just type out it I guess
 
@Mysticial Here is a lot more: en.wikipedia.org/wiki/List_of_programming_languages and I suspect there are many others not mentioned on wiki too.
 
@Mysticial The C#/Db thing has given rise to lots of parodies too.
Also note that long before C# came along, Al Stevens implemented a windowing system (for MS-DOS) in C that he named "d-flat" (wrote several columns about it in Dr. Dobbs around 1990 or so).
 
6:05 PM
@JerryCoffin it was 1991, and from reading the code snipits it looks a lot like win32 api
 
@johnathon Interesting. I guess it never occurred to me that it'd be online, though I guess I should have expected it. The resemblance to Win32 is via a common ancestor: the 16-bit Windows API. One of many such derivatives. In fact, there was one ("MEWEL", if memory serves) that let you re-compile Windows programs, and produce something that ran in text mode. Ugly, but faster than Windows usually was at the time.
 
@JerryCoffin yea dobbs is all online. But it wasn't 16 bit win was it? I've got several books on the subject (a few next to my keyboard in fact) .
 
@JerryCoffin even though given it was still a primitive 16-bit API, it's quite impressive
 
@JerryCoffin it included dos.h ... i never saw a windows.h
 
@Mysticial I can for some people resistance is futile when it comes to rep :P
 
6:17 PM
I love how the GUI topic in the futural proposals forum turned into « Cairo-based 2D Graphics TS is shit anyway ».
 
@JerryCoffin books.google.com/…
@JerryCoffin and man we've came a long way "MEWL lacks some of the same things windows lacks, like formatted data entry" ... .lol
 
@johnathon Not sure what you're asking here. Do you mean: "d-flat wasn't based on 16-bit Win, was it?" If so, I think the answer is yes, it was. Win32 became public in the beta of Windows NT 3.1, release (coincidentally enough) in October 1991.
 
@JerryCoffin Not so much asking, just noting some properties of these libraries your discussing. particularly some commentry in the articles. windows 3.0 lacking formatted data entry.... I believe the author was really complaining about not having spreadsheets.
 
@johnathon I don't think I ever used MEWEL directly, but I wrote some code for Windows that somebody else was porting to run without Windows, using MEWEL. My (distant, vague) recollection was that he said it didn't usually involve much more than re-compiling.
 
@JerryCoffin i firmly remember 3.1 ....
@JerryCoffin i was a child... and did not write code on it, but i remember using it in school.
 
6:28 PM
> the Note 7 is now classified as a forbidden hazardous material
 
@JerryCoffin it wasn't too many years after that we upgraded to a 486 dx + win 95
 
@johnathon Not really spreadsheets. But quite a few windowing libraries did let you (for example) specify a regex that input had to math. Windows let you specify a few simple restrictions (e.g., digits only) but for much more than that, you had to subclass a control and handle its WM_CHAR, or something on that general order.
 
> will be subject to a civil penalty of up to $179,933
^^ I wonder how they come up with those numbers.
 
@JerryCoffin so they wanted regex ........ to a degree i feel their pain, which is why i use editors that have regex :)
@JerryCoffin and we can rejoice as it's in the standard library as well!
 
@Mysticial Probably something on the order of: law was originally written with a $100K fine, then some years later a revision was written to adjust it for inflation, based on (for example) percentage change in the consumer price index.
 
6:32 PM
@JerryCoffin and on another note, i will say restricting input to a particular format can cause havoc to users, and it's usually much easier to clean up the data in SQL than it is to expect a ton of users to quietly fight your application into doing what they need it to do.
@JerryCoffin sometimes corporate culture is too polite.
 
@johnathon I think that was probably Microsoft's idea as well. I note that the libraries/systems that provided "superior" formatted data entry have probably all been dead for at least a decade now...
 
@JerryCoffin it made it into ours.. .after i watched a sales manager try to use it i quietly ripped it out of our library, and the application she was using.
@JerryCoffin the bad part is they had used that for a year and managed to come up with ways to get the data into the system correctly......
@JerryCoffin perhaps the worst part is the intent was to help them from making mistakes , as a wrong decimal place means millions on reports....
 
I am trying to generate a three digit number that doesn't have a 8 or 9 in it and it can't start with a 0.
how can i do that?
 
Numbers don't start with 0
unless it's 0
 
@johnathon I've certainly fought with a few using ill-considered systems. One that particularly bothered me wanted me to enter a number between, say, 10 and 100 (and had a default of 10. Needed to enter 20, so I tried to back-space over the 1, and enter a 2--but as soon as I back-spaced, it kindly informed me that 0 wasn't allowed, and set it back to 10.
 
6:40 PM
@JerryCoffin argh this reminds me things
 
@JerryCoffin sounds like ATM's
 
@milleniumbug I meant that it can't be like 013 or 045
 
sometimes you could resolve it by selecting 1 and typing 2
@feen that's a matter of representation
013 is 13 commonly
 
@JerryCoffin isn't it funny how it's always money, or dates....
 
@feen Think of it as a base-8 number. You need to generate a number between 100 and 777. Convert those to decimal, and they give you your limits. Generate a number within those limits, and convert it to octal.
 
6:42 PM
oh ok
 
@JerryCoffin nice seeing through the actual problem
 
@milleniumbug replicateM 3 drawDigit
 
> Finished debug [unoptimized + debuginfo] target(s) in 204.31 secs
Holy mother, Cargo
You sure are quick for an Hello World program
 
Rusty shoe
 
3+ minutes. That gotta be a record even in C++ land
 
6:49 PM
You can run it interpreted though
 
Yes with all deps too that's alright
 
Which makes way more sense for a hello world
 
I'm getting Gdk warnings
I say fuck 'em
YOLO
 
That's GIMP yo
 

« first day (2193 days earlier)      last day (2738 days later) »