LeJOS extension for NetLogo - netlogo

I am new to Lejos and have a short question.Is there any LeJOS extension to combine with NetLogo? I need to run Lejos with Netlogo and plugged both of them into Eclipse.But I cant use Netlogo as I wanted in java.So I want to know whether it is possible to add LeJOS into Netlogo as extension .Thanks.

I have not heard of any such extension. It should possible to build one use the NetLogo extensions API though; see https://github.com/NetLogo/NetLogo/wiki/Extensions-API

Related

VSCode Intellisense selecting the wrong libraries for PlatformIO code

I'm using VSCode with the PlatformIO plugin and PlatformIO bazel integration (https://github.com/mum4k/platformio_rules) to write code for multiple different types of micro controllers (ATTiny84, ATTiny85, Arduino Nano, ESP32-S3). The code builds correctly as the bazel integration to PlatformIO selects the correct libraries, but as there are libraries with the same name made for different types of micro-controllers, IntelliSense will select one kind of at random and will mark a bunch of symbols as not defined or libraries not found (effectively, a lot of red squiggly marks)
As an example, I have some code that configures a timer for ATTiny85, and access registers like TCCR1 and OCR1A, which are correctly defined in Arduino.h for that micro-controller, but are not defined in any of the other 4 versions of the library available
Another example would be Arduino.h not defining Serial when built on ATTiny, but doing it when working with the Arduino Nano
The code I'm working on here is C++
Because of the fact that the whole project includes code for all of those micro-controllers (the project makes use of several different types of micros) I need to put the directories where all of those libraries are in for all of the micros in the include path, which is what I think is causing this problem. I have tried to fully qualify the path for the library that I'm using in my code, but that doesn't work because libraries included inside those libraries are not (and cannot be) fully qualified, so at some point this problem happens again, just one level of indirection down. Also, this code might end up being open source at some point, hence I cannot force my own absolute paths there
I would like either
For VSCode IntelliSense to get information about the right libraries to include through either PlatformIO or Bazel (best solution)
If that doesn't work, I'd like to have the option to change the include path on a per-directory basis. This would add additional directory structure on my project, and I'm still not 100% sure it would work, but would be a start
At this point I feel like my only option is to disable the red squiggly lines completely, but that looks like a sub-optimal solution

Intellisense for Python keywords in Robot Framework not working in VS Code

I did my best to overcome this problem but it was in vain. I am developing tests in Robot Framework (RF) in Visual Studio Code and I want it to either show "signatures" of keywords from standard libraries or to be able to go to their definitions. Go to definition and signature displaying when hovering with Ctrl key are behaving this way:
works for my keywords written in RF (hoorah!)
works for my keywords written in Python only if a keyword consists of one word (I think conversion between undescores and spaces is failing)
does not work for keywords from standard libraries even if the keyword is one-word (e.g. "Fail"), regardless whether the keyword comes from built-in libraries or other ones (e.g. SeleniumLibrary)
When failing, Robot Framework Intellisense Server gives me message "Keyword definition 'Blah Blah' not found from the workspace".
I am using plugins Robot Framework Intellisense FORK and/or Robot Framework Language Server. I tried to configure them carefully according their documentation (Details), but the best state I reached is described above.
Can you help me please? I do not need to use a specific plugin, I just need to have the signature or documentation (or implementation) of every keyword in my code to be one click far.
According to their documentation they support
Goto definition
For variables
For user keywords
I was able to partially solve this when I not only open the folder with source code, but create a workspace and add the folder containing standard libraries to it as well (Add Folder to Workspace). I do not know exactly which folder is the best to add, it seems ...\Python\Python37\Lib\site-packages\ to me.

How do I add an extension to NetLogo 5.2.1

