freenode/#lisp - IRC Chatlog
Search
15:00:22
TMA
shrdlu68: i have given fizzbuzz as a question for hiring test. university graduates (masters degree in CS) most have had errors. it was the first time i have seen float based loop from one to 100
15:11:05
schweers
Am I overlooking something or does the hyperspec not state what the default test function for MEMBER is?
15:12:21
specbot
Satisfying a Two-Argument Test: http://www.lispworks.com/reference/HyperSpec/Body/17_ba.htm
15:15:02
TMA
jmercouris: this was (at least nominally c or c++); I left the language choice to the candidates
15:18:41
TMA
shka: off by one (printing 0 to 99 instead of 1 to 100), omitting elses so that both the word and number gets printed, not testing for divisibility by 15 before checking for 3 and 5 while not omitting elses (so that Fizz is printed instead of FizzBuzz), I think there was a puts for printing numbers
15:19:21
schweers
beach: regarding performance vs perfection oriented people: do you too get the impression that our field has this problem more than other fields do?
15:20:07
beach
schweers: I do have that impression, but I think it is wrong. Probably only based on the fact that I am not so knowledgeable in other fields.
15:23:15
TMA
schweers: the hospital management requires measuring average time per "procedure" performed (where procedure is for example "chirurgically remove X") ... maybe there is performance pressure too
15:24:02
schweers
TMA: not what I meant, but yes, it is a problem. Then again, this is not the way things should be.
15:24:09
beach
TMA: Actually, it is unrelated. "performance oriented" is what I call what Carol Dweck calles "fixed mindset".
15:29:20
beach
I did not, no. I didn't "discover" them until I spent a year in New Zealand much much later.
15:31:22
schweers
I understand where you’re going with this essay, but I don’t think it solves the problem you are describing. Take a look at britain to see why.
15:31:48
schweers
disclaimer: I am biased against school uniforms on the basis that I didn’t like them as a child.
16:53:43
akkad
is there a more common solution to serializing say a hash object to a string, without resorting to so say json?
16:54:26
akkad
e.g. leveldb requries strings for the value store. and was looking for a non-json approach
16:55:54
Xach
akkad: I don't know of a common solution, but there are many possible ad hoc solutions that spring to mind.
17:19:35
jmercouris
the readme makes it seem ultra trivial: https://github.com/fukamachi/caveman#start-a-server
17:21:57
akkad
when running images remotely for any length of time, how do you do job control sort of stuff? e.g. redefine a function, and restart a thread running in the background?
17:29:03
akkad
the bt functions all seemed sort of cumbersome, and figured there must be a more job control like interface, that folks used for long running images
17:29:19
jmercouris
well, how would you control threads in lisp to begin with? https://lispcookbook.github.io/cl-cookbook/process.html
17:33:06
innovati
I'm not an emacs user, but I have heard emacs has lisp extensions and I'm _really_ curious about a scriptable editor…are there any good resources for getting started with emacs and elisp for people who are new to emacs?
17:35:34
rpg
innovati: Probably best to ask in #emacs - - you might specify that you are familiar with other lisps.
17:55:01
clintm
Is there a way to get a list of the possible conditions that might be raised from a given function in slime? I'm confident there is not but I still find nuggets of hitherto unknown to me nuggets of utility, so I thought I'd ask.
18:51:56
ealfonso
I have a long-running service that continually adds elements to an array until it eventually runs out of memory and crashes. Is there a library that provides an abstraction to a data structure with a maximum in-memory capacity and the rest backed by disk?
19:00:40
rpg
clintm Bike: I think even if we had some structure like Java, we couldn't do much, because the set of standard conditions in the spec is minimal and weak.
19:01:39
rpg
Even if you knew what set of conditions might be raised by a set of mathematical operations in SBCL, I doubt that would be at all predictive about what CCL or Allegro would do, for example.
19:02:58
rpg
I could imagine that given a small piece of code, and access to the SBCL source code, a sufficiently clever theorem-prover could compute a conservative over-approximation of the set of conditions that could be raised.
19:05:38
ealfonso
dlowe I guess this seems something similar to memory paging or caching, so I wasn't sure if there was something already available
19:09:43
aeth
ealfonso: There are ways to serialize to disk, so it shouldn't be too hard to choose one of them.
19:12:47
ealfonso
I was thinking of implementing this using a virtual array displaced to a real array of fixed capacity, with the real array periodically flushing to disk, and adding a custom handler for negative indices into the real array. I wonder if it's possible and efficient to handle a condition like this in a custom way : (aref (make-array 5) -1) => #<SB-INT:INVALID-ARRAY-INDEX-ERROR expected-type: "(INTEGER 0 (5))"datum: -1>.
19:18:31
rpg
ealfonso: You can make your own condition, which is something like "item paged out of memory," and write a continue handler that would page it back in.
19:19:13
rpg
But it sounds like you need a notion of page or something, which sort of smells like you are reinventing virtual memory. Why doesn't OS VM solve this problem for you?
19:27:27
ealfonso
rpg well, in my case the amount of memory grows continuously, and eventually the process always runs out of memory (including any additional swap space). but you're right that I could increase the amount of swap space without having to change anything else.
19:30:06
rpg
ealfonso: Before trying this new data structure, unless you need it to be portable, I'd check with your lisp implementation to see if there's a way to make it smart about paging a data structure like this. Maybe there's some way to allocate it so that the implementation will handle it well. Or I wonder if you could just make a big array that's mapped on to some block-size of individual arrays, hoping that parts of the array that aren't being used will get paged out
19:34:45
ealfonso
in my particular case, I only care about the latest 'page' being in memory since it accounts for 99% of accesses, so for my use case I don't need to worry about paging, only about not crashing due to running out of memory by periodically flushing to disk or increasing virtual memory.
19:35:59
rpg
ealfonso: Right, but we need to make sure that the lisp implementation correctly discovers this pattern of memory access. So it would help to know if the implementation will, for example, page out parts of large in-memory data structures. If it *won't*, then it might help to do the trick I mentioned above.
19:38:45
ealfonso
rpg that's right. unless I implement it manually and manually flush to disk and only keep one page in memory (which would mean all other accesses outside of latest page would be a miss, which I think is OK in my case)
20:45:51
aeth
Apple deprecated OpenGL. https://www.reddit.com/r/programming/comments/8okg5y/apple_deprecating_opengl_and_opencl_in_macos/
20:46:20
aeth
Direct link but without the emphasis on the big (to us) announcement. https://developer.apple.com/macos/whats-new/
20:47:36
aeth
This is huge. Nearly everything uses cl-opengl and cl-vulkan, the only alternative, is incomplete. Applications that wish to continue supporting 3D on macOS would need to port to Vulkan, cl-vulkan (or some other bindings), and use the MoltenVK library.
21:14:50
aeth
A slight clarification: I'm not actually sure if deprecation means removal in macOS 10.15. It just means that it *could be* removed in macOS 10.15.
21:16:44
aeth
Bike: Well, you'd have to approach it the same way if you want to ensure continued macOS support.
21:18:10
rpg
ACTION remembers "The only thing worse than being talked about is *not* being talked about..."
21:19:12
aeth
rpg: I guess on the plus side, people will finally start abandoning OpenGL 3.3 or OpenGL 4.1 in favor of either Vulkan or newer versions of OpenGL. The macOS excuse will no longer exist and the older drivers/hardware for the other OSes are fading.
21:20:01
rpg
aeth: Seems weird, but I'm kind of a 2D guy, anyway! ;-) Have you checked in with #lispgames?
21:25:26
Bike
you can iterate over hash tables with a variety of mechanisms, such as maphash; the rest shouldn't be too hard depending on your desired semantics
21:26:29
dxtr
Question #2: Are hash tables passed as copies? What I'm basically wondering is that if I modify a hash table within a function will that affect the caller too?
21:27:37
dxtr
Oh, so if I modify *anything* within a function that affects the caller too? This is an area I haven't really thought about
21:28:03
dxtr
I always try to make everything immutable but this time I'm considering if non-mutability is simply easier
21:28:41
rpg
dxtr: most things *are* immutable, but there are things like list structures (if you use nconc or the like), arrays (if you modify their contents), etc.
21:29:37
rpg
e.g. if you change a variable from one string to another, it doesn't harm the original string. It's only if you modify the string's contents.
21:32:42
aeth
What's the best way to ensure sb-ext:*derive-function-types* when building an executable with SBCL but not during development?
21:36:18
aeth
sb-ext:*derive-function-types* is normally NIL, and should normally be NIL, but when compiling an executable for SBCL for applications using my framework, it should be T. It makes SBCL assume that functions won't be redefined to change the function types, which gives more power to the compiler. i.e. Optimizations, compile-time warnings/errors, etc.
21:37:24
rpg
aeth: One way to do it would be to bind that variable around the build process for the executable. You could do that relatively easily, I think, if you were using Fare's ASDF "bundle" stuff.
21:37:55
rpg
That said, I've never used that stuff myself, except to run tests, so I'm not at all familiar with its ins and outs.
21:39:16
aeth
Oh, there is a slight complication in that what I'm doing is an engine/framework thing, so the ultimate executable will be for a system other than the systems that I am writing.
23:54:39
Xach
the quicklisp build server has a failed hard drive. i'll get a new one in the next few days and hope to be back annoying people with build failures by the weekend.
0:21:55
akkad
ACTION hunts fruitlessly for the slime var to limit output in the repl from crippling emacs
1:11:42
DataLinkDroid
The Ada Number Words library has been moved to Bitbucket: https://bitbucket.org/EclecticSoftwareEngineer/ada-number-words.git
2:54:43
mfiano
If I make a custom "continue" restart, is there a way to register that with SLIME as the default for when 'c' is pressed?