|
getting mercilessly destroyed as a programmer and as a human being is the number two reason i would not want to work on the linux kernel. having to write mission-critical C code is numero uno
|
# ? Oct 5, 2015 16:37 |
|
|
# ? Jun 8, 2024 20:11 |
|
my feelings are clearly the most important thing
|
# ? Oct 5, 2015 16:45 |
|
edgy
|
# ? Oct 5, 2015 16:50 |
|
if you think making GBS threads on people creates better work, you should kill yourself
|
# ? Oct 5, 2015 16:55 |
|
well, my parents were emotionally abusive and i turned out perfect, so clearly
|
# ? Oct 5, 2015 16:59 |
|
has anyone started a coding collective to rewrite the linux kernel in rust yet? i'll make the code of conduct
|
# ? Oct 5, 2015 17:02 |
|
I didn't quote the bit at the bottom where she says she's going to stay off the internet for the next few days because you know how angry nerds are going to respond
|
# ? Oct 5, 2015 17:06 |
|
Luigi Thirty posted:I didn't quote the bit at the bottom where she says she's going to stay off the internet for the next few days because you know how angry nerds are going to respond good call
|
# ? Oct 5, 2015 17:11 |
|
look, i dunno about you put standing up on the breakfast table and making GBS threads everywhere is a normal process. look, the guys are just blowing off steam, i know it's a bit lovely, but this is how the big boys work in the big world. we've tried to accommodate your feelings, heck, piss-only-thursdays has been a great success, but we all came here to do make a good product, and you can't make an omelette without cracking a few eggs, and you can't make good software without telling other people that they're wrong, loudly, and scoring points. meritocracy is not a team game. you've being far too sensitive and you're bringing down morale with your complains and negative attitude. you need to join in the fun, roll with the punches, and poo poo on the breakfast table.
|
# ? Oct 5, 2015 18:01 |
|
being a jerk doesn't make you good at programming, but you do get to feel awfully smug when you tell people they're wrong i mean, how else is everyone going to know you're right? i mean you didn't write any documentation
|
# ? Oct 5, 2015 18:03 |
|
tef posted:look, i dunno about you put standing up on the breakfast table and making GBS threads everywhere is a normal process. look, the guys are just blowing off steam, i know it's a bit lovely, but this is how the big boys work in the big world. https://www.youtube.com/watch?v=urSubeOywus
|
# ? Oct 5, 2015 18:06 |
|
tef posted:being a jerk doesn't make you good at programming, but you do get to feel awfully smug when you tell people they're wrong cf. thomas figg's php talk from some edinburgh programmer meetup
|
# ? Oct 5, 2015 18:11 |
|
https://www.youtube.com/watch?v=co_DNpTMKXk
|
# ? Oct 5, 2015 18:11 |
|
.
|
# ? Oct 5, 2015 23:44 |
|
same, Mr Dog. same
|
# ? Oct 6, 2015 01:05 |
|
i had to concatenate a lot of strings in javascript today normally with immutable strings you'd either want to use some sort of string builder or save them up in an array for a single concatenation call, so a 'correct' solution might be: code:
code:
so you can either do it the 'correct' way and be some hundred milliseconds slower on good browsers, or do it the naive way and take several minutes on ie8 and other rando browsers or more likely figure out a way not to do this in javascript
|
# ? Oct 6, 2015 02:55 |
|
suffix posted:i had to concatenate a lot of strings in javascript today doesn't JavaScript have promises, do it both ways and use whichever returns first
|
# ? Oct 6, 2015 03:04 |
|
heads you lose. tails you lose
|
# ? Oct 6, 2015 03:23 |
|
fritz posted:doesn't JavaScript have promises, do it both ways and use whichever returns first oooommmmmgggg lol
|
# ? Oct 6, 2015 03:28 |
|
Blotto Skorzany posted:cf. thomas figg's php talk from some edinburgh programmer meetup yep i'm a big jerk
|
# ? Oct 6, 2015 03:31 |
|
the trouble with high-level languages is you need to write an AST rewriter for your code to be able to reason about what it will actually do
|
# ? Oct 6, 2015 03:35 |
|
the reddit peanut gallery is the worst https://www.reddit.com/r/linux/comments/3nksp0/closing_a_door_the_geekess/cvp0eso?context=1
|
# ? Oct 6, 2015 03:38 |
|
Max Facetime posted:the trouble with high-level languages is you need to write an AST rewriter for your code to be able to reason about what it will actually do http://asmjs.org/spec/latest/ HEHEHEHEHEHHE
|
# ? Oct 6, 2015 03:43 |
|
Suspicious Dish posted:the reddit peanut gallery is the worst Reddit posts belong in the HN thread.
|
# ? Oct 6, 2015 03:44 |
|
sarehu posted:Reddit posts belong in the HN thread. why would i read the hn thread
|
# ? Oct 6, 2015 03:49 |
|
string concatenation being loving expensive in java is p. stupid tbqh, only some kind of stockholm syndrome that makes the explicit stringbuilder poo poo seem acceptable
|
# ? Oct 6, 2015 09:38 |
|
Cybernetic Vermin posted:string concatenation being loving expensive in java is p. stupid tbqh, only some kind of stockholm syndrome that makes the explicit stringbuilder poo poo seem acceptable this isn't the terrible programmer thread
|
# ? Oct 6, 2015 09:58 |
|
Assume we're on a 32-bit platform. Maybe "size" should be a 31-bit unsigned integer type ranging from [0, 2^31). Then, when you subtract two sizes, you get a signed 32-bit integer. There are no implicit integer conversions. Discuss.
|
# ? Oct 6, 2015 11:28 |
|
sarehu posted:Assume we're on a 32-bit platform. Maybe "size" should be a 31-bit unsigned integer type ranging from [0, 2^31). Then, when you subtract two sizes, you get a signed 32-bit integer. There are no implicit integer conversions. edit: also you wouldn't be able to subtract two sizes and then use the result as a size, even though the (absolute) difference between two sizes is still intuitively a size
|
# ? Oct 6, 2015 12:01 |
|
Volte posted:It's one thing for a negative size to be invalid semantically, but its a whole other ballgame for it to be invalid syntactically. What does this have to do with syntax? Volte posted:Negative sizes as arguments to an operation could easily be interpreted as an intention to perform the opposite operation (eg, shrink instead of grow), so why eliminate that option for seemingly no benefit? For that, you would use the signed 32-bit type that you get when you subtract two sizes. Let's say it's named ptrdiff_t or diff, or ssize_t or something else that isn't int32_t. Volte posted:edit: also you wouldn't be able to subtract two sizes and then use the result as a size, even though the (absolute) difference between two sizes is still intuitively a size You could, by converting the value back to a size.
|
# ? Oct 6, 2015 12:34 |
|
sarehu posted:What does this have to do with syntax? sarehu posted:For that, you would use the signed 32-bit type that you get when you subtract two sizes. Let's say it's named ptrdiff_t or diff, or ssize_t or something else that isn't int32_t. sarehu posted:You could, by converting the value back to a size.
|
# ? Oct 6, 2015 12:51 |
|
Volte posted:A negative size is inexpressible in the syntax of the language. I don't know what this even means. Whether you can make a negative size or not has nothing to do with syntax at all. Volte posted:But then you aren't using the size type at all and its existence (or non-existence) is moot. Yes you are, because values of type size can't be negative, and values of type ptrdiff can be. Volte posted:If the conversion has to be done by the user and cannot be validated by the type system (i.e., what if you try to convert a negative size?) then I don't see what this new type offers at all, other than a bunch of new syntactic overhead. If you try to convert a negative value to a size, you get an error.
|
# ? Oct 6, 2015 13:39 |
|
Cybernetic Vermin posted:string concatenation being loving expensive in java is p. stupid tbqh, only some kind of stockholm syndrome that makes the explicit stringbuilder poo poo seem acceptable I thought the '+' operator gets optimised into string builder now
|
# ? Oct 6, 2015 13:51 |
|
Cybernetic Vermin posted:string concatenation being loving expensive in java is p. stupid tbqh, only some kind of stockholm syndrome that makes the explicit stringbuilder poo poo seem acceptable strings are immutable in java so that's why its a thing. but if you want to be lazy just use like java 1.6+ cause the complier will detect some kinds of string concatenation in loops and replace it w/ string builder.
|
# ? Oct 6, 2015 14:13 |
|
Shaggar posted:strings are immutable in java so that's why its a thing. but if you want to be lazy just use like java 1.6+ cause the complier will detect some kinds of string concatenation in loops and replace it w/ string builder. it is a pretty weak reason though, just being a bit lazy in general about it would be easy to do and could be done fairly safely, just keeping a collection of strings until some linear operation both motivates and hides the effort of realizing the concatenation. an argument could possibly be made that deferring it is a bit dangerous to legacy software which does a *lot* of concatenations and then performs an indexof/charat in a fantastically performance-sensitive part of the system, which is the only O(1) operation on a string as it stands, since some more work would need to be performed at that point, but such software is effectively already making assumptions about gc so w/e i rather suspect that this is mostly a matter of not invalidating a bunch of old hotspot optimizations which rely on the internals of the current string implementation (as well as general inertia), but it is pretty clearly a bit of an overly primitive gotcha detail that java otherwise retains rather few of
|
# ? Oct 6, 2015 14:45 |
|
sarehu posted:I don't know what this even means. Whether you can make a negative size or not has nothing to do with syntax at all. sarehu posted:Yes you are, because values of type size can't be negative, and values of type ptrdiff can be. sarehu posted:If you try to convert a negative value to a size, you get an error.
|
# ? Oct 6, 2015 15:11 |
|
It doesn't overdefine size, negative sizes are absurd and your proposed use for them to reverse operations is a dopey footgun
|
# ? Oct 6, 2015 15:22 |
|
Hrm. I was just wondering how overflow-checked subtraction of type (u32, u32) -> i32 could be implemented. It turns out overflow happens if SF != CF (those are the sign flag and the carry flag). Unfortunately there's no condition code for that with Intel.
|
# ? Oct 6, 2015 15:28 |
|
Volte posted:Yes it does. Writing -1 where a size is expected becomes syntactically invalid. Volte posted:Begging the question. Edit: Volte posted:Restricting the very notion of a size to be a positive integer seems like an unnecessarily heavy thing to do. It's one thing for a negative size to be invalid semantically, but its a whole other ballgame for it to be invalid syntactically. Negative sizes as arguments to an operation could easily be interpreted as an intention to perform the opposite operation (eg, shrink instead of grow), so why eliminate that option for seemingly no benefit? Do you even program? Sizes are already unsigned in C or C++ or other languages with size types. sarehu fucked around with this message at 15:36 on Oct 6, 2015 |
# ? Oct 6, 2015 15:32 |
|
|
# ? Jun 8, 2024 20:11 |
|
Blotto Skorzany posted:It doesn't overdefine size, negative sizes are absurd and your proposed use for them to reverse operations is a dopey footgun
|
# ? Oct 6, 2015 15:36 |