Sorting a Hash by integer value of hash key in Ruby 1.9

Given the following hash: {"7"=>"Ada (gnat-4.3.2)", "13"=>"Assembler (nasm-2.07)", "45"=>"Assembler (gcc-4.3.4)", "104"=>"AWK (gawk) (gawk-3.1.6)", "105"=>"AWK (mawk) (mawk-1.3.3)", "28"=>"Bash...

What is the "return" in scheme?

I am trying to translate some python code to scheme. def test(x): if x > 1: do something if x > 10: return if x == 4: do something test(11) I did not find...

scheme r7rs-large interesting but... is it still in progress?

I am trying to take a look at the status of r7rs large but I cannot find any information in scheme reports page, etc, just a talk from 2013. I searched around with google without success as...

gnu/libtool (libltdl) installed but not found by configure script

I am trying to install guile locally on a system. It requires gnu/libtool. While installing all its dependencies, the "make check" command showed errors while installing gnu/libtool. But if I...

How to change current directory in GNU Make

I want to separate the directory with sources from the directory with targets. And it seems that changing the current working directory from Makefile should be the simplest solution. Explicit path...

Pass command line options to guile via geiser

Geiser can be configured to read ~/.guile when running Guile from within Emacs. I would like to append command line options to the argument list passed to guile. Is there a variable that holds the...

Is recent GTK 3.22 still Boehm GC friendly (thread issue)?

The Boehm's conservative garbage collector is quite useful (e.g. Bigloo is using it, Guile is using something similar, etc....), notably on Linux (which is the only OS I care about; I'm using...

Guile build error on linux

I get the following error(s), when building guile. The error is with both the versions, version 2.2.2, version 2.2.0 and version 2.0.14 fports.c: In function...

GNU Make: chdir make process itself

Is it possible to use a makefile that directs the make process itself to chdir? I want to write a makefile that expects to be executed from the build directory. Suppose I have a project directory...

Can't find libunistring when building guile from nonstandard location

I'm trying to build Guile 2.2. I've installed libunistring to /path/to/libunistring. When I run ./configure --with-libunistring-prefix=/path/to/libunistring/ it fails, because it can't find...

scheme format function missing from gambit

I attempted to run a gambit scheme script that was previously run with guile. I noticed that gambit fails because it is missing the "format" function. Is format not part of scheme? (format #t...

My code signals the error "application: not a procedure" or "call to non procedure"

During the execution of my code I get the following errors in the different Scheme implementations: Racket: application: not a procedure; expected a procedure that can be applied to arguments ...

React - TypeError: Cannot read property 'props' of undefined

I'm trying to create a click event be able to delete an item on my list, but when I click it I get "TypeError: Cannot read property 'props' of undefined". I'm trying to stick to ES6 as much as...

gdb 8.2 can't recognized executable file on macOS Mojave 10.14

I get gdb by brew install gdb. The source file content is: #include <cstdio> int main(){ int a = 10; for(int i = 0; i< 10; i++){ a += i; } printf("%d\n",a); return...

Make an executable Guile program with auto-tools?

Recently started learning to use auto-tools and have been trying make a simple Guile program with it. Following this tutorial I got the program successfully compiling, with the .go file placed in...

Scheme Programming Language Support with Manjaro Arm?

I am trying out Manjaro Arm on my Raspberry Pi 3, but surprisingly find only Guile as the only viable Scheme interpreter/REPL. I have tried the following: Racket, and Mit-Scheme not found by...

My lisp macro stops working in latest guile

I have macro that I've written in 2010, it was for managing structures like in Common Lips using Alists (here is whole file including functions https://jcubic.pl/struct.txt). (define-macro...

How to install Python 3.6 on Ubuntu 19.04?

I've recently installed Ubuntu 19.04 which has Python 3.7 by default. I need to work on multiple projects that use Python 3.6. Is there a way to install it on Disco Dingo? I tried which works on...

Scheme get last command in guile

Normally in a terminal (or any other command prompt I've previously used) I'll press the up key to get the last entered command. However, when doing that in the guile interpreter, I just...

Scheme dict operations

I am looking to understanding some hashmap code in lisp, and am using python as a reference. Are the following two roughly the same? And if so, how can I see what my dict object looks like? #...

guile-config fails to run

I am trying to install libgraph in my WSL Ubuntu 20.04 installation. I installed all the necessary packages. But when I try to configure libgraph, it fails with this: $ ./configure checking build...

Tracing in Guile - How to trace in Guile Scheme

What are the equivalents in Guile Scheme of the (trace procedure) and (trace-let (bindings) body) tracing facilities from Chez Scheme. I've reviewed the documentation at...

How do you get the response data as string using (web client) in guile?

I'm trying to get the response data as a string using the docs found here https://www.gnu.org/software/guile/manual/html_node/Web-Client.html. The document mentions that http-request: Returns two...

Racket/Scheme compile to single binary, no dependencies? FFI and static linking

Say I'm building an app in Racket. And say eventually I want to compile that app as a single binary file that could be distributed to users, without them having Racket or any other software libs...

If-else statement error in Scheme using guile

Total newbie to Scheme here. I've been stuck on a scheme problem for sometime now. I don't understand how to code this right. I've looked every where on this site and others, and I just can't get...

Linking guile to Rcpp

I am trying to link guile to an Rcpp file. It seems like things compile but there is an error when loading: sourceCpp("test_2.cpp", rebuild = TRUE, showOutput = TRUE) /usr/lib/R/bin/R CMD SHLIB...

xdotool key ignored by Firefox while working on other windows

I'm on Ubuntu 20, Firefox 84.0 (64-bit). I've been trying to use xbindkeys and xdotool to create custom keyboard shortcuts for special characters like '→' or '«' (in brief, I hate compose key...

How to show error message from eval in Scheme?

I'm trying to create code that evaluates expression and return error as string for error: (cond-expand (gambit) (gauche) (kawa) (guile (import (rnrs base) (rnrs exceptions) ...

Can't build GnuTLS, undefined reference to gmp

I wanted to try out GnuTLS (3.6.15). I installed p11-kit, nettle, and gmp. For libtasn1 and unistring I used ./configure flags (--with-included-unistring and --with-included-libtasn1). Full call...

Unable to install libgraph in linux ubuntu 20.04

I am trying to install libgraph in ubuntu 20.04 but whenever I run make command after ./configure command I get this error: Makefile:409: warning: ignoring old recipe for target 'libgraph.pc' make...

Relevant tags