[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y / ] [Home]
4chanarchives logo

/dpt/ - Daily Programming Thread


Thread replies: 331
Thread images: 34

File: 1457789436458.png (213KB, 700x1021px) Image search: [Google] [Yandex] [Bing]
1457789436458.png
213KB, 700x1021px
Friendly reminder that dressing like a schoolgirl improves programming ability.
It's a scientific fact!

Also, what are you working on, /g/?
>>
j-java is best edition
>>
>>54809718
Old thread >>54806107
>>
>>54809718
>Posting new threads before the bump limit
>No linking the old thread
>Literal faggotry
Delete this shit and kill yourself.
>>
>>54809718
why is she sad anon?
>>
>>54809861
>she
>>
Well at least you're having a little diversity in your choice of crossdressers...

Anyways, on the subject of programming... why the hell does print debugging just magically work in 95% of cases?
>>
>>54809861

She's sad because somebody tried to cover up their shitty opinion with a lengthy diatribe, expecting that people would unable to read between the lines. I'm not saying C and Python are bad, but I will skirt the subject.
>>
>>54809741

>Java is best
Are you betraying your love of .NET?
>>
>>54809797
Jokes on you, I'm a math major.
>>54809781
It works with the driver it was given. Beyond that, though....
>>54809803
Just wanted to make sure.
>>54809807
Maybe once the quarter is over.
>>54809839
It's a deque. But, yeah, we fucked.
>>
>>54809891

Just some light shitposting. I'm tired of people thinking they can conceal their inane """opinions""" in endless bloviation and that it somehow makes them sensible or correct, that's all.
>>
>>54809718
Why is this male dressed like a schoolgirl.
>>
>>54809879
>why the hell does print debugging just magically work in 95% of cases
Because most of the time, all you need to know what the state of a couple variables are.
>>
>>54809879
>why the hell does print debugging just magically work in 95% of cases?

I used printf debugging before I even knew what debugging was. It just feels like a natural step.
>>
>>54809929
What is ""this"" all about? I began to see it done """the other day""", but have yet to figure out why.
>>
>>54809968
It's scare quotes taken to the extreme.
>>
>>54809968
it represents an obnoxiously overdone quantification mark hand gesture.
>>
>>54809968

Excessive application of a particular character for comedic purposes. Kind of like LISP.
>>
>>54809989
rekt
>>
>>54809941
Because he fell for the crossdressing meme.
>>
>>54809989
B-but Lisp parenthesis have meaning
>>
Hey guys, who here loves assembly master race like I do?
>>
I'm working on a program that reads in a file, interprets its binary data as colors, and displays it in different ways. I just finished a simple 4chan thread downloader so I can more easily archive stuff on /w/, /wg/, and a few other boards.
>>
>>54810045
Tried programming with it once
Never again
Didn't help I was using Gentoo with absolutely no GUI
>>
>>54810045

It can be fun at times, but I wouldn't use it to write anything large. Do you have a favorite ISA to program for?
>>
>>54809968
When you use single quotation marks to sarcastically say something, using lots of marks increases the effect.
So this:
>polish "intellectuals"
turns into:
>polish """""""""""""""""""""""""""""intellectuals"""""""""""""""""""""""""""""
As always, it's an /int/ thing.
>>
File: 1463770045787.jpg (47KB, 640x503px) Image search: [Google] [Yandex] [Bing]
1463770045787.jpg
47KB, 640x503px
>>54810032

I know, m8. It were bants. I actually have come to love [spoiler]parens[/spoiler].
>>
When did the C++ committee lose its mind?
https://channel9.msdn.com/Shows/Going+Deep/C-and-Beyond-2012-Andrei-Alexandrescu-Systematic-Error-Handling-in-C
I watch this and I just feel burning rage for all their language syntax masturbation.
>>
>>54810032
Haskell's `$' operator solves it
>>
>>54810152
>When did the C++ committee lose its mind?
They never had it to begin with.
>>
I can't find an explanation worth a damn on google and I know ill get shitposted on here, but can somebody explain how this works?
>>
>>54810154
Prefix notation is patrician
>>
>>54810152
that looks just like Maybe's
why is that bad
exceptions are dogshit for error handling
>>
>read /r9k/
>they're having a programming discussion
>>>/r9k/28913262
>>>/r9k/28913461
>>>/r9k/28913529
>>>/r9k/28913687

These people are seriously damaged..
>>
>>54810215
>caring at all about what /r9k/ has to say
>>
>>54810196
Go read a book. It'll be one of the first things they explain.
>>
>>54810212
>that looks like Maybe's
Yeah. It's a very odd implementation of maybe's intended to pass exceptions instead of nothing in case it goes wrong because they wanted error information to deal with the issue.
See 17:00. He mentions it.
>>
>>54810234
Well its 10 o'clock here so I can't just pop over to the bookstore. Also Should I look at learning java?
>>
>>54810261
>It's a very odd implementation of maybe's intended to pass exceptions instead of nothing in case it goes wrong because they wanted error information to deal with the issue.
That would normally be taken care of with Either.
>>
data Value = Numeric Integer | Boolean Bool | ERROR
deriving Show

data MemVal = Stored Value | Unbound
deriving Show

type Memory = Ide -> MemVal

type State = (Memory, Input, Output)

display :: Memory -> String
display m = "x = " ++ show (m "x") ++ ", y = " ++ show (m "y") ++ ", z = " ++ show ( m "z") ++ " "

update m ide val =
\ide2 -> if ide == ide2 then Stored val else m ide2




I'm doing this Haskell interpreter thing to learn Haskell and there's some pre-existing code I have to build upon.

I just don't get how the update function works with the Memory type, I think the Memory type is essentially a function that takes in a identifier.

And how does the Memory get stored as something that can be passed to the display and update functions?
>>
>>54810196
>#include <stdio.h>
Includes functions from the stdio.h header file. Includes things like printf() which you use later.
>main(void)
Entry point for the program.
>printf("..")
A function available in the C standard library which lets you print a formatted string of text.
>return 0
0 is used to denote success. Its a way of telling whatever started your program "I ran fine".

Just go through this:
http://c.learncodethehardway.org/book/
Or whatever. C isn't a difficult language once you get into it.
>>
>>54810265
holy fuck you're dumb
>>
>>54810341
Condidering the shitshow that was the last thread my mind is just really numb right now
>>
>>54810338
Learn c the hard way is fucking garbage
>>
I'm running into a problem when programming an AF_UNIX server in C.

