[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
Images are sometimes not shown due to bandwidth/network limitations. Refreshing the page usually helps.

You are currently reading a thread in /g/ - Technology

Thread replies: 255
Thread images: 27
File: 1334503246505.jpg (209 KB, 1280x720) Image search: [Google]
1334503246505.jpg
209 KB, 1280x720
Upon request, a real one to prevent any confusion from occurring

Old: >>52080391
>>
>>52086061
/csg/ is comfy
>>
>>52086078
/csg/ is already taked by /sci/
>>
>>52086042
What's the reason for splitting web dev and programming?
>>
>>52086096
/sci/ barely has a /csg/ and half the thread is spent on explaining to physicists that CS isn't about coding Ruby on Rails webapps
>>
is this just a thread to shitpost in?
>>
File: merryXmas.jpg (99 KB, 1085x515) Image search: [Google]
merryXmas.jpg
99 KB, 1085x515
>>52086042
One liner for extra meme cred
>>
>>52086138
Yu-gi-oh Arc-v
>>
>>52086160
i dont know anything about computers but im gonna frequent here from now on as i need people to talk to
>>
>>52086061
I like it.
>>
>>52086235
s/\\n/\\r\\n/g
>>
I have a copy of bordland c++ for windows and it has Delphi.


Should i learn Delphi?
>>
>>52086042
Who the fuck finds a CS101 book difficult?
>>
>>52086260
you should learn how not to be a nerdlinger
>>
>leaving job to go finish bachelors
>gunna be bored as hell the first few semesters
I need projects to work on. And not the dpt roller, I find it really hard to motivate myself to build useless programs that do things with Euclidean geometry for the sake of it
>>
>>52086128
we don't talk about the same topics. web devs talk about javascript, php, html, css, hipster frameworks. real programmers like us talk about fizzbuzz, C# vs java and how to average two ints in C.
>>
>>52086235
man we are such memesters
>>
Where can I find a good systems programming resource? I don't want to spend hundreds of dollars on a textbook
>>
>>52086326
Read the Go tutorial. That's all you need for systems programming.
>>
>>52086326
google
>>
>>52086357
Nice meme
>>
File: standards.png (24 KB, 500x283) Image search: [Google]
standards.png
24 KB, 500x283
/dpt/ right now desu
>>
is the whole "self-taught programmer without degree" thing just a meme? does anyone actually get employed without a sheepskin?
>>
Daily reminder that if your language of choice is not on this list you should probably give up and kill yourself:
- C++
- C#
- Lua
- Python
- Elixir
- Haskell
- Bash
- Clojure
- D
>>
>>52086409
I got employed without a degree. And I'm a fucking good developer. Coding is my hobby.
>>
>>52086409
It's incredibly difficult, but if you build a decent portfolio, it's possible.

Source: I haven't graduated, but it still took a long time and a sizable enough portfolio to get into programming as a career

>>undefined
Now this is a meme
>>
File: sshot-3419.png (733 KB, 1524x883) Image search: [Google]
sshot-3419.png
733 KB, 1524x883
>>52086042
Finalizing the core glitches of my torrent mounting program, that hooks into the kernel and adds a removable device with torrent's data.

Therefore being able to play files right away, like install a game streamed over the internet like SMB
>>
>>52086460
>>>undefined
>Now this is a meme
Woah, didn't even type this
>>
>>52086471
Glitches or bugs?
>>
>>52086326
Learn C
>>
>>52086454
You are shit, trust. You are just a web monkey.
>>
Thank god, threads are finally getting deleted.
>>
>>52086486
No, I'm the fucking one guy you send to mission because I can hack in any code in any language. I'm a hacker, you're a code monkey.
>>
>>52086505
It's just one fucktard spamming threads to get attention on /qa/.
>>
>>52086471
how does this even work? With torrent, you are given random slices of what is available, as determined by what is mostly available. it doesn't stream slice one, slice 2, slice n.
>>
>>52086479
Glitches, bugs, errors
Results in bluescreens, yeah...

But yes, the propper would be bugs, altho glitches exits with data order
>>
>>52086515
a hacker? bro do you even know algorithms? Oh, sorry. I get it what you mean: you can connect random API together and hack up a solution.
>>
>>52086270
i like k-on, one piece and naruto, you?
>>
>>52086542
Glitches and bugs are not the same things. Glitches are exploit of bugs or strange engine.

>>52086544
I have nothing to prove to a code monkey like you. I proved things to my boss who pay me well because he knows who I am and what I can do.
>>
>>52086482
I know C++ rather well. I just never used any libraries from <sys/> cause they scare me. I'm looking for at least a description of each library in sys so I can get started
>>
>>52086569
I don't understand why only a few of the threads got deleted. That one, of all of them, should have been kept, too.
>>
>>52086154
                         p
pos
post
post it
post it p
post it pos
post it post
post it post it
post it post it p
post it post it pos
post it post it post
post it post it post it
post it post it post it p
post it post it post it pos
post it post it post it post
post it post it post it post it
post it post it post it post it p
post it post it post it post it pos
post it post it post it post it post
post it post it post it post it post it
post it post it post it post it post it p
post it post it post it post it post it pos
post it post it post it post it post it post
post it post it post it post it post it post it
post it post it post it post it post it post it p


    static void merryXmas(final String word, final int n) {
for(int i = 0; i < n; ++i) System.out.println(new StringBuilder().append(new String(new char[n]).replace("\0", " ").substring(0, n - i)).append(new String(new char[n]).replace("\0", word).substring(0, i * 2 + 1)).toString());
}
>>
>>52086570
haha, so you don't know algorithms?

>Glitches are exploit of bugs or strange engine.
glitches and bugs are the same thing.
>>
File: sshot-3420.png (38 KB, 983x947) Image search: [Google]
sshot-3420.png
38 KB, 983x947
>>52086527
Well nothing is hindering you from writing a custom piece picker, quite complex math with bytes and offsets all over the pieces.

Random slices, yes, but if that piece is non-existant, you take another piece untill its available (Thus resuming the orginal byte request).

Works with "Dokan" and C# pinvoke to native C++ kernel code.
Works somewhat like FUSE (linix) (Usernand filesystem)
>>
>>52086596
I'm kind of happy that has been nuked too. Fresh slate and all
>>
>>52086600
>haha, so you don't know algorithms?
You're impressing me, repeating that words two times, you need skill to do that.
>glitches and bugs are the same thing
You just discredit yourself.
>>
>>52086570
Glitches, look at VLC and you will understand
>>
There are 11 /dpt/ threads right now.

Why?
>>
>>52086636
>glitches and bugs are the same thing
glitches and bugs refer to error states in software
>You just discredit yourself.

you just stole my words bruv
>>
>>52086042

Is Structure and Interpretation of Computer Programs actually worth a read? I'm reading through Stroustrup's Porgramming: Principles and Practice right now and was planning on reading Scott Meyer's next (and algorithms sometime in the future).
>>
File: fuck you OP.png (117 KB, 550x284) Image search: [Google]
fuck you OP.png
117 KB, 550x284
>>52086042
why did you create a third thread you fucking idiot?
>>
>>52086700
trap fag did this
>>
>>52086700
False flag against that particular OP image.
>>
File: sshot-3421.png (202 KB, 1189x273) Image search: [Google]
sshot-3421.png
202 KB, 1189x273
>>52086700
Make that 7*
4chan cant count, we know
>>
File: 1315907201.92635185.jpg (105 KB, 1280x720) Image search: [Google]
1315907201.92635185.jpg
105 KB, 1280x720
Hello?
>>
>>52086734
MOODS
>>
>>52086769
Reddit, is that you?
>>
>>52086460

by portfolio you mean primarily contributing to open source projects, right?
>>
>>52086778
Image is older than your grandma, implying plebbdick has rights to use it
>>
File: thinkpad_crash.png (46 KB, 1014x557) Image search: [Google]
thinkpad_crash.png
46 KB, 1014x557
>chinkpad thread crashing my shit
>using a chinkpad myself
the irony
>>
>>52086811
No, but I'm not sure how much that would help since it'd be harder to track the effects of what you've programmed.
>>
>>52086848
>encoding errors
python2, I assume?
>>
>>52086874
yeah python 2.7. It's the tm character in the OP that's crashing it I think
>>
can i make computer games using rpg maker xv
>>
>>52086926
found another one, >>52084555 crashes it too.

I added
 # -*- coding: utf-8 -*- 
at the top of script, I was half expecting it to do nothing which it has.
>>
>>52087045
AFAIK that only specifies what encoding your source code has (for strings and stuff).

So glad Python 3 fixed all that shit.
>>
>>52087030
no
>>
How exactly did the "Python is a great starting language" meme come about, /dpt/? It seems to imply that learning Python will help you learn other languages but I just don't see it, it's syntactically very different from 90% of languages just to start with, what could you possibly learn from Python that you could apply to, say, C?
>>
>>52087144
but its called rpg maker xv
>>
>>52087154
I think your narrow-minded view of what makes a great starting language prevents you from seeing that python abstracts synctatic complications and very commonly used algorithms that don't teach you how to think as algorithmically as you would with challenges that extend those
>>
>>52087154
Do you really think that syntax is the only thing that defines a language?
>>
>>52087154
>syntactically very different to other languages
it literally reads exactly like any other imperative OOP language like C++ Java and C#.
>>
>>52087322
>it literally reads exactly like any other imperative OOP language like C++ Java and C#.
THEN WHERE ARE MY BRACKETS!!!

Christians: 1
Atheists: 0
>>
>>52087154
>hurr it's pseudocode
>durr i can't be bothered to write curly braces and semicolons
>flurp i can't into types
>>
>>52087322
it doesn't even have a normal for loops, just "for i in range"-type fucking disgusting garbage i fucking hate it
>>
>>52087406
>for i in range
you could put more things after "in" lad-lists, tuples, files, strings, dicts, generators, iterables, etc
>>
>>52087428
that just makes it even more disgusting

and it's why i added -type, as in i know there are other "for"s than for i in range
>>
>>52087406
It has while.
Just write a macro to expand your shitty for into a while loop.
>>
>>52087450
you seem quite mad that people look for more in languages than syntax
>>
man, what's the fucking point of learning to program if nobody is going to hire me without a degree?
>>
>>52087464
a beginner should have everything in clear view in front of them. teach them if(cond), while(cond) and for(pre; cond; post). teach them what an int is, what a boolean is, what a float is and what a string is. that's all you need to get them going. not abs() dict() help() min() setattr()
all() dir() hex() next() slice()
any() divmod() id() object() sorted()
ascii() enumerate() input() oct() staticmethod()
bin() eval() int() open() str()
bool() exec() isinstance() ord() sum()
bytearray() filter() issubclass() pow() super()
bytes() float() iter() print() tuple()
callable() format() len() property() type()
chr() frozenset() list() range() vars()
classmethod() getattr() locals() repr() zip()
compile() globals() map() reversed() __import__()
complex() hasattr() max() round()
delattr() hash() memoryview() set()
>>
>>52087476
I know someone who freelances & makes a living off it, he says it was hard to get going at first though.
>>
>>52087476
>what are hobbies
>>
>>52087499
>a beginner should...
According to you. Some people care more about algorithms and running times, for example than syntax
>>
>>52087533
kill yourself
>>
Threadly reminder: OCaml is the only good language.
>>
>>52087533
as if python is the language best suited for implementing non-trivial algorithms

as if python is the language that has the best running times
>>
>>52087476
Do it for fun? I just write software for myself if I can't find it on the internet already
>>
>>52087540
nice rebuttal

>>52087560
nice thinking that any one language would be the best in anything. Also we were talking about C in comparison, and that is far less suited to thinking algorithmically
>>
>>52087558
>OCaml
>Threadly
heh
>>
>>52086734
Anime images need to be banned already. It's only because of (or in opposition to) them that we have no-life neckbeards racing to post a thread with the image they want before bump limit.
>>
>>52087581
>Also we were talking about C in comparison, and that is far less suited to thinking algorithmically
absolutely not. python is all about using pre-made libraries to do the thinking for you. in C you are the one actually writing the algorithm.
>>
>>52087610
Hello reddit
>>
>>52087626
not the guy you're talking to but, you're actually making my head hurt, are you really this fucking dumb?
>>
>>52087626
>python is all about using pre-made libraries
Yes, common functionality that doesn't really teach you to think algorithmically due to their simplicity. They teach you a little about how to implement common functionality, but to say they teach you to think algorithmically is a flat out lie. Abstracting it means you get to focus on algorithms and problems that are less common or made for purpose
>>
>>52087476
Have a good portfolio. Build a demo project that people can actually play with.
>>
>>52087585
Parallel != concurrent. OCaml's support for threads is great, but it's not one of those garbage languages where the only concurrency primitives are threads. Async's Deferred monads >>>>> threads.
>>
currently trying to program a virtual machine to run the binary file at https://challenge.synacor.com/ I can't tell if you're allowed to change instructions in their memory addresses if a set function directs you to. I've currently written it to only write to a register address, assuming it will only try to do so. Do assemblers normally change its own opcodes?
>>
Anybody here plays that shitty game called HackWars?
>>
Anyone know the best way to globally capture media keys in C#? Another case of 100 different examples, each of which making less sense than the last.

Tried using the MouseKeyHook lib but it was an utter load of shit.
>>
>>52088054

I think you're just going to want to use interop to set a system-wide hook.
>>
>>52088087
I thought as much, but every solution I'm reading seems to be massively out of date, doesn't seem to be much reading material written within the last 3 years.
>>
>>52088163

Why would you need anything up-to-date to do system wide hooking? It hasn't changed since Win32 came about.
>>
>>52086042
this SUNDAY, there are THREE dpts + a csg
are you fucking kidding me
fucking retards
>>
>>52088188
Absolutely no idea how some of this older shit even works, oh well here I go.
>>
Are there sets of binary bits that can represent the same decimal number?
>>
>>52087274
sometimes those abstractions actually hurt first languages
In my experience brand new programmers conceptually understand i =0; i<array.length(); i++ better than for i in range because the latter hides too much of whats actually happening. Some abstractions that make a language easier to experienced programmers can actually make it harder for new ones.
That said, python is still a very good starting language
>>
File: JavaScrip.gif (4 MB, 356x200) Image search: [Google]
JavaScrip.gif
4 MB, 356x200
Complete Retard here.

is php. MySQL, JavaScript, HTML all you need to learn to become a web developer?

trying to figure out a roadmap, late to the game here.
>>
>>52088210

It's not that difficult.

Why don't you grab an existing C++ project and fire it up? Just look at the calls being made and fool around with it a bit.

This one looks simple and direct:

http://www.codeproject.com/Articles/67091/Mouse-and-KeyBoard-Hooking-utility-with-VC

Figuring out the interop part is kind of a PITA, in my opinion, but dick around with the C++ version, then dick around with a C# project, and you should be able to figure it out pretty quickly.
>>
>>52088313
>sometimes those abstractions actually hurt first languages
m8 I understand what you're trying to say in this post, but philosophy and anecdotes
>>
>>52088338
I can barely understand the things I'm reading in C#, going off to another language I've never even tried before seems like pissing into the wind.
>>
>>52088372
C++ is literally 25x more undreadable than c#, and that's just the really well written C++
>>
>>52086042
test
>>
>>52088402
I can see that.

It seems weird that someone hasn't written a decent modern API for this, or why it's such a massive hacky mess just to read a single global key.

Quite why that isn't part of the .NET framework I'll never know.
>>
>>52088270
0
>>
>>52088337
add jquery.
>>
>>52088402
>C++ is literally 25x more unreadable than C#
>more unreadable

T. C# Programmer
>>
>>52088337
get Eloquent Javascript, and an Algorithms textbook. CLRS is good

then while you're going through these books practice making stuff with HTML and CSS. Eventually try out meme frameworks if you want. SQL is also very useful, but not that hard desu senpai.

PHP is a meme back-end language.
>>
Daily reminder that there is no reason to use anything other than C# if you're a Windows developer, and never any reason to use C++
>>
How do you approach an interview?

Do you come with knowledge of inane things like fizzbuzz, trees, structs and bring a tablet to program on?
>>
>>52088482
That's a perfectly correct sentence.
>>
>>52088501
Daily reminder that C# is deprecated by F#
>>
>>52088505
Lol don't bring a tablet. Bring your knowledge and be prepared to be aggressive.
>>
>>52088372

The C++ code really shouldn't be too hard to read. You don't have to understand everything, you just need to know what calls are made and what the message handler looks like.

All you need to know is this: Windows programs revolve around message passing. Key presses? You get a message. The user moves the window? You get a message. Windows is constantly firing messages at your "message pump".

A message pump looks like this:

while (GetMessage(&msg))
{
TranslateMessage(&msg);
DispatchMessage(&msg);
}


That's the heart of a Windows application. It's constantly saying, "hey, Windows, any messages for me?" Ignore TranslateMessage. DispatchMessage just calls whatever your message handler is. Your message handler has things like, "is this a WM_MOVE message? Oh shit, we're moving! Is this a WM_CLOSE message? Oh shit, the user wants to close us!"

There you go, you just learned Win32 programming.
>>
>>52088535
haha
>>
>>52088535
F# doesn't have WPF bindings, to my knowledge. It's wonderful for meme apps and for backend stuff, though.
>>
What in the titties is the difference between opcodes 1,15 and 16? Especially 15 and 16
>>
>>52088453
>It seems weird that someone hasn't written a decent modern API for this, or why it's such a massive hacky mess just to read a single global key.

It's not a hacky mess. It's a well-documented system put in place to allow programs that want this information to receive updates regarding it.

>Quite why that isn't part of the .NET framework I'll never know.

I think your problem is due to the fact that you want to receive notifications of a keystroke when you're not the active application. That's obviously a special case, so why would .NET have anything in particular to provide that?

That said, I find that pretty much anything I want to do requires me to do Interop for Win32 calls. .NET is great for making CRUD apps. It's kind of lousy for making "systems applications" where you actually manipulate and interact with the system itself.
>>
>>52088535
F# is deprecated by linq
>>
File: opcodes.jpg (221 KB, 1366x768) Image search: [Google]
opcodes.jpg
221 KB, 1366x768
>>52088569
forgot pic
>>
>>52088491
>>52088461
thanks.

I looked into those books, holy shit, I don't think I have enough time or autism to learn this, fuck.

will try.
>>
>>52088538
>The global key hook class I "acquired" from a nice fellow online is 88 lines long.
>I understand a few of them on their own
>Barely
>"You just learned Win32 programming"

I think not.
>>
All languages are deprecated by lisp
>>
File: Q1kvSbC.jpg (44 KB, 500x349) Image search: [Google]
Q1kvSbC.jpg
44 KB, 500x349
>>52086042
What does Selenium Python actually do(examples)?

Do I have to know regular Python to know how to use it or can I start learning it right away and save myself some trouble?
>>
>>52088607
come on lads, I'm sure one of you has dealt with shit like this

Is set exclusively for registers?
What's the difference between 15 and 16?
What do you write to a for both?
>>
>>52088337
PHP, MySQL, Javascript, and HTML is what you need if you're a web developer from 2002.

Everything uses C# and ASP.NET now.
>>
>>52088566
http://www.navision-blog.de/2012/03/22/wpf-designer-for-f/

>>52088629
Performance is deprecated by Lisps
>>
everything is deprecated by webdev
>>
>>52088663
it leads you down a path of despair
>>
>>52088590
then why does F# have its own Linq?
CHECK MATE AGNOSTICS
>>
>>52088607
Value of a: 0x1000
Value of b: 0x2000
Value of memory location 0x1000: 0x7
Value of memory location 0x2000: 0x52

Original state -> opcode 1
Value of a: 0x2000
Value of b: 0x2000
Value of memory location 0x1000: 0x7
Value of memory location 0x2000: 0x52

Original state -> opcode 15
Value of a: 0x52
Value of b: 0x2000
Value of memory location 0x1000: 0x7
Value of memory location 0x2000: 0x52

Original state -> opcode 16
Value of a: 0x1000
Value of b: 0x2000
Value of memory location 0x1000: 0x2000
Value of memory location 0x2000: 0x52
>>
>>52088737
I don't want that...

I got a 75$ class for it for free so I thought it would be nice to learn it.
>>
>>52088776
it lets you automate things in the browser (clicks, page loads, entering text, etc)
selenium and other frameworks designed to drive gui applications are hopelessly fragile and will break without warning whenever the site owner makes any kind of change to the page.
>>
>>52088759
Oh ok. Forgot to mention that there are 8 addresses in registers, opcode 1 uses those instead of the regular memory addresses, at least according to other people's source code.

For 15 and 16 though, it was great clarification, thanks a ton.
>>
>>52088739
Because it's part of .net.
But as long as other .net languages have it f# is deprecated
>>
File: D2fHRc8.jpg (42 KB, 530x805) Image search: [Google]
D2fHRc8.jpg
42 KB, 530x805
>>52088817
Wow.

So it's fucking nothing or is it just good for making bots that can be made using regular Python?
>>
Has anyone played with UWP? Is it like a qt version of WPF?
>>
>>52088827
opcode 1 should still work the same way, if I understood your pdf correctly

don't take my answer for it though, you won't learn anything like that
>>
>>52088864

https://msdn.microsoft.com/en-us/library/hh225374.aspx
>>
>>52088866
If you want to automate browser tasks, Selenium will do it. At my last job, we had a suite of Selenium tests that we would run on our website before each release. They did simple things like log in, make sure the user was directed to the correct page, made sure the javascript was doing what it should. Stuff you cant do by just looking at HTML. You cant do those kind of things with regular python.

They were a terror to maintain and we threw them all away after several rewrites.
>>
>>52088904
Yeah it would, they have their own dedicated space, but they pretty much operate the same way, registers just have set-opcode 1 specific to them. I'll try to post the whole thing. Part 1:

== Synacor Challenge ==
In this challenge, your job is to use this architecture spec to create a
virtual machine capable of running the included binary. Along the way,
you will find codes; submit these to the challenge website to track
your progress. Good luck!


== architecture ==
- three storage regions
- memory with 15-bit address space storing 16-bit values
- eight registers
- an unbounded stack which holds individual 16-bit values
- all numbers are unsigned integers 0..32767 (15-bit)
- all math is modulo 32768; 32758 + 15 => 5

== binary format ==
- each number is stored as a 16-bit little-endian pair (low byte, high byte)
- numbers 0..32767 mean a literal value
- numbers 32768..32775 instead mean registers 0..7
- numbers 32776..65535 are invalid
- programs are loaded into memory starting at address 0
- address 0 is the first 16-bit value, address 1 is the second 16-bit value, etc

== execution ==
- After an operation is executed, the next instruction to read is immediately after the last argument of the current operation. If a jump was performed, the next operation is instead the exact destination of the jump.
- Encountering a register as an operation argument should be taken as reading from the register or setting into the register as appropriate.

== hints ==
- Start with operations 0, 19, and 21.
- Here's a code for the challenge website: zIgwptBaKabr
- The program "9,32768,32769,4,19,32768" occupies six memory addresses and should:
- Store into register 0 the sum of 4 and the value contained in register 1.
- Output to the terminal the character with the ascii code contained in register 0.
>>
>>52088924
I think you misread something in my post bud
>>
>>52088998
Part 2:
== opcode listing ==
halt: 0
stop execution and terminate the program
set: 1 a b
set register <a> to the value of <b>
push: 2 a
push <a> onto the stack
pop: 3 a
remove the top element from the stack and write it into <a>; empty stack = error
eq: 4 a b c
set <a> to 1 if <b> is equal to <c>; set it to 0 otherwise
gt: 5 a b c
set <a> to 1 if <b> is greater than <c>; set it to 0 otherwise
jmp: 6 a
jump to <a>
jt: 7 a b
if <a> is nonzero, jump to <b>
jf: 8 a b
if <a> is zero, jump to <b>
add: 9 a b c
assign into <a> the sum of <b> and <c> (modulo 32768)
mult: 10 a b c
store into <a> the product of <b> and <c> (modulo 32768)
mod: 11 a b c
store into <a> the remainder of <b> divided by <c>
and: 12 a b c
stores into <a> the bitwise and of <b> and <c>
or: 13 a b c
stores into <a> the bitwise or of <b> and <c>
not: 14 a b
stores 15-bit bitwise inverse of <b> in <a>
rmem: 15 a b
read memory at address <b> and write it to <a>
wmem: 16 a b
write the value from <b> into memory at address <a>
call: 17 a
write the address of the next instruction to the stack and jump to <a>
ret: 18
remove the top element from the stack and jump to it; empty stack = halt
out: 19 a
write the character represented by ascii code <a> to the terminal
in: 20 a
read a character from the terminal and write its ascii code to <a>; it can be assumed that once input starts, it will continue until a newline is encountered; this means that you can safely read whole lines from the keyboard and trust that they will be fully read
noop: 21
no operation
>>
>>52089001
In F# you can create arbitrary computation expressions (continuations & monads)

LINQ is not built in to the language, it's built into the standard library
>>
>>52089010
It's still confusing as fuck to me. I have a dict with all the function lambdas set and I've been successful reading all the 16-bit little-endian pairs, but I still have a ways to go
>>
>>52089033
>LINQ is not built in to the language, it's built into the standard library
That's literally what I said.
>>
>>52086042
is the book in OP's image really that good? been wondering if i should buy it but i don't know if its just a meme or something real :D
>>
Are the hasklel and python crowds the same people?
>same non-existent library quality
>same thousand libraries for any niche task
>same amount of users in their irc channels
>same obsession with forced whitespace
>same cultist-like insistence that their language is the One True Language for any and all tasks
>>
>>52089060

The point is other languages using .NET can't easily do that & get the nice syntax

They can get LINQ and maybe async, but not seq or custom computation expressions
>>
>>52089120
at least they're not Cfags, we can be grateful for that
>>
>>52089146
Sure, but they're only a few steps above, so it's not saying too much.
>>
>>52089130
>get the nice syntax
ML is shitty syntax though.
C# has superior syntax and functional programming through c#
>maybe async
What do you mean maybe
>>
>>52089171

Do you get async with similar syntax to LINQ

Plus, name one part of C# syntax that is superior
>>
File: 5899.jpg (328 KB, 900x900) Image search: [Google]
5899.jpg
328 KB, 900x900
>>52089183
>>
>>52089192
>Do you get async with similar syntax to LINQ
Yes
>Plus, name one part of C# syntax that is superior
Literally everything. C-based > ml based. It's in the bible
>>
>>52089267
Can you create something with async/LINQ syntax

(also I hope you aren't talking nested lambdas)

>>52089267
you can do imperative in F# just fine
>>
>>52089306
imperative isn't a syntax
>>
>>52089368
you can write in /an/ imperative syntax
>>
>>52089385
imperative isn't a syntax
>>
>>52089451
you can write in red ink

but red isn't ink
>>
>>52089478
One of inks properties of color.
One of a paradigms properties is not syntax.
>>
>>52089505
syntax can be imperative
>>
>>52089536
It literally cannot.
Just because we associate certain syntax styles with imperative programming does not mean imperative has a syntax. Convention is not a property.
"I write with dog ink". Ink is often used to portray dogs. Dogs are not a property of ink
>>
>>52089578
>Just because we associate certain syntax styles with imperative programming does not mean imperative has a syntax.
No, that's exactly what it means.
Different programming paradigms is all about the difference in syntax.
>>
>>52089727
>Different programming paradigms is all about the difference in syntax.
That's the most ignorant statement I've seen today
>>
>>52086527
Most torrent clients allow you to ask for "sequenced" data.
>>
>>52089789
You're on 4chan sibling.
>>
>>52088707
>C#
>ASP.NET
nice meme my friend
>>
>>52088270
yes
>>
>>52089727
You're wrong. The syntax of a language has no inherent connection to they style of paradigm the language is good for. Look at Lisp for example. I can write a Lisp that works for all programming paradigms. I can write a Lisp that is best for the functional paradigm. I can write a Lisp that is best in a declarative paradigm. These different Lisp languages will all have the exact same s-exp syntax.
>>
>>52089789
Then you should read up on what programming paradigms actually are, particular the history of them and how and why they arose (start with the transition from machine code/assembly to structured programming, what was the actual breakthrough?)
The only difference between two Turing equivalent languages are syntax, so if you wanna call one functional and the other imperative then you can only base your arguments in their syntactic differences.
>>
>>52088522
it's a fucking retarded sentence

not even mentioning the typo
>>
>>52089808
That's what makes it so impressive
>>
>>52088620
he's ugly as fuck i can't believe how ugly he is he really should kill himself
>>
>>52089850
>so if you wanna call one functional and the other imperative then you can only base your arguments in their syntactic differences.
No, they're differences are how they represent and interact with data and behavior. There might be syntaxes that work best for a given paradigm but they are absolutely mutually exclusive. As someone pointed out, lisp is a perfect example of why you're wrong.
>>
For those who haven't answered yet

http://strawpoll.me/6374789
http://strawpoll.me/6374789
http://strawpoll.me/6374789
http://strawpoll.me/6374789
>>
>>52089852
It's grammatically correct to use a comparative on a adjective with a negative prefix. You're a fucking idiot if you think otherwise.
>>
http://www.fssnip.net/go

In F# you can extend LINQ expressions
>>
>>52089941
i'm not saying it's incorrect, i'm saying it's retarded, fucking retard.
>>
>>52089844
>The syntax of a language has no inherent connection to they style of paradigm the language is good for.
Orf course it does.
What do we mean by "first class functions"? Syntactic support for expressing function literals, closures, currying, etc.
In C you can pass function pointers around with a void * 'environment', and you can manually create a partially applied function, but you have zero syntactic support for any of this so the code reads just like regular procedural code, which is why no one calls C a functional programming language.
> Look at Lisp for example.
> I can write a Lisp
Lisp is kinda special in that it has reader macros - which does what? Facilitate new syntactic constructs, which is what you would use to delineate these various lisps.
>>
>>52089893
>Minority non-straight non-binary
fucking kill yourselves
>>
>>52089883
>represent
Aka syntax.
> interact with data and behavior.
They all interact the exact same way - loads and stores to memory in word sized chunks on a von Neumann architecture.
>lisp is a perfect example of why you're wrong.
No, it actually perfectly illustrates my point.
>>
>>52089973
Except it's not.
If X is unreadable then "Y is more unreadable" has a stronger implication than "Y is less readable". Kill yourself you moron.
>>
>>52089985
If it's a Lisp, it will have the same syntax - the s-expression. Can you show me a Lisp language that does not have the s-expression syntax?
>>
>>52090007
It's safe to assume they're all trying to be funny.
I made a mistake, I should've put something 'funny' in there so they could shitpost in that way.
>>
>>52089985
C# has closures. It does not do them in a special "functional" way. What you're saying is stupid
>>
the fuck is the actual terminology for the & operator? even K&R is pretty cagey about it. reference operator? address operator?
>>
>>52090149
http://en.cppreference.com/w/c/language/operator_member_access
>>
>>52090149
it means "address of"
>>
>>52090056
Lisp is inherently multi-paradigm, so I'm not even sure what your point is.
But if you look at so called imperative constructs in Lisps - take the loop macro as an example - what are the distinguishing features? A convenient and special *syntax* for expressing iterations.
>>
This may not be the right place to ask about this, but do any of you know a good program for designing logic circuits?
This is for educational use, of course.
>>
>>52090198

i know what it means/does, i was jsut curious about the terminology. as >>52090177 points out, my first stop probably should have been the documentation
>>
>>52090207
Write one yourself
>>
>>52090207
LTspice is decent and free if you are a student/professor
>>
>>52090205
The main programming paradigm is defined by the primary programming constructs of the language and not the syntax of the language.

>take the loop macro as an example - what are the distinguishing features? A convenient and special *syntax* for expressing iterations.
The syntax is still in s-exp form. The s-exp form is a syntax.
>>
F# computation expressions provide uniform syntax that supports monoids, monads [23], monad transformers [11] and applicative
functors [14]. {...} Most languages, including Haskell, Scala, C#, JavaScript and Python have multiple syntactic extensions that improve computational expressivity: queries, iterators, comprehensions, asynchronous computations are just a few. However, “syntactic budget” for such extensions is limited. Haskell already uses three notations for comprehensions, monads and arrows [16]. C# and Scala have multiple notations for queries, comprehensions, asynchronicity and iterators. The more we get with one mechanism, the better. As we show, computation expressions give a lot for relatively low cost – notably, without resorting to full-blown macros.

>haskell blown the fuck out
>f# > haskell at fp
>haskell script kids on suicide watch
>>
>>52090316
>is defined by the primary programming constructs
And what is a 'programming construct' if not syntax?
>The syntax is still in s-exp form. The s-exp form is a syntax.
Yes?
>>
>>52090250
oh
that would be a cool project, but I'm kind of more interested in the logic designing part right now

>>52090296
sorry, I should say I'm looking for something that works more with logic gates than with electricity
>>
anyone knows alternatives to logisim?
>>
>>52090383
The s-exp form is the only syntax in Lisp.
>>
>Not commenting any of your code then spending 3 hours in the night organising the utter mess you made before promising never to do that again

Who /messy/ here?
>>
>>52090433
I write self-documenting code.

Sometimes I write a one-line description of what a function does if it has mathematical formulas in it.
>>
>>52090383
A language that has no inherent concept of an "object" for OOP can simulate objects by the programmer assigning some meaning to variable identifiers and function identifiers. This is an example of a programming construct that distinguishes C and C++.
>>
>>52090433
>not having clear, structured, tested code

Who /autisticallysafe/ here?
>>
>>52090035
>Aka syntax.
No, semantics actually.
>They all interact the exact same way - loads and stores to memory in word sized chunks on a von Neumann architecture.
Compiled output interacts the same way. Paradigms do not. Paradigms in this context are by definition an abstract quantity.

A paradigm is a pattern or fundamental structure. A syntax is a set of rules that have been decided to represent that structure. You can have different rules to represent the same structure. They are mutually exclusive concepts that when used together form a (programming) language.
Scala is an example of a language with c-like syntax that primarily targets functional paradigms. Single-Assignment C is a pure functional language whose syntax is almost indistinguishable from C
>>
>>52090433
Oh yea, it's sometimes fun times to figure out how my duct tape is holding everything together and what all the abbreviations meant.
>>
>>52090380
Anyone who does actual programming knows that F# is more or less the cream of the crop in terms of functional programming.
>>
>>52090503
F# is the cream of all crops
>>
Hi.
>>
>>52090543
yeah m8 fuck off
>>
>>52090527
I just wish that there were F# bindings for Xamarin's C# -> Android sdk.
>>
>>52090543
Hi is deprecated.
>>
>>52090552

Don't visual studio & xamarin both have templates for f# android apps?
>>
>>52090601
VS doesn't have templates for anything (at least not that I could ever get working). Don't think Mono does, but I'll check.
>>
File: que.png (30 KB, 926x527) Image search: [Google]
que.png
30 KB, 926x527
Daily reminder that mutual tripfags are the only ones that can truly make friends on 4chan
>>
>>52090469
It's precisely C's lack of support for OOP programming constructs which makes it a non-OO (i.e procedural) language.
Let me ask you this, without mentioning syntax, how would you differentiate an object oriented language from a functional language?
>>
>>52090633
performance
>>
>>52090627
Trying to open those Android templates has never, ever worked for me.
>>
>>52090613
>VS doesn't have templates for anything
what?
>>
>>52090633
>Let me ask you this, without mentioning syntax, how would you differentiate an object oriented language from a functional language?

Object-oriented programming languages order data into 'objects', which are abstract concepts with data related to them. Functional languages, on the other hand, order data into linear "functions" similar to the mathematical concept.
>>
>>52090658
... have you got xamarin studio?
>>
>>52090460
>I have autism
:^)

>>52090484
Poster above you apparently.

>>52090495
>Wrote a bunch of local settings stuff with serialisation and multiple classes, left all of it all over the place and completely neglected it for days
>Things started to break had to spend literally hours cut/pasting things into a better layout, rewriting the bits I completely forgot about and commenting it all
>Few hours work just to fix my laziness

I should set up a notification every time I hit return that reminds me to comment my shit.
>>
>>52090667
I meant anything android related. It all just links to Xamarin.

>>52090682
Yeah, I do. When I try to open an Android project it always tries to open a web page and then yells about me not being free enough or something. Idk.
Using Xaramin Studio on linux worked for awhile but eventually I got fed up with how convoluted everything was and abandoned it.
>>
what does it mean when a gcc option starts with -f
>>
>>52090710
>man gcc
Most of these have both positive and negative forms; the negative form of -ffoo is -fno-foo.
>>
>>52090633
In javascript you can write purely functional code with OOP constructs thanks to prototyping and the everything-is-an-object nature of the language. It is not however an OOP language(though it is counted as one for the reason above)
>>
>>52090590

So what's in? Howdy?

>>52090551

Thanks, m8.
>>
>>52090746
>javascript
>everything is an object
>it is not an oop language

That only makes sense if it isn't a programming langua- oh wait, it isn't
>>
>>52090746
>purely functional code with OOP constructs
>>
>>52090737
I saw that but I read that as a shared commonality between -f and -W, not the actual purpose of -f
>>
>>52090503
Why is it superior to Haskell?
>>
>>52090764
No they ain't object. They're dictionaries.
>>
>>52090753
Hey OSGTP, it's your friendly neighbourhood retard.

How goes your programming?
>>
>>52090753
diversity strawpolls for a better CoC is the new thing besides WinRT

http://strawpoll.me/6374789
http://strawpoll.me/6374789
http://strawpoll.me/6374789
>>
File: half-adder.png (11 KB, 405x210) Image search: [Google]
half-adder.png
11 KB, 405x210
>>52090396
Logisim-evolution works just fine for me
Thanks for the indirect recommendation
>>
>>52090822
>diversity
>pick one
pick one
>>
>>52090490
>No, semantics actually.
Semantics doesn't care about representation - that is the difference between syntax and semantics, it's syntax which is all about how things are represented, and semantics what the representation actually means using first principles.
Syntactically "x + y" are the same in C and C++, but they can have widely different semantics because C++ can overload +.
>Paradigms do not. Paradigms in this context are by definition an abstract quantity.
Paradigms only 'interact' syntactically - otherwise functional and imperative code would read the same way, and clearly they do not.
>You can have different rules to represent the same structure.
Sure, I've never claimed syntax <=> paradigm was some kind of unique implication, but you cannot have a functional paradigm without certain syntactic constructs (you have to be able to express functions, closures, pass them as arguments, partially apply them, etc the exact form these strings of symbols take is not important of course, but it has to be directly expressible and part of the language's syntactic rules).
>>
File: 1322530786125.jpg (6 KB, 159x235) Image search: [Google]
1322530786125.jpg
6 KB, 159x235
>>52090822
>/dpt
>Females
>Minorities
>>
>>52090848
>dpt
>straight
>binary
ahahahaha
>>
>>52090674
>'objects', which are abstract concepts with data related to them.
Related how?
Like a mapping from some state to the next via various operations made on it?
Also known as a function?
>>
>>52090822
>http://strawpoll.me/6374789

how can you be "straight" and "non-binary" at the same time? you only fuck other non-binaries?
>>
File: camel-up.jpg (216 KB, 1500x659) Image search: [Google]
camel-up.jpg
216 KB, 1500x659
I just finish my probability analyzer for Camel Up. It gives me the probabilities for the winner, and the second of a leg.
>>
File: 295.jpg (13 KB, 177x278) Image search: [Google]
295.jpg
13 KB, 177x278
>>52090876
>/dpt/
>Not basically /r9k/ with a hobby
>Not exclusively white, middle class NEETs, turboautists and the odd employed codemonkey.
>>
>>52090881
>Like a mapping from some state to the next via various operations made on it?
Actually not like that at all. Functions are essentially a series of steps applied to some input value to arrive at some output value. Objects are just groups of data. This data can have essentially any form and contain any amount of subdata.
>>
>>52090885
You can be post-op tranny and gay, you were just straight before.
Thread replies: 255
Thread images: 27

banner
banner
[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.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com, send takedown notices to them.
This is a 4chan archive - all of the content originated from them. If you need IP information for a Poster - you need to contact them. This website shows only archived content.