jbzfn, to FunctionalProgramming
@jbzfn@mastodon.social avatar
aral, to SmallWeb
@aral@mastodon.ar.al avatar

New Video – Kitten features introduced this week:

• Interactive Shell (REPL)
• Multi-page Settings
• Backup and restore (data portability)

With examples that cover components and Kitten’s built-in JavaScript database (JSDB).

https://ar.al/2024/05/23/new-kitten-features-interactive-shell-repl-multi-page-settings-and-backup-and-restore-data-portability/

:kitten:💕

#Kitten #SmallWeb #SmallTech #web #dev #JavaScript #HTML #database #JSDB #components #settings #dataPortability #REPL

aral, to SmallWeb
@aral@mastodon.ar.al avatar

:kitten: Kitten’s interactive shell (REPL) now saves session history scoped to your app so it will still be there when you next serve the same app.

https://codeberg.org/kitten/app#kitten-s-interactive-shell

I think I’m done with the REPL feature now.

Going to take a little break, step away from the computer, and make a plan for the next week of work on Kitten and Domain¹.

¹ https://codeberg.org/domain/app

#Kitten #SmallWeb #REPL #shell #JavaScript #NodeJS #web #dev #SmallTech

aral, to SmallWeb
@aral@mastodon.ar.al avatar

Small update on Kitten’s new interactive shell (REPL). You can now access Kitten’s router via:

kitten.app.router

Also updated the section in the tutorial to fix typos in some of the code examples and use the new router key path:

https://codeberg.org/kitten/app#kitten-s-interactive-shell

:kitten:💕

#Kitten #SmallWeb #REPL #shell #NodeJS #web #dev #router

aral, to SmallWeb
@aral@mastodon.ar.al avatar

:kitten: 🎉

Kitten now has a lovely new multi-page Settings screen and… drumroll… a new 🐢 interactive shell (REPL) for you to play with the running state of your Small Web site/app/place and debug your app, inspect/manipulate its database, etc.

I plan on recording demos of each of them tomorrow but you can play with them now.

And here’s a little tutorial to get you started with the shell:

https://codeberg.org/kitten/app#kitten-s-interactive-shell

💕

Screenshot of Kitten running in terminal: 🌍 Domain https://localhost 📂 Source /var/home/aral/Projects/kitten/app/examples/file-uploads 💾 Databases /var/home/aral/.local/share/small-tech.org/kitten/databases 🐢 To launch an interactive shell, press the [s] key. Server is running and listening for connections… s 🐢 Launching interactive shell ctrl-d to exit; .help for assistance A good place to start is to run the .ls command to see the keys of the global kitten object: » 💡.ls is an alias for Object.keys(kitten) [ 'version', 'domain', 'port', 'app', 'databaseDirectory', 'projectIdentifier', 'deploy', 'WebSocket', 'html', 'libraries', 'page', 'events', 'css', 'js', 'markdown', 'md', 'safelyAddHtml', 'sanitise', 'uploadsDirectory', '_db', 'uploads', 'package', 'db' ] 🐱 💬 kitten.db.images[0] Proxy [ { path: '/uploads/1a6c2612-057d-435b-83c7-7157b4add982/', altText: 'Screenshot of Draw Together sketch that reads Free Gaza!' }, { get: [Function: bound getHandler], set: [Function: bound setHandler], defineProperty: [Function: bound definePropertyHandler], deleteProperty: [Function: bound deletePropertyHandler] } ] 🐱 💬

worldsendless, to emacs
@worldsendless@qoto.org avatar

One of the issues with the #REPL (and #emacs which is just a great big text-oriented repl) is that it is additive in nature; it usually takes major effort or a restart to REMOVE things once they've been added (thinking on plugins which modify app state). #Clojure

ethauvin, to python
@ethauvin@mastodon.social avatar
pixel, to swift
@pixel@social.pixels.pizza avatar

When SwiftUI was first released, one of the great features that piqued my interest was the instant preview function. This feature empowers developers to


https://www.appcoda.com/xcode-previews-uikit/

mluts, to random
@mluts@lviv.social avatar

Don't even know where to start. I'm working with "integrant" in project and every bit of state is managed, I can start/stop/suspend/resume, experience and testing is fantastic.

Is such technique unique and happens only in clojure?

jnpn, to random
@jnpn@mastodon.social avatar
jnpn,
@jnpn@mastodon.social avatar

and lastly, maybe emacs macros could benefit from some interactive refinement editor, many times you need to run it a few times to realize you missed a state. It would be cool to be able to prototype them live.

pixel, to swift
@pixel@social.pixels.pizza avatar

Introduction to the Swift REPL - Swift Blog


https://developer.apple.com/swift/blog/?id=18

rmathew, to programming
@rmathew@mastodon.social avatar

Dijkstra’s snark notwithstanding, was immensely helpful to me in learning 🫡:

