[racket-users] ACM/SPEC ICPE 2018: Call for Contributions

2017-06-25 Thread icpeconf
Call for Contributions ICPE 2018 9th ACM/SPEC International Conference on Performance Engin

[racket-users] Re: Removing undocumented exports of rackunit/text-ui

2017-06-25 Thread Jack Firth
On Monday, June 12, 2017 at 11:55:31 AM UTC-7, Jack Firth wrote: > The rackunit/text-ui module[1] provides `run-tests` along with a handful of > other random undocumented functions with unclear purposes such as > `display-ticker`. I have a PR to rackunit open[2] that removes the > undocumented e

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 fon

[racket-users] Re: inspecting a table error 'error 'query: multiple statements given'

2017-06-25 Thread Alexander McLin
FYI, the misleading "multiple statements given" error has been fixed in the racket master branch and correct syntax error message is now being raised. -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop recei

[racket-users] Re: Checking if two lists contain a word

2017-06-25 Thread Vityou
Try taking a look at the `and` function: https://docs.racket-lang.org/reference/if.html#%28form._%28%28lib._racket%2Fprivate%2Fletstx-scheme..rkt%29._and%29%29 On Sunday, June 25, 2017 at 11:40:08 AM UTC-6, philipp.t...@gmail.com wrote: > Hello its me again, > > I have the task to make a funciti

Re: [racket-users] Re: I can translate a word but how can I translate a setence with drrakket

2017-06-25 Thread Matthias Felleisen
> On Jun 25, 2017, at 4:28 PM, Philip McGrath wrote: > > At this point it is mostly a question of how restrictive your teacher wishes > to be by requiring that you implement this as a single function. If you are > using full Racket, it is possible to define a helper function inside of a > lar

[racket-users] Re: threading macros

