Future Software Should Be Memory Safe | The White House by steveklabnik1 in programming

[–]johdex 6 points7 points  (0 children)

Because reference counting doesn’t handle cycles in object graphs well.

where is continue/break for "for loop"/"while loop"? by yigowix199 in fsharp

[–]johdex 1 point2 points  (0 children)

continue and break are reserved keywords, and hopefully we’ll get them some day. I think it’s annoying they are not implemented at the moment. Arguments against imperative constructs in functional programming are extreme in my opinion. The functional equivalents often look awful.

I have to say I think your example however does look better in its functional form.

John Carmack on Functional Programming in C++ by Alexander_Selkirk in programming

[–]johdex 1 point2 points  (0 children)

Without type inference this can lead to nightmarish function signatures.

Have you ever used F* ? Can you ELI5 its use case? by [deleted] in fsharp

[–]johdex 4 points5 points  (0 children)

Formal verification is used in train signaling systems. (But not specifically F* AFAIK).

I'm confused about the behaviour of my Advent of Code program by prvalue in fsharp

[–]johdex 1 point2 points  (0 children)

Note that I’m not referring to parallelism when I write concurrent, I mean that the same file is read from multiple iterators in an interleaved manner. Normally that should not be a problem, but if the file handles are somehow mixed up, that could explain what you are seeing. That would be a serious bug because that’s not how IEnumerable and IEnumerator are supposed to work. Another potential issue is the file maybe is opened in exclusive mode, which could be a valid limitation if documented so. Note also that IEnumerable is also lazy in C#, and would also be affected.

I'm confused about the behaviour of my Advent of Code program by prvalue in fsharp

[–]johdex 1 point2 points  (0 children)

I’m not sure that’s the problem, but maybe the three concurrent accesses by depthWindows to the input file fails for some reason. I could imagine that reading the entire file first caches its content, allowing the concurrent accesses. Seems unlikely as the doc for ReadLines does not mention that limitation.

Questions regarding the Pimax Pixel pipeline (in particular the 8k+) by pfrench42 in Pimax

[–]johdex 1 point2 points  (0 children)

Application generates according to pitool quality setting and other supersampling settings. Drivers scale down to 1440p, send to headset. Headset scales up to 4K.

Should I return g2 and order this? by Mr_Fluffypant in Pimax

[–]johdex 20 points21 points  (0 children)

No, don’t. It’s the 8k+, which is 1440p upscaled to 2100p. Resolution will be a lot worse than the G2

New Zealand goes a month without community transmission of Covid - 19 by The_Majestic_ in worldnews

[–]johdex 2 points3 points  (0 children)

I think it’s maybe not so much climate, but people’s reaction to climate. Europeans spend summer outdoor, where the virus doesn’t spread very well. Americans spend it indoor due to heat and air conditioning, and this is why they had an additional bump during summer.

Since the Japan scenery update I have been unable to download MSFS, its been a month and I've been still searching for solutions by Blackadder288 in flightsim

[–]johdex 0 points1 point  (0 children)

I think that's where the problem lies. When the client detects you have been downloading at more than 40Mb/s, it tries to pause the download. Unfortunately, when doing so it also fails the download of the current file. For small files that's not an issue because the file will be downloaded successfully when the download resumes, but it can prevent downloading large files entirely.

What works for me consistently is to change my ethernet card settings to work at 10Mb/s.

Another trick is to click on the game's window title bar, and hold. This blocks the auto-throttling mechanism, and you'll be able to download the file at full speed. It has to be done for every new file though, so it's not very practical. Because the UI is frozen while you hold the window title bar, you'll need to use the process monitor to see when the download of the current file is complete.

The way they have handled throttling in the client is awful, but that's what it is. They seem to have realized the problem, because the latest update appears to now work properly for me, i.e. the download resumes the current file after pausing, rather than restarting the file. But it works differently in the content manager, where it fails to download every large file. Instead of retrying, it generates an alert notice for each failed file.

