/dpt/ - Daily Programming Thread

What are you working on, Sup Forums?

Old thread:

Other urls found in this thread:

bitesizebio.com/8378/how-much-information-is-stored-in-the-human-genome/
en.wikipedia.org/wiki/Orders_of_magnitude_(data)
en.cppreference.com/w/cpp/memory/shared_ptr
godbolt.org/g/nRUOtF
lambda.bugyo.tk/cdr/mwl/
docs.oracle.com/javase/7/docs/api/java/io/Reader.html
twitter.com/SFWRedditGifs

nth for the pathetic existence of Go

first for having sex with my lisp book
how did you get a picture of me by the way

Rewriting Rust in System T.

I', working on adding a number to another number in javascript but instead i just get them together. 2 + 2 is twenty two

I thought jquery was great and did all things but this just ;eaves me stumped

"The most powerful programming language is Lisp. If you don't know Lisp (or its variant, Scheme), you don't know what it means for a programming language to be powerful and elegant. Once you learn Lisp, you will see what is lacking in most other languages." -Richard Stallman

FooNaN desu

Threadly reminder that dlang-chan is not dead; she's going to have her GC tumor removed (eventually); and she's super duper cute and easy to prototype in! Say something nice about her, /dpt/!

>Richard Stallman
Stopped reading right there.

>using emacs
>not using ewindowses
fucking neck yourselves macfags

We need more lewd loli mangos adapted to /dpt/.

if Sup Forums is so smart why dont they just make their own internet

JUST
(deffunction main-func()
(printout t "Enter a number: ")
(bind ?chosenNumber (read))
(loop-for-count (?i 0 ?chosenNumber) do
(if (=(mod ?i 15) 0)
then (printout t "FizzBuzz")
else (if (=(mod ?i 3) 0)
then (printout t "Fizz")
else(if (=(mod ?i 5) 0)
then (printout t "Buzz")
else (printout t ?i)
)
)
)
(printout t crlf)
)
)
(defrule sys-init
=> (main-func)
)

we already have like three de-central networks going.

But I already did. You used it just now to post this message.

that was the end though, so I also stopped after that..

o

can u put it on a floppy for me?

would some kind soul be willing to take a peek at my shoddy neural net and tell me why it cant predict shit?

>System T
Say your experiences with it.

Sauce?

How did you guys learn your current programming language of choice?

Not a lisp

*raises hand*

reading its unofficial, official book and citing its site.

I got you, senpai

Easily

>more than 4 indent levels

ugh I don't even

BASIC language book borrowed from the library

Not sure there's enough room left famalamadingdong

>128 ExaBytes SD card
I'm sure we'll see this one day

so what ive got is a single neuron with a sigmoid activation function, i train it with a function that returns a set of weights for a given input count and learning rate, and a function that attempts to continue from where the training data left off. when continueing i either get a constant flatline or a wall of peaks and dips that do not at all fit the pattern, depending on the learning rate and input count supplied. would you be able to tell me why this is or give me some hints at what might be wrong?

pic related, top is the learning results, bottom is the prediction results, red is neuron output, blue is training data.

>parens on their own lines
Absolutely disgusting.

Pretending you could store 1 bit per atom and the other components of the card took up negligible space, how much data could something the mass of an SD card even hold?

One gram on DNA could potentially store 400+ exabyte, now imagine if a special card was designed user per atom just to store info.
This will happen and sooner than we think

[citation needed]

I'm making a winforms app in 2017, should I feel bad? (It's for work though)

What else would you use? WPF? Nobody really understands WPF. Not even Microsoft.

>being a googlet nigger
bitesizebio.com/8378/how-much-information-is-stored-in-the-human-genome/
it's just simple maths, no proof needed

Is WPF even "alive"? I've seen articles declaring it's dead back in 2012.

Literal brainlet

A shill shilled it to me and I liked what he shilled.

The word "gram" isn't even mentioned in there, and there's so much bad math it might as well be labeled fake science.

AI class taught me prolog, and god damn is that shit powerful

sorry you're just too stupid

Classical logic is trash though.

It's better, it's cLIPS.

doesnt matter, its exceedingly fucking powerful compared to imperative languages

Since you're a dumb nigger I'll just link you this
en.wikipedia.org/wiki/Orders_of_magnitude_(data)
scroll down to zettabyte and look for the graphite thing and think for a second

