Previous Thread: What are you working on, Sup Forums?
/dpt/ - Daily Programming Thread
Other urls found in this thread:
github.com
xiph.org
ibiblio.org
twitter.com
Forced meme general
XDDD
IM PRETTY MUCH TRYING TO HACKENING THIS THREAD AND I ALSO DDOS THE PONTAGOON.
THE IP IS 127.0.0.1.
I WILL HACK YOUR Sup Forums ACCOUNTS I ALREADY GOT YOUR PASSWORDS.
HAHA
YOU ARE RETARDED.
THE USERNAME "USERNAME" AND THE PASSWORD "PASSWORD" PROOVE THAT YOU ARE PRETTY DUMB.
K..
What is an audio file?
i imagine it's some header data to describe format size etc etc and some binary that gets read and sent to the right hardware if you want to hear it
is this far too simplistic or totally wrong
HELP
I need a online web page so I can and other people code something like google drive
pls help
Apollo 11 source code
yes, an audio file is just a set of audio "frames" that are decoded and fed to the system audio API
KEEP
So I recently upgraded android studio from 1.3 to 2.1
When I was testing out something using my phone I could see stuff normally in logcat. Afterwards in 2.1 shit is being continuously printed even though I'm not doing anything. What happened?
IM PRETTY MUCH TRYING TO HACKENING THIS THREAD AND I ALSO DDOS THE PONTAGOON.
THE IP IS 127.0.0.1.
I WILL HACK YOUR Sup Forums ACCOUNTS I ALREADY GOT YOUR PASSWORDS.
HAHA
YOU ARE RETARDED.
THE USERNAME "USERNAME" AND THE PASSWORD "PASSWORD" PROOVE THAT YOU ARE PRETTY DUMB.
>not written in Haskell
disgusting
They could've used Rust instead of writing such an unsafe turd in assembly. What the fuck were they thinking?
and a video would be similar right
...
Type-level computation on Common Lisp
rust is a meme language, and so are you
So Whatchu workin on gamebros.
>Making a stock market crash simulator where you have plenty of ways to suicide.
We gonna party like it's 1932.
>thinking it'd be a good idea to write critical software in anything but Assembly
Don't you fucking dare to call me a meme kiddo.
>impure languages
>safer than Haskell
Does Common Lisp support dependent typing?
You mean haskell or haskell-lang?
scuse me while I pause to gc
reminder that you can't spell
"Has Kelly (Thomas J.)'s lunar module landed yet?" without Haskell
>Python is slow
Please, /dpt/, explain how EVE Online exists and how it runs so well
Yes, I know about Stackless Python, but is it different enough to make up for all of Python's common pitfalls?
If so, how come it isn't the absolutely most popular interpreter?
>Haskell autists are back.
could someone help an user here pls?
>>Making a stock market crash simulator where you have plenty of ways to suicide.
Name it Reddit Bitcoin Simulator and you got me interested.
How can I compose functions in C?
>implying stop-the-world gc
>2016
>not generational gc
shiggy diggy doo
Anyone know where I can find the instruction set descriptions?
afaik stackless only has a few added features like threading and fp but is pretty much as fast as cpython and definitely slower than pypy
Stackless has no GIL and that alone gives 200% speedups to most programs
You can't. Stop posting.
>Guys we need to post suicide prevention hotline link.
But is that really enough for something ultra-heavy like EVE?
I just don't get how the fuck CCP managed that
Types can be arbitrary s-expressions. You can define your own types like you would macros. Primitive types can also be defined based on values, as in
* (type-of 2)
(INTEGER 0 4611686018427387903)
Can someone please give me some direction on how to begin programming?
What language? I do not really know what I want to do yet. I just want to get my foot in the door here.
Please don't meme me. I already meme myself.
t. Memeboi
>le just write a few macros meme
Who here /DumbAsFuck/
Yep that looks like that's it. Thanks user. Probably should have just googled it but I figured it has a specific processor.
Haskell
PROLOG
always do the opposite of what /dpt/ says
Is it Haskell or Haskell-lang? So confusing...
do the opposite of what says
Satan begone
me but i somehow lucked my way into one of the best CS schools in my country
You must be able to, it's a really basic operation soþlice.
You can't in C, stop pestering people.
>he's too stupid to understand prolog logics
What is your country user
Is it CAR
Are you a tortoise or a hare
Why not? You can do it in C++, can you not? I'll not cease pestering until Sup Forums gives me a solution to this problem of mine.
>A school of imaginary ''science''.
Well done user well done.
HOWEVER
[spoiler]Good luck user, I'm gonna take courses at a community college hopefully. I mostly intend on learning by myself though.
I do this so that I can say on my resume I'm working towards my degree, but I already know enough to work. Then I can just one class at a time till I eventually get it.
Oy vey
What i did was I learnt some simple python syntax using youtube, there's this guy with a french name that has a nice tutorial i don't remember the name, but you'll know it, he's autistic and uses a webcam
then i started doing MIT OCW courses, read SICP, K & R for C, almost finished CLRS, studied some discrete math.
there's tons of resources out there, but those are the ones i used
Canada
>Are you a tortoise or a hare
Yes.
>wanting a literal space leak
Is it Snow College
Are you on a hockey scholarship
Do you eat syrup
Also which one are you
>can't even do something as simple as closing a spoiler tag
UR FUKKED M80
It's literally impossible you idiot, you've been told this a million times. There are no templates
in C. It's all well and good that there are macros, but you can't create a macro from within a function to declare a new one outside of it
I am confused by your initial question. You can write functions in C. Functions have been around for a long time now.
But I to compose them because my coworker is laughing at me.
btw congrats
Should I learn x32 or x64 assembly first?
Any good recommendations on good books, tools, etc to learn assembly?
I have a copy of Knuth's TAOCP that I haven't really used, should I learn MIX/MMIX first?
First learn Idris then work your way down, soþlice
I'm working on a (slightly over-engineered) semi-monotonically increasing 64-bit unique ID assignment system.
No ID will be assigned twice, but IDs may be skipped and may be assigned out of order (though they'll generally be assigned increasing from 0).
N servers using Raft for consensus, a layer of caching below that to add network partition tolerance, and a client library that also does caching / load prediction.
The basic idea is that the consensus servers agree to hand out blocks of IDs, which can't be reclaimed after a crash out network failure, even if they are never assigned.
With you hand out big contiguous chunks, though, the variance between IDs is pretty big for clients accessing different caches. To address this, the system will hand out interleaved "slices", defined by (offset, count, phase, duty, period) rather than contiguous blocks defined by (offset, count).
Intel assembly is one of the worst. Don't study it unless your job requires it.
Stop pseudo-namefagging
What's the matter? Can't type thorn?
wat
what's the point of all the complexity when you're just handing out 64bit IDs
what is there to work on really
Why not just use refinement types?
What's the matter, not using Idris, soþlice?
When you need to hand out so many IDs so fast that one server can't keep up, and when getting IDs is so important that you need to be able to handle at least 24 hours of network partition / local outage without losing the ability to assign IDs.
I'll be releasing it as Google OSS, it is similar to a system we use relatively heavily inside the company.
Can I invocate Java from C#? My prof wants us to use a Java library he wrote, but I for myself believe contrariwise that C# is much more superior for it has LINQ, and I may have cause to access a database with this code, if my professor deems such to be a required feature that merits merit when he is considering which of the available grades to assign to my work.
I remain as ever your most humblest servant in all of Albion and the Empire. Pajeet Ramasharwa
Please discuss technology, soþlice
void compose(void (*f)(void *), void (*g)(void *), void *x) {
g(x);
f(x);
}
"Just use refinement types" yeah thanks that'll save me all of 0 effort. Idris can't prove the correctness of my code (ie, it can't prove that I don't hand out overlapping sets of IDs).
The system must be compatible with a variety of client languages, so all the benefits of the type system would be lost at the network boundary anyway.
you fucked up, soþlice
et tu, soþlice
That is not composition, but rather sequencing, soþlice
What the fuck did you just call me
>output pointers
Kill me now
:- can_check_digits(you).
so if you have N = 8 servers, each server will get 2^64/8 ID's to hand out, but those are not consecutive but interleaved by some method, so if one fails you'll be able to hand out from the rest that would be sitting in some cache?
That's Kleisli composition, soþlice
uncurry (++) . partition (9 /=)
Almost. The N servers won't split the whole set up immediately. They'll take a contiguous block of K, depending on the rate IDs are being consumed, and split that block up.
This means you can support dynamic numbers of servers, and dynamic weights. So rather than 1:1:1 among three servers, it could be adjusted to 1:1:2 or whatever.
Only for an IO monad, soþlice
You're really proud of that little code you stole, aren't you?
Programs run on the IO monad, soþlice
No, procedures do, soþlice
india = (++)
uncurry india
ARM or MIPS, senpai. Intel assembly is silly.
Kleisli composition is
(>=>) :: Monad m => (a -> m b) -> (b -> m c) -> a -> m c
If I'm not mistaken, soþlice
I wrote it, I didn't steal it from the bird thread
Same here, user
Started porting a thing from SDL to SDL2 but kinda got bored because original dev abandoned it and it'll never make it into upstream and it's too unpopular to fork
I re-wrote a tiny gui app from PyGTK to C++/Qt but that was too fast/easy/unchallenging
I've submitted a PR to fix a bug in a program I use but dev checks those once in a year
Submitted a proposal patch on another tiny thing but no reply in a month
I've submitted a small module in another program I use, they've eventually accepted it but I was motivated because I needed that module
I'm writing a small fun chat bot that's used in a chat with 10-15 people but project itself is just dumb so I generally use it as a lab rat for various tools
Not much motivation to fix random bugs, esp. if they're too complex, and opensource seem to be generally slow/unmotivated as fuck
Want to learn new language but when I dip my toes in one, I lose a lot of motivation because I met issues/pet peeves that for some reason don't exist in C++
I'm really tempted to start some kind of complex project but I have very little ideas and I'm afraid I'll run out of enthusiasm
Wanted to get into indie gamedev but artistic skills are more important than programming skills and in general community feels pretentious as fuck
God I just should kill myself or something
No I wrote it, soþlice
C++ has its own pet peeves, you're just pretending they're not there, soþlice
this is one of the worst /dpt/
You would say that, soþlice