(sorry Sam, forgot to Cc list)
Thank you for disclosing these vulnerabilities! Responsible disclosure
helps everyone.
Sam Tobin-Hochstadt writes:
> * Check any packages you have uploaded to the site, to ensure that no
> unexpected changes have been made to them.
Is package signing on Racket's r
If you're on linux, one dirty trick you could try is to start up a local
"web server" like netcat to just listen on the HTTP port and show you
the request that's happening:
nc -l -p 80
Then, point Curl and your Racket script to localhost and compare the
request sent by each.
bruc...@gmail.co
To expand a little bit on Sam's answer, this doesn't work in vanilla
Racket either.
> (define (my-apply f) (let ([tmp (f)]) f))
> (my-apply (lambda () (values 1 2)))
result arity mismatch;
expected number of values not received
expected: 1
received: 2
values...:
Here's one way, but it's not tail-recursive:
racket@> (define (cumsum lst [so-far 0])
(match lst
['() '()]
[(cons first rest)
(cons (+ so-far first)
(cumsum rest (+ so-far first)))]))
racket@> (cumsum '(1 3 5 7))
'(1 4 9 16)
Does this work if you place the .DLL in the same directory as the Racket
executable?
What if it's placed in your System32 folder?
If you need to put the library in a nonstandard path (I think putting
the .dll in the same folder as the .rkt script is nonstandard), try
registering the DLL. See
http
Do you mean (map), (filter), and (cartesian-product)? Or more like some
simple DSL written on top of these primitives?
http://docs.racket-lang.org/unstable/list.html#%28def._%28%28lib._unstable%2Flist..rkt%29._cartesian-product%29%29
Sean Kanaley writes:
> Hello all,
>
> Does anybody know of a w
My opinion: Which will waste less time over all uses of your program? A
few extra CPU-minutes of double checks, or a few extra man-weeks of
debugging when one of your code's assumptions fails?
Sean Kanaley writes:
> Hello all,
>
> Sometimes I run into situations where a callee has certain input
>
Hey there! I found a bug in the `opengl` package. (Not the sgl bindings!
The opengl you get by doing raco pkg install opengl)
Since http://pkg.racket-lang.org is down, and because there's no
authorship information in the README or info.rkt, I can't find the
maintainer of the `opengl` package. (Jay
(sorry about the possible duplicate; I sent this from the wrong email
address...)
Hey there! I found a bug in the `opengl` package. (Not the sgl bindings!
The opengl you get by doing raco pkg install opengl)
Since http://pkg.racket-lang.org is down, and because there's no
authorship information i
Interesting. Does this replace get-pure-port and friends? If not, maybe
we should include some wording in the docs for new users: "These
functions are for those who need low-level control over their HTTP
requests. For a friendlier and more conventional HTTP interface, see
..."
Jay McCarthy writes
See https://github.com/mental/bloopsaphone which (IIRC) uses a variant
of ABC notation.
Neil Van Dyke writes:
> Anyone currently working with music mini-languages in Racket?
>
> Reason I ask... In my iRobot Roomba Racket interface, I currently have a
> simple music mini-language that lets you sp
This is great, but it really needs some security improvements.
(file->string "/etc/passwd") works fine, as does
(system "rm /tmp/try-racket/main.rkt")
John Clements writes:
> On Apr 24, 2013, at 4:16 AM, manu d wrote:
>
>> Hello
>>
>> I got my web-based Racket tutorial off the ground.
>>
>> You c
Try something like:
#lang racket/gui
(require racket/draw)
(define f (new frame% [label "This Space For Rent"]))
(define l (new message% [parent f]
[label (make-object bitmap%
"/tmp/130414_005.jpg")]))
(send f show #t)
deepak verma writes:
> how c
You're evaluating the (/ 1 0) before you make your evaluator. You have
to quote it.
The following works for me:
(define my-eval
(parameterize ([sandbox-output #f]
[sandbox-error-output #f]
[sandbox-propagate-exceptions #f]
[sandbox-propagate-br
Without places, racket is single-threaded, so non-threadsafe code
shouldn't be a problem unless you're using places.
When the presence or absence of JIT compilation is significant, that
tells me that maybe you're doing something undefined with memory.
Would you mind showing us the source code?
"
Does this do what you want?
> (display (string->bytes/latin-1 "à"))
à
See also: http://docs.racket-lang.org/reference/encodings.html?q=locale
I know that UTF-8 and Latin-1 are supported, at least. Other encodings
might be in extra libraries, eg.
http://docs.racket-lang.org/r6rs-lib-std/r6rs-lib-
Hey there!
I have a half-baked implementation of something like this on PLaneT, but
it doesn't use places or any of the nice things that Racket has. You can
replace for/list loops with for/work loops and, under some (major)
constraints, have an instant networked mapreduce setup.
http://planet.rac
+10! Using just ~r can get close, but ...well...
> (~r (- pi) #:min-width 12 #:precision 6)
"-3.141593"
Pierpaolo Bernardi writes:
> Hello,
>
> suppose I want to format a real number, with a fixed number of digits
> after the comma, rigth-padded in a given width, and I want the sign to
> be
With all these discussions about serialization safety in different
languages (see http://news.ycombinator.com/item?id=5343704 for some
commentary on clojure's default reader for example), I have to wonder:
1. Is racket's (read) "safe" to use in an unsafe context?
2. If not, how can I (read) a valu
Oh geez, that's a very good point. Thanks for catching that before
an attacker does, Eli.
Eli Barzilay writes:
> 30 minutes ago, Michael Wilber wrote:
>> I know it's a hack but for my needs, I just spawn a synchronous ssh
>> process, like this:
>>
>> (defin
I know it's a hack but for my needs, I just spawn a synchronous ssh
process, like this:
(define (get-remote-file file)
(define success? #t)
(define remote-bytes
(with-output-to-bytes
(λ() (set! success?
(system (format "ssh machinename cat ~a" file))
(and success
Hey there!
Is there any convention for linking to docs from planet2's online list
of packages?
E.g. as a user, it would be nice to have a "Click here to see
documentation" link from, say,
https://pkg.racket-lang.org/info/disassemble that either links to the
scribbled docs in the source or to a UR
Specifically, Matthew Flatt's RacketCon presentation:
http://news.ycombinator.com/item?id=5256999
Racket Users list:
http://lists.racket-lang.org/users
Why not have a `run.rkt` that does something like
#lang racket
(require "main.rkt")
(main)
than you tell your users to run, and then just develop main.rkt inside DrRacket?
Pierpaolo Bernardi writes:
> On Wed, Feb 13, 2013 at 5:59 PM, Danny Yoo wrote:
>>> Is there a way for a program to know if
Your OpenGL example still doesn't flash for me when I move the mouse
over it, on 64-bit linux.
It does, however, flash when I change window focus... for some reason?
What OS are you using?
Philipp Dikmann writes:
> I'm sorry, I should have been more specific – it happens when using a
> gl-enabl
ad a very mixed reception. Scheme dialect
implementors will still try to support R6RS as a checklist item, or to
get some library support they don't want to implement themselves, but
R6RS is not revered doctrine like language standards tend to be.
Michael Wilber writes:
> (disc
(disclaimer: i'm just a user; what i say doesn't reflect the rest of the
community)
"Racket" is a programming language lab. Both RxRS, and the rest of the
"separate Racket language" that you allude to, are built on top of it,
not the other way around.
What would be the advantage of being built on
Try this (untested):
(_fun [a : _double]
[b : _double]
[c : (_ptr o _double)]
[d : (_ptr o _double)]
-> [result : _int]
-> (list c d result))
You can change (list c d result) to return any value that refers to the
a, b, c, and d bindings you just made.
Pierpaolo Ber
(sorry for the duplicate)
JSON doesn't specify a way of encoding dates. See http://json.org/
You have to convert your date to a string first, like this:
racket> (jsexpr->string (date->string (current-date)))
"\"Sat Jan 05 11:20:35-0700 2013\""
Your Javascript code can then just parse the JSON st
Just to clarify my understanding: The shadow bytestring takes up memory
itself though, which means that if a 1MB bitmap is loaded with a 1MB
shadow, then to the OS, Racket's using 2MB of memory but the garbage
collector thinks it's only using 1MB. Is that right? Or since it's never
accessed, does t
idea why your numbers are
> so different?
>
> At Sun, 16 Dec 2012 11:29:58 -0700, Michael Wilber wrote:
>> TL;DR: About ~2.8x speedup from using local variables and unsafe
>> functions. Copying each bitmap row could bring speedup to ~20x, but it
>> doesn't quite work
This is just a shot in the dark, but do you have your SSH keys set up?
If you get a password prompt when you 'ssh remote-node-name', I think it
might not work.
(From the looks of things, since you're spawning a node on localhost, I
think you might have to get 'ssh localhost' working the same way.
TL;DR: About ~2.8x speedup from using local variables and unsafe
functions. Copying each bitmap row could bring speedup to ~20x, but it
doesn't quite work and I need your help. Pull request at
https://github.com/plt/racket/pull/199
Hey there!
I'm writing some FFmpeg bindings for Racket. It's fast
This is such an exciting time to be a Racket programmer! Thanks for all
your work, Neil.
During winter break once I'm finished with grad school apps, I'll
convert my final Signals and Systems Matlab project to racket/math to
get a feel for the library.
One note off-hand: I really don't like the (
Would some good old UNIX hackery and regular expressions be more
appropriate here?
cat your_file | sed -e "s:{'o}:ó:g" -e "s:{\"o}:ö:g"
If you need it, there's always (regexp-replace).
prad writes:
> i have a .bib file with stuff like this that needs to be converted:
>
> W{\"o}lfle ->
Do you mean actually mimicking the language, or just a library that
provides turtle semantics? For the latter, see:
http://docs.racket-lang.org/turtles/index.html?q=turtle
Eric Tanter writes:
> Hi there,
>
> Does anyone know of a `#lang logo' for Racket? yes, yes, the turtle :)
>
> Thanks,
>
> --
I agree with all of these issues and your fix. This would get me back to
using DrRacket's balanced paren option.
A question: What happens when I type ) when I should type ]? E.g.
(cond
[(foo x) "one"]
[(bar x) "two" |])
where | is the cursor position on the last line there, if I type a )
on
I'm not sure about the msvcp100.dll problem, but clements/portaudio
distributes PortAudio for windows clients:
http://planet.racket-lang.org/package-source/clements/portaudio.plt/3/1/
See the lib/ folder.
Antonio Menezes Leitao writes:
> Hi,
>
> I have a package that I uploaded to planet that de
Does surface3d and isosurface3d from racket/plot do what you want?
file:///usr/share/racket/doc/plot/renderer3d.html?q=isosurface#(def._((lib._plot/main..rkt)._isosurface3d))
Gregory Woodhouse writes:
> I'm intrigued. I suppose pattern based macros could be used to implement
> operations like +
Good luck at your meeting! All of us on racket-user are cheering for
you. :)
Grant Rettke writes:
> Hi Caleb,
>
> I'll head out at about 7:50 so I'll be there about 8:20.
>
> Grant
>
> Racket Users list:
> http://lists.racket-lang.org/users
Racket U
Something like this?
http://dev.mysql.com/doc/refman/5.0/en/csv-storage-engine.html
That seems somewhat unsupported though...
John Clements writes:
> On Sep 6, 2012, at 1:06 PM, Michael Wilber wrote:
>
>> CSV files? Do you mean importing a CSV file into a table?
>>
>
CSV files? Do you mean importing a CSV file into a table?
Take a look at http://dev.mysql.com/doc/refman/5.1/en/load-data.html,
the "LOAD DATA INFILE" command, which (iirc) takes a CSV file and
imports it into a table, one shot.
John Clements writes:
> On Sep 6, 2012, at 11:08 AM, Jay McCarthy w
What's the difference between this and (reverse LS) ?
Ashley Fowler writes:
> Can anybody help me with this problem? I have an idea but would like some
> suggestions on how to start. The problem is below...
>
>
> Write a procedure (switch-one-and-three1 LS) that takes a list of
> exactly three i
It works with any file/convertible? value.
Looks like sicp pictures seem to work: http://i.imgur.com/Vb4nT.png
Eli Barzilay writes:
> On Sunday, Jose A. Ortega Ruiz wrote:
>>
>> Hi,
>>
>> A quick note to let you know that i've just released Geiser 0.2, my
>> Emacs-Racket/Guile interaction thingi
Thanks for the new Flomap library in Racket 5.3! I've been having tons
of fun making old TV screens using this and the icons library:
https://gist.github.com/3495088
(televise some-bitmap)
See an example here:
https://raw.github.com/gist/3495088/3de970869126047be245696c14e495e7258ce837/acat.png
Oh, I see it now. Thanks for the detailed explanation; I had
misinterpreted earlier.
On Fri, 24 Aug 2012 21:14:48 -0600, Neil Toronto wrote:
> On 08/24/2012 06:23 PM, Michael Wilber wrote:
> > This is interesting, but I don't understand how moving cons around keeps
> > it
This is interesting, but I don't understand how moving cons around keeps
it from allocating? In particular, why are the cons calls "evaluated at
expansion time" when we may not even know the length of the list during
macro expansion time?
Near the top of the post, it says the code "would be slow b
Nice! Thank you, Matthew.
Will such custodian shutdown callbacks be run when racket receives a
SIGTERM?
On Sun, 12 Aug 2012 20:36:36 -0600, Matthew Flatt wrote:
> At Sun, 5 Aug 2012 15:02:10 -0600, Matthew Flatt wrote:
> > Beware that FFI callback memory management is slightly tricky with
> > sc
Wow, thank you! I'm going to watch this right away.
One of the silver linings of releasing these videos now is that we can
better see how much our community has grown and changed since last year.
On Fri, 3 Aug 2012 09:56:08 -0400, Sam Tobin-Hochstadt
wrote:
> I'm very pleased to announce that t
(oops, forgot to cc: the list)
Oh wow, that's interesting. Your code on my computer:
subnormal addition:
cpu time: 8156 real time: 8171 gc time: 0
cpu time: 9009 real time: 9035 gc time: 0
cpu time: 7740 real time: 7765 gc time: 0
cpu time: 7276 real time: 7288 gc time: 0
cpu time: 10643 real tim
5th percentile
>(define unsorted-times
> (for/list ([i (in-range 100)])
>(define-values (results cputime realtime gctime)
> (time-apply fun (list start-value)))
> realtime))
>(define times (sort unsorted-times <))
>(define 5p (list-ref times
So here's something fun to look out for in your own programs.
On my slower 32-bit machine, very small numbers are much slower than
slightly less small numbers.
> (time-it (expt 2 -1000))
126 - 235
> (time-it (expt 2 -1050))
1187 - 2071
On my faster 64-bit machine, the performance difference is a
I don't know of any ways to import vector graphics in the standard
library. Maybe an official developer can give pointers.
There's a "pdf-render" package on planet. It's just FFI bindings to
libpoppler. It only works on linux though, and who knows how stable it
is.
#lang racket
(require slideshow
Just to second the thoughts of others, I will love you forever if you
add basic vector / matrix operations.
Ripping off NumPy would be a *huge* step forward toward encouraging
scientific research in racket.
On Sat, 30 Jun 2012 18:31:28 -0600, Neil Toronto wrote:
> Being a glutton for punishment,
If I understand correctly, by default, Racket doesn't provide forms with
stack trace information when running from the CLI by default. Does it
work from within DrRacket? If so, look into the errortrace module, or
add (require errortrace) to the top of the .rkt, or run it like this:
racket -l errort
place to the xexpr.
>
> 2012/6/9 Michael Wilber
>
> > Strings aren't safe in XML by definition.
> >
> > Are you thinking of this, but with xexprs?
> > (define title "Hello world")
> >
> > (string-append ""
> >
Hey there!
So I'm trying to use racket/serialize according to
http://docs.racket-lang.org/reference/serialization.html?q=serialize#(def._((lib._racket/private/serialize..rkt)._deserialize))
According to the third bullet point, custom serializable structure types
include a "quoted module path" po
Can you run other OpenGL Racket programs? For example, try the gears example:
racket /usr/lib/racket/collects/sgl/examples/gears.rkt
On Thu, 17 May 2012 17:49:21 -0400, JP Verkamp wrote:
> Hopefully someone out there can help me out, I've run into a a bit of
> a problem with the gl2d and gl-worl
58 matches
Mail list logo