/dpt/ - Daily Programming Thread

previous :: Thread
previous =

Attached: >λ=.png (10000x7340, 677.04K)

Other urls found in this thread:

github.com/friendlyanon/cmake-init
gitgud.io/users/sign_in
twitter.com/NSFWRedditVideo

First for Ada.

nth for >λ=

basado

echo 'main = let fib = 1 : scanl (+) 1 fib in print (fib !! 45)' >Foo.hs
ghc --make Foo.hs
time ./Foo
gave me
real 0m0.002s
user 0m0.001s
sys 0m0.002s

the idea is to use the same algorithm for every language

Any quant anons here? Anyone programming trading algos?

>What were the LDC numbers?
Slightly worse than gdc.

fibs.c (gcc -O3): 0m2.633s
fibs.c (gcc -mtune=native -march=native -O3): 0m2.379s
fibs.cpp: 0m2.330s
fibs.cpp (constexpr): 0m0.000s
fibs.d (rdmd): 0m7.711s
fibs.d (gdc -O3): 0m2.945s
fibs.d (ldc2 -O3): 0m3.171s
fibs.py2.7: 8m13.323s
fibs.py3.6: 8m7.662s
fibs.lua: 3m42.940s
fibs.luajit: 0m7.929s
fibs.stalin: 0m19.002s
fibs.chicken: 2m18.917s
fibs.guile: 2m21.925s
fibs.sbcl: 0m52.130s
fibs.clojure: 0m31.758s
fibs.nodejs: 0m15.177s
fibs.vala: 0m6.819s
fibs.vala (valac -X -O3): 0m2.328s
fibs.rust (rustc -O): 0m2.974s

The ghc runtime is as large as my koishi folder. I'm going to have to make some sacrifices to install it.

Ok, I'll have to install them.

Yes. Buy low sell high.

>fibs.d (ldc2 -O3): 0m3.171s
have a repo for all these?

Reminding anons to use github.com/friendlyanon/cmake-init when creating new C++ and C projects!

I'm thinking about making a base manager based on lotr - you'll be Durin and have to manage Khazad-dûm. Of course it'll be complete FOSS

Do I risk getting sued by the tollkien estate?

Not yet but I could upload them. Is there one you guys like besides github? I kind of want to boycott them after they locked that one guy out of his own repo after he tried to sabotage it.

gitlab or gitgud.io/users/sign_in

live action role play
does anyone have good books for this?

actually, thinking on it, i think this might be the best luajit can get to for recursive-fibonacci. the strategy was to use the native FFI to get much faster numerical performance, but i don't think the recursion algorithm will allow for that without requiring overhead that would remove all benefits.

analyzing the trace compiler, i think theoretically it could be much faster if it had auto-vectorization, and would eliminate that overhead mentioned earlier...another problem is that it spawned a lot of different traces, up to 14, which seems like a lot for 5 lines of code, which pretty much means that the jit found the code hard to predict. not sure what could be done about that, though

Sounds interesting.

Angband has been a thing for 20 years. I'm sure there are many more lotr-theme games. It *should* be fine as long as you don't claim that your game are the lore or official or shit like that. Besides, you are nothing to them. They sue big companies for $$$, not some poor indie dev who does it for free.

What is a good way to learn c and c++. But with more emphasiz on how to tackle problems?
My sister is gonna learn coding and I am searching for online courses or something like that.

Learn Lisp.

she probably wants to do webshit, not C/++

C#

When can a web socket be used:

Real-time web application: Real-time web application uses a web socket to show the data at the client end, which is continuously being sent by the backend server. In WebSocket, data is continuously pushed/transmitted into the same connection which is already open, that is why web socket is faster and improves the application performance.
For e.g. in the trading website or bitcoin trading, that is the most volatile thing which is happening over there, for displaying the price fluctuation and movement data is continuously pushed by the backend server to the client end by using the web socket channel.

Teach her Python or JS instead