Planet Smalltalk

October 22, 2019

Pharo Weekly - Scripting API for Pharo’s talk

October 21, 2019

Pharo Weekly - [Ann] alpha … Pillar rendering

Cincom Smalltalk - Suggestions for Our Customers and Partners on Year-End Spending

In “Five Tips for ‘Use It or Lose It’ Budgets”, Eric Thomas of CIO Insight discusses some ways that IT managers can improve the management of their budget processes. Eric talks about “use it […]

The post Suggestions for Our Customers and Partners on Year-End Spending appeared first on Cincom Smalltalk.

Cincom Smalltalk - How Business Leaders Make the Smart Choice by Using Cincom Smalltalk

Business Leaders Are Concerned with Risk Business leaders are always concerned with risk. One bad decision could cause a loss of revenue, resources or personnel and could even lead to […]

The post How Business Leaders Make the Smart Choice by Using Cincom Smalltalk appeared first on Cincom Smalltalk.

Pharo Weekly - [Ann] bootstrapping tools

Hello,
I released a first version of the bootstrapping tools in https://github.com/carolahp/pharo/tree/candle


Follow the instructions in the readme for generating the environment for bootstrapping small kernels.
Once you build your development environment, two windows are shown in Pharo by default, each for bootstrapping a different small image: one is Pharo Candle, a tiny image that weights around 160kb and which logs some small benchmarks in a log.txt file. The second one is our minimal image of Pharo, which weights 1.7MB and is able to load precompiled code  using a tool called Hermes. (The generated images will initially have a size of 30mb, and will be resized after executing them for the firs time with the VM, this is a bug that I will fix soon)
The images are generated taking as input the source code of all the classes that will belong to the system (in tonel format) and they are located in the folders pharo/src for the sources of Pharo minimal and pharo/bootstrap/scripts/pharo/PharoCandleSrc for Pharo Candle.
You can check the content of these source files using the button show sources and you can export them in tonel format using the link “export to Tonel” shown in the Calypso view. (If you do that, you need to close the tool and open it again .. I will add an auto refresh soon :p )
When you click the button write , generated images are saved in the folder pharo/bootstrap/scripts/pharo/bootstrapped . You can execute these images using the pharo headless vm 32 bits (you can use the one in pharo/bootstrap/scripts/pharo/.pharo
The current tool also allows you to execute and debug code in the generated image after generating it and before writing it to disk (it has some limitations whose cause and extent I need to explore in the future), and it also allows you to inspect an already generated image (inspect button), showing you it’s special objects array for now.
This is just an early version, but it already allows to play with the bootstrapping in a more friendly way
Cheers
Caro

October 20, 2019

Pharo Weekly - [Ann] Beta of the Commander20 booklet

Hi

Just a little post to notify you that we will be releasing the documentation of the new Command v2.0 framework in the coming weeks.

Pharo Weekly - [ANN] HeySql v1.1

Hi, I have just released HeySql, version 1.1 – a database orm for Postgresql.

– Support for migrations
– Generation of migration templates based on classes
– Models can now be subclassed
– Updated license to MIT
– Updated docs
– Some minor stuff

https://github.com/pegesund/heysql

Petter

October 19, 2019

Pharo Weekly - [Ann] ActiveX Data Objects (ADO) on Microsoft Windows

Dear all,

A working prototype of PharoADO is now available at
https://github.com/eftomi/pharo-ado. I’d be glad if you can find the time to
test it and report your observations to this list or on the GitHub. PRs are
welcome and much needed 🙂

Firstly, I would like to focus on various database data types. When using
ADOClient and ADORecordset, the availability of data types heavily depends
from PharoWin32/PharoCOM packages, so we have to update both repositories
🙂

The PharoADO package is not huge after all, since ActiveX Data Objects
itself is an abstraction layer and provides much of the needed
functionalities by itself.

Best wishes,
Tomaz

October 18, 2019

Cincom Smalltalk - Come Dine with Us at Smalltalks 2019!

Smalltalks 2019 will take place at Facultad de Informática, Universidad Nacional del Comahue, Neuquén, Argentina on November 13-15.

The post Come Dine with Us at Smalltalks 2019! appeared first on Cincom Smalltalk.

Pharo Weekly - [Ann] Embeddable Image in VM

Dear Consortium members
 
At ESUG 2019 LabWare people (Mark is on CC) told us that a key requirement for their business 
was to be able to embed an image into the executable.
It was the first time people ask us this feature (It requires that the image does not write on any external resources
and a modification of the VM). Having a silent image is something that we are working since a couple of years
from time to time with the help of V. Blondeau from LAMRC and now Lifeware. 
So we decided to show that we can do it and that we are listening to people.  
Here is the email that Pablo sent us internally and I wanted to share it with you. 
 

Hi,
    I have made a VM with an embeddable image inside, I have done it
for Windows, but the same can be done for other operating systems.

If you want to try it (of course for windows) I have put a zip here:

https://drive.google.com/file/d/1r-_9CO2J5OF6j7kIOSbKeGRNdxw4sKDW/view?usp=sharing

It should not require any account or access.

I have modified some methods and added a way of detecting if the image
is embedded.

Do you consider is a good thing to have in the CI?

Cheers

— 
Pablo Tesone.
tesonep@gmail.com

October 17, 2019

Pharo Weekly - [Ann] Sleeping beauty: the VM pharo is now sleeping when doing nothing…

Dear consortium members
I wanted to share with you some news from our effort.
We have now a VM that sleeps where there is nothing to do 🙂

Pharo Weekly - Docker setup

# Stage 1: Load the project on an empty image, in this case this is a development image (should change to use a minimal image)
FROM basmalltalk/pharo:7.0-image AS loader
COPY load-project.st ./
RUN pharo Pharo.image load-project.st –save –quit
# Stage 2: Copy the resulting Pharo.image with our project loaded
# into a new docker image with just the vm
# start in a new stage to keep docker image minimal
FROM basmalltalk/pharo:7.0
USER root
WORKDIR /opt/app
COPY start.sh .
COPY –from=loader /opt/pharo/Pharo.image ./
COPY –from=loader /opt/pharo/Pharo.changes ./
COPY –from=loader /opt/pharo/Pharo*.sources ./
RUN mkdir logs \
  && chmod a+x start.sh \
  && chown –recursive pharo:pharo /opt/app
USER pharo
EXPOSE 8080
CMD [“./start.sh”]
The resulting image size is ~80mb including image, changes & sources
As a side note, the final image size is not what really matters, if you have 20 different images all starting from the same base image (eg ubuntu:18.04) the base layer is shared among all images so the network / disk usage is less than the total size of the image.

It’s important to keep the docker image thin, but also to keep layers at a minimum and not adding / removing stuff during the build, because those are stored in the middle layers (multi stage helps to remove that).

October 16, 2019

Joachim Tuchel - Little VAST hacks: Keep Track of (and re-find) needed Changes

Sometimes you just need some easy hacks to make your life much easier. One of them is to keep track of things you have to do later. Be it cleanups, some other thing to take care of once “this is done”. We as Smalltalk developers live, drink and breathe source code and objects and are … Continue reading Little VAST hacks: Keep Track of (and re-find) needed Changes

Pharo Weekly - @PharoConsortium Testimony

Hi,
 
Over the past couple of months we encountered a couple of blockers in our work.
 
One was the issue with Windows 1903 that, while affecting everyone, constituted an immediate blocker for one of our customers. The Pharo team dealt with it promptly.
 
Another issue takes place right now. We want to utilize the new threaded FFI implementation and during our testing we encountered a few problems. We work together with the Pharo team to smoothen these out. Again, while TFFI will benefit everyone, the fact that our concerns are being addressed now is provides a significant benefit.
 
So, thank you!
 
Cheers,
Tudor

October 14, 2019

Pharo Weekly - Activity Digest

Here’s the Weekly Digest for pharo-project/pharo:


ISSUES

Last week 55 issues were created.
Of these, 28 issues have been closed and 27 issues are still open.

OPEN ISSUES

💚 #4897 Writing to a new zip archive member without explicitly creating it raises MNU, by theseion
💚 #4896 Autocompletion is slow for images with a lot of source code, by VincentBlondeau
💚 #4888 4886-Epicea-cant-multi-select-sessions, by tinchodias
💚 #4887 White balance is sometimes wrong when opening a JPG, by jecisc
💚 #4886 Epicea: can’t multi-select sessions, by tinchodias
💚 #4884 Comments in temporaries declaration are not the right color, by jecisc
💚 #4883 FileSystemResolver should let the user add its own origins, by jecisc
💚 #4878 Protocol>>#methods is missleading, by jecisc
💚 #4876 Recover lost changes unavailable, by demarey
💚 #4875 Recover lost changes does not apply changes in right order, by demarey
💚 #4874 [RBRefactoring]RBBrowserEnvironment implementorsOf: doesn’t handle well when anding envs, by VincentBlondeau
💚 #4872 Browse it in code search is broken…, by Ducasse
💚 #4869 Epicea does not log super class changes, by demarey
💚 #4867 [DO NOT MERGE] Adding an additional instance variable to hold an additional methodDict, by tesonep
💚 #4866 ClyFullBrowser class>>#worldMenuOn: checks if nautilus is in the image, by juliendelplanque
💚 #4865 Improve #printString implementations, by leonardoce
💚 #4864 Add a browse menu item, by leonardoce
💚 #4863 Completion in class comment leads to DNU, by Ducasse
💚 #4862 CTRL + M does not work anymore under windows, by VincentBlondeau
💚 #4860 DrTest – Browse on Test class generates DNU, by tesonep
💚 #4859 Dr. Test should be more keyboard friendly, by tesonep
💚 #4856 printOn: methods should avoid calling blindly printString on their elements…, by Ducasse
💚 #4855 printString reimplementations look suspicious, by Ducasse
💚 #4852 Subclasses of SpPresenter should not define initializeWidgets but initializePresenters, by Ducasse
💚 #4850 #removeDuplicates fails on Arrays, by jecisc
💚 #4847 No text annotation for background color , by kasperosterbye
💚 #4845 4837-Typing-Point-in-Transcript-raises-a-DNU-on-completion, by MarcusDenker

CLOSED ISSUES

❤ #4895 Remove-code-that-should-not-be-in-pharo, by jecisc
❤ #4894 Revert “Add new #printOneLineString and related methods”, by MarcusDenker
❤ #4893 4843-Semantic-Analysis-add-a-temp-variable-for-the-Temp-Vector-Copied-Var, by MarcusDenker
❤ #4892 RBRefersToClassRule-should-ignore-isAbstract-methods, by jecisc
❤ #4891 Improve-browse-rule-command, by jecisc
❤ #4890 Add-command-to-browse-rule-class, by jecisc
❤ #4889 Improve Comments MustBeBoolean, by MarcusDenker
❤ #4885 4883-FileSystemResolver-should-let-the-user-add-its-own-origins, by jecisc
❤ #4882 4881-RBImplementedNotSentRule-is-disabled, by MarcusDenker
❤ #4881 RBImplementedNotSentRule is disabled, by MarcusDenker
❤ #4880 2808-do-not-run-RBBadMessageRule-for-tests, by MarcusDenker
❤ #4879 Rename-Protocol-methods-into-methodSelectors, by jecisc
❤ #4877 Integrate-ObservableSlot-as-part-of-VariablesLibrary, by jecisc
❤ #4873 uffi-add-missing-methods, by estebanlm
❤ #4871 Deprecation Rewrites Dr Tests, by MarcusDenker
❤ #4870 Compiler: Clean dead code, by MarcusDenker
❤ #4868 Compiler: Document and simplify #lookupVar:, by MarcusDenker
❤ #4861 Revert “use #lookupVar: instead of #lookupVarForDeclaration:”, by MarcusDenker
❤ #4858 Opal: compiler shoud not copy AST for pluging, by MarcusDenker
❤ #4857 Simplify TempVector Offset from IR, by MarcusDenker
❤ #4854 Add new #printOneLineString and related methods, by leonardoce
❤ #4853 Opal: remove #variableNamed:, by MarcusDenker
❤ #4851 use #lookupVar: instead of #lookupVarForDeclaration:, by MarcusDenker
❤ #4849 Introduce Object>>printOneLineString, by Ducasse
❤ #4848 add-shortcut-printer, by estebanlm
❤ #4846 Simplify morph creation from Athens surface, by leonardoce
❤ #4844 Document and Improve TempVector Access, by MarcusDenker
❤ #4843 Semantic Analysis: add a temp variable for the Temp Vector Copied Var, by MarcusDenker

LIKED ISSUE

👍 #4855 printString reimplementations look suspicious, by Ducasse
It received 👍 x1, 😄 x0, 🎉 x0 and ❤ x0.

NOISY ISSUE

🔈 #4854 Add new #printOneLineString and related methods, by leonardoce
It received 17 comments.


PULL REQUESTS

Last week, 40 pull requests were created, updated or merged.

OPEN PULL REQUEST

Last week, 1 pull request was opened.
💚 #4867 [DO NOT MERGE] Adding an additional instance variable to hold an additional methodDict, by tesonep

UPDATED PULL REQUEST

Last week, 10 pull requests were updated.
💛 #4888 4886-Epicea-cant-multi-select-sessions, by tinchodias
💛 #4865 Improve #printString implementations, by leonardoce
💛 #4864 Add a browse menu item, by leonardoce
💛 #4845 4837-Typing-Point-in-Transcript-raises-a-DNU-on-completion, by MarcusDenker
💛 #4630 4629-ClassDefinitionParser-should-allow-global-message-node-receivers-for-slots, by astares
💛 #4621 4620-Simplify-FloatArray-handling, by astares
💛 #4601 2335-MemoryFileWriteStream, by hilaire
💛 #4579 new version of add testcase for setting/getting a pointer to a long, by estebanlm
💛 #4492 Fix compilation of fullblock closures, by tesonep
💛 #4148 4026 migration of critic browser spec to spec 2 , by CafeKrem

MERGED PULL REQUEST

Last week, 29 pull requests were merged.
💜 #4895 Remove-code-that-should-not-be-in-pharo, by jecisc
💜 #4894 Revert “Add new #printOneLineString and related methods”, by MarcusDenker
💜 #4893 4843-Semantic-Analysis-add-a-temp-variable-for-the-Temp-Vector-Copied-Var, by MarcusDenker
💜 #4892 RBRefersToClassRule-should-ignore-isAbstract-methods, by jecisc
💜 #4891 Improve-browse-rule-command, by jecisc
💜 #4890 Add-command-to-browse-rule-class, by jecisc
💜 #4889 Improve Comments MustBeBoolean, by MarcusDenker
💜 #4885 4883-FileSystemResolver-should-let-the-user-add-its-own-origins, by jecisc
💜 #4882 4881-RBImplementedNotSentRule-is-disabled, by MarcusDenker
💜 #4880 2808-do-not-run-RBBadMessageRule-for-tests, by MarcusDenker
💜 #4879 Rename-Protocol-methods-into-methodSelectors, by jecisc
💜 #4877 Integrate-ObservableSlot-as-part-of-VariablesLibrary, by jecisc
💜 #4873 uffi-add-missing-methods, by estebanlm
💜 #4871 Deprecation Rewrites Dr Tests, by MarcusDenker
💜 #4870 Compiler: Clean dead code, by MarcusDenker
💜 #4868 Compiler: Document and simplify #lookupVar:, by MarcusDenker
💜 #4861 Revert “use #lookupVar: instead of #lookupVarForDeclaration:”, by MarcusDenker
💜 #4858 Opal: compiler shoud not copy AST for pluging, by MarcusDenker
💜 #4857 Simplify TempVector Offset from IR, by MarcusDenker
💜 #4854 Add new #printOneLineString and related methods, by leonardoce
💜 #4853 Opal: remove #variableNamed:, by MarcusDenker
💜 #4851 use #lookupVar: instead of #lookupVarForDeclaration:, by MarcusDenker
💜 #4848 add-shortcut-printer, by estebanlm
💜 #4846 Simplify morph creation from Athens surface, by leonardoce
💜 #4844 Document and Improve TempVector Access, by MarcusDenker
💜 #4842 Remove bounds ivar from AthensBalloonPath, by leonardoce
💜 #4832 Fix #2853. When removing a class, also log its contained methods, by tinchodias
💜 #4801 4800-AltGrdot-is-interpreted-as-user-interrupt-OSWindow, by pavel-krivanek
💜 #4682 2874-clampLowHigh, by hilaire


CONTRIBUTORS

Last week there were 5 contributors.
👤 MarcusDenker
👤 jecisc
👤 Ducasse
👤 estebanlm
👤 leonardoce


RELEASES

Last week there were no releases.


That’s all for last week, please 👀 Watch and ⭐ Star the repository pharo-project/pharo to receive next weekly updates. 😃

You can also view all Weekly Digests by clicking here.

Your Weekly Digest bot. 📆

Smalltalk Jobs - Smalltalk Jobs – 10/13/19

  • Fremont, CASoftware Engineer 4 (Senior) through Lam Research
    • Required Skills:
      • B.S or Masters in Computer Science, Computer Engineering, Electronics or related field
      • At least 5 years of related experience
      • Knowledge of embedded software development and design
      • Knowledgeable with communication protocols such: I2C, SPI, UART etc.
      • Knowledge of Object Oriented Software implementation and design e.g.: Design Patterns and Finite State Machines
      • Strong software engineering skills: modular design, data structures and algorithms
      • Experience with Source Control and Development life cycles
      • Analytical approach to root cause analysis
      • Knowledge of multithreading is a must (preemptive thread scheduling)
      • Understanding of Networking/TCPIP
      • Ability to travel within USA, Europe, and Asia (total is less than 10%)
    • Wanted Skills:
      • Smalltalk
      • Background in electronics and electrical engineering
      • Real-time operating systems
      • Distributed embedded controls systems
Good luck with your job hunting,
James T. Savidge

View James T. Savidge's profile on LinkedIn

This blog’s RSS Feed

October 10, 2019

Pharo Weekly - Neo Universal Binary JSON – 2

Here are some details/benchmarks.

1. A typical JSON payload

data := ZnConstants httpStatusCodes associations
collect: [ :each | { #code->each key. #reason->each value } asDictionary ].

[ NeoUBJSONWriter toByteArray: data ] bench. “‘11108.114 per second'”

bytes := NeoUBJSONWriter toByteArray: data.

bytes size. “2290”

[ NeoUBJSONReader fromByteArray: bytes ] bench. “‘4412.670 per second'”

[ NeoJSONWriter toString: data ] bench. “‘11542.783 per second'”

json := NeoJSONWriter toString: data.

json size. “2358”

[ NeoJSONReader fromString: json ] bench. “‘4814.711 per second'”

2. A 1K integer array

data := (1 to: 1024) asArray.

[ NeoUBJSONWriter toByteArray: data ] bench. “‘6945.444 per second'”

bytes := NeoUBJSONWriter toByteArray: data.

bytes size. “2822”

[ NeoUBJSONReader fromByteArray: bytes ] bench. “‘3280.632 per second'”

[ NeoJSONWriter toString: data ] bench. “‘4523.095 per second'”

json := NeoJSONWriter toString: data.

json size. “4014”

[ NeoJSONReader fromString: json ] bench. “‘1253.749 per second'”

3. A 1K byte array

data := ByteArray new: 1024 streamContents: [ :out |
1024 timesRepeat: [ out nextPut: 256 atRandom – 1 ] ].

[ NeoUBJSONWriter toByteArray: data ] bench. “‘538493.501 per second'”

bytes := NeoUBJSONWriter toByteArray: data.

bytes size. “1031”

[ NeoUBJSONReader fromByteArray: bytes ] bench. “‘216269.200 per second'”

[ NeoJSONWriter toString: data ] bench. “‘4579.084 per second'”

json := NeoJSONWriter toString: data.

json size. “3686”

[ NeoJSONReader fromString: json ] bench. “‘1297.362 per second'”

Right now, only ByteArray got a highly optimised implementation. In the future, FloatArray and IntegerArray could receive the same treatment.

Sven

PS:

Note that UBJSON is not the same as BSON, nor CBOR, nor MessagePack, which all exist in the same space.

October 09, 2019

Pharo Weekly - [ ANN ] Neo Universal Binary JSON

Hi,

I just published an implementation of Universal Binary JSON (UBJSON) for Pharo.

https://github.com/svenvc/NeoUniversalBinaryJSON

Universal Binary JSON (UBJSON) is a computer data interchange format. It is a binary form directly imitating JSON, but requiring fewer bytes of data. It aims to achieve the generality of JSON, combined with being easier and more efficient to process than JSON.

http://ubjson.org
https://en.wikipedia.org/wiki/UBJSON

The size/speed/efficiency differences are minor for typical JSON payloads, especially compared with compacted JSON. The implementation is simpler, though, as there is no string escaping and no number parsing.

UBJSON is making a larger difference when dealing with arrays containing numbers. Especially with ByteArrays, UBJSON makes a huge difference, since these are essentially stored natively.

Sven

October 03, 2019

Pharo Weekly - Mini orm for Postgres

Hi, nice to meet you all 🙂
As my first Smalltalk attempt I have written a mini orm for Postgres, based on the P3-library.
Some features:
– Closely connected to sql
– Easy to use
– Runtime compiled methods based on server side statements
– Generated methods for insert, update on method objects
– Generate tables
It can be found here: https://github.com/pegesund/heysql I did also write something about the code, Pharo and what I think on my kind-of-blog, if anyone is interested: https://ramblings.work/posts/2019-02-10-heysql.html
GitHub
Sql-based orm based on smalltalk reflection ideas. Contribute to pegesund/heysql development by creating an account on GitHub.

October 02, 2019

Smalltalk Jobs - Smalltalk Jobs – 10/2/19

  • Chevy Chase, MDVisualAge Smalltalk developer through Kavaliro
    • Required Skills:
      • VisualAge Smalltalk developer with at least 5 years of experience
      • A minimum of 5 years of software development experience in large scale distributed environment
      • Solid understanding of enterprise application technologies
      • Object Oriented analysis and design using common design patterns
      • Excellent knowledge of Relational Databases
      • Ability to work independently with limited supervision as well as contribute to team efforts is required
    • Wanted Skills:
      • DB2 database knowledge
      • MQ service knowledge
  • Whitehouse Station, NJSenior Test Automation Engineer through Chubb
    • Required Skills:
      • At least 10 years of experience within a total Information Technology (IT) environment
      • At least 5 years of experience in quality engineering
      • At least 3 years of experience in designing and developing automation frameworks with expertise in front and back-end test automation architecture, methodologies, processes and tools for web, desktop and mainframe applications
      • Broad technical background preferably with Java, JavaScript, TypeScript, C#, Smalltalk, SQL, micro services and mainframe technologies
      • Expertise in Selenium, SoapUI, Junit, BDD (Cucumber/Gherkin) and UFT
      • Experience with DevOps tools such as Jenkins, GitHub, SonarQube, and JIRA preferred
      • Proven ability to operate in a fast paced, dynamic environment while delivering high-quality work on tight schedules
      • Proven analytical and problem solving skills with strong ability to challenge the status quo
      • Strong leadership skills including experience in leading local and global vendor partner resources
      • Excellent communication, collaboration and interpersonal skills
    • Wanted Skills:
      • 2+ years’ experience in an agile development environment
      • Expertise in service virtualization
      • Experience in financial services information technology industry highly desired
Good luck with your job hunting,
James T. Savidge

View James T. Savidge's profile on LinkedIn

This blog’s RSS Feed

October 01, 2019

Nicolas Cellier - Simple piSin piCos mathematical function in Squeak

Working with radians is great, because we have the derivatives of sine function being the cosine function, and derivative of cosine being the sine negated. I always ask engineers to work with radians, which avoids many mistakes!

But when it comes to handling the periodicity modulo 2π electronically, radians are not so great because π is irrational and hardly representable as a Float value!

With Attitude and Heading Reference System delivering vehicle heading in degrees or other fractions of π, conversion to radians somehow introduce unecessary numerical noise.

To work around this, many libm provide a sinpi(x) which computes sin(π x), and there is a similar sin_pi in boost library.

I was seeking for simplest implementation that could possibly work, so I decided to give it a try in Squeak Smalltalk: these mathematical functions are called like this:

     1 piCos = -1.
     (1/2) piSin = 1.

See http://www.squeaksource.com/NumberExtensions/Math-Number-Extensions-nice.6.diff.
And the tests http://www.squeaksource.com/NumberExtensions/Math-Number-ExtensionsTests-nice.1.diff.

It's a very simple implementation: reduce receiver in the interval -1/4,1/4 that is reduce the angle argument in the interval -π/4,π/4, then fallback to Float approximation of sin(π x) or cos(π x).

The nice thing is that we can afford to answer an exact value for every case when the sine or cosine value takes a rational value. This could only happen for infinitely many irrational receivers that we cannot represent (so we don't care), and a handful of rational fraction of π once we performed argument (receiver in our case) reduction. That's the Nivens theorem - See http://mathworld.wolfram.com/NivensTheorem.html and I would not have imagined that it could be so cheap before implementing it!

The only thing that bothers me, is that this exactness cost me the weak monotonicity property locally. For example, we may expect that:

    (1/6 + (1<<100) reciprocal) piSin >= (1/6) piSin.

But it's not the case... It happens that:

    (1/6 + (1<<100) reciprocal) asFloat < (1/6) and:
        [ (Float pi) < (1 asArbitraryPrecisionFloatNumBits: 100) pi ].

With such cumulated rounding by default, the floating point approximation falls short:

    ((1/6+(1<<100) reciprocal) * Float pi) sin = 0.5 predecessor.

This is where a bit more precision before the float conversion would help:

    ((1 asArbitraryPrecisionFloatNumBits: 100) pi / 6) asFloat sin = 0.5.

Weak monotonicity is preserved for Float receiver, which is already something, but I see no easy solution for the case of exact arithmetic. If I try with a longer approximation of π, then the weak monotonicity may break for mixed arithmetic, I'll have to come back to it... Fortunately, π/6 is the only case to handle (all reductions should be exact).

In Squeak there is a degreeCos and degreeSin message already that I tweaked some years ago, but those could further benefit from this new piSin and piCos functions (err, messages!). This little experiment might end up in Squeak trunk if there is some interest.

September 29, 2019

Craig Latta - Caffeine updated for Pharo 7

Pharo 7 running on the SqueakJS virtual machine in Chrome, debugged by Squeak in a DevTools panel

I’ve updated Caffeine to run Pharo 7; please try it out! There was one virtual machine bug (primitivePerformWithArguments wasn’t manipulating the stack correctly), and I had to turn off a few Pharo features (like libGit support, which uses LibC, something I haven’t faked in the virtual machine yet).

Many thanks to the Pharo hackers in the RMOD team at INRIA Lille, for hosting me at their sprint on Friday, 27 September 2019. It was great hanging out and coding with you all. We’ll get that Pharo Apple Watch screenshot soon. :)

September 26, 2019

Pharo Weekly - PharoCom

Hi,

I finally got some time to check Pablo’s PharoCOM package closely. At first
I had problems with simple things, like making Word visible with
properyNamed:put: (it’s frustrating when you see the app on the processes
list but you cannot control it :-)) but then I found the reason – it was a
tiny detail in Win32VariantBool>>#write:to:, and then – voila!

Here’s an example of opening Word for Windows, adding a blank document,
typing some text and getting this text back to Pharo:

Ole32Lib uniqueInstance initLibrary.
wrd := COMDispatchInstance createInstanceByName: ‘Word.Application’.
wrd propertyNamed: ‘Visible’ put: true.

docs := wrd propertyNamed: ‘Documents’.
docs dispatch: ‘Add’.

sel := wrd propertyNamed: ‘Selection’.
sel dispatch: ‘TypeText’ withArguments: {‘Hello from Pharo!’}.

sel dispatch: ‘WholeStory’ .
Transcript show: (sel propertyNamed: ‘Text’); cr.

Another example is with Active Data Objects to get DB access:

conn := COMDispatchInstance createInstanceByName: ‘ADODB.Connection’ .
conn dispatch: ‘Open’ withArguments: { ‘DSN=this; Uid=that; Pwd=theOther;’ }
.
conn propertyNamed: ‘State’ . –> true!
rst := (COMDispatchInstance createInstanceByName: ‘ADODB.Recordset’) .
rst dispatch: ‘Open’ withArguments: { ‘SomeTableName’ . conn . 3 . 1 }.

The last line raises an exception because not all of the data types that
functions are reporting are implemented yet, as Pablo mentioned in his post.

The package is really nicely prepared. The most impressive is it’s
reflective capability. My “proof of concept” work with DispHelper library
that I mentioned in another forum topic was successful (I can get to the SQL
Server :-)), however it’s a dead-end regarding the reflection.

I’m very interested in COM implementation since I found Pharo to be very
useful as a tool, and since I work in “windowed” environment the COM
interaction is crucial to me. I decided to spent my free evenings working on
the project finalization. I’m not sure of how long will it take though 🙂
Pablo, I hope that I can count on your help regarding the questions about
the overall architecture that you set.

Is anybody else interested in this? Maybe we can join our efforts.

Best wishes,
Tomaz

September 25, 2019

Cincom Smalltalk - Smalltalk Digest: September Edition

In this edition, we share some stories about Cincom Smalltalk, talk about some events and share why our Academic programs could benefit you.

The post Smalltalk Digest: September Edition appeared first on Cincom Smalltalk.

Cincom Smalltalk - Where Did the Cincom Smalltalk Product Team Share Smalltalk?

The Cincom Smalltalk Product Team has the unique privilege of working with all aspects of the Smalltalk product line globally, while being actively engaged in customer, partner and user relationships. […]

The post Where Did the Cincom Smalltalk Product Team Share Smalltalk? appeared first on Cincom Smalltalk.

Cincom Smalltalk - How Can Cincom Better Communicate with the Cincom Smalltalk Community and You?

In a recent Cincom Smalltalk Digest article, we mentioned how comments from strangers, tire kickers, curious onlookers and fresh eyes at recent conferences and meetups have changed the thinking of […]

The post How Can Cincom Better Communicate with the Cincom Smalltalk Community and You? appeared first on Cincom Smalltalk.

September 24, 2019

ESUG news - Smalltalk WebCamp: October 22nd

  • Date: Tuesday October 22nd, 2019 (9h30 -> 18h00)
  • Location: Yesplan offices in Gent, Belgium.

This is an un-conference: everyone is invited to actively participate by presenting their project. Come and share your web development experience with Smalltalk.

Wether you are doing Seaside, Teapot, PharoJS, Amber, SqueakJs, Zinc REST, … or anything else that involves Smalltalk and web technologies: come and share your experience!

We provide ample time to discuss and collaborate on topics, meet people and have a beer in the evening.

Attendance is free, but please register before October 15th if you are attending, so we can plan accordingly.

Registration link: https://www.eventbrite.com/e/smalltalk-webcamp-tickets-69185265993

At this time, there are 9 participants, excluding the Yesplan team.

September 22, 2019

Smalltalk Jobs - Smalltalk Jobs 9/22/19

  • Hunt Valley, MD – Smalltalk Programmer through Data Resource Technologies
    • Required Skills:
      • Extensive working experience in Smalltalk language using IBM Visual Age Smalltalk, Object Studio, Visual Smalltalk and Visual Works Smalltalk
      • Unix background Unix scripting like Korn shell, AWK
      • Ability to work under heavy load and on parallel projects
    • Wanted Skills:
      • SmallTalk application hosting using JBoss or similar middleware
      • Solid coordination skills
    • Pay: $60 to $65 USD Hourly
    • Additional listings: Data Resource Technologies, ApTask, Scintel Technologies, Matlen Silver

Updates on 10/2/19: Added listings for the position.

Updates on 10/13/19: Marked out expired listings for the position.

Good luck with your job hunting,
James T. Savidge

View James T. Savidge's profile on LinkedIn

This blog’s RSS Feed

Craig Latta - Exploring the Netflix player with the Caffeine Chrome extension

debugging Better Call Saul with Caffeine

With the latest version of the Caffeine Chrome extension, you can run Caffeine in a Chrome DevTools panel, with access to all the Chrome debugging APIs. I’ve been using it to explore the Netflix video player, for an app I’m writing that enables the viewer to edit narratives by rearranging scenes.

From a quick look at the DOM element tree for the player, it’s apparent that it’s a React app. By following a reference chain from a user interface element (like the skip-forward button), through the bound “this” object of its click-event listener, I found the internal React properties for all the player’s UI elements, and all the player functions they use (for example, for seeking forward in a video).

With those functions in hand, I made a Netflix player class in Smalltalk, which can manipulate the Netflix player React app interactively from Smalltalk code. Other objects I made representing show elements (like scenes, episodes, seasons, and series) can use my player to compile analytic information about shows, and present them in different ways. For example, you could watch an episode of Better Call Saul consisting only of scenes that include a certain character, or that take place at a certain location, or with flashbacks placed in chronological order. This is for a webapp I’m writing called Arc.

I’m eager to see what else you explore using the Caffeine extension in the DevTools!

September 20, 2019

Cincom Smalltalk - What Is the Easiest Way to Become a Cincom Smalltalk Customer?

For individuals who are looking to start a business but need a jumpstart, one exciting program we have to help you is the Cincom Smalltalk REV Program.  The REV program is […]

The post What Is the Easiest Way to Become a Cincom Smalltalk Customer? appeared first on Cincom Smalltalk.