pocmatos
2018-8-28 11:34:41

@samth has the snapshot build failed?


pocmatos
2018-8-28 11:35:10

@greg I am getting from travis racket: Did the build fail? Check the logs at <https://plt.eecs.northwestern.edu/snapshots/current/log/>


pocmatos
2018-8-28 11:35:16

Except that url doesn’t exist.


greg
2018-8-28 12:25:25

@pocmatos Huh. Well, <https://plt.eecs.northwestern.edu/snapshots/current/log/> is the URL provided in tiny print as “Build Logs” near the bottom of https://plt.eecs.northwestern.edu/snapshots/ — I’m guessing the build failed harder, or, the build went fine but there’s some HTTP and/or network issue


pocmatos
2018-8-28 12:26:11

@greg understood. just wanted to let you know of the issue really. I understand that most likely something failed on the racket side.


greg
2018-8-28 12:26:26

No worries it’s good to double-check.


greg
2018-8-28 12:30:44

@florence Not a big deal at all, just curious: Is that check-the-logs message still good or does it need updating? (Asking you b/c you know more about this than me, b/c you added this a year ago :smile: https://github.com/greghendershott/travis-racket/commit/1df1d73d9432e2e93bf89e7cfc936521deb74427)


pocmatos
2018-8-28 13:05:16

@mflatt I see you tried cross compiling chez in https://github.com/cisco/ChezScheme/pull/267#issuecomment-371478100


pocmatos
2018-8-28 13:06:01

@mflatt was this successful ?


pocmatos
2018-8-28 13:11:14

the reason I ask this is because for me it fails due to the simple fact that Mf-cross includes Mf-${xm}, which does not exist in $M/s. So, in principle it should fail.


pocmatos
2018-8-28 13:11:55

oh wait… I just noticed that in your specific case, it won’t fail because you’re not crossing. Your $m == $xm


florence
2018-8-28 13:22:06

I think it’s still fine! Unless that link changed which seems unlikely to me


pocmatos
2018-8-28 13:38:29

Something unexpected happened. I am trying to create a binary package, so I write raco pkg create --binary --dest tmp ., it turns out however that a zip file is created and it contains all of the source files, not just the binary ones.


greg
2018-8-28 13:40:41

Thanks!


samth
2018-8-28 13:40:42

@pocmatos everything seems to be there at the relevant site


samth
2018-8-28 13:40:53

/cc @greg


samth
2018-8-28 13:41:14

I believe that the site may not atomically update, which might explain that


greg
2018-8-28 13:41:21

The Build Logs link is no longer 404 for me.


pocmatos
2018-8-28 13:41:27

same here


pocmatos
2018-8-28 13:41:56

i guess me and @greg found a time window where things were broken but now all seems ok.


greg
2018-8-28 13:42:15

Oh, instead of updating atomically does it use green energy? That’s cool.


greg
2018-8-28 13:43:51

OK I feel dirty but I spent hours trying to get this to work some “right” way: https://github.com/greghendershott/racket-mode/commit/2308f71d2be67042f98188590627e42452292ea8


greg
2018-8-28 13:44:48

(The get/set! in question is the sort of thing that gui-debugger/annotate annotate-for-single-stepping returns.)


samth
2018-8-28 13:45:22

@greg can you provide a little more background?


greg
2018-8-28 13:45:32

Maybe there isn’t any “right” answer to how do you annotate 3D syntax? :slightly_smiling_face:


greg
2018-8-28 13:45:50

Oh, I’m working again on step-debugging in racket-mode.


greg
2018-8-28 13:46:35

And one thing I wanted to do, is while you’re at a break, the REPL turns into a special debug REPL. Where you can refer to local variables in scope, and even set! them.


greg
2018-8-28 13:47:37

So it’s getting syntax from current-read-interaction, and wrapping it in a let-syntax with make-set!-transformer for each local.


greg
2018-8-28 13:48:18

And that works fine for non-TR, and even for the get case of TR, because the stx is just literal value


greg
2018-8-28 13:49:21

But I couldn’t figure out how to make a set! transformer. TR would understandably complain that the type of get/set! was Any, and I couldn’t ann or cast or anything to make it happy.


greg
2018-8-28 13:50:28

@samth That’s the basic situation.


samth
2018-8-28 13:51:26

can you just give get/set! a type?


samth
2018-8-28 13:51:57

for example, with unsafe-require


greg
2018-8-28 13:52:40

Oh I didn’t really know about unsafe-require. I’ll take a look.


greg
2018-8-28 13:53:23

Will that work at the top-level inside a TR #%top-interaction wrapper? Defining a module and unsafe-requiring it?


greg
2018-8-28 13:53:36

I’ll try and see.


samth
2018-8-28 13:57:21

Why does the module need to be inside the TR #%top-interaction wrapper?


greg
2018-8-28 13:58:19

Because this is all happening inside a current-prompt-read handler inside read-eval-print-loop.


greg
2018-8-28 14:00:13

Maybe I’m making a dumb mistake but this toy example at a normal Typed Racket REPL prompt doesn’t seem to work: typed.rkt&gt; (begin (module m racket/base (provide (all-defined-out)) (define (set n) (void))) (unsafe-require 'm [set (-&gt; Any Void)]) (set 12)) ; stdin::825: type-check: type name used out of context ; type: -&gt; ; in: (-&gt; Any Void) ; at: -&gt; ; in: (-&gt; Any Void)


greg
2018-8-28 14:03:55

Maybe the hack I did is fine. If a debugger allows you to bypass type-checking, is that a bug or feature? (I’m partly rationalizing, but partly serious.)


greg
2018-8-28 14:05:23

might be in the “bargaining” stage of programming something new


samth
2018-8-28 14:12:04

sorry, it should be unsafe-require/typed


greg
2018-8-28 14:17:17

Ah OK. That error fooled me. Same error with unsafe-require/typed, but neglecting to (require typed/racket/unsafe).


samth
2018-8-28 14:18:43

yes, that’s the same issue that was discussed recently wrt syntax-parse and _


greg
2018-8-28 14:21:23

Oops got side-tracked by Travis CI error. Not what @pocmatos reported. Now it’s SSL cert failures. I can repro locally on macOS: $ curl -L <https://mirror.racket-lang.org/installers/7.0/racket-7.0-x86_64-linux.sh> curl: (60) SSL certificate problem: Invalid certificate chain More details here: <http://curl.haxx.se/docs/sslcerts.html> curl performs SSL certificate verification by default, using a "bundle" of Certificate Authority (CA) public keys (CA certs). If the default bundle file isn't adequate, you can specify an alternate file using the --cacert option. If this HTTPS server uses a certificate signed by a CA represented in the bundle, the certificate verification probably failed due to a problem with the certificate (it might be expired, or the name might not match the domain name in the URL). If you'd like to turn off curl's verification of the certificate, use the -k (or --insecure) option.


samth
2018-8-28 14:24:51

urg


samth
2018-8-28 14:25:07

yeah, appears to be expired


greg
2018-8-28 14:25:14
<http://mirror.racket-lang.org\|mirror.racket-lang.org> uses an invalid security certificate. The certificate expired on August 28, 2018, 9:09:43 AM GMT-4. The current time is August 28, 2018, 10:24 AM. Error code: SEC_ERROR_EXPIRED_CERTIFICATE

samth
2018-8-28 14:25:18

@jeapostrophe ping


mflatt
2018-8-28 15:11:00

@pocmatos That comment is about using the cross-compilation setup for bootstrapping, which is not “cross” in the sense of multiple platforms. I’ve only cross-compiled (in that sense) boot files, which goes something like this: https://programmingpraxis.com/2017/09/15/compile-chez-scheme-on-android-arm/ Overall, Chez Scheme’s build process… well, let’s just say that Racket-on-Chez will need to offer simpler entry points, such as make cs in the Racket repo’s top level.


pocmatos
2018-8-28 16:02:43

@mflatt Thanks, I will take a look. I was pretty confident there was a bug somewhere in the Makefiles but it seems to go smoothly in the reference you linked to, so I need to dig deeper.


pocmatos
2018-8-28 16:27:23

raco exe docs say The raco exe command embeds a module, from source or byte code, but how is this choice made? If bytecode is available, bytecode is chosen, otherwise source?


mflatt
2018-8-28 17:39:59

Yes. If only source is available, it is compiled to bytecode for embedding.


pocmatos
2018-8-28 19:02:14

ah, but it’s nonetheless compiled. It’s not like the source file is inserted verbatim and compiled later somehow at execution time. Thanks.


samth
2018-8-28 19:06:56

@greg btw, the certificate issue is fixed


plotnus
2018-8-28 21:12:22

Is there a way to get a backtrace in racket? I have a contract violation and need to find the source of the error.


shu--hung
2018-8-28 22:14:33

usually the backtrace will be printed by default if you’re using DrRacket, click the triple cross icon in the REPL if you’re using racket REPL, either use (require errortrace) or ,errortrace to turn on errortrace (for more detailed backtrace)


shu--hung
2018-8-28 22:16:46

(in racket REPL, ,bt also shows more context information)


greg
2018-8-28 23:03:17

In racket-mode in Emacs you can set racket-error-context to 'high, although errortrace makes your program run slower. Or, you can leave it at 'low or 'medium normally and use C-u prefix to temporarily set it to 'high for one run. So, normally C-c C-c to run, and if you get an unsatisfying error you can C-u C-c C-c to run again and get a hopefully better one. https://github.com/greghendershott/racket-mode/blob/master/Reference.md#run


shu--hung
2018-8-29 03:57:36

What’s the complexity of hash-ref for (equal?) hash maps? If I have a hash map whose keys are lists of length k, would hash-ref become O(k)?


shu--hung
2018-8-29 04:00:52

oh, the hashing function is already linear for lists anyway…


lexi.lambda
2018-8-29 04:02:06

Right. hash-ref is O(1) for mutable hashes and effectively O(1) for immutable ones, though that doesn’t include the cost of the hashing itself. For equal? hashes, each use of hash-ref incurs one use of equal-hash-code and possibly many equal? comparisons in the case of collisions.


shu--hung
2018-8-29 04:02:32

sounds about right :disappointed:


lexi.lambda
2018-8-29 04:02:53

(For immutable hashes, hash-ref is actually O(log n), but it works out so that log n is never larger than the constant 62, so it’s essentially constant time.)