Re: [Pharo-users] STON question

2020-07-02 Thread Esteban Maringolo
On Thu, Jul 2, 2020 at 11:46 AM Sean P. DeNigris wrote: > > Sven Van Caekenberghe-2 wrote > > there is now basic support for SortCollections using SortFunctions. > > Cool! This would be great to have in Fuel as well. There is a slow and > steady stream of users running into trouble trying to

Re: [Pharo-users] STON question

2020-07-01 Thread Esteban Maringolo
Thank you Sven! This is really convenient. SortFunctions are really cool. Esteban A. Maringolo On Tue, Jun 30, 2020 at 6:06 PM Sven Van Caekenberghe wrote: > > Hi Stef, > > With the following commit > https://github.com/svenvc/ston/commit/3565d388172b76c180454575d4c2f71019f130c4 > > there is

Re: [Pharo-users] [Pharo-dev] [ANN] PharoPro

2020-06-17 Thread Esteban Maringolo
Hi Norbert, Congratulations for the initiative! I look forward to your success. Best regards! Esteban A. Maringolo On Wed, Jun 17, 2020 at 5:35 AM Norbert Hartl wrote: > > Dear community, > > we are very proud to announce the availability of PharoPro, a company that > offers professional

Re: [Pharo-users] a simple question (I think)

2020-06-17 Thread Esteban Maringolo
Objects interact with each other by sending messages, although you can get the sender by using reflection (thisContext sender), it is not a common practice to do so. So if you need another object to know the sender (or any other object) you simply pass it as a parameter. So modifying your

Re: [Pharo-users] Willow-Seaside serving static files

2020-06-14 Thread Esteban Maringolo
The handler at /files (WAFileManager?), is set to explicitly forbid listing of files. El dom., 14 de junio de 2020 07:33, Tomaž Turk escribió: > Hi, I added an image to a subclass of WAFileLibrary to serve it as a > static file from within Pharo. Everything seems fine, except that the > /files

Re: [Pharo-users] [ANN] What are reasons NOT to use Smalltalk?

2020-06-19 Thread Esteban Maringolo
In my case it didn't let me vote at all, it assumed I already voted. I started a private tab, disabled tracking (it tracks a lot for a single post), and then saw the options, and there wasn't a "none of the above/other" kind of option. So I didn't vote. Esteban A. Maringolo On Fri, Jun 19, 2020

Re: [Pharo-users] Class side vs instance side (variables and methods)

2020-07-28 Thread Esteban Maringolo
Hi, The "class vs instance" side is one of the most confusing things for newcomers, I remember struggling with it when I learnt Smalltalk (and also was a novice in OOP). It helps you thinking it this way: the instance side is everything that will affect all instances of such class, and you can

[Pharo-users] Re: is there a better way

2021-01-06 Thread Esteban Maringolo
To avoid doing something like that, and for a web scrapping tool I wrote, I implemented a basic subclass of ZnClient (called ZnCachingClient) that used a disk cache where each key/file was the hash of the requested URL. I haven't used in a while but it should continue to work, in any case, I

[Pharo-users] Re: [ANN] Foliage: a static site generator

2021-01-18 Thread Esteban Maringolo
Hi Norbert, Thanks for sharing it! ps: In spanish a sheet of paper and a tree leaf also share the same word, so "Follaje" means the same thing. Esteban A. Maringolo On Mon, Jan 18, 2021 at 11:11 AM Norbert Hartl wrote: > > Hi, > > I’ve been toying around with a web site generator the last

[Pharo-users] Re: [ANN] Pharo-ODBC

2021-06-14 Thread Esteban Maringolo
Thank you John! This is very good news! Best regards, Esteban A. Maringolo On Mon, Jun 14, 2021 at 6:29 AM John Aspinall wrote: > > There is now an ODBC framework for Pharo, available at the pharo-rdbms github > site: > > https://github.com/pharo-rdbms/Pharo-ODBC > > This is based on the

[Pharo-users] Re: Rounding in Floats

2021-06-16 Thread Esteban Maringolo
On Wed, Jun 16, 2021 at 9:13 AM Konrad Hinsen wrote: > > On 15/06/2021 16:05, Esteban Maringolo wrote: > > And in this particular case, it might cause issues, since the "full > > precision" (whatever that means) must be retained when using such a > > number to de

