Which programming languages should one know to modify source code of SCRATCH - mit-scratch

I intend to build a custom version of SCRATCH. I am a web-developer and hence not familiar with technologies that could have used to build scratch.
I see quite a lot technologies used in there such as Java Applets, C, SmallTalk and so on.
Can someone tell me the basic skill-set that's required to modify SCRATCH fro my purpose?

You should get the source code for Scratch: http://info.scratch.mit.edu/Source_Code

Squeak is not a programming language. Looks like I need to know SmallTalk if I want to make changes and for more drastic changes I need to write C code.

Scratch is written in squeak, which is a java implementation of smalltalk.

for 1.4, use squeak. for 2.0, use actionscript.
if you want to mod 2.0, read http://scratch.mit.edu/discuss/topic/38970/

Related

Can I create VS Code extensions in Python/C++?

I am totally new to creating extensions in VS Code, and all the official examples of extensions are written in Typescript/Javascript, which I have no experience with. Is it possible to create VS Code extensions in other languages, such as Python or C++?
If so, could anyone point me to any resources to get me started?
It is possible by creating a C++ module for Node.js, which can then be loaded like any other node module. Of course, some glue code written in JS or TS is necessary to register the extension and translate calls to/from vscode.
I've gone this way in my ANTLR4 extension, but gave up eventually, because of the troubles I had due to incompatible dependencies (you have to make sure the extension uses the exact same V8 version, which was used to build the underlying Node.js used by vscode, on all supported platforms).
This situation might have change, I don't know, but with that in the background I don't recommend it.
If you want to add support for a new language in vscode you can also write a separate language server, as is mentioned in the linked SO answer. For other type of work, I'm afraid, you have no alternative to use.
No, as #rioV8 said, since VSCode is an electron app and runs on Javascript.

Use Qt4 widget in Qt5, without recompiling

I have written some code that relies on the Qt4 library and was using it in some projects. It deals with displaying PDFs, printing and so on and employs the poppler library
My new project is made using Qt5, and I need those functionalities in it.
My qt4 library is represented by DLL that simply returns an object of QWidget-derived class.
Is it possible to use this QWidget inside my new qt5 project? Maybe after some wrapping?
Also, while exploring this issue I came by to Qt plugins. I haven't researched this field yet, but may be it's possible to resolve the problem using them?
Thanks in advance.
Qt 4 and Qt 5 are not binary compatible, so no, you can't use the widget directly. Using both Qt 4 and Qt 5 inside the same application sounds like a dangerous idea...
The best bet is of course porting libpoppler to Qt 5 (have you evaluated how complex such a port would be? Probably not too much). The second best would've been using QX11Embed, but those classes are currently missing from Qt 5, awaiting for someone to port them to QPA / XCB.

Using (Java) Eclipse abilities in other programming language

I use Eclipse mainly for LSL (linden Scripting language). The plug-in for this language does not provide things like templates or task-tag recognition. Is there any way that these kind of features in LSL-files (or any other generic file/code for that matter) can be used?
Take look at the XText project. If you can define the grammar of LSL there it will generate full Eclipse plugin for it, complete with syntax Highlighting, code Completion, validation and quick Fixes and more.
Another one to try (one i use myself) is LSL Editor
Full Syntax highlighting, code suggest, and even a off world run time environment. plus able to test multiple scripts by building test objects with prims.
Take a Look :)
LSLForge is being actively maintained, and has most of what you describe. If there's something missing, the developer is always looking for new challenges.

GUI in Scala/Groovy/Clojure

