Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-4041-

ITT: ask a scheme guru

Name: this is a secret 2008-02-21 8:02

ask away guys

Name: Anonymous 2008-02-21 8:10

How do I make a game in Scheme?

Name: Anonymous 2008-02-21 8:19

two things
1) how do I pass by "reference"?
say I have a 10MB list, I don't want it all copied when passed to (define (foo l) (car l))!
2) I forgot what my 2nd question was

Name: Anonymous 2008-02-21 8:23

What's the most efficient way to sort a million 32-bit integers?

Name: Anonymous 2008-02-21 8:25

>>4
define efficient.

Name: Anonymous 2008-02-21 8:37

>>4
Do a bubble sort. O(1) for your stated problem, or your money back!

Name: Anonymous 2008-02-21 8:41

Do a quicksort.

Name: Anonymous 2008-02-21 8:41

Explain call/cc.

Name: Anonymous 2008-02-21 9:08

Have you read your SICP today‽

Name: Anonymous 2008-02-21 10:01

>>9
I added Unicode symbol 203d to my keyboard layout.
Now I am wielding an Interrobanging keyboard layout.  Isn't it cool

Name: Anonymous 2008-02-21 10:05

>>10
Well, I am wielding the γρεεκ αλπηαβετ (thought I don't know Greek the slightest bit), isn't it χοολ?

Name: Anonymous 2008-02-21 10:08

>>10
would you care to show how did you do this? I tried
keycode 115 = 0x203d
and the key does nothing.

Name: Anonymous 2008-02-21 10:12

>>12
the keys, they do nuth ing

Name: Anonymous 2008-02-21 10:14

>>12
Found it!  U203D.  Ain't this cool‽

Name: Anonymous 2008-02-21 10:21

>>11
Well, μe too, αctualλy.  Although I didn't add the whole Greek alphabet, only the most used letters.

>>12
Put this http://paste.org.ru/?l4pnux into your ~/.xkb_config and run
xkbcomp .xkb_config $DISPLAY
After that you may apply xmodmap or whatever.

¡Warning!
Numbers and punctuation stuff in the top row is swapped, for, The Sussman sees, it makes easier to type TONS OF PARENTHESES.
Switch between Latin and Cyrillic alphabets by LShift+RShift, unicodery nerdage (group 3 in this layout) is activated by RAlt+<key> or RAlt+Shift+<key>.

Name: Anonymous 2008-02-21 10:28

>>14
Post the whole god damn code for the key, 0xU203D doesn't work for me, I think I'm doing something wrong.

Name: Anonymous 2008-02-21 10:34

>>15
Good. Just tell me how to go back to the moment before running the script.

Name: Anonymous 2008-02-21 10:37

>>17
setxkbmap <yourkeys>

Name: Anonymous 2008-02-21 10:42

Warning:          No symbols defined for <K63> (keycode 190)
Warning:          No symbols defined for <K64> (keycode 191)
Warning:          No symbols defined for <K65> (keycode 192)
Warning:          No symbols defined for <K66> (keycode 193)
Warning:          No symbols defined for <I42> (keycode 194)
Warning:          No symbols defined for <I43> (keycode 195)
Warning:          No symbols defined for <I44> (keycode 196)
etc etc

;_;

Name: Anonymous 2008-02-21 10:44

There should be a simple way to do this with just xmodmap, right?

Name: Anonymous 2008-02-21 10:49

>>19
Don't mind these.

>>20
The point is having a 3-level layout (Dvorak, Йцукен and fancy Unicodery), I'm not sure if this is doable with xmodmap.

Name: Anonymous 2008-02-21 10:52

>>16
0xU203D
0xU203D
0xU203D
0xU203D
0xU203D
0xU203D
0xU203D
0xU203D
0xU203D
0xU203D
0xU203D

EXPERT HEXADECIMAL PROGRAMMER

Name: Anonymous 2008-02-21 10:52

>>21
No, I mean the interrobang. What's its code for xmodmap.

Name: Anonymous 2008-02-21 10:53

I was listening to Symphony No. 8 in G major by Dvorak. Then I listened to some querty

Name: Anonymous 2008-02-21 10:53

>>22
That's not funny, I knew some people who used to do it all the time.

Name: Anonymous 2008-02-21 11:26

>>23
I posted it in #14.  Are you doing something wrong, boy‽

Name: Anonymous 2008-02-21 11:27

I posted it it >>12 and after running the code, the key does nothing.

Name: Anonymous 2008-02-21 11:28

>>27
See #14.

Name: Anonymous 2008-02-21 11:30

>>28
I don't understand what should I do with it.

Name: Anonymous 2008-02-21 11:32

>>29
Copy and paste like a good nigger.

Name: Anonymous 2008-02-21 14:07

>>30
Where?

Name: Anonymous 2008-02-21 15:16

>>31
~/.Xmodmap

Name: Anonymous 2008-02-21 15:17

>>31
Into your .xmodmap it should be right in your homedir are you fucking blind stop asking silly questions.

Name: Anonymous 2008-02-21 15:23

>>33
Did it as in shown in >>12 , just like
keycode 115 = 0x203d
and it doesn't work.

Name: Anonymous 2008-02-21 15:36

>>34
COPY AND FUCKING PASTE FROM #14 YOU STUPID NIGGER YES I HAVE BEEN TROLLED CONSTANTLY

Name: Anonymous 2008-02-21 15:51

>>35
YOU HAVE BEEN TROLLED CONSTANTLY

Name: this is a secret 2008-02-22 8:23

>>3

cons cells are passed by reference, always.




>>8
call/cc ...

THE RESULT OF CALL/CC IS THAT YOU CREATE A "RETURN" FUNCTION:

(define (foo return)
  (return 1)
  (display "fail"))

(call/cc foo) ; the result of call/cc is whatever foo evaluates too, but foo can shortcut the computation and immediatly make (call/cc foo) return a value by calling the function it recieves with the value it wants to return

Name: Anonymous 2008-02-22 9:53

>>8
(define (foo return)
  (return return)
  (display "fail"))

(define a (call/cc return))

(+ 3 (a 42))


WTF? This is the weirdest return statement I have seen.

Name: Anonymous 2008-02-22 10:37

call/cc is fucking simple.
I'm a C fag and I get it (although not with >>37's description; I read the desc from R5RS)
However I do suspect it's possible to create quite complicated procedures with it.

Name: Anonymous 2008-02-22 10:40

>>39
Nobody uses call/cc anyway.

Name: Anonymous 2008-02-22 10:54

Name: Anonymous 2008-02-22 11:00

>>38

Welcome to DrScheme, version 352.
Language: Pretty Big (includes MrEd and Advanced Student).
(define (foo bar) (bar bar))
(define a (call/cc foo))
a
#<continuation>
(a 42)
a
42




HOLY FUCKING SHIT !!!!!
HOLY FUCKING SHIIIIIIIIIIIIIIIIIITTT !!!!!!!!
SOMEONE EMAIL THIS THREAD TO THE WIZARD !!!!

also: 42get

Don't change these.
Name: Email:
Entire Thread Thread List