“BASIC Was Not Just A Programming Language”, Guillaume Chereau (https://gcher.com/posts/2023-12-24-basic/).

Via HN: https://news.ycombinator.com/item?id=38777427

lispm, to Lisp German
@lispm@moth.social avatar

day 5 using a in , the code is using CLOS classes

Middle click on an object in the Lisp Listener (aka :) describes the object

computersandblues, to Lisp
@computersandblues@post.lurk.org avatar

i don't know if i shared this here already, i almost forgot about this:

"OCellator is a work-in-progress -like language, combined with a web-based structural editor. Build small audio programs and hear how it changes the sound as you type!"

http://kevinmahoney.co.uk/ocellator/#

it has a really nice , allowing you to use rich(-er than text) user interface elements to change sounds

scy, to python
@scy@chaos.social avatar

Did you know that you can set an initialization file for the (aka "interactive mode")?

I use this to auto-import "os" and "sys" in every interactive Python, as well as the rich library (if installed) to provide pretty-printed and syntax-highlighted output for expression results.

Basically, just set the environment variable PYTHONSTARTUP to the path to your initialization file.

https://codeberg.org/scy/dotfiles/commit/1fec36f8ee95ae7c82b1f1e9f994ae14826901ec

https://rich.readthedocs.io/en/stable/introduction.html#rich-in-the-repl

drj, to random
@drj@typo.social avatar

You know we said we like interpreted languages? (we do)

We meant we like having a REPL in the target that we can use to inspect and modify the program.

Not that we like having to upload 100MB of code to a server, then downloading it to our browser before we see a missing bracket error.

abcdw, to scheme
@abcdw@fosstodon.org avatar

How about reads from stdin for expressions evaluated from the buffer?

With guile-ares-rs it's possible, this functionality will land soon:

scy, to python
@scy@chaos.social avatar

Did you know: You can start an by invoking python -m asyncio.

wholesomedonut, to Powershell
@wholesomedonut@fosstodon.org avatar

I love style .

It's one of my favorite things to be able to piece together the flow of a program function by function, block by block, and tweak things on the fly without any compilation or interruption.

does this well with multiple IDE's which all support REPL directly fed with source code files, usually displayed in another window.

And honestly? Having used it for years when, for whatever reason, I had nothing else on a job site? ISE works great.

entikan, to python

Wrote a very simple for so I don't have to constantly restart every time I make a little change. This works like a dream and is going to make writing tons more

You can get the code here: https://discourse.panda3d.org/t/simple-live-coder/29594

Code is being typed and panda3d updates every time the document is saved spawning, positioning and lighting spherical smileys.

toxi, (edited ) to typescript
@toxi@mastodon.thi.ng avatar

— Building a simple browser REPL UI for yesterday's Lispy S-expression mini language[1], using https://thi.ng/rdom and other usual suspects like https://thi.ng/rstream & https://thi.ng/transducers.

The language impl itself now also has local let-bindings, some more error checking, introspection and more examples of built-in functions...

Demo:
https://demo.thi.ng/umbrella/lispy-repl/

Source code:
https://github.com/thi-ng/umbrella/blob/develop/examples/lispy-repl

(The attached source code image only shows the UI/REPL parts, the language implementation can be found in the above link...)

[1] See yesterday's toot about building/using a mini DSL:
https://mastodon.thi.ng/@toxi/111006345413482231

stalecu, to emacs

Until now I seriously underestimated in . Wow, the integration it has is amazing, I get nice autocompletion and, of course, integration with Elisp. The only problem is that I have to adapt to the Eshell way of doing things (i.e. stuff like eval "$(ssh-agent -s)" don't quite work) and it's a dumb terminal (quite literally, so I have vterm as a backup), but FWIW it is underrated, don't scoff at it.

starbreaker,

@stalecu I recently got into myself and have been doing as much as I can with it while using as a fallback. It's pretty sweet, and I no longer need the as a calculator. I can use REPL instead when I want to see how badly I got screwed by working unpaid overtime.

screwtape, to Lisp
@screwtape@mastodon.sdf.org avatar

y on only on @SDF public access unix.
0. in NZ

  1. and not cold booting one's

  2. And hence stapling an user interface other than streams to my planner bot from old computer challenge

  3. Some new gophers arrive from activitypub @silverwizard @nuintari . But what is item type t from silverwizard's static site generator?

  4. DWIMification jokes in @alexshendi 's part of the last show's thread

~chat irc

mretka, to ruby

TIL: I'm learning how to do driven development using Pry and pry-remote

https://github.com/pry/pry
https://github.com/Mon-Ouie/pry-remote

It's possible to run FactoryBot and Rspec straight from IRB/Pry with:

require 'rspec/expectations'  
include RSpec::Matchers # use RSpec matches and expectations

require 'factory_bot'  
# For usage in Rails console  
# require 'factory_bot_rails'  
FactoryBot.find_definitions # load factories  
include FactoryBot::Syntax::Methods # loads FB methods like #create and #build  

Then you can do stuff in Pry/IRB like:

pry(main)> expect(1).to eq(1)  
=> true  
create(:post, title: 'Cool post')  
  • All
  • Subscribed
  • Moderated
  • Favorites
  • megavids
  • kavyap
  • DreamBathrooms
  • khanakhh
  • magazineikmin
  • mdbf
  • tacticalgear
  • osvaldo12
  • Youngstown
  • rosin
  • slotface
  • ethstaker
  • everett
  • thenastyranch
  • JUstTest
  • InstantRegret
  • Durango
  • normalnudes
  • Leos
  • tester
  • ngwrru68w68
  • cisconetworking
  • cubers
  • GTA5RPClips
  • anitta
  • provamag3
  • modclub
  • lostlight
  • All magazines