[racket-users] Re: tilda - a threading macro full of itself

2019-05-07 Thread Lehi Toskin
I like this. Reminds me of `rackjure/threading`, but more involved.

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/7b1ae615-3398-4620-96b9-ecc9cdd2603a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[racket-users] Re: ANN: RacketCon Keynote Speakers; You won't believe #9!

2019-03-18 Thread Lehi Toskin
A clickbait title about workshops!? That might just make me "Come and see." 
;)

On Monday, March 18, 2019 at 10:31:55 AM UTC-7, Jay McCarthy wrote:
>
> This year from July 8th to the 14th is Racket Week. Come and see. 
>
> During the body of the week are the school workshops. Come and see. 
>
> https://school.racket-lang.org/ 
>
> Afterwards is RacketCon itself, for two days. Come and see. 
>
> https://con.racket-lang.org/ 
>
> We're happy to announce that the keynote speaker is Aaron Turon, a 
> leader on the Rust team at Mozilla. Come and see. 
>
> https://aturon.github.io/about/ 
>
> If you'd like to apply to present, send me an email. 
>
> <3 
>
> Jay 
>
> -- 
> -=[ Jay McCarthy   http://jeapostrophe.github.io]=- 
> -=[ Associate ProfessorPLT @ CS @ UMass Lowell ]=- 
> -=[ Moses 1:33: And worlds without number have I created; ]=- 
>

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[racket-users] Re: Tensorflow bindings?

2019-02-04 Thread Lehi Toskin
That actually sounds kinda fun. If you make the repo I'll join in.

On Monday, February 4, 2019 at 8:07:58 AM UTC-8, Matt Jadud wrote:
>
> Hi all,
>
> https://www.tensorflow.org/install/lang_c
>
> Would there be interest/value in having FFI bindings for TensorFlow? If I 
> poke it with a stick, are there others who would be willing to contribute 
> to the development of a package that provided those bindings?
>
> I'm getting to the point with a project where I'm going to have to bail 
> out of Racket in order to do some machine learn-y stats work, and I'd 
> rather not have to switch languages just to do the analysis.
>
> Cheers,
> M
>

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[racket-users] Re: Resource recommendations for a Haskeller?

2018-10-14 Thread Lehi Toskin
I learned to Racket with a combination of "The Scheme Programming Language" 
by Kent Dybvig, SICP, and the Racket documentation site. If you're new to 
Lisp then The Scheme Programming Language would probably do well.

P.S. I would recommend the Racket style guide, just so you get an idea of 
what's "Racket-y", too.


On Sunday, October 14, 2018 at 11:43:53 PM UTC, theindi...@gmail.com wrote:
>
> (I originally posted this to Reddit 
> 
> )
>
> I know Haskell reasonably well (but no Lisps), but I want to learn Racket 
> to know more about
>
> macro systems and language-oriented programming. I'm also interested in 
> compilers/PLs/DSLs,
>
> so my first project would probably writing an interpreter for Lox 
>  or some other 
> small language.
>
> I have copies of Land of Lisp as well as Realm of Racket from a Humble 
> Bundle, but they seem
>
> a bit slow and I'm feeling somewhat impatient :P. Also, RoR doesn't really 
> mention pattern
>
> matching at all, whereas the Racket guide mentions it 
> . So yeah, my 
> questions are -
>
>
> 1. Is there any Racket equivalent for Hoogle/do you typically just use a 
> normal search engine?
>
> 2. Should I embrace the lack of types or perhaps start out with typed 
> Racket? I'd probably be
>
> uncomfortable without ADTs.
>
> 3. What does your editor setup and typical workflow look like? I've heard 
> Clojurists use the
>
> REPL much more compared to Haskellers, is that true of Racketeers as 
> well?
>
> 4. Are there any screencasts/videos that you'd recommend for getting 
> started quickly?
>
> 5. Where is the Racket community most active? 
> Reddit/Twitter/Slack/Discourse/somewhere else?
>
>
> Any other suggestions? I've already seen this post 
> 
>  
> but the suggestions there seem to be geared
>
> towards someone with primarily an imperative/OO background.
>
>
> I found out about *Language-oriented Programming in Racket: A Cultural 
> Anthropology* via
>
> Twitter and am reading through it right now. It is very interesting to 
> read the perspectives of
>
> highly experienced folks.
>
>
> Already kinda' resolved:
>
>
> Also, a commenter there suggested *Beautiful Racket*, which I just 
> started going through, it
>
> seems close to what I was looking for in terms of reading.
>
>
> For 5., a commenter suggested posting the question here, since this 
> mailing list is more active
>
> compared to Reddit.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [racket-users] raco config-path

2018-10-07 Thread Lehi Toskin
You are correct. `--config-path` isn't really what I thought it was. That 
being said, I'm no closer to understanding this default preferences window 
that appears on macOS[1] GUI programs.

[1] https://files.catbox.moe/cp6vsn.png

On Saturday, October 6, 2018 at 10:08:33 AM UTC-7, Matthew Flatt wrote:
>
> There's not currently a way to set that path dynamically. I'm not sure 
> what it would mean to call a Racket function to set that value, since 
> the configuration path is used to read the initial settings of various 
> parameters, such as `current-library-collection-paths`, that are needed 
> to boot Racket. 
>
> I think maybe you don't want to set `--config-path`, but you want to 
> instead want to store preferences in a different and separately 
> configured path. But I may misunderstand. 
>
> At Tue, 25 Sep 2018 11:45:01 -0700 (PDT), Lehi Toskin wrote: 
> > In the docs for raco exe, there exists a switch `--config-path` that you 
> > can specify to tell the executable to look in this directory for a 
> config 
> > file. Is there a way to set this as a runtime path instead? When OS X 
> runs 
> > my test program, it'll have Cmd-, set as the default shortcut for 
> opening 
> > the preferences which appears to use the default "etc" directory, but I 
> > don't yet see a way to make the path be set to any user's .config (or 
> maybe 
> > XDG) directory. 
> > 
> > -- 
> > You received this message because you are subscribed to the Google 
> Groups 
> > "Racket Users" group. 
> > To unsubscribe from this group and stop receiving emails from it, send 
> an 
> > email to racket-users...@googlegroups.com . 
> > For more options, visit https://groups.google.com/d/optout. 
>

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[racket-users] raco config-path

2018-09-25 Thread Lehi Toskin
In the docs for raco exe, there exists a switch `--config-path` that you 
can specify to tell the executable to look in this directory for a config 
file. Is there a way to set this as a runtime path instead? When OS X runs 
my test program, it'll have Cmd-, set as the default shortcut for opening 
the preferences which appears to use the default "etc" directory, but I 
don't yet see a way to make the path be set to any user's .config (or maybe 
XDG) directory.

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [racket-users] Racket and OS X Finder

2018-09-05 Thread Lehi Toskin
The application-file-handler is exactly what I needed. Thank you!

On Wednesday, September 5, 2018 at 11:24:01 AM UTC-7, Philip McGrath wrote:
>
> I have built toy application as a learning project that opens files in 
> Finder as a default app. I haven't worked on it in a while, so I may be 
> forgetting some things, but I'll report what I remember. It is a #lang 
> racket/gui program, built by `raco setup` in response to 
> `gracket-launcher-libraries` and `gracket-launcher-names` fields, so things 
> may be different if you're writing some other kind of program.
>
> I believe the hook for getting files passed from Finder at program startup 
> is `application-file-handler 
> <http://docs.racket-lang.org/gui/Windowing_Functions.html?q=#%28def._%28%28lib._mred%2Fmain..rkt%29._application-file-handler%29%29>`.
>  
> (It also works with Windows.) 
>
> There are also some auxiliary files you want to create to configure 
> certain things for `raco setup`'s implicit use of `build-aux-from-path 
> <http://docs.racket-lang.org/raco/exe.html?q=aux-from#%28def._%28%28lib._launcher%2Flauncher..rkt%29._build-aux-from-path%29%29>`
>  
> and `extract-aux-from-path 
> <http://docs.racket-lang.org/raco/exe.html?q=aux-from#%28def._%28%28lib._launcher%2Flauncher..rkt%29._extract-aux-from-path%29%29>`.
>  
> I believe the key one is a ".filetypes" file. There is more documentation 
> on the format under `create-embedding-executable 
> <http://docs.racket-lang.org/raco/exe.html?q=aux-from#%28def._%28%28lib._compiler%2Fembed..rkt%29._create-embedding-executable%29%29>`.
>  
> Mine is:
> Sapientia:freecell philip$ cat freecell.filetypes 
> ((("CFBuncleTypeName"
>"Freecell Game")
>   ("CFBundleTypeRole"
>"Viewer")
>   ("CFBundleTypeExtensions"
>(array "freecell"))
>   ("CFBundleTypeIconFile" "file-icon")
>  ))
> The "CFBundleTypeIconFile" entry directs `raco setup` to use 
> "file-icon.icns" as the icon for files opened by the application.
>
> Hope this helps!
>
> -Philip
>
> P.S.: I'll also mention that I recently started working on a Racket 
> library to write .icns icon files instead of shelling out to Apple's `sips` 
> to convert them from some other format. Pull requests are welcome! The code 
> is at https://github.com/LiberalArtist/icns and the docs are at 
> https://docs.racket-lang.org/icns/index.html
>
>
> On Wed, Sep 5, 2018 at 12:53 PM Lehi Toskin  > wrote:
>
>> I've been messing around with getting a test application to open files 
>> from Finder in OS X as a default app. The program appears to be operating 
>> properly, except for the part where it tells me information about the file 
>> I double-clicked. I modified the app a little so that it would print out 
>> any args that were passed to it into an editor-canvas, but all that showed 
>> up was an empty vector. Is there something weird with how Finder passes 
>> files to apps, like some URI schema that my test app doesn't recognize? Or 
>> is it something going on with how the `racket/cmdline` library operates 
>> that is incompatible with Finder?
>>
>> P.S. Running my test app from the terminal allows it to work properly, so 
>> I wonder what's the issue.
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Racket Users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to racket-users...@googlegroups.com .
>> For more options, visit https://groups.google.com/d/optout.
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[racket-users] Racket and OS X Finder

2018-09-05 Thread Lehi Toskin
I've been messing around with getting a test application to open files from 
Finder in OS X as a default app. The program appears to be operating 
properly, except for the part where it tells me information about the file 
I double-clicked. I modified the app a little so that it would print out 
any args that were passed to it into an editor-canvas, but all that showed 
up was an empty vector. Is there something weird with how Finder passes 
files to apps, like some URI schema that my test app doesn't recognize? Or 
is it something going on with how the `racket/cmdline` library operates 
that is incompatible with Finder?

P.S. Running my test app from the terminal allows it to work properly, so I 
wonder what's the issue.

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [racket-users] Output Port Shenanigans

2018-03-14 Thread Lehi Toskin


On Wednesday, March 14, 2018 at 10:10:20 AM UTC-7, Matthew Butterick wrote:
>
>
> probably it requires a combination of peek + read, or copying the port. 
>
> That may be true, but I've been messing around getting *anything* to print 
from inside that function. I'm beginning to think it's never actually being 
run, which leads me to believe this may be a bug. 

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[racket-users] Output Port Shenanigans

2018-03-13 Thread Lehi Toskin
Hello, everyone!

I'm trying to get an output port to display text to both the error port and 
a text% object every time there's an error or an `eprintf` is called. Now, 
I have already accomplished this by using `make-output-port`, but I had 
decided to try and use `open-output-text-editor` instead just for gits and 
shiggles. In the procedure documentation it shows that it takes a lambda 
labeled "special filter", so I figured I'd hijack this lambda to then 
fprintf to the error port, but for whatever reason it seems that all 
printing that is done from inside that special filter's scope is sent 

I have tried the following, but without any success:
(define old-out (current-output-port))
; now inside special filter's scope
(lambda (s) (fprintf old-out "foo") s)

There must be something I'm missing, but there's not much in the docs that 
would help me.

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [racket-users] Printing Quickly

2017-07-29 Thread Lehi Toskin
On Tuesday, July 25, 2017 at 9:07:14 AM UTC-7, Jens Axel Søgaard wrote:
> The Interaction Window in DrRacket supports snips, picts etc., so it is 
> reasonable that is slower than a terminal.
> But ... maybe it is possible to let the user choose a simpler interaction 
> window. One that only supports text?
> As a feasibility experiment, is William Hatch's terminal faster than the 
> DrRacket interaction window?
> 
> 
> 
> 
>      https://github.com/willghatch/rackterm
> 
> /Jens Axel
> 
> 
> 
> 
> 2017-07-25 16:41 GMT+02:00 WarGrey Gyoudmon Ju :
> 
> 
> 
> 
> 
> On Tue, Jul 25, 2017 at 4:52 PM, George Neuner  wrote:
> Having little experience with Racket's drawing library, I can't speak to how 
> fast it is.  I do recall someone saying it was (mostly) just a thin layer 
> over the native platform library, but even "thin layers" add some latency.   
> Nor do I have any clue as to how clever DrRacket is with its drawing.
> 
> 
> 
> It's true for all other classes that implement the interface control<%> 
> except the text% and text-field%, the editor infrastructure is completely 
> implemented in Racket, there *are* some optimizations for speed by, such as, 
> disabling ligatures. Sometimes I still hope there would be an alternative to 
> the native text-field controller. 
> 
> 
> 
> 
> 
> 
> -- 
> 
> You received this message because you are subscribed to the Google Groups 
> "Racket Users" group.
> 
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to racket-users...@googlegroups.com.
> 
> For more options, visit https://groups.google.com/d/optout.
> 
> 
> 
> 
> 
> -- 
> 
> -- 
> Jens Axel Søgaard

Actually, using rackterm with some script that prints a lot will make the 
rackterm terminal freeze up. I have to kill the process before anything visible 
happens.

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[racket-users] Re: [ANN] MessagePack implementation for Racke

2017-07-25 Thread Lehi Toskin
One thing I'm curious about is what things can you and can you not pack? In the 
README it shows bytes being packed, which seems a little obvious, but what 
about (transparent) structs? Hashes? Lists? I'm very interested in this 
package... for science!

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[racket-users] Printing Quickly

2017-07-24 Thread Lehi Toskin
I have noticed that printing in DrRacket is rather slow and I'm wondering if 
that's something I could speed up. If I have a loop that runs and prints a 
whole lot of information each loop, were I to become overwhelmed and click the 
Stop button, it would take a minute or so before my wishes made it through to 
the program.

Running the same hypothetical program from the command line, the printing 
process is executed much faster and if I Ctrl-C the change is instantaneous.

Am I making any sense?

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [racket-users] Racket7 Conceit

2017-07-20 Thread Lehi Toskin
Yes, my first question was definitely answered already.

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[racket-users] Racket7 Conceit

2017-07-19 Thread Lehi Toskin
I've read through a few README's in the racket7 repo and I can't find anything 
specifically about *why* Racket is being implemented on top of Chez Scheme, so 
I suppose I'll be asking here:

Why the rewrite in the first place? Is it because C is ugly and yucky and 
poopy? Why Chez Scheme and not, say, Chicken Scheme or GNU Guile?

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[racket-users] Re: Boot To Racket

2017-07-10 Thread Lehi Toskin
My general idea for this system is to write a small kernel that would boot and 
start a REPL, but now that I'm thinking about it I'd need to do some finagling 
to get Racket itself working on this new system --- not to mention learning ARM 
ASM if I'm going to implement this on a Raspberry Pi. By no means am I thinking 
of doing this any time soon, I don't know the first thing about OSdev, but ever 
since I read the LoperOS guy's blog[1], this idea of operating system design 
has always been burning in the back of my mind. I know of a number of OSdev 
resources (one of them is a family member) that I could research in my spare 
time, but I think the meat of the matter is finding someone who could be my Mr. 
Miyagi.

P.S. The guy who wrote the LoperOS blog is a real comedian in the same vein as 
Linus Torvalds on the LKML. I 100% encourage you to read through it and I 
guarantee you'll at least have a moderate chuckle.

[1] www.loper-os.org

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [racket-users] Boot To Racket

2017-07-08 Thread Lehi Toskin
Probably just on a Raspberry Pi, yes.

On Saturday, July 8, 2017 at 5:15:12 PM UTC-7, Deren Dohoda wrote:
> I actually use Racket in an embedded linux scenario on a 32-bit ARM. The 
> board has Debian installed but without twiddling boots under busybox. Once 
> upon a time I thought about giving a 5-minute presentation at Racketcon on 
> the experience of using Racket in this way but it never happened. It's very 
> hard to say what my hypothetical minimum requirements would be for such a 
> system without thinking of the hardware that would exist. Filesystem, 
> USB/RS232 serial/ whatever else the chip offers, and network seem like the 
> bare minimum. Are you thinking about some kind of minimal racket running on a 
> Raspberry Pi or something more abstract?
> 
> 
> Deren
> 
> 
> On Fri, Jul 7, 2017 at 8:16 PM, Lehi Toskin <lehi@gmail.com> wrote:
> I have this idea, this vision. I wish to create a small system that would 
> more or less only be to turn on the machine (probably an RPi) and then you'd 
> immediately be inside a Racket REPL. Probably wouldn't be very interesting by 
> itself, but that seems to be almost exactly what eLua and MicroPython are.
> 
> 
> 
> Say, for the sake of discussion, such a tiny system were created. What 
> functionality would you expect to be available? Filesystem access? 
> Networking? Or simply just the racket/base REPL and that's it?
> 
> 
> 
> --
> 
> You received this message because you are subscribed to the Google Groups 
> "Racket Users" group.
> 
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to racket-users...@googlegroups.com.
> 
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [racket-users] Boot To Racket

2017-07-08 Thread Lehi Toskin
That's an interesting project. It's a little too inclusive, so to speak, for 
what I was thinking of implementing.

On Friday, July 7, 2017 at 7:33:32 PM UTC-7, Neil Van Dyke wrote:
> I've made a boot-to-Racket-app appliance image for x86 before, based on 
> Debian Live.  The bootable filesystem image was under 400 MB, including 
> Linux, X, Racket, various other native programs and libraries, and the 
> app itself.
> 
> It would boot to a full-screen display that would display a hostname or 
> IP address at which you should point your smartphone/tablet/laptop Web 
> browser, to get a remote control UI "HTML5 mobile app".  But I could 
> also have had it run "racket" REPL or DrRacket rather than the app.
> 
> (This appliance was going to be an example for my abandoned book, but I 
> did release a few independently reusable Racket packages from it, in 
> keeping with the methodology the book was to promote.)
> 
> One clean way to implement boot-to-Racket is with the "build-lildeb" 
> script of an earlier GNU/Linux distro -- one script file shows and 
> implements all the changes made to strip down and customize Debian 
> Live.  There's also an "update-lildeb" flashing script, which goes to a 
> lot of trouble to tweak the partition table of the flashed device.
> http://www.neilvandyke.org/lildeb/
> 
> If you want something smaller than a stripped-down Debian, there's 
> OpenWrt.  There are signs that someone unknown once put considerable 
> work into getting Racket to run on hardware architectures like some 
> small OpenWrt devices have, because Racket REPL came up a little too 
> easily once I got OpenWrt building working.  The OpenWrt package for 
> Racket turned out to be less than 6 MB, though the bigger concern is the 
> runtime RAM footprint.  I didn't test this much.
> http://www.neilvandyke.org/racket-openwrt/
> 
> There's also various other projects for embedded Linux.  Some of them 
> get into messier and more questionable toolchains, and can involve a lot 
> more work and sometimes sketchy provenance. Personally, if your target 
> hardware is even a modest, well-supported x86 or ARM device (not 
> something very small or strange), I'd probably start with Debian Live 
> (probably copying and modifying my "build-lildeb" script), and see how 
> that works.
> 
> Or you could just have instructions (or a script) for how to modify a 
> stock Debian, Raspian, Arch, etc. install to boot-to-Racket, in a manner 
> of speaking.

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [racket-users] Boot To Racket

2017-07-07 Thread Lehi Toskin
Well there is the racket-rash project[1]. So you're thinking of more a *NIX 
environment inside the REPL?

[1] https://github.com/willghatch/racket-rash

On Friday, July 7, 2017 at 5:38:51 PM UTC-7, Royall Spence wrote:
> How about a full suite of all the usual shell commands? I believe this
> is the approach scsh takes. Come to think of it, I'm going to give that
> a try now...
> 

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[racket-users] Boot To Racket

2017-07-07 Thread Lehi Toskin
I have this idea, this vision. I wish to create a small system that would more 
or less only be to turn on the machine (probably an RPi) and then you'd 
immediately be inside a Racket REPL. Probably wouldn't be very interesting by 
itself, but that seems to be almost exactly what eLua and MicroPython are.

Say, for the sake of discussion, such a tiny system were created. What 
functionality would you expect to be available? Filesystem access? Networking? 
Or simply just the racket/base REPL and that's it?

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [racket-users] DrRacket Font Selection

2017-06-29 Thread Lehi Toskin
Now that I have figured out how to get `force-cache` to run through alternate 
means (using the scroll wheel) and have my preferred font selected, I think 
I'll be okay until a fix has been added. I think this started to happen when I 
upgraded to v6.9 and then downgraded to v6.8. I couldn't say *why*, but IIRC 
that also around the time when I started to have font issues.

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [racket-users] DrRacket Font Selection

2017-06-26 Thread Lehi Toskin
Yes, that is correct.

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [racket-users] DrRacket Font Selection

2017-06-25 Thread Lehi Toskin
Since there is only a single choice, on-subwindow-event (line 86) will not be 
executed by simply clicking, I need to wheel-up or wheel-down for it to update 
the list of fonts. Pressing Enter, however, forces on-subwindow-char (line 92) 
to execute and populate the list of fonts. Selecting the font I want and 
restarting DrRacket will keep my font intact, but the list of fonts is once 
again reduced to a single option - this time my font instead of Monospace. I 
believe it has something to do with `preferences:get` call on line 99, but I'm 
not familiar enough with the framework library to think of a reason why it 
would be acting improperly.

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [racket-users] DrRacket Font Selection

2017-06-25 Thread Lehi Toskin
Yeah, that's exactly where I'm looking. In the Font Name, I see only Monospace. 
I click on it and there are no choices except that one.

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [racket-users] DrRacket Font Selection

2017-06-25 Thread Lehi Toskin
Where is "Other..."? I don't see it anywhere. Also, `(get-face-list 'mono)` 
shows a whole lot more fonts than just Monospace.

On Sunday, June 25, 2017 at 3:33:22 AM UTC-7, Robby Findler wrote:
> DrRacket uses the result of (get-face-list 'mono) in its dialog. If
> you choose "Other..." you should be able to choose from the same set
> that get-font-from-user uses.
> 
> Robby
> 

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[racket-users] DrRacket Font Selection

2017-06-24 Thread Lehi Toskin
At some point DrRacket decided it didn't want to use any font other than 
Monospace. In fact, Monospace is the only font that is available in the menu. 
`(get-font-from-user)` will correctly display all my fonts, but for whatever 
reason DrRacket doesn't want to cooperate. I've even tried using a fresh 
.racket directory, but the result is the same.

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[racket-users] Racket v6.9 gui-lib Sluggishness

2017-05-21 Thread Lehi Toskin
There appears to be some sort of problem with gui-lib in Racket v6.9 that isn't 
apparent in v6.8. In my image viewer program Ivy[1], moving from one image to 
the next takes a few seconds even for small images and if I click in a 
text-field with lots of text in it, it'll take a half second for the cursor to 
update its position. Highlighting text will take a similar amount of time to 
take effect. These problems don't seem to appear on Windows, so I think it has 
something to do with the Gtk+3 innards, but I couldn't even begin to say what 
could be the reason. I was confused for a little bit, but downgrading to Racket 
v6.8 seemed to fix all the problems I listed earlier. Things seem much more 
snappy than when the program is using Racket v6.9.

P.S. I'm running amd64 Gentoo


[1] https://github.com/lehitoskin/ivy

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[racket-users] Re: Cut/copy/paste buggy in DrRacket 6.8 (on my dual boot system)

2017-04-23 Thread Lehi Toskin
On Friday, April 21, 2017 at 1:35:12 AM UTC-7, Chris Klopfenstein wrote:
> It seems that sometimes when pasting the clipboard in DrRacket (version 6.8), 
> it also gets pasted into another (wrong) place. It is very annoying.
> 
> It also *seems* to occur when doing cut/paste in a different app (with 
> DrRacket open).
> 
> I've experienced this in both Ubuntu (16.10 and 17.04) and Win10.

This seems very strange. Could you give a specific example? Maybe steps to 
reproduce the problem?

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[racket-users] Re: Standalone Executables and shared libraries

2017-02-24 Thread Lehi Toskin
On Windows the easiest way to deal with DLL's is to have them in the same 
directory as the program. If they aren't in the same directory, you'll need to 
specify their path like `(ffi-lib "C:\\path\\to\\vendor\\dir\\foo")` in the 
wrapper file.

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[racket-users] get-file-list filter

2017-02-20 Thread Lehi Toskin
In `get-file-list`  there is a filter argument that can be passed to the 
function such that when going through a directory it'll only list directories 
and those files in the filter (separated by a semicolon). This can get rather 
unruly when the filter is rather large. At current count, I have a filter of 14 
different file extensions accounting for spelling or case (e.g. 
"*.jpg;*.jpeg;*.JPG;*.JPEG"). Is there a way to do this more programmatically? 
I don't mean using a procedure to create the string, but that instead of a 
string it'd be, say, a predicate.

In various GUI programs, the selection would be simply "All Images" or "Any" 
without specifying exactly what list of file extensions it's filtering. I 
suppose that behavior itself is fine, which would mean hiding the file 
extensions from the filter choice and only showing the name of the filter.

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [racket-users] Package layout in docs

2017-01-30 Thread Lehi Toskin
> An alternative approach which probably takes less effort is to just have two 
> documentation pages. One for core packages, and one for community packages. 
> Obviously we should still make 3rd party packages feel like first class build 
> in stuff, but if we just host them at a different URL, that might be enough 
> to keep things clear.

+1 - I really like that the documentation generated for any given package looks 
the same as another, but there have been some times where I've searched through 
the documentation and found a package where it was not obvious it was 
user-submitted and got confused when Racket complained that package wasn't 
installed already.

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[racket-users] Re: Stickers!

2017-01-24 Thread Lehi Toskin
Stickers? For free?? Count me in! How would you like me to contact you in 
private?

On Tuesday, January 24, 2017 at 1:15:59 PM UTC-8, Ben Greenman wrote:
> 
> If you send me your address, I will mail you some stickers. For free!*
> 

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[racket-users] Re: Custom define macro

2017-01-20 Thread Lehi Toskin
That's perfect, Thank you!

On Friday, January 20, 2017 at 2:46:49 PM UTC-8, Matthew Butterick wrote:
> Perhaps a job for `normalize-definition`? It handles all the syntactic 
> disentangling in a `define`-like macro.

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [racket-users] DrRacket Background Expansion Memory Usage

2017-01-18 Thread Lehi Toskin
The program I've been working on is https://github.com/lehitoskin/ivy - it has 
a few library dependencies, but those should be easy to get.

On Wednesday, January 18, 2017 at 4:04:01 AM UTC-8, Robby Findler wrote:
> It sounds like there might be a leak somewhere. Is the program you were 
> editing easy to share?
> 
> 
> Robby

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[racket-users] DrRacket Background Expansion Memory Usage

2017-01-17 Thread Lehi Toskin
In DrRacket I had background expansion on for the longest time until I started 
to notice that whenever I would work on my programs it would, well, expand in 
the background and take up 100% of one of my cores and the memory would slowly 
crawl upwards. A few times it got so bad that DrRacket by itself would occupy 
60% of my 8GB of memory, which is *quite* silly. Turning off background 
expansion brings the memory usage down to a cool(-ish) 230MB --- 400MB, even 
after editing and running my program a number of times.

What's the deal with background expansion ballooning out of control like that? 
Do I just need to click on the memory usage button more often? Background 
expansion is kind of a neat feature but it's not neat enough to warrant such 
incredible memory consumption.

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [racket-users] Re: inflate/deflate

2017-01-13 Thread Lehi Toskin
On Friday, January 13, 2017 at 5:32:51 AM UTC-8, Tony Garnock-Jones wrote:
> 
> Oh, cool. That'd probably be a useful thing for Racket's
> net/git-checkout module, which has a piece of code in `zlib-inflate`
> that reads:
> 
>   ...
>   (inflate i o)
>   ;; Verify checksum?
>   (read-bytes-exactly 'adler-checksum 4 i)
>   ...
> 
> Perhaps you could contribute your adler32 implementation, and it could
> be used there. (And perhaps that `zlib-inflate` function deserves being
> pulled out into a separate module. Hmm.)
> 
> Cheers,
>   Tony

Sounds good to me! I just made a PR.

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [racket-users] Re: inflate/deflate

2017-01-12 Thread Lehi Toskin
Thanks to Tonyg's links, I figured out that the part I was missing was the 
ADLER-32 check of the uncompressed data added to the end of the byte string.

That makes the total byte string composition look like this:
(bytes #x78 #x9c) compressed-data-from-deflate (number->bytes (adler32 
uncompressed-text))

`number->bytes`, is a function I made; its definition is
(define (number->bytes num)
  (define hex (number->string num 16))
  ; from file/sha1
  (hex-string->bytes (if (even? (string-length hex)) hex (string-append "0" 
hex

P.S. I didn't see an implementation of ADLER32 anywhere, so I had to write my 
own, which took a little longer than expected, but oh well.

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[racket-users] Re: inflate/deflate

2017-01-12 Thread Lehi Toskin
On Thursday, January 12, 2017 at 10:59:13 AM UTC-8, Ethan Estrada wrote:
> Then, is this a bug or something that should be an optional argument on the 
> function like `#:ignore-initial-bytes #t`? I am not deeply familiar with the 
> DEFLATE file format, but this seems like bug since it doesn't inter-operate 
> with other implementations of zlib/zip/DEFLATE.

