Re: [racket-users] Layout + styling in racket/gui

2020-07-07 Thread WarGrey Gyoudmon Ju
On Tue, Jul 7, 2020 at 6:18 AM Travis Kiefer wrote: > Jens, > > Thank you for the example links. The spreadsheet example gets closer to > the right direction of a non-trivial example. What's missing from these is > the ability to add styles to the elements... Background colors, gradients, > box s

[racket-users] Re: [racket][scribble] hyperlink problem in generated PDF

2020-06-22 Thread WarGrey Gyoudmon Ju
Sorry, cite links have the same problem too. On Tue, Jun 23, 2020 at 5:27 AM WarGrey Gyoudmon Ju wrote: > Greetings. > > It seems that Scribble generated PDFs have troubles in dealing with > hyperlinks produced by `deftech` and `elemtag`. The anchors of the targets > are not

[racket-users] [racket][scribble] hyperlink problem in generated PDF

2020-06-22 Thread WarGrey Gyoudmon Ju
Greetings. It seems that Scribble generated PDFs have troubles in dealing with hyperlinks produced by `deftech` and `elemtag`. The anchors of the targets are not those elements themselves but sections containing them. In other words, when readers click the link, it always jumps to the containing s

Re: [racket-users] Defeating Racket’s separate compilation guarantee

2019-04-24 Thread WarGrey Gyoudmon Ju
Great article, thanks. I like the logging facility, now I see it is more powerful than I known. On Thu, Apr 25, 2019 at 6:25 AM Gustavo Massaccesi wrote: > We can extract an feature request from the end of the post: > > Make the module that define `set` a cross-phase persistent module, so all >

Re: [racket-users] Generate really large random numbers in Racket

2019-04-01 Thread WarGrey Gyoudmon Ju
Hi, I am writing SSH in pure typed racket, Generating a big random primes is one of the tasks and I just finished it. https://github.com/wargrey/lambda-shell/blob/master/ssh/digitama/algorithm/random.rkt https://github.com/wargrey/lambda-shell/blob/master/ssh/digitama/algorithm/rsa.rkt Before I w

Re: [racket-users] performance, json

2019-02-22 Thread WarGrey Gyoudmon Ju
I have tried my best to find the "best practice" to do Racket IO. Here are some tips I found in writing CSV reader: https://github.com/wargrey/schema/blob/master/digitama/exchange/csv/reader/port.rkt With a MacBook Pro 15, 2013, it takes 3.5s to read a 70MB file. I agreed that `read-char` is the

Re: [racket-users] Seeking a graphviz like, diagramming language for Racket

2017-08-19 Thread WarGrey Gyoudmon Ju
On Sun, Aug 20, 2017 at 1:20 AM, Andrew Gwozdziewycz wrote: > Are you focused more on replacing Graphviz, or a generalized drawing > and visualization library that could be used to more easily put > together a Graphviz like tool? I guess they are likely somewhat > similar goals... Firstly, I ju

Re: [racket-users] Seeking a graphviz like, diagramming language for Racket

2017-08-19 Thread WarGrey Gyoudmon Ju
I have been working on it, but at very beginning stage and no working code right now. The official website of Graphviz provides lots of papers on the underlying algorithms, I also found *Handbook of Graph Drawing and Visualization *is worth reading. On Fri, Aug 18, 2017 at 6:10 PM, Andrew Gwozdz

Re: [racket-users] Printing Quickly

2017-07-25 Thread WarGrey Gyoudmon Ju
On Tue, Jul 25, 2017 at 4:52 PM, George Neuner wrote: > > Having little experience with Racket's drawing library, I can't speak to > how fast it is. I do recall someone saying it was (mostly) just a thin > layer over the native platform library, but even "thin layers" add some > latency. Nor do

Re: [racket-users] Wrap long text in 2htdp/image