[Pharo-users] Re: Rounding in Floats

2021-06-14 Thread Esteban Maringolo
s about these problems. Best regards, [1] Dolphin Smalltalk, JS, Python, Ruby, Dart produces the same output as Pharo. [2] VisualWorks, VAST, Excel, VB and all calculators I tried Esteban A. Maringolo On Tue, Sep 8, 2020 at 12:45 AM Esteban Maringolo wrote: > > On Tue, Sep 8, 202

[Pharo-users] Re: Rounding in Floats

2021-06-14 Thread Esteban Maringolo
Hi Sven, > > If in Pharo [1] you do: > > a := 6.7 + (32.8 - 35) > > It will produce: > > 4.497 > > Which, when rounded, will produce 4. > But, > a roundTo: 0.1 "=> 4.5" Sure, but what initiated this thread was a reference to roundTo: 0.1 which produced a "wrong" output. (9.1 +

[Pharo-users] Re: Rounding in Floats

2021-06-14 Thread Esteban Maringolo
but in this particular case s was 113 so it removed the "troubling" part. > That or get agreement on "de minimis non curat lex". I had to search for that expression. Now I know, I agree. Regards, Esteban A. Maringolo > > > On Tue, 15 Jun 2021 at 08:45, Esteban Maring

[Pharo-users] Re: Rounding in Floats

2021-06-16 Thread Esteban Maringolo
On Wed, Jun 16, 2021 at 10:49 AM Richard O'Keefe wrote: > The problem is that while it is possible to read the ANSI Smalltalk standard > as requiring ScaledDecimals to be fixed point numbers (which are a kind of > exact rational number of the form x * 10**y, x and y integers), in Squeak and >

[Pharo-users] Re: Rounding in Floats

2021-06-16 Thread Esteban Maringolo
On Wed, Jun 16, 2021 at 10:52 AM Sven Van Caekenberghe wrote: > > I am also a bit intrigued by this. Like you said: several other programming > languages (I tried a couple of Common Lisp and Scheme implementations) do the > same as Pharo, but handheld calculators, normal and scientific, do not.

[Pharo-users] Re: Rounding in Floats

2021-06-16 Thread Esteban Maringolo
I didn't know there were decimal floats. Are they used elsewhere? Esteban A. Maringolo On Wed, Jun 16, 2021 at 11:20 AM Konrad Hinsen wrote: > > On 16/06/2021 15:52, Sven Van Caekenberghe wrote: > > I am also a bit intrigued by this. Like you said: several other programming > > languages (I

[Pharo-users] Re: Rounding in Floats

2021-06-15 Thread Esteban Maringolo
y coincidence, I prepared exam questions > about floats for my students yesterday. ) > > Kind regards, > Steffen > > > Konrad Hinsen schrieb am Dienstag, 15. Juni 2021 07:02:30 (+02:00): > > > On 15/06/2021 01:03, Esteban Maringolo wrote: > > > Sure, but what in

[Pharo-users] Re: Rounding in Floats

2021-06-15 Thread Esteban Maringolo
ss your entire calculation to use exact > > > arithmetic. > > > > I really don't know how to do this, any pointers? > > > > Nothing is more straightforward than addition and subtraction to me, > > 6.7 - 2.2 is the simplest it can get. > > > > The common

[Pharo-users] Re: Rounding in Floats

2021-06-15 Thread Esteban Maringolo
nteresting > to look at the code. > > But I am far from an expert. > > > On 14 Jun 2021, at 23:23, Sven Van Caekenberghe wrote: > > > > > > > >> On 14 Jun 2021, at 22:44, Esteban Maringolo wrote: > >> > >> I'm coming back to this be

[Pharo-users] Re: Communication between different images

2021-06-29 Thread Esteban Maringolo
steban, > > > On 29 Jun 2021, at 04:55, Esteban Maringolo wrote: > > > > Hi, > > > > I'm rearchitecting a web app to perform updates only when necessary > > (instead of computing them all the time) on each request, I can have a > > global announcer and sub

[Pharo-users] Re: Communication between different images

2021-06-29 Thread Esteban Maringolo
eviously installed on your system. > It was ported from http://smalltalkhub.com/#!/~panuw/zeromq now it is at: > https://github.com/dellani/zeroMQ but I'm not sure if the original repo works > on newer PharosI had no time to contact the original author to join both > repos... > > &g

