Re-import a library in Chez Scheme - chez-scheme

In Chez, how do I reload (re-import) a library into the REPL that I've already imported once?
The Chez Scheme User's Guide says:
When defined directly in the REPL or loaded explicitly from a file, a library form can be used to redefine an existing library, but import never reloads a library once it has been defined.
load and load-library don't seem to re-import either.

The following sequence works for me in Chez v9.5:
> (import (mylib))
;; make some changes to mylib
> (load "src/mylib.scm")
> (import (mylib))

Related

Why are some .h files missing when compiling wbrtc_ios as a framework?

I am new to WebRTC stuff. I cloned the webrtc_ios main branch, and I built the framework as instructed here with the python script for arm64. When I add this to my Xcode project as a framework, everything is fine. Project builds, I can import files using <WebRTC/...> syntax.
However, I need to use RTCMTLRendeder.h file. Building a framework with python script leaves some of the header files out. (When I take a look at WebRTC.h inside the built framework, I can see that this file is missing) How can I include all header files that actually exist inside /webrtc_ios/src/sdk/objc/components folder while building the framework? I can see RTCMTLRenderer.h and .mm files are in that folder before using the build script. When turned into a framework those files don't exist inside the framework anymore. Why? And is there any other way to actually copy those files into the project as well?
Turns out you need to create your own, long renderer class which does not inherit from RTCMTLRenderer at all if you want to render on Metal view manually in a Swift/ObjC hybrid project (at least this is how I solved it). That class does whatever RTCMTLRenderer does, and grabs pixel buffers from RTCVideoTrack through an RTCVideoView.

Protocol Buffers library-dependent location in IntelliJ

I try to use import in my *.proto instructions for Protobuf. In my app, I have a few plugins with these *.proto instructions. But IntelliJ with Protocol Buffers marks imports and classes from the imported files as red.
I found, if I add in Preferences->Languages & Frameworks->Protocol Buffers strong location to my *.proto it will be green. But I have many places with *.proto, for example for each plugin in my app, and some of this *.proto can have an equal name, like featuresDto for each plugin. How can I add library-dependent location instead of strong?
However, the protobuf-generator works as expected.
[screenshot]
I didn't get correctly what do you mean by library-dependent location - could you please explain?
As for protobuf plugin settings: there you can find all directories, where you'll be able to import files from. E.g. if the protobuf file is located in /foo/bar/MyService.proto, and you want to be able to import it as import "bar/MyService.proto";, you should add /foo/ directory to the plugin settings.
In fact those settings mean exactly the same as directories one specifies with proto-path cli argument: if any proto file can not be resolved against one of given proto-paths, compilation will not succeed.
Also you may find useful the following issues about simplifying solving imports-related problems: https://youtrack.jetbrains.com/issue/IDEA-283099 and https://youtrack.jetbrains.com/issue/IDEA-283097

How to add languages to pootle

Can someone tell me how to add languages in a new project in pootle?
I'm using pootle 2.7. I already added a new project but whenever I go projects//admin/languages/ , it gives a message "There are no templates for this project, so adding new languages from this screen is disabled."
You either need to:
Have a language named templates, which includes the template files (pot) where the rest of languages will be initialized from. You can add these in the server's file system and import them via the update_stores management command. After that, the /projects/admin/languages/ screen will allow you to add new languages via the UI.
Have your languages directly imported via the command-line, also using the update_stores management command

IntelliJ not recognizing typescript named module declarations

I have a situation where my module names need to be in a certain format. Typescript is fine when I do this:
// knockout interfaces, this is knockout.d.ts
declare var ko: KnockoutStatic;
declare module "core!lib/knockout" {
export = ko;
}
And then in my file that uses it:
import ko = require('core!lib/knockout');
IntelliJ doesn't like it though. It says "cannot find external module 'core!lib/knockout'. I'm using the latest stable version (14.1) and this happens with the in-built 1.4 compiler and a custom one.
I guess this may be a Jetbrains bug?
If you add this to the file with the import statement the error will probably go away
/// <reference path="test.ts" />
The real problem I think is that the configuration isn't fully correct. Is the config root correct or are you maybe using version control?
Relevant bits from the link:
From the Scope drop-down list, choose the scope to apply the compiler in. The available options are: – Project Files: all the files within the project content roots (see Content Root and Configuring Content Roots).
– Project Production Files: all the files within the project content roots excluding test sources.
– Project Test Files: all the files within the project test source roots.
– Open Files: all the files that are currently opened in the editor.
VCS Scopes: these scopes are only available if your project is under version control.
– Changed Files: all changed files, that is, all files associated with all existing changelists.
– Default: all the files associated with the changelist
See https://www.jetbrains.com/idea/help/transpiling-typescript-to-javascript.html

How to experiment with private APIs on iOS?

I have been exploring private APIs within iOS for the express purpose of experimentation. Does anyone have a sample of instantiating a class like MKTransitAnnotationView?
I've downloaded Erica Sadun's HeaderDumpKit and the class-dump binary. After making a few corrections to her perl script I dumped out a Headers directory and moved that into the project folder.
In the Other Linker Flags section of Build Settings I added:
-force_flat_namespace
-undefined suppress
When trying to call MKTransitAnnotationView I get dyld: Symbol not found: _OBJC_CLASS_$_MKTransitAnnotationView. So what have I missed?
Add your dumped header as a normal header file, then from your project navigator:
click on your project
click on your target
click on the Build Phases tab, then expand the Link Binary With Libraries section
drag/drop the binary from PrivateFramework folder that you want to use.
Then you should be all set.
Normally you shouldn't have to change your flags.