Re: [racket-users] Re: What’s everyone working on this week?

2019-12-13 Thread Nathaniel Griswold
Oh, interesting. Yes the tail call optimization for my interpreter was one 
thing I need to hand-code. It will be a good learning experience.

> On Dec 13, 2019, at 9:05 AM, Anthony Carrico  wrote:
> 
> On 12/13/19 12:26 AM, Nathaniel Griswold wrote:
>> Could I just write llvm directly? (This is my first time using llvm)
> 
> Sure. You should probably play around and write some llvm assembly procedures 
> by hand.
> 
> I think the main issue with llvm is, or used to be, that you can "call with 
> arguments" (that is a normal C procedure call), but you can only jump within 
> a single procedure, so it isn't convenient to modularize state machines like 
> we can with tail calls in Racket.
> 
> Some compilers create special llvm calling conventions to deal with this, but 
> it would be nice if there was a standard "jmp with arguments" instruction 
> (which cleaned up the stack) that you could use to escape into a stackless 
> mode of operation.
> 
> -- 
> Anthony Carrico
> 
> -- 
> 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.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/racket-users/6e4191ed-2a54-0a49-f6cb-e5912fa24183%40memebeam.org.

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/E30DDF0E-97CA-423F-9F09-5C1C664CBF91%40gmail.com.


Re: [racket-users] Re: What’s everyone working on this week?

2019-12-13 Thread Anthony Carrico

On 12/13/19 12:26 AM, Nathaniel Griswold wrote:

Could I just write llvm directly? (This is my first time using llvm)


Sure. You should probably play around and write some llvm assembly 
procedures by hand.


I think the main issue with llvm is, or used to be, that you can "call 
with arguments" (that is a normal C procedure call), but you can only 
jump within a single procedure, so it isn't convenient to modularize 
state machines like we can with tail calls in Racket.


Some compilers create special llvm calling conventions to deal with 
this, but it would be nice if there was a standard "jmp with arguments" 
instruction (which cleaned up the stack) that you could use to escape 
into a stackless mode of operation.


--
Anthony Carrico

--
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/6e4191ed-2a54-0a49-f6cb-e5912fa24183%40memebeam.org.


Re: [racket-users] Re: What’s everyone working on this week?

2019-12-12 Thread Nathaniel Griswold
Regarding your question of using llvm directly. Do people do that? I am going 
to figure out as I go but was planning to write the garbage collection part of 
the kernel in C and the procedure application part in machine language. Could I 
just write llvm directly? (This is my first time using llvm)

> On Dec 12, 2019, at 9:06 PM, Sam Tobin-Hochstadt  wrote:
> 
> You might be interested in our project Sham:
> https://github.com/rjnw/sham which is a Racket interface for easily
> using LLVM.
> 
> Documentation coming soon, but you can see some examples here:
> https://github.com/rjnw/sham/tree/master/test
> 
> Sam
> 
>> On Thu, Dec 12, 2019 at 10:03 PM Nathaniel Griswold
>>  wrote:
>> 
>> Racket to generate llvm
>> 
 On Dec 12, 2019, at 3:35 PM, Hendrik Boom  wrote:
>>> 
>>> On Thu, Dec 12, 2019 at 10:49:01AM -0800, Nathaniel Griswold wrote:
 I am almost done with chapter 5 of SICP which i have been working on in
 racket.
 
 My plan now is to write a scheme compiler/interpreter with garbage
 collection that runs in native language in racket. I think i will use llvm.
>>> 
>>> So you'll be using LLVM directly? Or using Racket to generate LLVM code?
>>> 
>>> -- hendrik
>>> 
>>> --
>>> 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.
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/racket-users/20191212213513.rqi6zplqs63vc4ty%40topoi.pooq.com.
>> 
>> --
>> 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.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/racket-users/0F71B923-2FEA-49AB-BA66-B6E31A723A6A%40gmail.com.

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/A0CE0BF5-6332-400F-A217-756065EAA63C%40gmail.com.


