chansey97
2021-7-16 07:11:56

Nice! But I have a question: Where does this terminology (“transducer”) come from? Could you recommend me some background materials for it? (Frankly speaking, I once heard of “transducer”, but I can’t remember…) Thanks.


notjack
2021-7-16 08:53:31

It’s use as a programming term originates with Clojure. Outside programming, a transducer is a device that transforms one signal (such as temperature readings from a sensor) into another signal (such as radio waves)


ben.knoble
2021-7-16 10:39:55

chansey97
2021-7-16 11:51:34

> a device that transforms one signal (such as temperature readings from a sensor) into another signal Thanks @notjack .

> An FST will read a set of strings on the input tape and generates a set of relations on the output tape. Thanks @ben.knoble (this reminds me of Theory of Computation).

Very interesting!


hlgr
2021-7-16 12:15:49

Hi folks, what would you recommend as a wrapper layer to call into C++ code from racket? Currently, I am using swig to generate an extension but that does not work with CS and was pretty tough to get going even in BC. Writing & maintaining a hand-written C-layer on top of the C++ code is pretty unappealing too.


soegaard2
2021-7-16 12:21:52

Depends. In some cases you can be lucky to find “C bindings” for the C++ library.


soegaard2
2021-7-16 12:26:16

Can SWIG produce C bindings for a C++ library?


hlgr
2021-7-16 12:31:17

well, the C++ library is my project (so no C bindings). I have found a couple of references to a 13 year old google summer of code project that built a generator like that. However, they have not merged it into the mainline in the last decade so I don’t think they are going to do it any time soon


laurent.orseau
2021-7-16 12:42:15

Asks them maybe? Sometimes people just need a small nudge.


ben.knoble
2021-7-16 13:20:54

I think theyre the same (or similar) definitions—fsts look like they’re about relations, which is sort of how I look at transduction (like a mapping between spaces)


soegaard2
2021-7-16 14:18:21

If the summer project is more than a decode old, chances are slim.


hlgr
2021-7-16 14:28:15

agreed, I don’t even want to look at my own decade-old code :slightly_smiling_face:


laurent.orseau
2021-7-16 14:45:07

sure, but that won’t cost you much, and who knows


soegaard2
2021-7-16 14:46:13

Maybe phrased as “languages that use libffi would benefit from a C backend”?


soegaard2
2021-7-16 14:47:16

At least Beazley likes Scheme - he even has a SICP course! http://www.dabeaz.com/courses.html


samth
2021-7-16 14:56:12

@soegaard2 he was my professor in college — he’s done lots of cool stuff


samth
2021-7-16 14:57:13

@hlgr the handwritten-C approach is sadly what you usually need — FFI to C++ is rather intractable in general


hlgr
2021-7-16 15:33:07

I guess you are right in general though I have had good experiences with swig for other languages (and it mostly works for Racket BC)


gknauth
2021-7-16 18:36:16

Someone recently asked for a copy of code I wrote 30 years ago, for the GNU Objective-C runtime. I know where the code is. It’s on a NeXT optical disk, I think in my attic, which only my old NeXT cube can read. Several years ago I lent my cube to my high school / college friend, who tends to disappear for 2–10 years at a time. I guess I’m due to hear from him. I think I’m also due to hear from the Yellowstone caldera, which is overdue as well.


jestarray
2021-7-16 21:48:31

how small can racket get ? e.g say you want to embedd it as the scripting lang for your game minimal racket is 40MB? BC was 8MB!!