logs archiveChat DB / Freenode / #programming / 2015 / November / 5 / 18
pewpau
pyon: got any fun projects going on?
adsc
yeah, it's awfully dark in a room without windows
pyon
pewpau: Learning just about enough Racket to implement derivatives of polynomial functors. You?
snyp
ah. d/dx of functors.
pyon
snyp: Well, they can be polynomials on multiple variables, so in general, these will be partial derivatives.
pewpau
pyon: currently into x86, will do some compile-Ahead of time things such as compiling NES games to x86
snyp
pyon: what are polynomial functors used for?
pyon
snyp: Their derivatives are used for making zippers.
snyp
woah
ok
njcomsec
zipper?
pyon
https://en.wikipedia.org/wiki/Zipper_%28data_structure%29
njcomsec
oh
snyp
pyon: why do it in racket?
Denommus
pyon: hey
pyon: have you ever written a lexer in Parsec?
pyon
Denommus: Nope.
I've used it more for writing scannerless parsers.
snyp: Because Racket is, to the best of my knowledge, the only language that can be extended *cleanly*.
snyp
i see
pyon
(Common Lisp and Clojure can be extended too, but it's a mess.)
Denommus
pyon: I think it's too much trouble to make a parser without a proper tokenizer, so I decided to make one
pyon: I think I managed to make one in alex, but I'm not sure how to ignore block comments
pyon
Denommus: Writing a lexer in Parsec itself doesn't seem to hard. The hard part is combining a Parsec lexer with a Parsec parser.
Someone must have figured out how to do it cleanly, but I don't know how.
Denommus
pyon: also, I'm actually using megaparsec, not parsec
IP92
I have a sorted list with n elements. How would I produce another list of n elements, such that it consists of products of 2 elements from the first list, prioritizing the smaller elements?
pyon
Denommus: Ah!
Denommus
pyon: but they are kinda similar
pyon
Denommus: I've stumbled upon megaparsec a while ago. It seems to have a somewhat cleaner API.
IP92: What exactly do you mean by prioritize? Could you give some examples? (Preferably in a paste site.)
Denommus
pyon: it does. It tries to use more things from Haskell's standard typeclasses (so it has "some" instead of Parsec's "many1", for example)
pyon
Ah!
Nice.
snyp
The dragon book spends a lot of time on syntax directed translation. it's so boring.
pyon
Does it also use asum instead of choice?
snyp
i would rather walk an ast than introduce markers and sh*t into the grammar.
pyon
snyp: heh... that's indeed the most boring case... it gives little room for interesting program transformations
IP92
[1,2,3,4,5] should produce [1*2, 1*3, 2*3, ...] until the second list is the same size as the first.
snyp
pyon: hmmm
pyon
IP92: Oh, okay.
IP92: So, in this case, [1*2, 1*3, 2*3, 1*4, 2*4], right?
IP92
pyon: something like that yes
Denommus
pyon: I think it uses Alternative in general
pyon: so it has <|>
pyon
Ah, Control.Applicative has many.
Data.Foldable is the one that has asum.
Denommus
pyon: well, choice does use Foldable, so I guess it's also possible to use asum
pyon
Ah. :-)
thecha
rindolf
Denommus
choice :: (Foldable f, Alternative m) => f (m a) -> m a
Lasal
are there any ladies in the field of CS?
rindolf
Lasal: sure.
thecha
rindolf i just shortened the time by dividing through 13*5*3*2
Lasal
rindolf; are they ones to be loved madly?
rindolf; or ones to discuss technological affairs with?
thecha
eh forgotten 7
snyp
IP92: for each index i, get this sequence a[0].a[i], a[1].a[i], ..., a[i-1].a[i] -- does this work?
quux
does anyone else feel Foldable should instead be called Listlike or something?
IP92
snyp: yes, that's the idea I came up with myself
Lasal
rindolf; i considered the field of history and biology, which has a strikingly large number of ladies present, but it seems CS has been attracting quite a percentage of women lately too
snyp
IP92: so do that?
Lasal
rindolf; i must remind you that im a major in physics, which is mostly deplete with ladies except for a selected few, all of whom are designed by Nature not to be held in a man's arms
thecha
ahh
i need to check if % prime ==0
:/
pyon
IP92: Something like this? http://ideone.com/gLEa4m
thecha
hi pyon
pyon
thecha: Hello.
thecha
Hola
Senor
?que passa?
pyon
thecha: Let's stick to English. :-)
thecha
pyon’ I will try :P
Lasal
rindolf; since you are a programmer, you very much contact lifeless and ADHD-diagnosed trolls regularly, and this experience has led you to believe that I belong to that category, but I assure you that I do not - for I am just poetic in nature and a lady lover
jontxu
thecha, you meant to use "¿"
IP92
pyon: yes, that looks like it
rindolf
Lasal: what are you on about?
thecha
jontxu yes
Lasal
rindolf; ladies
thecha
._.
Lasal
rindolf; whether there are any ladies in CS, nice ones; that was the question
snyp
pyon: won't yours generate all possible tuples first, even in presence of lazy evaluation?
thecha
Lasal i am sure if you join they will switch over to math
pyon
snyp: Yeah.
snyp: But he said nothing about efficiency.
snyp
i see
kek
rindolf
thecha: heh.
Lasal
perhaps there is a lady hiding behind a curtain here, but now that she has heard my word, and has now resorted to safety for she has believed im a pervert in hunting
but im just a lifeless romantic
pyon
Lasal: This isn't a place for hooking up, anyway.
rindolf
Lasal: yes, pyon is right.
thecha
Lasal: thisisnt the place for blogging any ways
Lasal
pyon; yes eduardo, you are right to a degree, but that is not what I came here for
i came here to inquire into the nature of ladies present within the field of computer science
jontxu
There are ladies here?!
Lasal
jontxu; surely some, waiting for your affection very dearly
pyon
jontxu: I've seen ladies who program in other channels. Actually, even here. But not right now.
rindolf
jontxu: don't throw oil into the fire.
« prev 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 next »