tim Rowledge uploaded a new version of Monticello to project The Trunk:
http://source.squeak.org/trunk/Monticello-tpr.791.mcz
==================== Summary ====================
Name: Monticello-tpr.791
Author: tpr
Time: 31 July 2023, 1:08:42.078331 pm
UUID: 4c75461c-f5f3-4b22-8730-a255e7a8139f
Ancestors: Monticello-eem.790
Since the filebased repository requiresd the mcz extension when trying to load versions, let's actually try to add it.
This chage allows comparing versions within a repository inspector that is examining your local package-cache directory, for example. I can't find any way that it makes anything less-good so far.
=============== Diff against Monticello-eem.790 ===============
Item was changed:
----- Method: MCFileBasedRepository>>versionNamed: (in category 'versions') -----
versionNamed: aMCVersionName
"For FileBased repositories, aMCVersionName must have the appropriate extension!! :-("
+ | version fileName |
- | version |
version := self cache
at: aMCVersionName
ifAbsent:
+ [[fileName := (aMCVersionName endsWith: '.mcz' )
+ ifFalse:[aMCVersionName, '.mcz']
+ ifTrue:[aMCVersionName].
+ self loadVersionFromFileNamed: fileName ]
- [ [ self loadVersionFromFileNamed: aMCVersionName ]
on: FileDoesNotExistException , NotFound
do: [ : err | nil ] ].
self resizeCache: cache.
(version notNil and: [ version isCacheable ]) ifTrue:
[ cache
at: aMCVersionName asMCVersionName
put: version ].
^ version!
tim Rowledge uploaded a new version of Help-Squeak-Project to project The Trunk:
http://source.squeak.org/trunk/Help-Squeak-Project-ct.98.mcz
==================== Summary ====================
Name: Help-Squeak-Project-ct.98
Author: ct
Time: 21 July 2023, 12:23:52.490316 am
UUID: fed4b138-10f7-044f-893d-353f4c0f2885
Ancestors: Help-Squeak-Project-tpr.97
Updates entry on the Squeak by Example book.
=============== Diff against Help-Squeak-Project-tpr.97 ===============
Item was changed:
----- Method: SqueakProjectHelp class>>squeakResourcesOnline (in category 'pages') -----
squeakResourcesOnline
"This method was automatically generated. Edit it using:"
"SqueakProjectHelp edit: #squeakResourcesOnline"
<generated>
^(HelpTopic
title: 'Squeak Resources Online'
contents:
'Web sites
Main site of Squeak
https://www.squeak.org
Issue Tracker for bug reports and other feedback
https://bugs.squeak.org
Weekly Squeak
https://news.squeak.org
Downloads for many versions
https://www.squeak.org/downloads
Main site of OpenSmalltalk VM
https://github.com/OpenSmalltalk/opensmalltalk-vm
Mailing lists
beginners
This is the place to ask even the most basic questions. Don''t be afraid. Just ask. The community will help you get started with Squeak.
https://lists.squeakfoundation.org/mailman/listinfo/beginners
squeak-dev
This is the main Squeak mailing list. Join that list to be part in the community. Subscribe to the mail server or read on a forum.
https://lists.squeakfoundation.org/mailman/listinfo/squeak-dev
For more information on the community and the contribution process, check out the tutorial Contributing to Squeak in the following pages.
vm-beginners
This is the entry point for people who want to learn more about how Squeak runs on your operating system. You may ask even basic questions. :-)
https://lists.squeakfoundation.org/mailman/listinfo/vm-beginners
vm-dev
This is the place where discussions about the OpenSmalltalk virtual machine happen. Join that list the be a part of the community.
https://lists.squeakfoundation.org/mailman/listinfo/vm-dev
Books
Squeak By Example
+ A beginners textbook about Squeak''s environment, language, tools, and the Morphic framework, currently based on Squeak 6.0. Available as a colored paperback at lulu and as a free PDF here. The content is maintained on GitHub.
- A beginners textbook, currently based on Squeak 5.3 and so a little out of date in some visual aspects and some details. Still a valuable resource. The content is maintained in GitHub at
- https://github.com/hpi-swa-lab/SqueakByExample-english
- but a prepared and ready to read pdf version can be found at
- https://github.com/hpi-swa-lab/SqueakByExample-english/releases
Other books
Many books about Squeak and Smalltalk in general have been made available:
https://squeak.org/documentation/#books!!
+ ]style[(11 19 1 23 48 1 23 1 14 23 1 27 1 32 1 29 1 49 1 1 13 1 1 10 135 1 61 1 1 10 1 131 62 92 22 25 1 13 144 64 1 1 6 1 131 58 1 1 5 2 17 1 160 4 19 4 31 6 2 1 11 1 75 39)b,I0i,I0,Rhttps://www.squeak.org;I1,I0i,I0,Rhttps://bugs.squeak.org;I1,I…queak.org/documentation/#books;I1!!' readStream nextChunkText)
- ]style[(11 19 1 23 48 1 23 1 14 23 1 27 1 32 1 29 1 49 1 1 13 1 1 10 135 1 61 1 1 10 1 131 62 92 22 25 1 13 144 64 1 1 6 1 131 58 1 1 5 2 17 1 187 54 62 63 1 1 11 1 75 39)b,I0i,I0,Rhttps://www.squeak.org;I1,I0i,I0,Rhttps://bugs.squeak.org;I1,I…!!' readStream nextChunkText)
key: #squeakResourcesOnline;
shouldStyle: false;
yourself!
tim Rowledge uploaded a new version of Network to project The Trunk:
http://source.squeak.org/trunk/Network-tpr.280.mcz
==================== Summary ====================
Name: Network-tpr.280
Author: tpr
Time: 5 July 2023, 4:48:48.448418 pm
UUID: 2e0c8513-b3db-4325-9490-1dfb12c926ec
Ancestors: Network-ct.279
Add commentary to some Socket methods to make it clear that the servers involved need to be running relevant services - and that at least some of them are rarely installed these days. In particular the #ping: method doesn't do what we might expect from the ping cmd.
=============== Diff against Network-ct.279 ===============
Item was changed:
----- Method: Socket class>>ping: (in category 'utilities') -----
ping: hostName
+ "kinda-Ping the given host. Useful for checking network connectivity.
+ The host *must* be running a TCP echo server - note that these days very few actually do so and thus you may need to install one. Fortunately this is usually fairly simple; on a Ubuntu type linux system
+ sudo apt install ncat
+ sudo ncat -l 7 --keep-open --exec '/bin/cat'
+ ... ought to work. Ctrl-c to kill the ersatz echoserver when you are done testing.
+ The ping command in a terminal uses a completely different protocol involving ICMP sockets and sacrifices to the Moon etc."
+
- "Ping the given host. Useful for checking network connectivity. The host must be running a TCP echo server."
"Socket ping: 'squeak.cs.uiuc.edu'"
| tcpPort sock serverAddr startTime echoTime |
tcpPort := 7. "7 = echo port, 13 = time port, 19 = character generator port"
serverAddr := NetNameResolver addressForName: hostName timeout: 10.
serverAddr ifNil: [ ^self inform: 'Could not find an address for ', hostName ].
sock := Socket new.
sock connectNonBlockingTo: serverAddr port: tcpPort.
[sock waitForConnectionFor: 10]
on: ConnectionTimedOut
do: [:ex |
(self confirm: 'Continue to wait for connection to ', hostName, '?')
ifTrue: [ex retry]
ifFalse: [
sock destroy.
^ self]].
sock sendData: 'echo!!'.
startTime := Time millisecondClockValue.
[sock waitForDataFor: 15]
on: ConnectionTimedOut
do: [:ex | (self confirm: 'Packet sent but no echo yet; keep waiting?')
ifTrue: [ex retry]].
echoTime := Time millisecondClockValue - startTime.
sock destroy.
self inform: hostName, ' responded in ', echoTime printString, ' milliseconds'.
!
Item was changed:
----- Method: Socket class>>pingPorts:on:timeOutSecs: (in category 'utilities') -----
pingPorts: portList on: hostName timeOutSecs: timeOutSecs
+ "Attempt to connect to each of the given sockets on the given host. Wait at most timeOutSecs for the connections to be established. Answer an array of strings indicating the available ports.
+ Remember that the host must actually be running the relevant services for this to do anything useful; for example the port 7 echo is usually not installed on most modern unix servers. See also the #ping: method"
- "Attempt to connect to each of the given sockets on the given host. Wait at most timeOutSecs for the connections to be established. Answer an array of strings indicating the available ports."
"Socket pingPorts: #(7 13 19 21 23 25 80 110 119) on: 'squeak.org' timeOutSecs: 15"
| serverAddr sockets startTime timeoutMsecs done result unconnectedCount connectedCount waitingCount |
serverAddr := NetNameResolver addressForName: hostName timeout: 10.
serverAddr ifNil: [
self inform: 'Could not find an address for ' , hostName.
^ #() ].
sockets := portList
collect: [ :portNum |
| sock |
sock := Socket new.
[ sock connectTo: serverAddr port: portNum ]
on: ConnectionTimedOut
do: [ ].
sock ].
startTime := Time millisecondClockValue.
timeoutMsecs := (1000 * timeOutSecs) truncated.
done := false.
[ done ]
whileFalse: [
unconnectedCount := 0.
connectedCount := 0.
waitingCount := 0.
sockets
do: [ :s |
s isUnconnectedOrInvalid
ifTrue: [ unconnectedCount := unconnectedCount + 1 ]
ifFalse: [
s isConnected
ifTrue: [ connectedCount := connectedCount + 1 ].
s isWaitingForConnection
ifTrue: [ waitingCount := waitingCount + 1 ] ] ].
waitingCount = 0
ifTrue: [ done := true ].
connectedCount = sockets size
ifTrue: [ done := true ].
(Time millisecondsSince: startTime) >= timeoutMsecs
ifTrue: [ done := true ] ].
result := (sockets select: [ :s | s isConnected ]) collect: [ :s | self nameForWellKnownTCPPort: s remotePort ].
sockets do: [ :s | s destroy ].
^ result!
Item was changed:
----- Method: Socket class>>pingPortsOn: (in category 'utilities') -----
pingPortsOn: hostName
+ "Attempt to connect to a set of well-known sockets on the given host, and answer the names of the available ports.
+ See also the comment for #ping: regarding server services. And also note that this is quite likely to seem like a port scanning attack to the server so be careful that it doesn't bite back"
- "Attempt to connect to a set of well-known sockets on the given host, and answer the names of the available ports."
"Socket pingPortsOn: 'www.disney.com'"
^ Socket
pingPorts: #(7 13 19 21 23 25 80 110 119)
on: hostName
timeOutSecs: 20
!
tim Rowledge uploaded a new version of Network to project The Treated Inbox:
http://source.squeak.org/treated/Network-tpr.280.mcz
==================== Summary ====================
Name: Network-tpr.280
Author: tpr
Time: 5 July 2023, 4:48:48.448418 pm
UUID: 2e0c8513-b3db-4325-9490-1dfb12c926ec
Ancestors: Network-ct.279
Add commentary to some Socket methods to make it clear that the servers involved need to be running relevant services - and that at least some of them are rarely installed these days. In particular the #ping: method doesn't do what we might expect from the ping cmd.
=============== Diff against Network-ct.279 ===============
Item was changed:
----- Method: Socket class>>ping: (in category 'utilities') -----
ping: hostName
+ "kinda-Ping the given host. Useful for checking network connectivity.
+ The host *must* be running a TCP echo server - note that these days very few actually do so and thus you may need to install one. Fortunately this is usually fairly simple; on a Ubuntu type linux system
+ sudo apt install ncat
+ sudo ncat -l 7 --keep-open --exec '/bin/cat'
+ ... ought to work. Ctrl-c to kill the ersatz echoserver when you are done testing.
+ The ping command in a terminal uses a completely different protocol involving ICMP sockets and sacrifices to the Moon etc."
+
- "Ping the given host. Useful for checking network connectivity. The host must be running a TCP echo server."
"Socket ping: 'squeak.cs.uiuc.edu'"
| tcpPort sock serverAddr startTime echoTime |
tcpPort := 7. "7 = echo port, 13 = time port, 19 = character generator port"
serverAddr := NetNameResolver addressForName: hostName timeout: 10.
serverAddr ifNil: [ ^self inform: 'Could not find an address for ', hostName ].
sock := Socket new.
sock connectNonBlockingTo: serverAddr port: tcpPort.
[sock waitForConnectionFor: 10]
on: ConnectionTimedOut
do: [:ex |
(self confirm: 'Continue to wait for connection to ', hostName, '?')
ifTrue: [ex retry]
ifFalse: [
sock destroy.
^ self]].
sock sendData: 'echo!!'.
startTime := Time millisecondClockValue.
[sock waitForDataFor: 15]
on: ConnectionTimedOut
do: [:ex | (self confirm: 'Packet sent but no echo yet; keep waiting?')
ifTrue: [ex retry]].
echoTime := Time millisecondClockValue - startTime.
sock destroy.
self inform: hostName, ' responded in ', echoTime printString, ' milliseconds'.
!
Item was changed:
----- Method: Socket class>>pingPorts:on:timeOutSecs: (in category 'utilities') -----
pingPorts: portList on: hostName timeOutSecs: timeOutSecs
+ "Attempt to connect to each of the given sockets on the given host. Wait at most timeOutSecs for the connections to be established. Answer an array of strings indicating the available ports.
+ Remember that the host must actually be running the relevant services for this to do anything useful; for example the port 7 echo is usually not installed on most modern unix servers. See also the #ping: method"
- "Attempt to connect to each of the given sockets on the given host. Wait at most timeOutSecs for the connections to be established. Answer an array of strings indicating the available ports."
"Socket pingPorts: #(7 13 19 21 23 25 80 110 119) on: 'squeak.org' timeOutSecs: 15"
| serverAddr sockets startTime timeoutMsecs done result unconnectedCount connectedCount waitingCount |
serverAddr := NetNameResolver addressForName: hostName timeout: 10.
serverAddr ifNil: [
self inform: 'Could not find an address for ' , hostName.
^ #() ].
sockets := portList
collect: [ :portNum |
| sock |
sock := Socket new.
[ sock connectTo: serverAddr port: portNum ]
on: ConnectionTimedOut
do: [ ].
sock ].
startTime := Time millisecondClockValue.
timeoutMsecs := (1000 * timeOutSecs) truncated.
done := false.
[ done ]
whileFalse: [
unconnectedCount := 0.
connectedCount := 0.
waitingCount := 0.
sockets
do: [ :s |
s isUnconnectedOrInvalid
ifTrue: [ unconnectedCount := unconnectedCount + 1 ]
ifFalse: [
s isConnected
ifTrue: [ connectedCount := connectedCount + 1 ].
s isWaitingForConnection
ifTrue: [ waitingCount := waitingCount + 1 ] ] ].
waitingCount = 0
ifTrue: [ done := true ].
connectedCount = sockets size
ifTrue: [ done := true ].
(Time millisecondsSince: startTime) >= timeoutMsecs
ifTrue: [ done := true ] ].
result := (sockets select: [ :s | s isConnected ]) collect: [ :s | self nameForWellKnownTCPPort: s remotePort ].
sockets do: [ :s | s destroy ].
^ result!
Item was changed:
----- Method: Socket class>>pingPortsOn: (in category 'utilities') -----
pingPortsOn: hostName
+ "Attempt to connect to a set of well-known sockets on the given host, and answer the names of the available ports.
+ See also the comment for #ping: regarding server services. And also note that this is quite likely to seem like a port scanning attack to the server so be careful that it doesn't bite back"
- "Attempt to connect to a set of well-known sockets on the given host, and answer the names of the available ports."
"Socket pingPortsOn: 'www.disney.com'"
^ Socket
pingPorts: #(7 13 19 21 23 25 80 110 119)
on: hostName
timeOutSecs: 20
!
tim Rowledge uploaded a new version of Network to project The Trunk:
http://source.squeak.org/trunk/Network-tpr.281.mcz
==================== Summary ====================
Name: Network-tpr.281
Author: tpr
Time: 6 July 2023, 4:47:54.419547 pm
UUID: 72a96109-ef1b-435a-91ad-20428e13d2d9
Ancestors: Network-tpr.280
Add some more commentary to more Socket examples/tests, plus find ncat simulation commands that can allow testing to suceed.
It would be nice if we could get those services runing on squeak.org
=============== Diff against Network-ct.279 ===============
Item was changed:
----- Method: Socket class>>ping: (in category 'utilities') -----
ping: hostName
+ "kinda-Ping the given host. Useful for checking network connectivity.
+ The host *must* be running a TCP echo server - note that these days very few actually do so and thus you may need to install one. Fortunately this is usually fairly simple; on a Ubuntu type linux system
+ sudo apt install ncat
+ sudo ncat -l 7 --keep-open --exec '/bin/cat'
+ ... ought to work. Ctrl-c to kill the ersatz echoserver when you are done testing.
+
+ The ping command in a terminal uses a completely different protocol involving ICMP sockets and sacrifices to the Moon etc."
+
- "Ping the given host. Useful for checking network connectivity. The host must be running a TCP echo server."
"Socket ping: 'squeak.cs.uiuc.edu'"
| tcpPort sock serverAddr startTime echoTime |
tcpPort := 7. "7 = echo port, 13 = time port, 19 = character generator port"
serverAddr := NetNameResolver addressForName: hostName timeout: 10.
serverAddr ifNil: [ ^self inform: 'Could not find an address for ', hostName ].
sock := Socket new.
sock connectNonBlockingTo: serverAddr port: tcpPort.
[sock waitForConnectionFor: 10]
on: ConnectionTimedOut
do: [:ex |
(self confirm: 'Continue to wait for connection to ', hostName, '?')
ifTrue: [ex retry]
ifFalse: [
sock destroy.
^ self]].
sock sendData: 'echo!!'.
startTime := Time millisecondClockValue.
[sock waitForDataFor: 15]
on: ConnectionTimedOut
do: [:ex | (self confirm: 'Packet sent but no echo yet; keep waiting?')
ifTrue: [ex retry]].
echoTime := Time millisecondClockValue - startTime.
sock destroy.
self inform: hostName, ' responded in ', echoTime printString, ' milliseconds'.
!
Item was changed:
----- Method: Socket class>>pingPorts:on:timeOutSecs: (in category 'utilities') -----
pingPorts: portList on: hostName timeOutSecs: timeOutSecs
+ "Attempt to connect to each of the given sockets on the given host. Wait at most timeOutSecs for the connections to be established. Answer an array of strings indicating the available ports.
+ Remember that the host must actually be running the relevant services for this to do anything useful; for example the port 7 echo is usually not installed on most modern unix servers. See also the #ping: method"
- "Attempt to connect to each of the given sockets on the given host. Wait at most timeOutSecs for the connections to be established. Answer an array of strings indicating the available ports."
"Socket pingPorts: #(7 13 19 21 23 25 80 110 119) on: 'squeak.org' timeOutSecs: 15"
| serverAddr sockets startTime timeoutMsecs done result unconnectedCount connectedCount waitingCount |
serverAddr := NetNameResolver addressForName: hostName timeout: 10.
serverAddr ifNil: [
self inform: 'Could not find an address for ' , hostName.
^ #() ].
sockets := portList
collect: [ :portNum |
| sock |
sock := Socket new.
[ sock connectTo: serverAddr port: portNum ]
on: ConnectionTimedOut
do: [ ].
sock ].
startTime := Time millisecondClockValue.
timeoutMsecs := (1000 * timeOutSecs) truncated.
done := false.
[ done ]
whileFalse: [
unconnectedCount := 0.
connectedCount := 0.
waitingCount := 0.
sockets
do: [ :s |
s isUnconnectedOrInvalid
ifTrue: [ unconnectedCount := unconnectedCount + 1 ]
ifFalse: [
s isConnected
ifTrue: [ connectedCount := connectedCount + 1 ].
s isWaitingForConnection
ifTrue: [ waitingCount := waitingCount + 1 ] ] ].
waitingCount = 0
ifTrue: [ done := true ].
connectedCount = sockets size
ifTrue: [ done := true ].
(Time millisecondsSince: startTime) >= timeoutMsecs
ifTrue: [ done := true ] ].
result := (sockets select: [ :s | s isConnected ]) collect: [ :s | self nameForWellKnownTCPPort: s remotePort ].
sockets do: [ :s | s destroy ].
^ result!
Item was changed:
----- Method: Socket class>>pingPortsOn: (in category 'utilities') -----
pingPortsOn: hostName
+ "Attempt to connect to a set of well-known sockets on the given host, and answer the names of the available ports.
+ See also the comment for #ping: regarding server services. And also note that this is quite likely to seem like a port scanning attack to the server so be careful that it doesn't bite back"
- "Attempt to connect to a set of well-known sockets on the given host, and answer the names of the available ports."
"Socket pingPortsOn: 'www.disney.com'"
^ Socket
pingPorts: #(7 13 19 21 23 25 80 110 119)
on: hostName
timeOutSecs: 20
!
Item was changed:
----- Method: Socket class>>sendTest (in category 'tests') -----
sendTest
"Send data to the 'discard' socket of the given host.
+ Tests the speed of one-way data transfers across the network to the given host.
+ The host *must* be running a TCP discard server - note that these days very few actually do so and thus you may need to install one. Fortunately this is usually fairly simple; on a Ubuntu type linux system
+ sudo apt install ncat
+ sudo ncat -l --keep-open 9 --recv-only > /dev/null
+ ... ought to work. Ctrl-c to kill the ersatz server when you are done testing. "
- Tests the speed of one-way data transfers across the
- network to the given host. Note that most hosts
- do not run a discard server."
"Socket sendTest"
| sock bytesToSend sendBuf bytesSent t serverName serverAddr |
Transcript cr; show: 'starting send test'; cr.
self initializeNetwork.
serverName := UIManager default request: 'What is the destination server?' initialAnswer: 'create.ucsb.edu'.
serverAddr := NetNameResolver addressForName: serverName timeout: 10.
serverAddr = nil
ifTrue: [^self inform: 'Could not find an address for ' , serverName].
sock := self new.
Transcript show: '---------- Connecting ----------';cr.
sock connectTo: serverAddr port: 9.
sock isConnected ifFalse: [
sock destroy.
^self inform: 'could not connect'].
Transcript show: 'connection established; sending data'; cr.
bytesToSend := 1000000.
sendBuf := String new: 64 * 1024 withAll: $x.
bytesSent := 0.
t := Time millisecondsToRun:
[[bytesSent < bytesToSend] whileTrue:
[sock sendDone
ifTrue: [bytesSent := bytesSent + (sock sendSomeData: sendBuf)]]].
sock waitForSendDoneFor: self standardTimeout.
sock destroy.
Transcript show: '---------- Connection Closed ----------'; cr;
show: 'send test done; time = ' , t printString; cr;
show: (bytesToSend asFloat / t printShowingMaxDecimalPlaces: 2), ' * 1000 bytes/sec';cr;endEntry!
Item was changed:
----- Method: Socket class>>timeTest (in category 'examples') -----
timeTest
+ "Attempt to connect to an ntp server running a TCP 'daytime' service. Not all do, but as of 2023 the below nist server does.
+ The host *must* be running a TCP daytime server - note that these days very few actually do so and thus you may need to install one. Fortunately this is usually fairly simple; on a Ubuntu type linux system
+ sudo apt install ncat
+ sudo ncat -l 13 --keep-open --send-only --exec '/bin/date'
+ ... ought to work. Ctrl-c to kill the ersatz server when you are done testing. "
"Socket timeTest"
| serverName serverAddr s |
Transcript show: 'initializing network ... '.
self initializeNetwork.
Transcript
show: 'ok';
cr.
serverName := UIManager default request: 'What is your time server?'
+ initialAnswer: 'time.nist.gov'.
- initialAnswer: 'localhost'.
serverName isEmpty
ifTrue:
[^Transcript
show: 'never mind';
cr].
serverAddr := NetNameResolver addressForName: serverName timeout: 10.
serverAddr = nil
ifTrue: [self error: 'Could not find the address for ' , serverName].
s := self new.
Transcript
show: '---------- Connecting ----------';
cr.
s connectTo: serverAddr port: 13. "13 is the 'daytime' port number"
s waitForConnectionUntil: (self deadlineSecs: 1).
Transcript show: 'the time server reports: ' , s receiveData.
s closeAndDestroy.
Transcript
show: '---------- Connection Closed ----------';
cr!
Item was changed:
----- Method: Socket class>>timeTestUDP (in category 'examples') -----
timeTestUDP
+ "Attempt to connect to an ntp server running a 'daytime' service via UDP. Not all do, including so far as we can tell, the time,nist.gov server that handles the #timeTest method.
+ The host *must* be running a UDP daytime server - note that these days very few actually do so and thus you may need to install one. Fortunately this is usually fairly simple; on a Ubuntu type linux system
+ sudo apt install ncat
+ sudo ncat -l 13 --keep-open --udp --send-only --exec '/bin/date'
+ ... ought to work. Ctrl-c to kill the ersatz server when you are done testing. "
"Socket timeTestUDP"
| serverName serverAddr s |
Transcript show: 'initializing network ... '.
self initializeNetwork.
Transcript
show: 'ok';
cr.
serverName := UIManager default request: 'What is your time server?'
initialAnswer: 'localhost'.
serverName isEmpty
ifTrue:
[^Transcript
show: 'never mind';
cr].
serverAddr := NetNameResolver addressForName: serverName timeout: 10.
serverAddr = nil
ifTrue: [self error: 'Could not find the address for ' , serverName].
s := self newUDP. "a 'random' port number will be allocated by the system"
"Send a packet to the daytime port and it will reply with the current date."
Transcript
show: '---------- Sending datagram from port ' , s port printString
, ' ----------';
cr.
s
sendData: '!!'
toHost: serverAddr
port: 13. "13 is the daytime service"
Transcript show: 'the time server reports: ' , s receiveData.
s closeAndDestroy.
Transcript
show: '---------- Socket closed ----------';
cr!
Patrick Rein uploaded a new version of Compiler to project The Trunk:
http://source.squeak.org/trunk/Compiler-pre.493.mcz
==================== Summary ====================
Name: Compiler-pre.493
Author: pre
Time: 28 July 2023, 10:15:11.716752 am
UUID: 349f6747-5405-614e-8557-1ef0f2f44b12
Ancestors: Compiler-pre.492
Fixes a defect in future send compilation that leads to promises not being created in some situations in which the return value of the future send is used. (closes #84)
=============== Diff against Compiler-pre.492 ===============
Item was changed:
----- Method: FutureNode>>emitCodeForBlockValue:encoder: (in category 'code generation') -----
emitCodeForBlockValue: stack encoder: encoder
"Generate code for evaluating the last statement in a block."
+ ^valueNode emitCodeForValue: stack encoder: encoder!
- ^effectNode emitCodeForValue: stack encoder: encoder!
Item was changed:
----- Method: FutureNode>>sizeCodeForBlockValue: (in category 'code generation') -----
sizeCodeForBlockValue: encoder
receiver == NodeSuper ifTrue: [^self error: 'Futures cannot send to super'].
(futureArgs isNil or: [futureSelector isNil]) ifTrue:
[^self error: 'Futures must be sent messages'].
encoder sharableLitIndex: originalSelector. "to find its senders"
futureDelta ifNil:[futureDelta := encoder encodeLiteral: 0].
+ valueNode := MessageNode new
- effectNode := MessageNode new
receiver: receiver
+ selector: #futureSend:at:args:
- selector: #futureDo:at:args:
arguments: (Array
with: (encoder encodeLiteral: futureSelector)
with: futureDelta
with: (BraceNode new elements: futureArgs))
precedence: 3
from: encoder.
+ ^valueNode sizeCodeForValue: encoder!
- ^effectNode sizeCodeForValue: encoder!
Marcel Taeumel uploaded a new version of ST80 to project The Trunk:
http://source.squeak.org/trunk/ST80-mt.295.mcz
==================== Summary ====================
Name: ST80-mt.295
Author: mt
Time: 26 July 2023, 10:36:59.977063 am
UUID: 75515627-1dac-7045-8fe6-c2ee03d47b51
Ancestors: ST80-ct.294
Complements Morphic-mt.2115
=============== Diff against ST80-ct.294 ===============
Item was added:
+ ----- Method: MVCProject>>startUpActions (in category 'enter') -----
+ startUpActions
+
+ super startUpActions.
+
+ (world controllersSatisfying: [:c | c model respondsTo: #restoreContentsFromFile])
+ do: [:c | c model restoreContentsFromFile].!