Commit Graph

42 Commits

Author SHA1 Message Date
Kartik Agaram 23d3a02226 4266 - space for alloc-id in heap allocations
This has taken me almost 6 weeks :(
2018-06-24 09:18:20 -07:00
Kartik Agaram ce9b2b0515 4258 - undo 4257 2018-06-15 22:16:09 -07:00
Kartik Agaram 0edd9b9fc6 4257 - abortive attempt at safe fat pointers
I've been working on this slowly over several weeks, but it's too hard
to support 0 as the null value for addresses. I constantly have to add
exceptions for scalar value corresponding to an address type (now
occupying 2 locations). The final straw is the test for 'reload':

  x:num <- reload text

'reload' returns an address. But there's no way to know that for
arbitrary instructions.

New plan: let's put this off for a bit and first create support for
literals. Then use 'null' instead of '0' for addresses everywhere. Then
it'll be easy to just change what 'null' means.
2018-06-15 22:12:03 -07:00
Kartik K. Agaram 2b25071710 3877 2017-05-26 17:36:16 -07:00
Kartik K. Agaram b07576d26f 3602
Simplify primitive interface to read from a socket: now returns just a
single character.
2016-10-27 11:08:50 -07:00
Kartik K. Agaram 5f4ccccbe7 3600 - allow reading a single byte from a socket
Required fixing an off-by-one error.

(Not bothering writing a test for this since I'm hoping to simplify
$read-from-socket to always return a single character..)
2016-10-27 10:33:56 -07:00
Kartik K. Agaram aac885fde0 3595
Fix for that annoying popup from the Mac OS firewall: inside tests keep
any opened ports accessible only to localhost.
2016-10-25 12:40:07 -07:00
Kartik K. Agaram 87eb3acae9 3586
Make sure we clear the socket variable after closing it.
2016-10-24 08:51:55 -07:00
Kartik K. Agaram 55800f6558 3585 2016-10-24 08:49:12 -07:00
Kartik K. Agaram 16cf789657 3584 2016-10-24 08:44:54 -07:00
Kartik K. Agaram 20d6e2f1d8 3583 2016-10-24 08:44:37 -07:00
Kartik K. Agaram 5e19c6ce58 3582 2016-10-24 08:43:42 -07:00
Kartik K. Agaram 5eb5a8dea6 3581
Fix CI. 3 different memory leaks in the socket internals.

The hard one was recognizing the need for
`receive-from-client-socket-and-close`.
2016-10-24 08:41:55 -07:00
Kartik K. Agaram f205e7f02d 3579 2016-10-24 00:10:45 -07:00
Kartik K. Agaram 28191d317a 3571 - make 'read-from-socket' non-blocking
Its interface now mirrors that of 'read-event'.
2016-10-23 20:07:30 -07:00
Kartik K. Agaram 2e760d6df4 3563 2016-10-23 13:49:39 -07:00
Kartik K. Agaram d154c121a7 3562
Fix CI. Revert accidentally-added files.
2016-10-22 19:05:07 -07:00
Kartik K. Agaram 9a81d7460f 3561 2016-10-22 16:56:07 -07:00
Kartik K. Agaram f24eeaab13 3523 - http client now working 2016-10-20 00:24:16 -07:00
Kartik K. Agaram 6c96a437ce 3522 2016-10-19 22:10:35 -07:00
Kartik K. Agaram c83f3bca47 3519 - reading lots of data from a socket
In the process I've also altered the API of $read-from-socket to return
a boolean (eof?) rather than the number of bytes read (which is implicit
in the length of the returned array).
2016-10-18 10:39:18 -07:00
Kartik K. Agaram 50e24bd43b 3508 2016-10-16 12:27:34 -07:00
Kartik K. Agaram 8140ff1353 3499 2016-10-15 20:10:45 -07:00
Kartik K. Agaram aa229fbe3b 3486 2016-10-08 14:00:53 -07:00
Kartik K. Agaram 493fd4e950 3485 2016-10-08 13:52:43 -07:00
Kartik K. Agaram c00d3b94d3 3484 2016-10-08 13:52:05 -07:00
Kartik K. Agaram 0d6630f075 3482 2016-10-08 10:20:02 -07:00
Kartik K. Agaram e5360e0611 3477 2016-10-08 10:04:29 -07:00
Kartik K. Agaram a7c59e3e33 3476 2016-10-07 20:11:47 -07:00
Kartik K. Agaram f586359494 3473 2016-10-07 14:01:02 -07:00
Kartik K. Agaram f03d2f1529 3472 2016-10-07 14:00:55 -07:00
Kartik K. Agaram d3d301766f 3471 2016-10-07 13:55:47 -07:00
Kartik K. Agaram 347510c0a2 3470 2016-10-07 13:55:35 -07:00
Kartik K. Agaram 19f47cc033 3469 2016-10-07 13:53:23 -07:00
Kartik K. Agaram 54e7f47c83 3467 2016-10-07 13:52:37 -07:00
Kartik K. Agaram c87a0b7d04 3466 2016-10-07 13:41:24 -07:00
Kartik K. Agaram 4896fd81a5 3427 2016-09-27 14:55:06 -07:00
Kartik K. Agaram 2821a0a3cb 3412
Clean up a memory leak and a couple of other things.
2016-09-24 12:24:13 -07:00
Stephen Malina 25cd8e9878 3403
Wrap $read-from-socket in a channel and fix the socket example
so that browser's display the response properly.
2016-09-21 05:29:02 -07:00
Stephen Malina 51ae6e61e2 3399 - Update network primitives.
$write-to-socket, $read-from-socket, and $accept now pass around
references to socket pointers.

$read-from-socket handles EOF explicitly.
2016-09-18 05:10:24 -07:00
Kartik K. Agaram 9a1d39bac2 3349
Fix a warning on some compilers.
2016-09-14 01:12:00 -07:00
Stephen Malina 68578a7828 3323 - Add simple network primitives
Includes four Mu functions:
- $socket: Creates the C structure for a socket and tries to bind and
  listen on a user-provided port.
- $accept: Returns a number pointer to a new socket session. Should
    be called with the result of $socket.
- $read-from-socket: Read one character from the socket, passed in
    as a Mu number. Should only be called after calling $socket and
    $accept.
- $close-socket: Takes two parameters, one for the result of $socket
    and one for the result of $accept, closing both sockets
    and releasing bound ports.
2016-09-11 17:16:47 -04:00