Got a Java question.
I have a method like this: public void Maze(java.io.Reader fileInput), it's suppose to take a texfile and turn it into a 2d array maze.
What input is it suppose to take? In my main I try to send a BufferedReader, args[0], a FileReader, but whatever I do I always get "Maze() in ClassName cannot be applied to" error.

>doesnt matter
It matters when the core of the language is trash.
>its exceedingly fucking powerful compared to imperative languages
Sure, but that isn't really saying much.

C++ doesn't have this problem

post full code

im sure lisp is far more powerful and versatile, but i dont know lisp, so for now that remains the most powerful language i have at my disposal

I'm pretty sure most lisps have call/cc, making them classical trash as well.

redpill me on setjmp/longjmp

For exceptions, so isn't required for performance, so useless, so C89 is still the King.

so what do you recommend?

Switch to Kotlin.

it's a c89 thing

Really? That's not what I 'member. But in any case it's useless.

So have you all started using smart pointers or cannot afford to refactor or learn a new concept?
Foo* func(T arg){
return new Foo(arg);
}


>VS
shared_ptr& func(T arg){
return make_shared (arg);
}

I want to git gud

How old are u?Got a job?

Prolog with everything classical removed should be fine.

>C++

SICP

>started
theyre like 5 years old at this point.

How so? What do you suggest instead?

>returning a reference to a local variable
You should stop using C++ and switch back to PHP.

Have you used it ever in your project if exists?

I only use unique ptrs with constant accessors tbqh

i did when i still used sepples

You are what is known as retarded person.
Read the context properly and reply.

public void Maze(java.io.Reader fileInput) throws IOException
{
int lineBuffer;
BufferedReader reader = new BufferedReader(fileInput);
String line;

while ((line = reader.readLine()) != null)
{
// process the line
rows++;
cols = line.length(); // always the size of the last line in the file
}
reader.close();
while((lineBuffer=reader.read())!= -1)
{
for(int i = 0; i

>using namespace std;
please do not embarrass yourself any further

and where you call the function

I've read it, the second function isn't equivalent to the first, the temporary object created by make_shared is destroyed at the return and the reference the function returns refers to nowhere after the call. The function should return shared_ptr by value.

I needed to get things done, and it turns out that pretty much anything you'd want to do is already baked into the language/framework/toolset.

make_shared makes a shared pointer which is returned by value.

here learn how shared_ptr works
en.cppreference.com/w/cpp/memory/shared_ptr

Common Lisp

public class mazeMain
{
public static void main(String[] args) throws IOException
{
Maze mazeTest = new Maze(args [0]);
mazeTest.printMaze();
}
}

public void printMaze()
{
System.out.println(Arrays.deepToString(mazeData));
}

Fuck, you're dense.
I know how shared_ptr works, m8, the problem is you returning it by reference and not by value, it won't even fucking compile godbolt.org/g/nRUOtF .

I appreciate what you're doing here

What procedural/imperative languages don't have objects?

assembly

C

lambda.bugyo.tk/cdr/mwl/

args[0] is a String.
You need to pass in something that extends Reader. See "Direct Known Subclasses" here.

docs.oracle.com/javase/7/docs/api/java/io/Reader.html

Some Readers read from files, others read from strings. You may want a StringReader. Try this.


public static void main(String[] args) throws IOException
{
Reader r = new StringReader(args[0]);
Maze mazeTest = new Maze(r);
mazeTest.printMaze();
}

Any modern languages that don't take weeks to do something trivial?

What do you need to accomplish, the requires the absence of objects?

/dpt/ says they pollute everything. I don't know, I'm just trying to get a good utility language to do things in, but all the cool ones have objects of some sort or another. New to programming, but I get the basics.

Lua

>he listens to /dpt/

Bourne shell.

If you want a language without objects, you should stick to functional programming.

>but all the cool ones have objects of some sort or another
>thinking languages with objects are cool
get out

FUKIN HELL

i made a python script that works, but as soon as i start it, audio on my win10 starts stuttering... dropping the multiprocessing from 16 procs to 1 improves it a lot but it's still present, and it doesn't really makes sense since almost all threads are always waiting for a lock anyway...

i'm going crazy, pls help

>listening /dpt/
>listening to anything on Sup Forums
there's no hope for you left

install gentoo

>falling for both the python and w10 meme
wew lad

Ok thanks.

>pls help
>doesn't post any kind of information on what he's doing or the script itself
It's probably because you wrote it like a retard and python is a fucking trash language