Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

seeing the light of lithp: portable networking code edition

Name: Anonymous 2016-07-29 8:36

after reading all the sperging about lisp on this board, I decided to download SBCL and try to learn all the functional elegance, metaprogramming magic and parentheses. I wanted to start small and just port some of the bash/sed/awk monstrosisties or shameful windows batch scripts I wrote during my sysadmin days. they perform simple tasks and are only ugly due to inadequacy of those languages, therefore porting them to anything is a common way of learning new languages for me.

unfortunately, while lisp might be a better language than FIOC or Java (though being better than Java is not difficult), it seems to lack libraries for some network-related stuff. specifically, I need to perform an MX lookup and the only solutions I can find (after filtering through emacs-related shit about M-x) are about using implementation-specific idioms or using a FFI to communicate with a Linux-specific library. I turn to you, seasoned lithpers of /prog/, with this question: are there more portable solutions that work across different operating systems and implementations?

Name: Anonymous 2016-07-29 10:08

>>1
The lithp way is create a wrapper over C libraries.
Writing actual code is work for codemonkeys, only lithp macros are true programming.

Name: Anonymous 2016-07-29 10:15

>>2
what is the point of lisp if I'm using C anyway? if I wanted C I'd write C

Name: Anonymous 2016-07-29 10:30

>>3
quick prototype programs.

Name: Anonymous 2016-07-29 23:26

(ql:quickload :cffi)

https://common-lisp.net/project/cffi/manual/cffi-manual.html

there, now you can use any C library installed on your machine

Name: Anonymous 2016-07-29 23:54

shit off nigger

Name: Anonymous 2016-07-29 23:57

>>6
you're that one poster who always gets triggered by Lisp

nice to finally meet you

Name: Anonymous 2016-07-30 4:17

>>5
Unless you want to write C in Lisp a wrapper will be required..

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List