/dpt/ - Daily Programming Thread

SICP edition.

What are you evaluating, Jow Forums?

Previous thread:

Attached: sicp-cover.jpg (500x492, 95K)

Other urls found in this thread:

github.com/google/wwwbasic
raylib.com/
twitter.com/SFWRedditVideos

first for C++

first for vhdl masterrace.
Time to add a processor and some logic.

Attached: anime3.webm (1920x1080, 2.96M)

First for non-deterministic, impure, non-total and referentially opaque F U N C T I O N S

I'm not, I'm applying (for an internship)

Then they're not functions, are they?

the fastest wins yet again

look at that square go!

awesome

>Google: "It turns out even Go is too complicated for our programmers. We need something more BASIC... and also more webscale."

github.com/google/wwwbasic

>WWWBasic is an implementation of BASIC (Beginner's All-purpose Symbolic Instruction Code) designed to be easy to run on the Web.

OOP doesn't exist there is no definition for it, it's just imperative programming but worse and in disguise. Don't @ me

>get hired at google
>cant code for shit

I want to make my own games using SDL/OpenGL but agdg tell me I'm a dumb retard for not using a game engine, but I am tired of being a stupid monkey using an engine without learning nothing and with no clue why there's pixel bleeding on godot.

Attached: 1521529127966.jpg (200x169, 7K)

Working on making my CHIP-8 snake game work on some real hardware. Gotta wait for next paycheck cause no monies, but the plan is (to conform with specs):
* 64x32 led matrix for display
* 4x4 keypad for input
* rasp pi to put the program in

Would be cool to use cartridges, but probably isn't worth my time for 4kB games, so might just upload them all, and have a menu to select from

JavaScript rocks!

Go and use SDL/OpenGL. They're pretty fun to work with. agdg isn't really good for programming anyway, all they care about is art. I went there once like a week ago after not going years, and the gameplay is so weak still

wtf google

this tbf

...

how is output which keeps updating kept on the same line in terminal made?
For example download progress bar?
does it use carriage return or smth?

probably carriage return yeah

Does Antivirus software check the registry for malicious behaviour?

Attached: mercy_witch.jpg (800x1100, 95K)

Anybody used Julia?

Maybe the technology behind it is good but the package manager is total shit. I'm using it for a class and I need to install IJulia and PyPlot and the packages fail every time. I've tried installing on 3 different systems with different OSes and it always fails with a different error.

using an engine for 2D games are stupid if you can program.
for trivial games in gamejams etc it's acceptable, but for a serious game, 2D engines are harmful.
SDL2 is quite good but also check this out: raylib.com/

Does anyone else have f.lux steal focus for a half a second every now and then?

Attached: ocean_palette.jpg (500x750, 82K)

the what

nope works fine here broski

It puts a somewhat transparent version of yellow on your screen

Attached: kaskad_canary_yellow_paper_card.jpg (400x568, 8K)

>using an engine for 2D games are stupid if you can program.
said no pro ever. having an engine that works on multiple platforms require lot of work.

sounds like hell

logic languages are better than functional languages
fite me fplets

Attached: hamsters-and-grapes.jpg (800x500, 49K)

probably but it depends what AV

pretty good definition

Funny that you should mention grapes.

Attached: functional programming is bad.png (1280x1002, 1.05M)

>Anybody used Julia?
Yes, I created some dubious benchmarks with it.

maybe so but I don't understand them yet
help me user

not at all. the guy who invented the actor model did prove that logic programming is doomed.

z=x//100
zx=x//10 %10
zxy=x%10

I finally got this. It's a right to left type of logic.
I guess replacing the
z=x//100

with
z=x//100 %10

would make it more obvious on how to make it into a script. It's basically adding 0s to the divider of x, depending on the length of x, I think. the modulo part stays the same.

In trying to install IJulia, it literally installed a full blown python IDE. I'm not even fucking joking.

x=input('integer ')
y=str()

y1=(len(x))
y1=y1-1

x=int(x)

lists=list()

i=int()
for i in range(y1+1,0,-1):
y='1'
y=y+'0'*y1
y1=y1-1
lists.append(x//int(y) %10)


#CatsWhoCode

Python gets everywhere, and it's not even a good language

it's the most famous language among normies

thatd be javascript.

if only we could go back in time and warn Guido it would become big so he better think hard about it

at least it isn't Make

i wanna make an android app in C/C++, all the books i see are oriented towards game dev, not sure if i should pick those up
can anyone recommend good books, please no java, i hate that abortion of a language

Attached: images.jpg (260x194, 8K)

Absolute C++, no idea about making android stuff with C/C++ though

I said fast.

i can already kode in C++, i just have no idea how to do android stuffs

>C/C++
Why are you grouping two completely different languages together?

Where's the anime?

Grouping would be C/++

C/C++ looks like 'C or C++' unless / is starting to lose its meaning

No anime. Frog website.
Good double though

Attached: tfw.jpg (1000x800, 53K)

dumb frogposter

dumb "dumb frogposter" poster

Attached: 1509977647111.png (1267x785, 99K)

Attached: a meme.png (400x364, 319K)

subtyping is ok i guess

never ever say that again

subtyping is ok i guess

get out

subtyping is ok i guess

Haven't written a single line of code in weeks.

learn a new language.

Worked like a charm, thanks. I didn't know bash had things like these.

Don't know, she posted one time on Jow Forums I think?

Attached: 1495579891852.jpg (1024x576, 46K)

I have been thinking about making a simple webm capturing software. Many of you will probably know screenshot software like Gyazo or LightShot, basicaly you just draw a square on your desktop and it makes a screenshot of that.
Does anything like that exist for webm? Gyazo has a gif function, but they are so short and low quality. I dont need it to be uploaded to a server, but I want it to be simple, it can just save a file on the desktop or open a file saving dialog.

now that linus torvalds has resigned, linux rewritten in c++ or rust when?

Hey guys I made a small userscript for Jow Forums that lets you hit the thread watcher's refresh button with Shift-R instead of clicking the refresh button, sharing because some of you might find it useful:

// ==UserScript==
// @name Jow Forums refresh watched threads with R key
// @namespace Violentmonkey Scripts
// @match *://boards.Jow Forums.org/*
// @grant none
// ==/UserScript==
(function () {
document.addEventListener("keypress", function (e) {
if (e.which == 82) {
ThreadWatcher.refreshWithAutoWatch();
}
}, false);
})();

>C++
you're joking right?
>rust
yes I guess you were

didn't know people actually used the thread watcher.
I don't get the point of it when you could just keep the tabs open.

(lambda _ body)
is this acceptable for indicating I don't give about parameters in scheme

no, () is the only correct syntax

I like seeing new post counts in one place, the thread watcher feels easier to use with vimium than multiple tabs

>learning js and java when you could be learning scheme and ml

>learning java
I seriously hope

Actually, _ *might* be more correct.

(lambda () ...) indicates a procedure that takes no arguments. (lambda x x) is a procedure that takes any number of arguments and combines them all into a list represented by the variable x.

So, (lambda _ body) would work if you actually plan on applying arguments to the procedure but just ignoring them.

Any way to implement std::variant and visit (or sum types in general) in C++11? Can't use C++17

>(lambda x x)
** Should be
(lambda x body)

learning elixir doesn't make me hate dyna-langs as much as i used to. But all my typos being caught at run time still sucks.

Redpill me on getting a tecnician in programming 2 year degree.

>would work if you actually plan on applying arguments to the procedure but just ignoring them.
yes but why would you do that?

I don't know what one of those is.

>I-I'm not like the other dynamiclets, stop making fun of me

It's called analisis and development of systems of information, but is basically a technician degree to learn programming.

I'm not saying it's better than static langs.
Elixir has a lot of ugly syntax, but being backed by erlang is an interesting selling point. So i'm gonna keep learning it.

Well, if you want to avoid using (begin ...), particularly as it applies to I/O, you might get some use out of that.

i fail to see what you mean.

Well, have fun user.

At which scale is it faster to say for each in array, if equal to expect, return true, compared to using a hash table? I have a case where I need to map some numbers to something else, and there will at most be like 10 entries or so.

I'm not going to use Scheme functions directly, but you might be able to do:
((lambda _ (println "Done."))
(function-that-does-IO-and-returns-something x)
(a-similar-function-to-the-above y))
If you're particularly trying to do it in a Haskell-y/very-pure way, this is a possibility, at the very least.

that's seems extremely idiotic. just do what you want.

>and there will at most be like 10 entries or so.
literally does not matter

It does when it will be used 1000s of times

I'm working on porting Firefox to 9front. We really need a usable web browser instead of mothra.

What DOES matter?

then benchmark both versions and see for yourself.
when he gets to a non-toy example scale.

The hash table will almost certainly be faster.

are you the guy running 9front with qemu?

Nope, I run it on bare metal on a Thinkpad. But I am glad to hear someone else here is running 9front, even if it's in qemu.

this guy on /bst/ has a Thinkpad x1 carbon 6th genand is using acme, running in 9front under qemu, connected to via drawterm.

i thought you were the same guy

Attached: 1537060977824.jpg (4032x3024, 2.77M)

Oh I know this guy. Nope that's not me.

you know him personally?

Best C# online courses?