[Pharo-users] Re: Communication between different images

2021-06-29 Thread Esteban Maringolo
? Regards! Esteban A. Maringolo On Tue, Jun 29, 2021 at 3:44 PM Gabriel Cotelli wrote: > > If you want to use Rabbit you can also take a look at Ansible for connecting > using the protocol instead of STOMP. > > On Tue, Jun 29, 2021 at 3:11 PM Esteban Maringolo > wrote:

[Pharo-users] Re: Communication between different images

2021-07-01 Thread Esteban Maringolo
having my images living for months sometimes). Thanks in advance. Regards! Esteban A. Maringolo On Wed, Jun 30, 2021 at 5:00 AM Sven Van Caekenberghe wrote: > > > > > On 30 Jun 2021, at 01:28, Esteban Maringolo wrote: > > > > I like the Ansible approach

[Pharo-users] Re: Communication between different images

2021-07-01 Thread Esteban Maringolo
On Thu, Jul 1, 2021 at 3:00 PM Jesus Mari Aguirre wrote: > > As far as I know, zmq doesn't need a broker but subscribers should know the > address of the publisher, if the network increases its complexity with more > publishers you need a broker, that is a proxy on zmq. > If I understand well

[Pharo-users] Communication between different images

2021-06-28 Thread Esteban Maringolo
Hi, I'm rearchitecting a web app to perform updates only when necessary (instead of computing them all the time) on each request, I can have a global announcer and subscribers to know when to update within an image, but is there a way to have something like that but for inter-image coordination?

[Pharo-users] Flattening traits

2021-07-12 Thread Esteban Maringolo
Hi, What is the way, ideally programmatic, to flatten traits into regular methods of their user classes? I remember there was an option in the UI, but I couldn't find it, and there is nothing about it in the general documentation [1]. Thanks! [1]

[Pharo-users] Re: Announcements - and whether its bad to check if a subscription would be handled?

2021-04-27 Thread Esteban Maringolo
Exceptions are real, so your use case might justify it. In my experience I never had to test whether an announcer has some subscription, and before using announcements whether an object has some "listener" to some event. I always saw announcements as a fire and forget kind of architecture. Not

[Pharo-users] Re: creating a subclass in system browser

2021-04-27 Thread Esteban Maringolo
It's been there as a refactoring for a while. Why a refactoring? Who knows... Esteban A. Maringolo On Tue, Apr 27, 2021 at 1:59 PM kmo wrote: > / a red circled exclamation point (hovering says 'Refactorings' - which > has a > menu for the +New subclass./ > > That sounds completely horrible.

[Pharo-users] SQLite3 primitiveFailed after FFI call

2021-04-30 Thread Esteban Maringolo
Hi all, I'm having a strange issue when executing a query with the SQLite3 driver (via GLORP). In: SQLite3Library>>#apiPrepare: dbHandle withSQLText: anSQLText with: textSize with: sHandle with: tail "int sqlite3_prepare_v2(sqlite3*, const char*, int, sqlite3_stmt**, const char **)" ^ self

[Pharo-users] Re: Announcements - and whether its bad to check if a subscription would be handled?

2021-04-27 Thread Esteban Maringolo
The bubbling up is very common in UI, I don't know how it is implemented though. I don't know if event handling is programmed using events or imperative calls to continue "bubbling" up, or... the event is handler by the container presenter and passed down to the target (e.g. a button). So the end

[Pharo-users] Re: Whats the easiest/cheapest way to run a Pharo web app in 2021?

2021-04-02 Thread Esteban Maringolo
I've been running a Pharo application since August last year, initially setup with everything inside a Docker swarm (database, reverse proxy and Pharo workers for the UI and REST API). I wanted to give Docker a try because I thought it was going to be "better". After having some issues with the

[Pharo-users] Simple statistics package?

2021-03-08 Thread Esteban Maringolo
Hi, I need to perform simple statistical analysis over a small set of objects (~10-1000 max), basic stuff like getting the quartiles, mean, average of a certain set and perform moving averages. I'm looking for something where I can pass a collection of objects of my domain, an accessor and get

[Pharo-users] Re: Postgres P3 Driver in seaside/web apps - strategy for "prepare:"