If it isn't quite compatible with other DEFLATE implementations, I'd say it is 
a bug...

For reference, what I'm trying to do is take zTXt and iTXt data from a PNG file 
and uncompress/compress it. Whenever I do compression from Racket, pngfix 
complains that the data isn't quite right:

iTXt SKP default 15 Z_BUF_ERROR 853 [truncated]
zTXt SKP default 15 Z_BUF_ERROR 402
IDAT OK  maximum 15 15 25411 1000938

This is why I started looking into the details of the compression in the first 
place... Now that I think about it, it's probably naive of me to simple add 
those two bytes and expect everything to actually be working as expected - 
while the data is decompressed as I expect, there might be some special cases 
inside zlib-flate that allow it to be decompressed anyway. I'm assuming the 
Z_BUF_ERROR is being reported because it's not as flexible and the structure of 
the data is missing some information like length (or something). Wild 
speculation, though. I actually have no idea what's wrong and I'm trying to 
make sense of something I barely understand.

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[racket-users] Re: inflate/deflate

2017-01-11 Thread Lehi Toskin
Interesting... If I prepend `(bytes #x78 #x9c)` to the compressed data created 
by deflate, zlib-flate will uncompress it. Same thing happens in reverse where 
I skip the first two bytes of the zlib-flate'd data and process it with inflate.

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[racket-users] Re: inflate/deflate

