#grasp — Public Fediverse posts
Live and recent posts from across the Fediverse tagged #grasp, aggregated by home.social.
-
Чистая архитектура на практике: перестаём ломать сервис при каждом релизе
У вас небольшой релиз. Вы меняете пару строк кода, выкатываете обновление - и через несколько минут сервис начинает отдавать странные ошибки. Баги появляются в местах, которые вы вообще не трогали. Знакомо? Обычно проблема не в конкретном изменении, а в архитектурной связанности системы: инфраструктурные детали начинают протекать в бизнес-логику, и зависимости между компонентами становятся слишком плотными. Разберём это на примерах. Примеры будут псевдореальные, иначе статья быстро превратится в книгу. Посмотрите на функцию загрузки инвойса:
https://habr.com/ru/articles/1034758/
#clean_architecture #clean_code #architecture #программирование #проектирование_систем #шаблоны_проектирования #ооп #hexagonal_architecture #grasp #solid
-
I recently got back to my work on literate #GRASP, and I think things finally started to look good. I implemented a new document representation (the previous one was built from cons-cells and multiple hacks), and I have some working tests that are capable of rendering this representation to "unicode-art" strings, and I'm currently working on a new parser that would work well with that representation.
I still have a long way to go before I get a running system, and I don't think it's a very good literature, but if you're a #Scheme maniac or a fan of #LiterateProgramming and you don't find the #Java runtime environment too repulsive, I invite you to follow the work and provide your feedback:
https://github.com/panicz/grasp/blob/main/literate/grasp.org
Currently, when exported to pdf, the document has about 100 pages, and it mainly describes language extensions that were developed for Kawa Scheme to develop GRASP. I think it might be a delight to people who enjoy studying language extensions, but unfortunately the part about the architecture and implementation of GRASP has yet to be developed.
(the document is written in #Emacs #OrgMode using its #noweb component for literate programming. I recommend reading it from Emacs rather than from its github preview)
-
If Shimamura had Hung Out on the Stairs
#FanFic #AdachiAndShimamura
#Wss366 Grasp“I think you fail to #grasp how your attitude affects your sales…” Shimamura’s sales manager droned on and on. The office was stuffy and institutional, with nondescript paintings on the walls. The room’s only distinguishing feature was a large window overlooking a parking lot.
As usual, Shimamura wasn’t paying attention to the room or the lecture. If she didn’t mind the minuscule commissions she received, why did it matter? She earned enough to cover her rent and convenience store meals.
Normally, she just spaced out or watched the clock to see how soon she could go home to bed. Today, however, she watched a small figure in a spacesuit drift past the window. Sparkles followed it like a comet’s tail.
“Balloon?” she wondered. Not that she had ever seen a balloon like that before.
It stopped outside and bobbed up and down. Yeah, it must be a balloon, she thought, until it opened its helmet, exposing a girl’s face. The girl mouthed the word “soon” and then drifted off again.
“‘Soon’ for what?” Shimamura puzzled.
“Okay, get back to work, and I want to see some sparkle!” the manager said, interrupting her thoughts.
Shimamura bowed and left, thinking, “Maybe I’ll call in sick tomorrow.”
She sighed. “Better not. I’ll get fired. Why can’t it be like school, where I used to hang out alone on the stairs to the roof and spaced out?” Not that she had any great memories of high school.
“Excuse me. Where do these go?” she heard someone ask behind her.
Turning around, she saw the new sales clerk holding up a bathing suit.
“Wow, she’s pretty,” Shimamura thought. Long black hair framed the woman’s lovely, though vacant, face.
The woman fidgeted and looked down, apparently embarrassed.
Shimamura didn’t know the names of any of the sales staff. It was too much bother to learn them, but for once she read the other woman’s name badge: “Adachi Sakura.”
Somewhere, she thought she heard a voice say, “Fate.”
“I’ll show you,” Shimamura said.
#TootFic #MicroFiction #AdachiToShimamura #SliceOfLive #Yuri #Cute #NMFic
-
#ESA:
"
Flight-Ticket-Initiative: erste fünf Missionen mit Avio und Isar Aerospace gesichert
"
https://www.esa.int/Newsroom/Press_Releases/Flight-Ticket-Initiative_erste_fuenf_Missionen_mit_Avio_und_Isar_Aerospace_gesichert27.8.2025
#Avio #DLR #ETPack #GapMap1 #Grasp #InfiniteOrbits #IsarAerospace #Isispace #Persei #PlutoPlus #Rakete #Raumfahrt #rocketry #Satelliten #SpaceFlight #Spectrum #VegaC
-
-
I improved screen splitting/joining from keyboard and added some animatiions. It doesn't look that great on a phone, but is very satisfying with a desktop client
-
CW: Late spring update on GRASP
Today I made a first commit in the #GRASP repository since over a month.
I've been having difficult times getting up to speed with that project.
One reason for that was the desire to have a version of GRASP running in the browser. Another was the fact which I already mentioned, namely that my company's office has moved closer to my home, so I could no longer hack on GRASP on my way to work.
However, things have changed drastically a week ago, because I parted from my company, and now I am unemployed.
I also rented a co-working office with the plan to improve (and finally release) GRASP - hopefully before I run out of savings and be forced to look for another job.
So, when I wasn't working on GRASP, what was I working on?
- I developed jsssssssss, a self hosting (Something Similar to) Scheme to JavaScript translator
- I tried participating with my friend in the Lisp Game Jam (and while we eventually decided not to submit the fruit of our cooperation - because there was too much JavaScript and too little Scheme in it, the effect was that it advanced my friend's work on his book)
- and for the last two weeks, I've been wrestling with an implementation of the Hindley-Milner type system as an extension to Scheme, because I wanted to use it as a base of the POORMANS system (I can't call this attempt a complete success, but I have toy implementations of algorithms W and M, and I learned about Jacques Herbrand, so I'm kind of glad that I tried)I think that I needed a break from that project, and also that at some point I will have to do a rewrite - a one that would hopefully run in the browser as well.
I'm not sure whether to use jsssssssss or Hoot (my project has a much smaller memory footprint, but is also much less mature) - maybe I'll try targetting both?
In either case, I decided to improve the current implementation of GRASP to the point of making it usable. I may have to backtrack from some of the design decisions that I made along the way. I also hope to return to my work on the book.
So much for now.
-
Разбираем архитектуру. Часть 1. Чистая архитектура и её корни: история и взаимосвязи
Предисловие Цель этой статьи - объединить и кратко изложить все базовые архитектурные подходы: их терминологию, концепции и отличительные черты. Собрать всё воедино, чтобы можно было относительно быстро вникнуть в основы. Я решил написать серию статей, посвящённых различным аспектам проектирования программных систем, но первоначальной идеей было показать архитектурное решение моего pet-проекта на FastAPI — пример реализации «чистой архитектуры» с использованием современного стека: Python3.13, FastAPI, Uvicorn, Nginx, PostgreSQL, Alembic, Celery, Redis, Pytest, Filebeat, Logstash, Elasticsearch, Kibana, Prometheus, Grafana, Docker и Docker Compose. Однако по мере проработки деталей стало очевидно: чтобы обсуждать структуру приложения предметно и аргументированно, необходимо сначала заложить общую теоретическую основу, чтобы читатель понимал, о чем речь. Так родилась идея вынести базовые концепции архитектуры и проектирования в отдельную публикацию — не перегружать материал сразу всем, а построить серию объёмных, но логично связанных статей.
https://habr.com/ru/articles/905148/
#чистая_архитектура #чистый_код #ооп #проектирование_систем #терминология #шаблоны_проектирования #луковичная_архитектура #гексагональная_архитектура #solid #grasp
-
CW: Spring update on GRASP
It's been a while since I wrote a report on the progress of #GRASP
In large part, it's because things haven't been going too well lately. The fact that I no longer commute to work by train has a negative impact on my productivity.
I will likely start renting a co-working office starting next month. I'm also in the process of switching jobs.
So, my last few weeks were a kind of a mental diarrhea, when I was figuring out what to do next.
So I had a lot of ideas and very little accomplishments.
My current attitude is that in order to finish GRASP, I will have to start developing it from scratch. Maybe not entirely from scratch, because I think some parts of its design are completely fine, but I will probably start a new project, and just move some bits of the old one as I'll be needing them.
But this also leads me to the position of figuring out certain current shortcommings of GRASP. One of the problems is that I'm unable to run it in the browser. So last week I made a very simple Scheme to JS translator. (I call it jsssssssss, which stands for "JavaScript Scrounged from a Sophisticated Superset of a Simple Subset of Scheme or Something Similar")
Another thing is that I'd like to decouple GRASP from Kawa, and possibly be able to run it on top of other Scheme implementations. But I don't want to give up on the affordances that I get from Kawa, and in particular its type system, and so I'm looking for a way to transplant that system to some other Schemes, refining it along the way. It consists of a few components, including
- a subsystem for interface-based object-orientation
- a record system
- type signaturesThe system is going to be very similar to what I developed on top of Kawa, and described a while ago around here (under the #PlottingScheme tag). I originally thought of making a #lang for Racket, because I was hoping that I could use RacketScript to target the browser, but it turned out that RacketScript doesn't really suit my needs.
I still think of targetting Racket though, because it has its own object-orientation system that I think aligns fairly well with that of Kawa.
I would of course also want to have that system available in jsssssssss, and perhaps I will also try to make a version that works with Chez.
The system's name is POORMANS, which stands for Portable Object-Orientation/Reflection Module Across Numerous Schemes.
The development of jsssssssss made me revisit the old compiler that I wrote for my...
-
CW: GRASP ad
You think you're super-smart because you know how to exit vim?
You brag among your colleagues about being a proficient user of ed?
You no longer edit files in Emacs, because your elisp functions do that for you?
Then try edit anything in #GRASP, and see how far you can go.
I bet not too far.
-
GRASP: почему настоящая архитектура начинается не с SOLID
Хочу начать с личной предыстории. Давным-давно, как и многие из вас, я читал умные книжки: «Чистый код» и «Чистая архитектура» Роберта Мартина, «Совершенный код» Стива Макконнелла и другие. Также не обошли меня и классические принципы проектирования — SOLID , KISS , DRY — и, думаю, каждый читатель добавит сюда свои. Безусловно, это всё важные и фундаментальные вещи. Но однажды на горизонте появилось DDD — предметно-ориентированное проектирование в изложении Эрика Эванса. Именно его «синяя книга» стала культовой и задала язык для архитектурного мышления. Позже я открыл и «красную книгу» Вона Вернона, где DDD уже рассматривался с точки зрения практической имплементации: архитектура, код, реальные подходы в проектах. Читая Эванса, рассматривая его диаграммы классов и примеры кода, я всё думал: как он это делает? Самым большим открытием для меня стало то, что книга DDD хоть и показывает стратегические и тактические приёмы — агрегаты, объекты-значения, спецификации, фабрики и т.д. — но не учит проектировать саму предметную область . Складывалось ощущение, что мы это уже откуда-то должны были знать . А откуда — остаётся загадкой.
https://habr.com/ru/articles/900140/
#GRASP #паттерны_проектирования #архитектура #DDD #SOLID #OOP #чистая_архитектура #чистый_код
-
CW: Post-February GRASP development status
In February, I've been mostly involved with developing a simple physics engine for #GRASP
It is tangential to the editor itself, and completely inessential - but I felt that I had to write it, because a few months earlier I wrote a collision detection algorithm.
It mostly works, although there are some issues with collision detection, and the physical objects sometimes get through the walls.
But I wonder whether I would want to devote more time to this venture.
I've found that there is a physics engine written in Java called dyn4j, and I probably would be able to integrate it with GRASP easily, without all the burden of development and debugging (although that wasn't the purpose of this exercise).
Other than this, February wasn't a good month for me. I've spent the bigger part of it being sick and lying in bed, and despite working according to schedule, I feel that I've lost the rhythm.
Besides the office of the company that I work for has moved significantly closer to my home, so I no longer commute by train, and don't have that spare time to write code on my phone.
I think that I'm currently going through a sort of a crisis. I'm trying to figure out the way to monetize my work, because I will most likely be parting from my company in a few months.
I applied for a coworking office in a nearby technological park, and if my submission gets accepted, I plan to spend there one or two hours a day, doing some GRASP-related things.
Currently I will be focusing more on writing the book that I started writing. (At this moment, I'm around 4000 words, and while there's some room for improvement regarding the text, I am somewhat happy about what I already have. I plan to write around 80000 words, so it seems I'm at 5%, but of course this is hard to measure precisely.)
There are more things that I've been unhappy about, though. Recently, I started spending way too much time on X (formerly Twitter), partially due to the political events, but I also tried become more politically aware regarding the upcoming presidential elections in Poland. I find it terribly ironic that X (formerly Twitter) is still a place where the political discourse seems to be happening. But my overall impression is that interactions have gotten better than they used to be (I don't know if these are interactions with people or bots though).
-
Ok maybe collisions don't yet work the way they should, but the physics engine that I've been developing for #GRASP is slowly getting into shape:
-
I wrote about this before, but I think it needs more consideration.
When I work on #GRASP, I have a TODO file, wherein I make notes (almost) every day, writing at the top the today's date and then I begin a sort of a dialogue with myself, which sometimes consists only of a list of things to make, sometimes of certain design considerations, and sometimes of actual code which can afterwards (sometimes after many days) be moved elsewhere. And sometimes - conversely - I bring a lot of existing code pieces into one place to figure out how a particular feature works.
I wonder if other programmers also have similar workflows, and whether they use some tools that would support them?
(I only found out about Mylyn for Eclipse, but I've never used it. It seems to have a lot of good ideas though)
-
CW: No More Monthly Reports
In the early December of 2024 I made a list of things that I would like to fix before releasing #GRASP. I wrote it in a paper notebook, and even made some rough estimates for fixing them. I felt excited, because it seemed that the moment when I can start releasing GRASP (to @fdroidorg, at least initially) is really close.
Now that we're in the middle of January, I haven't touched almost any of those points.
I feel that GRASP is already mature enough that I could try pushing the release, and despite all the bugs, willing people could still find it useful, or at least worthy to play around with.
But even if editing was made flawlees, the current state of GRASP is still far from its "grand vision", which is a tool that would blend documents/books with applications, written in a way to promote code understandability.
So, here's the list of things that I wanted to fix:
- automatic workspace persistence
- using keyboard to navigate the menus
- proper search&replace
- drag&drop editing of strings and comments
- fully functioning undo (it has some bugs)
- scroll-bars
- hyper-textual help documents
- proper serialization and deserialization of extensionsI still want to do all those things. But I want to do that in the atmosphere of fun, rather than self-imposed pressure.
Other things that I'd like to have certainly include opening and closing boxes (by double-tapping on their left paren), scaling boxes to different sizes (and maybe changing their rotations as well?), and "pulling-the-rug splicing".
However, at this moment I feel that trying to live-code visual applications in GRASP is much cooler, and a much better driving force for the development.
Of course, if you fear that you're missing out by not using GRASP (which is probably true), feel free to join the project and help me release it sooner. (It's currently GPL, but I've been thinking about making it AGPL)
And don't be afraid to reach out ask questions - including some very basic ones.
Also, I decided to stop obligating myself to write monthly reports. I'm now switching to a more organic form of writing about GRASP, namely - whenever I feel like it (like, right now).
(If I'm going to "feel like writing about it once a month", it's going to get a bit cringy, but I guess I'll be OK with that)
-
@budsofstone I don't know, but @flatwhatson started a PreScheme restoration project (at prescheme.org), and there's rash-lang.org
I suspect there might be some people to whom scsh never went away.
Also, I think of #GRASP - a thing of my own making - to be a kind of a shell, but two-dimensional and optimized for tactile input
-
CW: Animation system in GRASP
One thing that I'm relatively happy about is the design of the animation system in #GRASP
Since GRASP can run in graphical environments as well as in terminal, all the rendering is mediated by the interface called Painter.
Painter is not a clear-cut, elegant abstraction. It has about 100 methods, and I think of it as a whimsical artist.
And among those, there is a method with the following signature:
(play! animation::Animation)::void
where Animation is a very simple interface, defined in the following way:
(define-interface Animation ()
;; if this method returns #f, it means
;; that the animation has ended and can
;; be discarded by the animation system
(advance! timestep/ms::int)::boolean)Now, the three clients of GRASP provide very different implementations of the play! method (and each of them is fairly complex): the AWT version uses a javax.swing.Timer to advance the animations, the terminal version uses java.util.concurrent.ScheduledThreadPoolExecutor:scheduleAtFixedRate, and the Android version uses android.os.Handler:postDelayed (as if that meant anything to you)
All three clients use a fixed tick period of 40ms, which would ideally amount to 25 frames per second - but this is neither documented nor guaranteed (which is why the advance! method receives the time delta from the previous call that it can rely on)
Currently there are three use cases for the animation system. One is screen repositioning, another is the visual stepper, and the last one is used for panning to the next search result.
-
for the first time in my life (and hopefully last) I had to use "eval" inside of a syntax-case guard (and I'm so sorry)
-
I now render a dark gray background before rendering a document in the graphical versions of #GRASP, which was very easy to implement, and I think immediately makes the experience much less confusing (and less canvasy).
Once I introduce scroll bars and forbid free rotation, the background will be visible never or almost never, but for now it should be fine.
-
CW: Is this the live coding we all deserve?
-
CW: GRASP development in 2024
While I think that I failed to fulfill any of the objectives that I set to myself for December, it was a month that filled me with hope - I managed to fix some of the most annoying bugs, and made #GRASP actually usable (although currently mainly for myself, because there's still one small bug that would probably confuse a lot of people if they tried to use it).
Another highlight of December was that I had a few days off from computers in general, and I think that I needed that badly (and I still have almost an entire week of vacation ahead of me).
Overall, I don't remember 2024 as a particularly good year; I remember spending a lot of time on improving the vertical cursor movement (and it still needs some improvement), and likewise a lot of time on modifying the build system (and it blows occasionaly for unknown reason).
I'm not particularly worried about those problems, because I wanted to implement all the essential features before polishing the details, and I feel that - while there's probably still a lot of refactors (and possibly a big rewrite) ahead of me, the essetnials are already in place.
I think that the main highlight for 2024 was my participation in the spring Lisp Game Jam, which resulted in a game that I made for my daughter, and Causal Islands. Going to Milan for ICFP/Scheme workshop was also an adventure, but a very costly one (and I'd say that the vibe of the conference was a bit too academic to my taste). I was a bit disappointed that I coudn't meet WIll Byrd, but I'm very happy to have met Michael Ballantyne.
Overall, though, I think I had more fun watching live streams from SPLASH (and I felt it was a truly epic event, especially the LIVE workshop).
As to the plans for 2025, I have an ambition to make a follow-up of my Causal Islands talk, if it is going to be organized (I hope it will): I would like to have implemented all the things that I talked about.
There's also going to be Programming Conference in Prague in the beginning of June, and there's a direct train connection from Gdynia to Prague. In is unclear yet what the program is going to be, but if they will have an event that could accomodate a GRASP demo, I think I'd be eager to submit (although it can be difficult to reconcile with family life).
I'm also considering European Lisp Symposium (which takes place in Zurich in May), but I'll most likely have to skip it.
When it comes to the development plans, my priority is to have GRASP released...
-
CW: (over) 5 years of GRASP
My first attempt at what would become #GRASP was in September 2016, when I was working on a structure editor running in the SLAYER framework that I was developing at the time. It wasn't called GRASP yet, though - I called it "Butterfly", because of the XKCD strip about "real programmers", but I didn't get very far.
SLAYER was based on Guile, and I ended up implementing something akin to Racket's Big Bang (which I didn't know about at that time), and I have spent considerable effort to find a way to represent stuff in Scheme in a nice way (I developed a library for working with lists of interspersed keywords and values, but I was never happy about that).
I think I may have been on a trajectory to build something similar to @disconcision 's Fructure, but I broke my laptop, and it took me a while to recover the latest changes from the disk (which I think eventually happened in 2018; until then, I was working on a small Intel Atom-based netbook that I borrowed from a friend, and on which I wrote "A Pamphlet Against R").
Then I started to look for a nice way of putting rectangles into other rectangles, which took the form of "The Draggable Rectangle Challenge" that I published on Quora (I was a Quora addict at that time)
https://eidolon-language.quora.com/Draggable-rectangle-challenge-part-I-the-introduction
I wrote a highly idiosyncratic solution in Racket, which nevertheless had its charm, but it ran terribly slowly on my friend's Raspberry Pi, and I haven't figured out any way to run it on Android.
The editor window title was "GRASP LIMB", where "GRASP" stands - of course - for GRAphical Scheme Programming, and "LIMB" is meant to be a pun on LISP's backronym "Lots of Irritating Superfluous Parentheses"; "LIMB" was meant to stand for "Lots of Intriguing Movable Boxes".
I started figuring out a way to build Android applications - I had to buy additional 2GB of RAM to my laptop to make Android Studio to run, and when (after breaking another laptop) I finally found a way to build Android apps in Termux, without Android Studio, it turned out to be a huge productivity booster to me - I could finally do programming in places where I wouldn't be able to use the laptop, and this setup prompted some of the design of GRASP.
I made the first version on/for the phone in the spring of 2020, mainly on the toilet (and it shows: https://www.youtube.com/watch?v=BmZ39IfElzg), and in 2021 I wrote what I thought would be the "final version" - but in both cases, the development eventually stalled.
-
Mom, can we have #GRASP?
Mom: oh, honey, we have GRASP at home.
GRASP at home:
https://blob.cat/objects/f935506f-b090-496b-ba6a-3402c8382f32
-
I did #AdventOfCode day 5 riddle in the Android version of #GRASP, but the Scheme interpreter on Android wasn't able to handle my interface to attributes, so I had to evaluate the code in a JVM version
-
@lispwizard yeah, I use a very similar setup, i.e. termux + emacs + hacker's keyboard, as you can see e.g. here:
https://functional.cafe/@PaniczGodek/112876546148294113
However, I do it mainly on my phone. I did try to use a tablet a few times, but I've found that it was actually more convenient with a smaller screen (I started with a 5" one, and now I'm using 6.5")
I use that workflow to develop an editor for s-expressions that I called #GRASP. I use Kawa Scheme to develop it, and I can use it to evaluate Scheme expressions (I think it should be possible to integrate it with ABCL, but I haven't tried that).
I haven't released it yet, but I did use it to solve a few AoC puzzles, and after a few fixes it is nearly usable.
If you'd like to give it a try, you can find its source with some instructions at https://github.com/panicz/grasp