Re: [racket-dev] [plt] Push #28781: master branch updated

2014-05-23 Thread Jay McCarthy

> On May 23, 2014, at 3:59 PM, Greg Hendershott  
> wrote:
> 
> Feedback from a relatively naive Racket user:
> 
> 1.
> 
>> +External effects are exemplified by input/output (or I/O). I/O is the
>> +action of a function such as @racket[tcp-connect], which communicates
>> +with the operating system to send network packets outside of the
>> +machine running Racket via the electromagnetic spectrum.
> 
> It might be OK to omit "via the electromagnetic spectrum". Yes I'm
> aware of RFC 1149. But still.  :)
> 

Yes, maybe it's too cute. I really wanted to emphasize its irreversibility. 


> 
> 2.
> 
>> +In particular, if module A is shared by the phase 1 portion of modules
>> +X and Y, then any internal effects while X is compiled are not visible
>> +during the compilation of Y, regardless of whether X and Y are
>> +compiled during the same Racket runtime system.
> 
> Was "system" supposed to be "session"?
> 

No. Each time you start Racket you get a NEW rts. 

> 
> 3. The practical example goes some way toward explaining why this
> matters. But only part way (for me). Probably some real-life situation
> motivated this. Knowing that backstory might help. (If you think that
> tale doesn't fit and/or belong in the reference docs, maybe it would
> make a great blog post?)

Yes. One of Matthew's papers has some good examples. 

Jay
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


Re: [racket-dev] [plt] Push #28781: master branch updated

2014-05-23 Thread Greg Hendershott
Feedback from a relatively naive Racket user:

1.

> +External effects are exemplified by input/output (or I/O). I/O is the
> +action of a function such as @racket[tcp-connect], which communicates
> +with the operating system to send network packets outside of the
> +machine running Racket via the electromagnetic spectrum.

It might be OK to omit "via the electromagnetic spectrum". Yes I'm
aware of RFC 1149. But still.  :)


2.

> +In particular, if module A is shared by the phase 1 portion of modules
> +X and Y, then any internal effects while X is compiled are not visible
> +during the compilation of Y, regardless of whether X and Y are
> +compiled during the same Racket runtime system.

Was "system" supposed to be "session"?


3. The practical example goes some way toward explaining why this
matters. But only part way (for me). Probably some real-life situation
motivated this. Knowing that backstory might help. (If you think that
tale doesn't fit and/or belong in the reference docs, maybe it would
make a great blog post?)
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


Re: [racket-dev] Easy disassembly of JIT-compiled procedures

2014-05-23 Thread Greg Hendershott
> Testing of the new code (which is on by default) on platforms other
> than x86-64 Linux would be greatly appreciated.

I tried and it works great on OS X, for untyped Racket.


As for Typed Racket, I tried:

#lang typed/racket/base

(: f (Number -> Number))
(define (f x)
  (+ x 10))

