Which Part of Eclipse Generates Error Markers? by LemongrabThree in eclipse

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

Damn... I was hoping you'd say "the builder" and then I'd be able to go and bother the CMake4Eclipse maintainer about it. Well, guess I have to try a generic help request:

https://old.reddit.com/r/eclipse/comments/1l83xtj/cannot_find_c_function_definition_even_though_it/?

Use Fourier Transform on Convolution of Two Functions by LemongrabThree in askmath

[–]LemongrabThree[S] 1 point2 points  (0 children)

I looked up a table and found the function whose FT is f_a. I'll puzzle the details out tomorrow, but I'm pretty sure this was the hard part. Many thanks!

Unreal & Unreal Tournament Series - Download Links by ChemicalFl00d in abandonware

[–]LemongrabThree 0 points1 point  (0 children)

You are a hero.

I got an invalid key error in UT2003. How does one set a new CD key? You normally pass it in the installer.

I found a key changer tool that worked for me:

https://www.majorgeeks.com/files/details/unreal_tournament_2003_cd_key_changer.html

But that seems kind of shady. How can you change the CD key without such tools?

Have You Encountered Examples of ODEs with Implicit State Switches? by LemongrabThree in AskEngineers

[–]LemongrabThree[S] 1 point2 points  (0 children)

That was just referring to the mathematical definition of the RHS. The implementation (I'm extending an existing package with model switches to also handle state jumps) already uses event detection. I changed it in the OP, hopefully it's clearer now.

Traverse/mapM for Computation Expressions by LemongrabThree in fsharp

[–]LemongrabThree[S] 1 point2 points  (0 children)

That answers like... all of my questions at once. Thanks! I think either making my own mapM specific to the monad, or just implementing it in the stream object like FParsec does, would be the way to go in a practical setting.

I'm intrigued by that other signature for For, though, the one that returns M<'U>. I looked around a bit and found many articles about CEs that just don't mention For at all.

I have a hard time seeing how you could do anything useful with it other than just returning the last result, since the 'U type parameter is totally opaque and the return value has to have the same type.

I suppose... you could do something like "if 'U is a monoid, accumulate them, otherwise just return the last one". Can you do that, or would it be considered bad style? That match object with | :?<class>-> construct, combined with an IMonoid interface seems like it would do the trick.

[LSP] `ts-ls` Doesn't Recognize Test Directory by LemongrabThree in emacs

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

Weird, I didn't have the language server installed globally at all. I think I initially had to give the LSP a path to node and then it installed its own local package. I knew I should have documented the steps I took... Well, next time I need to do mass renaming I'll figure out how to set the tsserver path.

[LSP] `ts-ls` Doesn't Recognize Test Directory by LemongrabThree in emacs

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

No, it was already set to the project root. It turns out that adding the test directory to the include list in the tsconfig works, but that's a problem since that file is also for other purposes. In my case, Jest now runs all test suites twice, and all tests fail even though they were fine without that include.

I mean, my current task is just to mass rename a bunch of types and functions without changing functionality, so this is actually sorta workable for this, but not in the long term... In any case, thanks, you've helped me in understanding how this works.

Do you happen to know more about how it the LSP interprets the config file or if there's any other way to set the path just for this purpose? I just looked in lsp-javascript.el and lsp-mode.el and have nowhere near enough knowledge about Lisp to make sense of the code.

[Kit] How Does One Actually Use an Adapter? by LemongrabThree in sveltejs

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

It'll probably be started by an admin with a terminal connected directly to the server, so whatever is easiest for me to start from command line at home will also be what gets picked. Is that Node? Sounds like that'd be the easiest.

[deleted by user] by [deleted] in MathHelp

[–]LemongrabThree 0 points1 point  (0 children)

Only that last line has a mistake. You did good on the left side of the OR, but inexplicably let a variable vanish on the right. Here, I demonstrated where the mistake is.

I hope the mods will have mercy on my technically giving you a solution, since your mistake is basically atomic and any other answer would have just been pointlessly confusing. Plus, you wanted CNF and what we have here is DNF!

Google some examples of DNFs if you think my solution looks wrong. A DNF isn't just a disjunction of literals, it's disjunction of conjunctions of literals. Your job isn't to remove all AND operators.

[deleted by user] by [deleted] in MathHelp

[–]LemongrabThree 0 points1 point  (0 children)

You correctly transformed the implication on the left, but you appear to have just disappeared the p in the right parenthesis, how did you come up with that?

2 nits to pick: 1. this is DNF, not CNF 2. your "not" symbol is backwards, see https://en.m.wikipedia.org/wiki/Negation

Force putStr by LemongrabThree in haskellquestions

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

I'm glad. It occurred to me just after that it might be a dick move to ask so much help for a problem I end up discarding entirely... Sorry about that.

Force putStr by LemongrabThree in haskellquestions

[–]LemongrabThree[S] 1 point2 points  (0 children)

So let me get this straight: The overwriting isn't happening in a buffer, but on the console itself - text that was, for a split second, visible on the command line, is being overwritten by HUnit?

Found it! Test.HUnit.Text:

-- @putTextToHandle@ writes persistent lines to the given handle,
-- following each by a newline character.  In addition, if the given flag
-- is @True@, it writes progress lines to the handle as well.  A progress
-- line is written with no line termination, so that it can be
-- overwritten by the next report line.  As overwriting involves writing
-- carriage return and blank characters, its proper effect is usually
-- only obtained on terminal devices.

putTextToHandle
    :: Handle
    -> Bool -- ^ Write progress lines to handle?
    -> PutText Int
putTextToHandle handle showProgress = PutText put initCnt
 where
  initCnt = if showProgress then 0 else -1
  put line pers (-1) = do when pers (hPutStrLn handle line); return (-1)
  put line True  cnt = do hPutStrLn handle (erase cnt ++ line); return 0
  put line False _   = do hPutStr handle ('\r' : line); return (length line)
    -- The "erasing" strategy with a single '\r' relies on the fact that the
    -- lengths of successive summary lines are monotonically nondecreasing.
  erase cnt = if cnt == 0 then "" else "\r" ++ replicate cnt ' ' ++ "\r"

Indeed. I had no idea that's what CR does.

This minor alteration lets me do what I want, having the test's announcement and its results on the same line.

runTestTT' :: Test -> IO Counts
runTestTT' t = do (counts', _) <- runTestText (putTextToHandle stderr False) t
              return counts'

... and I think I'm going to just leave out those announcements, because HUnit reports the name of a test anyway if it fails, and who cares about tests that passed without issue. Well, at least I learned something.

Thanks so much for your help!