pocmatos
2018-3-22 09:57:05

I am trying to use bibtex with scribble for the first time. I have a bunch of .bib files downloaded from ACM to include in a short paper. How can I do this with scribble? I can see a path->bibdb but how can I call racket functions from a scribble file?


pocmatos
2018-3-22 12:38:04

ok, i am one step further, I have joined all refs into a refs.bib and loaded it with @(define refs (path->bibdb "refs.bib")) however there’s not much documentation on how to actually generate a bibliography part from this.


pocmatos
2018-3-22 13:12:35

Interestingly there’s absolutely no examples on using path->bibdb it seems… I am surprised to say the least.


githree
2018-3-22 13:14:19

@pocmatos you got me curious so I searched on github for its uses and… not a single use (not including implementation and documentation of bibtex)


pocmatos
2018-3-22 13:14:44

I just finished going through the 5 pages of results as well.


pocmatos
2018-3-22 13:14:53

only docs and definition.


githree
2018-3-22 13:14:53

same here :slightly_smiling_face:


pocmatos
2018-3-22 13:15:48

What I was wondering was … surely the PLT guys use scribble for their papers. Have they really manually converted their bib databases into scribble? and therefore don’t need path->bibdb?


pocmatos
2018-3-22 13:16:02

path->bibdb gives you a bibdb?


pocmatos
2018-3-22 13:16:12

but it doesn’t seem that there’s anything to consume it….


githree
2018-3-22 13:16:14

you will probably have to wait for US to wake up!


pocmatos
2018-3-22 13:16:22

:slightly_smiling_face: indeed


pocmatos
2018-3-22 13:16:29

are we the only ones in Europe?


pocmatos
2018-3-22 13:16:30

:slightly_smiling_face:


pocmatos
2018-3-22 13:16:37

assuming you are…


pocmatos
2018-3-22 13:16:41

or… an early riser


githree
2018-3-22 13:16:52

I am in Europe


githree
2018-3-22 13:18:29

Not many of us here it seems


pocmatos
2018-3-22 13:39:30

true!


pocmatos
2018-3-22 13:39:54

We’re missing a RacketConf — Europe. PLT Team hint


githree
2018-3-22 13:42:09

Although I gather a conference in Europe may be too big right now, meet ups - more feasible.


pocmatos
2018-3-22 13:44:38

Racket European Meetup sounds good. Who’s organizing?


dmitryhertz
2018-3-22 13:45:33

Heh, I’d like to go to Europe to the conf, but I live in deep Siberia, too far away.


blachance
2018-3-22 13:45:44

@pocmatos I haven’t used bibdb before with scribble, but it looks like define-bibtex-cite should be close to what you want. The related form, define-cite, has some examples that might also help


pocmatos
2018-3-22 13:48:12

@dmitryhertz siberia… wow, the kind of place we only hear about in nature documentaries. :slightly_smiling_face: No wonder your profile says “Working remotely” . That sounds as remote as it gets.


pocmatos
2018-3-22 13:48:19

@blachance will take a look


pocmatos
2018-3-22 13:49:44

Strange that define-bibtex-cite gets a path instead of the bibdb returned by path->bibdb


pocmatos
2018-3-22 13:49:48

Will give it a try.


blachance
2018-3-22 14:04:27

Strange indeed. I think path->bibdb is something people are likely to stumble upon, so some connection between it and define-bibtex-cite would help


abmclin
2018-3-22 14:26:20

Internet truly is a marvelous invention; allowing distant corners of the globe to converse with each other.


stamourv
2018-3-22 14:34:30

@pocmatos: My bibliographies are all scribble. (As are my papers, web pages, exams, etc.)


dmitryhertz
2018-3-22 15:25:09

@stamourv and CV too?


dmitryhertz
2018-3-22 15:25:45

I wrote my CV entirely in LaTeX, but it would be great to use Racket infrastructure instead.


stamourv
2018-3-22 15:26:07

No, that one is TeX. Started it before Scribble existed, and just been adding to it since. :)


dedbox
2018-3-22 16:15:31

@pocmatos this worked for me, once upon a time #lang scribble/base @(require scriblib/autobib scriblib/bibtex) @(define-bibtex-cite "scribblings/refs.bib" ~cite citet generate-bibliography) ... @(generate-bibliography)


dedbox
2018-3-22 16:16:36

this was in scribblings/main.scrbl for bibtex file scribblings/refs.bib


greg
2018-3-22 16:30:39

Has proposed RacketCon in Iceland, as a more geographically neutral location — but preferably in the summer :)


jerome.martin.dev
2018-3-22 16:34:51

Is it easier to bring US folks to Iceland than, say, France or the UK? I’ve always wanted to go to Iceland though, so I guess it’ll make a good opportunity :smile:


greg
2018-3-22 16:46:08

I don’t get a tourism commission from Iceland, but: - The 20 hours of daylight thing in June is pretty nice. - Icelandair usually lets you do free stop-overs (so you could visit Iceland and {UK, France} for the same price). - Fun small city, and amazing outdoorsy stuff, both. - The Blue Lagoon. - Huldufólk


githree
2018-3-22 18:49:53

@greg true, you couldn’t be more in between the two continents than Iceland: http://www.theworldisabook.com/10369/between-continents-icelands-reykjanes-peninsula/


githree
2018-3-22 18:51:24

not only geographically but also geologically - a perfect spot for intercontinental meeting :slightly_smiling_face:


pocmatos
2018-3-22 18:57:02

@greg when did you propose that? I think I might have missed it. Need to thumbs it up!


ryanc
2018-3-22 19:25:33

@mflatt Currently, if s is a string, then (cast s _string/ucs4 _gcpointer) returns a pointer to the backing storage of s. Will that be true in Racket-on-Chez? If not, is there another way to memcpy to/from a string? The context: I need to convert between strings and UTF–16 and UCS–4 bytes. (I’m also currently using scheme_{ucs4,utf16}_to_{utf16,ucs4}.)


mflatt
2018-3-22 19:30:05

@ryanc No, that will not be true in Racket-on-Chez. The easy answer is to use open-bytes-converter, but if that’s insufficient or too slow, we’ll probably have to add some library that provides more string conversions.


ryanc
2018-3-22 19:37:14

@mflatt The docs for open-bytes-converter don’t mention UCS–4 at all, as far as I see. I thought about doing string <-> UCS–4 conversion in Racket, but IIUC it could involve allocating characters within the loop. (I’m guessing only ASCII chars are interned?) Versions of string-{ref,set!} that use fixnums instead of chars might be useful.


mflatt
2018-3-22 21:22:24

@ryanc “UCS–4” isn’t currently in the set of guaranteed transformations, but it will generally be available from iconv. We could add it as a built-in format if that seems like the best way. Using a bytes converter doesn’t allocate characters, since it converts to and from byte strings.


spdegabrielle
2018-3-22 21:27:02

I’m working(stuck really) on a nav-bar, but I agree a sidebar is a useful tool - and very popular with other modern editors. #drracket