I'm trying to use the Debugger with elm-reactor but I get this error:
`Debug` does not expose `watch`.
I'm importing the Debug package:
import Debug
as per the mouse example
As of 0.17.0 release, Debug package no longer exposes watch function.
Debug.watch only makes sense in the context of Time-Travel Debugging, which is not available in 0.17.0 release.
The example you are referring to is written using Elm 0.16.0, any examples using Signal package are not relevant anymore.
See more details on the latest release in the official blog post from Evan: A Farewell to FRP
watch was removed from Debug prior to the release of 0.17.
Here is a discussion about the decision which oscillates between moving watch and watchSummary to a new Reactor module (since they were only useful within elm-reactor), or replacing them altogether with log and logSummary. Neither of these resolutions have happened as of 0.17, so we are left without them for now.
Related
Julia has a package for binary decision diagrams called CUDD_jll available from JuliaHub. The package is able to install and compile on the Apple M1 architecture. It does appear to install and compile on macOS v13 running Julia v1.82. But the user interface from an older package CUDD does not appear to be compatible with CUDD_jll.
What is needed is a test or examples revealing user commands for initializing cudd, defining logical variables, and the basic operations of AND, OR, NOT.
Does anyone have such information they will share?
_jll packages are generally not meant to be used directly, they're backend dependencies that will be automatically installed when you add a package that uses them.
In this case, CUDD.jl is the package you want to install and work with. That will automatically install CUDD_jll as a dependency and use it. Actually, the current CUDD.jl doesn't yet use CUDD_jll as a backend. It instead does its own download of the CUDD library, from a source that doesn't provide M1-compatible binaries. CUDD_jll is a recent effort to change that. It does provide binaries for the M1 architecture, but is yet to be merged in as a backend.
In the meantime, you can try ] add CUDD#update-to-yggdrasil to directly add the branch that uses CUDA_jll as the backend, and see if that works for you. (Once the PR gets merged, you can remove this branch-specific dependency and ] add CUDD like before.)
The Apple M1 system is not compatible with CUDD. My mistake, sorry.
Recently I saw that mgo was no longer going to be maintained and I have a recent project with mgo. My question is if there is a problem with that? There are no risks?
Basically you may continue to use it, but since it's not maintained anymore, that means bugs discovered in it will not be fixed, and new features of MongoDB servers will not get added to it.
If you read the README of the github project (https://github.com/go-mgo/mgo), it lists your options.
The first suggests to use the community supported fork: github.com/globalsign/mgo. This is maintained, support for new features are being added, and it has the same API as the original package.
Since globalsign/mgo has identical API, there is no reason not to switch to it. It will most likely only take to change your imports.
Also note that there is an official MongoDB Go driver under development, it was announced here: Considering the Community Effects of Introducing an Official MongoDB Go Driver. It's project and source code is available here: github.com/mongodb/mongo-go-driver. It's currently in alpha phase, so it's nowhere near production ready (and they don't even have an estimated date when it will be ready). If you need a driver now, globalsign/mgo is the best option at the moment.
Do note that both the official driver and globalsign/mgo are getting support for newest features and additions of the MongoDB server, as an example, both support change streams (it wasn't in the original mgo driver). For details, see: Watch for MongoDB Change Streams
There will be problems if:
You want to get some new features in mongodb and current mgo library doesn't support
There is a bugs/security issue in mgo library.
That's one of the reason why i'm not using mgo.
There will be an Official MongoDB Go Driver.
GitHub: mongo-go-driver
Forum: mongodb-go-driver
Considering the Community Effects of Introducing an Official MongoDB Go Driver
Hi I want to import a 3rd party library to GO playground, I saw an answer for this question: https://stackoverflow.com/a/27813778/6638204 but it said that this can not be done, but the xiam/go-playground library on github states that it can do this. I tried using it but I did not understand what should I exactly do. I successfully installed the library and used it to run programs that do not need third party libraries. but I did not get how can I import a third party library. ps: I have docker installed in my machine
The answer is still the same: you can't do that on the "official" Go Playground (at https://play.golang.org/).
If you or someone else runs a custom, modified version of the Go Playground: then the answer is you can do there whatever is allowed, which may include the usage of external libraries which the custom engine may go get prior to compilation and execution.
Also see related question: Which packages may be imported in the go playground?
You might be able to do it since May 14th, 2019
See this tweet (from Brad Fitzpatrick)!
The #golang playground now supports third-party imports, pulling them in via https://proxy.golang.org/
Example: https://play.golang.org/p/eqEo7mqdS9l 🎉
Multi-file support & few other things up next.
Report bugs at golang/go issue 31944, or here on the tweeters.
But that means you have published your package deliverable in such a way it is reference by the Go proxy.
The only tip I got to debug ruby plugins in SketchUp is the use of puts.
I tried to launch SketchUp this way: sketchup.exe > log.txt 2> errors.txt, but it only shows logs / errors from SketchUp app, not from its plugins.
Does anyone knows how to:
Execute step by step inside SketchUp
Get an execution stack when a plugin crashes SketchUp
Any other idea that woul be helpfull to debug ruby plugins in this context
SketchUp released an open source debugger for the SketchUp Ruby API on April 15th, 2014:
https://github.com/SketchUp/sketchup-ruby-debugger
Update: As of SketchUp 2014 you can use Ruby IDE's to step through Ruby code. Follow the instructions at this GitHub repository: https://github.com/SketchUp/sketchup-ruby-debugger
No more puts debugging!
TBD has written and released a bridge to debug SketchUp Ruby plugins: http://labs.plugins.ro/
That's probably what you're looking for. I haven't used it myself yet - so can't elaborate too much on it.
I often use a call to the WIN32 api to OutputDebugString which allows me to see the output (in DebugView) I send to it regardless if SU craches - and it doesn't slow down the execution as much as outputting lots of stuff to the SketchUp Ruby Console:
http://www.thomthom.net/software/sketchup/tt_lib2/doc/TT.html#debug-class_method
(I meant to give a direct link to the BitBucket source code, but the site is down a the moment. Repo: https://bitbucket.org/thomthom/tt-library-2/ )
EDIT: Site back online - direct link: https://bitbucket.org/thomthom/tt-library-2/src/tip/TT_Lib2/debug.rb?at=Version%202.8
One could also reroute puts to OutputDebugString if you wanted a quick catch all solution.
On a slight sidenote, there is also the Developers Tools utility released by the SketchUp team with an enhanced Ruby Console and unit test framework: https://github.com/SketchUp/sketchup-developer-tools
It looks like the SketchUp folks released a new unit testing framework in October 2014. I've not tried using it yet, but will give it a shot and report back with what I find:
https://github.com/SketchUp/testup-2
Using Felix / Equinox, what do the following do under the hood?
osgi:install
osgi:refresh
osgi:resolve
osgi:restart
osgi:update
Is there a state-machine diagram or more concise documentation somewhere?
The best documentation for this is the OSGi Core Specification. The section and page numbers below refer to Release 4.3 (April 2011) of the spec.
osgi:install means install a bundle from a file or stream, and it maps to the BundleContext.installBundle method in the API. Refer to section 4.4.3 on page 90.
osgi:refresh performs a "refresh packages" operation, which allows exports/imports to be rewired after installing or updating a set of bundles. For example, bundles that are currently wired to a particular exporter of a package may be rewired to a newly installed bundle that exports the same package. See section 7.6.1, page 148.
osgi:resolve is similar to refresh, but it only wires up bundles that are currently in the INSTALLED state. I.e. it will not rewire existing wires belonging to bundles that are already in the RESOLVED sate.
osgi:restart stops and restarts a specific bundle. This does not cause the bundle implementation to be updated, it simply stops and starts. See section 4.4.5 page 91 and 4.4.7 page 95.
osgi:update requests for a single bundle to be updated (i.e. reloaded from its original location). This may involve stopping, re-resolving and starting the bundle, depending on what state it was in before the update. See section 4.4.9 page 95.
The state diagram for all the OSGi bundle states is in section 4.4.2 (Figure 4.4) page 90.
For the details of what the Felix shell commands do, you might just look at their source code, at http://svn.apache.org/repos/asf/felix/trunk/shell/src/main/java/org/apache/felix/shell/impl/ - most of them are short and simple.