2021-04-19 Thread Esteban Maringolo
Not completely related, but also not unrelated. (?) You can pool your connections in the server side by means of pg_bouncer [1] to scale tenfold (or more) the connectivity to your PostgreSQL server. So you can program with P3Client and then when you need to scale the connectivity, simply do it on

[Pharo-users] Re: Whats the easiest/cheapest way to run a Pharo web app in 2021?

2021-04-13 Thread Esteban Maringolo
l month 24/7. > > > > Thanks to the fact that Pharo has a full JIT VM on ARM64, this is crazy > > fast as well. > > > > I am sure that the reason this is so cheap is the fact that it is super > > efficient. > > > > You can try this easily for yoursel

[Pharo-users] Re: We haven't had a design debate in a while - thoughts on CD.buy article...

2021-04-16 Thread Esteban Maringolo
I saw a tweet about that, and I think that the example is misleading, maybe intentionally so. I don't think anybody would model it that way, in any case you'd have aProduct.buy() or aProduct.addToCart(aCart). If you think it with the typical dog.bark() it certainly makes more sense than

[Pharo-users] Re: Whats the easiest/cheapest way to run a Pharo web app in 2021?

2021-04-12 Thread Esteban Maringolo
What do you use that's so cheap/affordable? El lun., 12 de abril de 2021 04:48, Norbert Hartl escribió: > > > > Am 12.04.2021 um 04:02 schrieb Jeff Gray : > > > > Considering easiest and cheapest, there's always self hosting, or are you > > discounting that idea? > > Most geeks have a bit of

[Pharo-users] Re: Private Methods

2021-08-23 Thread Esteban Maringolo
If something, I'd rather have _ as a prefix indicating a private method, very much like Dart does. But why use a "syntax" trick when it could be an attribute of the CompiledMethod itself? As for many private methods being a code smell... it could be, but it depends, until you find the right

[Pharo-users] Re: Pharo-SQLite3: closing connections immediately and deleting the database file

2021-08-12 Thread Esteban Maringolo
g 2021 at 23:23, Esteban Maringolo wrote: >> >> I've been doing exactly that. It is, creating a new DB file for each >> test, and I was having the same problem as you. >> >> I suggested a change to the driver to cover that situation: >> https://github.com/pharo-r

[Pharo-users] Re: Private Methods

2021-08-17 Thread Esteban Maringolo
I don't understand the request? Wouldn't tagging methods as private (as a first class attribute, and not only its category) be enough? What you ask for seems to be a splitted method dictionary of some sort. Having first class private methods would save you from autocomplete selector "pollution"

[Pharo-users] Re: Silly question about storing and displaying currency amounts?

2021-08-30 Thread Esteban Maringolo
I was recently bitten by this wrong "scaled decimal expectation", in which what I thought was wrong it actually wasn't, or I can't tell whether it was. I would expect that a scaled decimal would be something like what Esteban L. suggests, an integer where you just move the decimal point for

[Pharo-users] Re: Private Methods

2021-08-19 Thread Esteban Maringolo
Public/Private is not just a category, it is also a declaration of what is the interface of the object. As I said, it's not critical, but I've been working with and without a "native" private method, and I prefer working with them. Namespacing is a different animal, and not as simple to implement

[Pharo-users] Re: Private Methods

2021-08-18 Thread Esteban Maringolo
ed, Aug 18, 2021 at 9:47 AM Noury Bouraqadi wrote: > > Hi Esteban, > > Which first "class attribute" are you referring to? Is it a pragma? Can you > provide an example please ? > > Thanx > Noury > > On Aug 17 2021, at 10:31 pm, Esteban Maringolo wrote: > &

[Pharo-users] Re: Logging Frameworks

2021-08-09 Thread Esteban Maringolo
because we want to settle on some option as the default for > our Pharo components. > > On Sun, Aug 8, 2021 at 11:29 AM Esteban Maringolo > wrote: >> >> What are the current options for logging? >> >> Beacon seems to be the most modern one, but the Github repo

[Pharo-users] Re: Logging Frameworks

2021-08-09 Thread Esteban Maringolo
orwarding the logs to a > centralized place. I'm also interested in other's experiences regarding > logging options because we want to settle on some option as the default for > our Pharo components. > > On Sun, Aug 8, 2021 at 11:29 AM Esteban Maringolo > wrote: >> >>

[Pharo-users] Re: Pharo-SQLite3: closing connections immediately and deleting the database file

