freenode/#lisp - IRC Chatlog
Search
14:24:09
rk[ghost]
right, i didn't go that far.. i knew i was in google.. but when i went to type a math equation.. my mind said... operator first!
14:24:24
phoe
rk[ghost]: ssh from the second machine to the one that has the repl, or go for remote swank
14:57:16
mrpat
I have an issue with parsing a uri from JSON. Once it is parsed, the repl evals it and counts the : as a package delimiter and spews an error. Is there a simple fix?
15:05:37
Bike
why do you even have this literally in your code? will this not be like, a variable with a string in it, later?
15:06:12
dlowe
since we don't have curly quotes in our code (and maybe we should!) it can't figure out where your quotations begin and end
15:07:09
Bike
if you write "foo" bar "baz" in your code obviously the code parser is going to think it's two strings.
15:07:39
Bike
So escape the internal quotation marks if you write it literally in the code like that.
15:08:01
Bike
I'm just asking because having literal json in your code seems unusual. Usually you'd be reading it off the wire or something, I would think.
15:09:39
mrpat
I am just trying to get used to dealing with it. I will be sending and receiving JSON through a socket connection.
15:14:03
Bike
If you write "foo\" \"bar", the parser sees the backslashes and accumulates a literal double quote character into one string instead.
15:16:13
Bike
When you actually are getting raw json, that will just be a string in your program, and the lisp parser won't get anywhere near it.
15:16:17
easye
Is there any portable way to read user input from a terminal without echoing the characters typed? (I need to input a passphrase).
15:16:55
Bike
And for that you do have to escape it, because otherwise it can't be parsed with the code, because "foo" "bar" would obviously read as two strings and so on.
15:18:01
Bike
because with-input-from-string would go hey wait, why are you giving me like eight strings instead of one string.
15:19:58
Bike
if you expect to be using literal json a lot, you could alter the parser a bit so that you don't need to escape things.
15:21:08
semz
easye: Unices have getpass (unistd.h), and while I'm not aware of any CL wrapper it's a simple FFI call. Whether FFI is "portable" is another question though.
19:17:18
aeth
The two ECLs (one in roswell and one from the distro package manager) that I have installed failed differently, which suggests a cached fasl issue. I managed to fix the one from the package manager.
19:18:20
aeth
It looks like the one in roswell fails in process-grovel-file with ":INPUT argument to RUN-PROGRAM does not have a file handle:\n#<a SWANK/GRAY::SLIME-INPUT-STREAM>"
19:21:58
aeth
hmm, I thought deleting the caches for slime, static-vectors, and cffi would fix it but it did not.
19:39:55
LdBeth
ACTION uploaded an image: ima_e4a35ae.png (103KB) <https://matrix.org/_matrix/media/v1/download/matrix.org/VtWmbyVTaLjtfLLTQgxLBHbS>
20:14:46
fortitude
if I want to invoke a restart from a handler, and I want the same handlers to remain in effect, is the only way to do that to invoke the restart from some call-with-handlers function to re-establish them?
20:15:29
on_ion
joh11: try to disable eldoc[-mode] if you've got it on? it errors for me in a different way but ive got a fix in the code on my machine for it
20:19:04
joh11
on_ion: disabled it, but I still have the errors. However now the company-mode small autocompletion is popping, so I think it was still part of the problem
23:25:01
pfdietz
I wrote some simple code to grovel over quicklisp systems looking for package name and nickname collisions.
23:27:48
pfdietz
The 115 excludes names that are in more than defpackage in only one software/...-git/ directory.
23:28:33
Xach
The example that springs first to my mind is BT for bordeaux-threads and binary-types.
0:42:55
aeth
I think that the issue I was having might be an interaction between ASDF, ECL, and certain libraries that deal with foreign code. When I updated to the latest Quicklisp, the distro-provided ECL stopped working with my program again. I guess ASDF isn't detecting when some things become stale in ECL?
0:43:26
aeth
I couldn't get the roswell ECL to work, but I suspect the solution is delete even more cached files than I thought to delete.
1:23:50
dorothyw
How can I get the performance of hash tables with pseudo-purely functional programming
1:25:11
dorothyw
As far as I know when programming in a pure way you can't get the same o notation as an array
1:37:47
jcowan
You cannot, although there are algorithms that can give you *local* O(1) performance by clever caching
1:45:02
dorothyw
how good is 0(1) compared to the worst performance of a hash table and how good is it compared to the best performance in layman's terms
1:48:13
|3b|
i think 'pure functional' dictionaries usually just do fairly flat trees, so you have a small log term which is close enough to constant in practice
1:52:15
|3b|
also have to balance out how much memory you waste, if you care about that (in both cases, since hash tables need free space to avoid collisions, and trees spend space on pointers)
1:52:57
dorothyw
I've read that binary search trees are o log n. DOes that mean that it gets progressively easier over time?
1:54:13
|3b|
it means that if you have N entries, searching takes log(n) time. so 256 entries for a balanced binary tree is log2(256)=8
1:55:44
|3b|
while a 256 entry list you would have to search on average half of the list = checking 128 nodes (best case 0, worst 256)
1:58:14
|3b|
and in practice you probably addressing things larger than 1 byte and have much less than 2^48 bytes of ram (something like 256TB), so more realistically log2(X) is unlikely to get much past low 30s