Re: [racket-users] Failed to load module in drracket

2019-08-24 Thread Hong Yang
Hi Robby

Thanks for your explain, is ther any way I can enforce to load the module?
or let me know which code did this?

Best reagrds
Walter

-- 
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/CAATsUuUbWUr9k%3Dny%2BbEZM5ckMWS%3D_NrBzkTJK%2B05HWO6mbADPA%40mail.gmail.com.


Re: [racket-users] Failed to load module in drracket

2019-08-24 Thread Hong Yang
me too of to maillist..:(

Hong Yang  于 2019年8月24日周六 下午11:04写道:

> Hi Robby
>
> The error message just apear after I type (require fluxus/fluxus) in the
> drracket. The mentioned so is an extension of racket for fluxus.
>
> Thanks
> Walter
>
> Robby Findler  于 2019年8月23日周五 下午7:43写道:
>
>> (Sorry, accidentally dropped the list CC.)
>>
>> On Fri, Aug 23, 2019 at 6:42 AM Robby Findler 
>> wrote:
>>
>>> Is this an error you see when you click "run" or does it appear along
>>> the very bottom of the window on its own?
>>>
>>> Robby
>>>
>>> On Fri, Aug 23, 2019 at 5:23 AM Walter Yang  wrote:
>>>
>>>> I'm trying to load a module in drracket:
>>>>
>>>> #lang racket
>>>>
>>>> (require fluxus/fluxus)
>>>>
>>>> I got the following error message:
>>>>
>>>>   default-load-extension-handler: forbidden (execute) access to
>>>> /usr/share/racket/collects/fluxus/compiled/native/x86_64-linux/3m/fluxus-engine_ss.so
>>>>
>>>> But it's OK load in command line racket:
>>>>
>>>> $ racket
>>>> Welcome to Racket v7.4.
>>>> > (require fluxus/fluxus)
>>>> >
>>>>
>>>> Any comments?
>>>>
>>>> Thanks
>>>> Walter
>>>>
>>>> --
>>>> 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/a76162ca-ee89-4d62-be51-e6a81d6adfd3%40googlegroups.com
>>>> <https://groups.google.com/d/msgid/racket-users/a76162ca-ee89-4d62-be51-e6a81d6adfd3%40googlegroups.com?utm_medium=email_source=footer>
>>>> .
>>>>
>>>

-- 
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/CAATsUuUVM91pMAOM9a9n3WJ4NZb0JjMeFk_CwrbyLBNtfL7gUg%40mail.gmail.com.


[racket-users] Re: Racket News - Issue 40

2020-10-20 Thread Hong Yang
Hi Paulo

Good to see another Racket News is coming, and I'm working on issue #3161, 
please help check my last comment in GitHub, any comment is welcome.

After all the feature details clarified, I'll send a pull request for code 
reviewing.

Thanks
yangh
On Tuesday, October 20, 2020 at 8:46:11 PM UTC+8 Paulo Matos wrote:

> Hi all,
>
> What a great weekend, I hope you all enjoyed it as much as I did. Thanks 
> to all of those involved in the organization.
>
> Racket News issue 40 is now here:
> https://racket-news.com/2020/10/racket-news-issue-40.html
>
> Enjoy!
>
> -- 
> Paulo Matos
>

-- 
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/05e0fc3d-426e-4b2f-86b1-3a67f1f29038n%40googlegroups.com.


[racket-users] Memory usage of (port->lines ...) is extreamly high

2020-09-24 Thread Hong Yang
Hi Racketer

I'm trying to load a log file which size is 600MB, then I found the program 
exhausted 3 GB resident memory just for load all the content of it via 
(port->lines...). I do have enough RAM but it looks like some thing went 
wrong here, and I do need to load them all into RAM for my use case so 
(read-line ...) doesn't help me.

Any comment would be preciated.

Here is may programe:

#!/usr/bin/racket
#lang racket

; Load input as list of lines
(define (input-load-lines file-name)
  (if (file-exists? file-name)
  (let* ([input (open-input-file file-name)]
 [lines (port->lines input)])
(close-input-port input)
lines)
  empty))

; Racket 7.8, compile from source code, (none cs mode)
; 100M of log requires 0.5G runtime memory
; 300M of log requires 1.5G runtime memory
; 600M of log requires 3.0G runtime memory
;
; Reference
;   racket/collects/racket/port.rkt :106
;   racket/collects/racket/private/portlines.rkt :11

(define input (input-load-lines "main.log"))

; 214M(VIRT)/101M(RSS) without open any file
(let loop()
  (sleep 5) ; Waiting here so that I can check it via top/ps
  (set! input empty) ; event not help with this line
  (loop))

Thanks
Hong

-- 
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/aab5d58b-19f3-44ce-8f16-add9324120c6n%40googlegroups.com.


[racket-users] Re: Memory usage of (port->lines ...) is extreamly high

2020-09-24 Thread Hong Yang
Update with memory dump log attached.

1. With out (set! input empty), call (collect-garbage) doesn't help
2. Call (set! input empty) and (collect-garbage), memory reduce dramaticly.

; 214M(VIRT)/101M(RSS) without open any file
(let loop()
  (sleep 5)  ; Waiting here so that I can check it via top/ps
  (dump-memory-stats)
  (collect-garbage)
  (set! input empty)  ; Even not help with this line, it works after called 
(collect-garbage) explicity.
  (loop))

On Thursday, September 24, 2020 at 6:14:55 PM UTC+8 Hong Yang wrote:

> Hi Racketer
>
> I'm trying to load a log file which size is 600MB, then I found the 
> program exhausted 3 GB resident memory just for load all the content of it 
> via (port->lines...). I do have enough RAM but it looks like some thing 
> went wrong here, and I do need to load them all into RAM for my use case so 
> (read-line ...) doesn't help me.
>
> Any comment would be preciated.
>
> Here is may programe:
>
> #!/usr/bin/racket
> #lang racket
>
> ; Load input as list of lines
> (define (input-load-lines file-name)
>   (if (file-exists? file-name)
>   (let* ([input (open-input-file file-name)]
>  [lines (port->lines input)])
> (close-input-port input)
> lines)
>   empty))
>
> ; Racket 7.8, compile from source code, (none cs mode)
> ; 100M of log requires 0.5G runtime memory
> ; 300M of log requires 1.5G runtime memory
> ; 600M of log requires 3.0G runtime memory
> ;
> ; Reference
> ;   racket/collects/racket/port.rkt :106
> ;   racket/collects/racket/private/portlines.rkt :11
>
> (define input (input-load-lines "main.log"))
>
> ; 214M(VIRT)/101M(RSS) without open any file
> (let loop()
>   (sleep 5) ; Waiting here so that I can check it via top/ps
>   (set! input empty) ; event not help with this line
>   (loop))
>
> Thanks
> Hong
>

-- 
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/07c41b96-87ba-473a-ad0e-0cec71dc4024n%40googlegroups.com.
Begin Dump
Begin Racket3m
   :   3337 106784
:   9088 603240
  :   4798 165528
 :   6005 240200
  :  150961086912
  :744  29760
   :672  16128
 :  7224
:   7251 232032
  :   9774 408728
   : 11352
 : 19608
 :109   4096
 :182   5824
   : 24768
:312  16392
  :762  91440
  :   1083  69312
   :   2800 204656
   :  1 48
   :896  21504
   :  4208
  :657  35264
   :  14350 577272
   :  5240
   :  9432
  : 1019636731640
  :  2 64
  :  3 96
  :2670211   85446752
 : 35   1120
   :   3355 107360
:5317620  170163840
:  1 32
  :  214441922784
   :   1407  33768
  :549 188856
 :276  68448
 :  10061 241464
  :  1   1200
   : 96   3840
:798  63840
:   6938 393864
:   7594 394760
:   4248 269232
   :  132761129824
   :   1732  55424
:169  12168
  :592 181936
:   7047 394632
   :321  17976
 :508  67336
 :  1 48
:  2 64
   :  1 48
   :  1152
  : 30   3832
 : 58   2320
  : 14560
  :  1 48
  : 43   1032
 :  1 48
 :  1 24
  :  1 64
 :219   5256
  :  2 64
:  12494 399808
  :  2192
  : 14   1456
  : 12480
 :  1 32
  :  3 598160
   :  1304
   :  1112
:  1104
:277  22160
:  1 40
:273  24024
  :

Re: [racket-users] Re: Memory usage of (port->lines ...) is extreamly high

2020-09-24 Thread Hong Yang
Thanks Laurent, I tried (in-lines...), and yes, it's memory-efficient, but 
I still curious and concern why (port->lines ...) takes so many memory.

Best regards
Hong

On Thursday, September 24, 2020 at 6:55:10 PM UTC+8 laurent...@gmail.com 
wrote:

> Quick comment: of you don't need to load the whole file but want to parse 
> it line by line, use `in-lines` which is memory-efficient.
>
> On Thu, Sep 24, 2020, 11:46 Hong Yang  wrote:
>
>> Update with memory dump log attached.
>>
>> 1. With out (set! input empty), call (collect-garbage) doesn't help
>> 2. Call (set! input empty) and (collect-garbage), memory reduce 
>> dramaticly.
>>
>> ; 214M(VIRT)/101M(RSS) without open any file
>> (let loop()
>>   (sleep 5)  ; Waiting here so that I can check it via top/ps
>>   (dump-memory-stats)
>>   (collect-garbage)
>>   (set! input empty)  ; Even not help with this line, it works after 
>> called (collect-garbage) explicity.
>>   (loop))
>>
>> On Thursday, September 24, 2020 at 6:14:55 PM UTC+8 Hong Yang wrote:
>>
>>> Hi Racketer
>>>
>>> I'm trying to load a log file which size is 600MB, then I found the 
>>> program exhausted 3 GB resident memory just for load all the content of it 
>>> via (port->lines...). I do have enough RAM but it looks like some thing 
>>> went wrong here, and I do need to load them all into RAM for my use case so 
>>> (read-line ...) doesn't help me.
>>>
>>> Any comment would be preciated.
>>>
>>> Here is may programe:
>>>
>>> #!/usr/bin/racket
>>> #lang racket
>>>
>>> ; Load input as list of lines
>>> (define (input-load-lines file-name)
>>>   (if (file-exists? file-name)
>>>   (let* ([input (open-input-file file-name)]
>>>  [lines (port->lines input)])
>>> (close-input-port input)
>>> lines)
>>>   empty))
>>>
>>> ; Racket 7.8, compile from source code, (none cs mode)
>>> ; 100M of log requires 0.5G runtime memory
>>> ; 300M of log requires 1.5G runtime memory
>>> ; 600M of log requires 3.0G runtime memory
>>> ;
>>> ; Reference
>>> ;   racket/collects/racket/port.rkt :106
>>> ;   racket/collects/racket/private/portlines.rkt :11
>>>
>>> (define input (input-load-lines "main.log"))
>>>
>>> ; 214M(VIRT)/101M(RSS) without open any file
>>> (let loop()
>>>   (sleep 5) ; Waiting here so that I can check it via top/ps
>>>   (set! input empty) ; event not help with this line
>>>   (loop))
>>>
>>> Thanks
>>> Hong
>>>
>> -- 
>> 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.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/racket-users/07c41b96-87ba-473a-ad0e-0cec71dc4024n%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/racket-users/07c41b96-87ba-473a-ad0e-0cec71dc4024n%40googlegroups.com?utm_medium=email_source=footer>
>> .
>>
>

-- 
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/f761c588-da7e-43d4-9b05-b917f64f4b52n%40googlegroups.com.