freenode/#lisp - IRC Chatlog
Search
0:57:12
pjb
megachombass: the memory cell at that address must contain (entreefonction). How do you write a function such as @generate, to store (entreefonction) in memory?
0:57:19
Bike
pmc_: cos you haven't told it what x is. doesn't it say something like that? "undefined variable" maybe?
0:58:07
pjb
megachombass: notice that load-vm is written in Common Lisp, not in assembler. You cannot write load-vm in your VM assembler!
0:59:04
pjb
megachombass: you have two alternative: either you move your VM toward your assembly, adding data types and instructions to deal with Sexp in the VM, or you must write an assembler that converts the sexps into numbers and only numbers.
1:00:15
megachombass
it will add more functionalities to the VM (as i have not added much code to the actual vm......)
1:00:58
pjb
megachombass: if you choose the later option, you should notice that if you want to use the same compiler generating the same assembler, you will need to implement in your VM that works only with numbers, a lisp VM, ie. you will have to implement functions such as CONS, CAR, CDR, NULL, INTERN, READ, etc…
1:01:44
pjb
megachombass: if you choose the earlier option, then you can keep most of the current compiler and assembler, since you have a lisp VM. This is similar to the clisp "lisp byte code compiler".
1:02:40
pjb
megachombass: in either case, we're not talking about 0.2 BTC. It's rather something like 20,000 BTC, to find somebody with a time machine to send you back last month.
1:03:38
pjb
(assuming 20 million USD is what it takes for a 1-month time travel, but I could be wrong, it could be 200 million or 2 billions).
1:04:59
pjb
megachombass: You have barely the time to write the specifications and a design sketch for your system.
1:08:03
pjb
The interface between modules is not performed at the level of the API. It's performed at the level of the specifications.
1:20:34
aeth
Imo, anticipate the worst case and schedule a way to try and finish the project in 8-9 hours.
1:21:39
pjb
design and implement a VM able to run self modifying programs. Design and implement the assembler and compiler so that it can be targetted to that VM.
1:22:13
pjb
Basically, you have to know that very well, you have to know lisp very well, and you have to start from scratch.
1:23:09
megachombass
exactly, and i know the vm comme ci comme ca, im a dumbass in lisp, and if i start from sracth i will do nothing in the remaining time
1:23:31
pjb
I would say, there would be a 0.6 probability I could do it in 22 hours, but I would ask form more than 2 BTC, and even with the money I'm not sure I'm motivated to do it. And unfortunately, I'd have to sleep too, so…
1:24:53
megachombass
THEREFORE, i cant maybe purchase a couple of hours of your time to work on whats already been done?
1:26:27
aeth
You need to (1) understand the subject, (2) be comfortable in the language being used, and (3) have written something similar before.
1:27:29
aeth
The problem is that the only people who meet the requirements are people who won't do people's homework, especially not for free.
1:27:38
Bike
if you're worried about being kicked out of university, paying someone to do your homework seems like a bad move to me
1:28:01
aeth
(and if you want to find some shady Internet figure to pay, doing it in a public channel is not a good idea)
1:31:19
aeth
The thing is, programmers can make a lot of money with their talents without having to resort to shady internet deals.
1:31:47
megachombass
pjb: common, just a couple hours of your time! you save my life, and you earn some money
1:32:18
aeth
At this point, the best you can do is partial credit, and try to write as much as possible and do as much as possible.
1:33:02
aeth
Buy coffee, go for a walk, think about how to implement as much as you can in 8-10 hours of work. Keep in mind that a sleep break will probably make you more productive, so don't pull an all-nighter.
1:34:28
megachombass
right now, adding just a couple functionalities to the VM, make the code nicier would be enough
1:38:37
aeth
You need to follow a strict schedule right now. Break up the issue into features. Estimate the time. Find out what you think you can do in 8-10 hours. Prioritize on getting it as complete as possible. Ignore polish. Any optimizations or polish can just be commented in a note that you could update later, when you have time, if you need to use that program later.
1:39:49
aeth
#lisp will tell you the proper, idiomatic way of doing things. That is nice. That will save you time maintaining the code and make your code readable to the community. What you need, though, is a giant mess of spaghetti as long as you can get it done.
1:42:10
zazzerino
megachombass: Good luck with your assignment. Keep in mind the more effort you put into this, the more people will be willing to help you.
1:45:45
ebrasca
I like to make 1 function from 3 : read-dir-from-cluster , remove-dir-from-cluster and write-metadata.
1:48:53
aeth
Oh, and for the record, my advice (create technical debt! just meet the features!) is only applicable when you have less than a day to do more than a week's worth of work. It's terrible advice under normal circumstances.
1:49:22
aeth
If you do this for most projects you'll find that it's easier to rewrite it than to improve it. And that's a really bad thing.
1:51:28
ebrasca
aeth: I understand I have 3 similar functions in mi code and don't know how to refactor them.
1:57:49
aeth
Oh, and don't make panic coding huge projects at the last minute a habit, though. Not only do you create terrible programs, you also can only get away with this a few times in your life.
2:07:02
ebrasca
aeth: Do you think I can make 1 function from read-dir-from-cluster , remove-dir-from-cluster and write-metadata?
2:09:00
aeth
If it has a lot of common structure, but that structure is a wrapper around a body that's different, it looks like you might want a macro
2:09:52
aeth
i.e. the functions remain different, but the common, duplicated part is removed from the functions
2:10:29
aeth
The common part is a loop, so just glancing at it, it looks like the do-foo macro pattern might be a good idea.
2:17:36
ebrasca
With last refactoring read file changed from someting like 2 million bytes consed to 217,376 bytes consed. XD
3:46:53
pjb
ebrasca: yes, it looks like you have a common loop in those functions. You could put it in a high order function to which you would pass the body as a closure.
3:47:54
cryptomarauder
I just want to thank the entire lisp community for NOT using camelCase. There are a few exceptions but generally that schizophrenic code style hasn't infected the holy order of the knights of lambda calculus. *tips hat*
3:49:47
warweasle
cryptomarauder: That's only possible because of lisp itself. That whole '-' sign being a math thing and all...
3:50:02
pjb
ebrasca: something like: (map-cluster (lambda (i name …) …) cluster) or (docluster ((i name) cluster) …)
4:05:05
cryptomarauder
warweasle: that's true. I think I was lead to sensible style when I read the style guide of the Linux kernel. Ill admit, im a bit of a Torvalds fanboy. But really that's because hes nearly always right which is rare. Rare like Theo de Raadt being wrong.
4:40:20
warweasle
Programming question: In your favorite language, write a program to make a string all upper case....
4:41:09
aeth
I would argue, though, that if you're going to start escaping things, might as well use real spaces instead of camelCase. (defclass |foo bar factory| ...)
4:43:50
pjb
aeth: (setf (readtable-case *readtable*) :preserve) (DEFUN fooBar (noNeedForEscapes noneedForesCapes) (+ noNeedForEscapes noneedForesCapes)) (fooBar 1 2) --> 3
4:44:33
aeth
pjb: (1) I wouldn't want to program in a project that requires doing that to the readtable. (2) You'd have to have a lower case alias for everything or you just made your program even more unreadable than merely using camelcase
4:45:05
aeth
I shouldn't have said "you'd have to write", I should have said "you would probably write"
4:45:24
pjb
aeth: actually case sensitivity is nice. C uses it. Modula-2 uses it. Most languages use it.
4:45:45
aeth
CL has a lot less of a need for case-sensitivity because of its many namespaces for things afaik.
5:37:20
dmiles
does anyone know where i can get the lisp version of this function https://gitlab.com/ivargasc/ecl/blob/develop/src/c/compiler.d#L2737 ?
5:40:33
dmiles
right on.. there are just a few .lsp files that depend on it.. so i started writing it by hand and relized it must already exist
5:57:59
|3b|
for example http://www.lispworks.com/documentation/HyperSpec/Body/f_cons.htm tells you what CONS does
6:10:39
asarch
I was reading the chapter 2 from "Land of LISP: Learn to Program in Lisp, One Game at a Time!" book and I found the flet command
6:12:01
beach
asarch: Try to use the right terminology. Common Lisp doesn't have any "commands". FLET is a "special operator".
6:12:37
asarch
https://www.amazon.com.mx/gp/product/1593272812/ref=oh_aui_detailpage_o01_s00?ie=UTF8&psc=1#reader_B004AE3P4K
6:14:04
|3b|
ACTION thinks it is an OK simplification if it succeeds at its goal of making it interesting to get started
6:19:23
|3b|
ACTION has the impression it tries to present (lisp) programming as "interesting/fun thing you might want to investigate more on your own" as opposed to "boring/difficult thing that must be pounded into your head by authority figures", which seems like a good goal :)
6:21:56
whoman
the art style is personal, very well done. its inspired realm of racket but i havent seen that
6:23:19
beach
https://www.amazon.co.uk/Land-Lisp-Learn-Program-Game/dp/1593272812/ref=sr_1_1?ie=UTF8&qid=1517120584&sr=8-1&keywords=land+of+lisp
6:24:01
asarch
If a book would cost, for example, $100 USD. How much exactly do you earn from every book?
6:24:46
|3b|
does .mx have some different interpretation of $ ? prices seem odd there in general if interpreted as USD
6:26:59
beach
asarch: That is why I use self publishing instead. The margin is higher, and I can set the price myself (it has to be higher than the printing cost).
6:30:22
asarch
"Programming languages teach you not to want they cannot provide" —Paul Graham, ANSI Common Lisp
6:33:32
asarch
"(defun addn (n) #'(lambda (x) (+ x n))). What does addn look like in C? You just can't write it"
9:08:21
phoe
in-package is a macro and accepts #1=a string designator, not something that evals to #1#
9:08:44
dmiles
just weird that ecolisp used to let itself get away wiuth that.. sinc ei swear i have seen at least one other lisp do that as well
9:11:37
dmiles
(defmacro in-package (name) `(eval-when (:compile-toplevel :load-toplevel :execute) (%in-package ,(string name))))
9:16:08
dmiles
LarKC, CYC which used their own lisp dialects do impl as a function.. and a few years later 2001 when renamed to ECL.. it started doing "SYSTEM"
9:17:14
dmiles
I am using EcoLisp to bootstrap my WAM-CL lisp as back in the old days EcoLisp had not C-ified everyhting yet the way ECL has
9:21:16
dmiles
I think what happens is a developer will convert a .lisp function to .c .. get tired of converting that every build and start improving it from C while erasing the original .lisp
9:22:31
dmiles
so even if you grep the source repostiory the .lisp function is way behind the improvments maintained in C
9:39:14
shrdlu68
I've been messing around with compression, and I'm pleased that I've written something that appears to beat gzip in terms of compression ratio. It's based on a simple binary arithmetic coder.
9:59:31
Folkol_
Sounds good, shrdlu68! Did you try different gzip compression levels? How do they compare in speed?
10:06:37
dmiles
oh i guess there is something here: https://books.google.com/books?id=ciQEHp39pAkC&pg=PA57&lpg=PA57&dq=wam+common+lisp&source=bl&ots=Vyt8Y3nGMe&sig=zk2lk81j_0FPOVdTJtCrvsR1ugU&hl=en&sa=X&ved=0ahUKEwjct76ptPrYAhXFjVQKHWqwANcQ6AEIeDAN#v=onepage&q=wam%20common%20lisp&f=false
10:09:07
stylewarning
I’ve been interested in donating money to a pool to restore and modernize old Lisp projects from the 70s–90s.
10:11:05
stylewarning
For instance, I discovered Yale Haskell, which seems to have CL compatibility. Would love to see it run again.
10:12:27
dmiles
I'd like to see people put such programs together using a common blackboard (to share overlapping datastructures)
10:14:49
dmiles
it allows DAYDREAMER to use SWALEs data which daydreamer was designed for but never got a chance
10:18:21
dmiles
you are correct not even as employees has been allowed to combine any of the above systems :P
10:22:21
dmiles
here is a chanriac like output (to see what i am talking about ... https://docs.google.com/document/d/1rdI_f-2YnX0e2RD6rGAY57YAqzLj2xHsk36m5HT6SoM/edit )
10:25:08
dmiles
"AFAIK they built some huge DB of common knowledge with some reasoning skills" <- very close.. what they built was a Knowledge Representation language that was ideal for how programs would share data
10:25:56
dmiles
(of course along with what you said.. they just dont promote that part of the project.. which btw was the only reason for funding)
10:49:33
dmiles
anyhow that has been my lifes mission for a long time.. to combine those old AI programs into a Inference engine
10:52:46
dmiles
(i used the word "recreation" only so to say that there is not much technological innovation required)
11:48:38
megachombass
well, i want my code to do the same thing, but written in different way: https://codeshare.io/GkwJYA