IRC channel logs

2015-07-09.log

back to list of logs

<nalaginrut>morning guilers~
<ajnirp>hello guile, i have a bit of a situation
<ajnirp>the second course taught to CS students in my university is named 'abstractions and paradigms in programming' and it's basically the whole functional programming 101 experience
<ajnirp>traditionally it has consisted of scheme (racket, to be precise), with maybe a little prolog tacked on at the tail-end of the course
<ajnirp>the idea is to expose students to other paradigms and while it's not exactly CS 101 (that's the first course) it is in some sense similar to the now-discontinued MIT scheme courses
<ajnirp>the recommended course textbook is even SICP, for context
<ajnirp>now the undergraduate committe is proposing to replace scheme with c++, arguing that students are more familiar with c++ anyway (the CS 101 course uses that, and changing THAT is non-negotiable)
<ajnirp>i'm in the middle of an email thread with a couple of other batchmates (i just graduated, and this is a second-semester/first-year course) discussing this with the professor who's slated to teach the course next semester
<ajnirp>he just asked us each to give an example of a program that is "better written in scheme than in c++"
<ajnirp>i guess he basically wants us to make a case for scheme
<ajnirp>the request is somewhat vaguely worded, but i have *some* ideas in mind
<ajnirp>and i was wondering if any of you could help me out with your own suggestions for programs that are "better written" in scheme than in c++
<ajnirp>if anyone is interested, i could upload the draft in which the committee lays out its proposals for the course
<baelor>Hmmm, have you also asked #scheme?
<ajnirp>i haven't yet. i'll do that
<baelor>You'll need the right people so that the argument doesn't devolve into fanservice, which I am not :(
<ajnirp>hehe. i don't think there's much debate in their minds as to which *dialect* to use (it's been pltscheme/racket all this while), the issue is really how do i convince the committee folks to continue using scheme
<baelor>You could argue that scheme will explain more about how languages are built, and also the heavy focus on abstraction
<ajnirp>hmmm, so maybe i could talk about how it's easy to write a scheme interpreter in itself? at least, easier than writing a c++ compiler in itself
<mark_weaver><ajnirp> the idea is to expose students to other paradigms
<mark_weaver>and that is where scheme shines
<mark_weaver>scheme is very well suited to support a wide range of programming styles
<ajnirp>agreed. so i need a program that demonstrates scheme's support for a number of paradigms.
<mark_weaver>"The Reasoned Schemer" textbook illustrates this point very well. a radically different way of programming, and then you see the simple and elegant embedding of it in just a few pages of scheme at the end of the book
<mark_weaver>I recommend you pick up a copy of that book
<mark_weaver>the constraint/logic programming system described in the book is also known as mini Kanren
<mark_weaver>and this is not merely another language implemented from scratch in scheme. it is *embedded* in scheme.
<mark_weaver>as a set of macros
<adhoc>ajnirp: the introspection in the REPL is the big win
<adhoc>ajnirp: the disconnect of the C++ build cycle increases the feedback loop time between write and execute,
<ajnirp>agreed, i mentioned this in the email chain
<adhoc>ajnirp: there is a C++ on LLVM REPL recently release, it lists a good list of argments why a REPL is such a good teaching medium
<ajnirp>mark_weaver: are there freely available excerpts from the book online?
<adhoc>but the reasons for using C++ for teaching are small
<mark_weaver>ajnirp: afaik, no.
<mark_weaver>I'm sorry about that, but it's still the best example I know.
<adhoc>ajnirp: sample chapters at; http://www.ccs.neu.edu/home/matthias/BTLS/
<ajnirp>i'll order it anyway, but it sounds like a very good example of what he seems to be looking for
<adhoc>not sure if that helps
<adhoc>ajnirp: http://www.bookdepository.com/Reasoned-Schemer-Daniel-Friedman/9780262562140
<mark_weaver>the inside back cover of the book contains the key code of the system, and it's breathtaking how short it is.
<mark_weaver>although there is some support code in the preceeding pages as well.
<ajnirp>adhoc: there is indeed a link to TRS there, but it simply links to amazon. doesn't seem to be available online
<adhoc>ajnirp: no, not the whole book
<adhoc> http://www.ccs.neu.edu/home/matthias/BTLS/sample.pdf
<ajnirp>that's TLS, great book. i'm working my way through it in my free time
<adhoc>that link gives you an example of the layout of the book and how it decomposes problems
<adhoc>ah
<mark_weaver>Racket picture language, whatever it's called, is also probably a good demonstration of the coolness of the REPL, if you can learn to do a few non-trivial things wit hit.
<mark_weaver>*with it
<mark_weaver>I think the REPL is another key advantage that might worth mentioning, although it might be less compelling.
<adhoc>ajnirp: you know whom john carmack is ?
<ajnirp>mark_weaver: though it might not be the strongest pedagogical reason, i think the picture language would be a good selling point
<ajnirp>adhoc: yes, i believe he was talking about using scheme for VR scripting in a racket google group recently, right?
<adhoc>indeed
<ajnirp>ok, so i can talk about 1. kanren being a logic constraint language and 2. racket's picture language and 3. the VR scripting thread
<ajnirp>ACTION goes off to find the link
<ajnirp>ACTION https://news.ycombinator.com/item?id=9810342
<adhoc> https://groups.google.com/forum/#!msg/racket-users/RFlh0o6l3Ls/8InN7uz-Mv4J
<nalaginrut>well, last time I think Carmack said he's trying to use typed Scheme in his server for kind of prototype
<nalaginrut>and he said it's cool
<nalaginrut>ACTION is finding twitter...
<adhoc>nalaginrut: yes, part of that was the for the environment building for the oculus
<nalaginrut>the only thing I feel sad is that Carmack said it doesn't support Linux at present, or I really want to buy one
<nalaginrut>well, I like his style, he said he likes Scheme, then he uses it
<adhoc>who baught oculus rift recently ?
***michel_mno_afk is now known as michel_mno
***michel_mno is now known as michel_mno_afk
<taylanub>so Carmack is using Chibi, which is R7RS, and looking into how he can make Racket closer to R7RS...
<nalaginrut>I guess one of the reason he use Racket is because of typed
<nalaginrut>it's not so easy to accept dynamic type for a static type lang guru
<nalaginrut>;-)
***michel_mno_afk is now known as michel_mno
<ArneBab>ajnirp: my university did the programming introduction in C++. I stopped attending after 3 months and rather learned programming on my own with Python. A 2-week-course sufficed to get from that to being able to work on C++ projects.
<ArneBab>we spent more time fighting with the C++ syntax than with understanding the problem.
<ArneBab>after understanding how programming works, the additional syntax is easy. Understanding complex syntax and programming at the same time is hard.
<ArneBab>and to do anything in C++ which you couldn’t do in C, you need complex syntax.
***cmatei_ is now known as cmatei
<ajnirp>ArneBab: the situation here is that we have students who have already completed a CS 101 course in c++
<ajnirp>now the professors are arguing that they therefore will have it easier if the paradigms course is also in c++ - i don't think that's true myself but that's the argument they're putting forward
<ArneBab>ajnirp: that complicates the matter. How complex are the examples to use in the paradigms course?
<ArneBab>If you could show them that they take half a slide in Scheme but 2 slides in C++, that could give a good line of argumentation
<wleslie>Paradigms in Reading Template Expansion Errors 101
<ArneBab>(always for self-contained code)
<ArneBab>“here’s the essential part of the code in C++ on 2 slides and here’s the whole code in Scheme on half a slide”
<ArneBab>naturally you’ll first have to know which examples they want to use and check whether the Scheme solution is actually much shorter and easier to understand
<ArneBab>sadly a former professor of mine had a bad experience teaching people to program with scheme :(
<ArneBab>I did not yet find out exactly why
<ajnirp>this is a good idea. i do have some study material lying around from three years ago when i did the course. i could port some examples to c++
<ajnirp>for context, here's the report
<wleslie>scheme
<ajnirp> https://usercontent.irccloud-cdn.com/file/ABP2fOWo/review.pdf
<wleslie>Common Subexpression Elimination
<amz3>héllo :)
<amz3>davexunit: do you have some a markdown backend for hound ?
<davexunit>amz3: you mean haunt? no.
<wleslie>ajnirp: tl;dr: it's hard to learn how to do these things in C++ by learning how to do them in scheme.
<amz3>davexunit: yes hound
<amz3>sorry haunt
<ajnirp>wleslie: like CSE? yeah true
<wleslie>more like upward funargs S:
<wleslie>"the programming problems should involve irregular and symbolic data, eg. mathematical expressions"
<wleslie>a finite domain solver is literally the extent anyone should have to write C(++) if they are not going into embedded systems design
<davexunit>amz3: someone posted a markdown library for guile on reddit last week, but unfortunately it's a wrapper around a C library that is bundled with it.
<davexunit>and the guile C api is used instead of the FFI
<davexunit>and there's no autotools, just a Makefile.
<davexunit>sooo... it needs some work.
<amz3>which subreddit is it ?
<davexunit>r/scheme
<amz3>both sundown and hoedown don't have support for code highlighting using ``` ala github
<amz3>I can't use the indentation based thing
<davexunit>amz3: code highlighting requires something like pygments to be used
<davexunit>no markdown parser will do that for you
<amz3>Maybe. Should I help guilegreg get his project running or what?
<amz3>we will still have the issue of shipping sundown
<davexunit>I don't know anything about sundown
<davexunit>apparently it's good, but deprecated.
<davexunit>I was after a pure guile implementation
<amz3>I was after doing that with guile-reader
<amz3>I can probably just get it working with haunt alone
<davexunit>I want a parser combinator for this purpose, but I don't have the ambition to put it all together.
<amz3>hmm
<amz3>I'll have a look at parser combinators then :p
<amz3>I'm trying to make a website for artanis
<davexunit>it's a rabbit hole
<davexunit>fair warning
<amz3>artanis? or doing webistes?
<amz3>don't say both ;)
<davexunit>parser combinators
<amz3>huhu
<amz3>at least I won't be doing html or css
<davexunit>I'm going to switch my blog over to haunt at some point...
<davexunit>need to convert my restructedtext posts to markdown and integrate a markdown parser
<davexunit>might be as hacky as just calling the 'markdown' program.
<amz3>restructuredtext is painful
<davexunit>yeah
<davexunit>should've used markdown
<davexunit>but I was going through an anti-markdown phase
<davexunit>org-mode would be best, of course. :)
<wleslie>reST painful? preferring markdown? bizzaro.
<zacts>davexunit: I've had such a difficult time grokking org-mode
<zacts>especially when you have multiple org files, and how to organize everything
<zacts>right now I'm still using plain text files, but also taskwarrior
<zacts>for my todo's
<zacts>for blogging and wikis, still markdown
<zacts>taskwarrior is neat though, and it keeps things organized so I don't have to worry about multiple files
<amz3>davexunit: there is org-mode in skribilo
<davexunit>amz3: oh? I imagine it's some subset of org-mode syntax.
<davexunit>which would be fine, honestly.
***michel_mno is now known as michel_mno_afk
<mark_weaver>davexunit: the container tests fail on my Libreboot X200 running GuixSD
<mark_weaver>tests/containers.scm:71: FAIL call-with-container, all namespaces
<mark_weaver>bah, wrong channel again..
<jmd>We need a filter to check that postings are appropriate to the channel.
<amz3>davexunit: yes, I think skribillo website (and documentation) is written using the outline mode (the org-mode like markup)
<davexunit>amz3: oh, that's different than org-mode.
<amz3>no that's not full org-mode
<amz3>I did a try at understanding GLL @ http://pamrel.lu/3368b/
<amz3>what i understand is that I don't want to reinvent the wheel, I will bind some c lib
<amz3>GLL is a parser combinator library for racket
<amz3>also there is an implementation of parser combinator in guile-og
<amz3>guile-log
<amz3>even if probably macro-terse
<stis>amz3: guile-log has macros, but the combinators is mainly functions.
<stis>There is macros that generates the combinator framework for you.
<stis>Look how it is done for python.