freenode/#lisp - IRC Chatlog
Search
0:46:14
aeth
asdf_asdf_asdf: This sort of wrapping is seen as boring and is almost always automated in some way, e.g. XML/JSON spec parsing, grovel, cl-autowrap, claw, etc.
0:46:46
aeth
It's possible that the only person who knows the answer is the author of such a tool, and that author will probably say "use my tool"
0:46:48
no-defun-allowed
Um, maybe they mean they want a "pointer" to a function. How about #'foo for the function FOO?
0:47:17
aeth
no-defun-allowed: no, asdf_asdf_asdf has been for days/weeks asking in here how to manually wrap WinAPI in a SBCL-specific way
0:48:19
aeth
which is probably pretty close to asking how to manually compile by hand LLVM IR to x86-64 asm in #llvm
0:55:39
aeth
asdf_asdf_asdf: If I were you I would just take the offer from borodust from last week. <borodust> lemme know what header you need a wrapper for and i can arrange it in 15 min or smth
0:56:18
aeth
asdf_asdf_asdf: At the very least, you get to see what correct output looks like even if you don't do the whole thing automatically generated
1:16:28
asdf_asdf_asdf
Thanks, but which function is equivalent to "double (*func1)(double) = cm_to_inches;"?
1:18:09
Bike
none of those things are functions. you are asking a question that doesn't really make sense in context, like how much green weighs
1:19:38
Bike
https://common-lisp.net/project/cffi/manual/html_node/Tutorial.html#Tutorial here, read this. it explains callbacks
1:19:45
aeth
Do you mean function pointers for interfacing with C or are you asking about higher order functions or...?
1:41:01
asdf_asdf_asdf
How pass signature to variable? Signature it for example: LRESULT (int int). I must pass it to variable. How it do?
2:02:59
asdf_asdf_asdf
I have (define-alien-type nil (struct foo (lpfnWndProc ...))) If instead ... will be WindowProc I have error: "Undefined alien ...".
2:09:01
oni-on-ion
https://coliveira.net/software/writing-a-win32-application-in-sbcl-common-lisp/ ?
2:12:09
asdf_asdf_asdf
oni-on-ion; how write it in Common Lisp: double (*func1)(double) = cm_to_inches;"?
2:52:01
pjb
asdf_asdf_asdf: by the way, yesterday I passed by a github providing Windows ABI for CL…
3:00:18
aeth
pjb: Several people have provided several different links for that, and borodust offered to run his autowrapper. asdf_asdf_asdf seems to be ignoring all of that.
4:22:42
Nomenclatura
I've been lazily trying to get into programming for a while... like French.... Sure I have learned some Frech and some programming but I dunno a single person who speaks Frech to practice with and I really dunno what to do with programming.
4:23:35
Nomenclatura
Sure, I can learn how to code a sqare and how to add numbers ordisplay a stupid hello world, but I dunnot what to actually do with that
4:26:34
Nomenclatura
there has never been a single problem I haven't solved with existing software or a wuick bash hack
4:46:21
Nomenclatura
you know, when I was in school and we took those aptitude tests meant to guide you what you should study?
4:46:23
oni-on-ion
the first thought that surfaces in your heart when you ask yourself "what should i make"
4:47:23
oni-on-ion
being overwelmed with option and choice and variety and FOMO is something i am personally very familiar with
4:48:07
Nomenclatura
sure. thought building a website was a good idea but it feels such a waste of time when there is a lot of ggood web frameworks I could just use
4:48:38
oni-on-ion
2wk ago i just buckled down all my tools and gear and mindset and environment and went to work. feels great now. work is hard too dont let the rough spots break you down just climb over them
4:48:51
beach
Nomenclatura: Here is a list of stuff you can work on: http://metamodular.com/Common-Lisp/suggested-projects.html
4:49:29
oni-on-ion
Nomenclatura, hehe yep, i had that mindset as well. there will *always* be something else to tempt us. but the key is to invest in the one thing, that makes all the difference; to put your time and sweat and effort and attention toward something is what makes it worth it. (took me a while to learn this)
4:49:51
gabbiel
pjb: That save-place macro is good, but I was thinking, what if I want new to be nil?
4:50:38
White_Flame
Nomenclatura: there are 2 ways of programming; Programming as a hobby, and programming to get something done
4:51:06
White_Flame
programming as a hobby works because people intrinsically enjoy the act of programming, and the nested challenges it offers
4:51:29
White_Flame
but, if you don't really get any pleasure from programming for its own sake, then that's different
4:53:18
White_Flame
it won't teach you actual pragmatics of programming, but is the magic paper into many programming jobs
4:55:26
White_Flame
but if you want to transition into programming specifically (not sure where the label "IT" has hits borderlines), that is a path
4:57:10
Nomenclatura
I appreciate programming, it's beautiful... so is Music and I am not trying to become Perlman
5:01:11
White_Flame
as everybody gets more and more greedy, and interactions become less about value exchange and more about lock-in and obligatory monetary extraction, I like money less and less
5:01:32
Nomenclatura
oni-on-ion: Right.But more because when you get paid for it they start to ask for a lot of other stuff such as admin paperwork, filling spreadsheets, studying boring ISOs and stuff
5:01:59
edgar-rft
oni-on-ion: try getting paid for something you don't like from the beginning to avoid disappointment
5:15:05
oni-on-ion
Nomenclatura, yes. i have really nothing else that is as interesting for a hobby ("spare time") as programming. so if i were programming as a job, i would probably play video games and watch movies instead =/
5:16:16
oni-on-ion
LdBeth, i don't know... but i would not feel good to get paid *and* enjoy something
5:16:38
LdBeth
Probably gettin paid for streaming video games but write programs instead would be more fun XD
5:19:59
oni-on-ion
play points, work points. work a bunch, build up play points. play a lot, build up play points. need work points to work, need play points to play. now here is the trick to it. when you play too much and run out of play points, it becomes work. people start to get mad at their video game or headaches and social problems etc. now the same with too much work; it becomes play and does not get serious. need a delicate balance of both
5:21:18
oni-on-ion
excersize and cleaning and difficult things like waiting in line counds as "work" (contribute to society in some form)
5:22:48
oni-on-ion
programming as it is right now, there are things i dont want to do (work) and things i want to do (play). it is a real-time balance adjustment. can't always do the fun stuff because then it turns to work (ie. defensive optimization, overdesign and adding problems just to solve them)
5:24:02
oni-on-ion
(spending too much working, then i will start to configure emacs and change font colors and try to force more caffeine and frown more etc)
5:25:09
oni-on-ion
sorry for the non-CL speak. just realised i was spending 30min on reddit and feels like it turns into a chore. the laughs are over. back to work ! =)
6:56:18
shangul
Any OS with Lisp tools and a Lisp implementation as its shell? Emulating Lisp machines for example
6:58:27
beach
shangul: There is also Movitz, but I don't think it is being maintained. The author has declared that he wants to create a new version.
7:00:28
beach
shangul: I am planning on as well, but it is not going to be imminent: http://metamodular.com/closos.pdf
7:14:19
beach
Though if you read Tanenbaum & Bos "Modern Operating Systems", you will learn that Genera, Movitz, and Mezzano can't possibly exist, because according to that book, it is impossible to write an operating system in a language that requires automatic memory management.
7:17:48
beach
shangul: It does not have to contain any assembler. There can be a code-generator module in the compiler that generates machine code directly, without using an assembler.
7:18:30
no-defun-allowed
Alternatively, you could generate consing-free code for your CL runtime. The T Scheme system did this a fair bit for its own runtime.
7:20:56
edgar-rft
Build your own Lisp Machine: http://www.justgeek.de/a-fistfull-of-transistors-building-a-cpu-from-scratch-1/
7:21:25
beach
shangul: Most Common Lisp compilers would have an intermediate representation that looks like a symbolic version of machine code. You may or may not call that "assembler".
7:21:43
beach
shangul: Certainly, the compiler needs to contain knowledge about the processor instructions and such.
7:22:14
no-defun-allowed
I should also add most C operating systems are written in invalid C technically: how do we get pointers to wherever (such as 0xb8000 for video memory) and what do we do without malloc, free, etc? There is no conforming C runtime or client code there.
7:22:46
beach
no-defun-allowed: That's what I meant when I said that no operating system can be written in C.
7:23:45
no-defun-allowed
Yes, but it's more of a comment on ridiculous constraints set by the authors.
7:24:17
beach
The standards (C and Common Lisp) do not have anything in them that allows direct access to memory by conforming code.
7:26:25
MichaelRaskin
Bash is better than C. You have a chance to concatenates trings in bash and not leakmemory
7:28:04
jackdaniel
it is like in this meme: 'CL: "I feel sorry for you C!", C: "I don't think about you at all CL"'
7:28:11
oni-on-ion
C is unix language -- dumping core is like stacktrace for a process. don't see how its like ebola
7:28:39
MichaelRaskin
It's fine when it does dump core, the problem is that it should have but does not
7:29:03
jackdaniel
I know that I may have incited bash (sorry about that), but let's focus on the channel topic :)
7:30:02
beach
shangul: So let me put it this way, I don't think Mezzano contain any code in a language that is not Common Lisp.
7:30:40
jackdaniel
no-defun-allowed: conforming C does not either. I'm sure you saw LDB in sbcl at least once, and AVER twice or thrice ,p
7:31:28
jackdaniel
let's focus on advancing Common Lisp world instead of patting ourself that we did chose better than C programmers ^_^
7:32:09
no-defun-allowed
There are more ways for a C program to dump core. Yeah, let's talk about something else.
7:33:06
no-defun-allowed
I read in a Smalltalk editor there was a command to move some selected code into a method and replace it with that method call. Is there such a thing in SLIME?
7:35:00
no-defun-allowed
Say I have (defun f (x) (let ((y ......)) (g x y))), and I select the G call, which is actually more complex cause magic. Then it would ask me for a name, I write something like H, and it places (defun h (x y) (g x y)) before that defun.
7:36:34
no-defun-allowed
There is also some simple closure analysis though, copy-paste can't tell what variables are closed by that form. (Let's not worry about macros for now.)
7:37:14
oni-on-ion
yea, seems like http://www.foldr.org/~michaelw/emacs/redshank/ does some extra things for context
7:37:53
oni-on-ion
but using paredit (et.al) i cannot recommend higher for the business of s-expressing
9:37:36
flip214
well, in vim it would be 'da(' for "delete this parenthesis", "{" to move outside the "paragraph" (ie. the current DEFUN), "p" to paste, and then a bit of typing to surround with the necessary (DEFUN h ()" stuff