GHC 7.10.1, Leksah 0.15.0.1 debugging problems - leksah

I have a series of questions relating to debugging in Leksah, which does not seem to work, or maybe it is only me who is not using it correctly. I don't know.
I present the questions in a screencast because it is much more clearer to present it like that then in writing+pictures : https://www.youtube.com/watch?v=KeB8j_Viwrg
Main question : is this buggy behaviour of Leksah or is it only me who is not using it correctly ? If it is latter, how should I use the debug features correctly ?

Thanks heaps for making this video, it makes it much easier to follow what is going on!
I think the problem is that Haskell is really lazy. When you evaluated n at the very start of the debug session (before the video starts but you can see it in the log pane at the start of the video) n was replaced with the result (in this case 17). When you ask it to step into it there is nothing left to step into it is as iff you just had n=17 in the code.
Try restarting the the debug session or pressing Ctrl+B to force a :reload of the code. After you do this n should be an unevaluated thunk again and you should be able to step through it or set breakpoints in code it uses.

Related

IntelliJ/PhpStorm - How to use IDE scripting engine as a GitHub Copilot completion capture/fix?

I've been trying to find any type of documentation or examples on how to use the "IDE scripting engine" (or other quick methods of enhancing PhpStorm/IntelliJ IDEs) and found literally nothing that works.
I'm hoping for a bit of a guideline, maybe a snippet that leads in the right direction.
What I want to do:
When pressing Ctrl + Tab (shortcut for GitHub Copilot completion) I want my custom-script to wait for the completion to be inserted into the IDE code.
I want to immediately remove the code again and display it as a completion suggestion (should be quick).
Now I want to press a shortcut to accept the completion word by word until finished.
The possibly biggest problem of Copilot with countless of bug/feedback/feature reports since 2021 is that it inputs tons of code when people just want a tiny part. Like half a line. So users of it are forced to accept 12 lines of bad code, remove all the bad parts.
The reason probably is their marketing, they take those 12 lines (11 of them garbage) as efficiency improvement (12 lines of code accepted). So they don't fix it.
I want to fix it using the above method, the easiest approach would be the most welcome one.
Here is the only available data on the IDE Scripting console:
https://www.jetbrains.com/help/idea/ide-scripting-console.html
However, none of the examples even worked and there are barely any.
Here are the linked examples:
https://gist.github.com/gregsh/b7ef2e4ebbc4c4c11ee9#file-samples-groovy
Nothing of that worked either, various errors usually already in the first "imports" and no examples in "javascript"
Here is the finished code, I switched to Kotlin and from the dysfunctional scripting console to "LivePlugin".
https://github.com/cmp-nct/Stewardess
Stewardess takes over the completions through a new shortcut and plays them in word by word.
Also shows the Copilot internal status as temporary hint notification when it changes.

What exactly happens when you press the "play" button in Unity?

As soon as you hit "Play" what happens in the background of the software? The code is already compiled and ready at this point. So when I press "Play" the code gets executed. What other things occur along with this?
I have this question as an assignment and would really like to know. Thanks. :)
Actually everything is loaded by script. This graph explains the process. Also the links below can be useful for you to understand all the background process.
Execution Order of Event Functions
Overview: Script compilation
Asking what happens when you press Play is like asking Coke to reveal the drink recipe. This is what they sell. You got that as assignment, fact is you can say anything and your teacher would lie to tell you wrong, since he does not know either (except if he works for a company that bought the source code of the engine).
What you can say, is that the OpenGl/DirectX API is initialised, registration of all event to the OS like Input, application data and so on, then all the Engine functioning, registering of the needed classes in memory, init of the physics, parsing of the opening scene YAML file, creation of the content and placement in space, for each item, if a MonoBehaviour, registration of all callbacks, all the debug code related to profiler and stack tracing, crash reports and many more...
Those are the obvious ones and I cannot have any clue of what is going on without using a tool to decompose the code. Problem, it is against the EULA and then illegal.