2017-07-22 Thread WarGrey Gyoudmon Ju
Yes, but you must implement it yourself. This simplest one works for fixed-width font (implemented with pict-lib, you get the idea): (define desc (lambda [txt size width #:head [head (blank 0 0)] #:style [fstyle null]] (define {desc0 txt size width fstyle} (call-with-current-continuat

Re: [racket-users] Putting everything in a single monolithic source file

2017-07-21 Thread WarGrey Gyoudmon Ju
If the code is written in Typed Racket, the compilation time will drive you mad since every one-byte-modification forces the entire project being typed-checked... On Fri, Jul 21, 2017 at 5:07 PM, Erich Rast wrote: > I'm using mostly racket-mode in emacs for development and even with helm > and p

Re: [racket-users] beating java (speed)

2017-07-02 Thread WarGrey Gyoudmon Ju
Yes, I agree with you. Choosing "unsafe" operations is a tradeoff since Typed FFI is unavailable, I need a convenient and practical framework. I am sure, in the future, I will rewrite it without FFI. images/flomap was a great starting point. Anyway, it is a longterm plan. On Sun, Jul 2, 2017 a

Re: [racket-users] beating java (speed)

2017-07-01 Thread WarGrey Gyoudmon Ju
Hello, did you try remove racket/unsafe/ops? You do not have to use unsafe operations for fixnum and flonum, Typed Racket will do it for you. I am not sure if this is my problem, I found that racket/unsafe/op slows down my typed bitmap library. According to the Optimization Coach, FlVector (with

Re: [racket-users] Convert mouse coordinates in mouse-event% to window coordinates? And also for snip%...

2017-05-24 Thread WarGrey Gyoudmon Ju
it too much to > the left and about the size of the tab panel heading to the top of > where it ought to be. See the @"Notes":26 test window as a popup for > the purple snip in the attached screenshot. > > Is there any way to fix this or a more general, easier way to get the

Re: [racket-users] Convert mouse coordinates in mouse-event% to window coordinates? And also for snip%...

2017-05-23 Thread WarGrey Gyoudmon Ju
Hi Rast the mouse event object of editor% and snip% is always the one passed to the on-event method of editor-canvas% (that's why event handlers of snip% have lots of extra arguments to provide you the location information, racket/snip do the computing for you). When it is used with a snip% instan

Re: [racket-users] Speeding up graphics / moving away from 2htdp/image

2017-05-02 Thread WarGrey Gyoudmon Ju
On Tue, May 2, 2017 at 8:02 PM, Daniel Prager wrote: > Hi Ju > > Interesting results. Did you run the Contract Profiler tool? [ > http://docs.racket-lang.org/contract-profile/] > > I think it's fairly well understood that the contract-induced performance > costs across the typed / untyped boundar

Re: [racket-users] Speeding up graphics / moving away from 2htdp/image

2017-05-02 Thread WarGrey Gyoudmon Ju
: 23 Still slower than pict, but as a raster graphics API, it does a great job! On Sat, Apr 29, 2017 at 11:19 AM, WarGrey Gyoudmon Ju wrote: > > > On Sat, Apr 29, 2017 at 5:21 AM, Daniel Prager > wrote: > >> On Sat, Apr 29, 2017 at 2:10 AM, WarGrey Gyoudmon Ju < >>

Re: [racket-users] Speeding up graphics / moving away from 2htdp/image

2017-04-28 Thread WarGrey Gyoudmon Ju
On Sat, Apr 29, 2017 at 5:21 AM, Daniel Prager wrote: > On Sat, Apr 29, 2017 at 2:10 AM, WarGrey Gyoudmon Ju < > juzhenli...@gmail.com> wrote: > >> Hello, I think the main reason that pict is faster than 2htdp/image is, >> the pict is implemented with struct while the

Re: [racket-users] Speeding up graphics / moving away from 2htdp/image

2017-04-28 Thread WarGrey Gyoudmon Ju
Hello, I think the main reason that pict is faster than 2htdp/image is, the pict is implemented with struct while the 2htdp/image is implemented with class, the speed of rendering is just as fast/slow as each other, but manipulation on class is much heavier than on struct when combining large numbe

Re: [racket-users] Speeding up graphics / moving away from 2htdp/image

2017-04-25 Thread WarGrey Gyoudmon Ju
Hi Daniel, I have a functional bitmap library[1] as a part of my CSS engine. This library is inspired by the official pict-lib and flomap(images-lib), and handles bitmap% directly. I don't think it is efficient enough since every functional operation creates another bitmap%. Here I recommend you

Re: [racket-users] [racket][draw] some APIs should be more open

2017-04-13 Thread WarGrey Gyoudmon Ju
al)) (values x y width height layout-height))) or, just allow (get-text-extent) functions and methods returning the ink metrics instead of the logical one. I prefer the former. On Wed, Apr 12, 2017 at 10:23 PM, George Neuner wrote: > > On 4/11/2017 10:41 PM, WarGrey Gyoudmon Ju w

[racket-users] [racket][draw] some APIs should be more open

2017-04-11 Thread WarGrey Gyoudmon Ju
This is a little awkward, there are lots of simple classes defined in racket/draw, font%, color%, pen%, brush% and so on. They just hold a group of plain data, hence opportunities to be inspected easily. However by default all classes are opaque, the easiest (and perhaps unique) way to handle this

Re: [racket-users] Reporting exceptions as though they came from the caller

2017-03-31 Thread WarGrey Gyoudmon Ju
I use continuation marks to extract the nearest named function (named loops are also contained in the context): (define-syntax (#%function stx) ; class method has a symbol name looks like "[name] method in [class%]" #'(let use-next-id : Symbol ([stacks (continuation-mark-set->context (current-co

Re: [racket-users] Typed Racket: Using (Sequenceof a) in place of (Listof a)

2017-03-21 Thread WarGrey Gyoudmon Ju
For input arguments, it's okay, (Sequenceof a) does accept (Listof a); but for the return value, (Listof a) does not accept (Sequenceof a). You can pass a list as the input, but you cannot narrow the type annotation in you example, say (list->vector) satisfies the annotation, both the input and ou

Re: [racket-users] link: bad variable linkage

2017-03-11 Thread WarGrey Gyoudmon Ju
I have this issue in Racket 6.8.0.1 this morning, the project is compiled by compile-directory-zos, and all .zos are ensured up-to-date. Before I gave up, I had wrote a simple tests in DrRacket, lucky to saw the root cause, a contract error in the body of the newly added typed class, but the issue

Re: [racket-users] racket/gui -- How to implement a text% area with line number displayed?

2017-03-08 Thread WarGrey Gyoudmon Ju
that racket already provides, to override the (on-paint) method of text%, its first argument gives the change to draw something before or after the text% itself is displayed. On Thu, Mar 9, 2017 at 9:51 AM, WarGrey Gyoudmon Ju wrote: > Okay, in the gui framework, there is an interface text:l

Re: [racket-users] racket/gui -- How to implement a text% area with line number displayed?

2017-03-08 Thread WarGrey Gyoudmon Ju
Okay, in the gui framework, there is an interface text:line-numbers<%> On Thu, Mar 9, 2017 at 9:46 AM, WarGrey Gyoudmon Ju wrote: > But sometimes I happened to see that some one-line codes and their line > number are overlapped. > And line numbers are also controlled by the

Re: [racket-users] racket/gui -- How to implement a text% area with line number displayed?

2017-03-08 Thread WarGrey Gyoudmon Ju
in a special image box(also, those non-string snips may produce lines that bigger than text line height). On Thu, Mar 9, 2017 at 9:31 AM, WarGrey Gyoudmon Ju wrote: > I think, line numbers are likely displayed in another canvas. > The current implementation of text% does not support ad

Re: [racket-users] racket/gui -- How to implement a text% area with line number displayed?

2017-03-08 Thread WarGrey Gyoudmon Ju
I think, line numbers are likely displayed in another canvas. The current implementation of text% does not support advanced font features, the line height therefore is always the same. Displaying the line numbers just consists of a bit of arithmetic. On Thu, Mar 9, 2017 at 8:31 AM, 武晓宇 wrote: >

Re: [racket-users] How to type annotate for bindings in complex syntax forms

2017-03-06 Thread WarGrey Gyoudmon Ju
1.5 years ago, I struggled with the command-line, finally I thought `parse-command-line` is friendlier than its macro form `command-line`, and got the solution with `cast`: ;;; firstly, define your precise Help-Table. (define-type Help-Table (Listof (U (Pairof 'usage-help String)

Re: [racket-users] Typed Racket: Polymorphic function `dynamic-wind' could not be applied to arguments

2017-03-05 Thread WarGrey Gyoudmon Ju
The problem is not the `AnyValues` since it accepts all types, but you cannot instantiate a polymorphic type to return multiple values, so you have to return (cons ... ...) in dynamic-wind then extract that pair as two return values of the function. On Sun, Mar 5, 2017 at 3:23 PM, kay wrote: > I

[racket-users] [racket][gui] maybe different behaviors of text% between Windows and macOS

2017-02-12 Thread WarGrey Gyoudmon Ju
Hello, the original problem is reported here[ https://github.com/racket/racket/issues/1573] My solution works well in macOS, but in Windows, it only "partially" works: If there is no newline (including the one produced by *auto-wrap*) in the texts, it works, or only the last line is rendered well,

Re: [racket-users] How to implement a dynamic plugin system?

2017-02-07 Thread WarGrey Gyoudmon Ju
I think you can check the source of `raco` which uses the `info.rkt` to search all subcommands(see `racket/getinfo`). In this way, all plugins are just normal packages, you do not have to reside them is a specific directory. Certainly, the plugin is loaded via `dynamic-require`, if the plugin needs

Re: [racket-users] Package layout in docs

2017-01-31 Thread WarGrey Gyoudmon Ju
On Tue, Jan 31, 2017 at 9:12 PM, Matthias Felleisen wrote: > > > On Jan 31, 2017, at 12:37 AM, WarGrey Gyoudmon Ju > wrote: > > > > Hello. > > > > This is one of the culture shocks that a new Racketeer would face, and > so was I. > > But this

Re: [racket-users] Re: Package layout in docs

2017-01-30 Thread WarGrey Gyoudmon Ju
Hello. This is one of the culture shocks that a new Racketeer would face, and so was I. But this statement makes it clear to me: Racket is an operating system that pretend to a programming language; Yes, it may totally be a kind of over reading here. Say, I do not care if a manual page is the on

Re: [racket-users] specify test timeout for pkg-build?

2017-01-28 Thread WarGrey Gyoudmon Ju
n won't be effective in > > pkg-build.racket-lang.org until the next release, though.) > > > > At Sat, 28 Jan 2017 11:23:44 +0800, WarGrey Gyoudmon Ju wrote: > >> And also, I want to control `--check-stderr` in `info.rkt` file. > >> > >> 1. currently,

Re: [racket-users] specify test timeout for pkg-build?

2017-01-28 Thread WarGrey Gyoudmon Ju
ild.racket-lang.org until the next release, though.) > > At Sat, 28 Jan 2017 11:23:44 +0800, WarGrey Gyoudmon Ju wrote: > > And also, I want to control `--check-stderr` in `info.rkt` file. > > > > 1. currently, typed racket complains any `ctype?` types and warns it to >

Re: [racket-users] specify test timeout for pkg-build?

2017-01-27 Thread WarGrey Gyoudmon Ju
And also, I want to control `--check-stderr` in `info.rkt` file. 1. currently, typed racket complains any `ctype?` types and warns it to stderr. 2. for some tests, display their output to stdout and stderr is more convenient than wrapping the output into something like (check-exn?), say, to see if

Re: [racket-users] Editor-canvas% how to set default style and use set-line-count correctly?

2017-01-26 Thread WarGrey Gyoudmon Ju
On Fri, Jan 27, 2017 at 1:46 AM, WarGrey Gyoudmon Ju wrote: > > (send card insert (make-object string-snip% "it's a bug of text%, > snip's style is not (convert)ed, also affects the following inputs") > All right, it is not a bug, it's just how it works. the

Re: [racket-users] Editor-canvas% how to set default style and use set-line-count correctly?

2017-01-26 Thread WarGrey Gyoudmon Ju
up to you. (send card insert "works as expected") (send card insert (make-object string-snip% "it's a bug of text%, snip's style is not (convert)ed, also affects the following inputs") (send digivice show #true) (send digivice center 'both) On Fri, Jan 27, 2017

Re: [racket-users] Editor-canvas% how to set default style and use set-line-count correctly?

2017-01-26 Thread WarGrey Gyoudmon Ju
I have these two helpers (typed racket makes it a little verbose). (define change-style : (->* ((Instance Style<%>)) (#:font (Option (Instance Font%)) #:color (Option (Instance Color%)) #:background-color (Option

Re: [racket-users] Best practice for using .../private files from packages (pict3d)

2017-01-26 Thread WarGrey Gyoudmon Ju
How about merging these primitive geometry APIs into math-lib? On Thu, Jan 26, 2017 at 8:53 PM, Jay McCarthy wrote: > I think that it is quite common for a big library (especially > something really big like pict3d) to create a lot of residual useful > code that could conceivably be their own l

Re: [racket-users] How to embed version and build date in an application executable?

2017-01-05 Thread WarGrey Gyoudmon Ju
the file. > > For reference, the application is https://github.com/alex-hhh/ActivityLog2, > you can have a look at build.rkt for how it is currently done (it creates > the file build-id.txt). > > Cheers, > Alex. > > On Friday, January 6, 2017 at 10:31:43 AM UTC+8, WarGrey Gyoudm

Re: [racket-users] How to embed version and build date in an application executable?

2017-01-05 Thread WarGrey Gyoudmon Ju
A racket application usually has an `info.rkt` file in the root directory of the project/package/collection. see https://docs.racket-lang.org/raco/getinfo.html You can put your meta information in that file than read it with (get-info/full dirpath) which returns a function that works like `hash-re

Re: [racket-users] `apply`ing polymorphic functions in typed/racket

2017-01-05 Thread WarGrey Gyoudmon Ju
On Thu, Jan 5, 2017 at 3:28 PM, Matthew Eric Bassett wrote: > > the type signatures of this functions are: > (-> (Setof e) (Setof e) * (Setof e)) > > > (define list0 > (list (set 2) (set 3 2))) > (apply set-union list0) > > > (define list2 : (Listof (Setof Positive-Byte)) > (list (set 2)

Re: [racket-users] Re: hello, where can I find the distribution 6.7.0.3.

2017-01-04 Thread WarGrey Gyoudmon Ju
January 4, 2017 at 3:51:15 AM UTC-5, WarGrey Gyoudmon Ju > wrote: > > I cannot deploy my typed desktop application on Windows. > > > > > > In the download home page, 6.7 does not work, and that bug seemed to be > solved (I started 6.7 from 6.7.0.3, do not know whether it wa

Re: [racket-users] Re: hello, where can I find the distribution 6.7.0.3.

2017-01-04 Thread WarGrey Gyoudmon Ju
t should be pushed in the > next couple of days (https://github.com/racket/typed-racket/pull/481). > > Sorry for the trouble. > > Best, > Andrew > > On Wednesday, January 4, 2017 at 3:51:15 AM UTC-5, WarGrey Gyoudmon Ju > wrote: > > I cannot deploy my typed desktop applica

Re: [racket-users] hello, where can I find the distribution 6.7.0.3.

2017-01-04 Thread WarGrey Gyoudmon Ju
Hi, Stephen, I've already tried 12.28 and no luck. And at this time, that link is dead. So, all snapshots are temporary testers. hi Dupéron, For me on my computer I always build it from source, but I never trace the date and commit. Actually this is one of the major reason I gave up Haskell, Racke

[racket-users] hello, where can I find the distribution 6.7.0.3.

2017-01-04 Thread WarGrey Gyoudmon Ju
I cannot deploy my typed desktop application on Windows. In the download home page, 6.7 does not work, and that bug seemed to be solved (I started 6.7 from 6.7.0.3, do not know whether it was okay on macOS). The latest snapshot has a new bug shown both on macOS and Windows: in-list: contract vio

Re: [racket-users] Good Data Structures Book?

2016-12-14 Thread WarGrey Gyoudmon Ju
"Pearls of Functional Algorithm Design" https://www.amazon.com/Pearls-Functional-Algorithm-Design-Richard/dp/0521513383/ref=sr_1_1 The functional "programming pearls" in Haskell, but the author prefers the term "algorithm design". On Wed, Dec 14, 2016 at 2:48 AM, Ben Greenman wrote: > "Purely

Re: [racket-users] Re: Adding new exceptions

2016-11-29 Thread WarGrey Gyoudmon Ju
Hi, David. The exn:fail:filesystem and exn:fail:network do provide the errno code, If you are only working in one OS, you can also rely on the errno code. If you are working on multiple OSes, it might be a problem since Racket have not yet provided an abstract layer on the errno code. If you pref

Re: [racket-users] Request for comments: An embedded DSL for CSS in Racket

2016-11-13 Thread WarGrey Gyoudmon Ju
I have been writing my CSS engine. [sorry this reply might be a little off-topic here] Long period before, someone in this mailing list asked if their are user editable configuration file formats that can be used in real world applications. `info.rkt` might be a choice but it is not designed for

Re: [racket-users] Re: What is the fastest way to find the total free space on the disk?

2016-11-13 Thread WarGrey Gyoudmon Ju
I have written one in my project this task varies both from OS and filesystem. https://github.com/digital-world/sakuyamon/blob/master/digitama/posix.c It works on Solaris/Linux/MacOSX, and collects more sysinfo metrics than just disk usage. `ffi_prefab_ksysinfo` is the main struct, and `system_st

Re: [racket-users] Twenty six low-risk ways to use Racket at work You can start right now

2016-09-30 Thread WarGrey Gyoudmon Ju
Hi spdegabrielle, no apologies please. Actually, I did not or probably could not make myself clearly when I wrote that reply. I had felt depressed since this mail-list is not as active as before. At the first sight I saw your topic, I thought there should be more topics like this, but not only con

Re: [racket-users] Twenty six low-risk ways to use Racket at work You can start right now

2016-09-29 Thread WarGrey Gyoudmon Ju
27. Racket is in the nature of a preprocessor; 28. Besides the literate programming, Racket is a "programmable documentation". Any point in the two (and those 26) is not as good as it's sound if it's not the important part in the project or team. However if all of these can work together in a syst

Re: [racket-users] Is it neccessary to learn how to define new language?

2016-09-19 Thread WarGrey Gyoudmon Ju
On Mon, Sep 19, 2016 at 3:12 PM, Lin Lee wrote: > I'm a newcomer to Racket,I have learned scheme before. > > Recently,I began to learn Racket,but I found that it's too complicate in > reader and expander. So,I want to know what if i dont learn this part.Does > it do harm to me? > > Any suggestion

Re: [racket-users] Vector or array type for math vector?

2016-09-16 Thread WarGrey Gyoudmon Ju
No, Racket's vector is an array from Java's perspective(int [] for instance), not a custom data structure, Array is not a builtin datatype in Racket. If working with math-lib, you already have linear algebra supported. the array in math/array is a custom data structure with vector in heart. On Fr

Re: [racket-users] typed racket confusion

2016-09-09 Thread WarGrey Gyoudmon Ju
Because in function `b`, the type of the `lambda` that `n` actually be passed to is the union of `add1` and `sub1` in the context, hence, the info on parity of `n` are lost before this `lambda` is evaluated. On Sat, Sep 10, 2016 at 3:42 AM, Jos Koot wrote: > #lang typed/racket > > (define (a (n

Re: [racket-users] Scaling image with racket/draw?

2016-08-31 Thread WarGrey Gyoudmon Ju
ntains the flomap library. What a pity! On Thu, Sep 1, 2016 at 4:40 AM, Jens Axel Søgaard < jensaxelsoega...@gmail.com> wrote: > Is the result as good as ImageMagick? > > Den 31. aug. 2016 kl. 22.25 skrev Tobias Gerdin : > > Right, that did it, thanks! > > 2016-08-31 14:19 GMT

Re: [racket-users] Scaling image with racket/draw?

2016-08-31 Thread WarGrey Gyoudmon Ju
Try this example, (require racket/draw) (define bitmap-blank (lambda [[w 0] [h #false] #:backing-scale [backing-scale 2.0]] (define width (max 1 (exact-ceiling w))) (define height (max 1 (exact-ceiling (or h w (make-bitmap width height #:backing-scale backing-scale))) (define

Re: [racket-users] Help needed in file processing idioms

2016-08-20 Thread WarGrey Gyoudmon Ju
gt; PS for Pekka: In this case it's better to use for/last and for/or, but > > in more complicated cases you can try with for/fold. > > > > > > On Fri, Aug 19, 2016 at 10:34 AM, WarGrey Gyoudmon Ju > > wrote: > >> (define (read-on-row *params*) > >&g

Re: [racket-users] Help needed in file processing idioms

2016-08-19 Thread WarGrey Gyoudmon Ju
(define (read-on-row *params*) ;; Returns the last line in "myfile" which contains ;; substring "ON", otherwise #f (call-with-input-file (hash-ref *params* "myfile") (lambda (inp) (for/first ([row (in-lines inp 'return-linefeed)] #:when (string-contains? row "ON"))

Re: [racket-users] Re: How to differentiate between files and directories?

2016-07-21 Thread WarGrey Gyoudmon Ju
Maybe you can work with (namespace-mapped-symbols) and (namespace-variable-value), All field accessors are procedures with name starts with "struct-name-", no duplicates in the entire application. On Fri, Jul 22, 2016 at 3:59 AM, David Storrs wrote: > So there's no way to query the interface of

Re: [racket-users] error when intalling racket 6.5 in solaris (a sparc machine)

2016-06-29 Thread WarGrey Gyoudmon Ju
Also, you may want '--disable-libffi' On Thu, Jun 30, 2016 at 11:11 AM, Matthew Flatt wrote: > I'm not sure, but it's possible that a newer version of libtool is > needed. > > Meanwhile, does dropping the `--enable-shared` flag help? (I recommend > that in any case, unless you specifically need

[racket-users] [racket][typed] infinite typechecking

2016-06-28 Thread WarGrey Gyoudmon Ju
Hello, This is version 6.5.0.5. (define-syntax (define-tokens stx) (syntax-case stx [] [(_ token #:+ Token (extra ...) #:with [[subtoken #:+ SubToken subrest ...] ...] [id #:+ ID #:-> parent #:as Type rest ...] ...) (with-syntax ([token->datum (format-id #'token

Re: [racket-users] DrRacket debugger error

2016-05-11 Thread WarGrey Gyoudmon Ju
Just mention here: I met this error message when invoking a function with keyword arguments within the class body (but not method body). The simplest solution is to wrap the function application in another function that do not passed with keyword arguments. (define toolbar-snip% : Toolbar-Snip%

Re: [racket-users] Re: Accessing Undo/Redo History directly?

2016-04-19 Thread WarGrey Gyoudmon Ju
I think it's impossible to access written texts since what inside the undo/redo history are functions, not the content entities. So you have to manage texts on your own. -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this gr

Re: [racket-users] [racket][typed] static-contracts/instantiate.rkt:64:2. car: contract violation.

2016-04-18 Thread WarGrey Gyoudmon Ju
On Mon, Apr 18, 2016 at 4:03 AM, Asumu Takikawa wrote: > On 2016-04-18 03:47:45 +0800, WarGrey Gyoudmon Ju wrote: > >And here is another question. Developing GUI Application involves > typed > >class system heavily, which makes the compiling time terribly long (if >

Re: [racket-users] [racket][typed] static-contracts/instantiate.rkt:64:2. car: contract violation.

2016-04-17 Thread WarGrey Gyoudmon Ju
On Sun, Apr 17, 2016 at 3:35 PM, Asumu Takikawa wrote: > If you can send me whatever code is necessary to reproduce the bug (even if > it's not very minimal), I can try to fix it. > Thank you Asumu for caring about this bug. But now I cannot reproduce it in the real world code either, just like

[racket-users] [racket][typed] static-contracts/instantiate.rkt:64:2. car: contract violation.

2016-04-08 Thread WarGrey Gyoudmon Ju
This bug happened to appear two days ago and never disappear (both in version 6.4.0.13 and 6.5.0.1) in my codebase, however if I copy the minimal relative code into a fresh file, it disappears. In the original one's REPL, it disappears too. (define-type Card% (Class #:implements Darc-Card%

Re: [racket-users] drracket / postgresql error when opening connection for syntax

2016-04-06 Thread WarGrey Gyoudmon Ju
I met this problem before. (system-type 'machine) uses the output of `uname`. On Wed, Apr 6, 2016 at 5:47 PM, Tim Brown wrote: > Folks, > > I’m experimenting with creating functions from a PostgreSQL database. > [Frankly, I’m still getting my head around what I _actually_ want to do > here, but.

Re: [racket-users] [racket] typed racket needs editor-snip%

2016-03-30 Thread WarGrey Gyoudmon Ju
gui`. > > Sam > > On Tue, Mar 29, 2016 at 4:09 AM, WarGrey Gyoudmon Ju > wrote: > > Hello, I am currently building a desktop application (which is a > component > > of a production system for customer) in typed racket. > > > > I found that typed/priv

Re: [racket-users] [racket] typed racket needs editor-snip%

2016-03-29 Thread WarGrey Gyoudmon Ju
Oh, yes, it works. Thank you. On Tue, Mar 29, 2016 at 7:27 PM, Sam Tobin-Hochstadt wrote: > You can use `Editor-Snip%` by requiring it from `typed/racket/gui`. > > Sam > > On Tue, Mar 29, 2016 at 4:09 AM, WarGrey Gyoudmon Ju > wrote: > > Hello, I am currently buildi

[racket-users] [racket] typed racket needs editor-snip%

2016-03-29 Thread WarGrey Gyoudmon Ju
Hello, I am currently building a desktop application (which is a component of a production system for customer) in typed racket. I found that typed/private/gui-types.rkt does have the definition of Editor-Snip% but does not provide it in typed/racket/base. I do not know where is your prefer place

Re: [racket-users] IO in racket is painful

2016-03-22 Thread WarGrey Gyoudmon Ju
On Wed, Mar 23, 2016 at 8:26 AM, WarGrey Gyoudmon Ju wrote: > In Racket, (read) and (write) know all the builtin datatypes > <https://docs.racket-lang.org/reference/reader.html?q=readtable#%28part._parse-number%29> > which > are already structured more than a stream of bytes (

Re: [racket-users] IO in racket is painful

2016-03-22 Thread WarGrey Gyoudmon Ju
In Racket, (read) and (write) know all the builtin datatypes which are already structured more than a stream of bytes (like in C). Thus, you don't need scanf to tell Racket what is the type of the next token.

Re: [racket-users] Web server catch exceptions, print stack trace to error-logs, display simple page to user

2016-03-20 Thread WarGrey Gyoudmon Ju
I just use the log facility that operating system uses, say, rsyslog. rsyslog is configured to forward all logs via UDP, and there is another racket UDP server that displays these logs on the terminal or sends to other dev-ops. (rsyslog can be run as a normal user, then you can setup your own log m

Re: [racket-users] Setup/teardown for unit testing

2016-03-08 Thread WarGrey Gyoudmon Ju
Hi, Brina. This is my README of how I use RackUnit in my project. http://gyoudmon.org/~wargrey:wisemon/readme_rkt.html#%28elem._%28chunk._~3ctestsuite~3a._building._the._baby._digimon~3e~3a1%29%29 (test-suite

Re: [racket-users] Typed Racket

2016-02-21 Thread WarGrey Gyoudmon Ju
On Sun, Feb 21, 2016 at 4:13 PM, Asumu Takikawa wrote: > On 2016-02-21 13:23:40 +0800, WarGrey Gyoudmon Ju wrote: > >(exn:break:hang-up) and (exn:break:terminate) are useful in server > >application, if I (typed/require) them in the a common rkt and this > file > >

Re: [racket-users] Typed Racket

2016-02-20 Thread WarGrey Gyoudmon Ju
I use typed racket in production too, and I also heavily use Scribble on the same source codebase. Here is my requirement that not so important: (exn:break:hang-up) and (exn:break:terminate) are useful in server application, if I (typed/require) them in the a common rkt and this file is also (requ

Re: [racket-users] Re: (eqv? Racket-land Wonderland) -> #t

2016-02-17 Thread WarGrey Gyoudmon Ju
On Sun, Feb 14, 2016 at 8:10 PM, Saša Janiška wrote: > Neil Van Dyke writes: > > > Being non-mainstream for practitioners, Racket is most popular with > > people who have the freedom to choose any tools they want, not forced > > into a mainstream set of options. Most often this means individual

Re: [racket-users] Racket performance tips

2016-01-16 Thread WarGrey Gyoudmon Ju
Yes. What Bytes in Racket is what char * in C. String treats the chars as a UTF-8 value. On Sun, Jan 17, 2016 at 12:59 PM, Brian Adkins wrote: > On Saturday, January 16, 2016 at 11:54:05 PM UTC-5, Brian Adkins wrote: > > On Saturday, January 16, 2016 at 11:26:14 PM UTC-5, Neil Van Dyke wrote: >

Re: [racket-users] A template/example to use to build a workflow illustration/flowchart in slideshow

2016-01-16 Thread WarGrey Gyoudmon Ju
you can use (system) run graphviz, then load the resulting picture into slideshow with (bitmap) of pict. On Sat, Jan 16, 2016 at 8:22 AM, ckkashyap wrote: > Thanks Jordan ... I was aware of the tutorial source ... I was looking for > something that let me draw a flowchart quickly - I used graphv

[racket-users] Re: [racket] Sorry, but what's the correct way to use `#lang scribble/lp2`

2016-01-11 Thread WarGrey Gyoudmon Ju
scribble itself... > > Cheers > > > > 2015-02-21 11:22 GMT-02:00 WarGrey Gyoudmon Ju : > >> Glad to see the literate programming technology updated. >> I thought it might be a "Forgotten Feature" since the rest of scribble is >> so powerful and I c

Re: [racket-users] [racket] suggestions on scribble/example

2016-01-09 Thread WarGrey Gyoudmon Ju
t; > >> > >> On Sat, Jan 9, 2016 at 10:07 AM, Matthew Flatt > wrote: > >>> At Sat, 9 Jan 2016 08:34:45 -0700, Matthew Flatt wrote: > >>>> At Sat, 9 Jan 2016 22:58:00 +0800, WarGrey Gyoudmon Ju wrote: > >>>> > 1. Could you please trea

[racket-users] [racket] suggestions on scribble/example

2016-01-09 Thread WarGrey Gyoudmon Ju
1. Could you please treat the exn:fail:unsupported like a normal case as if it is wrapped by (eval:error)? http://docs.racket-lang.org/ts-reference/type-ref.html#%28form._%28%28lib._typed-racket%2Fbase-env%2Fbase-types..rkt%29._.Ext.Fl.Vector%29%29 this example is about ExtFlVector which is not s

Re: [racket-users] [racket] Racket 6.3(.0.7) breaks old code

2015-12-25 Thread WarGrey Gyoudmon Ju
ls` (due to changes > related to the new macro expander). I will push a repair later today. > > At Mon, 30 Nov 2015 20:16:44 +0800, WarGrey Gyoudmon Ju wrote: > > Thank you, Matthew. > > > > The project itself is organized as a multi package, however there is no &

[racket-users] [racket][scribble] UNSYNTAX and lp

2015-12-17 Thread WarGrey Gyoudmon Ju
I see docs says UNSYNTAX can be used to escape code to scribble lots of times. So what is the UNSYNTAX? In lp chunks, are there any examples to demonstrate how to keep comments in the resulting docs? In my practice, tests are written in lp. If there is a way to keep the original form of a numbe

Re: [racket-users] Is there a way to return no value?

2015-12-11 Thread WarGrey Gyoudmon Ju
Oh, that's interesting. > (void? (values)) Type Checker: expected single value, got multiple (or zero) values in: (values) On Fri, Dec 11, 2015 at 8:15 PM, Jay McCarthy wrote: > Hi David, > > You can return nothing with (values). The function "values" returns > any number of values... (values 1

Re: [racket-users] Re: reducing pauses with incremental GC

2015-12-02 Thread WarGrey Gyoudmon Ju
I think, always. Because they like games too. On Thu, Dec 3, 2015 at 2:35 AM, Jack Firth wrote: > Absolutely fantastic! I wonder how often language designers implement > features useful to game developers because of their children. > > -- > You received this message because you are subscribed to

Re: [racket-users] [racket] Racket 6.3(.0.7) breaks old code

2015-11-30 Thread WarGrey Gyoudmon Ju
gt; > I'm unclear on what I'd need to do to replicate the problem, though. Is > there some code of yours that's available and that I could try to run? > > At Mon, 30 Nov 2015 06:53:28 +0800, WarGrey Gyoudmon Ju wrote: > > It is compiled by myself with no strange opt

[racket-users] [racket] Racket 6.3(.0.7) breaks old code

2015-11-29 Thread WarGrey Gyoudmon Ju
It is compiled by myself with no strange options. Rebuilding the project (without DrRacket) fails due to two strange behaviors. The first one is module-path-index-resolve: "self" index has no resolution. It breaks lots of scripts, I cannot locate where it is exactly occurs. 1. errortrace says mak

Re: [racket-users] Typed Racket and struct

2015-11-19 Thread WarGrey Gyoudmon Ju
On Fri, Nov 20, 2015 at 3:27 AM, Antonio Menezes Leitao < antonio.menezes.lei...@ist.utl.pt> wrote: > Hi, > > On Thu, Nov 19, 2015 at 11:36 AM, WarGrey Gyoudmon Ju < > juzhenli...@gmail.com> wrote: > >> 1. define structs in untyped racket; >> 2. (require/ty

Re: [racket-users] Configuration Files

2015-11-19 Thread WarGrey Gyoudmon Ju
Yes, I like the idea of #lang info(#lang setup/infotab) which is highly constrained, and it is an out-of-box solution. It's better to have a (get-info/file filename.rkt) as an alternative to (get-info/full infodir-path). On Thu, Nov 19, 2015 at 7:32 AM, Neil Van Dyke wrote: > I generally second

Re: [racket-users] Typed Racket and struct

2015-11-19 Thread WarGrey Gyoudmon Ju
1. define structs in untyped racket; 2. (require/typed/provide) it with #:constructor-name option. On Thu, Nov 19, 2015 at 5:11 PM, Antonio Menezes Leitao < antonio.menezes.lei...@ist.utl.pt> wrote: > Hi, > > I've been using Typed Racket in the last few months and it has been an > interesting exp

Re: [racket-users] Configuration Files

2015-11-18 Thread WarGrey Gyoudmon Ju
info.rkt, that's its name, you can search it in docs for details. On Thu, Nov 19, 2015 at 6:39 AM, Sam Tobin-Hochstadt wrote: > I usually use a file that I `read` and `write` with racket data, > probably a hash table. > > Sam > > On Wed, Nov 18, 2015 at 5:19 PM, Christopher Walborn > wrote: > >

Re: [racket-users] Embedding Rust in Racket

2015-11-09 Thread WarGrey Gyoudmon Ju
Because C side output port is not controlled by (current-output-port) and (current-error-port) directly, C code always use the default ones. In theory, one can write a simple wrapper to deal with (current-output-port). On Tue, Nov 10, 2015 at 1:45 PM, Ty Coghlan wrote: > It works correctly if I

Re: [racket-users] [racket][FFI] memory management when making io ports in C

2015-09-24 Thread WarGrey Gyoudmon Ju
- lwp# 8 / thread# 8 Three SSH clients are running in three places separately, all APIs are FFIed without '#:in-orignal-place'. The GC itself crushed in thread #1. I do not make subprocess explicitly and the main place is running with n

Re: [racket-users] [racket][FFI] memory management when making io ports in C

2015-09-17 Thread WarGrey Gyoudmon Ju
Okay, thank you Matthew. On Thu, Sep 17, 2015 at 10:17 PM, Matthew Flatt wrote: > At Thu, 17 Sep 2015 21:29:35 +0800, WarGrey Gyoudmon Ju wrote: > > On Wed, Sep 16, 2015 at 7:36 PM, Matthew Flatt > wrote: > > > > > But, also, to use either of those, you need to use &

[racket-users] [racket][FFI] memory management when making io ports in C

2015-09-16 Thread WarGrey Gyoudmon Ju
Hello. foxpipe.c is a wrapper of libssh2 APIs that suitable to work with (sync) and custodian. Everything is okay except that the sigfault annoys me a lot. typedef struct foxpipe_session { LIBSSH2_SESSION *sshclient; Scheme_Input_Port *dev_tcpin; Scheme_Output_Port *dev_tcpout;

  1   2   >