robkuz
2017-9-14 11:16:30

How does this “half-bakedness” manifests itself?


robkuz
2017-9-14 11:21:20

I don’t think this solves my problem. My issue is that I do not want to implement that generic interface on my struct. Not becase the interface is not known when defining the struct (yet the reverse is) but simply I’d like to keep the struct definition clean from orthogonal features. Imagine a generic interface for Jsonifying/Database/Automatic Routing/etc. One could end up with a huge monster struct.


dev.guoj
2017-9-14 17:01:07

@dev.guoj has joined the channel


lexi.lambda
2017-9-14 17:29:25

@leif @mflatt Is the nanopass Racket compiler rewrite still a thing now that the Chez rewrite is planned? Or does the latter subsume the former?


leif
2017-9-14 18:00:11

@lexi.lambda I haven’t touched it in a while, although Chez’s compiler is nanopass.


leif
2017-9-14 18:01:07

Although I don’t know how hard it is to compile Racket code to chez code. @mflatt would obviously know about that more than me. :wink:


leif
2017-9-14 18:01:32

BTW, can anyone give me a good idea of when to use struct properties vs generics?:


leif
2017-9-14 18:01:40

woops, wrong question.



leif
2017-9-14 18:03:13

I ask because the convertible library (and pict-convertible library), are still using properties. So if I make another convertible library (video-convertible), should I use properties rather than generics.


preethac
2017-9-14 18:39:48

@preethac has joined the channel


lexi.lambda
2017-9-14 18:45:14

@leif Thanks, that makes sense. I was just sort of idly wondering about how hard it would be to add GHC-style rewrite rules to Racket, and I figure it would be a lot easier to add to a compiler written in Racket rather than one written in C.


notjack
2017-9-14 19:21:00

@leif probably struct properties should only be used when the value stored in the property isn’t a function (or something function-like like a struct field index)


samth
2017-9-14 19:24:18

@leif I think if you’re compatible with convertible (which sounds nice) then use properties


samth
2017-9-14 19:24:25

if you’re building something new, use generics


notjack
2017-9-14 19:27:33

I think the only thing generics can’t do that props can is associate a value with a struct type itself in a way where you don’t need an instance of the struct to access it; the generated methods of a generic interface always need an actual instance of the struct passed to them. Like how typeclasses let you associate a value with a type (such as mempty in Monoid) but OO interfaces can’t do that.


notjack
2017-9-14 19:45:56