Intellij IDEA 14 Ultimate cursor jumping around in Java Code when hitting Enter from time to time

Sometimes when i hit Enter behind a line to write the next line my cursor jumps down like 300 lines of code within the same Java class which is absolutly annoying.
It jumps just to anywhere within the same file but always somewhere faar below the line i hit enter behind ... so its not jumping to a definition or something like that - it literally just places the cursor to a random point.
Did anyone ever had a similar experience? (I cant find anything on the internet hence i think its either a very easy to fix thing or something for the support).
Like could this be a side effect of defined live templates or something like that?
ANY suggestion could help since i tried out anything i could think of (code completion, live templates, editor settings - nothing looks like it would trigger this behaviour)
Note: I dont like this question at all but i am realy lost right now.
I have not seen any one run into this nor have I seen a bug report on such (and something like that would be a critical). I recommend the following steps:
Upgrade to the latest v14.0.3 if you are not at that version
Invalidate your caches and restart, then wait for IntelliJ to re-index your project (this is a bit of a long shot, but worth the couple of minutes it takes)
File/Application > Invalidate Cache
Disable all third party (i.e. non-bundled) plug-ins and restart
My strongest suspicion is that a 3rd party plug-in is causing the issue.
If this solves the issue, isolate the plug-in causing the issue and contact the developer.
If none of the above work, provide as much detail as you can about the issue as #Makoto suggests. What type of file; what are you doing; OS; IDEA version; etc, etc.

Reference not found after switching from Debug to Release mode

I have a problem with several references in my VB.NET project.
For example I have this line of code:
Dim m As New Chilkat.Email
It comes from the library "ChilkatDotNet45.dll".
When I click on "References" and locate this dll, I can see that it has the settings "Use local copy" and "Do not include interop types".
When I switch to Release mode, the compiler tells me that "Chilkat.EMail" is not defined.
I have this problem with several DLLs, so it is not specific to Chilkat.
Can somebody tell me what I did wrong?
Thank you.
One of the standard approaches to solving any programming-related issue is trying to reduce the scope of the investigation. If you have a big project, in which something doesn't work, try to create a smaller project, and try to replicate desired functionality in it. Reduce as much as possible, down to a brand new project with maybe 5-10 lines of code in it.
If you were unable to solve your problem after making a reduced test case, now it's good time to post it on StackOverflow. I am usually reducing problems while writing a question on SO (not before, as one might think), constantly thinking "ok, is it minimized enough"; and this is how 90% of the questions never get posted - I often find a solution along the way of reducing my question to bare bones. :)
In your case, can you build a simplified project which has this problem and post a link here? We could then try switching Debug to Release on our machines and see if the we can reproduce. There are too many options to do the guesswork.

Why is my vs2012 forcing extra parentheses

First, thank you for taking pity on me and reading this issue. I CANNOT for the life of me figure out what extension I might have installed that is causing this issue, but it is EXTREMELY cumbersome.
Whenever I begin to type code (VB I think it also occurs in C#), for example "For Each" once I hit the F it forces a set of parentheses. Which would look like F(), but because I keep typing it looks like F(or). This only occurs when coding inside code blocks like a function or a sub, but when I'm creating the function it does not occur. I've disabled any and all power tools and the like, or at least I'm 90% sure I've done this for all of them, and yet it still occurs.
I'm usually pretty proficient at digging about the net and finding the answer, but for this one I'm at a loss. There is just too many keywords involved, so all I see is non-related topics, or how to make the parentheses occur, not get rid of them.
If anyone can provide some steps to resolve this, I'm happy and eager to try them. It's just such a hassle to live with for right now.
If you think it is a Visual Studio extension, then start by disabling all of them and adding them back one at a time.
You can also run VS with the command line switched to disable features.
Devenv switches
The simple answer to the cause is the Codealike VS Extension. I logged a bug with them and hopefully they'll fix it soon