Can someone point me to documentation for how to install an extension such as Rnd for Version 5.2 of NetLogo? Here's why I think I need to do that.
I am trying to use a model created in NetLogo 5.2 and I would like to get it to run in version 6.1.1. I've never done this sort of thing before, so I may be missing something obvious.
If I try to open the model in 6.1.1 the automatic conversion process fails due to a syntax error ( missing parenthesis) and does not un-grey the option to continue to convert it. So I figured, ok, I would download Netlogo 5.2 and open the file with that and fix the syntax error, then try the automated conversion again. So I located and downloaded NetLogo 5.2, the version with bundled java.
The model opens the code fine with NetLogo 5.2, but it requires the Rnd extension, which it doesn't have installed. (I double-checked and there is no Rnd folder in the extensions folder for version 5.2, but other extension folders are there. ) I'd prefer to get that extension so I can actually run the model to confirm I didn't break something else, or at least have the syntax checker work and not get stuck on the missing extension.
Here I become unclear about what I need to do, as NetLogo 5.2 doesn't have a nice tools/extensions... menu choice, so I believe I need to obtain this extension from github myself somehow. I didn't find exact documentation on how to do that. Here I'm sure I'm missing something obvious.
Anyway, I read what documentation I could find and believed that I need to obtain the Rnd.jar file manually and put it into the Rnd folder in the extensions folder, and I'd be good to go. Perhaps that is incorrect.
In any case, I looked on github at https://github.com/NetLogo/Rnd-Extension and there is no Rnd.jar file that I can find there. So "punting" fails and I need to find actual documentation or advice.
Thank you in advance for your help!
Jasper suggested the following,
Did you try any of the releases from GitHub? Anything before "Hexy Pre
Release" (the 6.0 release) might have a shot at working:
github.com/NetLogo/Rnd-Extension/releases – Jasper
and I got version v1.1.0 of the extension downloaded, unzipped, putting the rnd.jar file into the new rnd folder in the extensions folder,
and everything worked.
Thank you Jasper!

How to create a new Rust project from the VS Code, and not through the command-line?

The Rust Programming Language book explains how to create a project on the command-line. The same section is referred by the explanation of how to Quickstart using the extension of the VS Code for Rust.
How can I create a new Rust project from within VS Code, and not through the command-line?
This extension has cargo new command as their planned feature.
You can write your own extension for simple tasks like this, it's quite easy to write one.(I wrote before) But it's still overkill two create a directory(src) and 2 files (main.rs,cargo.toml).
You can create files/folder manually with new file button and add a snippet for each boilerplate code in the files. Snippets can take parameters, you can give your project name there.
If you are going to use this feature a lot, you can write a global task, that can create and populate those files for you.
In the source control pane, when you click the icon near SOURCE CONTROL title, it will create a .git folder for you, which is also done by cargo new.
If you are looking to specifically create a project with the Rust official extension, it's language server and it doesn't have that functionality.

Automate the XCode build settings

I've developed a static library that I'd like to share between XCode projects. I did some reading to learn exactly how to include this library as a binary dependency so that it runs on both the device and the simulator and that lead to a couple of manual steps which I'd now like to automate. Overall I'd like to be able to release new versions of my library and have a simple upgrade process for any project using the older version. Currently that process consists of deleting and/or copying the new binary files over the original location, deleting copying over new header files. The initial install consists of the same two steps along with additional project/target level configuration to set conditional linker flags based on the target SDK. Is there a way this could be automated? I mean I know I could do something like write an Applescript to do the heavy lifting but how? Has anyone ever automated xcode build settings via applescript? How would I call into XCode via Applescript? Are there any other alternatives? Is there a better way to maintain binary level dependencies?
Update
I'm looking to maintain a binary level dependency where project A depends on a static library created by project B. Something similar to a framework that can be included into an XCode iPhone project easily. After building "B" I want something that can practically be dropped into and project including A. While I am becoming aware of all the procedures around leveraging such a dependency I am looking for some solutions to soften up all of the rough edges.
Add a custom build script through Xcode:
select your target under the Targets group on the left
select Add -> New Build Phase -> New Run Script Build Phase
double click on the new Run Script item underneath your target
this allows you to write a shell script, accessing most of the Xcode environment variables related to the current build, e.g. $BUILT_PRODUCTS_DIR
if you check the "Show environment variables in build log" and view the detailed build output you can see all the variables available.
Have a Google search and you'll find lots of examples, e.g. section 20.3 here etc.
If you are using Subversion I believe you can use SVN externals to specify which particular version of your library to use.
You just have to drag & drop your library project in your project. xCode will dot the rest...
Regards,
Thierry