freenode/#lisp - IRC Chatlog
Search
9:55:00
myrkraverk
SBCL is (mostly?) unicode or utf8. Does CL or SBCL have something that I can query "is this character part of a word?" (as opposed to punctuation or space or something else)
9:59:06
PuercoPop
nikki93: it is pretty much dead, but that doesn't make it any less interesting: https://twitter.com/BrianTRice/status/705626468890517509
10:00:15
|3b|
myrkraverk: sb-unicode or cl-unicode could probably tell you how unicode classifies the character
10:19:27
nikki93
PuercoPop: huh interesting. wonder if that helps with the literal syntax that is nice about lisp that allows writing macros easier
10:51:04
dreamaddict
does anyone know, offhand, some good resources to learn how streaming works exactly? and I mean nitty-gritty
10:51:32
dreamaddict
like, I wonder how I would make my own passably functional streaming protocol from scratch, if I had to stream some things
10:53:27
myrkraverk
dreamaddict: in what context? streaming data over the internet, or lisp streams? (I'm not sure I can help with either, though)
10:54:28
dreamaddict
right now I don't need it to conform to anything, I could write my own streaming code and that would be fine (and educational)
10:55:42
myrkraverk
Well, if you don't need or want to care about lost packets, you can play with UDP.
10:56:04
|3b|
* would probably look at how existing things do it, particularly if you care about latency
10:57:00
|3b|
doing networking well can get pretty complicated once you get beyond just dumping data over a TCP connection
10:57:45
p_l
I'm still on the list somewhere to provide a tech talk about what IP is for developers at $DAYJOB
10:58:48
myrkraverk
Ah, I think I'd like to be on that talk too; it's been a very long time since I learned about tcp/ip and stuff.
10:59:33
p_l
dreamaddict: depends on whether you have proper network stack or when you are on borked "HTTP only" pseudo network
10:59:36
dreamaddict
however I find that I can't appreciate how good the existing solutions are until I've tried to put together my own crap version first
11:00:07
myrkraverk
I recently implemented a DNS server, to teach myself the protocol; though I have yet to make it do more than return "not implemented".
11:00:29
dreamaddict
and the only way to solve that, to me, is to start writing some network-y apps, from scratch, then see how the established solutions work and then learn why that is the best way, become enlightened, etc.
11:00:58
|3b|
dreamaddict: one problem with that is you will probably not run into many of the edge cases without huge piles of users
11:01:04
myrkraverk
DNS is a very simple protocol; in lisp the difficult part is the bit fiddling, imo.
11:01:43
|3b|
how does it handle packet loss in one direction, connections just below the amount of bandwidth you try to use, sattelite links, etc
11:02:45
myrkraverk
dreamaddict: if you just want to ship bytes of sound on a lan, then (maybe) udp is a good way to do it.
11:02:46
|3b|
things in the middle of the network implemented right at (or even past) the edge of the spec
11:04:08
dreamaddict
really I have no idea what streaming code is doing when I ask it to do anything...that seems against the idea of being a programmer, to me
11:05:22
myrkraverk
I don't think you need to look at it, but if you want an explicit protocol based on that tutorial, here's "not implemented" DNS: https://github.com/myrkraverk/lisp/blob/master/despicable-dns-server.cl
11:07:39
|3b|
for sound, it usually doesn't matter if we drop a few samples here and there, while many uses of streaming sound care about latency, so you probably want UDP rather than TCP
11:08:29
|3b|
in that case you need an encoding that can handle missing data cleanly, so you need to think about that when choosing compression
11:09:32
|3b|
you might also want either a separate TCP control connection, or a reliable layer built on the UDP stream for metadata
11:10:23
|3b|
you might also want some setup for adaptively changing compression levels to adapt to network conditions (more common for video than audio these days though)
11:10:31
myrkraverk
Yeah; I'd probably start by sending ogg and get that to work (I have used libvorbis and friends before, and I've used CFFI before) before trying "raw sound bytes."
11:13:28
myrkraverk
Well, I've used the raw OSS4 interface, which is pretty neat for simple raw sound. (not sure if the ioctl()s translate easily to lisp though)
11:14:21
myrkraverk
Yeah, I'd probably set my input for low quality sound first, assuming OSS4 input.
11:14:39
myrkraverk
If reading sound from files, not sure; I'd probably go with ogg because I know it.
11:19:40
|3b|
you read some into a buffer, decode it once you have enough, write it to sound API, repeat
11:20:31
|3b|
depends on the API, but probably a buffer of sound samples, or frames of compressed data
11:20:36
dreamaddict
I mean, what would be an acceptable way for me to pause/stop playback if the buffer were behind? what handles that?
11:21:55
dreamaddict
ok what I still don't get is: with a file, 5MB for example, 5MB of memory is set aside for the file, filled with the contents of the file, and then a pointer to that 5MB of full memory is passed to the function that plays the file, said function expecting and getting a full 5MB of data
11:22:10
|3b|
depending on latency requirements you might buffer a few seconds or more of audio before starting to mask small gaps
11:22:40
dreamaddict
now you have a streaming algorithm that has to give the impression that the 5MB is full, even though it is constantly being filled hopefully fast enough that the audio-playing function doesn't notice that it was made on the fly
11:23:47
dreamaddict
ok so the API on the other end is already aware of the possibly fragmentary nature of the file
11:23:56
|3b|
(and for general case of "streaming", you would need an arbitrarily large buffer anyway, since people could leave the stream on indefinitely)
11:24:38
dreamaddict
ok so...you are saying that you send a piece of the file at a time, the API just works with 64k chunks at a time and expects more
11:24:49
myrkraverk
I think I have that implemented with ogg somewhere; here is a complete os x player for vorbis, in C, by me: http://stackoverflow.com/questions/4863811/how-to-use-audioqueue-to-play-a-sound-for-mac-osx-in-c/30756734#30756734
11:25:01
|3b|
and you send it to the API in small chunks (size depending on latency requirements and OS scheduling, anywhere from a few hundred bytes to a few MB)
11:25:08
myrkraverk
That player reads a file at a time though, so not immediately applicable for streaming.
11:26:21
|3b|
sounds like you should start with streaming from a file before worrying about network :)
11:26:57
dreamaddict
yeah something is not clicking for me about streaming and I don't know what yet
11:27:41
|3b|
imagine trying to copy a file that is larger than the amount of available ram, streaming is like that :)
11:27:59
myrkraverk
I have a "streaming" implementation, based on the player above, from a file, but iirc it was buggy so I'm not publishing it.
11:28:14
|3b|
(and on some UNIX APIs, exactly like that, if you are just writing to a file handle to send audio data)
11:28:27
myrkraverk
dreamaddict: if you want it privately, that's fine; but I don't want it public yet.
11:28:57
dreamaddict
so the first problem was: copying a fil that is larger than the amount of available RAM
11:29:13
|3b|
step 1: allocate an N-byte buffer that fits into ram. step 2: read N bytes. step 3: write N bytes. step 4: repeat step2/3 until done (and handle the <N bytes at end properly, but can ignore that for streaming)
11:30:21
|3b|
sound makes it a bit harder, since then you have latency requirements, you need to write the N bytes before the previous N finish playing
11:30:57
|3b|
compression possibly adds the complication that you need to write in chunks of specific (possibly variable) size
11:31:05
dreamaddict
so the source is like a sink with a drain that you are trying to keep full (or at least, not empty)
11:32:30
|3b|
* isn't sure if it is intended as the actual same meaning or just something derived from same root though
11:33:01
dreamaddict
so as the stream provider, you try and fill the buffer on the other end as much as possible...which is dictated by the receiver (sink)
11:33:35
dreamaddict
the receiver has a buffer which is like a landing pad or staging area, where you introduce the data a chunk at a time, and then it gets consumed at a certain rate
11:33:37
|3b|
then live streaming adds the complication that you can't read ahead, so have to balance buffering vs latency
11:34:47
dreamaddict
essentially if the receiver doesn't get enough data it is up to it to handle it
11:36:08
myrkraverk
Ah yeah, my memory ogg player stutters; now that I'm re-reading the code I'm fairly certain it's a locking issue.
11:37:23
|3b|
for extra fun, add video and then you get to deal with keeping the audio and video in sync :)
11:38:46
|3b|
timestamps, but your audio and video output probably have different clocks, different amounts of latency, etc
11:38:48
myrkraverk
Not yet, for now I'm just happy that my player actually displays the second playing.
11:42:41
dreamaddict
it seems like zeroMQ has this PUB/SUB thing which would be nice for a little streaming server thing
11:44:19
myrkraverk
Hmm, now that I'm re-reading my code, I see I can probably shorten the locking a lot; like not lock across the memcpy() call, which "hopefully" fixes the stuttering.
11:45:01
myrkraverk
dreamaddict: thanks for bringing up this topic, now I have the desire to fix this again.
11:45:22
myrkraverk
dreamaddict: yeah, the os x sound api is multithreaded; I don't have a choice here.
11:46:10
dreamaddict
multithreading will be another huge thing to tackle later...should get some sleep now
11:46:56
dreamaddict
it's weird...it's like, I know how I would try to handle this (streaming)...but I don't know what other code expects
11:47:31
dreamaddict
like PUB/SUB with zeroMQ...each subscriber to the publisher can filter what they get, based on what the frame begins with
11:47:39
myrkraverk
You'll probably need some threading code; depending on how you output the sound.
11:49:00
dreamaddict
I tried adding threading to something I had already made, and it went a lot slower
13:26:15
kenanb
I am guessing there is no problem with this nconc, right? (loop for (key value) on initargs by #'cddr unless (eql value '*) nconc (list key value))
13:30:13
kenanb
Shinmera: on the other hand I just realized I chose nconc which conses less, but does more processing, exactly twice more processing to be exact
13:33:20
resttime
I'm reminded of PAIP which had something better than a NCONC solution for flattening a list in a recursive solution. I wonder if the same is possible here.
13:47:17
kenanb
I was wrong, NCONC is both faster and conses less at the same time than COLLECT-COLLECT, and PUSH is faster and conses less at the same time than NCONC
13:47:52
kenanb
so NCONC is better in this specific example if order is important, if not PUSH is even better
13:49:45
Shinmera
kenanb: Can you try using something like trivial-benchmark and using large enough sets (in the ten-thousands in the least)?
13:54:47
resttime
Doesn't seem like the PAIP flatten applies, but here's a TCO version: http://paste.lisp.org/display/311049
14:21:45
kenanb
Shinmera: is there any specific reason benchmark with timing takes A LOT longer than normal execution of the call
14:24:29
Shinmera
Each iteration takes various samples, stores those, and then crunches them down to statistics afterwards.
14:27:46
Shinmera
I'm sure it could be optimised to do the stats computation each step rather than keeping all the samples, but that loses some generality.
14:32:44
kenanb
doesn't really matter for me, IMHO it is all good for benchmarking, just made me wonder why.
14:37:28
kenanb
I don't understand, your library shows collecting having doing less consing, but time showed nconc consing less every single time, in like 30 iterations
14:41:51
kenanb
Shinmera: I copy pasted your collect k collect v, and it caused v to always be collected regardless of the conditional :)
14:56:37
kenanb
yes, pushing wins when there might be considerable consing, nconc&push wins performance-wise. but the difference is not big, just certain
15:08:59
kenanb
wow, when I do (key value) of-type (keyword t), both the run-time and consing amount multiplied by 2, what?
15:11:06
mood
warweasle: Do you have an example? I don't think you can just put random code in there
15:16:14
Shinmera
mood: There's the slight difference that if you change the argument signature, it'll gracefully remove/update the old method definitions for you
15:18:00
kenanb
ok, so obviously by declaring "(key value) of-type (keyword t) for list" while looping a plist, I am preventing an optimization, wow
15:25:53
kenanb
well, I am an idiot, I declared types without declaiming speed, so it probably does type checks instead of optimizing :D
15:29:43
kenanb
on the other hand even with optimize for speed it is slower, which means by default SBCL can infer a more specific type for VALUE
15:33:03
Cymew
Shinmera: read your blog post on documentation. Interesting piece. It drives me nuts when people don't write docstrings. I actually find those more useful than longer prose texts.
15:35:37
kenanb
I don't understand how people get angry when someone that has absolutely zero obligation to do something for free doesn't do it :)
15:36:47
kenanb
on the other hand when people actively promote the use of their open source library, and then not write docs, then it drives me nuts too. If you actually promote it, then you have an obligation.
15:37:10
Cymew
That being said. I don't understand how anyone remembers what their code does 6 weeks down the line without docstrings, but maybe that just say more about me than anything else.
15:37:59
kenanb
Shinmera: I wasn't referring to your post, there was no symptoms of anger in your post.
15:38:06
Cymew
It's not a simple thing, though. That was one reason I felt the blog post was interesting. Made you think.
15:38:31
Shinmera
kenanb: Ah, alright. I just assumed because I'm always worried that I'm coming off as too demanding or pushy when I write things like that.
15:39:50
Cymew
For me with docstrings it's more like "No docstring? Aw shoot, now I have to go and read some docs instead of getting it all here at the REPL".
15:40:31
kenanb
no, promotion of documentation writing is good for community, I just think we should be careful not losing perspective when trying to persuade people for the good of the community, the perspective that releasing work for open source is by itself a very good act, regardless of its popularity nowadays.
15:40:33
mood
Cymew: More often than not it seems more like "Aw shoot, now I have to go and figure out what was meant just from the code."
15:40:39
Shinmera
I like having the generated docs on my project because they have the symbol index with docstrings below and references to them so it's easy to browse around.
15:41:15
kenanb
Cymew: I understand. Yes, I feel a very good library is left unused for the very same reason many times, too.
15:41:47
Shinmera
kenanb: Well that's where the problem of "winging your own is easier than figuring out how to use an undocumented lib" comes in and makes releasing stuff more of a problem.
15:44:00
newdan
Is there a CL program that will generate package documentation from docstrings? Like e.g. Javadoc?
15:44:01
papachan
OK kaybe i am ot calling it as his right name. I enter this modeunder sbcl when you have to type 0,1, or 2 you have many optiones to look at backtrace or abort
15:45:20
kenanb
Shinmera: of course, an undocumented library is probably used around 10% of its documented version, but still, you would be writing your own if it was not even around anyway, so in the worst case, it is just useless, but not harmful. That is in theory tho, what usually happens in practice is: found it, realized it doesn't have docs, feel bad, start writing your own, got stuck, looked at it for inspiration, realized you actually started
15:45:39
kenanb
keep writing your own, then got stuck again, realize you know fully know the other library
15:45:41
Shinmera
newdan: Some offer even an on-the-fly version. Eg: load staple-server and run (staple-server:start)
15:46:13
newdan
Shinmera: Is there a most popular or best maintained one? An obvious choice for a library writer to use?
15:46:20
kenanb
that is indeed harmful now, but I still wouldn't blame the other library author for that
15:46:33
Shinmera
kenanb: It's bad in the sense that too much of it confuses people and deters them.
15:48:53
newdan
As a newcomer I would really rather prefer to pick an established mainstay. But if such a thing doesn't exist, then I suppose I'll browse through what's available and pick the first one that doesn't make me angry. (Which might be Staple.)
15:50:55
Xach
newdan: a nice person named Sabra reviewed all json libraries and pointed out the strengths and weaknesses of each. i wish that was done for more areas of multiple choice.
15:53:00
Cymew
I must confess I often look around on cliki and find something made by Edi or Shinmera... ;)
15:55:16
kenanb
Shinmera: yes, I don't like to sound like an a**hole but I don't really like prioritizing people that are discouraged quickly. On the other hand I like your libraries, so there must be something good for community in your approach. Probably sharing my mindset would neither result in quicklisp nor qtools.
15:56:04
kenanb
Shinmera: not to say that you meant people who discouraged quickly by people who get "confused and deter"
15:56:18
Xach
kenanb: i value persistence but i hate to see it squandered unnecessarily. sometimes there is necessary complexity to mastering a skill but often it's just random and unnecessary.
15:58:43
kenanb
Xach: yes, IMHO such approach is proven worthy when it doesn't only lower the barrier of entry but also makes the workflow of the experienced more efficient, which quicklisp obviously achieves to do, considering everyone uses it.
15:58:48
Xach
there are some people who will look at a piano and say "i like the music it can make but does it have to be so user-unfriendly"
16:05:49
kenanb
newdan: of course, I don't think anybody would oppose that. My comment was regarding the generalization of Shinmera's particular sentence, not the underlying subject.
16:08:04
Shinmera
kenanb: I'm a very impatient man, so I don't have much tolerance to spend time figuring out how to get someone else's things working, so I can very well understand being deterred by a lack of docs.
16:08:30
Shinmera
SO I guess I'm one of those who belong to the group of people that are discouraged quickly.
16:13:40
kenanb
Anyway, I am not trying to criticize anybody (maybe only the ones that very quickly get whiny without giving back anything to community, and giving back doesn't only mean sharing libraries, answering questions in channel etc is invaluable, too, for example) as I said, huge respect for anyone who is doing something, regardless of docstrings.
16:16:32
Shinmera
In other news, here's something that irritates the hell out of me: Sometimes when I M-. a function, Slime gives me a listing of potential candidates, but then when I hover over one or try to select it, it opens up some kinda special new window (and I mean desktop window) for some reason instead of opening a new emacs window as usual.
16:16:43
kenanb
btw I think I will use nconc version, not for optimization reasons, but because I think nconc (list key value) is kind of more expressive when looping in a plist
16:19:29
Shinmera
And here's the behaviour I do want and usually get: https://filebox.tymoon.eu/file/T1RnNQ==
16:19:49
Shinmera
I'm guessing it has something to do with whether emacs has enough space left, as it only seems to happen when the emacs frame/window is small.
16:25:35
kenanb
then yes there is a problem, there are two edit-definitions, edit-definition-other-frame, and edit-definition-other-window, what you want is edit-definition-other-window
16:26:06
kenanb
but either there is a problem with your bindings, or some other library might be screwing up things
16:27:33
Shinmera
And they are. Even when I call these two functions explicitly, the same thing happens
16:28:01
Shinmera
It just seems that for some stupid reason emacs thinks it just HAS to open a new desktop window when its main window is too small
16:29:04
kenanb
actually, wait, slime-edit-definition-other-window etc are wrappers around slime-edit-definition
16:33:17
kenanb
well, there is a "where" parameter which decides to either open as a window or a frame, when slime-edit-definition is called interactively, which is what happens when you M-., it is nil, which causes slime-pop-to-location to simply (switch-to-buffer (current-buffer)), so I don't think it is on slime side, probably something is hooking to switch-to-buffer for lisp-mode
16:38:10
kenanb
"emacs --no-init" and manually loading just slime would be a good starting point really
16:40:16
DeadTrickster
so I have json config where I save hostname. I parse it using yason and boom (SB-KERNEL:CASE-FAILURE ETYPECASE "localhost" (NULL (ALIEN (* CHAR)) SIMPLE-BASE-STRING SIMPLE-STRING))
17:17:03
warweasle
beach: I'm not seeing any updates to squirl in several years. Or maybe he doesn't IRC. I'll try email. I want to make some additions to his 2d physics library.
17:20:36
Nilby
I find standard stream types a little confusing. Can I make an output to input stream out of them? http://paste.lisp.org/+6O0G
17:22:05
warweasle
PuercoPop: Github was swamped, but it's back up. She was active 4 days ago. She might still be maintaining it.
17:27:18
Nilby
I don't really care if it's a string. If I use gray streams I have to implement my own buffering though, right?
17:28:41
beach
Nilby: It is trivial to implement using Gray streams. Just make a queue of characters.
17:30:04
Nilby
Ah. Okay. Thank you. I guess I just have to roll my own. It seems fairly simple. I just want it to have efficient buffering.
18:04:49
myrkraverk
I thought that would just return the numeric value of the character, but I can give it a try.
18:05:20
Xach
myrkraverk: indeed, that is what it does. or NIL, if it does not have a numeric value.
18:06:20
myrkraverk
Oh yeah, I took it to return the unicode code-point numeric value (as in, that was my guess, hence overlooking it)
18:07:10
myrkraverk
Bike: general category? I've allso been checking code blocks, and that's just :basic-latin for numbers.
18:07:38
Bike
myrkraverk: as returned by sb-unicode:general-category https://en.wikipedia.org/wiki/Unicode_character_property#General_Category
18:14:22
myrkraverk
Yeah, it's no /hard/ to roll my own; I just don't want to just to find out it's already been written.
18:16:56
Shinmera
𝕯𝖔𝖓'𝖙 𝖋𝖔𝖗𝖌𝖊𝖙, 𝖙𝖍𝖊𝖗𝖊'𝖘 𝖒𝖆𝖓𝖞 𝖜𝖆𝖞𝖘 𝖙𝖔 𝖜𝖗𝖎𝖙𝖊 𝖘𝖔𝖒𝖊𝖙𝖍𝖎𝖓𝖌 𝖎𝖓 𝖚𝖓𝖎𝖈𝖔𝖉𝖊. 𝕹𝖔𝖙 𝖏𝖚𝖘𝖙 𝖋𝖚𝖑𝖑-𝖜𝖎𝖉𝖙𝖍.
18:18:53
Bike
i googled for "normalize fullwidth" and got something about python. it's "Normalization Form KC" http://unicode.org/reports/tr15/
18:32:16
jfe
e.g. if i have a thread calling a function f, would it be safe to redefine f in another thread?
18:36:47
jfe
warweasle: how can you be sure all threads have exited? suppose a thread is invoking f repeatedly?
18:39:54
warweasle
jfe: I'm using it to update event handlers from a 3D rendering loop. I've never had an issue with it.
18:40:48
warweasle
Bike: No, I compile in another thread. Say, updating the render function or onButtonDown.
18:41:34
warweasle
Bike: I added the ability to change the GPU data from another thread safely and transparently.
18:43:40
|3b|
* has seen some case where methods aren't found when recompiling in other thread, though i think that might have been recompiling class definitions rather than functions
18:45:41
resttime
I think one way to be thread-safe for sure would be to use lambdas of the functions instead.
18:46:59
warweasle
Xach: Yes. Clinch is meant to be a 3d game engine. So different enough directions to fail to collaborate.
18:47:55
fchurca
supposedly quicklisp updates asdf to 3.1.4 if it sees an old implementation, but in my box cffi-toolchain is choking on asdf 3.0.2
18:48:05
warweasle
Xach: Well, I did want to mention that Clinch wasn't in your top 100 list, so your list must be broken. :)
18:48:48
kenanb
fchurca: my experience is "just download new asdf and put it in local-projects", asdf can handle hot-swapping itself properly, so it is no problem that an older version is already loaded, presumably by the implementation itself.
18:50:14
fchurca
i currently have linux mint debian edition, which doesn't seem to be to eager regarding updates
18:57:41
kenanb
fchurca: note that asdf builds itself into a single file distribution (to "build/asdf.lisp") when you QL:QUICKLOAD (therefore ASDF:LOAD-SYSTEM) it, you can later chose to load the single file distribution from your implementation's init file
18:59:36
kenanb
fchurca: if that sounds confusing, just keep doing quickload thing as initially suggested. it works.
19:00:29
fchurca
that does not sound confusing, or i may be so utterly confused enough not to realise i'm confused, which has happened before
19:03:57
kenanb
fchurca: you don't have to git clone if it is a neverending struggle, release tarball: https://common-lisp.net/project/asdf/asdf.tar.gz
19:11:25
dim
I want to implement conditionnal error handling, and basically (handler-case ... (condition (c) (if *on-error-stop* (signal c) (retry-batch ...))))
19:11:50
dim
is that the right way to go, or should I use handler-bind when I don't want to interrupt the control flow?
19:12:10
vydd
Xach: because of all the people who saw it now, I'd like to work on docs. going to work on that in a separate branch, but if I finish and merge back to master, can I ping you to try building again?
19:15:01
vydd
Xach: ESC / WM close button / sdl2kit all-windows close-window thing which I never use..give me a sec
19:15:24
CharlesN
which is the most used library to parse a xml in common lisp? I'm looking at s-xml but wanted to know more options
19:16:16
vydd
Xach: ah. I'm using ccl because of that; osx wants guis on the main thread. but there's a way to fix it with sbcl as well
19:17:20
vydd
Xach: for sbcl, you're going to need to start sbcl in a separate process, and then slime-connect to it. also, you'll need to wrap sketch inside tmt
19:18:47
Xach
Gavin Schuette, Marty Forkwater, Marty Champions, Johannes Falcone -- whatever you call yourself, you are not welcome on #lisp, go away.
19:19:22
vydd
Xach: #+(and darwin sbcl) (eval-when (:compile-toplevel :load-toplevel :execute) (sb-int:set-floating-point-modes :traps nil)) you might need that, just run it immediately after running sbcl
19:19:52
kenanb
dim: you mean really calling SIGNAL? well, calling signal or calling something that calls signal is the only way to re-emit the condition, your handler can also choose simply not to handle the condition, in which case signal will keep looking for a suitable handler that will handle it
19:21:07
Arathnim
vydd: Sketch, right? Tried it yesterday, it was great. I have a friend thinking of using it to prototype an IRC client.
19:21:43
vydd
Xach: and you can close that window with (kit.sdl2::close-window (car (kit.sdl2::all-windows)))
19:22:29
kenanb
dim: you can as well handle it and signal a different condition if needed, or manually signal the same condition object. all viable. which one to chose, it depends.
19:23:22
fchurca
Xach: kenanb: cloning asdf, making it, and loading it in my .sbclrc did the trick, now I have the absolute latest asdf. thanks!
19:32:36
myrkraverk
Is there a simple way (as in, I don't have to code it myself) to check if a string is a repetition of the same character?
19:40:26
|3b|
* also isn't sure if that one is a good idea either, though probably better than remove-duplicates
19:46:25
myrkraverk
Yeah, Shinmera's loop is nice too. Very nice (though I haven't run any benchmarks - and not sure I will until I detect this part of the code to be sufficiently slow to merit optimization)
19:52:33
kenanb
warweasle: :) not really. I guess a good version needs to RETURN instead of ERROR'ing tho. seems legit. and the good thing is you can make it check for the repetition of a particular char using :initial-value.
20:05:35
jasom
or more complketely (and (not (emptyp string)) (find (char string 0) string :test #'char/=))
20:07:19
fchurca
but on seeing (emptyp string) now i'm wondering; does "" consist on zero chars which all repeat? does it consist on no repeating chars?
20:09:44
fchurca
just curious, in your scenario, does "" consist on zero chars which all repeat? does it consist on no repeating chars?
20:10:18
myrkraverk
I only need to test it on lengths > 1; so I don't have to think about zero length strings.
20:12:02
kenanb
jasom: a slight problem with the loop and find versions is that they access the first char twice to have a base to compare. not that it matters.
20:14:34
kenanb
on the other hand reduce might be doing even worse in that respect, since it might be accessing each char twice
20:16:46
fchurca
how about this? (and (not (emptyp string)) (not (let ((c (char string 0))) (find c string :test #'char/= :start 1))))
20:19:08
fchurca
...or not, because find doesn't actually enter at all, and will return nil right away
21:01:39
Xach
hopefully this will really open the money purses of all lisp hackers for the big fundraising drive! yes!
21:02:02
jasom
I had been backing, but paypal decided to stop it for some reason. I'll sign back up again
21:03:37
jasom
wow, the shipping address on Paypal is from my Sophomore year of college... I don't use it much.
21:04:50
jasom
my first e-mail was aidenn@geocities.com, but I forgot the password and since it was my only e-mail address at the time, I had no way to recover
21:06:21
jasom
I think I was in high school by the time I got the second geocities account, and my high school provided e-mail addresses
21:09:09
Xach
I've long had between 10 and 20 people in the "supporter club". I'd like to do a one-time (or rare-time) fundraiser next month, and find more people to join the ongoing monthly supporter club.
21:10:18
jasom
I'd pitch in more if I actually made money with lisp, but I'm just a hobbyist programmer
21:11:09
jasom
* wonders if a summer internship 12 years ago is enough to call himself a "professional programmer"
21:14:13
PuercoPop
jasom: I'm not familiar with the parenscript codebase, but one of the authors says that if it weren't for performance issues PS would implemented ANSI CL. I was under the impression that was not the goal of PS (so number are just floats for example). Any idea what he had in mind? http://smuglispweeny.blogspot.pe/2008/12/road-to-qooxdoo.html?showComment=1229156700000#c1800393052377248792
21:17:06
jasom
PuercoPop: there are several people working on PS, and there are different motivations; however it is genrally agreed upon that the JS generated should be fairly readable, and any library dependencies should be optional
21:17:26
jasom
If one could implement all of ANSI CL under those limitations, then it wouldn't be out-of-scope for PS
21:22:51
Cymew
Xach: just recently signed up, chipping in my dollars to Quicklisp. A fundriser sounds like a great idea. Many thanks for the great work.
21:23:03
PuercoPop
ah, I found another comment where he says that the idea is for paren-psos (which includes a run-time) to implement full CL
21:23:12
jasom
That might have been what Vladimir was getting at; if we were targeting something like Java as a backend, a lot more of ANSI CL could be implemented
21:25:51
jasom
In the one application I have that uses significant parenscript, the model code is used both as CL and parenscript, but everything else is either just parenscript or just lisp
21:26:46
jasom
and to avoid confusion, I have several functions that are used for compatibility that aren't either standard CL names nor standard javascript names
21:26:57
PuercoPop
jasom: I saw your model code, it mimicks structs as alists iirc? A good enough stop gap
21:27:51
jasom
it was objects on JS and alists on CL, but is now immutableJS maps on JS and hash-tables on CL
21:30:26
jasom
it supports define-setf-expander; I need to add optimizations for all of the builtin parenscript forms (so it doesn't generate unreadable code for e.g. array assignments) and then it will be strictly better than what's in parenscript
21:36:52
dreamaddict
off question, but on a dual boot machine can Linux copy files from the other boot?
21:38:09
PuercoPop
dreamaddict: but it is more a matter of what Filesystem the other OS has (or is it linux)
21:40:26
PuercoPop
dreamaddict: there was a module for ntfs iirc (and on windows there is an ext3 app so you can access your linux drive, but it may mangle non ascii chars in the folder and file names). I used to do that +5 years ago so my information may not be up to date
21:49:39
dreamaddict
there are a few os-cond expressions that don't evaluate right...for me at least