2017-06-25 Thread Jack Firth
If you have a chain of single-argument functions and you want to do something side-effectful in the middle of the chain with just the input at that point in the chain, you can make a function that converts a void-returning function into a function that returns its argument: (define ((side-effec

Re: [racket-users] Re: I can translate a word but how can I translate a setence with drrakket

2017-06-25 Thread Philip McGrath
At this point it is mostly a question of how restrictive your teacher wishes to be by requiring that you implement this as a single function. If you are using full Racket, it is possible to define a helper function inside of a larger function. Here is the most direct way to translate your existing

[racket-users] Re: I can translate a word but how can I translate a setence with drrakket

2017-06-25 Thread philipp . thiess1999
Thanks guys I got a solution! #lang racket (define *lex* '((catgato katze) (dog perro hund) (eats come frisst) (jumps salte springt) (the el die))) (define (translator wort lexikon sprache) (cond ((null? lexikon) '(Wort wurde nicht gefunden)) ((or (equa

Re: [racket-users] DrRacket Font Selection

2017-06-25 Thread Robby Findler
Oh, looking at the code, I can see how that could happen if something has gone wrong with the callbacks in the GUI. Take a look at drracket/private/font, and see the function `force-cache`, roughly lines 71-86. That function is supposed to be called, but I guess some callbacks aren't firing for you

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 fro

Re: [racket-users] threading macros

2017-06-25 Thread Alexis King
As written, the simple answer to your question is to use begin0 or begin, depending on if you are using ~> or ~>>. > (~> 3 (begin0 (displayln "hi!")) (* 2)) hi! 6 But as Greg mentions, this is not very useful, and it probably isn’t what you want, since the evaluated expression can onl

Re: [racket-users] Re: I can translate a word but how can I translate a setence with drrakket

2017-06-25 Thread Philip McGrath
You will probably find that you are more likely to get help on this list (and to learn from it) if you explain what steps you've tried and where you're getting stuck. You already know how to translate one word. As Matthias has shown you, now you need to use the same steps to translate every word i

Re: [racket-users] DrRacket Font Selection

2017-06-25 Thread Robby Findler
DrRacket's font configuration is the first pane in the preferences dialog; you will probably find it at the bottom of the Edit menu, I guess? If that wasn't where you were looking when you were talking about DrRacket's decision making earlier, can you elaborate please? Robby On Sun, Jun 25, 201

Re: [racket-users] noob question: generic interfaces & classes

2017-06-25 Thread Alex Knauth
> On Jun 25, 2017, at 12:25 PM, Matthew Butterick wrote: > > How does one attach a generic interface to a class? > > `class*` allows one to attach an `interface` [2] (in the class sense of that > term, which I understand is separate from that of "generic interface"). > > Then the docs for `i

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

Re: [racket-users] Re: threading macros

2017-06-25 Thread Greg Hendershott
This might not be a good fit for threading macros. If you need to calculate some extra, intermediate values, I definitely wouldn't recommend `set!`-ing them on the side in a threading macro (if that's what you had in mind). Threading macros produce a single value. If you need to produce multiple

[racket-users] Re: I can translate a word but how can I translate a setence with drrakket

2017-06-25 Thread philipp . thiess1999
Thanks for all the answers but I have to say that it has to be in one function and that I can only use this tools (https://pastebin.com/en3E4aTA). I tried solving this for hours so please help me. -- You received this message because you are subscribed to the Google Groups "Racket Users" group

[racket-users] Checking if two lists contain a word

2017-06-25 Thread philipp . thiess1999
Hello its me again, I have the task to make a funcition who checks if two lists contain a word. I made a function which does that with one lst but I dont find a way to do it with two lists. There must be some easy trick but I dont find it. The function has to look like this: (test2 word list1 l

[racket-users] noob question: generic interfaces & classes

2017-06-25 Thread Matthew Butterick
How does one attach a generic interface to a class? `class*` allows one to attach an `interface` [2] (in the class sense of that term, which I understand is separate from that of "generic interface"). Then the docs for `interface*` show an example attaching the `prop:custom-write` property. [3

[racket-users] Re: threading macros

2017-06-25 Thread Sanjeev Sharma
The simplest solution occurred to me after a few minutes - a separate function that ignores the first value (or the last with ~>> ) But I'm still wondering if there's a provision for this in the macro. -- You received this message because you are subscribed to the Google Groups "Racket Users

[racket-users] threading macros

2017-06-25 Thread Sanjeev Sharma
is there a way to do a calculation in the middle of the chain that takes no arguments? In other words, exempt some operations in the chain from taking any arguments. Suppose one's doing a calculation of interest earned on an investment and one is threading a running balance through the chain,

Re: [racket-users] I can translate a word but how can I translate a setence with drrakket

2017-06-25 Thread Matthias Felleisen
I think you want this: #lang racket (define *lex* '((cat gato katze) (dog perro hund) (eats come frisst) (jumps salte springt) (the el die))) ;; I also took the liberty of cleaning up your original code, ;; using full Racket because it is what your teacher/

RE: [racket-users] I can translate a word but how can I translate a setence with drrakket

2017-06-25 Thread Jos Koot
Surely this is homework. I am not giving you all detauils, just some hints. First of all: Look in HtDP. Your translator works for single words. Let translate-sentence be the procedure for translating a list of words. Following HtDP it can look like: (define (translate-sentence sentence lexicon sp

[racket-users] I can translate a word but how can I translate a setence with drrakket

2017-06-25 Thread philipp . thiess1999
Hello today I made a translator for drRakket cause its a task of my teacher. I did it for one word but now I have to make it with a whole setence. I know I have to work with cons somehow but I just dont get how to make it. My teacher doesnt understand it himself (he uses a pdf which gives all

Re: [racket-users] DrRacket Font Selection

2017-06-25 Thread Robby Findler
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 On Sun, Jun 25, 2017 at 12:34 AM, Lehi Toskin wrote: > At some point DrRacket decided it didn't want to use any font other