freenode/lisp - IRC Chatlog
Search
2:29:01
Bike
when they tell you must take it / and you think hell no / got a bad feeling and can't shake it / hits so low / lord of the game
2:48:29
drmeister
I'd love a slime command that evaluated the sexp at point and pasted the result after the form in #| ... |# commented form so that it won't be evaluated if the entire file is evaluated.
3:15:05
Bike
i have something that sort of works but it has a pause for asynchronousness and i don't know enough about slime to remove it.
6:30:46
krwq
hello, how do you check if your code is being run as compiled executable? i have some problems with paths, when i run my app under slime i prefer to use paths relative to package while when app is compiled the package folder doesnt exist so i'd like to use current working directory
6:31:10
krwq
the only idea i have is to set some variable whe saving the image but i'm wondering if there is some better way
6:32:51
BusFactor1
Here's some experiemental sounds from the Common Lisp audio synthesizer I'm writing: http://dropclickpaste.com/#CwdmCYGMBNwNgIYE4AMkDMm4rgVgKYIAc4AjCiqetJEgEa7DrB3ojRA
6:33:03
Bike
Becuase when you dump an image you specify a start function. You could have that function set a compiled-image-p variable to true.
6:34:24
krwq
Bike: that's what I was thinking but I was wondering if there is some already predefined macro or something for that
6:35:41
BusFactor1
Each synth is defined like this: (player (generate-sine :frequencyr (sine-1 100 100) :volumer 4000 :filter 15 :clip 7000 :samples 88200) 4.1) and generated at run time.
6:37:02
BusFactor1
That can be composed at run time. Sort of a syntax for dynamic runtime generated variables.
6:37:09
krwq
Bike: actually i think better solution is to give a switch for each function which would change logic which means id have to set it explicitly
6:39:30
BusFactor1
to use a 'typer' variable, you wrap it in something like a cast, like (floatr x) to get the float value of a typer x
6:40:06
krwq
BusFactor1: i used to have similar concept when i was playing with html5 drawing in javascript
6:40:59
BusFactor1
with every variable being a function called at runtime...it allows for easy composibilty in the synth
6:41:04
krwq
BusFactor1: it gets quite cumbersome after a while while in lisp the symbol macrolets will shorten and clarify what's going on
6:41:35
BusFactor1
i find my method of wrapping the variable in a cast like structure is actually quite natural and compact
6:41:57
krwq
BusFactor1: but you're right there's no point of prematurely doing too much, you can write a simple macro in the end to fix that
6:42:44
BusFactor1
i'm planning on releasing my next album with full source code for the generation of it
6:45:49
Bike
hm, slime-macroexpand doesn't bind *print-readably* true, i'm not sure if that's good or bad
6:47:17
Bike
but if people mostly use it for inspection, and printing readably makes it ugly enough...
7:19:22
slark
hi, why '(quote foo) or the equivalent (list 'quote 'foo) evaluate to 'foo on my repl ? i tought that '(quote foo) should return (quote foo) on my repl, like '(+ 1 1) returns (+ 1 1)
7:23:31
beach
The printer uses that syntax because when 'foo is seen by READ, then the list (QUOTE FOO) is returned.
7:27:20
reepca`
evaluating 'foo just produces FOO the symbol, though. When we talk about what some string representation "is" I assume we mean what it gets read in as, right?
7:28:26
edgar-rft
beach: sorry, better attempt, I agree that 'foo is read as (quote foo), but why then does (litp 'foo) return NIL?
7:28:46
slark
edgar-rft: well understand that 'foo is (quote foo) literatly if you want to pass it to listp you have to (listp '(quote foo)), (listp (quote foo)) is not what we need
7:29:00
beach
edgar-rft: Because LISTP is a function, so the argument gets evaluated before the function is applied.
8:07:02
beach
My USE finder is working out quite well. It would be even better to have that functionality in Second Climacs, though. At the moment, all symbols in a file that are imported from a different package are returned. In Second Climacs, I could (once I implement that functionality) avoid returning lexical variables.
8:12:28
BusFactor1
Here's another track from my synth: http://dropclickpaste.com/#AwRgrCBGAmIEwDYAsBjJB2Md1wJwA50Rw8AzUgQ3QujDHwFMRpcHgg
8:29:48
BusFactor1
Sorry about that. Maybe it 's the site. Here's another direct link: http://busfactor1.ca/kruhft%20-%20new%20synth%207%20-%202017.mp3
11:21:49
dim
my goal here is to play at discovering programming with the kids, I'd like to do something visual for starters, maybe code our own little minesweeper game
11:35:41
dim
supposing that's ok, can I use it a a full IDE where you can live edit the code you're running?
11:37:28
beach
You have the CLIM listener, Climacs, Clouseau, the CLIM debugger (similar to the SLIME debugger, i.e., not a debugger at all).
12:02:22
dim
I just had the idea that MCCLIM might actually be exactly what I want, a kind of more visual Emacs environment where you can program and interact with your code and draw things
12:10:07
dim
I don't think you learn/teach the same things with scratch and visual blocks and with writing (pseudo-) code
12:14:58
varjag
programming in mcclim requires good command of common lisp and understanding of quite advanced ui concepts
12:23:19
fourier
Lisp yes, CL not. learn programming with CL is as hard as learn programming with C++
12:24:37
parjanya
who knows the effect of learning Lisp first would have, this might be a very interesting thing to test
12:25:26
varjag
pjb: there is no such environment and i don't see anyone on making it, so the point is moot
12:28:17
fourier
I would love kids studying "guide to packages" or reader macros, studying anaphoric macros in a mean time
12:32:31
pjb
If you're told about it, you may run the emacs tutorial, but otherwise you just jump into emacs: it's intuitive.
12:32:56
pjb
(ie. you type a letter, and it inserts a letter, contrarily to some other editor of the vi conviction).
12:33:39
pjb
varjag: now the only remaining problem for the age range discussed, is that scratch is in English.
12:36:56
_death
a kid should start with a retro machine.. logo, assembly, basic... but that's my path so I may be biased :)
12:37:13
pjb
pascal is a good programming language (way better than C). Of course, you could teach kids pascal (for the typed procedural kind of programming languages), but there are better choices, such as Modula-2, Oberon or Modula-3.
12:37:24
dim
_death: I want to transform my RPi here into exactly that, a lisp machine like environment would be a dream
12:38:41
pjb
Or, if we had a high level sophisticated professionnal programming environment, we could directly throw them on it, but that's not the case (Xcode is horrible for the languages it compiles, I won't even mention Android Studio).
12:40:25
dim
varjag: the fun thing about kids is that they don't have a clue about what is complex or sophisticated, they just want to have fun
12:42:44
dim
I just tried printing unicode characters on the termninal with several ncurses based lib and failed miserably
12:44:13
beach
dim: My application Transclime for learning Vietnamese uses McCLIM. The characters are displayed just fine.
12:44:49
dim
I have quite a TODO on my plate already but with some luck will get down to trying MCCLIM later today
12:47:25
fourier
pjb: I find XCode really good at what it does. Defining actions on buttons by drag&drop buttons to the parts of code where you want to have callback? awesome! don't remember any other environment like this. It has its downsides (like crashes on refactoring attempts), but it is really good integrated with llvm, and a profiler is great as well.
12:50:36
fourier
never tried Android Studio, but IDEA which it is based on is fantastic for Java and Android development. Nothing is better.
12:53:18
pjb
fourier: it's good, but what I mean is that for newbies, it drags a lot of history and "unintegrated" pieces. Assuming that AI won't do all our programming in 50 years, imagine what kind of development environment you would want to work with, and what kind of programming language!
12:58:28
beach
dim: I just double checked that it also works in the listener. It does: http://metamodular.com/CLIM-listener.png
13:01:21
fourier
for newbies as I said, it looks like there is nothing better than Scratch or DrRacket. I personally believe kids could get easy with Python as well - it is highly accessible, intuitive and its documentation is great
13:03:51
myrkraverk
fourier: python has some drawbacks when it comes to nontrivial projects though (but I didn't write what those were, and don't remember the details anymore)
13:03:53
dim
for kids my constraints are: 1. you control *all* that happens on the screen (console is great) 2. you can play interactively with the code you write 3. you don't have to learn what a file is and how to compile it and what is a binary image
13:05:09
dim
I don't think you can learn python without being introduced to the file system and what is a text editor first
13:05:50
dim
myrkraverk: true, but it's not visual enough for my taste and ambitions, which is on top of the constraints
13:06:43
dim
first, some pgloader bugs to get done with, then re-publish tapoueh.org, then my weekly reporting, then MCCLIM, tho
13:08:28
dim
a “nice to have” that I think I'm going to forget about is that it should be easy to show up to a friend's place with what you did and show them and play with it with them
13:09:15
dim
that implies your usb stick embeds a Portable self-contained thing that can run on windows, mac or linux --- even game studios don't make that