Last time I had to deal with Java was 2005 and I forgot almost everything about it since then.
Today I need to build a GUI app on the top of Java. I guess it is better to use one of Scala/Groovy/Clojure languages.
The question is: which of them is better for desktop GUI programming? My program will transform and display a series of jpeg/png files + there will be ~10 dialogs (with tons of options in each with all possible widgets).
The main requirement is compactness: I hate to write a dozen lines of code only to draw a simple frame with a button. My background in GUI is (mostly) Tcl/Tk and GTK+.
DISCLAIMER: I'm a Clojure programmer. I'm obviously biased.
Of all of those languages, I think Clojure and Groovy are probably the most compact. Scala is a curly-bracket language like Java, so it tends to take up a bit more space. However, it's nowhere near as verbose as Java is, and I think Scala is pretty awesome. I know that Scala has a swing wrapper. I've never done GUI development in Scala, so I can't really say how it feels.
I've done some swing development in Clojure, and it doesn't really take much. Using swing direct from Clojure can be tedious until you write yourself some abstractions, but altogether, swing apps are smaller than the same thing in Java because Clojure code tends to be shorter and more concise than Java code.
Clojure also has some wrappers of sorts to make swing development more Clojury. One of which is clj-swing. I've seen some code written using it, and it's pretty cool, and definitely more concise than direct interop.
Now, I don't know Groovy. I really don't know much of anything about it, but I know it's more compact than Java, so I imagine GUI development would be fairly compact as well.
I think Clojure is a safe bet. With clj-swing, or even directly using the Java GUI toolkits directly is going to be really compact compared to Java, and the ability to build abstractions over non-compact stuff with macros is definitely a huge plus. Clojure has my vote.
Scala comes with fairly complete sample applications for basic GUI elements, which you can run by typing scala scala.swing.test.UIDemo at the command line. You can browse the source code for them here.
You may also look at this document to get an idea of the design principles behind Scala's Swing wrappers.
Groovy has the Griffon framework which uses convention over configuration for building GUI apps on the JVM. It's similar to grails/rails but for a rich GUI rather than a web app.
Groovy has something called the swing builder for making GUI programming easier. Here is a piece of sample code from the groovy website, it creates a frame with a button and counts the number of times you click it:
int count = 0
new SwingBuilder().edt {
frame(title:'Frame', size:[300,300], show: true) {
borderLayout()
textlabel = label(text:"Click the button!", constraints: BL.NORTH)
button(text:'Click Me',
actionPerformed: {count++; textlabel.text = "Clicked ${count} time(s)."; println "clicked"},
constraints:BL.SOUTH)
}
}
I am currently developing an SWT application in Scala and quite like it. But I do expect Clojure would be even more compact.
I've been writing a GUI by using Clojure directly with Swing. It has worked very well indeed so far. I've also written some custom UI components in Java that have proved very easy to integrate with the Clojure part of the code base.
I also think that clj-swing looks great - possibly easier than using Swing directly if you don't have prior Swing experience.

Graphically laying out wx app

Being really new to wx, I'm wondering if there is an IDE (especially for Linux) which would help me lay out a frame or dialog or whatever just to help me see what I'm doing. That means also creating the code for those changes.
I remember way back when using resource compilers for OS/2 and Windows that produced binaries that would then create the window, and was hoping for something similar (though obviously not binary if wx doesn't support that).
I use wxFormBuilder. It is written in wxWidgets, so it works on Linux quite well. It can generate C++ code or XRC files. Make sure you understand its philosophy, and use it like this:
generate C++ code for the GUI
don't edit the code wxFormBuilder generated, but create new files
in new files, derive new classes from the classes it generated
implement event handlers in you own class (wxFB creates virtual function for each event handler you wish to use)
I usually name the wxFormBuilder generated classes/files like, for example, MainFrameGUI, and one with implementation (derived one in which I write all my code) would be just MainFrame. This enables you to change the visual layout and regenerate C++ files from wxFB at any time without overwriting your code.
DialogBlocks works quite well for me, although sometimes you need to edit the code to fix errors manually. It has a property editor that seems advanced enough.
Just another options is wxGlade. It does not have the that much features as the others mentioned seem to have, but it works just good enough for me to not daring to switch.
I use Code::Blocks IDE from http://www.codeblocks.org which has
- built-in GUI editor
- Cross compilable, so you can use it under Linux, OSX and Windows.
But I still use wxFormBuilder with it instead of built-in wxSmith editor. But they are compatible with internal wxSmith.
For windows you've got "wx-devcpp" which is Blodsheed Dev C++ with some addons providing what you looking for
Here is project page
http://wxdsgn.sourceforge.net/