2017-01-11 Thread Lehi Toskin
If I run `gunzip-through-ports`, it errors out with "gnu-unzip: bad header"

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[racket-users] inflate/deflate

2017-01-11 Thread Lehi Toskin
I'm looking at some data that was zlib compressed and I thought I'd inflate it 
with file/gunzip's deflate function, but I get "inflate: error in compressed 
data". I thought to try from the opposite direction, grabbing some deflated 
data from Racket and then asking zlib-flate to inflate it again, but then I get 
"flate: inflate: data: incorrect header check".

Are the inflate/deflate functions incompatible with zlib-compressed data? That 
doesn't seem to be right, since the documentation says it's pkzip and 
everything I've read says that pkzip is what zip uses.

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[racket-users] Re: FFI Library Naming Conventions

2017-01-08 Thread Lehi Toskin
On Sunday, January 8, 2017 at 8:29:49 AM UTC-8, Royall Spence wrote:
> I'm making some bindings for a C library. In the original library, the 
> functions are named as "LIBNAME_do_stuff". Should I keep those the same in 
> the FFI binding or define them as "libname-do-stuff"? Is there a convention 
> for these things?

What I like to do is libname-do-stuff, but I'm partial to the idea of dropping 
the libname part and instead just having do-stuff. That is, unless there's 
frequent naming conflicts.

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[racket-users] list-box% Gtk-WARNING