2021-08-07 Thread Esteban Maringolo
I've been doing exactly that. It is, creating a new DB file for each test, and I was having the same problem as you. I suggested a change to the driver to cover that situation: https://github.com/pharo-rdbms/Pharo-SQLite3/pull/22/files Try applying that change and see if that works. I still

[Pharo-users] Logging Frameworks

2021-08-08 Thread Esteban Maringolo
What are the current options for logging? Beacon seems to be the most modern one, but the Github repository doesn't seem very active (maybe it forked somewhere else). Given that the logs might come from different worker images, is there something that can work via HTTP or similar? (it is,

[Pharo-users] Re: [ANN] Bootstrap 5 for Seaside in Pharo

2021-07-30 Thread Esteban Maringolo
Hi Sanjay, Have you looked at the differences between BS4 and BS5? Among the main differences are: - removes jQuery as a dependency and uses vanilla JS instead. - replaces default looking form elements by styled ones If you're starting from scratch it might be worth trying it, and maybe fix

[Pharo-users] Re: [ANN] Bootstrap 5 for Seaside in Pharo

2021-07-30 Thread Esteban Maringolo
Yeap, I like how they're built, and it has a good use case for Traits! I'm using both BS3 and BS4, the latter has more support for CSS Flex layout (which I still don't master). Thanks for this! I'll have to catch up and update my related extensions [1]. Best regards! [1]

[Pharo-users] Re: Strategies for (re)using HTTP client

2021-11-01 Thread Esteban Maringolo
A. Maringolo On Mon, Nov 1, 2021 at 1:39 PM Esteban Maringolo wrote: > Thank you Sven. > > I'll go with instantiating a new client for each request, the less state > shared, the better :-) > > Regards! > > Esteban A. Maringolo > > > On Fri, Oct 29, 2021 at 12:15

[Pharo-users] Strategies for (re)using HTTP client

2021-10-29 Thread Esteban Maringolo
Hi, I happened to me more than once that I have to create some REST service "client" in which I usually wrap an HTTP client inside (ZnClient in this case), and all the calls to the service, end up using the HTTP client, inside some mutex to serialize the execution. But I don't like that, in

[Pharo-users] Re: Strategies for (re)using HTTP client

2021-11-03 Thread Esteban Maringolo
//github.com/svenvc/zinc/commit/d9fe41707b16748b9340540127ec5d77800856b6 > > > On 1 Nov 2021, at 21:22, Sven Van Caekenberghe wrote: > > > > > > > >> On 1 Nov 2021, at 20:03, Esteban Maringolo > wrote: > >> > >> If I need to use cookies, wou

[Pharo-users] Re: Strategies for (re)using HTTP client

2021-11-01 Thread Esteban Maringolo
Thank you Sven. I'll go with instantiating a new client for each request, the less state shared, the better :-) Regards! Esteban A. Maringolo On Fri, Oct 29, 2021 at 12:15 PM Sven Van Caekenberghe wrote: > Hi, > > > On 29 Oct 2021, at 15:42, Esteban Maringolo > wrote: > &

[Pharo-users] Re: ZnServer on a cheap server: your experiences

2021-07-22 Thread Esteban Maringolo
Yeap, not much more to add than what Sven said. What's important to mention is that they are really stable. I've been running Pharo servers in DO droplets of all sizes, without issues (some running for months), I only had to upscale one droplet to more memory, and it was because of a leak I

[Pharo-users] Re: [Pharo-dev] [ANN] Pharo 9 released!

2021-07-16 Thread Esteban Maringolo
Thanks team. Impressive release. Keep up the good work! Esteban A. Maringolo On Thu, Jul 15, 2021 at 6:14 AM Esteban Lorenzano wrote: > Dear World and dynamic language lovers: > > The time has come for Pharo 9 ! > > Pharo is a pure object-oriented programming language

[Pharo-users] Re: The Greatest Contributors to Smalltalk since 1980

2021-07-25 Thread Esteban Maringolo
On Sun, Jul 25, 2021 at 11:31 AM Tim Mackinnon wrote: > Isn’t this the wrong question to ask? I’m assuming this is to do with > Smalltalk’s 50th anniversary, and of course we are grateful to those early > pioneers who did lots of work in the field 20-30 years ago but to me that’s > the old

[Pharo-users] Zinc exception logging

2021-07-25 Thread Esteban Maringolo
Is there a way to have a "stack dump" response in Zinc? #debugMode is good for development, but I'm having an "Internal Error: 4", that I don't know how to trace. * Trying 167.71.182.110... * TCP_NODELAY set * Connected to fore.base.golf (167.71.182.110) port 8090 (#0) > GET /web HTTP/1.1 >

[Pharo-users] Re: Zinc exception logging

2021-07-26 Thread Esteban Maringolo
26, 2021 at 3:16 AM Sven Van Caekenberghe wrote: > > Hi Esteban, > > > On 26 Jul 2021, at 02:47, Esteban Maringolo wrote: > > > > Is there a way to have a "stack dump" response in Zinc? > > > > #debugMode is good for development, but I'm having

[Pharo-users] Re: Null Object Pattern

2022-03-17 Thread Esteban Maringolo
Just to add another argument in favor of not inlining some message sends, is for instance in things like Glorp you need to use a special selector for #and:/#or: message sends, breaking not only the naming conventions but also the polymorphism. E.g. you have to use #AND: and #OR: to avoid

[Pharo-users] Re: Null Object Pattern

2022-03-15 Thread Esteban Maringolo
+1 Inlining breaks the fundamental piece of OOP: Message sends. I'm sure there are use cases where inlining adds a significant speedup, but for some messages, I prefer them to be sent. Regards! Esteban A. Maringolo On Tue, Mar 15, 2022 at 3:16 PM wrote: > > I had some chaining that was

[Pharo-users] Re: Null Object Pattern

2022-03-21 Thread Esteban Maringolo
Being able to proxy to another object is such an important feature, that even in ES6 (aka "Javascript") there is a Proxy object [1] that allows you to intercept/redefine operations for that object. In the case of Smalltalk, and coming back to the original topic of this thread, that is even more

[Pharo-users] Re: Too many parenthesis - a matter of syntax

2022-01-26 Thread Esteban Maringolo
On Wed, Jan 26, 2022 at 10:58 AM gettimothy via Pharo-users wrote: > I realize this is just a preference, but the denseness forces me to think in > Objects and composition rather than process. I never thought of it this way, but I fully agree with it. Thanks for putting this in words. Maybe

[Pharo-users] Re: [Pharo-dev] [ANN] Pharo 10 released!

2022-04-06 Thread Esteban Maringolo
Congratulations to the core team and to the whole list of contributors! It's always good to see Smalltalk moving forward. Regards! Esteban A. Maringolo On Tue, Apr 5, 2022 at 7:40 AM Esteban Lorenzano wrote: > Dear Pharo users and dynamic language lovers: > > We have released Pharo version

[Pharo-users] Re: Null Object Pattern

2022-03-17 Thread Esteban Maringolo
for example. > > > > There is already the #compilerOptions: Pragma, e.g.: > > > For example this method compiled the and: as a real send: > tt > > true and: [ false ] > > > On Thu, Mar 17, 2022 at 8:17 AM Esteban Maringolo > wrote: >> A great trade off would b

[Pharo-users] Re: Null Object Pattern

2022-03-18 Thread Esteban Maringolo
On Fri, Mar 18, 2022 at 3:24 PM Todd Blanchard via Pharo-users wrote: > > What, exactly, is inconsistent about a key message isNil being allowed to be > overridden? Overrides are not the issue here. > There is a VERY simple solution to your problem that does not involve > disrupting the

[Pharo-users] Re: Omnibase/Monibase repository removal

2022-08-23 Thread Esteban Maringolo
There is a comment in one of the commits from 2005 (OmniBase-jf.2) that suggests that OmniBase had a free with restrictions license: http://www.squeaksource.com/@dZ70JMB-R7RDi4-m/Ox-ysyAT Also, licensing was messier these days, some of that mess creeps up until today. Esteban A. Maringolo On

[Pharo-users] Re: Wow - Chat GPT understands Smalltalk

2023-03-15 Thread Esteban Maringolo
It is good with boilerplate code (e.g. SQL queries) or general algorithm structures. But i.e. I asked it to write me a method to parse a string (e.g. ISO 8601) and turn it into a DateAndTime, and then asked to write it as an Excel formula. It works much better when you can spot the mistakes, you

<    1   2   3