1. 3

    I’ve played a lot of Tetris and every time I do my minds eye pictures colorful blocks falling and assembling to clear lines, solving t-spins, testing different sequences and possibilities and what not. I assume that picturing the blocks happens because the game is so colorful with easily distinguishable shapes.

    Programming has fewer visually distinguishable characteristics for me. The visual part of the programming in the background faded after a year or so. The worst of it happened when I was using msn messenger and starting typing std::cout <<. Now it’s just my mind constantly churning through ideas which I know on a conceptual level how to implement. No more blocks but the feeling of trying to shove a square into an appropriately sized and shaped hole remains.

    1. 27

      This is coming from the same brilliant team who stupidly tried to hide urls for our own good.

      1. 5

        Visible URLs are a UX thing. This is much worse than that. If they actually removed alert, confirm, and prompt from same origin pages, it would cause massive breakage basically just so they can optimize their JS pipelines. It’s a really bad idea. It makes much more sense to say it doesn’t work in JS modules or something like that instead of planning for a full on breakage.

        1. 4

          Disabling alert and confirm in JS modules wouldn’t fix the concerns about scams.

        2. 3

          Who knew that promo packets would be the downfall of the World Wide Web?

        1. 8

          I don’t think I’m ever going to not hate Typescript. What’s worse is that I both feel it would most likely would keep things cleaner in the long run and it would help noobs get into my codebase more easily. It feels like a semi-enforced documentation step.

          But I hate it. I hate how it looks. I hate having a compiling step. I hate having to annotate everything. I hate how everyone thinks that you need it for modern development and that without it you’re coding in the stone ages. I hate that it’s really just suggesting types when I can just use any as void* which based on my aversion I almost always do whenever I’ve had to deal with it in the past. I even hate that the article’s author is using a ligature based font - and that one isn’t even fair.

          /rant

          If someone started a project with it I could understand why. It really does make a lot of sense. But I’ll never use it of my own free will.

          1. 3

            Some people may have thought I wrote the above rant (including about the font). What I really dislike is how it’s treated as defacto. When I see a team implement Haskell on the back-end because they value types but also strictness in managing IO, no any, and ergonomics composition for a functional code base, then say “yup, TypeScript and fp-ts is good enough for our front-end”.

            1. 2

              I mean, TS with strict mode, noUncheckedIndexedAccess, plus all the ESLint rules that forbid any and all other unsafety is getting pretty close to Haskell in terms of type safety IMO.

              1. 2

                Out of curiosity, have you used Haskell professionally?

                1. 2

                  No, although from what I gather from people who have, it’s used quite differently to Haskell in academic contexts. Much fewer weird tricks (lenses was the example they gave), and a willingness to accept IO in places where fundamentally it is necessary (e.g. managing application state shared across concurrency boundaries).

                2. 2

                  Without an IO monad, do, and composition infix operators, it not close in ergonomics.

                  1. 2

                    Well, Promise is the equivalent of the IO monad, which makes async/await equivalent to do in that domain. Not having general monads for failure or immutable state is clunky though. Composition/infix can be emulated with “fluent” object interfaces.

                    So yes, they’re obviously very different languages, but the point is that TS can be a very safe, expressive type system if you use it right.

                    1. 1

                      I’d disagree, not that your perspective of similarity is wrong, but because those differences matter a lot to me. Having seen a lot of libraries with .pipe(), et.al. all over the place, it’s very hard to read when you know the author would rather be in a language where this style is supported first-class. Comparing Promise isn’t great either: it’s not synchronous, it’s immediately evoked when constructed so many thunk it, canceling is a pain and rarely supported, and the error handling with reject and catch is a mess across libraries instead of branching Result or Either.

              2. 2

                Please note that I’ve used TS in many different contexts beyond your standard browser or node server and a portion of my frustration comes from trying to get TS running in atypical environments.

                For me TS is still frustrating with new projects. I’ve found that the configuration for getting a new TS project up and running with tests and build targets is very complex and fragile. The few times I’ve tried to start with TS I found it cost me so much time in setup that I would have been better off sticking with plain JS. In addition, I have encountered runtime errors multiple times despite compiling in strict mode and using as much typing as possible.

                Given this, I do think it does provide some minimal benefit around things like basic type and name errors being caught, that I think can be worthwhile for most projects to use.

                1. 2

                  How much experience do you have with languages that require compilation? I ask, because my experience (not with Typescript, but in general) is that I tend to dislike dynamic languages (even though I love using Lua) because the types are so loose (I learned C early on in my career). I have a table in Lua, I have no idea what can be in it, whereas in C, I know because I can look up the structure definition.

                  1. 1

                    C++, Go, and Java. Java professionally. I dislike them all equally on the typing front. If anything it would be nice if types just magically sprung up after I’ve finished writing the rough draft of the code and had no enforcement until I’ve left the code base for a while. The thing is that while I’m in the code I know what I’m doing. It’s after I come back from working on something else I’m lost.

                    1. 1

                      Have you ever used languages with whole program type inference? (E.g., Haskell, F#) That might be what you are looking for.

                1. 3

                  I’m shipping. I am finally shipping.

                  1. 17

                    In this way, suicide is not a display of weakness. In fact, it is a display of extreme conviction and strength. Even with the backdrop of mental illness, there are parts of the brain that are usually unaffected. These parts are so ancient in development, we have little conscious control of them. To attempt suicide requires overcoming conscious desires to survive. To succeed, is to overcome extreme subconscious desires. This means that, for suicide, often the smartest and most capable people are able to succeed.

                    This is wrong and I despise this paragraph. It’s not a display of weakness and it’s not a display of strength. Free from external physical factors like someone behind you waiting to chop off your head it’s a display of desperation and loneliness and it shouldn’t be mistaken for anything but. The solution to all of the problems with depression and programming or really any solitary endeavor is:

                    1. Tangible rewards that persist in real life.
                    2. More human contact and lasting relationships which are based around pointless, inefficient, wastefully, dumb fun.

                    I will scream that from the mountain tops until my throat is raw.

                    If someone does open source projects for anything that resembles admiration from their peers without getting paid for it I would suggest avoiding it entirely. It’s not healthy.

                    1. 10

                      The solution to depression you mention only works for people whom the source of depression is the lack of those things.

                      Here is a small, incomplete list of things that cause depression and may not be fixable with goals or friends: Anxiety, Bipolar disorder, chronic pain, PTSD, Schizophrenia…

                      For myself, I’ve had every reason to be happy. I’ve had amazing, supportive friends. I’ve had goals and professional success that mattered to me.

                      I’ve wanted to die since I was 9 years old. I’ve held a gun to my head too many times to count. I’ve spent my entire life pretending to okay. Until I couldn’t anymore. I had a devastating psychotic break that forever changed who I am. Fortunately, it lead to me finally getting help.

                      There are many people who haven’t made it like I have. I tried, but I couldn’t save them and ended up attending their funerals. And while everyone else was so devastated and didn’t understand, I did. I cried my tears and moved on. I hope they found peace.

                      Should anyone care to read, a bit of my own story is on my blog: https://kayode.co/blog/4106/living-with-psychosis/

                      1. 1

                        that resembles admiration from their peers

                        Does “wanting to create useful stuff for other people and being happy when people star it/find it good” fall under that ? Because then I’m fucked.

                      1. 4

                        The question is, do we really want those comments to continue to be publicly visible in those threads? Would the site still allow replies? Or would the site put the comment in “stasis” where it wouldn’t be seen unless a particular link was used, and it could not be replied to, upvoted, or flagged? I strongly doubt any good could come out of users replying to the comment by @derek-jones if it wasn’t removed after he was banned. I feel like the best solution is, as @moderan noted, to attach the content of the post or comment to the ban entry, or to the user profile as a This post was the final straw line.

                        1. 16

                          Adding in a (USER WAS BANNED FOR THIS POST) communicates quite clearly to anyone scrolling through that said behavior is not tolerated. I can, however, see why it’d also be a good idea to just delete the post: maybe the post text could be attached to the ban reason?

                          1. 3

                            So, some troll comes in and adds a comment which is basically the N-word repeated 53 times in all caps. The comment is deleted, but if we follow your suggestion, that crap is supposed to be immortalized in the modlog?

                            1. 2

                              maybe the moderator could use their discretion and say “user posted a slur 53 times”? regardless, I don’t think my idea is super great: bans are usually for sustained behavior, not for a one off message. singling out a single message as the straw the broke the camel’s back isn’t really helpful.

                              1. 2

                                Removing a comment effectively says “this content has no place here”, enshrining it in the modlog defeats that.

                                In this case, using the exact same message for the user ban and the comment removal was unfortunate, in my opinion.

                                If people feel an obsessive need to track shitty comments, each story page has a .json variant with all the comments in a nice machine-readable format. Just scan the front page, download and stuff each comment in a db, then check for diffs or deletions.

                                1. 4

                                  Removing a comment effectively says “this content has no place here”, enshrining it in the modlog defeats that.

                                  A modlog entry stating that a comment was deleted, along with the associated content, makes it crystal clear that the content isn’t welcome. The modlog entry can literally say “this is not welcome” - and even if it doesn’t, it’s really obvious that comments are deleted by mods because they’re not appropriate for the site. There’s no “defeat” - nobody using their brain is going to look at a modlog entry where it states that a comment was deleted and think that that entry condones that content - it’s literally the other way around.

                          2. 13

                            Yes we want those comments to be publicly visible but I would suggest that they only stay around in the moderation log. Not on the thread itself.

                            1. 11

                              Yes, this is the way to do it. If you just label it as “USER WAS BANNED FOR THIS POST” you’re going to attract more people to read it (rubbernecking). And leaving the content out in public will encourage certain people to go out with a bang, i.e. “I know this post will get me banned but…”

                              Retaining the message in the moderation log maintains transparency without allowing trolls to pollute the space.

                            2. 1

                              Perhaps the message can be detached, and a message copied in its place. And then the detached message can be linked in full in the moderation log?

                              That would preserve the justification why, and remove any offending terrible stuff out of public view. Nobody wants that kind of “content” in clear view on public sites.

                              Would that work @pushcx ?

                            1. 3

                              I actually chuckled. This is seriously a self aware wolf moment. This guy is so very, very close to realizing how to fix the problem but is skipping probably the most important step.

                              He mentioned single-core performance at least 5 times in the article but completely left out multi-core performance. Even the Moto E, the low end phone of 2020, has 8 cores to play with. Granted, some of them are going to be efficiency/low performance cores but 8 cores, nonetheless. Utilize them. WebWorkers exist. Please use them. Here’s a library that makes it really easy to use them as well.

                              ComLink

                              Here’s a video that probably not enough people have watched.

                              The main thread is overworked and underpaid

                              1. 7

                                The article claims the main performance cost is in DOM manipulation and Workers do not have access to the DOM.

                                1. 1

                                  if you’re referring to this:

                                  Browsers and JavaScript engines continue to offload more work from the main thread but the main thread is still where the majority of the execution time is spent. React-based apps are tied to the DOM and only the main thread can touch the DOM therefore React-based apps are tied to single-core performance.

                                  That’s pretty weak. Any javascript application that modifies the DOM is tied to the DOM. It doesn’t mean the logic is tied to the DOM. If it is then at least in react’s case it means that developers thought rendering then re-rendering then rendering again was a good application of user’s computing resources.

                                  I haven’t seen their code and I don’t know what kinds of constraints they’re being forced to program under but react isn’t their bottleneck. Wasteful logic is.

                                  1. 2

                                    The author’s point is that a top of the line iPhone can mask this “wasteful logic”. Unless developers test their websites on other, less expensive, devices they may not realize that they need to implement some of your suggested fixes to achieve acceptable performance.

                                    1. 1

                                      You’re right. I missed the point when I read into how he was framing the problem. Excuse me.

                                2. 3
                                  1. iPhones also have many cores, so that’s not going to bridge the gap.

                                  2. From TFA: “Browsers and JavaScript engines continue to offload more work from the main thread but the main thread is still where the majority of the execution time is spent.”

                                  3. See also: Amdahl’s Law

                                  1. 1

                                    Gonna fight you on all of these points because they’re a bunch of malarkey.

                                    iPhones also have many cores, so that’s not going to bridge the gap.

                                    If you shift the entire performance window up then everyone benefits.

                                    From TFA: “Browsers and JavaScript engines continue to offload more work from the main thread but the main thread is still where the majority of the execution time is spent.”

                                    This shouldn’t be the case. If it is then people are screwing around and running computations in render() when everything should be handled before that. Async components should alleviate this and react suspense should help a bit this but right now I use Redux Saga to move any significant computation to a webworker. React should only be hit when you’re hydrating and diffing. React is not your bottleneck. If anything it should have a near constant overhead for each operation. You should also note that the exact quote you chose does not mention react but all of javascript. Come on.

                                    See also: Amdahl’s Law

                                    I did. Did you see how much performance you gain by going to 8 identical cores? It’s 6x. Would you consider that to be better than only having 1x performance? I would.

                                    1. 1

                                      Hmm..if you’re going to call what I write “malarky”, it would help if you actually had a point. You do not.

                                      If you shift the entire performance window up then everyone benefits.

                                      Yep, that’s what I said. If everyone benefits, it doesn’t close the gap. You seem to be arguing against something that nobody said.

                                      Amdahl’s law … 8 identical cores? 6x speedup

                                      Er, you seem to not understand Amdahl’s Law, because it is parameterised, and does not yield a number without that parameter, which is the portion of the work that is parallelizable. So saying Amdahl’s law says you get a speedup of 6x from 8 cores is not just wrong, it is non-sensical.

                                      Second, you now write “8 identical cores”. I think we already covered that phones do not have 8 high performance cores, but at most something like 4/4 high/efficiency cores.

                                      Finally, even with an exceedingly rare near perfectly parallelisable talks that kind of speedup compared to a non-parallel implementation is exceedingly rare, because parallelising has overhead and also on a phone other resources such as memory bandwidth typically can’t handle many cores going full tilt.

                                      but the main thread is still where the majority of the execution time is spent

                                      This shouldn’t be the case … React …

                                      The article doesn’t talk about what you think should be the case, but about what is the case, and it’s not exclusively about React.

                                1. 2

                                  “The next optimization is both significant and controversial: disabling speculative execution mitigations in the Linux kernel. Now, before you run and get your torches and pitchforks, first take a deep breath and slowly count to ten. Performance is the name of the game in this experiment, and as it turns out these mitigations have a big performance impact when you are trying to make millions of syscalls per second.”

                                  Here is one highly optimized word: No.

                                  1. 2

                                    If it’s an EC2 instance running a single app server, the risk is minimal as he explains.

                                    1. 2

                                      Honest question, if you were running this server on a dedicated server, wouldn’t turning off those speculative execution mitigations be a good thing? In the author’s case since he’s on AWS it may not be super ok but on my own actual hardware? I thought it would be fine.

                                    1. 9

                                      Sailing! Made the decision to let my cycling sportive place go to someone else, so instead I’m at the sailing club racing on Sunday. Also safety officer on Saturday, hopefully if the weather is good that’ll mostly be watching wildlife and getting a suntan.

                                      And at home I need to start emptying my office. Picked up a sofa bed last week which is currently stashed in my daughters room. Office needs approximately 2/3 of the stuff in it removing (bin or loft), and the second desk taking out then I can fit the sofa in. Gets us a spare room in the house, and also gives me a sofa to work from when I’m bored of my desk (anyone else find they’re more productive if they move round the house all day?).

                                      1. 1

                                        Very neat, what kind of boats?

                                        1. 2

                                          I ended up cancelling racing as well to sort a bunch of stuff out at home, best laid plans and all.

                                          We sail dinghies regularly, my fleet consists of a Flying Fifteen, Supernova and a Topper. My daughter usually takes the Topper out, and I’ve been racing the Supernova so far this year. Hopefully got a friend coming to help crew the Flying Fifteen in the next couple of weeks, so she’ll be back in the water too.

                                      1. 3

                                        This post seems like two separate generations of programmers. I wonder how many years back you would’ve gotten the same kinds of answers for python or perl?

                                        To answer your question, I don’t because I use bash and sometimes python. Deno has been on my short list for using in order to replace python scripting though.

                                        1. 47

                                          Some of them seem to have concluded that the superiority of print debugging is some kind of eternal natural law.

                                          This looks like a strawman to me. I think that everyone would prefer a interactive, powerful, time-machine debugger. Whenever I use print debugging is when it is not worth the trouble of dealing with actually existing debuggers. I’m proficient enough in GDB, but not in PDB, so I print debug whenever I have to deal with python.

                                          Saying “but debuggers could be better” is not that interesting. My reaction is “99% of everything in computing - hypertext, screen sharing, data transfer etc. could be better, but that is not the position from which I get to decide what to use.”

                                          1. 5

                                            This looks like a strawman to me. I think that everyone would prefer a interactive, powerful, time-machine debugger.

                                            I definitely know people who sneer at the mere concept of a debugger. Or even print debugging. They just want to read and understand the code directly.

                                            1. 15

                                              Beware of bugs in the above code; I have only proved it correct, not tried it.

                                              – Knuth

                                              1. 11

                                                The most effective debugging tool is still careful thought, coupled with judiciously placed print statements.

                                                – Kernighan

                                                1. 7

                                                  Not to knock Kernighan, but he said that decades ago. We should have figured out something more effective while being just as easy to use and just as free by now.

                                                  1. 7

                                                    What has dramatically changed with debuggers over these decades? I’ve used interactive debugger in XCode recenty: it could as well be Turbo Pascal.

                                                    1. 7

                                                      The problem is Unix debuggers haven’t really caught up to Turbo Pascal. My experiences with 90’s Visual C++ have been nicer than gdb.

                                                      1. 3

                                                        The author of the post is explicitly advertising reversible debugging with rr. I guess he didn’t do it that well :)

                                                        When you hit a crash or invalid state, you can go backwards and find what caused it.

                                                        As I understand it, GDB does have reversible debugging, but it’s inefficient. rr works on x86 and Linux and is efficient. It’s impressive, but so far I’m getting by with regular GDB and IntelliJ. I would like to get in the flow with rr in the future.

                                                        1. 1

                                                          In my experience GDB’s reverse debugging is not inefficient, it just doesn’t work well. It cannot handle SSE instructions, doesn’t record the whole process tree, has issues with side effects etc. The two things I like about it when compared to RR is that you can choose to only “record” (it’s not actually a recording, as far as I understand it just forks the debugee) a small part of the program rather than the whole execution and that it works on more architectures than just x86_64. But these two advantages do not outweigh all the disadvantages it has when compared to RR, in my opinion.

                                                    2. 4

                                                      Sometimes our thoughts lead to questions, and answering those questions leads to more thoughts and more questions. Being able to answer many questions without having to rerun the entire program each time leads to more thoughts with less effort, leading to more effective debugging.

                                                      Debuggers are great is what I’m saying

                                                      1. 3

                                                        Things like rr, which is a recent thing, doesn’t work on my AMD hardware. So for the rest of us most debuggers give you the info in the reverse order… usually you need to work your way back to the problem so they don’t avoid rerunning the program.

                                                        1. 3

                                                          Things like rr, which is a recent thing, doesn’t work on my AMD hardware.

                                                          Yeah, incompatibility with AMD hardware is a serious drawback. However, initial support for AMD CPUs has been merged in the past year, so thinks are improving on that front.

                                                        2. 1

                                                          I agree about debuggers. I think Kernighan and Pike on debugging (and more) has been informative to me. I use a debugger almost daily, but I think sometimes a well placed print statement is all one needs.

                                                    3. 2

                                                      In a perfect (statically-analyzed) world debugging would be a last resort. I use print statements to contextualize myself far less often in a TypeScript or Haskell codebase than I do in say, a Python codebase where the input/output types of a function are not always documented, even at the library level.

                                                      1. 1

                                                        It this because the don’t understand debuggers or because they have “transcended” them?

                                                        1. 4

                                                          It’s because they find debuggers cause them to focus on the small problem of what is happening instead of the big-picture design problem that resulted in the bad behaviour. I think

                                                    1. 9

                                                      Going to a sewing class because I want to know how to make a bag.

                                                      Releasing a pre alpha of my website. The bag is the thing that is giving me hope right now.

                                                      1. 2

                                                        What is your site about? And let us know how the bag turned out as well ;)

                                                        1. 4

                                                          It’s an end to end encrypted chat website which tries to codify trustable interactions between identities and social groups.

                                                          Next week’s update will have a picture of the bag :D

                                                      1. 9

                                                        Part of the solution could be Subresource Integrity. You can include a content hash in each <script> or <link> tag, which the browser checks.

                                                        That only works if the <script> tag itself hasn’t been tampered with though.

                                                        (edit) Another thought: since this is an app, the HTML probably doesn’t do much besides load the JS. Maybe all the HTML you have is <script src="main.js" integrity=... >. If you wrap that up in a data URL and put it in the git repo, then if a user starts from the git repo and click the URL, they know they’re getting the right HTML because it’s actually embedded in the link (assuming they trust the contents of the git repo).

                                                        1. 1

                                                          I did not know about that standard, thx.

                                                          So if this were to be used, that means the index.html that would ideally come directly from the site itself needs to be trusted. I still feel like something needs to be separate from the site in order to verify the site’s contents or maybe the index.html is signed by the owner with the signature appended, but it still requires the public key to be held onto somewhere for validation outside of the retrieved index.html

                                                          1. 5

                                                            Hi, co-author of the SRI spec here. I have toyed with an approach that has a bootstrap-index.html page as a standalone, downloadable and widely hostable page. The page would load all of its assets through a metadata file that can be centrally hosted and versioned. Signatures would have to come yourself (web crypto? ugh). But the metadata could contain integrity metadata and you could enforce those to be in place for all subresources through a ServiceWorker.

                                                            Even though SRI is only supported in html syntax for scripts and styles, every fetch() can bear the integrity metadata. This means that you can add them on-the-fly through a ServiceWorker and have the browser verify it for you. This is a bit brittle and you have to include an escape hatch for when ServiceWorkers are disabled or the website is force-reloaded (which bypasses the ServiceWorker), but it is absolutely doable. So doable, that I have in fact started to implement it three times (though all incomplete 😬).

                                                            This might be some interesting reading non the less: https://github.com/mozfreddyb/serviceworker-sri and https://github.com/freddyb/sri-worker and https://github.com/freddyb/sri-boot.

                                                            I also created a tiny serviceworker-security challenge in 2017 where I provided a website that uses ServiceWorkers for a similar security feature to find out exactly how brittle it is. It was insightful in itself, but my experiment was a bit ill-defined and is probably worth running again. The results on using service workers for security are on my blog.

                                                            1. 1

                                                              That’s what TLS is supposed to solve. Of course, nowadays it has become much easier to obtain a signed certificate for any domain (e.g. by CA compromise) that this isn’t the foolproof solution it was [intended to] be.

                                                              1. 1

                                                                There are also certificate/key pinning. But HPKP died: hhttps://en.wikipedia.org/wiki/HTTP_Public_Key_Pinning

                                                                In the end, you have a technology mismatch here. e2e security essentially relies on the endpoints being secure and protecting the connection between them. Any kind of updates for the software jeopardizes the secure endpoint.

                                                          1. 17

                                                            This is kind of a scary thing. These predictive models are being trained on faulty data yet are being used in situations that can have a meaningful and detrimental impact on human life. I really think any model or service that uses any type of facial or human recognition should be banned from any government use until we have standard vetted data sets and testing sets, and expected results.

                                                            Who knows what else they’re missing. I thought this would be a poorly researched video but it wasn’t. Thanks.

                                                            1. 21

                                                              any model or service that uses any type of facial or human recognition should be banned from any government use until we have standard vetted data sets and testing sets, and expected results.

                                                              I think with these types of things we are making a mistakes by only focusing on governments. The reality is that for many people privately owned institutions have a bigger effect on their lives. And the shift towards the biggest power being held by private institutions is just getting stronger.

                                                              That combined with a situation where a company’s actions and ethics (at large) have less and less value, among other things, because stocks are being traded as part of bigger, combined packages (funds) makes me wonder where are heading there.

                                                              I would argue that this itself is a setup for such behaviors, reinforcing itself. It’s the classic cycles we see when fighting crime (small and large) with more violence, bigger punishments, lowering rights, alienation from society, reinforcing criminal structures. There is good, well researched/documented examples on this. Compare the War on Drugs with Norway’s successes by doing to opposite.

                                                              What I want to say by that is that this is also re-enforcing completely without AI, and likely also for other products. Think about loans. As soon as you have statistics on black people earning less on average, making it harder to repay loans, a company optimizing for profit will be less likely to give out loans to black people, thereby reducing financial options and at large reducing income.

                                                              So in short: This is an issue of systems set up to reinforce themselves. Of course AI is becoming a big part of that. And it’s also not a problem that should be fixed only for government interaction, because for many it’s not the biggest part of life.

                                                            1. 4

                                                              Honest question - has rent control ever worked?

                                                              1. 20

                                                                The rent control thing is oh so terrible that almost everyone I know now pays less. A colleague’s rent was halved b/c they were basically ripping him and his family off. Why? Because they could. The law is good for the people of Berlin!

                                                                The market has been a mess for many years, long before the rent control was put into place.

                                                                1. 3

                                                                  Also, the Mietendeckel is causing many landlords to start to dump their Altbau units so they can shift their investments to cities like Frankfurt where it’s less regulated. This has personally benefited me as I was able to buy a nicer home than I expected with the budget I planned. So, the rent controls are also benefiting people like me who want to purchase a home for personal use.

                                                                  The recently constructed Neubau units that the controls do not apply to have exploded in price, which in turn incentivizes new construction, which alleviates the fundamental problem over time. It’s still the early days, but I’m optimistic it may turn out to be a big success at actually increasing unit availability.

                                                                  1. 2

                                                                    From various other anecdotes in this thread it sounds like the actual problem is lack of supply, and neither rent control nor no-rent-control alone changes that. “Old buildings are rent controlled and new construction is not” sounds like a potential solution, will be interesting to see what happens.

                                                                  2. 3

                                                                    This is the seen vs the unseen. I live in Berlin and now pay less. I also was unable to find a new apartment even though I looked for a year. There must also be many people who don’t have any chance to come to Berlin now because trying to get an apartment is like playing roulette (for everyone, not just for evil techbros).

                                                                    Maybe the Berlin government can just slash half the prices of everything tomorrow, we’d all save a lot of money that way.

                                                                    1. 1

                                                                      That has absolutely nothing to do with rent control. It was like that before, in fact it was worse b/c there were simply no affordable places. Now you may actually find one when somebody moves out.

                                                                      Now you have crazy high prices for everything build after 2014, before you had them for everything. I fail to see how rent control made that worse.

                                                                      1. 5

                                                                        No, it was not like that before. Rentable apartment supply has shrunk to 50% of what it was before rent control, and many of those just pretend to rent out and just decline every offer, waiting for the law to be struck down so they don’t have to honor 50% undervalued contracts. When I came to Berlin 5 years ago it took one day of going to the viewing of 4 apartments and I got one. Now I can’t find one at all.

                                                                        1. 5

                                                                          No, it was not like that before.

                                                                          I have been here since 2013 and then it was already not easy. People then already stayed in their places, if they were not part of the rich “IT crowd”.

                                                                          and many of those just pretend to rent out and just decline every offer, waiting for the law to be struck down so they don’t have to honor 50% undervalued contracts.

                                                                          There is a law preventing that too, unfortunately not followed up enough.

                                                                          When I came to Berlin 5 years ago it took one day of going to the viewing of 4 apartments and I got one.

                                                                          I am sorry that I have to say this, but if you had that many options 4 years ago, you are probably part of the problem that drove the rents up. IT people like us have a ton of money and may find things affordable that the regular old Berliner can not afford. Berlin was for a long time a poor city and still is not rich. The household income for Berlin was less than 21k/year in 2019 (I could not find newer numbers quickly).

                                                                        2. 0

                                                                          It made it worse by causing (non-regulated) prices to rise even faster. https://twitter.com/andreaskluth/status/1366693336715771906

                                                                          1. 1

                                                                            Read more of the replies, the issue was that not all of the apartments were regulated.

                                                                            https://twitter.com/darren_cullen/status/1366824878960173064?s=20

                                                                          2. 0

                                                                            I think you’re right that it means that there are affordable apartments again, but I think you’re missing the fact that it has also had a dramatic effect on number of available apartments.

                                                                            It seems like a lot of landlords are choosing to not sign new contracts and/or just sell the units instead of re-renting them, so there’s been a 50-70% decline in number of new listings. So while there are affordable apartments again, there are just a lot fewer of them.

                                                                            Maybe we just have to wait out the landlords until the Mietendeckel’s legal status is settled? It will be interesting to see how it plays out.

                                                                            Is this better? I don’t know. I’m supportive anything to try to limit housing speculation. And I’m happy for all my friends with newly reduced rents. But for anyone who needs to move it makes life very difficult, and makes it a lot harder for anyone “new” to ever come to Berlin.

                                                                            Sources: Personal experience trying to find a new flat in Berlin flat this year, and a (biased) Bloomberg article that translates a study that my German language skills are not quite ready for.

                                                                            https://archive.is/l3i2w

                                                                            https://www.ifo.de/publikationen/2021/aufsatz-zeitschrift/ein-jahr-mietendeckel

                                                                        3. 2

                                                                          Really interesting to hear! I remember reading about the introduction of controls years ago and thinking it was a great idea, great to hear about it working in practice!

                                                                          1. 2

                                                                            This is interesting. Does it not create slumlords like they have in NY? Buildings where none of the amenities are properly maintained? If it takes up to a year to find a new place to live in Berlin, where do you live in the meantime? Do you have to plan every move with multiple months of notice?

                                                                            1. 1

                                                                              Sure, rent control absolutely benefits some people - the ones who are already renting.

                                                                              The economic argument against rent control (which seems to practically universal in the economics profession, regardless of political affiliation) is that this benefit comes with huge costs to future renters & people in marginal accommodation, combined with a hidden drag on the wider economy. In other words, it’s not just a transfer of wealth from landlords to current renters, it’s also a transfer of wealth from future renters to current renters & one that carries huge economic costs alongside it.

                                                                              Nobody seems to have tried Georgist land taxes instead of rent control that I’m aware of, which shows how much political power economists actually have…

                                                                            2. 4

                                                                              While interesting, probably not the best venue for this question.

                                                                              ** Edit ** Actually, if you are interested in stuff like that, I would recommend checking out the urban planning subreddit. It’s got a pretty good community by reddit standards.

                                                                              1. 4

                                                                                Depends on what you mean. If you mean ‘subsidize renters who already have an apartment at the cost of landlords, people moving in and people moving around’, then yes, it works great. I’ve been looking for an apartment for a year and wasn’t able to find one. Many landlords won’t even rent out at all in the moment because they think the rent control is illegal and will soon be reversed.

                                                                                As the article states, the solution to high rental prices is building more apartments, which is notoriously hard and costly in Berlin.

                                                                                1. 3

                                                                                  it’s working great, except for tech bros that want to move in. Exactly as intended.

                                                                                  1. 2

                                                                                    How is excluding “tech bros” “as intended” working out for regular, working-class immigrants?

                                                                                    1. 6

                                                                                      it was already hard to find a new place for them, because the struggle OP is experiencing was the norm for working-class people targeting low-price apartments. They had a ceiling above which they couldn’t go while tech-bros could. They still can, but there’s just less offer for them.

                                                                                      On the other side, working class people that already had an apartment are shielded from price growth that was pushing them away or forced them to move to smaller and smaller apartments or rooms (generating even more competition at the bottom).

                                                                                      In the movements that created political support for this rent freeze there are many organizations of immigrant workers. Due to corona I haven’t had contacts with them in a while, but I guess they are happy of their victory.

                                                                                1. 4

                                                                                  I think you should try Rust. No good reason aside from having your own point of view on a programming language that supposedly solves the pointer/memory error issue of programming without GC.

                                                                                  1. 7

                                                                                    Give asp.net core a try with C#. Good en framework, good ORM, good db support and all the goodies. Works well with VS code.

                                                                                    1. 4

                                                                                      If you prefer FP, go with F# instead. You still get to reap the benefits of .NET ecosystem. For web apps, I recommend one of the following:

                                                                                      1. 1

                                                                                        doesn’t it require an ide? edit: i guess it doesn’t really matter if everything works in the end. excuse me for being negative.

                                                                                          1. 1

                                                                                            IDE is strictly not required but dotnet5.0 apps work great with VSCode on all three platforms.

                                                                                        1. 7

                                                                                          We reinvent the error handling specification in Go+. We call them ErrWrap expressions:

                                                                                          expr! // panic if err
                                                                                          expr? // return if err
                                                                                          expr?:defval // use defval if err
                                                                                          

                                                                                          Compared to corresponding Go code, It is clear and more readable.

                                                                                          Facts not in evidence.

                                                                                          1. 2

                                                                                            I think this way is more expressive for the developer. Removes boilerplate and reduces verbosity, which is more useful for scripting type applications like the ones Go+ is intended for.

                                                                                            1. 1

                                                                                              This is probably a matter of taste. Why do you prefer the standard Go way of handling errors?

                                                                                              1. 8

                                                                                                This is probably a matter of taste.

                                                                                                Exactly my point! :) The claim doesn’t hold.

                                                                                                1. 2

                                                                                                  Don’t think the OP said they prefer the standard, just that the examples provided didn’t really support the claim that It is clear and more readable.

                                                                                                  Personally I think the more verbose form in Go is way more clear and readable, even if occasionally it feels a tad annoying to type over and over as the person writing it.

                                                                                              1. 2

                                                                                                This is going to seem like a bit if a weird question but I’ve been wondering this for a while after going toe deep into a bunch of different programming languages: Do they not all seem pretty much the same aside from the syntax? Sometimes not even that. J is cool because it’s lists n stuff but it’s still a similar logic behind it.

                                                                                                I mean, after a certain point everything seems to boil down into modify this, assign this to that, store this data here, send this data there, iterate, traverse, wrap this function/value, find this pattern and text replace then evaluate, etc, etc. I’ve looked into a couple of esoteric languages like brainfuck and INTERCAL but they’re not appreciably different either. I used to get my mind blown by the way some languages do things but now after looking at older programs, libraries and books that have already been written everything seems to be a rehash or just a reconfiguration of what already exists. It feels more like looking at a bunch of hammers than a bunch of toys.

                                                                                                I don’t really know where I’m going with this…

                                                                                                1. 4

                                                                                                  A few things:

                                                                                                  1. In the static realm, different languages’ type systems make fundamentally different guarantees. If your language’s type system makes more guarantees than another language’s, you can have more confidence in the robustness and correctness of programs written in that language.

                                                                                                  2. It’s not what the language allow you to do, it’s what they push you towards. Let’s say that, for some problem, there is a robust solution and a hacky solution. If a language makes hacky solutions easier to write, then programs written in that language are unlikely to be robust. This is somewhat related to, but yet distinct from, #1.
                                                                                                    An unlikely exemplar of this is perl. Despite its reputation for unmaintainability, I find programs written in perl tend to be rather robust and well-made. Partly, this is due its tradition of modularity and stability (in keeping with unix). But partly it’s because, since it’s so expressive, the error handling code you could have just skipped is not actually that hard to write, so you might as well write it.

                                                                                                  3. Related is what the ecosystem does for you. Perl has an excellent, robust package repository and a culture of writing high quality packages. Java has really high quality autocompletion. Common lisp’s dynamism (a language property) is taken advantage of by REPLs (not a language property), enabling an interactive development style that wouldn’t otherwise be possible.

                                                                                                  4. You may be selling syntax short.

                                                                                                  1. 2

                                                                                                    “What we currently call general purpose languages are actually domain specific languages for the domain of algorithms.” – Objective-S

                                                                                                    1. 1

                                                                                                      Kind of, ultimately we need to think about the hardware we’re running on so we end up with languages that are similar since we care (at least a bit) about execution speed.

                                                                                                      Most languages, C, Python, Assembly, Java, Go, Rust, etc, are based on playing around with register machines.

                                                                                                      Other paradigms give you different flavours.

                                                                                                      The ML family of languages give you a more usable lambda calculus which does not feel anything like a register machine.

                                                                                                      The Lisp family is based around the idea that since every expression is ultimately a tree we might as well get rid of the sugar and see what happens, then liberally salt it with a whole bunch of other ideas depending on the version.

                                                                                                      Forth et al. are based on the insane idea that since a two stack pushdown automaton is equivalent to a Turing machine we might as well program on one.

                                                                                                      The APL family is similar to register machines but you assume that most of the work will be done on long stretches of contiguous memory containing the same type, and that you can pass these arrays between as many functions as you could possibly want.

                                                                                                      Logical languages like (a subset of) SQL and Prolog are yet another way to program by giving constraints and letting the computer sort it out.

                                                                                                      Distributed languages are more about the communication between functions/machines and assuming that things will go wrong and messages lost. I’ve only used Erlang from this group.

                                                                                                      Term rewriting is another interesting paradigm that’s not at all popular, the wolfram language is the only one I know of, but I frequently write dsl based around these for maths work.

                                                                                                      There’s more but it gets difficult to decide what’s what since no language has only one idea.

                                                                                                      1. 1

                                                                                                        Term rewriting is another interesting paradigm that’s not at all popular, the wolfram language is the only one I know of, but I frequently write dsl based around these for maths work.

                                                                                                        Is there a rewrite engine you use regularly? Like Maude?

                                                                                                        1. 1

                                                                                                          No, I write most of them in Guile. It’s quite straight forward and I get access to a first class scripting language for GNU utils. The fact that the term rewriting system is also s-expression based means I can evaluate the results of whatever I do as Scheme programs when whatever transformations I want are done. Something that most other systems can’t actually do.

                                                                                                      2. 1

                                                                                                        What’s an idea to you that feels different? Not asking for a coherent, fleshed out thought here, just the vague sense in your head that’s driving some of this.

                                                                                                        Worth noting that BF and IC aren’t particularly esoteric as languages go, I’ll share some more interesting ones when it’s not 1 AM here

                                                                                                        1. 1

                                                                                                          I don’t think this is a weird question. I’ll be honest, I find most languages quite similar and quite quotidian. J and APL are probably some of the few languages I find fairly “different” from others (try building a scheduler in APL or J ;). I maintain that algorithms and data structures almost always end up much more important than a programming language. I also find both much more interesting than PL (or at least the treatment it gets here, which feels superficial.) I think the invite tree has just hit a local maximum of folks who are very interested in programming languages, so we get mostly that. I’m trying to change this by posting non-PL posts, but my language posts are much more popular than anything else I post so shrug

                                                                                                          1. 1

                                                                                                            try building a scheduler in APL

                                                                                                            Honestly, that sounds like a pretty fun exercise. People have done ‘real’ apps before, probably most notable of which is aaron hsu’s compiler.

                                                                                                            What’s hard is actually performing the context switch, but you can’t do that without help from assembly in c, either.

                                                                                                            1. 1

                                                                                                              I did it actually, but not as a first-time thing. My first attempt at anything like this was a maze solver in J. Now that was a mind-bender that’s for sure. For me, it hit the same spot as a good math puzzle does. I highly recommend the exercise, it’s tough but fun!

                                                                                                        1. 4

                                                                                                          Can someone point me any popular real-world web apps using Wasm?

                                                                                                          Also how easy is it to interoperate with existing JS libraries when you compile your app to Wasm?

                                                                                                          What language are you compiling your code to Wasm from?

                                                                                                          1. 6

                                                                                                            I think Figma uses wasm (see https://www.figma.com/blog/webassembly-cut-figmas-load-time-by-3x/).

                                                                                                            I haven’t done anything serious in wasm, but I recall it being surprisingly easy. You can have a look here, I think this is what I followed to get set up: https://rustwasm.github.io/docs/book/game-of-life/hello-world.html.

                                                                                                            I used Rust, but it’s the only non gc language I know, so I did not have much choice.

                                                                                                            1. 5

                                                                                                              I believe https://sandspiel.club/ and https://orb.farm/ use wasm, generated from Rust. There’s significant amount of JS and shader code as well though. Details in https://maxbittker.com/making-sandspiel

                                                                                                              1. 3

                                                                                                                Ok so, I could not point you to a real-world web app that is fully wasm but rather, uses libraries like libsodiumjs which is wasm. uBlock Origin also uses wasm but that’s an extension and wasm only works for extensions in firefox for some funny reason.

                                                                                                                1. 1

                                                                                                                  Check out this list: https://madewithwebassembly.com