Hi Thomas,
thanks so much for your introduction to memory management in FFI programming,
which was very informative, concise and helpful indeed!
It gives me a perfect starting point for exploring the topic.
For the beginning, I think I'd be well advised, then, to explicitly call the
...Free() fu
On Tue, Jun 7, 2011 at 1:09 AM, Jon Zeppieri wrote:
> Sorry, after I wrote this, I realized that I had misread the types of
> scheme_socket_to_ports() and scheme_socket_to_ports().
Err... that's scheme_get_port_socket() and scheme_socket_to_ports().
__
Sorry, after I wrote this, I realized that I had misread the types of
scheme_socket_to_ports() and scheme_socket_to_ports(). With the
obvious adjustments, it works. Thanks again.
On Tue, Jun 7, 2011 at 12:45 AM, Jon Zeppieri wrote:
> OK, scheme_get_port_fd() seems consistently to return -1 for
OK, scheme_get_port_fd() seems consistently to return -1 for ports
returned by tcp-accept, so I'm trying instead to use
scheme_get_port_socket() and scheme_socket_to_ports(). However, when I
attempt to write to the resulting output port, I'm told that I'm
writing to an invalid file descriptor. Exa
Thanks! -J
On Mon, Jun 6, 2011 at 9:24 AM, Matthew Flatt wrote:
> I think places should somehow provide better support for this task.
>
> For now, using the FFI you could use scheme_get_port_fd() to extract a
> TCP port's file descriptor as an integer, dup() it, send the dup()ed
> integer to ano
On Mon, Jun 6, 2011 at 17:45, Robby Findler wrote:
> On Mon, Jun 6, 2011 at 8:24 AM, Erich Rast wrote:
>> I had something similar in mind but was wondering about the
>> space-efficiency of a vector of booleans. Does the compiler represent
>> this as a memory area where each boolean corresponds to
On Mon, Jun 6, 2011 at 8:24 AM, Erich Rast wrote:
> I had something similar in mind but was wondering about the
> space-efficiency of a vector of booleans. Does the compiler represent
> this as a memory area where each boolean corresponds to a single bit?
It does not. The simplest way to do somet
R5RS doesn't provide bit operations or bit vectors. R6RS provides bit
operations but not bit vectors. Thus, for my blog I used a vector of
booleans; I'm more interested in the concept of bloom filters than the
low-level implementation details.
I don't know if Racket provides bit vectors. My Sta
Thanks a lot, that's a very nice place to start (interesting blog, too).
I had something similar in mind but was wondering about the
space-efficiency of a vector of booleans. Does the compiler represent
this as a memory area where each boolean corresponds to a single bit?
That would be cool but m
Do you want something like this:
#lang racket
(struct dl (left node right) #:transparent #:mutable)
(shared ((middle (dl left 1 right))
(left (dl #false 0 middle))
(right (dl middle 2 #false)))
middle)
On Jun 6, 2011, at 10:30 AM, Marijn wrote:
> -BEGIN PGP SIG
I implemented a spell checker using a Bloom filter at
http://programmingpraxis.com/2009/04/21/probabilistic-spell-checking/.
On Mon, Jun 6, 2011 at 9:48 AM, Erich Rast wrote:
> Hi,
>
> I need to check whether a given string already occurs in a list of
> several million strings, where occasional
25 minutes ago, Marijn wrote:
>
> My understanding is that it is a finite data structure that refers
> to itself. It is supposed to represent 3 nodes/links of a doubly
> linked list where each node points to its neighbours or #f, so
> really it should only be 3 _dl's big...
Yes, I know what you m
Hi,
I need to check whether a given string already occurs in a list of
several million strings, where occasional false positives are
acceptable.
Before reinventing the wheel, has anybody already implemented a
space-efficient Bloom filter in racket and would like to share it?
Or, what else would
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On 06/06/11 15:14, Eli Barzilay wrote:
> 20 minutes ago, Marijn wrote:
>> -BEGIN PGP SIGNED MESSAGE-
>> Hash: SHA1
>>
>> Hi,
>>
>> why does the following code
>>
>>
>> #lang racket
>>
>> (struct _dl (left val right))
>>
>> (define (dlist a b c)
At Mon, 6 Jun 2011 06:49:33 -0600, Jay McCarthy wrote:
> Graph syntax is not allowed, but you be able to put it in a quote
It doesn't work under quote, either. Graph syntax works only as input
to `read' --- as opposed to `read-syntax' for code.
Quoted cyclic syntax used to work, but cyclic consta
I think places should somehow provide better support for this task.
For now, using the FFI you could use scheme_get_port_fd() to extract a
TCP port's file descriptor as an integer, dup() it, send the dup()ed
integer to another place, and create new ports using
scheme_make_fd_input_port() and schem
20 minutes ago, Marijn wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> Hi,
>
> why does the following code
>
>
> #lang racket
>
> (struct _dl (left val right))
>
> (define (dlist a b c)
> #1=(_dl #f a #2=(_dl #1# b (_dl #2# c #f))) )
Note that you wrote an infinite piece of co
Graph syntax is not allowed, but you be able to put it in a quote
iPhoneから送信
On 2011/06/06, at 6:48, Marijn wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> Hi,
>
> why does the following code
>
>
> #lang racket
>
> (struct _dl (left val right))
>
> (define (dlist a b c)
> #1
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Hi,
why does the following code
#lang racket
(struct _dl (left val right))
(define (dlist a b c)
#1=(_dl #f a #2=(_dl #1# b (_dl #2# c #f))) )
produce the error:
Module Language: invalid module text
. read: #..= expressions not allowed in rea
40 minutes ago, Neil Van Dyke wrote:
> Eli Barzilay wrote at 06/06/2011 07:05 AM:
> > Four hours ago, John Clements wrote:
> >
> >> RFC 5228, a DSL for mail processing. Very tidy, *perfect* DSL
> >> domain. Could have been nice
> >
> > There's about 200 similar DSLs around anything that's re
Eli Barzilay wrote at 06/06/2011 07:05 AM:
Four hours ago, John Clements wrote:
RFC 5228, a DSL for mail processing. Very tidy, *perfect* DSL
domain. Could have been nice
There's about 200 similar DSLs around anything that's related to
email...
And some of them are among the m
Four hours ago, John Clements wrote:
> RFC 5228, a DSL for mail processing. Very tidy, *perfect* DSL
> domain. Could have been nice
There's about 200 similar DSLs around anything that's related to
email...
--
((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay:
I think that nothing is stopping someone from implementing an elegant
DSL with similar intent in Racket. They could use it in a Racket-based
replacement for Mailman (or a full-fledged MTA, or the existing
Racket-based MUA). If they ever need to use this Sieve language for
interoperation, they
Hi,
On Mon, Jun 6, 2011 at 8:37 AM, Marijn wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> Ho Antonio,
>
> you didn't specify a version or give actual output of your program.
Indeed, I forgot that. The following output was generated with
DrRacket 5.1.1 in Window 7 while moving the
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Ho Antonio,
you didn't specify a version or give actual output of your program.
On my racket (git version of perhaps one or two weeks old) I don't see
what you describe. If I run the program, an (annoyingly small) window is
created and if I click and
RFC 5228, a DSL for mail processing. Very tidy, *perfect* DSL domain. Could
have been nice
Ah well.
John Clements
smime.p7s
Description: S/MIME cryptographic signature
_
For list-related administrative tasks:
http://lists.racket-lang.org
26 matches
Mail list logo