2017-01-04 Thread Lehi Toskin
I've been encountering Gtk-WARNING's on some simple GUI code and it's not 
really making any sense to me. Here's the code:

;;;
#lang racket/gui

(define frame
  (new frame%
   [label "foo"]
   [width 500]
   [height 500]))

(define lbox
  (new list-box%
   [parent frame]
   [label "lbox"]
   [style '(single vertical-label)]
   [choices '(""
  ""
  ""
  "")]))

(send frame show #t)
;;;


Here's the error:

(foo.rkt:23484): Gtk-WARNING **: Allocating size to GtkFixed 0x2023270 without 
calling gtk_widget_get_preferred_width/height(). How does the code know the 
size to allocate?


Now, a workaround I've found that works is to set lbox's style to include 
'deleted and then *after* I show the frame, I tell the frame to add lbox as a 
child. I think I understand why this is happening, but IMHO the above code 
should Just Work™.

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [racket-users] XML Modification

2016-12-14 Thread Lehi Toskin
> http://docs.racket-lang.org/txexpr/

Hoo-ray! splitf-xexpr is *exactly* what I needed. Thank you for your help!

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[racket-users] XML Modification

2016-12-14 Thread Lehi Toskin
I have some XML - rather, XMP data from an image - that I'd like to mess around 
with. I've investigated the xml library and found that I can turn the XML into 
an XEXPR so I can play around with it like that and even search through it with 
se-path*/list, but how would I go from there to replacing parts of the XEXPR? 
By my reckoning, I'd need to scan through the list and locate the data I want 
and then do something like list-set, but searching through an XEXPR that can 
have many nested sublists sounds like a nightmare to program for.

I suppose I could take a look at the XML string and do a regexp-match or 
something similar, but that seems inelegant and almost brute-force-y.

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [racket-users] Reducing Program Startup Time

2016-12-05 Thread Lehi Toskin
On Monday, December 5, 2016 at 2:51:26 PM UTC-8, Dan Liebgold wrote:
> Ok, those tests aren't particularly illumating (at least they were easy!)
> 
> Is your Racket distribution on a local drive?  Network performance can make a 
> big difference.
> 

The Racket distribution I'm using is on my local drive.

I'm beginning to think that this is just how things are with regard to the 
current state of Racket.

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [racket-users] Reducing Program Startup Time

2016-12-05 Thread Lehi Toskin
On Monday, December 5, 2016 at 12:08:12 PM UTC-8, Dan Liebgold wrote:
> Are you sure you have up to date .zo files for all your .rkt files?
> 
> How's the timing if you add '-c' to your Racket commandline?  How about '-j'?
> 

These first two tests are with the lazy-require code.

If I add '-c':
$ time racket -c -- main.rkt -V
Ivy 1.2

real2m17.134s
user2m13.646s
sys 0m2.394s

With '-j':
$ time racket -j -- main.rkt -V
Ivy 1.2

real0m4.369s
user0m2.851s
sys 0m0.155s


These next two tests are with the usual require.

With '-c':
$ time racket -c -- main.rkt -V
Ivy 1.2

real3m58.587s
user3m53.370s
sys 0m5.080s

With '-j':
$ time racket -j -- main.rkt -V
Ivy 1.2

real0m2.645s
user0m2.526s
sys 0m0.115s

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [racket-users] Reducing Program Startup Time

2016-12-04 Thread Lehi Toskin
Dupéron Georges I did what you suggested and placed a displayln at the 
beginning. There's a wait time between when I execute the program and then 
everything happens all at once - the displayln occurs at the same time as when 
the GUI spawns.

> On Sunday, December 4, 2016 at 10:05:23 AM UTC-8, Matthias Felleisen wrote:
> 
> Also consider lazy require.

That actually seems to make it run slower.

$ time ./ivy -V
Ivy 1.2

real0m2.414s
user0m2.288s
sys 0m0.119s

versus

$ time /usr/bin/ivy -V
Ivy 1.2

real0m1.955s
user0m1.796s
sys 0m0.147s

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[racket-users] Reducing Program Startup Time

2016-12-02 Thread Lehi Toskin
I have a GUI program (located here, for reference: 
https://github.com/lehitoskin/ivy.git ) I'm working on and I've found that the 
time it takes to go from clicking on the binary (or calling from CLI) to 
getting a fully loaded window takes about 2.5 ~ 3 seconds. What I would like is 
to get it down to 1 ~ 1.5 seconds. Now, I've done some more obvious things like 
using racket/base and racket/gui/base and calling require on every specific 
package I use, but it seems that isn't enough to get the startup times where I 
want them.

Are there any other obvious or generalized steps I could do that might help? 
Perhaps moving some code into expansion instead of runtime (not exactly sure 
what or how to do that, though)?

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [racket-users] Redefining a function or aliasing a function

2016-11-11 Thread Lehi Toskin
The package Racquel creates a neat DB-agnostic interface that you can use with 
many different types (basically everything in the db package). You might have 
to get creative if you want to use mongo, though there is a mongo package 
around. You may be able to create a fork or a pull request to Racquel to get 
that support added.

If that doesn't seem appealing, you may create a bunch of different query-db's 
and place them all into a hash such that `(when (equal? db-type 'mysql) 
(hash-ref db-query 'mysql))` will work.

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[racket-users] Re: Windows and librsvg-2-2.dll

2016-09-27 Thread Lehi Toskin
I've long since passed the point where pulling my hair out and/or sacrificing 
virgin goats was the next viable step in my quest to get the libraries working, 
so I think I'll quit while I'm still coherent and vaguely "sane". It seems as 
though the bundle of DLL's that m.douglas.williams linked to is what I'll end 
up using - it's suboptimal because it's 32-bits instead of 64, but I can live 
with that.

At least until I get it into my head that I *really* want a 64-bit package.

Thank you, everyone, for all your help.

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [racket-users] Windows and librsvg-2-2.dll

2016-09-26 Thread Lehi Toskin
On Monday, September 26, 2016 at 2:54:24 PM UTC-7, m.douglas.williams wrote:
> I downloaded librsvg-2.40.1-2-w32-bin.zip from 
> https://sourceforge.net/projects/ezwinports/files/. This contains the file 
> librsvg-2-2.dll and all of its dependencies (18 total dlls). When run with 
> the 32-bit version of Racket (version 6.6) and the rsvg module, this seems to 
> work fine. I assume I would have to recompile them from source, which is also 
> included at ezwinports, for a 64-bit version.

Ah! I'll try compiling those for amd64 and see how things work out.

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [racket-users] Windows and librsvg-2-2.dll

2016-09-26 Thread Lehi Toskin
Using Dependency Walker, it says I'm missing a whole lot of system files. I'll 
have to investigate this thoroughly.

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[racket-users] Windows and librsvg-2-2.dll

2016-09-26 Thread Lehi Toskin
I've been trying to make asumu's rsvg package working on Windows, but Racket 
keeps complaining that it cannot find librsvg-2-2.dll. I have verified that the 
DLL is exporting its symbols, is the correct bit-ness, and is in the right 
directories - all to no effect. I have have even recompiled it with mingw-w64 
just to be sure the DLL wasn't corrupted or something, but that didn't change 
anything.

As a little test, I made a small DLL in C which was indeed picked up by the FFI 
and I could use its single function, but I took that same DLL and added an RSVG 
function, the FFI complained that my DLL was nowhere to be found!

I'm at my wit's end. Is there anything else I could try doing? Could it be 
there's something wrong with the FFI that would make it incorrectly raise an 
error or maybe even improperly interact with a DLL?

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [racket-users] Image Transparency Detection

2016-09-10 Thread Lehi Toskin
On Saturday, September 10, 2016 at 5:45:43 AM UTC-7, Matthew Flatt wrote:
> I think that means information about the source stream's alpha channel
> really is not available through the current interface. A pull request
> to add that would be welcome.

I've been looking through bitmap%'s definition and I can't seem to find what I 
would need to change to make it work how I expect. Ah, well, I guess I'll just 
have to manage without the alpha channel detection.

Thanks for the help, Matthew.

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [racket-users] Image Transparency Detection

2016-09-10 Thread Lehi Toskin
On Friday, September 9, 2016 at 7:45:32 PM UTC-7, Matthew Flatt wrote:
> You could use 'unknown/mask, which should create a mask bitmap only if
> the source stream has an alpha channel, but at the expense of parsing
> the file an extra time.

Running `(read-bitmap img 'unknown/mask)` produces a bitmap with a mask, but 
the problem I'm seeing is that every image, no matter the type, will return a 
mask. Images that have no alpha channel (I tested several jpegs and pngs) will 
produce an all-black bitmap of the same size as the image. It works as expected 
with images that do have alpha channels, however.

Testing it with

(define bmp (make-object bitmap% 50 50))
(send bmp load-file path-to-img 'unknown/mask)

will produce a bitmap that when running `get-loaded-mask`, always returns #f.

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[racket-users] Image Transparency Detection

2016-09-09 Thread Lehi Toskin
Is there a way to detect if an image has a transparency/alpha channel? I've 
been looking around and `(send bmp has-alpha-channel?)` really only works if 
`bmp` has been loaded or created specifically with an alpha channel. What I 
want to know is if a given path-string has such properties, not if the bitmap 
object does.

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[racket-users] Re: Racket Shell

2016-08-20 Thread Lehi Toskin
This is super neat. I'd be interested in using a Racket-based shell once it 
gets to be more polished.

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[racket-users] Re: with apologies to the surfing bumper sticker.

2016-05-08 Thread Lehi Toskin
> you will sneak off to the bathroom and write a tiny beautiful macro that no 
> one will ever be allowed to see or use.

Sadness

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[racket-users] Re: ispell

2016-02-25 Thread Lehi Toskin
On Thursday, February 25, 2016 at 1:54:42 PM UTC-8, jos.koot wrote:
> Hi,
> 
> Trying to check 
> spelling in DrRacket for a scrbl document, I get the message that aspell or 
> ispell cannot be found. Where can I find it? How to install 
> it?
> 
> I work with Windows 
> 7. 
> 
> Thanks, 
> Jos

aspell is a dictionary library that you can download over here: 
http://aspell.net/win32/

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[racket-users] Re: Call for Google Summer of Code Project Suggestions

2016-02-11 Thread Lehi Toskin
On Thursday, February 11, 2016 at 12:51:00 PM UTC-8, Leif Andersen wrote:
> Hello All,
> 
> We are in the process of submitting a Google Summer of Code
> application for Racket. If you have an idea for a self contained
> project that would benefit the community, please let us know. These
> should be projects that a student would be able to complete in about 3
> months.
> 
> We will curate a subset of these ideas, and put together a detailed
> list of potential projects for students.
> 
> Here are some example suggestions from Asumu:
>   * Type-based auto-completion
>   * Memory profiler
>   * Video editing DSL (#lang nlve)
>   * Automatically generate typed wrappers from tests or contracts
>   * Improve DrRacket vim plugin
>   * TOTP two-factor auth library for Racket-based websites
>   * Command-line REPL debugger
>   * Pure Racket line editing for XREPL with paren-matching and
> other goodies
>   * RRB-Trees built into the Racket VM as an alternative to immutable
> vectors
> 
> As well as some suggestions we have from previous years:
> https://github.com/racket/racket/wiki/SoC-Ideas-2012
> 
> Thank you.
> 
> ~Leif Andersen

All of those look amazing, but if I had to make a suggestion of my own, then a 
git plugin for DrRacket would be nice. Something that allow me to sign commits, 
push, pull, etc. all from DrRacket instead of having to open a terminal for 
that functionality.

That being said, pretty much anything in that list from Asumu would be nice, 
with a special mention for the real-time collaboration plugin for DrRacket 
mentioned in the SOC Ideas page.

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[racket-users] Re: Playing sound

2016-01-27 Thread Lehi Toskin
On Wednesday, January 27, 2016 at 11:41:06 AM UTC-8, Jordan Johnson wrote:
> Hi all,
> 
> 
> I'm looking at audio again because I have a student doing a game project for 
> which he wants background music to play — and I'm feeling some trepidation 
> based on most of the audio-tagged packages on pkgs.racket-lang.org showing 
> some test failures or other build problems.
> 
> 
> His minimal goal is to loop a sound file from the start of play until the 
> end, and have it work on Windows and Mac. We tried play-sound from 
> racket/gui/base, and it almost fits: we just need to be able to kill the 
> sound at the end, and it seems that killing the sound-playing thread is not 
> enough. Is there a way to stop the audio?
> 
> 
> His ideal goal is to be able to play different background music depending on 
> the room the player is in. AFAICT this is beyond play-sound's ability, at 
> least if he wants to do smooth transitions. Is there another library which 
> would facilitate cross-fading from one audio file to another?
> 
> 
> More generally, what are currently our best tools for incorporating music and 
> sound effects into Racket games?
> 
> Best,
> Jordan

This may be larger than the scope of the project, but there is an audio library 
called RSound, which uses PortAudio (via a wrapper). It's more robust and I'm 
certain there are things you could do with it that you couldn't with play-sound.

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[racket-users] Display Animated GIFs

2015-12-06 Thread Lehi Toskin
Hi, I'm trying to figure out the best way to display an animated gif inside a 
canvas. I had attempted this before, but the only way I could figure out how to 
display the animation was by picking apart the gif, frame by frame, and then 
displaying the animation by a loop inside the canvas' paint-callback. I looked 
through the Racket Users archives and I found this thread 
https://groups.google.com/forum/#!searchin/racket-users/gif/racket-users/k2mfykyAaWY/CHUlu1cB9BUJ
 where it talks about how there aren't any plans to support animated gifs, 
though there may be in the future.

That thread was from 5 years ago. Is this still the case? I'd very much prefer 
a more native way of displaying animation in gifs than the very painful hack I 
made a few months ago (not to mention I took apart the gif in GIMP before 
turning to Racket for the animation itself).

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[racket-users] Windows show-scrollbars forcing call to on-paint

2015-12-02 Thread Lehi Toskin
Short version:
show-scrollbars seems to be forcing my canvas object to call on-paint. The 
problem is that on-paint contains calls to show-scrollbars and thus creates an 
infinite loop.

Long version:
I have a canvas that displays an image and will enable or disable the 
scrollbars based on how large the image is in relation to the current 
dimensions of the canvas. On Linux and OSX the code operates as intended and 
the user may resize the frame as much as desired with the scrollbars appearing 
or disappearing when appropriate. On Windows, however, simply getting the 
canvas to display the image will trap itself inside an infinite loop because 
the calls to show-scrollbars is making the canvas call on-paint. I have 
narrowed it down to specifically that procedure because removing those calls 
from on-paint allows the canvas to display the image properly.


I have tried all kinds of combinations of suspend- and resume-flush but nothing 
seems to change this behavior. For reference, the relevant lines may be found 
here: https://github.com/lehitoskin/ivy/blob/master/base.rkt#L264-L310

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[racket-users] current-text-keymap-initializer problems in v6.2.1

2015-11-25 Thread Lehi Toskin
I've been messing around with GUI programming and I came across 
current-text-keymap-initializer which, according to the documentation, may 
accept a procedure that itself takes a single parameter (a keymap%).

Now, I've tried to invoke this via
`(current-text-keymap-initializer (lambda (keymap) (void)))`
but then I get this error:

`../../usr/share/racket/collects/racket/private/class-internal.rkt:3415:0: 
init-editor-keymap: arity mismatch;
 the expected number of arguments does not match the given number
  expected: 0
  given: 1
  arguments.:`

Okay, so I guess the procedure actually doesn't need a parameter.

`(current-text-keymap-initializer (λ () (void)))` also gives an error!

`../../usr/share/racket/pkgs/gui-lib/mred/private/editor.rkt:558:2: 
default-text-keymap-initializer: contract violation
  expected: (procedure-arity-includes/c 1)
  given: #`

Now it's breaking contract because it expected a procedure that has a single 
parameter!

Is this a bug in the code or is this a bug in the documentation? Or both!

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[racket-users] Re: Sundials FFI wrapper

2015-10-30 Thread Lehi Toskin
On Thursday, October 22, 2015 at 1:08:57 AM UTC-7, Alexey Cherkaev wrote:
> Hi all,
>  
> I am interested in creating the Racket wrapping for the Sundials numeric 
> library (http://computation.llnl.gov/casc/sundials/main.html). Ivan Raikov 
> did a similar job for Chicken (http://wiki.call-cc.org/eggref/4/sundials). 
> Chicken has quite a different way of dealing with C code compared to Racket, 
> and the wrapper code includes lots of C wrappers prior creating Scheme 
> wrappers…
>  
> Is there anybody who has done something similar in Racket for other C 
> libraries? And who will be interested in creating the wrapper for Sundials? 
> (PS. I don’t feel my expertise are up to scratch to tackle it on my own…)
>  
> Regards,
> Alexey
>  

If you're looking for an example I've made a wrapper before you can look at for 
ideas: https://github.com/lehitoskin/libtoxcore-racket

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[racket-users] Re: typed/racket + rackunit = trouble

2015-09-17 Thread Lehi Toskin
On Tuesday, September 15, 2015 at 7:06:40 PM UTC-7, Anthony Carrico wrote:
> Unfortunately, rackunit doesn't mix that well with typed/racket (see
> problem reports 15153, 15143). I guess this is because of the
> typed/untyped boundary.
> 
> The good news is that it is fairly easy to work around the issues, for
> example, you can do a check in the argument to check-true or check-false
> so the computation stays in typed/racket.
> 
> I don't think I have an actual question for the list. I'm just
> mentioning it here because I don't remember reading anywhere that
> testing can be an issue in typed/racket. Discuss?
> 
> -- 
> Anthony Carrico

I've come across this before and I have mentioned this topic in IRC if not this 
list. There are a few macros in the rackunit that cannot and do not work well 
with typed/racket. The macros would have to be rewritten before they could play 
nice and as far as I know those aren't a priority.

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [racket-users] racket on android (Was: Racket modules in R6RS?)

2015-06-12 Thread Lehi Toskin
On Thursday, June 11, 2015 at 7:12:48 PM UTC-7, neil wrote:
 Matthew Flatt wrote on 06/11/2015 10:00 PM:
  Android via NDK is a supported platform.
 
 Matthew, that's great.  Thank you.
 
 Anyone implemented `racket/gui` for Android with this, or otherwise 
 hooked up things so that the Racket program can drive a UI on Android?
 
 Neil V.

Racket GUI programming on Android? This must be(come) a thing!

-- 
You received this message because you are subscribed to the Google Groups 
Racket Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [racket-users] typed/rackunit and test-case

2015-05-25 Thread Lehi Toskin
That's unfortunate. I'll wait until the next release and then try out test-case 
 co.

On Sunday, May 24, 2015 at 11:03:45 PM UTC-7, Alexis King wrote:
 Since test-case is a macro, require/typed won't help, and unfortunately, 
 test-case doesn't work in Racket v6.1.1 (or earlier). It will be fixed in the 
 upcoming release, or you can download a snapshot build from here: 
 http://www.cs.utah.edu/plt/snapshots/
 
 Otherwise, I don't think there's much you can do besides avoid test-case in 
 earlier Racket versions.
 

-- 
You received this message because you are subscribed to the Google Groups 
Racket Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[racket-users] Re: exn-string

2015-05-25 Thread Lehi Toskin
If we have a racket/exn module, would the other exn structs then be placed 
there as well?

-- 
You received this message because you are subscribed to the Google Groups 
Racket Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[racket-users] typed/rackunit and test-case

2015-05-24 Thread Lehi Toskin
When using typed/rackunit, I find that using test-case doesn't seem to want to 
work properly. The code

(test-case foo (check-true (string=? foo foo)))

gives me several Type Checker errors that give me information I don't know what 
to do with.

Is this something I need to require/typed for?

-- 
You received this message because you are subscribed to the Google Groups 
Racket Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.