<midfavila>
really primitive multiplexer, but I like it more than tmux or screen
<midfavila>
unfortunately it relies quite a bit on GNU Curses
<midfavila>
... at least, I think ncurses is gnu?
<midfavila>
huh, it's not
<midfavila>
x11 license
<midfavila>
anyway, it relies on ncurses functions that nbsd curses doesn't have
<testuser[m]>
use termbox
<phoebos>
the makefile is a mess
<phoebos>
needs a wgetscrreg
<midfavila>
yeah obvs, but that seems to be from ncurses, and replacing ncurses with nbsd curses breaks the build, so
<midfavila>
maybe I made the incorrect assumption that nbsd curses doesn't have it, idk
<phoebos>
no, nbsd curses doesn't have wgetscrreg
<phoebos>
but that's the only thing i think
<midfavila>
yeah, afaik it is
<phoebos>
what's wrong with tmux
<midfavila>
i just... don't like it :v
<phoebos>
this looks like a smaller tmux
<midfavila>
i've tried it in the past and I find it to be clunky and more than I need
<testuser[m]>
midfavila: how's math
<phoebos>
lol
<midfavila>
math is going okayish, been focusing more on programming lately
<midfavila>
now that I'm done with my internship and college (for the most part, anyway) I'll be able to spend more time doing stuff I actually care about
<midfavila>
just finishing up the little schemer this morning, it's a wonderful little book
<testuser[m]>
jerb?
<midfavila>
no jerb for me
<midfavila>
not yet anyway
<phoebos>
i found a copy of the little schemer, but i have no idea how to read it
<phoebos>
it doesn't make much sense to me
<midfavila>
read it like a dialogue
<midfavila>
left column is from an idealized student, right column is a response from the authors
<midfavila>
it's kind of clunky at times, though, and I don't like how they treat some of the more advanced topics that are covered
<midfavila>
namely their explanations of continuations
<phoebos>
it's a weird weird way to learn
<midfavila>
yeah, it's strange, but when it works it works
<midfavila>
although I'm definitely looking forward to going back to a more mundane expository style :v
<midfavila>
there are a bunch of bits where they're like "write this thing"
<midfavila>
and then I spend a half hour or more trying to write the thing,
<midfavila>
and then I give up and check the right hand side, only to see "we didn't expect you to be able to"
<phoebos>
lmao
<midfavila>
feels like a cruel joke in some ways, pff
<phoebos>
K&R is the platonic ideal of an introductory programming book
<midfavila>
eeeeeeeeeehmaybe
<phoebos>
pretty much
<midfavila>
i think K&R has good style, but the pacing can be fast at times and it assumes the reader has a CS background
<midfavila>
pretty sure it states the latter in the preface
<midfavila>
it's a good book to base your language's manual on, but I wouldn't hand it to someone who was in my state when I learned C
<midfavila>
well, "learned" "C"
<phoebos>
lol
<testuser[m]>
midfavila: what kinda jerb would u do
<phoebos>
generally, i think it's better for a book to be more complicated, so that i have to look up stuff, rather than boring and overexplaining
<midfavila>
like, don't get me wrong, I walked away with a pretty decent grasp of C89's syntax and basic semantics and stuff, which is all the book claims it's good for,
<midfavila>
but then I can't go and actually do anything with it?
<phoebos>
s/i have to look up stuff/i have stuff to look up/
<midfavila>
obvious the idea is to pair it with the Unix programmer's manual, but... point remains
<midfavila>
testuser[m] re:jerbs I'm hoping to do independent security research soon:tm:
<midfavila>
in terms of a more concrete response I don't have enough knowledge to really decide what I want to do, but contracting seems like a decent way to coast until I do
<midfavila>
pick up a little more experience, learn how things work in a practical setting, etc
<testuser[m]>
rich
<testuser[m]>
im gonna webscale
<midfavila>
and I mean, having the book provide hints for things for you to look up is definitely a good thing, phoebos
<midfavila>
there's lots of neat material in TLS that I've spent hours reading about
<midfavila>
currying for example is really, really cool
<phoebos>
K&R might not teach you how to do eg networking, but you've got syscall manpages for that
<phoebos>
networking? network programming?
<midfavila>
but like, for example, when I was reading K&R and they started talking about data structures and sorting algorithms and stuff, because of the pacing and assumptions made about the reader's experience, it doesn't make me want to learn more, it makes me want to put the book down and walk away for a while
<midfavila>
because it's just too much for an introductory experience
<midfavila>
"here's recursion and here's trees and here's shellsort and here's all this syntax and here's an assignment go write the thing based off this example bye"
<midfavila>
also networking as a verb would work fine there, I think
<phoebos>
tbf i didn't follow it through doing every exercise like you and dilyn, i did at the beginning, but then dipped around
<midfavila>
that's probably a better way to use textbooks
<midfavila>
i just sit down and brain-dump things
<phoebos>
dipping around seems to be more difficult with TLS
<midfavila>
well, yeah, 'cause like I said, it's a dialogue
<midfavila>
so each chapter is written assuming you've at least skimmed the former and understand its material well
<phoebos>
yeah that slightly overwhelms me
<midfavila>
that's fair
<midfavila>
although fwiw it's a very quick read
<midfavila>
very small book that covers some very big ideas very succinctly
<midfavila>
which is what I like about it, I think. most of my time working through it has been spent thinking about the ideas presented and their implications, not actually reading the book
<phoebos>
cool
<midfavila>
it's cool sometimes
<midfavila>
and then you get to chapters 8 and 9
<midfavila>
and it just annihilates you with continuations and recursive lambdas
<midfavila>
not nearly as bad as continuations, but still a little tricky
<phoebos>
ouch
<midfavila>
yeah, it's kind of gross
<midfavila>
but hey, if you ever need to define the concept of a loop, there you go
<phoebos>
i'm sure there are parts of things that lisp is useful for, but it makes a lot more sense to me to program imperatively
<midfavila>
i feel like if i were to pick up C again i'd find it really restrictive
<midfavila>
in particular i'd miss lexical scoping, first-class functions and block structure
<midfavila>
and I mean, lisp is useful for AI, mathematics and (apparently, according to some dude on computerphile) quantum computing, among other things
<midfavila>
plus, there's nothing saying you can't program imperatively in lisp
<midfavila>
iirc it wasn't until scheme that lisps had "functional" capabilities
<midfavila>
then there's the whole separate namespaces for functions and variables business
<phoebos>
it confused me how to do something like `int a = foo(); int b = bar(a); c = a + b;`. or socket programming: `int s = socket(...); connect(s, ...); return s;`
<midfavila>
in scheme, you mean?
<phoebos>
yes
<midfavila>
if you wanted a direct translation, you'd have to use (set!): (set! a (foo args)) (set! b (bar a)) (set! c (+ a b))
<midfavila>
although I've never wrote any programs with side-effects in scheme before, so ymmv
<midfavila>
i'd prefer to write a function that accepts A and returns (+ (foo) (bar (foo)))
<midfavila>
the whole expression is kind of clunky though
<phoebos>
mmm. when i had a proper go at scheme i didn't get to the point where i was thinking in the right paradigm, i was still trying to convert a c-like algorithm into sexprs
<midfavila>
good luck with that >.<
<midfavila>
C and Scheme are almost total opposites
<phoebos>
aye
<midfavila>
a while ago I decided to just... forget everything I learned in school or from textbooks and start fresh
<midfavila>
being able to just accept that things are the way they are can help a lot with understanding things
<midfavila>
not that that's a very useful remark in this context
<midfavila>
somewhat relevant rambling by dijkstra
<midfavila>
re: network programming in scheme, that would depend on your implementation
ella-0 has joined #kisslinux
<midfavila>
since R6RS (the current complete standard for scheme) doesn't describe networking libraries
<midfavila>
i bet R7RS-L will address it though
ella-0_ has quit [Ping timeout: 276 seconds]
<phoebos>
> i'd prefer to write a function that accepts A and returns (+ (foo) (bar (foo)))
testuser[m] has quit [*.net *.split]
lanodan has quit [*.net *.split]
rio6 has quit [*.net *.split]
phinxy has quit [*.net *.split]
gtms has quit [*.net *.split]
aosync has quit [*.net *.split]
<phoebos>
in C i have the flexibility to do either
gtms has joined #kisslinux
rio6 has joined #kisslinux
testuser[m] has joined #kisslinux
aosync has joined #kisslinux
lanodan has joined #kisslinux
phinxy has joined #kisslinux
<phoebos>
in scheme it makes by far more sense to do the latter
<midfavila>
you also know more about C than I would about scheme fwiw
<midfavila>
there's certainly a way to do it, I just don't know of an elegant solution
<midfavila>
like, for context, I've done a little of SICP, HtDP and most of TLS, and nothing I've read even covers variable assignment, because that's kind of a Big Deal in scheme
<phoebos>
i'm sure there is. i feel myself becoming too deep in C to be able to see other ways of doing things
<midfavila>
i mean, you said you're trying to basically implement C in Scheme, so yeah, maybe a bit
<midfavila>
i think that's another thing I like about TLS, SICP, HtDP etc
<midfavila>
they're not "scheme books"
<midfavila>
in the way that K&R is a C book
<midfavila>
they just... use scheme as a vehicle for talking about ideas. so you can take a lot of information from each and use it in most languages
<midfavila>
also I just realized that the function accepting A that I wrote never uses A, durr
<midfavila>
need to go make some tea
<midfavila>
and like, maybe eat breakfast
<midfavila>
been up for six hours and haven't had either so far
<phoebos>
eek. my exams start on wednesday and i'm still trying to finish watching the lectures
<midfavila>
get rekt nerd
<phoebos>
you've finished uni?
<midfavila>
I fucking wish lmao
<midfavila>
I can't attend uni because the pandemic fucked me during high school
<phoebos>
damn
<midfavila>
just started my eleventh year when schools shut down, after a year of everyone being away they were like "we can't just not push out graduates" and they bumped everyone ahead a year
<midfavila>
so I had two semesters to cram out the rest of my high school credits
<midfavila>
as a result I wasn't able to take the classes necessary to meet the entry requirements of the local unis
<midfavila>
so, meh
<midfavila>
just gonna spend a few years studying on my own terms instead
<phoebos>
oh i see
<phoebos>
college != uni ?
ejjdhfjsu has joined #kisslinux
<midfavila>
not here
<midfavila>
sorry for the late reply, had stuff to do
<midfavila>
i guess if I had to tier it, it goes primary->secondary->tertiary where tertiary is either college, which is basically just skilled labor, uni which is more theoretical stuff and highly specialized degrees, or trade school
<midfavila>
idea being if you just want a not totally shit job you go to college and take a part-time course in a particular skill (e.g management, IT, civil engineering), if you want an academic career you go to uni, and if you just want to work with your hands you go apprentice with someone
<midfavila>
...and then I guess there's also the military, pff
<midfavila>
but I couldn't join if I wanted to
<midfavila>
and now there are combinators in the mix
<midfavila>
christ, what a concept
ioraff has joined #kisslinux
pomekoon has joined #kisslinux
ejjdhfjsu has quit [Remote host closed the connection]
ioraff has quit [Read error: Connection reset by peer]
<phoebos>
midfavila: is currying like xargs
<noocsharp>
currying is just evaluating a function with respect to some of its arguments, but leaving other arguments unevaluated
<noocsharp>
which is not possible in programming languages where functions have side effects
<midfavila>
that's certainly a way to describe it. from what little I've read the main application has been to reduce multi-parameter functions to smaller single-argument functions. surely there must be others, though?
ejjdhfjsu has joined #kisslinux
ejjdhfjsu has quit [Remote host closed the connection]