Good mornings! I am seeking for a Squeak framework to autonomously control a drone. My objective is to create an AI drone swarm for perimeter security as in aerostats a la Snow Crash.
I’m building out my kit for my upcoming trip to Egypt on 5/15/23 til 7/15/23. I will go with my pup to Libya, confederate constitution in hand. I’ve my three Damascus steel blades & the CIC; I require an aerostat swarm. I’m grateful for you!
---
- 𝗔𝗻𝘁𝗶-𝗖𝗵𝗿𝗶𝘀𝘁 #𝟲𝟲𝟲 🐰
I am fleshing out
--> the v3.8 protocol with
-------> ESqueak broker contact,
-------> triple bridging
-------> replica quorum comms.
Still failing ASN1 substitution encoding, for the wires within in the
session Scopes.
:: RemoteObjectMemories ::
------------------------------------------------------------------------
ESqeak-Test-Run-12-14-22.jpg
--
𝙄𝙛 𝙮𝙤𝙪 𝙖𝙧𝙚 𝙙𝙧𝙞𝙫𝙞𝙣𝙜 𝙖 𝙋𝙤𝙧𝙨𝙘𝙝𝙚, 𝙩𝙝𝙖𝙣𝙠 𝙮𝙤𝙪 𝙛𝙤𝙧
𝙢𝙤𝙫𝙞𝙣𝙜 𝙤𝙫𝙚𝙧, 𝙨𝙤 𝙩𝙝𝙖𝙩 𝙄 𝙘𝙤𝙪𝙡𝙙 𝙨𝙖𝙛𝙚𝙡𝙮 𝙥𝙖𝙨𝙨!
𝘼𝙧𝙧𝙞𝙫𝙚𝙙𝙚𝙧𝙘𝙞, 𝙧𝙖𝙗𝙗𝙞𝙩 🐰
David T. Lewis uploaded a new version of Chronology-Core to project The Trunk:
http://source.squeak.org/trunk/Chronology-Core-dtl.80.mcz
==================== Summary ====================
Name: Chronology-Core-dtl.80
Author: dtl
Time: 19 May 2022, 12:03:05.720962 pm
UUID: 1b1b97c4-bc35-408d-b548-f0d0376a0808
Ancestors: Chronology-Core-dtl.79
Change DateAndTime>>offset: to be compliant with the ANSI draft spec. The offset: method should answer an instance equivalent to the receiver, where equivalent means having the same UTC time.
Let #offset: adopt the prior behavior of #utcOffset: and let #utcOffset: be a compatibility synonym for #offset:. Add #asLocalAt: to the squeak protocol and let it implement the prior behavior of #offset: Change existing code and tests to use #asLocalAt: but otherwise retain existing behavior.
Issue reported at https://github.com/squeak-smalltalk/squeak-object-memory/issues/23
=============== Diff against Chronology-Core-dtl.79 ===============
Item was added:
+ ----- Method: DateAndTime>>asLocalAt: (in category 'squeak protocol') -----
+ asLocalAt: anOffset
+ "Answer a DateAndTime for a different time zone offset that has the same
+ year, month, day, hour, minute, and second as this instance, and with
+ printString that matches except for time zone offset."
+
+ | newOffset newMicros |
+ newOffset := anOffset asDuration asSeconds.
+ newMicros := localOffsetSeconds - newOffset * 1000000 + utcMicroseconds.
+ ^ self class utcMicroseconds: newMicros offset: newOffset
+ !
Item was changed:
----- Method: DateAndTime>>offset: (in category 'ansi protocol') -----
offset: anOffset
+ "Answer a <DateAndTime> equivalent to the receiver but with its local time
+ being offset from UTC by offset.
- "Answer a DateAndTime for a different time zone offset that has the same
- year, month, day, hour, minute, and second as this instance, and with
- printString that matches except for time zone offset."
+ See asLocalAt: for the earlier behavior of this method."
+
+ ^ self class
+ utcMicroseconds: utcMicroseconds
+ offset: anOffset asDuration asSeconds!
- | newOffset newMicros |
- newOffset := anOffset asDuration asSeconds.
- newMicros := localOffsetSeconds - newOffset * 1000000 + utcMicroseconds.
- ^ self class utcMicroseconds: newMicros offset: newOffset
- !
Item was changed:
----- Method: DateAndTime>>utcOffset: (in category 'squeak protocol') -----
utcOffset: anOffset
+ "Compatiblity. Answer a DateAndTime equivalent to the receiver but offset from UTC by anOffset."
+
+ ^ self offset: anOffset!
- "Answer a DateAndTime equivalent to the receiver but offset from UTC by anOffset"
- ^ self class
- utcMicroseconds: utcMicroseconds
- offset: anOffset asDuration asSeconds!
Item was changed:
----- Method: Timespan class>>current (in category 'squeak protocol') -----
current
+ ^ self starting: (DateAndTime now asLocalAt: self defaultOffset)!
- ^ self starting: (DateAndTime now offset: self defaultOffset)!
Hi ALl,
try printing 16r20000000 in trunk. One gets 0. Try '16r20000000'
asInteger one gets 16. This is, um, getting in the way of normal
development ;-)
_,,,^..^,,,_
best, Eliot
Eliot Miranda uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-eem.1376.mcz
==================== Summary ====================
Name: System-eem.1376
Author: eem
Time: 7 December 2022, 11:43:38.359701 am
UUID: de0ccd9b-825a-4e77-9d01-ea76e1220c40
Ancestors: System-ct.1375
Make sure image segment storage doesn't mistakenly enlarge outPointers beyond the implementation limit.
=============== Diff against System-ct.1375 ===============
Item was changed:
----- Method: NativeImageSegment>>copyFromRoots:sizeHint:areUnique: (in category 'read/write segment') -----
copyFromRoots: aRootArray sizeHint: segSizeHint areUnique: areUnique
"Copy a tree of objects into a WordArray segment. The copied objects in the segment are not in the normal Squeak space.
[1] For exporting a project. Objects were enumerated by ReferenceStream and aRootArray has them all.
[2] For exporting some classes. See copyFromRootsForExport:. (Caller must hold Symbols, or they will not get registered in the target system.)
[3] For 'local segments'. outPointers are kept in the image.
If this method yields a very small segment, it is because objects just below the roots are pointed at from the outside. (See findRogueRootsImSeg: for a *destructive* diagnostic of who is pointing in.)"
| segmentWordArray outPointerArray segSize rootSet uniqueRoots |
aRootArray ifNil: [self errorWrongState].
uniqueRoots := areUnique
ifTrue: [aRootArray]
ifFalse: [rootSet := IdentitySet new: aRootArray size * 3.
uniqueRoots := OrderedCollection new.
1 to: aRootArray size do: [:ii | "Don't include any roots twice"
(rootSet includes: (aRootArray at: ii))
ifFalse: [
uniqueRoots addLast: (aRootArray at: ii).
rootSet add: (aRootArray at: ii)]
ifTrue: [userRootCnt ifNotNil: ["adjust the count"
ii <= userRootCnt ifTrue: [userRootCnt := userRootCnt - 1]]]].
uniqueRoots].
arrayOfRoots := uniqueRoots asArray.
rootSet := uniqueRoots := nil. "be clean"
userRootCnt ifNil: [userRootCnt := arrayOfRoots size].
outPointers := nil. "may have used this instance before"
+ segSize := segSizeHint > 0 ifTrue: [segSizeHint * 3 // 2] ifFalse: [50000].
- segSize := segSizeHint > 0 ifTrue: [segSizeHint *3 //2] ifFalse: [50000].
["Guess a reasonable segment size"
segmentWordArray := WordArrayForSegment new: segSize.
+ outPointerArray := [Array new: (segSize // 20 min: Smalltalk maxIdentityHash) "this is an implementation limit"] ifError:
+ [state := #tooBig. ^ self].
- outPointerArray := [Array new: segSize // 20] ifError: [
- state := #tooBig. ^ self].
"Smalltalk garbageCollect."
(self storeSegmentFor: arrayOfRoots
into: segmentWordArray
outPointers: outPointerArray) == nil]
whileTrue:
["Double the segment size and try again"
segmentWordArray := outPointerArray := nil.
segSize := segSize * 2].
segment := segmentWordArray.
outPointers := outPointerArray.
state := #activeCopy!
Item was changed:
----- Method: NativeImageSegment>>storeSegmentFor:into:outPointers: (in category 'read/write segment primitives') -----
storeSegmentFor: rootsArray into: segmentWordArray outPointers: outPointerArray
"This primitive will store a binary image segment (in the same format as the Squeak
image file) of the receiver and every object in its proper tree of subParts (ie, that is
not refered to from anywhere else outside the tree). Note: all elements of the reciever
are treated as roots in determining the extent of the tree. All pointers from within
the tree to objects outside the tree will be copied into the array of outpointers. In
their place in the image segment will be an oop equal to the offset in the outpointer
array (the first would be 4 or 8, depending on word size). but with the high bit set.
Note: the first element of the segmentWordArray (and hence the first element of
the Array answered by loadSegmentFrom:outPointers:) is the rootsArray."
"The primitive expects the array and wordArray to be more than adequately long.
In this case it returns normally, and truncates the two arrays to exactly the right size.
If either array is too small, the primitive will fail, but in no other case."
<primitive: 98 error: ec> "successful completion returns self"
+ ec == #'resource limit exceeded' ifTrue:
+ [self primitiveFailed].
+ ^nil "normal failure returns nil"!
- ^nil "failure returns nil"!
During a recent board discussion, Tim asked about experiences in using VNC
to control server images. There are various ways to do this, but here is how
it is done for the https://squeaksource.com server. The easiest way to see
how it works is to try it out on your own computer, so here is what to do:
- Start with a fresh Squeak image.
- Open a Monticello Browser, and add repository http://source.squeak.org/ss.
- Open the repository and navigate to category update.sscom.
- Select update.sscom-dtl.5.mcm and load it.
When loading is complete, you will see a notifier saying that SqueakSource
is running on port 8888, as well as a pinnable morph for controlling the
RFBServer (for VNC connections).
Pin the RFB control morph so that it stays active. If you close it by
accident, do "RFBServer menu openInWorld" to get it back.
Save the image once and restart it to make sure the startup initialization
is working.
You can now open a web browser on http://localhost:8888 to connect to
the SqueakSource web interface. Only one account will be present in the
repository, this is your administrative user with user name 'admin' and
password 'password'. Changing that password (from the web interface) is
a good idea.
The following will work only on Unix/Linux/OSX:
In the RFBServer menu, in the passwords menu, select "allow empty passwords"
In a terminal window (outside of Squeak), identify the pid of the Squeak VM
process (pgrep -l squeak).
>From the terminal, send a SIGUSR2 signal to the VM process. If the Squeak
VM pid is 1234, then the command is "kill -SIGUSR2 1234".
Back in the Squeak image, you will see the VNC control change from
"RFBServer (stopped)" to "RFBServer :1" to indicate that it is accepting
VNC connections on display number 1. It will stay in this state for the
next 60 seconds.
>From a VNC client program running on the local machine, connect to
localhost:1, and you should have an active connection to the Squeak image.
If you want to run your SqueakSource image on another server, run the
VM with -vm-display-null and use ssh port forwarding if needed to access
the VNC ports.
For example, I have a unix account on the server that hosts squeaksource.com.
When I want to open the running SqueakSource image through VNC, I first
log in to the Linux server with a command like this (except that 10.1.2.3
is not the real address that we are using).
$ ssh -L8888:localhost:8888 -L5900:localhost:5900 -L5901:localhost:5901 10.1.2.3
Once logged in, I locate the Squeak VM process and send SIGUSR2 to it. I keep
the login session open to handle the port forwarding while I use VNC.
Then back on my local computer, I open a VNC connection to localhost:1 to
get a connection to the running image. This step needs to be done within 60
seconds of the SIGUSR2, after than no further connections will be accepted.
I used to use a VNC password (settable from the RFBServer menu) but I decided
that it was too much hassle given the 60 second connection enablement window,
which can only be started by someone with login access to the server and
sufficient privilege to send signals to the VM process.
If you want to copy any of these ideas for use in some other Squeak server
application, the interesting bits are in class SSImageInit, especially
SSImageInit class>>enableFRBServerOnSigUsr2.
I should note that RFBServer is written by Ian Piumarta. I don't recall
where it was originally hosted, but a copy of RFB-ikp.8.mcz is in our
source.squeak.org/ss repository, along with later updates that are currently
in use for SqueakSource.
Dave
I'm trying to build the VM with a C compiler which does not accept
implicit function declarations or implici int.
This is in preparation for a future change in GCC and Clang defaults.
More information is here:
<https://fedoraproject.org/wiki/Changes/PortingToModernC>
<https://fedoraproject.org/wiki/Toolchain/PortingToModernC>
(The second link points to a container image with an instrumented GCC
that can be used for experiments, or you can just inject
-Werror=implicit-function-declaration -Werror=implicit-int into the
build, which has the same results if compiler flags injection works
reliably throughout the build environment.)
According to Fedora's records Squeak-4.10.2.2614-src-no-mp3 was
downloaded from <http://squeakvm.org/unix/release/>.
I got passed the first obstacle with these little changes:
diff -ur Squeak-4.10.2.2614-src-no-mp3.orig/Cross/plugins/CroquetPlugin/CroquetPlugin.h Squeak-4.10.2.2614-src-no-mp3/Cross/plugins/CroquetPlugin/CroquetPlugin.h
--- Squeak-4.10.2.2614-src-no-mp3.orig/Cross/plugins/CroquetPlugin/CroquetPlugin.h 2006-09-14 19:52:45.000000000 +0200
+++ Squeak-4.10.2.2614-src-no-mp3/Cross/plugins/CroquetPlugin/CroquetPlugin.h 2022-11-29 12:30:00.834158643 +0100
@@ -20,4 +20,6 @@
*/
int ioGatherEntropy(char *bufPtr, int bufSize);
+int triBoxOverlap(float *a, float *b, float *c, float *d, float *e);
+
#endif /* CROQUET_PLUGIN_H */
diff -ur Squeak-4.10.2.2614-src-no-mp3.orig/Cross/plugins/CroquetPlugin/TriBoxStub.c Squeak-4.10.2.2614-src-no-mp3/Cross/plugins/CroquetPlugin/TriBoxStub.c
--- Squeak-4.10.2.2614-src-no-mp3.orig/Cross/plugins/CroquetPlugin/TriBoxStub.c 2009-05-26 23:15:18.000000000 +0200
+++ Squeak-4.10.2.2614-src-no-mp3/Cross/plugins/CroquetPlugin/TriBoxStub.c 2022-11-29 12:30:10.184066148 +0100
@@ -1,3 +1,5 @@
+#include "CroquetPlugin.h"
+
/* a stub for triboxoverlap */
int triBoxOverlap(float *a, float *b, float *c, float *d, float *e) {
return 0;
diff -ur Squeak-4.10.2.2614-src-no-mp3.orig/Cross/plugins/SerialPlugin/SerialPlugin.h Squeak-4.10.2.2614-src-no-mp3/Cross/plugins/SerialPlugin/SerialPlugin.h
--- Squeak-4.10.2.2614-src-no-mp3.orig/Cross/plugins/SerialPlugin/SerialPlugin.h 2009-08-27 03:48:06.000000000 +0200
+++ Squeak-4.10.2.2614-src-no-mp3/Cross/plugins/SerialPlugin/SerialPlugin.h 2022-11-29 13:02:56.418443376 +0100
@@ -6,9 +6,13 @@
#pragma export on
int serialPortClose(int portNum);
+int serialPortCloseByName(const char *portName);
+
int serialPortCount(void);
int serialPortOpen(int portNum, int baudRate, int stopBitsType, int parityType, int dataBits,
int inFlowCtrl, int outFlowCtrl, int xOnChar, int xOffChar);
+int serialPortOpenByName(char *portName, int dataRate, int stopBitsType, int parityType, int dataBits,
+ int inFlowCtrl, int outFlowCtrl, int xOnChar, int xOffChar);
int serialPortReadInto(int portNum, int count, void *bufferPtr);
int serialPortReadIntoByName(const char *portName, int count, void *bufferPtr);
int serialPortWriteFrom(int portNum, int count, void *bufferPtr);
diff -ur Squeak-4.10.2.2614-src-no-mp3.orig/unix/plugins/AsynchFilePlugin/sqUnixAsynchFile.c Squeak-4.10.2.2614-src-no-mp3/unix/plugins/AsynchFilePlugin/sqUnixAsynchFile.c
--- Squeak-4.10.2.2614-src-no-mp3.orig/unix/plugins/AsynchFilePlugin/sqUnixAsynchFile.c 2006-10-18 19:10:25.000000000 +0200
+++ Squeak-4.10.2.2614-src-no-mp3/unix/plugins/AsynchFilePlugin/sqUnixAsynchFile.c 2022-11-29 12:30:44.062730997 +0100
@@ -142,7 +142,7 @@
return fp;
}
-INLINE static allocateBuffer(struct FileBuf *buf, int size)
+INLINE static int allocateBuffer(struct FileBuf *buf, int size)
{
if (buf->capacity >= size)
return 1;
A few more changes like these seem to be needed.
But now I'm hitting this error:
…/unix/src/vm/intplugins/MiscPrimitivePlugin/MiscPrimitivePlugin.c:118: implicit function declaration: isBytes
This error is harder to deal with because it seems to be a bug in the
code generator. There probably should be a macro definition for isBytes
similar to arrayValueOf, like this:
#define isBytes(oop) (interpreterProxy->isBytes(oop))
Otherwise, the global function definition is picked up instead, and that
does not seem to be the right pattern.
Thanks,
Florian