Re: [racket-users] Re: What’s everyone working on this week?

2019-12-12 Thread Anthony Carrico

On 12/12/19 10:36 PM, Sam Tobin-Hochstadt wrote:

Yes, basically. I'd say it's showing how to translate that Racket code
(taken from Shriram Krishnmurthi's JFP paper/LL1 talk) into Sham.


Nice. Looking forward to less brief summary of the tool.

--
Anthony Carrico

--
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/1be25cb1-6368-a54a-8834-0a19060f03e5%40memebeam.org.


Re: [racket-users] Re: What’s everyone working on this week?

2019-12-12 Thread Sam Tobin-Hochstadt
Yes, basically. I'd say it's showing how to translate that Racket code
(taken from Shriram Krishnmurthi's JFP paper/LL1 talk) into Sham.

Sam

On Thu, Dec 12, 2019 at 10:32 PM Anthony Carrico  wrote:
>
> On 12/12/19 10:05 PM, Sam Tobin-Hochstadt wrote:
> > You might be interested in our project Sham
>
> So is this compiling a state machine (or, two actually) to llvm and
> running against a Racket oracle?
>https://github.com/rjnw/sham/blob/master/test/automata.rkt
>
> --
> Anthony Carrico
>
> --
> 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.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/racket-users/c619eae3-fac5-9a8f-a35a-dbf5a6921839%40memebeam.org.

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/CAK%3DHD%2BZfZPRKHe0PXgSowJZZO%3DbgC1Ggn9Psk%3DXucikxpEJG8g%40mail.gmail.com.


Re: [racket-users] Re: What’s everyone working on this week?

2019-12-12 Thread Anthony Carrico

On 12/12/19 10:05 PM, Sam Tobin-Hochstadt wrote:

You might be interested in our project Sham


So is this compiling a state machine (or, two actually) to llvm and 
running against a Racket oracle?

  https://github.com/rjnw/sham/blob/master/test/automata.rkt

--
Anthony Carrico

--
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/c619eae3-fac5-9a8f-a35a-dbf5a6921839%40memebeam.org.


Re: [racket-users] Re: What’s everyone working on this week?

2019-12-12 Thread Sam Tobin-Hochstadt
You might be interested in our project Sham:
https://github.com/rjnw/sham which is a Racket interface for easily
using LLVM.

Documentation coming soon, but you can see some examples here:
https://github.com/rjnw/sham/tree/master/test

Sam

On Thu, Dec 12, 2019 at 10:03 PM Nathaniel Griswold
 wrote:
>
> Racket to generate llvm
>
> > On Dec 12, 2019, at 3:35 PM, Hendrik Boom  wrote:
> >
> > On Thu, Dec 12, 2019 at 10:49:01AM -0800, Nathaniel Griswold wrote:
> >> I am almost done with chapter 5 of SICP which i have been working on in
> >> racket.
> >>
> >> My plan now is to write a scheme compiler/interpreter with garbage
> >> collection that runs in native language in racket. I think i will use llvm.
> >
> > So you'll be using LLVM directly? Or using Racket to generate LLVM code?
> >
> > -- hendrik
> >
> > --
> > 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.
> > To view this discussion on the web visit 
> > https://groups.google.com/d/msgid/racket-users/20191212213513.rqi6zplqs63vc4ty%40topoi.pooq.com.
>
> --
> 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.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/racket-users/0F71B923-2FEA-49AB-BA66-B6E31A723A6A%40gmail.com.

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/CAK%3DHD%2BZ0YXV1F5PedmdHAYYphPFmVwQdWPzA2UoEp%3DOfTNB6jg%40mail.gmail.com.


Re: [racket-users] Re: What’s everyone working on this week?

2019-12-12 Thread Nathaniel Griswold
Racket to generate llvm

> On Dec 12, 2019, at 3:35 PM, Hendrik Boom  wrote:
> 
> On Thu, Dec 12, 2019 at 10:49:01AM -0800, Nathaniel Griswold wrote:
>> I am almost done with chapter 5 of SICP which i have been working on in 
>> racket.
>> 
>> My plan now is to write a scheme compiler/interpreter with garbage 
>> collection that runs in native language in racket. I think i will use llvm.
> 
> So you'll be using LLVM directly? Or using Racket to generate LLVM code?
> 
> -- hendrik
> 
> -- 
> 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.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/racket-users/20191212213513.rqi6zplqs63vc4ty%40topoi.pooq.com.

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/0F71B923-2FEA-49AB-BA66-B6E31A723A6A%40gmail.com.


Re: [racket-users] Re: What’s everyone working on this week?

2019-12-12 Thread Hendrik Boom
On Thu, Dec 12, 2019 at 10:49:01AM -0800, Nathaniel Griswold wrote:
> I am almost done with chapter 5 of SICP which i have been working on in 
> racket.
> 
> My plan now is to write a scheme compiler/interpreter with garbage 
> collection that runs in native language in racket. I think i will use llvm.

So you'll be using LLVM directly? Or using Racket to generate LLVM code?

-- hendrik

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/20191212213513.rqi6zplqs63vc4ty%40topoi.pooq.com.


[racket-users] Re: What’s everyone working on this week?

2019-12-12 Thread Nathaniel Griswold
I am almost done with chapter 5 of SICP which i have been working on in 
racket.

My plan now is to write a scheme compiler/interpreter with garbage 
collection that runs in native language in racket. I think i will use llvm.

On Tuesday, December 10, 2019 at 2:13:49 AM UTC-6, Stephen De Gabrielle 
wrote:
>
> New week, new Racket! What are you folks up to? Answer here or
>
> * https://racket.slack.com/ (Sign up at 
> https://racket-slack.herokuapp.com/ )
> * #racket IRC on freenode.net https://botbot.me/freenode/racket/
> * Tweet @racketlang on Twitter
> * Racket discord 
> https://discord.gg/6Zq8sH5
>
> Don’t forget to 
> * sign up, or contribute, to Racket News https://racket-news.com/
> * submit your links to Racket Stories https://racket-stories.com/
> -- 
> 
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/d3751fe1-102c-45a2-9859-af55fd684c4d%40googlegroups.com.


[racket-users] Re: What’s everyone working on this week (46/2019)?

2019-12-06 Thread Geoffrey Knauth
Using Racket to decode BUFR files from Deutscher Wetterdienst and produce 
JSON for consumption by other processes.
ECMWF's eccodes also produces JSON but the JSON it produces is kind of 
ridiculous.
Ridiculous as in starting a new array at each new element within an array, 
making the JSON completely unusable.
Using my BUFR decoder in Racket and Racket's JSON tools, I can write JSON 
that makes sense to people and machines.
I created a new BUFR decoder after looking at GEO::BUFR from Norway 
(written in Perl) and really liking that it works as a decoder.
But I want to work in Racket and make use of Racket's tooling.
Being able to compile a Racket program into a self-contained binary also 
helps a lot.

On Monday, November 18, 2019 at 4:01:30 PM UTC-5, Stephen De Gabrielle 
wrote:
>
> New week, new Racket! What are you folks up to? Answer here or over at 
> /r/racket  !
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/298028d5-703b-4c1e-9ebe-bed7ac849fe0%40googlegroups.com.


[racket-users] Re: What’s everyone working on this week (46/2019)?

2019-11-18 Thread Stephen De Gabrielle
47/2019!

On Monday, November 18, 2019 at 9:01:30 PM UTC, Stephen De Gabrielle wrote:
>
> New week, new Racket! What are you folks up to? Answer here or over at 
> /r/racket  !
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/755b652e-1608-4fa7-8884-79d5a04a2054%40googlegroups.com.