[racket-users] racket virtual machine

2015-06-03 Thread Neil Van Dyke
How hard is it to implement the Racket virtual machine (no JIT) for a single target architecture one knows? Say, is this a one-weekend task, or a one-month task? Neil V. -- You received this message because you are subscribed to the Google Groups Racket Users group. To unsubscribe from this

Re: [racket-users] racket virtual machine

2015-06-03 Thread Jens Axel Søgaard
Depends. If you count all the primitives - then one-month won't be enough. The actual operations of the virtual machine are certainly doable in a reasonable amount of time. A Racket VM written in Racket: https://github.com/soegaard/meta/blob/master/runtime/racket-eval.rkt (submodules not

[racket-users] Re: Removing duplicates from a list while maintaining order

2015-06-03 Thread Prabhakar Ragde
This is a homework question of mine (though I don't think the OP is doing homework for a course for credit; I'd be curious to know where he found it). I usually state the restrictions on 'reverse' and 'remove', but not 'member?'. The restriction on 'reverse' is so that students don't write one

[racket-users] terminal emulator

2015-06-03 Thread William G Hatch
Hello racketeers, I'm pretty new to racket, so to get some experience with it I've been writing a terminal emulator. It's coming along nicely (it is one control code away from being able to nicely run vim), and is at https://github.com/willghatch/rackterm for your browsing pleasure. I have

Re: [racket-users] racket virtual machine

2015-06-03 Thread Raoul Duke
Evil question: Has anybody ever looked at how the bytecode could be interpreted on another VM e.g. JVM? -- 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

Re: [racket-users] Parallelism / atomic?

2015-06-03 Thread Robby Findler
Racket threads are not cooperative multitasking. There are no explicit yield points. The runtime system still schedules the threads independently, but there is only ever at most one running at a time. Racket's threads are designed to support concurrency (ie a particular kind of non-determinism

[racket-users] Re: Removing duplicates from a list while maintaining order

2015-06-03 Thread mazert
Le 03/06/2015 07:25, Paul Bian a écrit : Hi all, one function to remove duplicates from the left, i.e. 1 2 1 3 2 4 5 - 1 2 3 4 5 and one from the right. i.e. 1 2 1 3 2 4 5 - 1 3 2 4 5 Hello, For the first function, I think you can't do it without a local define or by adding a second

Re: [racket-users] Parallelism / atomic?

2015-06-03 Thread Michael Tiedtke
Thank you! The set! primitive is atomic - that's good. Futures and Places both are interesting concepts with implementations and documentation. But what if I want to try my own model? Let's say, for example, tying true parallelism to objects (by using environments, a special send and threads in

Re: [racket-users] Parallelism / atomic?

2015-06-03 Thread Robby Findler
On Wed, Jun 3, 2015 at 9:18 AM, Michael Tiedtke michael.tied...@o2online.de wrote: Thank you! The set! primitive is atomic - that's good. Just to be clear: when you are using futures with set!, you get the lower-level guarantees here, which do not include atomicity, indeed not even SC. Futures

Re: [racket-users] Removing duplicates from a list while maintaining order

2015-06-03 Thread Matthias Felleisen
In BSL: ;; - ;; [Listof X] - [Listof X] ;; remove duplicates ... ;; - ;; ... keeping the copy on the left (require racket/base) ;; to import

[racket-users] Re: Removing duplicates from a list while maintaining order

2015-06-03 Thread Paul Bian
Thanks for all the help guys, it really helps with my understanding. So it seems to me there's no real easy way to do this while keeping all the restrictions intact. I sat here thinking about it for quite a while before posting, as I thought I missed some simple solution, as I'm

Re: [racket-users] Strange behavior when writing to a file

2015-06-03 Thread Mark Lee
On Tuesday, June 02, 2015 04:47:33 PM Matthew Flatt wrote: I think you wanted `(and (=` in place of `(or (`. That did it, thanks a lot! Mistake on my part when I wrote it, the string-length check was added afterwords so I used an or statement instead of an and. Regards, Mark -- You received

[racket-users] racket/gui : How to do not get n elements in the desktop taskbar when opening n frame%

2015-06-03 Thread mazert
Hello, When I open multi frame% objects, I automaticaly have multi elements on my desktop taskbar, but I want to have only one element. How I can proceed ? Thanks in advance. -- You received this message because you are subscribed to the Google Groups Racket Users group. To unsubscribe

Re: [racket-users] Re: Removing duplicates from a list while maintaining order

2015-06-03 Thread Matthias Felleisen
Apologies for posting a solution. Since the OP had some code, I thought I'd show him the essence .. throwing in (require racket) as the key to any instructor who'd grade (and care that a student had cheated). -- Matthias On Jun 3, 2015, at 8:07 PM, Prabhakar Ragde wrote: This is a

Re: [racket-users] Re: Removing duplicates from a list while maintaining order

2015-06-03 Thread Michael Tiedtke
Il giorno 03/giu/2015, alle ore 17.04, Paul Bian ha scritto: Thanks for all the help guys, it really helps with my understanding. So it seems to me there's no real easy way to do this while keeping all the restrictions intact. I sat here thinking about it for quite a while before

[racket-users] Re: Removing duplicates from a list while maintaining order

2015-06-03 Thread Paul Bian
I'm not a student, and haven't touched scheme since first year university in 2006. I overheard the problem discussed and wanted to give it a shot. Essentially wondering since I couldn't do it with all the constraints, whether I'm lacking some fundamental understanding. -- You received this

Re: [racket-users] racket virtual machine

2015-06-03 Thread Robby Findler
Just because no one has mentioned it yet: there is a C implementation of the VM (and the primitives) so if you have a C compiler and an OS for that architecture, it shouldn't be too hard. Robby On Wed, Jun 3, 2015 at 5:59 PM, Neil Van Dyke n...@neilvandyke.org wrote: How hard is it to implement