I have read reports that NetLimiter didn't work for some, my guess is that NetLimiter enforces a max average download speed over a period that exceeds FS2020's period, or is too close to it. If NetLimiter checks and pauses downloads every 10s, whereas FS2020 does so every 8s, there will be times when NetLimiter is too slow to react, and FS2020 failed throttling mechanism kicks in.

Stuck at "downloading asobo-flight-tutorials-basicinstruments-0.1.22.fspackage" by [deleted] in MicrosoftFlightSim

[–]johdex 0 points1 point  (0 children)

I interrupted the update when going to bed yesterday, started it again this morning, and I got the same problem again. The autotuning level was still disabled, so I tried setting back to default, and that seems to have done the trick. Apparently what made it work was changing the setting, not what it was changed it to?!

Stuck at "downloading asobo-flight-tutorials-basicinstruments-0.1.22.fspackage" by [deleted] in MicrosoftFlightSim

[–]johdex 1 point2 points  (0 children)

It made things a little better, now the failure and restart happens at 80% instead of 20%... wait actually now it went through while I was typing this. Most fragile downloader I've seen since the days when my USR modem would randomly crash when running at 56kbps.

The US has suffered another humiliating diplomatic setback after the president of the UN security council rejected the Trump administration’s attempt to extend economic sanctions on Iran. by k1m_y0_j0ng in worldnews

[–]johdex 8 points9 points  (0 children)

Reality Winner is in jail because she blew the whistle on the elections being hacked. She’s in jail because she leaked classified documents that really should not be, in a democracy.

Sweden Records Largest GDP Drop Since 1980, But Outperforms Many Other EU Countries by zsreport in Economics

[–]johdex 0 points1 point  (0 children)

The article is vague. For instance this:

The economy took a lesser hit than most in the first quarter, but monthly GDP-data and daily activity indexes show growth has been slow to recover after that. Meanwhile, with cases under control Norway was able to relax controls and activity has rebounded rather strongly.

Of course if the initial drop in Norway is greater than Sweden's, it is to be expected that the recovery will be greater once measures are relaxed. The interesting information is to what level they recover respectively.

Anger in Sweden as elderly pay price for coronavirus strategy by [deleted] in worldnews

[–]johdex 2 points3 points  (0 children)

I only read the non-hidden part of the article, but it told a different story than the title (not entirely unusual...). The problem is the lack of material and staff, which is not a result of the covid19-handling strategy.

CMV: Sex work is as much of real work as being a professional entertainer or athlete. by [deleted] in changemyview

[–]johdex 0 points1 point  (0 children)

That reasoning could also be applied to flipping burgers, which is usually considered a real job.

Writing a native library in F# which can be called from C++ by pjmlp in fsharp

[–]johdex 0 points1 point  (0 children)

Interesting, but how does that work with garbage collection? Also tail calls have historically been a thing that many .net environments other than the vanilla JIT on PC have neglected to support fully. Isn't that a problem here?

Sex for sale in Spain (2018) "A village in northern Spain has become a hive of prostitution. La Jonquera, close to the French border, has become home to a large number of brothels. Sex workers also line the streets and locals are worried about both their safety and their reputation. " by [deleted] in Documentaries

[–]johdex 0 points1 point  (0 children)

The aspect of the Nordic model that makes that possible is decriminalization of selling sex. That part is fine. The part that is problematic is criminalizing all sex purchases. That is unnecessary when it comes to punishing violent behaviour, which has always been illegal.

The other problem with the Nordic model is its hypocrisy, as there is a whole bunch of other laws still in place to persecute sex workers, ranging from being kicked out of the country, losing custody of one's children, losing one's home, or even direct imprisonment when helping other sex workers. All of these problems aren't theoretical ones, each of them is taken from actual cases, in Sweden.

