toxi, to genart
@toxi@mastodon.thi.ng avatar

Little Friday night gift for a friend (& example in ): How to generate & then recursively tessellate a hex grid and visualize as SVG, all via just https://thi.ng/geom & https://thi.ng/transducers...

Demo:
https://demo.thi.ng/umbrella/geom-hexgrid/

Source code:
https://github.com/thi-ng/umbrella/blob/develop/examples/geom-hexgrid/src/index.ts

(cc @nkint)

toxi,
@toxi@mastodon.thi.ng avatar

(Almost) same code, alternative tessellation (swapped order: first quad fan, then edge split). Also using 4 colors (vs two) to tint result polys...

#ThingUmbrella #Geometry #Hexagon #Grid #Tessellation #Recursion #GenerativeArt #SVG #TypeScript #Javascript

toxi,
@toxi@mastodon.thi.ng avatar
toxi,
@toxi@mastodon.thi.ng avatar
pluralistic, to random
@pluralistic@mamot.fr avatar

ceci n'est pas une bannière

BoydStephenSmithJr, to haskell
@BoydStephenSmithJr@hachyderm.io avatar

Any experience with turning non-uniform recursion schemes (http://www.cs.nott.ac.uk/Research/fop/blampied-thesis.pdf) into a library that works like or -schemes

I've got a specific type that uses a approach but I'd like to write some general folds (using e.g. algebra families) instead of duplicating the "traversal" code.

I might have done the categorical approach (functor categories instead of algebra families) before, but that has limitations and I think I lost the code.

sellout, to haskell
@sellout@mastodon.social avatar

I made a thing in case you were starting to think programming is too easy.

https://github.com/sellout/no-recursion – a plugin to remove support from

(I have multiple use cases for this, I swear.)

treyhunner, to python
@treyhunner@mastodon.social avatar

This is the kind of programming problem that recursion is perfect for.

Read more 👉 https://trey.io/vIw7Up

amoroso, to books
@amoroso@fosstodon.org avatar

I posted a review of the book "Recursion via Pascal" by Jeffrey S. Rohl (1984), an overlooked little gem I recently discovered. It's one of the few books entirely devoted to recursion which, as a Lisper, gets me interested.

https://journal.paoloamoroso.com/reading-recursion-via-pascal

janriemer, to rust

Many people say that #Rust is very hard to #prototype with or to #refactor. This couldn't be further from the truth! It is the exact opposite!

Let me share with you one of the most profound experiences I had with #RustLang on a casual sunday - a thread 🧵

I'm currently rewriting my #transpiler from #nom to #chumsky and until now everything has turned out great so far, until I've hit the following road block:
Implementing parsers by using #parser functions that have indirect #recursion.

1/11

treyhunner, to python
@treyhunner@mastodon.social avatar

For most problems that involve repetition, Python's "for" loops and "while" loops are better suited to the task than recursion.

Read more 👉 https://trey.io/vIw7Up

treyhunner, to python
@treyhunner@mastodon.social avatar

If a function calls itself every time it's called, the code would run forever.

Read more 👉 https://trey.io/vIw7Up

AaronReuland, to genart
@AaronReuland@mstdn.social avatar

Well, that recursion turned out kind of pretty.

janriemer, to rust

Currently in the process of rewriting my from v4.2 to v1.0.0-alpha.6 🤓

It is a lot of fun so far, but I have to say these type signatures are wild!😄

I'm still struggling with it far more than I'd like, but I guess it is just a matter of time until intuition kicks in and it will become more and more natural.

Exciting project ahead!🙂

I'm even able to parse string literals with escape sequences - something I haven't even achieved with nom!

janriemer,

Sometimes, in order to stay flexible and fit, you need to do some (type) gymnastics 🤸

Slowly getting the hang of combinator 🤓

One concept (among others!) I haven't learned yet, but will run into, is in chumsky. I know, there are good docs on it - it's just something I haven't gotten to yet.

All in all, I'm very happy with chumsky so far. Kudos to its maintainers! 🙂 🎩

CGTKyle, to ArtificialIntelligence

Has anyone ever crafted a set without the sticks that works well? I'm specifically interested in one where it's immensely difficult to stack a larger disk atop a smaller one.

AmenZwa, to cs
@AmenZwa@mathstodon.xyz avatar

How many confusing, callous, condescending ways are there to teach the concept of to the incoming undergrads?

gregorni, to FunctionalProgramming
@gregorni@fosstodon.org avatar
idontlikenames, to genart

Droste effect
(yes, I just put emoji in emoji while putting emoji in fractals, what's the problem?😀)

clacke, to random

An educational video about music video tropes, shot using all the tropes.

: "If Educational Videos Were Filmed Like Music Videos"

Not available on iTunes or Spotify.

farside.link/invidious/watch?v…

youtube.com/watch?v=G025oxyWv0…

mpjgregoire,
@mpjgregoire@cosocial.ca avatar
atomjack, to Starwars
@atomjack@mastodon.cloud avatar
cardosopab, to python

is such a weird concept, but once you start to grasp it, it is rather simple, not saying I've grasped it, lol but this function to reverse a list wasn't too difficult for me to come up with!

numbers = [1, 2, 3, 4]

def reverse(arr, ans=[]):
if len(arr) == 0:
return ans
ans.append(arr.pop())
return reverse(arr, ans)

print(reverse(numbers))

mttaggart, to random

I know there are some benefits, but dang, Trunk Or Treat as a concept bums me the hell out.

bitprophet,
@bitprophet@social.coop avatar

@mttaggart the snickers bars at the advertised Trunk or Treat will /also/ have Trunk or Treat flyers in them.

lachlan, to random
@lachlan@mastodon.social avatar
janriemer, to random

Left Recursion in Parsing Expression Grammars:

https://arxiv.org/pdf/1207.0443v1.pdf

"A frequently missed feature of PEGs is left , which is commonly used in Context-Free Grammars () to encode left-associative operations. We present a simple conservative extension to the semantics of that gives useful meaning to direct and indirect left-recursive rules, and show that our extensions make it easy to express left-recursive idioms from CFGs in PEGs, with similar results."

noneuclideandreamer, to random German
@noneuclideandreamer@mathstodon.xyz avatar

High Resolution Render for Patrons of Level Square and up - Final Version!

Nested Apollonial Gaskets, 3 steps of Recursion Deep! 25600×25600 pixels, circles rendered down do curvatures of 5120.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • tester
  • kavyap
  • DreamBathrooms
  • modclub
  • GTA5RPClips
  • InstantRegret
  • magazineikmin
  • Youngstown
  • thenastyranch
  • rosin
  • slotface
  • mdbf
  • khanakhh
  • ngwrru68w68
  • JUstTest
  • anitta
  • normalnudes
  • Leos
  • cisconetworking
  • osvaldo12
  • everett
  • Durango
  • tacticalgear
  • provamag3
  • megavids
  • ethstaker
  • cubers
  • lostlight
  • All magazines