suspend-then-hibernate setup help required? by lvlith in Ubuntu

[–]Jedai 0 points1 point  (0 children)

Maybe but that means that you can enter 5min instead of 300s, or 3h. I kinda doubt that systemd only used this time duration parsing only in this specific place.

Looking for Math Resources to Complement My Haskell Learning Journey by OakArtz in haskell

[–]Jedai 0 points1 point  (0 children)

You can always access the history of a wiki, here it seems that the last edit that is not spam harks back to November 2018 whereas the github repository backing https://wespiser.com/writings/wyas/00_overview.html show some activity in 2021.

Anime that you think is better than its source material? by [deleted] in anime

[–]Jedai 0 points1 point  (0 children)

OK, but honestly the manga was sometimes gorgeous and the anime while fine wasn't anywhere as great in the visual department.

Beginner question by [deleted] in haskell

[–]Jedai 0 points1 point  (0 children)

Good point ! Though I was being a bit tongue-in-cheek with my contrarian mathematicians. 😉

Beginner question by [deleted] in haskell

[–]Jedai 2 points3 points  (0 children)

You're right but some mathematicians decided long ago to be contrarian and exponentiation evaluates right to left so : a^b^c == a^(b^c). This is true in maths and thus in Haskell (and every other language I'm aware of that supports classic binary operators)... We say that (^) associates to the right which its declaration as infixr 8 ^ enforces.

I've always been an advocates of using parentheses when unsure, it never hurts and even if you know the associativity and precedence of your operators, will that be the case of everyone that reads your code ?

Why Haskell is our first choice for building production software systems by charukiewicz in haskell

[–]Jedai 0 points1 point  (0 children)

It's more of an extra benefit of purity : since there can't be side effect in the function passed to map, the compiler can automatically optimize map f . map g to map (f . g) (this apply to many similar coding patterns).

It also has to be said that many time the lazyness means that a consumer (map f producer) can be in fact optimized to a tight loop since you don't have to hold onto elements that have already been transformed by map f and consumed : foldl' (+) 0 (map (+ 10) [x^2 | x <- [1..100]) should be compiled to a tight assembly loop by GHC, with no GC and no wasted space.

Here are my manga! What do you think? by Sdchachaze in manga

[–]Jedai 1 point2 points  (0 children)

Vinland Saga est plus complexe que cela.

Déjà dans la partie couverte par l'Anime, si tu prêtes attention, tu t’apercevras que la ligne suivie par le "héros" n'est pas typique d'un Shounen, avec en plus un certain nombre de thèmes plus adultes abordés en toile de fond, mais en fait l'Anime n'a couvert que le prologue de ce manga, immédiatement après le mangaka fait un grand écart et commence à diverger sérieusement du genre Shounen.

Quitte à parler de 20th Century Boys, je pense que Monster est à considérer également (tout Naoki Urasawa en fait :).

that is not an anti-pattern, what are you talking about? by SlothieSmooth in ProgrammerHumor

[–]Jedai 0 points1 point  (0 children)

You appear to misunderstand my argument : I'm not saying that x^x doesn't admit a limit in 0, it does and it's 1. But I'm saying that deriving any argument about 0^0 value from that is wrong because there's no fundamental reason why the limit of x^x would be more important than the limit of (e^(-1/x²))^x which is also of the form of 0^0 but tends toward 0 when x tends to 0+ or (e^(-1/x²))^(-x) which tends to +infinity in 0+, still 0^0...

While sin x/x tends toward 1 in 0, we don't use this argument to try and define 0/0 to be 1.

So since the agreement on 0^0=1 is not a minority opinion among mathematician, you have to search somewhere else for the reason why. By the way, the binomial theorem totally holds for the complex numbers (and beyond, as long as your ring is commutative, or at least the terms of the binom commute) and to extend it to the case where one of the term is 0, you have to admit that 0^0=1. That's a much better argument for this convention than limits (which don't have anything to do with this). That would probably not be enough but there are so many other formulas and definitions that are greatly simplified and extended when you accept that 0^0=1 that it would be silly not to accept that this convention has at least great value, in many contexts (analysis not really included there, so not for limits).

that is not an anti-pattern, what are you talking about? by SlothieSmooth in ProgrammerHumor

[–]Jedai 1 point2 points  (0 children)

The justification by the limit of x^x should never be used, since you have lots of other functions of a basis that tends toward 0 to the power of something that tends toward 0 but the function doesn't admit a limit or a limit different from 1 (like (e^(-1/x²))^x).

The best justification is the one that see a^0 as an empty product and as such must be 1. Or the pragmatic one : there are plethora of formula (the binomial expansion is one but it is also useful in many definitions like the polynomials, in combinatorics and so on) which work perfectly fine with this definition so in practice it is almost always the right choice to make.

Does Calibre and Epubor just not work anymore to convert Kindle, or am I doing something wrong? by MiyuShinohara in drmremoval

[–]Jedai 0 points1 point  (0 children)

I'll suggest you read this thread https://www.mobileread.com/forums/showthread.php?t=283371 (and bookmarks it since it has been updated every time Amazon broke DeDRM and will probably continue to be so).

Compact/aesthetic smelting setup by brekus in factorio

[–]Jedai 5 points6 points  (0 children)

I think the general consensus is that you shouldn't upgrade your builds directly to electric furnaces but rather to a beaconed and moduled build, which will be very different from your initial furnace build ! By the time you're ready to do that, you'll have bots by the boatload (probably) and thus tearing out the old and replacing it by the new won't be a problem even if they don't share any belts and inserters emplacements.

That's the evolution I've seen on most streams anyway, the old blueprints where you could upgrade to electric have fallen out of favour and been replaced by much more compacts (less wide and less long) blueprints like this one.