It's structured so that the user can define a thread pool, and threads from that pool will accept connections from socket IDs stored on a list.
I'm filling the list through another thread which is in charge of running accept on the socket and returns the new ID the other threads will use.

Sounds like a fairly standard producer/consumer problem which I tried to solve with conditional variables.

So my producer thread works something like this:

while(1)
{
do
{
if((chk = pthread_mutex_lock(&connQueue)) == 0)
{
if(queueLength + currentconnections < maxconnections)
// accept on the socket ID I pass the thread and save in a list
if((list.socketid = accept(socID, NULL, 0)) == -1)
{
pthread_mutex_unlock(&connQueue);
exit(EXIT_FAILURE);
}
else
{
// add element to list
pthread_cond_signal(&connectionQueueWait);
pthread_mutex_unlock(&coQU);
}
}
else
{
pthread_mutex_unlock(&coQU);
}
}
while(err != 0);
}


But it works horribly.
This is a test output. The same thread (I have 30 active) handles a ton of connections all at once, and some times it doesn't even process the last connection.
pastebin /KBvrqUWm
>>
>>54810308
You're right about Memory being a function. As for how it gets passed to display or update, functions are first-class members and can be bound to names, so if you had an identifier x of type Memory you could use it as an argument to display or update which would then apply X to an identifier in their bodies.
>>
>>54809718
Thanks for this new artist, OP

I will fap to his work in honor of you
>>
>>54810409
apply x in its body*
>>
>>54810265
>Well its 10 o'clock here so I can't just pop over to the bookstore
there are books and tutorials online

>Also Should I look at learning java?
yes

https://docs.oracle.com/javase/tutorial/
>>
>>54810403
Also it's 4 in the morning and I fucked up the code snipset. To make it more readable I went on and changed the name of the mutex variable from "coQU" to "connQueue" but then left 2 coQU in that code.
The code to add the element to the list containing the connections waiting to be read is there, I just removed it from this example because it's irrelevant right now.
>>
>>54810398
this

fuck z.s.
>>
>>54810398
>implying anon is at the stage where quality matters more than his indecision
It's better he just reads than than procrastinates.
>>
>>54810472
>implying he even needs a book to read about hello world
>shilling this hard
>>
>>54810308
In Haskell, functions can be passed around as values like anything else. You can think of Haskell functions as being roughly equivalent to immutable tables, where you put in your key (argument) and get a value (result).
>>
>>54810502
>shill
I pointed to a free resource. Suggest an alternative. I'm sure it's just as good. I don't feel strongly about learn c the hard way.
>>
>>54810506
lisp also has that feature
>>
File: segfaulting.png (19KB, 813x895px) Image search: [Google] [Yandex] [Bing]
segfaulting.png
19KB, 813x895px
Let me tl;dr explain whats going on.

1. First function makes dynamic 2d array and converts 1 and 0's from input file making a board for game. Prints out correctly.

2. Second function I'm trying to pass in the 2d array that is now filled for the game. It's getting correct rows and cols as tested, and should print the exact board as above did, but it seg faults.

Any ideas?
>>
>>54810546
Yes, it does. Most languages do, nowadays, but Haskell makes it much more seamless than most, and so does Lisp.
>>
>>54810546
does lisp even support proper partial application
>>
>>54810506
>functions can be passed around like values
Not him but are you talking like function pointers or can you somehow keep copies of functions and alter them? Haskell seems a lot more rad now.
>>
>>54810578
you are in for a new world called FUNCTIONAL PROGRAMMING
functions being values is only the beginning
>>
>>54810196

>#inlcude <stdio.h>
In C, a line beginning with a # is a special kind of directive handled by the preprocessor. Before the compiler even begins trying to make sense of what your program does, the preprocessor is going to do a bunch of text substitutions based the preprocessor directive.

The #include preprocessor directive tells the preprocessor to find a file in the standard include path and copypaste its entire contents into the file you're compiling. This is typically used with what is known as a "header" file to provide type definitions and forward-declared functions (more on that in a bit) so that the compiler can know of their existence. The file stdio.h contains information about C's standard I/O utilities, including the printf function.

