[a / b / c / d / e / f / g / gif / h / hr / k / m / o / p / r / s / t / u / v / vg / vm / vmg / vr / vrpg / vst / w / wg] [i / ic] [r9k / s4s / vip] [cm / hm / lgbt / y] [3 / aco / adv / an / bant / biz / cgl / ck / co / diy / fa / fit / gd / hc / his / int / jp / lit / mlp / mu / n / news / out / po / pol / pw / qst / sci / soc / sp / tg / toy / trv / tv / vp / vt / wsg / wsr / x / xs] [Settings] [Search] [Mobile] [Home]
Board
Settings Mobile Home
/g/ - Technology

Name
Options
Comment
Verification
4chan Pass users can bypass this verification. [Learn More] [Login]
File
  • Please read the Rules and FAQ before posting.
  • You may highlight syntax and preserve whitespace by using [code] tags.

08/21/20New boards added: /vrpg/, /vmg/, /vst/ and /vm/
05/04/17New trial board added: /bant/ - International/Random
10/04/16New board for 4chan Pass users: /vip/ - Very Important Posts
[Hide] [Show All]


[Advertise on 4chan]


File: doggyrocket.png (941 KB, 736x920)
941 KB
941 KB PNG
im writing a project i want to use to learn how to write a modular style of programs to make a system. its a game actually, but design is very very important here. trying to emulate unix philosophy

anyways is common lisp good for these purposes?

thanks in advance
>>
>>108517069
In short, probably something fast like Chicken or Chez Scheme. Lisp is definitely a "kitchen sink" language family and not particularly compatible with the Unix philosophy. Every time you call a Lisp script, there's a ton of overhead because it is expecting an entire environment and a small script to pass formatted data to another small script will just introduce more latency between each step. You _can_ make it work, but there's a lot of hoops you have to jump through to see even a little benefit.
>>
>>108517167
first of all, thank you for the reply.

as some background to another aspect of my project, it is a basic opengl rpg game, in c++ with separate libraries as the components.

i have considered scheme from the aspect of adding a repl/interactive terminal in the game, and also as an abstracted language to write elevated game logic in it, wherein everything would just be a call to a c++ function/executable. similar to how emacs bootstraps with c and then the elevated parts of that program just lay on top of that base. and to even further my display of emacs love i wanted to write my own implementation and substitute it later on.

i have minimal experience with scheme. is it compatible with c++ intertwining, or just c? and does it have support for macros like cl? i'm willing to live with writing just c though i don't have experience with syscalls, etc.

again thanks for your patience :-)
>>
>>108517069
>unix philosophy
since you probably aren't going to shell out different processes for each task, you can do it in any language. Lisp gives you great freedom so you can easily make something that builds functional pipelines
>is it compatible with c++ intertwining
C++ supports C calling convetions. but your api will be impacted, you won't be able to use stuff like classes in the function signature
>>
>>108517333
that's tolerable. i could use void pointers and carefully watch casts, or just use structs since that's the closest to oop c code can give. i get what you mean

and by unix philosophy i actually do mean different processes and inter-process communication. asynchronously doing anything is a good example.

very helpful, thank you
>>
File: crashbandicoot.jpg (18 KB, 452x368)
18 KB
18 KB JPG
>Lisp for game development
Consider https://opengoal.dev/
>>
>>108517420
>and by unix philosophy i actually do mean different processes and inter-process communication. asynchronously doing anything is a good example.
oh, in that case programming language almost doesn't matter at all. Of course, shelling out to different processes will be horribly inefficient, even more so with interpreted languages like lisp (maybe something like chicken scheme might have little startup time).

The hardest part in designing it (I'm assuming this is purely a learning exercise, because this is a bad idea for a game) is to think hard about which parts of the game can be encapsulated to run in a different process.
The upshot is, once you've done this work, it's trivial to convert them to function calls later and simplify everything and still get high quality code without all the string parsing.

>i have minimal experience with scheme. is it compatible with c++ intertwining, or just c
you can also check out janet, you embed it into your application so you can expose anything to it.
>>
The amount of retardation in this thread is astounding
>>108517069
>its a game
>trying to emulate unix philosophy
>>108517167
>there's a ton of overhead because it is expecting an entire environment and a small script to pass formatted data to another small script will just introduce more latency between each step
>>108517420
>by unix philosophy i actually do mean different processes and inter-process communication. asynchronously doing anything is a good example.
>>108517582
>interpreted languages like lisp
>>
>>108517069
>common lisp compatible with modular design/unix philosophy
Common Lisp is already a more modular design than Unix.

>im writing a project i want to use to learn how to write a modular style of programs to make a system. its a game actually, but design is very very important here.
You use CLOS objects and methods and you don't do anything like Unix at all.
>>
>>108519412
Seems like you're the first one in here with an IQ above room temperature, why even bother replying to this garbage?



[Advertise on 4chan]

Delete Post: [File Only] Style:
[Disable Mobile View / Use Desktop Site]

[Enable Mobile View / Use Mobile Site]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.