(require/typed disassemble
  [disassemble (Procedure [#:program Boolean] -> Any)])
(disassemble f)

But it complains:

; disassemble: contract violation
;   expected: non-primitive procedure
;   given: #
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


Re: [racket-dev] Easy disassembly of JIT-compiled procedures

2014-05-23 Thread Sam Tobin-Hochstadt
Yes, as it says in the README, it requires a very recent version of
Racket. I should add that version requirement to the info file, but I
had forgotten the syntax when I was editing the file.

Sam

On Fri, May 23, 2014 at 2:02 PM, Roman Klochkov  wrote:
> And now it is broken in 6.0.1
>
>> (require disassemble)
> . . ..\..\..\..\Program Files\Racket\collects\ffi\unsafe.rkt:198:2: ffi-obj:
> couldn't get "scheme_jit_find_code_end" from #f
>
> I installed it from pkgs.racket-lang.org
> Maybe should be something like #ifdef or depend on another version of Racket
> (now it depends upon Racket6.0.0.4)
>
> Wed, 21 May 2014 19:50:05 -0400 от Sam Tobin-Hochstadt
> :
>
> On Wed, May 21, 2014 at 6:12 PM, Neil Toronto 
> wrote:
>> On 05/21/2014 02:09 PM, Sam Tobin-Hochstadt wrote:
>>>
>>> Racketeers,
>>>
>>> Thanks to some improvements from Matthew, my `disassemble` package is
>>> now much easier to use.
>>>
>>> [samth@punge:~/sw/disassemble (master) plt] racket
>>> Welcome to Racket v6.0.1.10.

 (require disassemble)
 (define (const x) 1)
 (disassemble const)
>>>
>>>  8943FC mov [ebx-0x4],eax
>>> 0003 83C3FC add ebx,byte -0x4
>>> 0006 B80300 mov eax,0x3
>>> 000B 83C41C add esp,byte +0x1c
>>> 000E 5F pop edi
>>> 000F 5E pop esi
>>> 0010 5B pop ebx
>>> 0011 5D pop ebp
>>> 0012 C3 ret


>>
>> That's crazy awesome. What were the improvements?
>
> First, Racket now tells you the end of the machine code for a jitted
> procedure with `scheme_jit_find_code_end` (so messing about with
> guessing the size is no longer needed) and it also can JIT on-demand
> (so you don't have to call a function before disassembling it) with
> `scheme_jit_now`.
>
> Sam
> _
>   Racket Developers list:
>   http://lists.racket-lang.org/dev
>
>
>
> --
> Roman Klochkov

_
  Racket Developers list:
  http://lists.racket-lang.org/dev


Re: [racket-dev] Easy disassembly of JIT-compiled procedures

2014-05-23 Thread Roman Klochkov
 And now it is broken in 6.0.1

> (require disassemble)
. . ..\..\..\..\Program Files\Racket\collects\ffi\unsafe.rkt:198:2: ffi-obj: 
couldn't get "scheme_jit_find_code_end" from #f 

I installed it from pkgs.racket-lang.org 
Maybe should be something like #ifdef or depend on another version of Racket 
(now it depends upon Racket6.0.0.4)

Wed, 21 May 2014 19:50:05 -0400 от Sam Tobin-Hochstadt :
>On Wed, May 21, 2014 at 6:12 PM, Neil Toronto < neil.toro...@gmail.com > wrote:
>> On 05/21/2014 02:09 PM, Sam Tobin-Hochstadt wrote:
>>>
>>> Racketeers,
>>>
>>> Thanks to some improvements from Matthew, my `disassemble` package is
>>> now much easier to use.
>>>
>>> [samth@punge:~/sw/disassemble (master) plt] racket
>>> Welcome to Racket v6.0.1.10.

 (require disassemble)
 (define (const x) 1)
 (disassemble const)
>>>
>>>   8943FCmov [ebx-0x4],eax
>>> 0003  83C3FCadd ebx,byte -0x4
>>> 0006  B80300mov eax,0x3
>>> 000B  83C41Cadd esp,byte +0x1c
>>> 000E  5Fpop edi
>>> 000F  5Epop esi
>>> 0010  5Bpop ebx
>>> 0011  5Dpop ebp
>>> 0012  C3ret


>>
>> That's crazy awesome. What were the improvements?
>
>First, Racket now tells you the end of the machine code for a jitted
>procedure with `scheme_jit_find_code_end` (so messing about with
>guessing the size is no longer needed) and it also can JIT on-demand
>(so you don't have to call a function before disassembling it) with
>`scheme_jit_now`.
>
>Sam
>_
>  Racket Developers list:
>   http://lists.racket-lang.org/dev


-- 
Roman Klochkov
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


[racket-dev] Invitation to connect on LinkedIn

2014-05-23 Thread Suminda Dharmasena, BSc, PGDip, MACM, MIEEE
LinkedIn




I'd like to add you to my professional network on LinkedIn.

- Suminda

Suminda Dharmasena, BSc, PGDip, MACM, MIEEE
CEO at Sakrio
Saudi Arabia

Confirm that you know Suminda Dharmasena, BSc, PGDip, MACM, MIEEE:
https://www.linkedin.com/e/-pv77z4-hvj7840v-54/isd/5875515390657839104/v5WAYBgo/?hs=false&tok=3t9SS8U1o0g6g1

--
You are receiving Invitation to Connect emails. Click to unsubscribe:
http://www.linkedin.com/e/-pv77z4-hvj7840v-54/hUgLcVbt8urKH6fdyT_As4-ZDw78nZm/goo/dev%40racket-lang%2Eorg/20061/I7129516262_1/?hs=false&tok=0YFQiqzzI0g6g1

(c) 2012 LinkedIn Corporation. 2029 Stierlin Ct, Mountain View, CA 94043, USA.


  
_
  Racket Developers list:
  http://lists.racket-lang.org/dev