Fork me on GitHub
#off-topic
<
2017-09-13
>
fellshard07:09:24

I've been searching for a few years now for a suitable personal knowledge base 😞

val_waeselynck10:09:30

@qqq I have a very long 'TIL / WTF' Evernote note

nha13:09:25

I use a directory in git, .org files (although I treat them as plain text). and use projectile search functionality when I need something. I use OSX notes for temporary stuff that I don’t want to keep. I still have to learn org-mode though.

hubert15:09:43

Hello Everyone, do you know what "Day" we have today?

hubert15:09:40

Day of the Programmer !!! Today is 256th day of the year In Russia it is official holiday 😄 On September 11, 2009, President of Russia Dmitry Medvedev signed the decree.

cjhowe18:09:09

is reduce technically a generic finite state machine in theoretical CS terms?

dpsutton18:09:44

how would it be finite?

cjhowe18:09:50

oh, i guess FSM's have outputs at every step

cjhowe18:09:08

actually, i don't know what the finite refers to, my book doesn't even mention it 😕

cjhowe18:09:18

finite number of states i guess?

pvillegas1218:09:54

All halting programs can be represented as finite state automata 😄

cjhowe18:09:55

even without the finite part, is reduce an infinite state machine?

dpsutton18:09:25

i suppose. the reducing funtion's signature is (fn [state input] ...) but i don't know about accepting states and whatnot so it sounds like a bit of a stretch or pushing a square peg into a round hole

pvillegas1218:09:52

It is just a different representation of the same computation, not a very illuminating one

tbaldridge18:09:58

but a never ending reduce is a helpful way of looking at many things. For example Database = reduce over the previous state of the DB and an event.

pvillegas1218:09:52

Right, expressing it as a turing machine with state transition on a one-dimensional infinite tape was what I was referring to

dpsutton18:09:37

that's too powerful. i believe he was talking about FSMs

pvillegas1218:09:23

you’re right, reduce would be a FSM with n + 1 states (`n` the length of the input sequence and initial value) and the transition between the states would be the same function. For lazy infinite sequences it would no longer be an FSM but the same kind of representation holds

cjhowe18:09:51

i guess it becomes more like a pushdown automaton?

pvillegas1218:09:58

The stack is not necessary right? The transition is fixed (the function you are reducing with)

noisesmith18:09:20

@cjhowe see also reductions which is like reduce but it returns a lazy seq of each intermediate accumulated state

cjhowe18:09:53

hmmm, i guess a pushdown automaton has both state in the state machine and state on the tape? so the tape state wouldn't be necessary

noisesmith18:09:01

(also, reductions is underappreciated imho)

noisesmith18:09:35

sorry, I assumed it would truncate, my bad

dpsutton18:09:52

haha. well that needs to be fixed

cjhowe18:09:55

that's cool

cjhowe18:09:28

that sounds a lot more like a state machine to me

noisesmith18:09:35

I’m glad I didn’t opt for *' instead of +

noisesmith18:09:00

oh, range starts with 0 so that would have been much tidier, haha

cjhowe18:09:39

man i thought this class was going to be boring, but it's actually pretty exciting. people have been talking about turing machines and pushdown automaton while i've been in the dark until now

noisesmith18:09:01

if you like that stuff, I can recommend a really good book on petri nets too (which are like turing machines but made of independent widgets that act without sharing a clock - they can be used to make proofs about async / parallel behavior) - it’s really well written, as well as being the most aesthetically pleasing CS book I’ve seen in terms of typography and diagrams https://www.amazon.com/gp/product/3642332773/ref=oh_aui_search_detailpage?ie=UTF8&amp;psc=1

cjhowe19:09:53

nice, my school has it for free through the library! just downloaded

cjhowe19:09:14

i guess it's free anyways?

noisesmith19:09:59

oh, I’ve only seen the physical copy

Drew Verlee20:09:52

Anyone have a hint on how to construction a postgres query where i can take a sample of the grouped together rows returned by GROUP BY? More generically, i want to perform a ORDER BY clause to the GROUPS produced by GROUP BY. the ORDER BY function i have in mind is random(), the GROUP by function could be agg_array (to bring the rows together) with the intent of producing a small sample for each group.

spinningtopsofdoom21:09:44

If you are okay doing a window function (https://www.postgresql.org/docs/9.6/static/tutorial-window.html) you can do both a group by (partition by in window function parlance) and order by

Drew Verlee21:09:05

@spinningtopsofdoom thanks for the tip. I really appreciate it.

ayidi22:09:06

Another programming community uses https://gitter.im/ for irc seems worth a try. Way better support for communities than slack.