Press J to jump to the feed. Press question mark to learn the rest of the keyboard shortcuts
Log In
Found the internet!
5
Posted by1 day ago
Background:

I've been wanting to learn a Smalltalk for a while now and I finally managed to get going with Pharo. I decided that my first (toy) project should be an implementation of Common Lisps car and cdr family of functions, with a twist.

Now this isn't exactly correct but car can be seen as returning the head of a list and cdr the rest of the list. Naturally you can compose these in various ways, for instance if we have the nested list '(a b (1 2) d) and we want to get the 2 we can call (cdr (car (cdr (cdr list)))). But Lisp offers an alternative function to get the same thing and that is cdaddr. If you didn't see it, that peculiar name can be traced to the nested function call above. (car (car list)) would be caar and (cdr (cdr list)) would be cddr. This forms a simple notation for accessing deeply nested structures.

Lisp has several of these predefined but in principle you could generate them since their behaviour can be easily derived from their names, and that's what i wanted to try in Pharo. Now this isn't a good idea to use in any serious code, but it is a fun idea.

Here's my project. It works fine but has a problem. I have overloaded doesNotUnderstand to parse all such messages, generate the code for a new method, compile it and then call it. This works when I do it manually, step by step, but not 'live' and I think the reason is that it takes time to compile but I don't wait for the compilation to complete before calling the new method.

Questions:
  • Is my assumption of error correct? Is it caused by my code not waiting for the new method to compile?

  • What can be done about it? Can I wait for a callback or is my entire idea fundamentally wrong?

5
1 comment
7
Posted by3 days ago

This month's UKSTUG online meeting introduces a new format whereby we'll give space to commercial companies to discuss how they make use of Smalltalk and contribute to the Smalltalk community.

The first of this series will be Mercap Software, represented by Gabriel Cotelli, Inés Sosa, Iván Boaretto, Matías Fernandez, and Maximiliano Tabacman.

During this talk, Mercap will showcase five of their solutions designed for different types of investors. They will shed light on how Mercap benefits from the open-source projects maintained by the Buenos Aires Smalltalk group on GitHub. They will share with you how they use these freely available frameworks to interact with databases, operate on math and time units, create custom CSS, declare interactions on web applications, display complex charts, manage application startup, and streamline the creation of Docker images.

Gabriel Cotelli is a CS bachelor, continuous learner & free-thinker. Supporter of libre knowledge, human intelligence augmentation and open source software. Working in Smalltalk at Mercap since 2004. He's an active member of the Smalltalk development community and regular contributor to open source projects in Buenos Aires Smalltalk and Pharo.

Inés Sosa writes code in Smalltalk.

Iván Boaretto is a software developer by day and a computer science student by night. He is very passionate about his craft and is always striving to improve. Now, in his first time at the Smalltalks, he is looking to attract new blood to the wonderful Smalltalk community.

Matías Fernandez is a software and tech enthusiast, and Smalltalk developer.

Maximiliano Tabacman has been a part of Mercap since he started his studies in IT, which now include a PhD in Computer Sciences from the Facultad de Ciencias Exactas y Naturales (UBA). His main interest is the design of systems that apply nature inspired concepts, such as evolutionary algorithms and neural networks. Smalltalk, with its object-message design, is his natural choice for a development platform. He is also the creator of ERA, a standalone web server application for running table-top roleplaying games, which runs on Windows, Mac and Linux.

This will be an online meeting from home.

If you'd like to join us, please sign up in advance on the meeting's Meetup page to receive the meeting details.

7
0 comments
9
Posted by8 days ago
9
0 comments
10
12
Posted by13 days ago
12
0 comments
8
Posted by19 days ago
8
0 comments
15
Posted by26 days ago
15
0 comments

About Community

Smalltalk is an object oriented programming language.
Created Apr 2, 2008

2.4k

Members

8

Online

Moderators

Moderator list hidden. Learn More