>int main(void) {
Here we define a function called main, which returns an integer (32-bits, signed on ARM Linux, which is what I'm guessing you're using), and takes no arguments. In C, the name "main" is reserved for a special function that serves as the program entry point. That is, the function main is called when your program starts up.

>printf("hello world\n");
This calls the function printf and supplies it with an argument that contains a pointer to a block of memory containing the text string "hello world\n". This effect of this is that the message "hello world", followed by a linefeed character, is printed to your terminal.

>return 0;
As mentioned before, main is a function that returns an integer. The integer here is 0, and the return value of main is going to be used to indicate to your terminal the exit status of your process. A 0 is a typical standard for saying "everything went fine!"
>>
>>54810578
Much more powerful than function pointers. Values of function type in Haskell are always closures.
https://en.wikipedia.org/wiki/Closure_%28computer_programming%29
>>
>>54810552
>That tab length
Fucking hell man
>>
>>54809741
Man i just tried Java via android development and i wanted to blow my fucking brains out, coming from C#. It felt like every line needed a fucking import, tell me i'm just shit and this isn't reality.
>>
>>54810632
it's android that's shit, if you do android dev with xamarin it's the same shit

also ctrl+shift+o to auto-import in eclipse
>>
>>54810632

C# is better.
>>
>>54810632
Nope. Android dev is shit. Go find a library of some sort instead. It's what anyone willing to keep their sanity is doing. (not that it helps much)
>>
>>54810552
why does printing the board take a Position param
>>
>>54810648
>>54810672
Thanks lads, knew I could count on you lot to reassure my inability.

>>54810664
Sadly it doesn't run on android brother.
>>
>>54810715
Considering you're from C#.
Consider https://www.xamarin.com/
I haven't used it but I've been told good things about it by shills. For what that's worth.
>>
>>54810728
>micro$hit
>on a gjewgle platform
shit on top of shit
>>
>>54810627
The linux kernel codebase uses 8-width tabs
>>
>>54810632
> every line needed a fucking import
Please don't tell me you manually import anything? Nobody actually does that you fuckwit.
>>
>>54810738
Eventually when you stack enough shit. You have enough other people to blame to make yourself seem ok.
>>
>>54810675
It's for later use for the game piece, its a struct. Doesn't apply to it atm.
>>
>>54810728
Oh shit i didn't know this existed, fingers crossed it just werks. Thanks.
>>
>>54810747
It was an example, calm down Rajeesh.
>>
Why does everyone have Indian names? Are you all from India or something?
>>
>>54810800
nice try pajeet
>>
>>54810790
I guess in C# you're forced to manually import everything?
>>
>>54810819
Haha. Sorry my friend you're mistaking me for someone else.
>>
>>54810828
Not him but. Doesn't the fact that you have so much stuff to import that you automate the process somehow make you worry?
>>
>>54810834
You should probably off yourself right now and get over it you loser
>>
>>54810828
It's IDE specific.
>>
>>54810728
Looking for a way to run it on Linux, doesn't seem possible. Unless anybody here has a solution?
>>
>>54810844
no? wouldn't it be more worrying to have all kinds of OS stuff all in one scope?
>>
>>54810844
No, I literally write the class name, e.g. Date and IntelliJ shows me a list of packages that include the class Date. I pick the package that contains the right one (it's basically just autocomplete) and it imports it for me. Same when I delete it, the import is gone. It's never been a problem for me or anyone I can think of.
>>
>>54810858
>C#
>Linux
what are you doing with your life mate
>>
>>54810862
>>54810867
Well it's more about the idea that your application is wrapping far too much stuff. I'm not used to that kind of development. I #include GLFW and then I'm pretty much done with external libraries.

Id be worrying sick if I had to keep track of all those things. I mean, if it had to be automated it's likely multiple thousands different imports right?
>>
>>54810828

No, but the difference is that using VS with IntelliSense is comfy. It is the best auto-complete I have ever used. It's better than mere auto-complete, even.. it just KNOWS what I want to do before I even do it. It's like Microsoft is reading my mind.
>>
>>54810606
I appreciate you
>>
>>54810869
I enjoy using Linux, i don't enjoy writing in Java but would like to try android development. Are we up to speed on my retarded dilemma now.
>>
>>54810891
if you use C# with xamarin it's still the same shit, just look at the docs, it's pretty much the same methods but renamed to PascalCase instead of camelCase
>>
>>54810883
I don't have that experience with intelisense at all.. I can be writing simple code and it just gives me random defines from windows.h or whatever. How do I fix that? I'd really like to simply not have it suggest shit from windows.h to be honest. It's not like I ever use a Windows function without reading msdn anyway. They're far too strange to dare do that.
>>
>>54810881
it's not an issue at all, like if you handle input events you import android.view.View.OnTouchListener and override the onTouch method which takes a View and a MotionEvent so you import those as well, and to import it all you just press ctrl+shift+o
>>
>>54810905
>They're far too strange to dare do that.

You mean you don't like like using RtlWriteDecodedUcsDataIntoSmartLBlobUcsWritingContext(...) on a lark?
>>
File: output.webm (186KB, 484x278px) Image search: [Google] [Yandex] [Bing]
output.webm
186KB, 484x278px
>>54810881
??
>>
It's much better for C#, though. For C/C++, I use CLion.
>>
>>54810883
Is it any different than IntelliJ autocompletion?
>>
>>54810979

It just seems slicker to me. More often it knows what I intend to do, I find.
>>
>>54810760
I'm not sure why you're experiencing an issue. Is anything happening between the two function calls that could be compromising?
>>
So in a freestanding C environment there's no C standard library, but some things are included in the compiler like float.h.

Why don't they just include the standard library in the compiler like they're including other things?
>>
>>54811347
Because C isn't necessarily going to be used in situations where it makes sense to require the standard library.
>>
>>54811385
So someone can easily include the standard library if they want?
>>
>>54811500
If you're going to use the standard library then you don't need a freestanding implementation.
>>
When people talk about I/O like non-blocking I/O are they talking about writing and reading to the hard drive or is it in a networking context, like writing to a socket and reading from it?
>>
>>54811347
>but some things are included in the compiler like float.h
All of the things included with freestanding C code are just macros and typedefs or some implementation defined stuff. Non of them contain any actual functions or code.
>Why don't they just include the standard library in the compiler like they're including other things?
Because freestanding C may be used in situations where the standard library isn't needed or isn't appropriate. Much of the standard library requires facilities of an operating system kernel, but what if you're writing a kernel? What is it going to rely on?
>>
>>54811510
>>54811548
Thx

I get it now. It relies on kernel features so you need them first.
>>
>>54811524
>are they talking about writing and reading to the hard drive or is it in a networking context
They could be talking about either. "Non-blocking I/O" pretty much refers to all interactions between your program and the outside world.
>>
>>54810196
>touchwizz
>>
>>54811563
Thanks anon
>>
File: 1464542237759.jpg (161KB, 414x615px) Image search: [Google] [Yandex] [Bing]
1464542237759.jpg
161KB, 414x615px
What's the best way to get Emacs running on Windows?

I feel like the official instructions from GNU are deliberately misleading.
>>
>try working on complex project
>it's too hard and I quit
>work on simpler project
>making magical progress but feels like shit cause it's too easy
>>
>>54811524
Blocking and non-blocking is more about whether things can happen concurrently or not, whether that be a program executing another section while/ instead of waiting on i/o or another thread / process / program being able to use the same i/o resource concurrently with it.
>>
>>54811607
I don't get it though, if non-blocking uses one thread then how can it process other requests while it's busy with another? how is it faster to let one thread do everything than start other threads while having one thread to wait for requests?

I may be too retarded for this
>>
>>54811596
Literally download the zip file, extract where you want it, and run the executable.
Really not all that complex.
>>
File: main.png (11KB, 447x539px) Image search: [Google] [Yandex] [Bing]
main.png
11KB, 447x539px
>>54811101
Not sure. Here is where they are being called.
>>
I decided to finally get into programming. Java or C#?
>>
>>54811639
Just take it slowly and read a little bit about: busy waiting vs non-busy waiting, then concurrency vs parallelism, and then blocking vs non-blocking i/o.
>>
>>54811718
Neither.
>>
>>54811742
Alright, thanks. I'm reading on it.
>>
>>54810026
It's not a meme, you should try writing Haskell while wearing a skirt.
>>
>>54811718
java
>>
So what should I do with this empty space?
I highlighted the two empty regions with the black rectangle.

Any cool features or ideas on what to implement here? Or should I keep it as is and minimal.

First GUI project, so i'm trying to polish it up.
>>
File: TlceKZ0[1].jpg (295KB, 1666x1102px) Image search: [Google] [Yandex] [Bing]
TlceKZ0[1].jpg
295KB, 1666x1102px
>>54811842
visualizer at the top
make the volume have like a mountain shape in foobar2k

so check foobar2k, the visualizer next to the volume
>>
>>54811931
top of your empty region*
then of course have a play, stop, next, back buttons
>>
>>54811791
He writes in C though
>>
I've been sitting at my computer all day and I got nothing done
Kill me
>>
>>54811966
Put on a skirt and write a custom heap allocator in C.
>>
>>54811947
>>54811931
Some really good suggestions here. Appreciated.
I was also thinking about implementing that wave-bar seeking (to see the song structure, like you have)

Is it worth implementing toaster popups/notifications (lightweight hopefully and noninstrusive)
>>
>>54809718
>Friendly reminder that dressing like a schoolgirl improves programming ability
Is this true?
>>
>>54812171
no
they are the worst programmers

You need to grow a large beard to gain programming ability
>>
>>54812171
>>54812224
Think of it like an RPG, senpaitachi. You equip your breastplate, helmet, gloves, accessories, and so on, and they all contribute to your abilities.
>>
>>54812171
>>54812224
it does, you also get to fill a minority quota.
>>
>>54812269
fucking degenerate.
Restore your family honor anytime.
>>
>>54811701
And it segfaults on the first iteration of your double loop?
>>
>>54812171
no
>>
>>54812307
I'm not sure what you mean, but the first function prints it and loops through it just fine. When it goes to the second print out (or however many times its supposed to loop in the while loop in main) it seg faults on the first time.
>>
>>54810552
what does make_char_array do?
>>
File: 1464543304475.jpg (32KB, 247x247px) Image search: [Google] [Yandex] [Bing]
1464543304475.jpg
32KB, 247x247px
fucking Emacs (+ evil-mode) is awesome

I can't believe I wasted my life with Vim
>>
>>54812686
hmm. perhaps try
cout << board == 0 << endl;
cout << *board == 0 << endl;

To see if either pointer is null.
>>
File: 1443500977688.png (835KB, 1200x1080px) Image search: [Google] [Yandex] [Bing]
1443500977688.png
835KB, 1200x1080px
/dpt/-chan, dai suki~

>>54812171
yes

>>54810506
It's know as first class function.

https://en.wikipedia.org/wiki/First-class_citizen
https://en.wikipedia.org/wiki/First-class_function
https://en.wikipedia.org/wiki/Higher-order_function
https://en.wikipedia.org/wiki/Higher-order_programming
>>
>>54810552
>>54811701
you dinguses! board is local to the function! board in main is still not initialized after the first function call
>>
File: fore.png (722KB, 600x575px) Image search: [Google] [Yandex] [Bing]
fore.png
722KB, 600x575px
What the fuck do I work on?
I never know what to do/make or anything.
>>
>>54812884
make the shittiest game ever and put it on steam greenlight
>>
Hey /dpt/, if you had a web browser with a buffer overflow vulnerability that could be exploited from a malicious piece of javascript, would it be unreasonable to believe that one could return to libc from said malicious Javascript?
>>
>>54810578
It doesn't alter functions or copy them, but it references them exactly like function pointers. If you've used C++, all functions are like functors (classes with an overloaded operator() ) in that they can have some attached state (or like lambdas, essentially)
>>
>/dpt/ on page 5
what the fuck
>>
>>54813387
>middle of the night in 'murrica before a monday
>monday morning in yurop
>>
>>54813407
Mid-day exactly in India
/dpt/ should be lit up like the sun
>>
At what column do you prefer to wrap lines, /g/?
>>
>>54813703
i seriously hope you don't auto-wrap lines

just wrap at a point where it makes sense like at a binary operator
>>
>>54813703
Before column 80 at the end of an expression or before a binary operator.
>>
>>54813721
I don't, I was just curious at what line length most people started to look for a place to break.
>>
>>54813824
for me it depends, if the expression lends itself to being wrapped easily then it could wrap at like 80, otherwise if it would be ugly looking or if the line doesn't have to be readable at a glance it can stretch to 120 or maybe 140
>>
>>54813876
also there could be other solutions to shorten the line like turning a part of the expression into another variable
>>
>>54812839
how da fack do i bring it out?
>>
>>54814001
draw_initial_board has a side-effect: it sets up the board in-memory as well as drawing it. You should have one function to start the board and another function to draw the board. The function to start the board could take a filename and Position and return a pointer to the allocated board. Then draw handles all drawing.
>>
>>54814032
Alright, thanks for the tips man.
>>
>>54814001
the easiest would be to move the initialization part in the first function (before the loop starts) to the main function
>>
I'm trying to compile the Trinity Desktop Environment, and it needs tde-arts. So, when I try to compile it, it fails at iomanager.cc because of a narrowing conversion, and the code which it fails at is like this:
struct timeval never = { 0xffffffff, 0 }
>>
>>54814565
What is timeval made of?
>>
>>54814565
Try casting the 0xfffffff to uint or just remove -Werror flag.
>>
>>54814589
What are you talking about?
I'll admit, I know jack shit about programming, I just want to use a desktop environment that I'm familiar with, but in any case, what do you mean by What is timeval made of?
>>
I'm using Python and Tk to create multiple entries and to get the content of these entries into a list, but all I get at the end is an empty list

for i in range(1,17):
name = 'Slot #%d' % i
self.slotlabel = tk.Label(self.topslots, text = name, padx = 10)
self.slotentry = tk.Entry(self.topslots)

self.slotlabel.grid(column = 1, row = 1 + i)
self.slotentry.grid(column = 2, row = 1 + i)

slottype.append(self.slotentry.get())


What am I doing wrong?
>>
>>54814601
Like what are the member types?
>>
>>54814616
I know almost nothing about C++,
so can you explain what are member types?
>>
>>54810627
If you render tabs as anything other than 8 characters wide you're wrong.
>>
>>54814635
Just link me to the api or something dumbass
>>
>>54814635
Can you show us where this source code is so we can work this out?
>>
Anyone have experience with daterangepicker.com? How the hell do I change the template without modifying the original code.
>>
>>54814616
       The macros are provided to operate on timeval structures, defined in <sys/time.h> as:

struct timeval {
time_t tv_sec; /* seconds */
suseconds_t tv_usec; /* microseconds */
};
>>
>>54811639
You use something like epoll(4) on linux, select on other things. Basically you set up a file descriptor to represent a poll on a bunch of open file descriptors and just block on the poll. What's wonderful is that you can represent most things a file descriptors.

You can use threads too, but they're heavier weight.
>>
>>54814686
What types are time_t and suseconds_t?
>>
>>54813049
> return to libc
I don't think that means what you think it means.

But yeah, there's a good chance you could get something to jump where it's not supposed to and take control, or poke values somewhere they don't belong.
>>
>>54814665
If you wanted the entire dependency, here's the download link: http://bg1.mirror.trinitydesktop.org/trinity/releases/R14.0.3/dependencies/arts-R14.0.3.tar.bz2
File is located inside the archive at dependencies > arts > mcop > iomanager.cc
>>
>>54814708
platform dependent
>>
>>54814729
Try casting to the respective types, might belay the warnings
>>
>c++ class
>learn STL containers one lesson
>assignment is to write a program that does blah blah by using STL containers
>ambiguous about whether that means we can *only* use STL containers or whether we can also use things like structs and c-strings

so I have a 50/50 chance of getting the assignment correct
>>
>>54814744
Like just the aliases
>>
>>54814749
of course you can use structs and C strings you dolt
why you'd want to use C strings in C++ is beyond me
>>
>>54814749
Ask someone you retard. But they probably mean to use the STL wherever you can, don't use an alternative if there's an STL version available.
>>
Node.js has a web workers implementation in a pull request, but they aren't giving it much attention.

What the fuck is these node faggot's problem? Why the fuck do they hate threads so much? All you have to do is make a fucking thread implementation that works with its own eventloop. Then you can just make a function and it'll get back to you with whatever results from that same event loop. It's like how the fucking I/O works under the hood. But actual Javascript code. Jesus assraping christ

Come on, its OK, show daddy where the threads touched you.
>>
>>54814840
Maybe because that'd require locking on the event loop which would be shared so you'd be effectively degrading the performance?
>>
>>54814896
They already have a motherfucking event loop running with a million threads doing I/O under the hood and it's not blocking shit, how the shit would it degrade performance?
>>
Will having backend web dev hurt my CV when I try to apply for some other programming jobs outside web dev?
>>
>>54815050
I don't see how having backend experience would hurt. There are people who can only frontend with html and css. Backend shows better understanding, right?
>>
>>54815081
Did I fall "web developers need to die is not a meme" meme?
>>
>>54814724
>http://bg1.mirror.trinitydesktop.org/trinity/releases/R14.0.3/dependencies/arts-R14.0.3.tar.bz2

What in the fuck? Why does this tarball force me to go down three directories before finding anything? Why is building it so hard they have to make a god damned wiki for it.


What is this shitty product?

h5.. reading.
>>
#include <cstdlib>
#include <sstream>
#include <iostream>
using std::exit;
using std::cout;
using std::cerr;
using std::istringstream;

int main(int argc, char const **argv) {
int const max = [&argc, &argv]{
switch(argc) {
case 1: return 100;
case 2:
{
int n;
istringstream i(argv[1]);
i >> n;
if (!i) {
cerr << argv[1] << " is no number\n";
exit(1);
}
return n;
}
default:
cerr << "too many arguments\n";
exit(1);
}
}();
for (int n = 1; n <= max; n++) {
switch((n % 3 == 0 ? 1 : 0) + (n % 5 == 0 ? 2 : 0)) {
case 0:
cout << n << "\n";
break;
case 1:
cout << "Fizz\n";
break;
case 2:
cout << "Buzz\n";
break;
case 3:
cout << "Fizzbuzz\n";
break;
}
}
return 0;
}

R8 my C++ fizzbuzz, /g/!
>>
>>54815141
>(x : bool) ? 1 : 0
>(x : bool) ? 2 : 0
What the fuck are you doing?

(!!(n%3)) + 2*(!!(n%5))
>>
>>54815137
The following build order seems to work:

...

If the package you're trying to build is on the list of those that will build with cmake, try that first, because its autotools files will be unmaintained, bit-rotted, and possibly outright broken.
...
For those packages that still need to be built with autotools...
Not well documented anywhere, but when building with automake several packages need the --enable-closure configure option...
Build Times: ... Approximate total time: 5 hours 51 minutes



Jesus Christ I was going to try and help build this but..
>>
>>54815183
What happened?
>>
>X.org
Anyone know what event->response_type 64 is? It's coming from the window manager when I get iconified, but I can't find it in any documentation.
>>
>>54815219
But I'm not sitting through this. Why is anyone trying to build this unless they are developing the product or an OS packager?
>>
C++ newfriend here. I'm trying to write a logarithm function that will work for positive and negative inputs, meaning it'll have to return either double or
std::complex<double>
depending on the input parity. How do I do this? My best attempt so far is

template <typename T>
T ln (double input)
{
if (input >= 0)
{
double output = log(input);
return output;
}

else
{
std::complex<double> output (log(-input), M_PI);
return output;
}
}


which won't compile.
>>
File: quacker.jpg (58KB, 541x566px) Image search: [Google] [Yandex] [Bing]
quacker.jpg
58KB, 541x566px
Error codes or exceptions?
>>
>>54815358
Optional, Maybe, try

Exceptions are considered harmful
>>
>>54815358
Sum return types

Option/Maybe T is an example, of the form
None | Some : (\x:T)
>>
File: 1461131537219.jpg (227KB, 838x1024px) Image search: [Google] [Yandex] [Bing]
1461131537219.jpg
227KB, 838x1024px
Does anyone have ideas for simple (or very slightly complicated) multi-threaded programs? Something like the DPT challenges but with multiple threads in mind.
>>
>>54815358
My code responds to any and all errors by calling a kernel panic.
>>
>>54815358
Monads.
>>
>>54815528
Social simulation (fantasy) with one town/core & town->town interactions
>>
File: cpp.png (59KB, 1354x602px) Image search: [Google] [Yandex] [Bing]
cpp.png
59KB, 1354x602px
HURR THE TECH INDUSTRY IS SO HOSTILE TOWARDS WOMYN

fuck this world
>>
Hold me
Linked lists are still slow at appending for data over 10k items
ResizeArrays are near constant
>>
>>54815746
Use lazy immutable lists
>>
File: neo,thereisnobool.png (10KB, 733x289px) Image search: [Google] [Yandex] [Bing]
neo,thereisnobool.png
10KB, 733x289px
people like to screenshot tweets and shitpost with them

can we start doing the same thing with stackoverflow posts?
>>
>>54815761
You can do whatever you like son, this is a free image board
>>
>>54815775
But don't post porn or b&
/g/ is God's blue board
>>
File: image.jpg (66KB, 600x482px) Image search: [Google] [Yandex] [Bing]
image.jpg
66KB, 600x482px
>>54815757
Even worse kek
Stack overflows
>>
>>54815253
M8 this is static typing, types must be known at compile-time, and fyi templates are expanded at compile-time. Best you can do is use std::complex in both cases, or if you insist on using only one double half of the time, have 2 versions of your entire calculation compile (not just of log, of everything that interacts with log and its types). Protip: that's where templates come in handy.
>>
>>54815183
Try fixing the file, then upload it and I'll try to build it myself.
>>
>>54815798
Depends what you're doing
>>
>>54815861
Yea I just use linked lists anyway

Not like I process that much data
>>
>>54815858
>try fixing the file
>that cluster fuck

You've... you've never written C have you? That could literally take a person a week to figure out what's wrong.
>>
>>54812825
>programming-motherfucker.com

Is that really Zed's site?
>>
>>54815905
As I've said, I know jack shit about C.
Is there any workaround to this?
One anon told me to remove the -Werror flag, how can I do that on make or gcc?
>>
File: auti.png (1MB, 950x899px) Image search: [Google] [Yandex] [Bing]
auti.png
1MB, 950x899px
>I think you'll find I'm a pretty tolerant boss, but Gleb, in your last commit you did use spaces over tabs. I don't know why you'd commit that, so just tell me why on earth you'd do something like that
>They are pretty much the same.
>No, no they are not the same. At least in my book. One is right and the other is wrong

I don't know what's better(or sadder). That the show actually portrays the autism that fuels trivial programmer arguments or that they got the argument so incredibly right.

Anyway, they closed the debate.
It's tabs.
We can all go home.
>>
>>54816147
>tabs over four spaces

Fucking plebs.
>>
>>54816147 >>54816225

I use tabs in .h and spaces in .cpp
>>
>>54815165
>(!!(n%3)) + 2*(!!(n%5))
absolutely disgusting
>>
>>54816238
shit bait
>>
>>54816147
>>54816225
it's obviously tabs for fuck's sake there's no question about it
>>
for new friends
When they say spaces vs tab
They mean tab key = X number of spaces or tab key = the 'tab' character
>>
>>54816238
I use tabs in loops, spaces in conditions and C-style comments in function bodies.
>>
>>54816365
Off self
>>
>>54816365
all aboard the bait train
>>
>>54816384
>>54816434
>implying
>>
what are the assembly instructions for !n
>>
>>54816496
xfv
>>
>>54816496
same as n == 0?

>>54816502
you having a laugh?
>>
File: 1458660324723.jpg (6KB, 164x216px) Image search: [Google] [Yandex] [Bing]
1458660324723.jpg
6KB, 164x216px
>>54816482
>>
File: 1464554357981.jpg (784KB, 902x720px) Image search: [Google] [Yandex] [Bing]
1464554357981.jpg
784KB, 902x720px
>>54816482
what the fuck man
>>
>>54809879
>why the hell does print debugging just magically work in 95% of cases?
Because we programmers overlook the obvious 95% of the time, being egotistical pricks.
>>
>>54816496
whatever they are they're completely portable and shared across every target
>>
>>54809879
>Anyways, on the subject of programming... why the hell does print debugging just magically work in 95% of cases?
if something is not working quite right... step through the code and if it still looks fine, test your assumptions... if the prints are according to your assumptions print something else until it doesn't fit your assumptions and then you've found the problem
>>
>>54816291
My tab key has been broken for about a year and a half, so I use vims 'expandtab', and 'smarttab' and use spaces for everything.
>>
i'm getting to the part in SICP about procedures as arguments and high order procedures and i'm starting to feel like i'm entering the twilight zone. i still think i get what it's talking about right now but i feel like soon i'll be in bizzaro world
>>
can someone explain the purpose of lambda in scheme to me? i don't see why you wouldn't just either make a named procedure or not make a procedure at all
>>
>http://briancarper.net/blog/520.html

I just swallowed my own vomit.
>>
>>54817553
it tips your fedora even harder
>>
File: 1459566805282.jpg (33KB, 640x640px) Image search: [Google] [Yandex] [Bing]
1459566805282.jpg
33KB, 640x640px
>>54817561
>My first version used Clojure agents (i.e. threads) for everything. The game logic was a thread, the renderer ran in a thread, every NPC was its own thread.
>>
>>54817563
seems like something i should be interested in using then
>>
>>54817563
no i get it now it's so you can make functions to pass as arguments to higher order procedures that you don't intend to use elsewhere. they have to be a function since you need to pass it
>>
>>54817553
Aren't they for portabilities sake? you can fuck around with the shit in a lambda without affecting/creating global states/variables 'n other bad practices.
>>
>>54817561
The author sounds like some /g/ NEET sperg.
>clojure
>gentoo
>old 2 core cpu
>ancient gpu that can barely get ogl to work
>>
>>54817553
Because if you want to approach declarative programming, everything must be an expression.
Also, once you have lambda expressions, you already have many language constructions like scoped variables without having to extend the semantics of your programming language. procedural abstraction is probably the most powerful abstraction technique that you can have in programming.
>>
>>54817656
basically in my understanding
>>
>>54817561
>every NPC was in its own thread
It's like object oriented programming. You model the software after the real world. Of course every NPC needs it's own thread.
>>
Has anyone ever used anything from Oracle?
>>
>>54815358
Exceptions or option types (error codes are retarded except for reasons of performance).

Exceptions are preferable to the Either monad in most scenarios. Fuck the police.
>>
>>54817800
Yep everyone loves the overhead that context switches introduce once you rake up more threads than you have available cores.
>>
File: 2ee.gif (141KB, 287x344px) Image search: [Google] [Yandex] [Bing]
2ee.gif
141KB, 287x344px
>>54817800
>You model the software after the real world.
>>
>>54815358
Maybe or Either monad for most stuff, execptions for exceptional stuff
>>
>>54816147
>>54816225
>>54816238
>>54816291
>>54816365
Two-space indentation is only acceptable option.

Anyone who disagrees should commit seppuku.
>>
>>54817800
a thread is not much of a model of anything
>>
>>54815736
I wish I can get a job programming.
>>
How do I compile java code to run on my android terminal?
>>
>>54810576
Clojure does
(partial (* 5))
>>
>>54817884
The other guy is probably retarded, but coroutines can be an interesting model. Don't be put off by 'muh performance', one can always find a way that is both performant and abstracted IMHO.
>>
>>54817879
>takes literally twice as long as tab
>>
>>54815736
that image makes me extremely irritated
>>
>>54815387
>>54815420
>>54815588
>>54817823
>>54817866
JUST fuck my shit up, f'ams.

Maybe and Either are just the hipster's version of "error codes"

My language is going to have good error handling.
>>
>>54817923
sure but like in a game you can just loop through all the npc's on one or more threads, doesn't have to be one thread per npc
>>
File: image.jpg (32KB, 398x277px) Image search: [Google] [Yandex] [Bing]
image.jpg
32KB, 398x277px
>>54815736
>barely knew C++
>hired as C++ developer
>how is that possible?
>>
Should I start working on DNS zones, or should I start on the IPAM interface?
>>
>>54817920
Looks like a macro that converts to
(lambda (x)
(* 5 x))

Seems easy to implement
>>
>>54817884
Yeah. But the idea is plainly insane. Anyone should know by now that iterating (and updating) an array of NPC's is the only sane answer. Do it on multiple threads if you want. But one thread per NPC is just this sick idea only people who write software as if it's the code gods they're pleasing or something would do.
>>
>>54817561
>The vast majority of my functions take a world value (a plain old hash-map) as an argument, and return a new world value after making changes to it. The current state of the world is whatever value is currently in the global WORLD ref.

oh great that's so much better than state

the only reason why you'd replace normal state with a "world" value is for compiler optimizations (like in haskell), and that isn't the case here
this is the definition of cargo culting
>>
>>54817834
>>54817844
>>54817884
>people didn't get my sarcasm
OK. Software is in a bad way right now and I shouldn't presume it obvious that I couldn't be a mentally handicapped programmer visiting /dpt/. My bad.
>>
File: dan.jpg (42KB, 270x270px) Image search: [Google] [Yandex] [Bing]
dan.jpg
42KB, 270x270px
https://github.com/Vild/PowerNex
>PowerNex is a kernel written in the D Programming Language. The goal is to have a whole OS written in D, where PowerNex powers the core.

Dunno if it'll take off, but that's one way to prove D can be a systems programming language
>>
>>54815736
That is rather frustrating. I don't blame them for hiring someone that doesn't know C++ (it's a shit language and your rather have a C programmer write your C++). But 'I also had very little grasp of hardware architecture' is inexcusable.
>>
Haskell > Your Favorite Language
>>
>>54818072
>Vild
This guy streams on that live coding site right?
>>
>>54818097
Does he? I have no idea, but I'd be interested in finding out
>>
>>54817966
What is your toy language going to do?
>>
>>54818097
>>54818112
Found him
https://www.livecoding.tv/wild/
>>
>>54817966
>hipster version of error codes
No they aren't
Option is a container that either has length 0 or 1
It can be used to indicate the absence of a value
Using higher order functions (map & bind) you can easily chain optional values without needing to unwrap them

Either or sum types in general are also good for specifying failure, for instance:

type FileHandlingError =
| FileDoesntExist
| FileAccessLevelError of AccessLevel
| EndOfFile
| IncorrectFileFormat of Expected:FileFormat
>>
>>54817931
>not having indentation configured in your editor
>>
>>54817968
Yes but.

If the NPC does many state transitions, I find (without IRL examples tho) that the best way for the thread to know what to do to make a given NPC act is to try resuming a suspended coroutine which is an attribute of that NPC. The reasons being that writing the coroutine program is straightforward because you can rely on an abstract sequence of instructions which doesn't actually get executed in one go but is nicer, and that for the actual program to keep track of the state of the coroutine is simple and efficient too because it can just jump in and jump out. See?
>>
>>54818097
>>54818112
Yeah I think so:
https://www.livecoding.tv/wild/

Where the fuck did I know this from though? I know nothing about the guy and I don't do D. I'm just partially omniscient or something I guess.
>>
>>54818142
If you don't care about any details, you can just use raw enums:

type FileHandlingError = FileDoesntExist | FileAccessError | EndOfFile

If you wanted, you could add
| NoError
or use
Either<FileHandlingError, (result type)>
The type indicates you either get a file handling error or a (result type)
>>
>>54818074
I just started working as a programmer writing C++ at one of the largest software companies in the world a few months ago, and I also didn't know any C++ before starting. However the difference is that a) I didn't get hired specifically to write C++, team allocation came after I got hired, and b) I'm very familiar with C. I can't imagine you'd have an easy time of it coming from Java or Python or something.
>>
>>54818142
so basically exactly the same as error codes just with monadic control flow and type safety for error codes?
i don't see how that original anon was wrong about them being the hipster version of error codes.
>>
File: rust.png (11KB, 512x512px) Image search: [Google] [Yandex] [Bing]
rust.png
11KB, 512x512px
>>54818072
http://www.redox-os.org/
>>
>>54817997
You confuse:
Parallelism: very low-level stuff like threads, hyperthreads, branching, mutexes that are used mainly for performance reasons.
Concurrency: a high-level model of a system as some number of routines exchanging messages and executing concurrently, used to model state in an abstract and clear way.
>>
File: nis-setup.jpg (296KB, 1173x665px) Image search: [Google] [Yandex] [Bing]
nis-setup.jpg
296KB, 1173x665px
>>54809718
working on Network Information Service and having hella problem. any /g's now about nis?

https://wiki.archlinux.org/index.php/NIS

pic may be related kek
>>
>>54818245
lel, no

concurrency can be implemented with two techniques: parallelism or time sharing.

parallelism is concurrency but concurrency is not necessary parallelism.
>>
>>54818206
Option is used for an optional value - that's not the same as an error (though you could use it for that if you only had 1 kind of error - or instead if you had something that returned an errortype option)
For instance, F# has Map.tryFind which takes a key and a map<key,val> and returns a val option - because the key-value pair might not be present.

Type safety is good not just for safety but also for annotation & expression
Monadic control flow is good when working with monads

The fact is you've got a choice between something good (sum types such as raw enums, or option types or other monads) and something shit (int error codes)


Exceptions are their own monad
>>
>>54809718
Post pic of Linus T dressed like that, or RMS. Lol.
>>
>>54818273
>NIS
Just use LDAP
>>
>>54817986
Yes.
>>
>>54818297
well somehow my install is now my main server. is this ok? or do i need to undo that and then install ldap
>>
File: 20160410_104201.png (72KB, 233x289px) Image search: [Google] [Yandex] [Bing]
20160410_104201.png
72KB, 233x289px
>>54818237
>Microkernel
Kinda cool. I've always thought that the reason we don't implement microkernels and other non-KISS concepts is a form of technical laziness which stems from the fact that our tools are so unreliable that we'd better go the inferior way. Maybe Rust can help that, it's kind of a nextgen lang if you let this kind of dirty speak...

>MIT licensed
NOOOOOOOOO! HAIL COPYLEFT FOR A THOUSAND YEARS!
>>
File: commies.gif (2MB, 420x236px) Image search: [Google] [Yandex] [Bing]
commies.gif
2MB, 420x236px
>>54818354

P Y R A M I D
S C H E M E

C O M M U N I S M

T R O J A N
V I R U S

B I G
G O V E R N M E N T
>>
>>54818374
no the real pyramid is
1%
corporation
govt
masses
me
>>
>>54818406
NEW
E
W
>>
>>54818280
i know all that

monadic control flow has a couple of disadvantages as well, especially in imperative languages
type safety is good, but doesn't replace error documentation
also, atleast from my experience, mistakes in regards to accidentally handling the wrong error or using the wrong error value are rather rare, so the advantage of type safety (in this regard) is slight
>>
>>54818374
Agreed. This beast is an absolutely abhorrent abomination. Haram.
>>
>>54818418
Are you retarded
>>
>>54818443
It's /dpt/. Most people are retarded in here.
>>
>>54818393
>no the real pyramid is
>1%
>corporation
>govt

Only commie-socialists & pinkos are this fucking delusional.
>>
>>54817907
Git gud
>>
>>54818467
Especially OOP fags
>>
>>54818467
Especially functional fags
>>
>>54818467
Especially procedural fags
>>
>>54818427
Type safety DOES replace large parts of error documentation - see the example I gave?

Monadic control flow doesn't really have disadvantages in imperative languages if you can inline it - you can always have a macro or a member function.

Plus who said you've _got_ to use monadic control flow when working with monads? You can just extract the contents manually
>>
File: TDgUdWW.png (278KB, 4799x2701px) Image search: [Google] [Yandex] [Bing]
TDgUdWW.png
278KB, 4799x2701px
>>54818393
>>54818477
Chcek yuor prilivegde sithlrods
>>
>>54818490
Yep
>>54818495
Yep

Especially trap fags.
>>
>>54818467
Especially logic fags
>>
>>54818495
this

>>54818507
this
>>
>>54818490
>>54818495
>>54818507
Based Logic programming

Anyone else Prolog masterrace here?
>>
>>54818467
especially trip fags
>>
>>54818553
not sure if trolling or just retarded
>>
>>54818563
absolutely this
you gotta love when they think their opinions are worth anything
>>
>>54818570
see >>54818467
>>
so can any g confirm with me its safe to run my install as master server, or do i need to setup another host for client/server interaction?
>>
>>54818553
>Anyone else Prolog masterrace here?

I used it for a little bit. Not too bad, but I wouldn't want to use it for general purpose programming.
>>
>>54818516
your example is trivial
imagine if for every http error you only had a name and no proper documentation on when it'd arise, it'd be fucking terrible
error names are only enough documentation for trivial cases

it definetly has disadvantages in imperative languages, try-catch being the obvious one, which hides details like which statement may throw the specified exception
functional languages do not suffer from this issue, because well, everything is a function, so grouping together areas where one certain error can arise is trivial
this isn't the case for imperative languages, and when grouping functions or statements that may not throw an error into something like a try block, you're taking away important information for the reader (resulting in you having to trace the documentation/type signature of every single element of that try block to really understand what's going on, sometimes even across multiple levels, which sucks).
>>
>>54818670
Types can literally document anything

Monadic exceptions & options & such are part of the function's type (when they aren't language primitives like in OCaml/F#) and so you can always tell whether such a function might have an error
>>
>>54818338
NIS is just "old"
>>
File: nwo.png (837KB, 2504x2725px) Image search: [Google] [Yandex] [Bing]
nwo.png
837KB, 2504x2725px
>>54818517
>>
>>54818962
>>>/a/
>>
>>54818743
listen
when i'm using your api i don't just care what errors can occur or how you call your errors, i also care when they occur.
sure, i can always tell that a function has an error, but when a top level function unifies many different errors then i need documentation to understand in which cases which error is returned.
unless you're willing to add the documentation about when an error occurs to the name of your type, your type name doesn't tell me enough information to work with your shitty undocumented api

seriously, take the documentation of hackage packages for instance, it's fucking terrible
if types solved that issue, then why do people complain about many hackage packages just being shit annoying to use because of lacking documentation?
>>
>>54819010
>when would a FileNotFoundError even be returned?!
>how am I supposed to know when an UnknownFormatError occurs?!
>>
>>54819046
again, not every example is that trivial
look at http and all of its errors. names are not enough to handle that kind of complexity.
>>
>>54819149
I never said use no documentation, just that you shouldn't use raw error codes and should at least use sum types

consider
https://en.wikipedia.org/wiki/List_of_HTTP_status_codes

they have a tag for every code, why can't you?
>>
>>54819149
>>54819201

otherwise you'll end up with either 1) constants polluting the namespace or 2) needing a reference to tell one value from another

consider OpenGL
>>
>>54819201 >>54819212
Not to mention with types you could have a heirarchy - as in the article,
module HTTP =
type informational = Continue | SwitchProtocols | Processing
type success = ...
type HTTPStatus = Informational of informational | Success of success ...

& with sum types you can have parameters that depend on which subtype is in use, e.g. a protocol switch could also contain which protocol is being switched to (while others wouldn't)
>>
>>54818962
Not bad
Thread replies: 331
Thread images: 34
[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y / ] [Home]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
If a post contains personal/copyrighted/illegal content you can contact me at [email protected] with that post and thread number and it will be removed as soon as possible.
If a post contains illegal content, please click on its [Report] button and follow the instructions.
This is a 4chan archive - all of the content originated from them. If you need information for a Poster - you need to contact them.
This website shows only archived content and is not affiliated with 4chan in any way.
If you like this website please support us by donating with Bitcoin at 1XVgDnu36zCj97gLdeSwHMdiJaBkqhtMK