freenode/#lisp - IRC Chatlog
Search
5:13:24
White_Flame
the program counter doesn't enter any runtime utility during a function call/return mechanism itself, right
5:13:30
whoman
jasom, unless it is referenced in the code which the tree shaker shook ? why would it shake out used things. lets imagine no shaking!
5:14:05
White_Flame
well, I can think of one language where the runtime is invoked for function calls: forth
5:14:19
jasom
whoman: just mentioned that as a parallel to "C that isn't linked with libc"; teasing out the runtime from the standard-library is ill-defined
5:15:40
whoman
objective-c too, for method invokation, uses runtime/library (which can be swapped, even the way objects are malloc'd can be rewired) for class lookup and such. i am not sure if even c++ has a runtime for method calls
5:15:47
Zhivago
That's because he still hasn't quite understood that the C standard library is part of the C implementation, and is not a C library.
5:16:41
jasom
whoman: C++ non-virtual methods are called just like any other function (fixed functions at link time). Most C++ implementations give objects with virtual methods a table, and every object has a pointer to that table
5:16:45
White_Flame
though certainly there are parts of the C stdlib that could be built up as standard C functions on top of a "core" runtime, like string manipulation, higher-level I/O, etc
5:16:53
Zhivago
The only really important thing to take away from this is that there is nothing fundamentally special in the difference between C, lisp, etc, runtimes.
5:17:26
White_Flame
because many programmers don't deal with the lower level stdlib calls, but mostly with those which would have a pure-C implementation, I could see that assumption as being a normal library
5:17:49
Zhivago
white_flame: An implementation is free to do that, or free to apply special optimizations. This is part of why you may not replace standard C functions with your own code.
5:22:12
whoman
well. C doesnt appear at runtime. but lisp does. as garbage collection, as exceptions, as image loading and code loading. C isnt there anymore when the binary is running. sorry i dont think C has the same kind of runtime as lisp. in practice very different.
5:22:43
whoman
the bare minimum of stuff needed to put into an executable binary is one thing. all binaries have that
5:25:20
flip214
whoman: but the C runtime eg. catches signals _during_syscalls_ and retries them, for example.
5:26:29
Zhivago
C has no calling convention. A C implementation may have zero or more calling conventions.
5:26:40
White_Flame
also, while C stdlib might shuffle heap data structures around during free(), so you might consider that user-invoked rather than autonomous, the same thing happens in Lisp, where GC is usually invoked during allocation, instead of on its own
5:27:07
Zhivago
whoman: You're delusional. C does appear at runtime as memory management, as non-local transfers, as dynamic library linkage, as ...
5:27:31
Zhivago
whoman: While the details differ, the fundamental problems remain similar, as to the implementation strategies.
5:29:05
White_Flame
at least, there's semantic categories you can lump various parts of the runtime into, but that's about it
5:29:27
whoman
the C runtime is just a library. lets not call people names, we already have enough trouble with the terminology we have going.
5:29:35
Zhivago
C defines the C Abstract Machine. Whatever parts of the CAM a C implementation doesn't realize at compilation time will be realized at run-time, and be part of the run-time overhead.
5:29:57
Zhivago
whoman: You're wrong. The C runtime is not just a library. You're just not listening.
5:30:32
White_Flame
and there's a difference between "C the language" and "C in a particular implementation", or even "C in common implementation strategies"
5:31:20
whoman
i do not know how i have offended you sir but i notice now that you have begun to take this discussion personally. like i said i am trying to clarify some terms for myself, that was all. i have thanked you earlier already but i thank you again.
5:32:28
Zhivago
whoman: You just keep repeating the same errors over and over without appearing to learn.
5:33:34
White_Flame
C is defined in such a way that it _should_ be able to collapse down to a very low-level, low-overhead model, but there's no guarantee of that
5:33:39
whoman
Zhivago, i think you are trying to call me stupid because you are jealous when i said i grew up on C. what does that mean to you? or is it something else? i do not wish to continue to "learn" with you. not the way you want.
5:33:54
White_Flame
therefore the assumptions of the stdlib you have tend to be around what implementations are usually like, not what C allows/defines
5:34:23
Zhivago
whoman: If you grew up on C, answer this question. char d[3]; What is the type of d?
5:34:34
whoman
White_Flame, well, i remember the days when glibc was being rolled out, and i think it was able to be swapped without relinking a binary, afaik
5:36:18
whoman
not a wierd fraternity test. sorry i failed. i would rather not want to pass that. lets just grow up ok?
5:36:38
Zhivago
Well, like I said, I suspect that the real problem is that you don't understand C very well.
5:36:53
whoman
i didnt think it was serious at first so i avoided it. i was busy learning and exploring and figuring stuff out.
5:37:13
Zhivago
And that believing that you do understand C very well is preventing you from learning.
5:37:21
whoman
good for you, that does not affect me. i have no reason to prove anything to you. can we continue ? i am going to read mezzano code for a bit. thanks for the link
5:37:50
beach
Very few people have actually read the C standard, so there are a lot of (usually incorrect) assumptions about what C really is.
5:39:54
whoman
no im good. i know what i know. but i didnt know that a big part of the discussion was hostile. which i cant learn with
5:41:20
Zhivago
No, atoms are everything other than lists -- but you're right that they're not datastructures, they're syntax.
5:46:47
White_Flame
string theory vocabulary applied to programming languages would really mess up character-string naming
5:48:19
Zhivago
Well, we could have a four hour discussion about why character isn't reasonable, if you like.
5:48:32
White_Flame
and because of BASIC as a kid, I often pronoune the "$" character as "string". eg "A$" is "A-String"
6:04:19
Zhivago
One thing I have come to appreciate more is having things like variables lexically distinct from syntactic elements.
8:38:05
ParrotSec_
i have a server list in a specific format and need to filter out specific servers without loosing whatever content is below there server address/title, for example "stanzas\ninfo1...\ninfo2...\nstatus...\nadmins...\nusers...\ntotal_logins...\nban_list...\nwhite_list...\nblacklist...\n" and so on for each server, how would i do so and what "tool" would be best suited for the task
8:39:10
beach
ParrotSec_: That's not a "list". It is a single string where entries appear to be separated by newlines.
8:40:12
beach
ParrotSec_: If you can't influence that data structure, you will need to move contents around to "compact" the entries.
8:42:45
ParrotSec_
say every server name contains <servername>:80 or something similar that is unique from its contents
8:43:34
beach
If all you have is a single string, you are going to have to move characters around, and REPLACE is probably the best tool for that. But what you have is not a great data structure for this kind of manipulation. Of course, if the length of the string is not too great, then it probably won't matter much.
8:53:58
beach
ParrotSec_: I gave you the tools. I am afraid I don't have the time to implement it for you. But if you have more questions, I'll be happy to answer them if I can.
9:07:28
beach
ParrotSec_: Like I said, I gave you the tools. I am afraid I don't have the time to implement it for you. But if you have more questions, I'll be happy to answer them if I can.
9:10:21
beach
You would then have to search for the position of the server name, and the position of the first following double newline. Given those positions, you would move all the characters following the last of those two position to the first of those two positions. No?
9:11:38
beach
Or perhaps you want to extract an entry? Same thing. Find those two positions and use SUBSEQ to extract the entry.
9:24:56
beach
For starters, it would be good to know exactly what it is that you want to do, i.e. what you mean by "filter out".
9:25:38
beach
Common Lisp is a general-purpose Turing-complete language, so unless you are trying to solve some undecidable problem, it should be possible.
9:26:49
beach
ParrotSec_: I'll leave that to someone who feels he or she has the time to wade through all that stuff, which is unrelated to Common Lisp on top of that.
9:27:29
phoe
and you are unwilling to explain what it does and instead tell me to read it and guess it myself.
9:27:44
ParrotSec_
the problem lies with the the second read loop "server_port80/stanzas is ACCAPTABLE
9:32:03
phoe
It seems that a person with a nickname candide is an operator of #bash. You can query them in private and ask them the question.
9:57:47
dim
2: (SB-THREAD:CONDITION-WAIT #<SB-THREAD:WAITQUEUE Anonymous condition variable {10044081F3}> #<SB-THREAD:MUTEX "Anonymous lock" (free)> $
10:05:22
dim
sbcl 9477 root 10u IPv4 149607 0t0 TCP localhost.localdomain:52316->localhost.localdomain:mysql (CLOSE_WAIT)
10:12:22
p_l
anyone using AllegroCL on windows and could suggest a way to make it open different browser than IE for everything in docs?
10:15:32
jonssons
I'd like to thank the author of "Practical Common Lisp" for open sourcing his book with monetary value. However, I do not want to pay taxes by purchasing the book. Any way I can send money to the author?
10:15:58
p_l
flip214: yes (Chrome), and there appears to be an option of embedded browser when writing CG GUIs
10:17:32
flip214
I'd suggest to open regedt32, and look in HKLM/Software/Classes/.html/OpenWithProgIDs
10:22:27
flip214
sorry, I thought this to be more of a windows question and not so distinctly for ACL
15:06:34
phoe
main-clause::= unconditional | accumulation | conditional | termination-test | initial-final
15:06:51
phoe
so COLLECT which is an accumulation clause can happen before UNTIL which is a conditional clause.
15:08:36
dim
here's an example in the same vein, albeit with other clauses https://github.com/dimitri/pgloader/commit/7f55b21044047469413ab0e6b905a0e07f26ba9a
15:09:23
drmeister
Yes, I think I want for in the first two lines. Each strand is an instance of a class that has a 'p5-end' slot and a 'p3-end' slot. They describe the first and last (inclusive) nodes in a doubly linked list.
15:09:53
drmeister
The nodes in between are accessed using (forward-node cur) starting from the p5-end and stopping when you hit the p3-end.
15:15:03
drmeister
What I needed to know was the main-clause::= unconditional | accumulation | conditional | termination-test | initial-final
15:22:22
drmeister
Please don't - I was showing a colleague that he can ask questions in #lisp and I'm explaining that you should do your homework first and look things up in the CLHS.
15:22:39
drmeister
I explained that by asking a stupid question that I had kicked a bees nest and now I need to apologize.
16:02:45
didi
Funny thought: I am computing the number of days between 2 dates by subtracting their universal-time and returning the quotient of it divided by 86400. But, with enough leap seconds, it will start to drift away. (as my unit measurement is a day, some leap second won't mess with calculations)
16:39:00
dim
in particular the parts where the history takes an important play into how to best implement the internal time representation
16:41:45
_death
there is also a book on my wishlist, Calendrical Calculations, by Edward Reingold, who also wrote the Emacs calendar package
16:56:19
jasom
didi: unix times to not include leap-seconds, GPS time does. At one point Android's clocks were 25s off for this reason.
16:58:16
pjb
A very interesting subject, notably if you plan to program a time-machine navigation software.
16:58:48
pjb
It's probably the reason why we don't see more time travellers: it's not that they don't exist, it's that they're lost in time!
16:59:17
jasom
pjb: and depending how inertia works when changing time, they could easily be lost in space too
17:00:46
pjb
jasom: yep. Since fundamentally, you will have to get the absolute positions and movement relative to the whole universe (which is hard to determine because of the light cone).