This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-09-21
Channels
- # 100-days-of-code (6)
- # aleph (26)
- # beginners (129)
- # boot (5)
- # calva (3)
- # cider (5)
- # cljs-dev (16)
- # cljsrn (4)
- # clojure (204)
- # clojure-dev (36)
- # clojure-italy (23)
- # clojure-nl (4)
- # clojure-spec (221)
- # clojure-uk (60)
- # clojurescript (68)
- # datomic (47)
- # emacs (4)
- # figwheel-main (50)
- # fulcro (29)
- # graphql (10)
- # hyperfiddle (19)
- # lein-figwheel (3)
- # leiningen (20)
- # liberator (3)
- # off-topic (89)
- # onyx (15)
- # pedestal (1)
- # portkey (2)
- # re-frame (3)
- # reagent (6)
- # ring-swagger (1)
- # rum (12)
- # shadow-cljs (10)
- # uncomplicate (4)
- # vim (5)
> I don’t care about static or dynamic types, nor about FP, LP, or OO. For me, they are overly complex, unreliable, and unscientific. I think they are very bad and upset me. Don’t know what that’s about but it made me laugh 🙂 https://clojureverse.org/t/why-do-you-prefer-clojure-over-haskell/1967/70?u=borkdude
I've have seen him respond to threads a few times and always was kind of confused about what he wants to say actually. I still dont know what to make of it: https://github.com/linpengcheng/PurefunctionPipelineDataflow is a mix of chinese (I suppose) and english statements and citings https://github.com/linpengcheng/fa is the homepage for the "...largest personal Clojure project in the world." but without any actual code and 63 commits to the readme and which leads to nowhere but two downloads of executables which could as well be trojans? Also why are types unscientific?
That said, viewing programming from a different angle sounds interesting. The endless "war" about static vs dynamic typing is time consuming at best, dangerous at worst and leads to nowhere in my opinion. Also it doesnt matter outside the programmers world. Maybe we as a programmer, should take a step to the side and consider a different view about programming?
runtime code gen is possible due to quotations and executing that code is possible due to eval, right
Yes, @denisgrebennicov that sounds about right to me.
https://en.wikipedia.org/wiki/Multi-stage_programming specifically mentions types
"Multi-stage programming languages support constructs similar to the Lisp construct of quotation and eval, except that scoping rules are taken into account."
@orestis macros are compile-time. Multi-stage allows codegen at runtime depending on the input, different function as a result
@borkdude which one are you referring to: http://2017.euroclojure.org/speakers/
perfect. Since I am using Terra (http://terralang.org) for db query compiler backend 😄 She has exactly the same topic. 's gonna be an interesting watch. Thanks
@denisgrebennicov ah, right, of course. I’d be interested to hear your use case for generating code at runtime.
query compilation. The idea is the you get a query at runtime. For that query you don't want to run typical iterative approach. Representing every relational algebra operator as an Iterator. Rather you generate code exactly for that query. Which yield to better performance. At our database chair we compile queries into LLVM IR and then bind it to the main process and execute the code. But generating LLVM IR code is ain't no fun. I've used Terra for writing high-level concepts and it yielded LLVM code, which is very nice 😄
@orestis
E.g. for query SELECT * FROM users WHERE surname = "BLABLABLA"
Generated code should be like
for user in users:
if user.surname = "BLABLABLA":
yield user
Here you win in cache efficiency, less method dispatching (no virtual methods) etc
really "low level" stuffThat is, we are not talking about interfacing with an external database in the traditional sense.
in case you are interested: http://www.vldb.org/pvldb/vol4/p539-neumann.pdf actually CMU has an advance db lecture where they say that compiling to LLVM is actually pretty sweet and now a lot of people do it. At CMU as well
on a (very tangent) tangent I have been looking into various CS-fundamentals subjects, at time even crossing the software/hardware boundary. (partially to fill relatively major gaps in my education, partially “for culture” ) One surprising thing I’ve learnt is more on the altitude side - don’t just passively watch it, question the assumptions. Most of the time you just end up understanding thing more deeply. Occasionally you hit up on a possible, new alternative. So there you go, in-memory DB (okay, I’m many years late, but whatever) </end rant>
oh, on another tangent I wouldn’t dismiss “theoretical question” so quickly - afterall Lisp started by “confusing theory with practice” - John McCarthy and all that
In case you are interested: https://www.youtube.com/watch?v=vyVGm_2iFwU&list=PLSE8ODhjZXja3hgmuwhf89qboV1kOxMx7
They dive deep into topics like codegen. how to handle concurrent transaction executing, etc. (MVCC) Not your plain lets learn SQL course
thanks! I’ve taken a DB course in uni - it did covered the usual theory topics like relational algebra, indexing data struct, query execution, transaction and journaling etc - so I think I’m supposed to look at more advanced topic to make further progress (e.g. distributed DB, like consistent hashing, chord, distributed consensus (on this point I liked the Raft algo) )…
I’m open to revisiting the “classics” if there are fresh perspectives/new advances. Besides I’ll admit I don’t grasp the last part of that course very well (transaction theory, 2PL, those transaction graphs, etc)
https://www.youtube.com/watch?v=poEfLYH9W2M&list=PLSE8ODhjZXjYplQRUlrgQKwIAV3es0U6t
btw, perhaps immature to ask at this point, what’s gonna happen to the classical transaction theory in light of MVCC?
would it become obsolete? or just revised to coexist with MVCC, or even get integrated?
classical transaction theory is more pessimistic (AFAIK). Locking everything for every transaction. MVCC is optimistic. So you will know more things 😄
there is some timestamp idea. A friend of mine was telling it to me. Already forgot 😅 BUt there are 2 lectures on this topic. Pretty sweet
https://highlyscalable.wordpress.com/2012/09/18/distributed-algorithms-in-nosql-databases/
even though the link should be obvious/easy to find: https://raft.github.io/
thanks for the link! Helps a lot I am a student and mobile dev and transitioning to backend, therefore those scalability blogs and infos are very appreciated. Thanks!
BTW isn't raft thingy, like a watchdog on something else. I though there was like a heartbeat algorithm?
Raft is an alternative to Paxos, which is the “standard” (or should I say “academic” ) version of doing distributed consensus
tl;dr: Raft simplify the problem by doing leader election to centralize. Then a simple quorum at a strategic location in the algo is good enough
they also claim for real-world/industry implementation Raft is a closer match with reality/how it is actually done
good luck! distributed system is a pretty tough course if you don’t have the right mindset
my experience is that a 2/3 mathematician, trust nothing but the proof + 1/3 pragmatic, intuition guided approach work best
self-study, I don’t work to be stuck being a code-monkey with no knowledge of advanced CS
on a self-funded sabbatical… sometimes drastic action is needed to break through indecision
supposed to be doing OSS, but get a bit carried away with the study part. See, underestimating how long a task takes works even if you are not working!
😄 sure damn, doing smart things and getting paid for sounds like a dream. code-monkey job kills me. But academia job is just paying peanuts. Especially PhD work
one more hint on that course. Hilbert (or is it?) said that all Mathematician only has a few tricks. Here the basic framework is “Safety + Progress” proof. And with such a hostile env. (arbitrary delay, system can fail, async, etc) only a few “universal techniques” work (which you will hopefully discover as meta-pattern in the course)
Absolutely! It feels good to study new things. Whatever new things are. But in CS it's always new concepts. Or combining concepts together to get other concepts or great things. At the beginning I was thinking you gonna refer to this book: https://en.wikipedia.org/wiki/How_to_Solve_It
just don’t obsess on special network topology in the course (depends on instructor I guess). Unless you work in data centre or have special application where those setting applies - stick to algo that are network agnostic
That book turns out to be more useful as a “Philosophy of Life” book than problem solving in math… maybe it’s just me
mobile dev is probably out of my reach given the backlog of things I want to learn/do
How long have you been on this study journey? Finally I convinced other guys from the team to use Rx on mobile. At least some new concepts 😅 Reactive programming is a such a hype nowadays.
BTW, don't know about you, but I tend to forget things, which I don't use, this is why spaced repetition with Anki solved several problems keeping knowledge always in my head 😉
if you mean how long it take to learn those distributed system + DB stuff, depending on your point of view it took me either just a few weeks, or 5+ yr 😉
I think Clojure might be a little too high level if you are at that level of efficiency chasing, but I’m not an expert here.
@orestis here is an example of my thingy (proud 😄) for query
select c_id, c_first, c_middle, c_last
from customer
where c_last = 'BARBARBAR';
generated code:
rators/projection.t:15: terra anon (./operators/projection.t:15)(datastore : &Datastore) : {}
erators/tablescan.t:43: var table : VectorT = (@datastore).customers
erators/tablescan.t:45: for i : uint32 = [uint32](0),VectorT.count(&(@datastore).customers) do
erators/tablescan.t:47: var tuple : &Customer = VectorT.getPtr(&table, [int32](i))
erators/tablescan.t:28: var $c_first : &VarcharT = &(@tuple).c_first
var $c_id : &Integer = &(@tuple).c_id
var $c_middle : &CharT = &(@tuple).c_middle
var $c_last : &VarcharT$1 = &(@tuple).c_last
erators/selection.t:70: if let
erators/selection.t:42: var $464 : bool = true
erators/selection.t:51: $464 = $464 and VarcharT.equal(&@$c_last, "BARBARBAR")
erators/selection.t:55: in
$464
end then
rators/projection.t:26: printf("%s | ", [&int8](Integer.toString(&@$c_id)))
printf("%s | ", [&int8](VarcharT.toString(&@$c_first)))
printf("%s | ", [&int8](CharT.toString(&@$c_middle)))
printf("%s | ", [&int8](VarcharT.toString(&@$c_last)))
rators/projection.t:29: printf("\n")
erators/selection.t:70: end
erators/tablescan.t:45: end
rators/projection.t:15: end