How can I test that two syntax objects have the same scopes? Is using (equal? (datum->syntax stx1 #f) (datum->syntax stx2 #f)) a reasonable way?


samth
2017-9-14 19:47:21

I think you could try that, but compare using free-identifier=? on a symbol instead of #f


notjack
2017-9-14 19:48:10

ah, so (let ([id (gensym)]) (free-identifier=? (datum->syntax stx1 id) (datum->syntax stx2 id))) would be better?


samth
2017-9-14 19:48:35

that’s my best suggestion


notjack
2017-9-14 19:48:42

thanks!


lexi.lambda
2017-9-14 20:10:47

@notjack bound-identifier=? tests whether or not two things have the same scopes, not free-identifier=?


lexi.lambda
2017-9-14 20:11:06

free-identifier=? tests if two identifiers have the same binding


notjack
2017-9-14 20:11:10

oh right


notjack
2017-9-14 20:11:18

yeah bound-identifier=? is definitely what I want


lexi.lambda
2017-9-14 20:11:34

(I’m sure @samth knows this, just a minor detail)


florence
2017-9-14 20:45:37

@samth whelp. I have no clue why that last pict run timed out. IDK what else to do other than disable the "auto pict conversion" test-suite its associated tests entirely. (The computer on which I could reproduce this is currently borked atm too…)

BTW do you know if we can clear the timer logs for that file or something? Its currently making the drdr page really slow to load it seems.


zeeshanlakhani
2017-9-14 21:10:50

Writing a paper in Scribble/acmart/@acmsmall, using bibtex. Was able to get citations as [1…99] numbers, aka #:style number-style, but they are not linked to the bibtex entry. Is there a way, and probably an easier way, to make this happen. Was using a similar bib.rkt file from one of Van Horn’s papers:#lang racket (require scriblib/autobib scriblib/bibtex) (provide ~cite citet generate-bib) (provide (all-from-out scriblib/bibtex scriblib/autobib)) (define-bibtex-cite "occam.bib" ~cite citet generate-bib #:style number-style)`


ben
2017-9-14 23:26:48

@zeeshanlakhani try using the small-number-style code here: https://github.com/bennn/gtp-paper/blob/master/template/main.rkt#L94


ben
2017-9-14 23:27:16

(I inherited that code from Asumu … and I think it’ll add the links like you want.)


zeeshanlakhani
2017-9-14 23:27:29

@ben thanks, i’ll try it out


zeeshanlakhani
2017-9-14 23:33:44

@ben it does indeed link things, but always takes me to the first page upon click


zeeshanlakhani
2017-9-14 23:35:35

we are using a bib file though


ben
2017-9-14 23:36:45

that’s weird and bad …


zeeshanlakhani
2017-9-14 23:37:09

let me take a look at the generated tex


ben
2017-9-14 23:37:31

ben
2017-9-14 23:38:05

are you calling generate-bibliography somewhere?


zeeshanlakhani
2017-9-14 23:39:41

@ben yep, calling it the main scribble file


ben
2017-9-14 23:41:41

at the bottom, after all the include-sections? (not sure if that matters)


zeeshanlakhani
2017-9-14 23:41:55

yep, it’s the last thing


ben
2017-9-14 23:42:12

oops haha


zeeshanlakhani
2017-9-14 23:42:15

~[\Thyperref{48}{autobiblab:48}] is what a citation looks like in tex


ben
2017-9-14 23:42:21

add this to your texstyle \newcommand{\Thyperref}[2]{\hyperref[#2]{#1}}


zeeshanlakhani
2017-9-14 23:42:25

ah, ok


ben
2017-9-14 23:43:28

(or change render-citation to generate a call to \hyperref)


zeeshanlakhani
2017-9-14 23:43:39

ok


ben
2017-9-14 23:58:56

is it working?


zeeshanlakhani
2017-9-14 23:59:55

not yet. going to look at generating hyperrefs


ben
2017-9-15 00:01:27

ok (did “texstyle” make any sense?)


zeeshanlakhani
2017-9-15 00:01:58

yeah, i have a .tex file for other things we’re using and have \newcommand{\Thyperref}[2]{\hyperref[#2]{#1}}


zeeshanlakhani
2017-9-15 00:02:00

in there


zeeshanlakhani
2017-9-15 00:02:18

run it as per raco scribble ++style style.tex...


zeeshanlakhani
2017-9-15 00:02:50

was actually looking at https://github.com/migeed-z/retic_performance/blob/fdf795946b311e7d64f04902ab54e322f03594df/dls/common.rkt to see if I missed something. Odd that it works elsewhere


zeeshanlakhani
2017-9-15 00:02:54

for these


zeeshanlakhani
2017-9-15 00:04:21

I do realize that in popl–2016 example, define-site does not point to the .bib filename though


zeeshanlakhani
2017-9-15 00:04:24

the cs.bib


zeeshanlakhani
2017-9-15 00:04:54

as we’re doing, where we point to the bib file specifically


ben
2017-9-15 00:09:54

oh, good point. Try using just define-cite ?


ben
2017-9-15 00:10:49

… I guess you’d have to reformat your bib file


zeeshanlakhani
2017-9-15 00:11:21

yeah @ben. thinking that may do the trick as i build examples. Will try that tomorrow possibly.


zeeshanlakhani
2017-9-15 00:13:00

but, maybe I’ll play around w/ the code and see. it seems like it should still match up, but we’ll see.


ben
2017-9-15 00:15:09

ok, feel free to send me your bib file if you get stuck. I can try later tonight.


zeeshanlakhani
2017-9-15 00:15:52

oh, great. Yeah. I’ll dm that to you


zeeshanlakhani
2017-9-15 03:57:12

as an update to our convo, seems like the snippet works find when using @sigplan, but not for @acmsmall or @acmtog, etc…