guilduboc
2019-10-3 08:46:30

@guilduboc has joined the channel


laurent.orseau
2019-10-3 11:55:54

Has anyone implemented a first-order-logic resolution algorithm in Racket by any chance?


samth
2019-10-3 12:58:43

There’s a sense in which Racklog is that


laurent.orseau
2019-10-3 13:06:00

Thanks. I can see a unify, but no easy way to extract a resolution procedure: https://github.com/racket/racklog/blob/master/unify.rkt Any clue? (also Racklog is way too fully-featured for my needs currently, but maybe pruning it is easy?)


capfredf
2019-10-3 13:23:46

@mflatt Hi, Matthew. I can’t find table.rktd under https://www.cs.utah.edu/plt/snapshots/. If I want to use one of the last snaphot installers to build packages, which url should I use?


mflatt
2019-10-3 13:31:30

Use the “current” links.


mflatt
2019-10-3 13:31:52

Oh, pkg-build wants “table.rktd”… let me refresh my memory


mflatt
2019-10-3 13:32:35

capfredf
2019-10-3 13:48:10

Got it. Thank you! I am refreshing my memory as well. I’ve lost a racket file that shows how I used pkg-build


mflatt
2019-10-3 14:42:20

Question about port flushing and errors, for anyone who might have an opinion…


mflatt
2019-10-3 14:42:31

In the traditional Racket implementation, if there’s an error when you try to flush a buffered TCP output port, then the buffered bytes are retained, and you’ll get an error again if you try to flush again or try to close the port (which implies a flush, unless the close is a force-close via a custodian). In contrast, file and OS-pipe ports drop buffered bytes when a write error occurs. My initial reaction was that file and OS-pipe ports are wrong to discard buffered bytes, but now I think that’s probably the better choice — especially since those ports are registered with a plumber, and so the flush is going to fail yet again after the port-close fails and the program is trying to exit. Does anyone see a problem with making TCP ports behave like file ports? I will make Racket CS match traditional Racket’s behavior, since it currently preserves unsuccessfully flushed bytes in all ports. Also Racket CS registers TCP ports with the current plumber, which sounds nice but probably isn’t really helpful.


mflatt
2019-10-3 14:56:09

It only just now occurs to me to see what the C library thinks, and the C library seems to agree: fflush with buffered bytes to a broken pipe fails only the first time, apparently discarding unsuccessfully flushed bytes so a second fflush succeeds.


samth
2019-10-3 14:57:32

I just looked for what Java does, and the documentation does not say.


mflatt
2019-10-3 15:03:54

I didn’t find any such documentation for fflush, either. I checked by writing a program.


samth
2019-10-3 15:04:08

I think the relevant Rust code is here; it looks like it doesn’t flush: https://doc.rust-lang.org/src/std/io/buffered.rs.html#488


laurent.orseau
2019-10-3 15:45:21

That gave me the idea to look at miniKanren. Thanks!


mflatt
2019-10-3 16:27:52

So far, I still lean toward dropping bytes on a flush error.