Guild icon
PyScript πŸ’»
πŸ’¬ | General / β•°β•Έinvent-framework
Discussions, help and suggestions about the Invent Framework (was PyperCard) https://github.com/invent-framework/invent
Avatar
πŸ‘‹ Hello, world!
Avatar
Andrea Giammarchi 03/04/2023 16:40
Hello there πŸ‘‹
16:42
I have a few questions around this lovely issue https://github.com/pyscript/visual-python/discussions/7 ... most notably, where is it that we select and define the component on the Editor View side: is it by type? so we click something and we say "this is type text" or "type image" and we offer automatically the right configuration panel per part of the grid-layout? (I hope so, if not, please elaborate, thanks!)
Avatar
one for @Fabio ..?
Avatar
Andrea Giammarchi 03/04/2023 17:04
probably, I've just thought this would coordinate well with ideas and points shared in there, as the main initial target goal seems to be pypercard, hence my question
πŸ‘ 1
Avatar
or @Martin might have some context too. πŸ˜‰
Avatar
Hi guys - been trying out Chris Laffra's LTK over the last couple of days. Running in micro python - super fast. Fantastic stuff. Especially for me - I've been mostly a back-end guy all these years. Anyway, can anybody compare the two - pypercard and LTK.
πŸ‘ 1
Avatar
chris.laffra 23/12/2023 13:25
LTK is a "low-level" UI toolkit to construct DOM elements, style them, and set event handlers. Pypercard is a higher-level UI, more like an application, that could be built using LTK.
13:26
@mrc what have you built using LTK? I would be really curious to see it.
Avatar
So, PyperCard has been renamed to the "Invent Framework" (https://invent-framework.github.io/) and it's basically an app framework for beginner coders. LTK has a very different audience to Invent, but (if we do it right), folks who start with Invent will want to graduate to LTK.
Avatar
Avatar
chris.laffra
@mrc what have you built using LTK? I would be really curious to see it.
Haven't built anything yet. Just trying out all permutations of kitchensink. Starting a tabletop baseball sim - kinda like this -- https://diamond-mind.com/blogs/about-the-game/18104320-whats-new-and-different-in-dmb-v11. Got the back-end (django) finished. Like to do front-end in micropy only. Does mpy have the ability to fetch from a local django web server (get and post).
Avatar
chris.laffra 05/01/2024 10:38
Yes. See https://laffra.github.io/ltk/?tab=3 and scroll down the code. It shows a call to ltk.get that loads a file. That same technique can be used to call routes on your hosting web server. Same for ltk.post.
10:39
Here is an example I have in an app I am building using LTK
Avatar
A quick FYI: I renamed this channel to "invent-framework" to reflect the name change.
Avatar
So, I'm currently thinking about two things we need to start thinking about from the start: i18n and a11y (internationalization and accessibility)
10:28
i18n first draft will be to provide a way to create translations of strings that are shown to the user, or maybe even strings used internally by Invent for exceptions.
10:31
In Python this is usually achieved via the gettext module's _ function. So strings wrapped in _ are looked up and, depending on the current locale setting, an alternative translation string (or if no match, the original string value) is returned. E.g. _("Hello") might return "Bonjour" if the locale is set to fr. If the locale is set to zh (China) and we don't have a Chinese translation then only "Hello" is returned (as the default, because it's the original string).
10:34
As for a11y... this is more of a challenge, but a first draft should probably include grokking this, and ensuring WAI-ARIA stuff works properly for all our widgets, so screen readers work correctly, https://developer.mozilla.org/en-US/docs/Web/Accessibility
Accessibility (often abbreviated to A11y β€” as in, "a", then 11 characters, and then "y") in web development means enabling as many people as possible to use websites, even when those people's abilities are limited in some way.
Avatar
Andrea Giammarchi 19/01/2024 17:13
interesting about i18n ... how would _(f"Hello {target}") work there? I have written solutions for i18n that also solve that problem but it was a while ago and never thought gettext could've been an inspiration!
17:15
my previous work that covered all previous company use cases: https://github.com/WebReflection/i18n-utils
The i18n tag function utilitities. Contribute to WebReflection/i18n-utils development by creating an account on GitHub.
17:16
you can see it's from over 6 years ago, so I'd be happy to make it more 2024 prone.
17:16
it prodces a JSON so it's PL agnostic
Avatar
That's an interesting question (wrt f-strings)
17:31
Not sure, is the answer.
17:32
But thanks for the links / headsup (edited)
Avatar
So WRT Python evaluation of f-strings. They're eager so that would happen before the call to _(f"hello {name}") - i.e. if name = "world" the _ function would get the string "hello world". So folks should use Python's string .format method.
17:45
That limitation in Python kinda solves the problem.
Avatar
Express yourself with code. Contribute to invent-framework/invent development by creating an account on GitHub.
Express yourself with code. Contribute to invent-framework/invent development by creating an account on GitHub.
10:11
Just a quick heads up. Next week I'll be building out the UI/widget layer.
Avatar
@Josh (EduBlocks) @Martin - https://designer.grommet.io/
Avatar
Really impressed with this ^^^ as a visual UI designed, something we can use for inspiration..? I especially like the focus/tree on the LHS (great for accessibility) and I smiled at how close we were to this (great minds think alike, or fools seldom differ).
Avatar
Josh (EduBlocks) 20/01/2024 18:53
yeah i love that!
18:53
few things that seem a bit unfriendly to use, but nothing that a few UX improvements couldn't fix
18:53
definitely a good model to follow
Avatar
Yeah, we can use for inspiration and refine. Also their ui system has everything but the kitchen sink. I reckon our core needs to be small and simple but very extensible for plugged in 3rd party widgets.
Avatar
Andrea Giammarchi 22/01/2024 11:53
doesn't that look familiar with Visual Python thingy we made earlier last year?
11:53
or PyperCards ... to name the idea behind
Avatar
Exactly. We're basically on the same page
Avatar
@Mikimic
Avatar
@Mikimic @Fabio @Josh (EduBlocks) summary of yesterday's community engagement chat.
  • Bringing coding to the 99% means our target audience is the whole world. This is clearly too large to engage with all at once.
  • We need to identify personas / segments / communities with whom we wish to initially engage.
  • Part of this is an exercise in sustainable open source development. We spent some (a lot of) time teasing apart what FLOSS is and how that relates to ways in which monetary support (i.e. folks paying for stuff) happens WRT an open source project. TL;DR: FLOSS is always complete and free. Services and capabilities that complement and amplify the core FLOSS project could be paid for. We need clarity of what these different things could be for our communities. Fabio and Nicholas to work this out while in Boston.
  • Romanians are just as passionate as Italian/Brazilians. British folk have a stiff upper lip. πŸ˜‰
  • We need more time/resources to make this happen.
I think that's it. If I've missed anything, please shout.
πŸ‘ 1
Avatar
Avatar
ntoll
@Mikimic @Fabio @Josh (EduBlocks) summary of yesterday's community engagement chat.
  • Bringing coding to the 99% means our target audience is the whole world. This is clearly too large to engage with all at once.
  • We need to identify personas / segments / communities with whom we wish to initially engage.
  • Part of this is an exercise in sustainable open source development. We spent some (a lot of) time teasing apart what FLOSS is and how that relates to ways in which monetary support (i.e. folks paying for stuff) happens WRT an open source project. TL;DR: FLOSS is always complete and free. Services and capabilities that complement and amplify the core FLOSS project could be paid for. We need clarity of what these different things could be for our communities. Fabio and Nicholas to work this out while in Boston.
  • Romanians are just as passionate as Italian/Brazilians. British folk have a stiff upper lip. πŸ˜‰
  • We need more time/resources to make this happen.
I think that's it. If I've missed anything, please shout.
@Fabio @Josh (EduBlocks) Thank you Nicholas, great summary! As soon as we have a firm grasp of what Invent is and what are the outside services that may be complementary (hosting, etc), we can start thinking about segments, and I can do the same exercise I did for PyScript (I already started doing it to an extent). However, I just want to emphasize that due to the nature of the "product" and the nature of the "customers" the product is intended for - we are faced with a different and potentially more challenging exercise that in the case of PyScript. If in PyScript the target audience was technical - knowledgeable of Python and therefore knowing what a piece of software is, and understanding what can be achieved with programming - and therefore could easily understand the appeal and benefits of engaging with PyScript, not to mention that they were actually looking for it; in the case of Invent, most of the targeted population is not technical, so they are not looking for a technical solution for their problems/needs. At most ,they are looking for some existing software to solve their problem, very few of them are actually looking for ways to build something themselves (and they usually land in programming if they do). Therefore, in the case of Invent we will need to bridge that that gap (chasm) first, and that is quite an extra effort.
πŸ‘ 1
Avatar
@Fabio @Dasha @Mikimic @Josh (EduBlocks) @Martin update on the community engagement call:
  • Explained why folks were busy.
  • Since it was mostly just me and Bogdan (Josh joined towards the end), we focused on the Invent framework rather than PyScript.
  • We discussed segmentation of users. I pointed him to the personas I created ages ago for development purposes here: https://invent-framework.github.io/design/#personas We agreed that a couple of personas were missing... those for whom they don't know Invent could solve a problem they don't know they have. They are "Bob" from Orange County, California who runs a motorcycle repair shop and can't keep track of stock, and "Emma" from Auckland NZ, who works in accounts and spends most of her time doing repetitive work on spreadsheets. I'll fill these in over this week.
  • We explored the different layers of Invent: the builder, the framework, the third parties that might host "Invent stuff" (all sitting on top of PyScript).
  • Bogdan had a cry at the increasing complexity of "Invent" πŸ˜„
  • Josh joined and appeared to contradict everything I'd said, but actually, he didn't -- we just needed to get our story straight.
  • BREAKTHROUGH: we started to think of "Invent" as a collection of tech and capabilities, but we were going for brand recognition. Think "Intel Inside". Intel don't sell you computers, but you certainly want to buy a computer with an Intel chip because apparently they're cool. Or you prefer cars with Rolls-Royce engines etc... the important thing is others (e.g. Anaconda on EduBlocks or PyScript.com) host the open source framework and tooling for creating apps -- think how "wordpress" is a technology stack, but you need to host it somewhere, or Django is a framework but you need to host it somewhere.
  • Not sure about a meeting next week since many of us are on holiday. Happy to talk PyScript things.
πŸ‘ 3
Avatar
So what is this? Something in development?
Avatar
Avatar
Manock
So what is this? Something in development?
Josh (EduBlocks) 20/08/2024 12:08
Indeed! It's an easy to use app framework built on top of PyScript. https://invent-framework.github.io/ gives a good overview of what we're trying to accomplish, the code snippets are dummy examples and some of the content here is outdated, but should give you somewhat of an idea πŸ™‚
12:08
It's in pre pre alpha stage right now, but we're making good progress
Avatar
I hear one of the previous names of this project was "PyperCard", does this mean it has visual tools for designing the UI?
12:14
I'm old enough to actually remember HyperCard, lol.
πŸ™‚ 1
Avatar
Avatar
Manock
I hear one of the previous names of this project was "PyperCard", does this mean it has visual tools for designing the UI?
Josh (EduBlocks) 20/08/2024 12:29
that's right! a big part of the invent framework is the tooling, so we have a drag and drop UI builder. Nicholas and I gave a talk at EuroPython discussing the framework and we give a demo of the builder at the end of the talk. https://www.youtube.com/live/Se8SKgmCnkc?t=23454s
Avatar
Although I have been kind of getting used to generating UI though code, I'm excited to see what this can do.
Avatar
Josh (EduBlocks) 20/08/2024 14:03
You can still do that πŸ™‚ The UI builder is just one way to build invent projects, behind the scenes it's just generating the code you would have had to manually type out
Avatar
I understand. I'm just saying.
Avatar
chris.laffra 24/08/2024 11:06
@Manock In addition to looking at Invent, I suggest you take a look at LTK (a UI toolkit for PyScript), and PySheets (an app/framework written on top of PyScript):
LTK is a little toolkit for writing UIs in PyScript - pyscript/ltk
Source for PySheets. Contribute to PySheets/pysheets development by creating an account on GitHub.
Avatar
I already did, I'm using it for my app.
πŸš€ 1
Avatar
Avatar
Manock
I already did, I'm using it for my app.
chris.laffra 24/08/2024 14:20
Do you have a link to your app?
Avatar
I'm still working on it lol.
14:58
Also I don't think I'm allowed to show the other one I'm working on. XD
Avatar
Avatar
Manock
Also I don't think I'm allowed to show the other one I'm working on. XD
chris.laffra 28/08/2024 13:22
Mysterious. Exciting. πŸ€“
Avatar
Don't believe my comment in the community stream yesterday made it through, so I'd like to restate my excitement in seeing the Invent demonstration given by @ntoll As someone within the target demographic, I look forward to giving it a try! Thank you for your work, PyScript team
Avatar
@johnnohj you're welcome!!emoclew er'ouy
πŸ˜‚ 1
13:13
πŸ˜›
❀️ 1
13:14
All feedback gratefully received. I'm putting docs etc together, over the coming weeks so folks should be able to start playing with it.
Avatar
Original message was deleted or could not be loaded.
Does spam like this actually work? I doubt you'll find any success here.
Exported 65 message(s)
Timezone: UTC+0