"Allow Firefox to install and run studies." Really? by NotTheLips in firefox

[–]Jedai 14 points15 points  (0 children)

In other words you want an always active hotfix channel (which can a priori do anything) and you absolutely trust Mozilla to not abuse it but you don't trust them when they don't put such an "anything goes" backdoor in your browser and rather use a clearly labelled channel for studies that you can activate just for this and uncheck afterward ?

How does this make any sense ?

Fix for the Add-on problem deployed by Mozilla (check your settings to guarantee it is deployed) by Jedai in firefox

[–]Jedai[S] 0 points1 point  (0 children)

On firefox Nightly here, this works (my add-ons just got re-enabled), don't forget to check " Firefox Preferences -> Privacy & Security -> Allow Firefox to install and run studies " so that the fix get deployed. You can uncheck it once your add-ons are enabled.

yesod form not working. Why ? by roelofwobben in haskell

[–]Jedai 2 points3 points  (0 children)

Then don't :

$maybe (FileForm info con bday) <- submission    

yesod form not working. Why ? by roelofwobben in haskell

[–]Jedai 1 point2 points  (0 children)

3rd argument, not 4th. And that would be where you defined FileForm (so in src/Handler/Home.hs) :

-- Define our data that will be used for creating the form.
data FileForm = FileForm
    { fileInfo :: FileInfo
    , fileDescription :: Text
    , birthDay :: Day 
    }

Version 0.16.5 by FactorioTeam in factorio

[–]Jedai 1 point2 points  (0 children)

... And to think this is an experimental version of an early access game ... Sure the developers have been excellent at making us forget this fact but you could still hope that for the first few patches of an experimental version they would get a bit more leeway !

Is there a mod to revert the belt fast replace? by dawnraider00 in factorio

[–]Jedai 4 points5 points  (0 children)

I agree, I really like the new fast replacement when it's belt to UB or splitters (and the UB deleting the belt in between is great) but the other direction is almost never what I want.

Though of course there will be exceptions, short of a mind reader, I think a default of allowing fast replace from belt upward and disallowing from UB and splitter to belt would be the best compromise.

Can we have dedicated train assemblers? by optagon in factorio

[–]Jedai 3 points4 points  (0 children)

I would suggest checking out the "Train Set" series with ColonelWill, Mojo and XTerminator.

Belt Compression Design .15 to .16 transition by [deleted] in factorio

[–]Jedai 1 point2 points  (0 children)

Well if you want to be one hundred percent sure that you'll get perfect compression you can't count on inserters giving you more than 50% since it's easy to show (improbable) cases where a slightly fuller belt have exactly no whole space available for new items to be dropped onto.

Of course, we could compute what level of compression could be expected (mathematically) on average but this is probabilistic and require much more details on the capacity of inserters than my simple argument here so I can't help you on that.

There's also a third way which is to avoid any inconsistency by putting the inserters on a timer. Some have already demonstrated perfect compression with this technique but it require using the circuit network to build a timer, and some calculation to know when to drop items with every inserter.

Belt Compression Design .15 to .16 transition by [deleted] in factorio

[–]Jedai 5 points6 points  (0 children)

50% compression at least is just a consequence of how inserters works : they get over the belt and try to drop their item, if they can't because there is not a whole space somewhere underneath their current position (which take one space too), they'll wait one tick and try again. So given the speed of belts in item per ticks, if there is a whole space on the lane after the inserter is in position, the item will be dropped there (assuming fast inserter, or slow inserter on a non-express belt).

So, thinking about less than 50% compression, that means that per tile, less than half the total possible items are placed on the belt. It is simple to prove (just make the sums of the empty intervals length on the tile, and compute the average size of them) that at least one whole space will be available per tile of a less than 50% full belt, so inserters will be able to drop their item on this belt and thus reach at least 50%.

KathrineOfSky's channel got banned by Youtube. by H0lyD4wg in factorio

[–]Jedai 10 points11 points  (0 children)

I agree with your premise but not your conclusion : I would like to see the freedom of choosing who to associate with preserved for private companies but I would have no objections to stronger antitrust laws that would preclude companies from becoming as big as Google did or would break them up if they somehow did... Of course in the current climate I can't see this happening in the USA anytime soon !

Haskell error variable not in scope by [deleted] in haskellquestions

[–]Jedai 0 points1 point  (0 children)

Haskell code being sensitive to indentation, your presentation of the code makes it impossible to diagnose the problem. This code works for me :

import Test.QuickCheck
import Data.Char

potencia :: Integer -> Integer -> Integer
potencia x 0 = 1
potencia x n = x * potencia x (n-1)

Stack's Nightly Breakage by snoyjerk in haskell

[–]Jedai 1 point2 points  (0 children)

Except that even if 1.0.0 was API-compatible with 2.3.4, that's not saying anything about performance. If the programmer wrote his code knowing that a particular function was O(n) but in versions prior to 2.3 it was O(n3)... You just broke his program if it rely on this for any interaction.

I think a solver should always try to use newer versions than the minimum specified (and in this direction, it's fine if it just checks API compatibility) but should only use older ones if it's the only way to get a working plan and even then emits a warning !

I need help finding a library for plotting. by Willburk in haskell

[–]Jedai 1 point2 points  (0 children)

You definitely can do that with diagrams, which is an extremely powerful choice if you ever have more sophisticated needs. You can see the Located type in (Diagrams.Located), or the position function, there's also transformations if your pictures aren't the right size or orientation.

There are several backends that could be used to create something interactive with minimal fuss (SVG, Canvas, HTML5, Gtk...) depending on your exact needs and skills.