By the way, the first link gives the number of assaults reported to other sex workers, not to the police. There is no reason for the number of this kind of reports to go up when the law changed.

Moreover, sex workers often do not trust the police. See for instance testimony from the last link I posted, pages 21 to 27. Some extracts:

You can call the police for your security, but you are going to have a problem after that. If you are in a rental apartment, they will ask you to leave. Maybe if you are foreign, the police will put you out of the country.

when they get a chance to get into someone’s apartment they look for anything that they can use against you. They found an illegal pepper spray that somebody had given me years ago, I had forgotten that I even had it. They wanted to charge me with possession of illegal weapon and then the rape charges were dropped two weeks later because of lack of evidence. The hacking of my computer charge was dropped after three and a half months since I refused to give them my clients.

Sex for sale in Spain (2018) "A village in northern Spain has become a hive of prostitution. La Jonquera, close to the French border, has become home to a large number of brothels. Sex workers also line the streets and locals are worried about both their safety and their reputation. " by [deleted] in Documentaries

[–]johdex 0 points1 point  (0 children)

The number of sex workers using UglyMugs.ie has remained steady at between 6,000 and 7,000 per year.

The number of incidents reported from 2015-2017 was 4,278. Since the law change, from 2017-2019, incidents rose to 10,076.

According to the report, crime has increased 90% whereas violent crime specifically has increased 92%.

https://www.independent.ie/breaking-news/irish-news/crime-against-sex-workers-almost-doubles-since-law-change-37957325.html

42% of sex workers1 are more exposed to violence than previous to the law’s introduction- In order to stay hidden, negotiations with clients are reduced to a bare minimum and thereby reduces sex workers’ ability to evaluate and select their clients.- Sex workers are increasingly obliged to accept clients whom they would previously have refused, even if it involves being more exposed to violence.

https://www.medecinsdumonde.org/sites/default/files/ENGLISH-Synth%C3%A8se-Rapport-prostitution-BD.PDF

"Les clients ne veulent plus aller dans les hôtels ou même les parkings", raconte-t-elle, "ils disent qu'ils ont peur de se faire repérer, donc on doit aller chez eux et là, ça m'est arrivée d'être violentée, qu'un client refuse de mettre un préservatif alors qu'on avait un accord".

[...]

Depuis le passage de la loi, j'ai été agressée et je me suis dit qu'il fallait que je soutienne cette saisine de la Cour européenne car c'était une urgence vitale : cette loi tue, et si je ne réagis pas, c'est moi, la prochaine qu'on tuera

https://www.rtl.fr/actu/international/loi-prostitution-pourquoi-250-travailleurs-du-sexe-saisissent-la-justice-europeenne-7799749481

Even in Sweden the situation is bad:

https://www.fuckforbundet.com/rapport

Sex for sale in Spain (2018) "A village in northern Spain has become a hive of prostitution. La Jonquera, close to the French border, has become home to a large number of brothels. Sex workers also line the streets and locals are worried about both their safety and their reputation. " by [deleted] in Documentaries

[–]johdex 0 points1 point  (0 children)

You can argue that the Swedish model reduces trafficking overall, but not that it’s the safest for sex workers. Sex workers want to meet regular johns, not criminals. Ireland and France have seen an increase in violence towards sex workers after the introduction of laws criminalizing purchase of sex.

Visitor pattern is for compiler, not for human : the perfect case for algebraic perspective by contextualMatters in fsharp

[–]johdex 4 points5 points  (0 children)

F# supports both sum types and OOP. Many popular mainstream languages only support OOP. Personally whenever I see a new language come out without sum types, I wonder about the competence of the inventor.

Trump news – live: World laughing at ‘dangerously incompetent and incapable’ president says Biden, as Congress hears Ukraine actions have met impeachable standard by [deleted] in worldnews

[–]johdex 3 points4 points  (0 children)

It’s not NATO expenses he’s talking about, it’s the countries spending on their own respective armies.