[racket-users] Re: Hidden a list
I followed the recommendation with hash tables and used a struct to wrapping the data. I will check this code and will look the efficiency. Thanks for the time. Héctor. -- 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: Hidden a list
I understand that struct is not collections of key-value, in the code appear in this way for reference, even label. The problem that I have is in the macro set-s in the formation of the accesors to fields of structure. This generates (set-usuario-key! ..) instead of (set-usuario-nom! ..) into with-syntax. -- 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: Hidden a list
Thanks, This start because I need a syntax like the next: (define u (make-s user (nom ape sexo)) (set-s u ((nom "nom" ) (ape "ape"))) (get-s u 'nom) u ; --> '((nom "nom") (ape "ape") (sexo "")) And I start using lists but I can't hidden. From there I changed to a struct but now I get this problem. set-usuario-key!: unbound identifier in module in: set-usuario-key! How I can solve that? -- 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. user.rkt Description: Binary data
[racket-users] Hidden a list
Hello guys, There any way to hide the contents of a list as does the structure? (define lst (list "abc" 123 (+ 12 32))) lst ; --> '("abc" 123 44) something like # (define-struct user (nom ape)) (define u (make-user "nom" "ape")) user ; --> # u ; --> # -- 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] regexp-match? problem
Hey, I have this problem, I want filter values from DPTO1 to DPTO99 (DPTO is a word with letter O not zero) but I don't get that. with #rx mark error/false with DPTO2, DPTO3, etc but with DPTO111, DPTO100 is good. with #px all is true for both DPTO222 or DPTO12. How filter this range correctly. Thanks. (define dpto "DPTO2") ; legal values are from DPTO1 to DPTO99 (if (regexp-match? #rx"DPTO[1-9]{1,2}" dpto) (display "true dpto") (display "false dpto")) -- 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] Test request
Hey guys I'm proving this app and I will be grateful if can help me with new ideas or evaluate it. I create a serie of videos that show your functions and objetive. Exist a survey that you can respond, it is in http://goo.gl/forms/jsNIgRvdr8 together with the videos. Not is problem if you respond in other language. The app is in 52.35.22.103:8000 and the results you can see in 52.35.22.103:8900. Thanks in advance. Cheers, Héctor -- 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] Independent data structures
Hey guys, I have a big problem, when I started this project I completely ignored split the data for each user, and the results of that is the manage of one user for time, really bad. Now I try resolve this and all ideas result very dificult (at least in code). I can resolve a part of this problem, the storage in disk, creating one file for each user with your data, but this don't fix the problem of keep those data independent from the other users in memory. (a second user can modify the data of the first user and viceversa under the same data structure). I think in threads, each with its own data structure, but I don't know if this is possible and how make that. The project is https://github.com/hmcab/anauj and the data structures to change are (vcamposg , vcamposg-td , vcrudg , vcrudg-per). Any other idea? I need only new ideas and examples. Thanks. -- 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 execution
Hi Asumu, Thanks for reply, the project is in https://github.com/hmcab/anauj.git , and the server run from generacion-datos/codegen.rkt on the bottom the file. Read the readme file before the execution. At this time I have the application on amazon server to prove it, but every time that I leave the ssh connection, and so, the application is executed with racket -t codegen.rkt &, this falls (no any access from the browser is achieved), but if I enter to the amazon server with ssh again, the process is still there. -- 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 execution
El jueves, 3 de diciembre de 2015, 21:22:01 (UTC-5), Héctor Mc escribió: Finally I could create a subsystem initialization script in /etc/init.d and the symbolic link with update-rc.d, and now this work. Thanks a everyone for your time. -- 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 execution
Hey guys! I'm trying execute a web application in background or (like daemon ej. apache/httpd) in this way racket -t webapp.rkt or racket -t webapp.rkt & , but none of them work. I also tried with raco exe codegen.rkt and then ./codegen & but without good results. Is something with the configuration of server? Thanks. -- 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] little problem with comma (unquote)
Hi for all I'm trying generate a function from other function, in this case is a little part of it (expression) that need print a comma within it. In the example show below need print the comma before (embed/url ,f). that is say ,(embed/url insertar-empleado) but is something I can't to make. I have this. #lang racket (define f 'insertar-empleado) (define exp `(embed/url ,f)) (define (make-func) (define str `(define (func) ,exp)) str) (display (make-func)) and result this (define (func) (embed/url insertar-empleado)) and I need (define (func) ,(embed/url insertar-empleado)). I treated with (' quote) (`quasiquote) and (, unquote) but no reach the result. This is all, thanks in advance for read and 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.
[racket-users] Re: little problem with comma (unquote)
Perfect, work. Thanks. -- 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: Code Generation
Work! thanks. -- 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: Code Generation
El martes, 14 de abril de 2015, 18:08:19 (UTC-5), Héctor Mc escribió: Hey community In advance sorry for the english, don't speak the language. I'm student and begin to work the thesis and chose to do it in racket. It's about a code generator of web aplications (prototype). The problem that I have is when want write/convert generated code in string for after save in file .rkt. For example: With the function make-page (below) I generated a function that make a web page, and this page have a form with several divs. but when I see the result in string have two problems that not allow run in the web (the configs of server and other functions are made). #lang racket (define (make-page npg ntb) (define title (symbol-string npg)) (define page `(define (,npg args request) (local [(define (response-generator embed/url) `(html (head (title ,,title)) (body (form ,,@(form-render-real ntb)) ))) ] (send/suspend/dispatch response-generator ;(display (format ~s page))) page) (define (form-render-real ntb) (list `(div ((id iddiv)) (input ((type text) (id idinput) (name idinput `(div ((id iddiv2)) (input ((type text) (id idinput2) (name idinput2) (define page (string-symbol empven)) (define table employed) (make-page page table) The two problems: This is the result of execute the code of above. '(define (empven args request) (local ((define (response-generator embed/url) `(html (head (title ,empven)) ; - this comma problem 1. (body (form (unquote ; -- this unquote problem 2. (div ((id iddiv)) (input ((type text) (id idinput) (name idinput (div ((id iddiv2)) (input ((type text) (id idinput2) (name idinput2)) (send/suspend/dispatch response-generator))) This two problems not allow execute code in web. The main idea is save this result in a file .rkt can execute and see it in the web browser. I know save in file, the problem is convert to string. without (two commas) in code ,,title and ,,@(form-render-real ntb)) I don't obtain the result that I want. (expected) Before, I had something similar in a macro, but for simplicity I decided pass it to a normal function, but the problem is the same. the macro (ungly macro, I think) is: (define-syntax (make-page stx) (syntax-case stx () [(_ npg ntb) (if (and (identifier? #'npg) (identifier? #'ntb)) #'`(define (,npg args request) (local [(define (response-generator embed/url) (response/xexpr `(html (head (title ,,(symbol-string npg))) (body (form ,,@(form-render-real ntb)) ] (send/suspend/dispatch response-generator))) (raise-syntax-error #f No es un identificador. stx #'ntb)) ])) ... (make-page npg ntb) I apreciate any help, thanks in advance again. Work! thanks. -- 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] Code Generation
Hey community In advance sorry for the english, don't speak the language. I'm student and begin to work the thesis and chose to do it in racket. It's about a code generator of web aplications (prototype). The problem that I have is when want write/convert generated code in string for after save in file .rkt. For example: With the function make-page (below) I generated a function that make a web page, and this page have a form with several divs. but when I see the result in string have two problems that not allow run in the web (the configs of server and other functions are made). #lang racket (define (make-page npg ntb) (define title (symbol-string npg)) (define page `(define (,npg args request) (local [(define (response-generator embed/url) `(html (head (title ,,title)) (body (form ,,@(form-render-real ntb)) ))) ] (send/suspend/dispatch response-generator ;(display (format ~s page))) page) (define (form-render-real ntb) (list `(div ((id iddiv)) (input ((type text) (id idinput) (name idinput `(div ((id iddiv2)) (input ((type text) (id idinput2) (name idinput2) (define page (string-symbol empven)) (define table employed) (make-page page table) The two problems: This is the result of execute the code of above. '(define (empven args request) (local ((define (response-generator embed/url) `(html (head (title ,empven)) ; - this comma problem 1. (body (form (unquote ; -- this unquote problem 2. (div ((id iddiv)) (input ((type text) (id idinput) (name idinput (div ((id iddiv2)) (input ((type text) (id idinput2) (name idinput2)) (send/suspend/dispatch response-generator))) This two problems not allow execute code in web. The main idea is save this result in a file .rkt can execute and see it in the web browser. I know save in file, the problem is convert to string. without (two commas) in code ,,title and ,,@(form-render-real ntb)) I don't obtain the result that I want. (expected) Before, I had something similar in a macro, but for simplicity I decided pass it to a normal function, but the problem is the same. the macro (ungly macro, I think) is: (define-syntax (make-page stx) (syntax-case stx () [(_ npg ntb) (if (and (identifier? #'npg) (identifier? #'ntb)) #'`(define (,npg args request) (local [(define (response-generator embed/url) (response/xexpr `(html (head (title ,,(symbol-string npg))) (body (form ,,@(form-render-real ntb)) ] (send/suspend/dispatch response-generator))) (raise-syntax-error #f No es un identificador. stx #'ntb)) ])) ... (make-page npg ntb) I apreciate any help, thanks in advance again. -- 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.