#racket

/

      • montanonic joined the channel
      • jeapostrophe has quit
      • jeapostrophe joined the channel
      • jeapostrophe has quit
      • jeapostrophe joined the channel
      • wtetzner joined the channel
      • jshjsh joined the channel
      • stamourv
        kefin: I think with lexi-lambda's scripty package, it can.
      • lexi-lambda
        Yeah, in a sense, scripty is building PLaneT’s dynamic delivery component on top of the package system.
      • pgiarrusso has quit
      • nomicflux joined the channel
      • montanonic joined the channel
      • montanonic has quit
      • lisp99
        can i use regexp-match with a sequence?
      • lexi-lambda
        lisp99: what do you mean? like a sequence of characters or something else?
      • lisp99
        like a racket sequence
      • lexi-lambda
        right, but what would regexp-match on a sequence mean, exactly?
      • lisp99
        sequence would produce chars
      • lexi-lambda: i think carrying input-port and adjusting positions might work
      • lexi-lambda
        ah, I don’t think there’s a direct way, though I could imagine a couple ways of doing it indirectly. why use a sequence of chars instead of a string?
      • lisp99
        lexi-lambda: it's from a huge file i don't want to load all of it in memory
      • lexi-lambda
        ok, yeah, you could use an input port for that.
      • you could probably even make an input port that draws from a sequence of characters if you wanted to use a sequence but still have laziness.
      • lisp99
        yeah thanks
      • montanonic joined the channel
      • jshjsh is now known as JoshS
      • teruyo has quit
      • TikityTik
        I had to kill an infinite loop in racket, how do i stop racket from showing the line that broke, can't read the code with a giant strikethrough
      • lisp99
        btw lexi-lambda do you know some serialization lib for persistant storage for racket?
      • i didn't find protobuf for racket in packages
      • cemerick joined the channel
      • asumu
        lisp99: there looks to be a protobuf library on the old package system: http://planet.racket-lang.org/display.ss?packag...
      • cemerick has quit
      • cemerick joined the channel
      • teruyo joined the channel
      • slemonide joined the channel
      • slemonide has quit
      • jeapostrophe has quit
      • jshjsh joined the channel
      • JoshS has quit
      • jshjsh joined the channel
      • JoshS has quit
      • UserJosh joined the channel
      • UserJosh is now known as JoshS
      • acarrico joined the channel
      • georges-duperon has quit
      • bremner
        does anyone know how to teach racket-mode about indenting new forms? it wants to line up the cases with the "WAE" argument here, which is not great http://paste.debian.net/912086/
      • JoshS has quit
      • mizu_no_oto joined the channel
      • georges-duperon joined the channel
      • fschuindt joined the channel
      • jeapostrophe joined the channel
      • jeapostrophe has quit
      • jeapostrophe joined the channel
      • peatmoss has quit
      • jeapostrophe has quit
      • jao has quit
      • peatmoss joined the channel
      • dented42 has quit
      • fschuindt has quit
      • montanonic joined the channel
      • pi- joined the channel
      • pi-
        In http://download.racket-lang.org/releases/6.8/do... I see `(let ([p12 (hc-append p1 p2)]` but the use of `[...]` isn't explained.
      • lambda-smith joined the channel
      • lexi-lambda
        pi-: square brackets and parentheses are interchangeable in Racket
      • they are just used in certain situations idiomatically to improve readability
      • pi-
        tx!
      • lambda-smith has quit
      • cemerick has quit
      • pilne has quit
      • pi- has quit
      • badkins has quit
      • jeapostrophe joined the channel
      • jeapostrophe has quit
      • jeapostrophe joined the channel
      • jeapostrophe has quit
      • endobson joined the channel
      • stamourv
        bremner: `(put 'type-case 'racket-indent-function 2)`, I think.
      • Ah, good old WAEs. :)
      • I'm teaching the same class you are, I believe.
      • We're doing state tomorrow.
      • lexi-lambda
        Cross-posting from the slack channel: I’m having issues when trying to install packages on mac from pkgs.racket-lang.org. Can anyone reproduce that, or is it just me?
      • For context, I am on HEAD. I should probably try Racket 6.8…
      • stamourv
        My out-of-date HEAD build works.
      • lexi-lambda
        I seem to be able to reproduce the issue on my work laptop, so it’s not my machine, but it could be my network.
      • ArneBab_ joined the channel
      • Yeah, I seem to be having the same issue with non-HEAD. Weirdly, though, I can curl the relevant endpoints just fine. :/
      • stamourv
        Odd.
      • fschuindt joined the channel
      • lexi-lambda
        I am very confused. (port->string (get-pure-port (string->url "https://pkgs.racket-lang.org/pkg/compatibility-lib"))) hangs for me but the equivalent curl command returns immediately.
      • dan_f_ joined the channel
      • manualcrank has quit
      • nomicflux has quit
      • fschuindt has quit
      • nomicflux joined the channel
      • nomicflux has quit
      • montanonic joined the channel
      • jeapostrophe joined the channel
      • jeapostrophe has quit
      • jeapostrophe joined the channel
      • Seemed to be a local network issue; power cycling my modem fixed it. Sorry for the noise!
      • (One sign was IPv6 seemed to stop working entirely, but I don’t know if that was the cause or just another symptom.)
      • dented42 joined the channel
      • jeapostrophe has quit
      • dan_f_ has quit
      • jeapostrophe joined the channel
      • jeapostrophe has quit
      • jeapostrophe joined the channel
      • jeapostrophe has quit
      • ZombieChicken joined the channel
      • ZombieChicken
        Hello. Is there a way to make an arguement to a function optional?
      • lexi-lambda
        ZombieChicken: Yes. You can surround it in brackets and provide a default value, like (define (f [x 0]) x).
      • ZombieChicken
        Ah, thanks
      • though square brackets seems weird for a Lisp...
      • lexi-lambda
        square brackets and parens are interchangeable in Racket, so you could technically just use parentheses there, instead
      • but it’s idiomatic to use brackets for readability’s sake
      • ZombieChicken
        Yeah, I get it
      • tilpner
        rudybot: (define (foo x [y 1]) (+ x y)) (foo 41) (foo 40 2)
      • rudybot
        tilpner: ORBIT_SOCKETDIR=/tmp/orbit-sisi SSH_AGENT_PID=1537 TERM=xterm SHELL=/bin/bash XDG_SESSION_COOKIE=6b5c60142a2634cedcdd5b034d4d9d9c-1303590047.444389-1602530466 WINDOWID=65011715 GNOME_KEYRING_CONTROL=/tmp/keyring-cNOUBy GTK_MODULES=canberra-gtk-module USER=sisi LS_COLORS=rs=0:di=01;34:ln=01;36:hl=44;37:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:
      • tilpner
        I love whoever is responsible for this
      • ZombieChicken
        let me guess, the bot needs a (hard) reset?
      • lexi-lambda
        nah, just needs a firm talking to
      • rudybot: eval (define (foo x [y 1]) (+ x y)) (foo 41) (foo 40 2)
      • rudybot
        lexi-lambda: ; Value: 42
      • lexi-lambda
        speaking of complete nonsense, could someone on Mac OS try running this and tell me if you get an SSL error or not? http://pasterack.org/pastes/31275
      • asumu
        I wonder what else rudybot has got inside.
      • rudybot: passwd
      • rudybot
        asumu: I am still trying to figure it out. when I type /whois i get ircname: unknown and /msg nickserv indentify passwd doesn't seem to work
      • lexi-lambda
        for some reason Racket does not seem to be picking up whatever certificate google uses, but it seems to work fine for other websites over HTTPS
      • not sure where that cert is stored on Mac OS but I’d like to know if it’s just my machine being weird :p
      • ZombieChicken
        asumu: I'm sure there is some weird nonsense you can get the bot to do with system calls, like resetting the password
      • lexi-lambda
        the bot is (fortunately) sandboxed
      • rudybot: eval (system "cat /etc/passwd")
      • rudybot
        lexi-lambda: error: subprocess: `execute' access denied for /bin/sh
      • ZombieChicken
        One other thing; I'm running a bunch of functions over and over again, and usually only changing a few params between calls. Is there a way to recall the previously run command in drracket w/o cut+paste or typing things out long-hand?
      • lexi-lambda
        Ctrl+Up should do the trick
      • ZombieChicken
        lexi-lambda: You have no idea how much typing you just saved me. Thanks
      • asumu
        You can indeed break the bot sometimes with mean tricks, like using Typed Racket bugs.
      • (or various bugs in the runtime, I'm sure there are some that were fixed between v6.6 that rudybot runs and v6.8)
      • ZombieChicken
        How reverse-compatible does Racket tend to be? Do they break things regularly?
      • jeapostrophe joined the channel
      • jeapostrophe has quit
      • jeapostrophe joined the channel
      • asumu
        The dev team tries really hard not to break backwards compatibility. So no, not regularly.
      • ZombieChicken
        okay, thanks
      • dented42 has quit
      • ZombieChicken has left the channel
      • jeapostrophe has quit
      • georges-duperon
        rudybot: eval (require racket/ops/unsafe) (unsafe-car '(1 . 2))