freenode/lisp - IRC Chatlog
Search
17:25:31
astronavt
does sbcl or any other implementation support unicode names? also would be curious if there is a library for "math mode" using infix notation for writing equations
17:40:58
pjb
astronavt: That said, I don't understand why you ask about unicode, since all the characters in (symbol-name '|"^"|) are in the ascii repertoire: (map 'list 'char-code (symbol-name '|"^"|)) #| --> (34 94 34) |#
18:54:32
dlowe
everything that isn't a parameter will have to be set up in your tests to avoid interfering with your other tests
18:56:01
dlowe
the easiest kind of testing is you call a function with some arguments and you compare against the return values
18:59:20
dlowe
ebrasca: I would set up an in-ram virtual disk and see if reads and writes to it behave like you would expect
19:00:16
dlowe
ebrasca: there's a difference between a mock and a fake now, where a fake is something you construct to behave like an external dependency, and a mock is a thing that a library constructs for you
19:01:16
dlowe
if you use syscalls, that may mean abstracting out the syscalls so they may be swapped out during testing
19:02:25
dlowe
ebrasca: does mezzano have the capability to mount RAM-backed storage? Because that would be the easiest, it seems to me
19:25:24
Ober
trafaret1: lexical-let is the newest generation of excellence in lisp. No other lisp has it because we're too old school
19:25:58
Harag
:dlowe ..with testing global state can also be your friend, if you design your tests to use global state you set up "scenarios" and then swap them out with out comping up with values having to change the actual tests, all your tests does is check the output then.
19:27:49
dlowe
ebrasca: (defun test-write-file () (fat32-write +test-data+) (check-to-see-if-write-happened))
19:56:16
White_Flame
gabbiel: inlining can work against interactive programming. If you redefine a function that's inlined somewhere else, it's best to restart your image and reload
19:57:28
White_Flame
you might get some compiler overflow errors if you explicitly declare a recursive function to be inline. But with tail call optimization, self-recursion can reduce down to a single jump so the point is moot
20:13:13
White_Flame
well, you could certainly develop something like that by changing the implementation
20:13:48
White_Flame
but a similar issue appears with macros as well. If you change the defmacro, that doesn't re-expand all its uses automatically, especially since macro expansions might perform side effects
20:58:47
vivit1
system-apropos lists nothing when I search for the names of packages that are right there on quickdocs, and when I try to quickload them I'm told that they're not found
21:07:51
paule32
ebrasca: the script have to find 2 fracts a/b, where the cube's result in a |N natural number
21:13:35
Oladon_work
paule32: You're essentially asking people to do your homework for you. I'm pretty sure that's not what whoever asked it of you had in mind.
21:15:40
Oladon_work
Regardless -- you're asking people to write code for you. You're much more likely to get a good answer if you show that you're actually trying to write it yourself.
21:19:52
White_Flame
paule32: also, look up the term "CAS" (computer algebra system). there should be lisp libs available
23:43:28
aeth
On the earlier topic, inlining is an interesting alternative to type declarations. an inline 2+ (defun 2+ (x) (+ 2 x)) will avoid the generic + where possible just like the built-in 1+, but without needing to define 10 versions for each of the number types you might be using
23:44:52
aeth
If you inline to remove generic sequence/number functions, then you also get smaller code, not larger.
23:50:00
ebrasca
paule32: In common lisp you use +constant+ for constant and *variable* for variable.
23:53:25
no-defun-allowed
Anything (representable as a CL number) is a fraction if you have a large enough denominator.
23:55:16
ebrasca
paule32: I recomend you this http://clqr.boundp.org/clqr-a4-consec.pdf for Quick Reference.
1:58:44
aeth
ebrasca: You can do any kind of software where the choice of language is irrelevant, and up to the developer. Mostly web server stuff, I guess.
1:59:00
White_Flame
there are certainly fewer opportunities to be employed as a common lisp software developer, but outside that it's equivalent to making money with any other programming language. Build something to sell
1:59:41
aeth
no-defun-allowed: symbolic AI isn't AI, only ML is AI these days... and if you disagree, there are plenty of IRC channels where you'll face that argument.
2:00:43
White_Flame
applied logic, vs applied statistics. Neither is "AI" in the most general sense ;)
2:02:04
paule32
(format nil "; (a / b) = is cubic = true | a := ~10D^3 / b := ~10D^3, Wert = ~10D~%"
2:03:02
no-defun-allowed
ebrasca: I would still pay for someone to teach shrldu68 alignment so they can pick up that goddamn red block.
2:03:07
ebrasca
White_Flame: I have server ( Talos II ) , and I don't know what is this "something to sell" .
2:21:36
dmiles
What i get confused about is that most people nowadays when they talk about logic (and even peopel that know quite a bit about mathematical logic)( have never heard of or seen syumbolic logic
2:35:06
paule32
logic is logic. no change since greek maths, the problem is, near the half students learn wrong math at the universities
2:43:03
no-defun-allowed
So, on the stack of topics, we have: what the infix operator : means, mathematical logic versus symbolic logic versus logic, what constitutes AI, and then how ebrasca would get paid for writing Lisp and paule32's buggy program.
2:43:59
paule32
so, if you have to solve 2 + 4 * 6 , you give wrong 2 + 4 * 6, the right way is: 6 * 4 + 2
2:45:33
no-defun-allowed
The order of operations using infix notation is defined in some arbitrary manner that presumably required as few parens as possible, which is approximated as BODMAS/PEDMAS/etc
2:45:57
aeth
also division/multiplication have the same precedence level, and the whole reason to use something like s-expressions or RPN is to avoid dealing with precedence...
2:48:08
aeth
the computers themselves don't see 1 + 2 * 3 they see a bunch of data loaded into registers, and constants, and do binary operations on them...
2:48:32
no-defun-allowed
I should figure out how to add some startup code to Maxima, but I asked it to display its internal representation for `a * b + c`. It replied with `((MPLUS SIMP) ((MTIMES SIMP) $A $B) $C)` which is `(+ (* a b) c)`
2:49:18
beirc
This is a notational issue. Algebra comes from right to left and from right to left. I prefer the latter. But computers are sequential. Completely different issue.
2:49:37
aeth
paule32: I think you're confusing endianness when you say it's read "4 3 2 1". Iirc most computers read numbers byte-by-byte in reverse order, i.e. little endian.
2:50:24
no-defun-allowed
The first in is the first character entered. (with-input-from-string (s "1234") (read-char s)) ↦ #\1
2:52:01
no-defun-allowed
And what a computer does internally is none of my business, since we are in #lisp and in Lisp, characters in a stream are read from start-to-end
2:53:33
paule32
only the fact, that computers has this "fixed" "bus" length, the computer knows what he should do
2:53:37
no-defun-allowed
"This stream will supply, in order, the characters in the substring of string bounded by start and end." There's your damn answer.
2:53:38
aeth
no-defun-allowed: paule32 just talks about a random grouping of random computer topics and mixes up CL with Java (or C++?) etc. paule32 should focus on one topic at a time.
2:54:38
aeth
paule32: There are many layers of abstraction in a modern computer. You should focus on one layer at a time, and not mix them up. Often something is only true at certain layers.
2:55:06
aeth
CL actually explicitly goes against the machine in a few ways, just to be portable across architectures.
2:55:10
no-defun-allowed
paule32: there are two fishermen in a boat: /blit and /quit. /blit falls out of the boat. Who is left in the boat?
2:56:41
paule32
either you would test me, or you don't understand logic. i will not assume this, you are older, and you should have may bigger skills than me
2:59:40
dmiles
when aristotle (greek) inquired about logic he wanted to create a sort of "reasoning system" that humans and instituions could use to work with clarity .. His logic was a non-monotonic (where the very premise of truths can change at any moment ( as the indiviuals discover new things)). It would strive to overcome paradoxes unlike mathematics and classical logic.
3:02:01
dmiles
This logic was created to be powerfdull enough to do mathematics or arithmetic (though mathematics is only about monotonic logic, it would not be strong enough to be used on symbolic logic)
3:04:31
beirc
paule32: Wait. I have. <https://matrix.org/_matrix/media/v1/download/matrix.org/KOANnIwxhSmHnfqWhWwbapOl>
3:10:11
paule32
i can't see you in your head, for me, it would be nice i have more friends, but i can't find such, i life on behind country, and my money is not over 80 dollars at all, with that, i have to pay mobile (25 dollars) ...
3:13:48
paule32
naja, ich mühe mich hier mit meinen bad bEnglisch ab, und dann kommt ihr mit deutsch
3:14:13
beirc
Ist gerade jemand da, der sich beschwert. Wir koennen jederzeit umziehen, wenn jemand kommt.
3:16:13
paule32
um es kurz zu halten: ich bin mit den fahrrad, im winter (februar) nakig auf die autobahn gefrahren und wollte zum arbeitsamt, mit einen zerissenen unterhemd
3:25:04
bookshelf0
Why do you guys use Lisp? I hear a lot of people saying it's great but I can't figure out why.
3:42:57
aeth
I'll answer the question, though. My go-to (I guess that's just GO in CL) example is always HTML templates. In other languages you'd do something like <p> {{ GENERATE SOME DATA }} </p> but in CL you do something like this: https://edicl.github.io/cl-who/#example
3:43:15
aeth
So you generate strings from an intermediate format that uses syntax like (:p "Hello, world!") and basically reverse the templating
3:44:19
aeth
ebrasca: there's a bit of a delay on IRC. that person from my perspective left a second before your message was sent
3:56:58
PuercoPop
dmiles: iirc you like both prolog and lisp. Have you seen this WAM implementation https://github.com/guitarvydas/wam/?
4:04:12
dmiles
(because i thought it wasnt quit working/ready.. but looking at that repo it looks further along)
4:10:52
dmiles
PuercoPop: well neat, i'll have to look into it.. I wonder how well it performs .. Like maybe even good as swi-prolog when ran on SBC:
4:52:49
Harag
:aeth ... my answer to why lisp: Don't use lisp it will change your life! If you work for a boss he/she will sit you down in their office and give you a serious talking to for trying to sneak lisp into your projects! Once you start using lisp you will get very unhappy in your job when having to use other languages, your frustration levels will sky rocket. The other programmers will start avoiding you because they dont understand what you are blabbering about
4:53:59
no-defun-allowed
Harag: shit on the floor and hit the door, then start your own Lisper cooperative and put that dumbass out of business
4:54:42
pjb
Harag: do you realize that because you put the colon before the nickname, our IRC client won't match it, and therefore won't beep at aeth to notify him that you addressed him. So basically you're speaking in the desert.
4:57:15
Harag
If you run your own little business and you start using lisp you will be amaized at how quickly you get MVP's to clients, the clients wont be able to keep up, so you have to take on more projects to keep cash flow going and soon you will have tons of open ended projects and little cash. After a while you will start worrying that you are charging your clients to much because you are spending so little time on projects. Then when you drop your prices to be fai
4:59:02
Harag
just thought it would be fun to put the why lisp in human terms and in the negative...some reverse psychology ;)