Brilliant! Perfect! 100% what I was looking for! Thank you so much.
eli-oat
Recent community posts
Hey there! I'm working on a deck where I'm hoping to display input from a few previous cards in a grid on another.
I've sorted out how to access and display data across cards, but am hung up on how to programmatically insert table data into a grid widget.
I noticed that the syntax for insert has recently changed, so *think* I'm doing it the right way, but it isn't having the effect I'm expecting.
insert name age hobby with "Alice" 23 "running" "Bob" 25 "cooking" "Charlie" 17 "birdwatching" into roundup.widgets.player.value
In this example I'm not yet trying to insert data from other cards, just insert some static sample data into a grid widget on the current card.
The card is named "roundup," and the grid widget is named "player" -- that widget currently has an empty table with columns named "name," "age" and "hobby." When I run my code snippet at the listener, I see a table in the listener, but no data appears in the widget. When I run it in the script pane, wrapped in an "on view" no error is thrown, but nothing happens.
Any guidance for how to do this? Thanks!
Thanks so much for this super detailed walkthrough! I just learned a heap! My first instinct was to use the @ operator, but I see now that I was going slight awry when I was trying to make the right value a single integer 🤦
This is absolutely gorgeous. To "get" lil more, I've been reading through a few things on apl and k. lil is proving to be a lovely "on-ramp" to array programming for my sufficiently poisoned brain that is stuck in a deeply functional rut. .
Following up with an example of something I've used lilt for! It isn't much, but I'm hoping it becomes a part of a larger cli game I've got brewing.
I've re-implemented a bit of code that I've written a few times in a few languages that creates nonsense, but mostly pronounceable words.
My goal here was to implement it in what felt like the most idiomatic flavor of lil I could. I've provided a links to previous iterations of this code as a way to compare and contrast the capabilities of lilt. While this is a pretty minimal example, I found it insightful to write.
Thank you! This was super helpful. I'd totally misunderstood how the random seed was expected to work -- what you've described here makes a lot of sense to me, now, and with that things are working a-okay.
Also, I'm feeling foolish to admit that I thought I was running 1.17, but was actually a few versions behind on lilt 🤦 that was totally my bad!
Perhaps fewer hairy edges than I initially thought! In the end, the only hairy edge was me.
Here is a sample file to demonstrate 2 issues I ran into last night.
The docs note that you don't need to seed random, but, every time I run random (at least on a given day, I haven't tried across days) I get the same result
The other issue is with a for/else blocks not working as expected when testing passed args[] against known values, e.g. args[2] ~ "-l"
[edited to add that I'm using a version of lilt built form source the same day that Decker 1.7 was announced here on itch]
I have been experimenting with using lilt in those places where I would normally write little bash or lua scripts to preform repeatable utility sorta tasks.
Bash is convenient and portable, and bolted to my bones, but there are times when it gets unwieldy...I'm also sufficiently poisoned to function programing, so, find myself reaching for functionality that isn't there in bash (namely map, filter, etc). lil, through lilt is oh oh oh so close to being a suitable replacement for the little things I reach to do, but has edges that are just hairy enough I haven't made it a day-to-day choice, yet.