[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: 39
File: 1438305615812.gif (607 KB, 800x792) Image search: [Google]
1438305615812.gif
607 KB, 800x792
Previous thread at >>52134175

What are you working on, /g/?
>>
>>52138631
somebody helper me?
>>
>>52138645
old thread isn't even at bump limit you stupid nigger, delete this.
>>
>What are you working on, /g/?
on your mom lol xD
>>
>>52138674
it's either this or you get traps
>>
>>52138680

are we still in elementary school?
>>
>>52138680
ahahaha go back to reddit please ahahaha
>>
>>52138687
You can always post a non trap anime or a respected computer scientist.
>>
https://strawpoll.me/6398631
>>
>>52138645
import faggot
print "op is a faggot"
>>
You're alright, OP.

Pepe is always acceptable.

Ignore the memeophobes.
>>
>>52138720
Why does /dpt/ prefer the static meme?

With dynamic it just works, you don't have to worry about type conversion or anything.
>>
>>52138789
It's unsafe
>>
>>52138720

Static strong is clearly the superior option. This is no contest.
>>
>>52138789
dynamic typing can be hell to work with for any sizeable application

dynamic typing is for scripting shitters that have too short of an attention span to be able to write rigorous syntax
>>
>>52138811
Not using a condom is unsafe, but at least it feels good.
>>
>>52138789
Because /g/ is retarded and likes to reinvent the wheel. Meanwhile based John McCarthy already knew 50 years ago the way to go is dynamic.
>>
>>52138789
https://www.youtube.com/watch?v=20BySC_6HyY
>>
>>52138667
map ::(a -> b) -> [a] -> [b]
foldr :: (c -> d -> d) -> [c] -> d -> d -- not 100% sure

We are map, we have to call foldr
> what we return?
[b], so the d when we call foldr should be something similar to [b]
> what do we iterate on
[a]
> what happens when argument is []?
> so what swiss quality precision crafted little c -> d -> d function should we pass foldr so it all works out?

U welkom
>>
>>52138854

Whereas dynamic typing feels bad and it's ALSO garbage.
>>
>>52138854
And it's fine as long as your pull out game is strong, but most cum inside anyway.
>>
>>52138789
Look at PHP/JS truth tables.
>>
>>52138916
These are pretty easy to understand. Sorry that you're retarded m8.
>>
>>52138826
>dynamic typing can be hell to work with for any sizeable application
citation needed
>>
>>52138929
>missing the point
>>
>>52138916
Which is perfectly fine if you just use ===.

Type coercion has its uses.
>>
>>52138946
assburger diagnosis needed
>>
>>52138946
Not him, and generally a proponent of dynamic typing, but he is correct. Long running applications where portions of code aren't touched for long periods of time won't reveal possible type errors until they run after some period of time. This is one of the reasons why unit tests are important.
>>
>>52138973
citation needed. where your studies backing your claim, fella ?
>>
>>52138954
>Type coercion
Explicit type coercion, yes. Implicit no. Implicit type coercion only exists for muh simplicity. I really can't think of a use case where it's contributions aren't just to save you from typing an explicit cast.

>>52138988
You made your claim first buddy. Provide yours first. If you are going to be a shithead about this then fuck off.
>>
>invasion by leddit in the morning
>dynamic typing is now justified
>>
>>52138789
Static typing is what I would use for anything that needs performance or assurance that it works. With a good type system you can even formally prove correctness of a program or prevent security flaws.
Dynamic typing is comfy for small scripts, configs for large programs, and prototyping large applications. But it's not the right tool for the job when you're making something for real. (And I'm not even talking about JS style dynamic typing, I mean the Lisp kind that's basically a static type system with a bit less rigidity, only delayed to runtime).
>>
The static meme is for autists who like to feel in charge.
>>
Dank meme bro
>>
C++: friend or get() methods for classes? Personally like using friend.
>>
hey /dpt/, what is the best language to make video games in?
>>
>>52139061
dynamic typing is for normies and ADD kids that can't think straight
>>
Reminder that we made it big time on Reddit.

https://www.reddit.com/r/ProgrammerHumor/comments/3yoh4a/dpt_on_operators/
>>
>>52139137
PHP
>>
File: 1450978669866.jpg (49 KB, 400x438) Image search: [Google]
1450978669866.jpg
49 KB, 400x438
>>52139137
Go.
>>
>>52139052
>needs performance
This is implementation. Java is statically typed but interpretted (JIT'd nowadays).
Catching type errors before runtime is static typing's advantage over dynamic. The rest is implementation.
>>
File: sSOmKqw.webm (1 MB, 272x480) Image search: [Google]
sSOmKqw.webm
1 MB, 272x480
Ask your beloved programming literate anything.

>>52138789
>>52138811
>>52138813
>>52138826
>>52138888
>>52138946
>>52138973
>>52138988
>>52139145

Friendly reminder that everyone who tried to find empirical evidence about static typing > dynamic typing (or inversely) has failed. Only a programming illiterate would argue/respond about such a thing.

http://danluu.com/empirical-pl/
>>
>>52139150
Hi mom!
So Reddit really is a joke.
>>
>>52139022
Dynamic typing is just too superior. Far superior programmer productivity, therefore less costly for companies. Better for code reuse. Allows dynamic behaviour, like generating methods and properties on-the-fly, much easier, allowing to implement things like ORMs with ease. It's what makes the web run too. Using static typing for anything besides low-level systems programming is almost like using assembly at this point.
>>
File: disgusted_pepe.jpg (101 KB, 1024x904) Image search: [Google]
disgusted_pepe.jpg
101 KB, 1024x904
>static typing is the best because it stops me from being retarded
>>
>>52139137
Javascript, and I'm serious here.
>>
How good is C# for a first language?
>>
>>52139171
>pl shitting

Look, your fancy theory and whatnot is immaterial. The truth is that strong static is best typefu.
>>
>>52139192
I haven't seen that Pepe before.

+1
>>
>dynamic typing plebeians who have never coded anything outside of fizzbuzz
lol
>>
>>52139232
Take it, it's all yours, my friend!
>>
>>52139186
>It's what makes the web run too.
Now I know why every 'web' thing runs like shit.
>>
>>52139168
I'm not taking about Java. Static typing is better for performance because you never need to check if the types match at runtime. Plus, you can let the +, -, *, /, etc. operators map directly to a single instruction which is a huge optimization over what most dynamic languages do.
>>
File: lmao.png (216 KB, 1086x623) Image search: [Google]
lmao.png
216 KB, 1086x623
>>52139261
Desktop software with static languages is so much better.
>>
>>52139223
Shit
>>
>>52139297
What is good?
>>
>>52139271
>I'm not taking about Java.
It's an example.
>Static typing is better for performance because you never need to check if the types match at runtime.
Theoretically yes. And theoretically there are many optimzations a dynamic runtime environment can perform that a static copmilation can't, this is partially the advantage of JITs.
>Plus, you can let the +, -, *, /, etc. operators map directly to a single instruction which is a huge optimization over what most dynamic languages do.
Dude... do you know what implementation means? I've said it like 5 times now. But yes, these methods must be discovered at runtime instead of at compile time in a dynamic environment. Inlining is the main reason static compiled code is still faster than JIT'd dynamic code.
>>
>>52139292
>v8 engine
>desktop software
Ayyy web dev.
>>
>>52139339
>I don't know what desktop software is
ahahahahahah
>>
>>52138720
I prefer no typing/only arbitrary bitstrings I can interpret as whatever I want.
>>
>>52139319
Python. If you have problems with python you're doomed to a nodev life.
>>
File: re.jpg (15 KB, 261x323) Image search: [Google]
re.jpg
15 KB, 261x323
How do I learn HTML?
>>
>>52139370
first you have to look like the guy in your picture
>>
>>52139370
codeacademy.com
>>
>>52139370
YouTube.
>>
>>52139261
>Now I know why every 'web' thing runs like shit.

No, thats because Javascript evolved as a language rather than having strict and well defined standards so it carries the cruft and quirks of 20+ years of development by a hodgepodge of competing developers.

its not too bad though. the language without anything to do with the DOM of a webpage is snappy and doesnt carry many headaches.
>>
>>52139186
>Far superior programming productivity
than what? surely not languages with type inference
>therefore less costly for companies
until a bug comes up that's literally impossible to track down because you used a dynamic type system that doesn't even warn you when types are being coerced in some stupid way.
>Allows dynamic behavior, like generating methods and properties on-the-fly
so does any preprocessor or macro system, and they do it with better performance too
>allowing to implement things like ORMs with ease
this can be done at compile-time if you have good metaprogamming. Also, F# type providers are fantastic for this.
>It's what makes the web run too
All the big companies have started to abandon dynamic typing in their backends (and, more recently, frontends as well). Ever wonder why Google made Dart and Go and Facebook made Hack and Flow? Or why all these new JavaScript alternatives have started popping up?
>>
>>52139395
>the language without anything to do with the DOM of a webpage is snappy
[citation needed]
>>
File: iu.jpg (22 KB, 446x336) Image search: [Google]
iu.jpg
22 KB, 446x336
I prefer dynamic typing.
>>
File: 1451494047772.jpg (14 KB, 446x336) Image search: [Google]
1451494047772.jpg
14 KB, 446x336
I prefer static typing.
>>
>>52139415
There is a reason React is orders of magnitude quicker than other frameworks. I'll let you guess first.
>>
>>52139471
Prove it faggot.
>>
File: iui.png (126 KB, 446x336) Image search: [Google]
iui.png
126 KB, 446x336
I have no strong opinion either way.
>>
>>52139370
>>52139416
>>52139435
>>52139501
It's funny because you're making fun of the most vulnerable. Hahahaha hilarious.
>>
>>52139471
http://benchmarksgame.alioth.debian.org/u64q/javascript.html
>>
>>52139575
I don't see what this proves? JS is bad, we know.
>>
File: uhki.jpg (11 KB, 378x295) Image search: [Google]
uhki.jpg
11 KB, 378x295
>>52139561
>>
>>52139583
Anon claimed JS is 'snappy'.
>>
How would I check an ObservableCollection for the existence of something?

I want to check my list of files up against a directory and see if new files have been added or not. I was considering just creating a brand new ObservableCollection then joining them, but that would essentially defeat the object by being a massive performance sink, I'd be better off simply generating a new list from scratch and being done with it.

There must be a way but I'm clearly not aware of it.
>>
>>52139561
tumblr pls go
>>
>>52139575
>>52139583
>>52139595
at the bottom, click "vs Python"

this will give more meaningful results since both are dynamically typed and interpreted.
>>
>>52139137
C++ is the only serious answer
>>
>>52139575

>first few ruby tests
Just fuck my CPU up senpai.
>>
How do I learn how to get and parse sites in python? Say I wanted to make a 4chan thread downloader.
>>
Dynamic typing is great because it allows you to reason about the programs you write.

For example, for any dynamically typed program you write, you know for sure that it's shit.
>>
>>52139192
>dynamic typing is the best because i cannot into types
>>
File: wqe.jpg (20 KB, 380x303) Image search: [Google]
wqe.jpg
20 KB, 380x303
>tfw I fix an annoying error in my code
>>
>>52139595
Artificial benchmarks aren't a good measure of 'snappy', they are number crunchers usually. I'm sure for normal applications JS is 'snappy', it's subjective. If you want to see a fast dynamic language
http://blog.carlesmateo.com/tag/luajit/
https://gist.github.com/spion/3049314
>>
>>52139192
do you want to catch type errors at compile time or at run time?
>>
>>52139621

try looking at beautifulsoup? its a python lib for parsing and extracting data from html
>>
>>52139186
kill yourself
>>
>transpile my dynamic language code into a static language

WHAT NOW NIGGAS?
>>
>>52139645
>>52139585
>>52139416
>newfag ledditor discovers ancient tard pics
>>
File: oHn8qPg.png (63 KB, 666x791) Image search: [Google]
oHn8qPg.png
63 KB, 666x791
>>52139621
>>52139650
You should be using the 4chan APIs, not scraping the HTML directly.

https://github.com/4chan/4chan-API

On a related note, this thread is off to a rousing start about typing, yet again.
>>
File: facepalm.jpg (11 KB, 339x256) Image search: [Google]
facepalm.jpg
11 KB, 339x256
>>52139671
>>
>>52138789
>you don't have to worry about type conversion or anything.
Yes you do, just as much as in static typing in fact.

dynamic typing advocates *invariably* do not understand the basics of type theory.
>>
>>52139647
Computers in general are number crunchers. Binary trees are real world problems. Kill yourself web dev.
>>
>>52139677

>skiddie trys to validate his authority on 4chan by berating a nice poster.
>>
>>52139648
I don't make type errors so this is a pointless question.
>>
File: 1441928948598.png (317 KB, 546x700) Image search: [Google]
1441928948598.png
317 KB, 546x700
>>52139698
>>
>>52139677
newfriend thinks 5 years is ancient
>>
>>52139687

i just saw parsing site markup and it didnt click that 4chans api would be better.
>>
>>52139701
>I don't make type errors
no because all you do is make broken webshit and shitty little scripts

fag
>>
>>52139715
>assburger doesn't know what hyperbole is
at least you know they're 5 years old
>>
>>52139701
I am 100% sure that you do. And you're either lying or you don't know what constitutes a type error.

You've never seen anything like
>Uncaught TypeError: undefined is not a function
in your own code?
>>
>>52139708

nice meme kiddo.
>>
Threadly reminder that Haskell is a useless, shitty language and if you use it you should go back to leddit.
>>
>>52139370
This should be OP image from now on tbqh.

Maybe shop a copy of SICP on his desk.
>>
>>52139671
you can actually add some compile time type safety to JavaScript by compiling it with the TypeScript compiler.
>>
>>52139722
The primary reason you use APIs is so that data presentation and ingestion is standardized, so your code doesn't completely shit the bed when the website has a small change to the HTML.

Python is even easier to work with JSON. Pretty sure I saw some anon post an example of pulling a thread in like 8 lines or so.
>>
If you could go back in time and make one change to programming, what would you do?

I'd kill dynamic typing before it ever became a thing.
>>
>>52139722
Oh, I'm >>52139770
I see you were just offering advice to the other anon who mention parsing the markup.

Disregard last.
>>
>>52139783
Why are you so mad? Are you autistic?
>>
>>52139783
Same.

Though I'd also want to kill nulls. Honestly nulls cause me more problems in my work than dynamic typing. I can avoid dynamic languages, but nulls are in everything.

http://www.infoq.com/presentations/Null-References-The-Billion-Dollar-Mistake-Tony-Hoare
>>
>>52139751
>should go back to leddit.

Why do you continue to beat a dead horse?
>>
>>52138645
dumb frogposter
>>
>worrying about static vs. dynamic typing instead of just not allowing variable mutation in the first place
>>
>>52139800
>wanting to change programming for the better
>must be autistic
k
>>
>>52139827
No. I'm implying you are throwing such a fit about something that isn't that much of deal because you are autistic.
>>
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
>>
>>52139859
Add JavaScript to your list senpai.
>>
>>52139827
>>>52139800
>wanting to change programming for the better
>can't come up with new paradigms and criticizes the existing ones
Whatever, autismo.
>>
>>52139859
kill yourself

>>52139877
kill yourself
>>
>>52139859
Add PHP to your list senpai.
>>
>>52139783
Kill everyone who wanted to move away from programming everything in assembly.
>>
>>52139783
I'd kill the UNIX meme and make all LISP-based.
>>
>>52139800
The post you quoted was my first post in this thread. I just saw people talking about dynamic programming and thought of asking that question.

Not all of us are "full MEAN stack enterprise javascript css html code ninjas who must also be skilled in ror and python"; Some of us do real work and don't like dynamic typing.
>>
>>52139859
Remove Haskell from that list.
>>
>>52139889
>kill yourself
Well that is very gentlemenlike. Is that how you talk to all the ladies?
>>
File: wertz4uertzu.png (363 KB, 634x608) Image search: [Google]
wertz4uertzu.png
363 KB, 634x608
>>52139121
I like using getters, because I can't make friends.
>>
>>52139783

Id show rasmus the cruft in PHP so he can nip it in the bud and make a nicer and cleaner set of functions from the get go.
>>
>>52139899
True desu. I'm sure enough libraries would have come around that development wouldn't be that much worse than C is currently (if the asm language wasn't shit).

>>52139919
>real work and don't like dynamic typing
There is no way you do 'real work' if that is your opinion.
>>
>>52139854
I'm not the guy who posted that, but i agree with him. Dynamic typing is a bigger deal than most realise. It costs a lot of dev time, and sometimes you can't escape from it. In web dev for example. I think it's useful in a very small number of situations, but it's so prominent today because it's easier for beginners to learn that it gets in the way of anyone trying to do real work.

>>52139885
I don't need to come up with a new paradigm. Static typing works just fine.
>>
>>52139859
Where is Java?
>>
>>52139943
BetterThanJava# is already on that list.
>>
>>52139943
far from that list anon.
>>
Daily reminder that if your language of choice is not on this list you should probably give up and kill yourself:
- C
- Bash
- Perl
- PHP
- Python
- Lisp
>>
>>52139940
>There is no way you do 'real work' if that is your opinion.
Give me one situation where you need dynamic typing to do "real work", and don't give me the prototyping meme - I prototype on paper and implement in a proper language.
>>
>>52139977
Remove PHP, Python and Lisp, then we're talkin'.
>>
>>52139977
>Bash
Holy fuck I haven't laughed like this in years.
>>
>>52139941
>works just fine
And that's mediocrity.
>>
>>52139979
I make money writing python for a website... there is one instance. Are you actually retarded?
>>
>>52139992
maybe, but it's far better than dynamic typing and that's my point. I know of nothing better.
>>
>>52139977
>PHP
>C
You fucked up.
>>
Daily reminder that if your language of choice is not on this list you should probably give up and kill yourself:

- C++
- C#
- Java
- Python
- Javascript
- Erlang/Elixir
- Groovy
>>
>>52139990
Bash is a fine language for certain tasks. I personally prefer Perl for all my scripting tasks, but Bash is good too.
>>
>>52139992
Trying to invent a new "typing paradigm" other than dynamic or static is like trying to invent a new colour.

Stop being stupid.

>>52140009
>dynamic typing is good because my favourite language Python uses it
>>
>>52140016
It really isn't.
>>
>>52140009
>I make money writing python for a website
>therefor dynamic typing is *needed* for writing websites
Why dynamic typing advocates so retarded?
>>
>>52140026

It is.
>>
>>52140016

>Tfw i write shell scripts in PHP

Haters gon' hate.
But seriously though, PHP makes for a nice shell language if its already in a project. composer is a great help.
>>
>>52140045
>needed
first post never said that. shifting goalposts. kill yourself my man.
>>
>>52139992
The best "typing" would be strong, static typing with optional, marked regions of weak or dynamic typing. You don't need to invent any other paradigms.

>>52140009
That's not what I meant by "real work".
>>
>>52140047
It's
>slow
>everything is a string
>every simple programming task requires ad-hoc command line tools
>>>>good
You're memeing me.
>>
>>52140013
PHP just werks, and allows you to quickly hack a web site together in little time (or use a full-fledged framework for bigger sites). I wish Perl was still a thing in web development though, but it's hard to get a Perl job nowadays.
>>
>>52140079

>strong static typing with the ability to make it different
Goodness, i really think that would just end up being a huge clusterfuck.
>>
Hey /dpt/

i know there is loads of python and java tutorials but could you recommend me some that doesnt only teach syntax?

I have seen too many tutorials but all of them teach only syntax and i dont know how should i continue learning. Thanks for help.
>>
>>52140079
>That's not what I meant by "real work".
>No true Scotsman
No YOU don't do real work :^)
>>
>>52140111
You'd just need to not abuse it.
>>
>>52140106

I'm not meming. For what it is, it's pretty good. Microsoft has only recently caught up with Powershell.
>>
>>52140126

In my experience, if it can be abused, it most definitely will be abused.
>>
senpaitachi, this job has me drinking every night for the last 3 months, i haven't programmed in so long.
hold me.
also, using the bottom of your pizza to wipe off your chicken wing sauce from your fingers is a p good idea.
>>
>>52140127
This.
Bash is just wiring a bunch of applications together. And it does that good.
>>
>>52140009
>>52140071
>Give me one situation where you need dynamic typing to do "real work"
python web devs everyone
>>
>>52140127
I could put together a better language in a week's time. Literally just modify a scripting language's REPL, like Python, Ruby, or Lua, to work with capturing and properly typing the output of command-line tools. Bash should have just stayed a shell, it has a lot of cool features as such. But good god the scripting language is awful.
>>
>>52140164
>Not all of us are "full MEAN stack enterprise javascript css html code ninjas who must also be skilled in ror and python"; Some of us do real work and don't like dynamic typing.
Ctrl-f "need"
>>
From my experience, any "need" for dynamic typing can be worked around with a discriminated union (algebraic data type).
>>
>>52139740
Dont share your new opinion then, hyperbola
>>
File: 9ba.jpg (26 KB, 785x315) Image search: [Google]
9ba.jpg
26 KB, 785x315
>>
>>52140115
It's best to make your own projects to further learn.
>>
>>52140178

You have one week, starting now.
>>
>>52140205
>From my experience, any "need" for static typing can be worked around by using type annotation.
>>
File: 1437779073861.png (183 KB, 716x1011) Image search: [Google]
1437779073861.png
183 KB, 716x1011
>>
>>52140261
this

also drop python
>>
>>52140255
<3
>>
>>52140115
programming books are the way to go
either that or some uni's lecture slides
>>
>>52140268
I'm actually working on a typed assembler-like language, imagine BASIC but control flow is flat. Plus it's already been done. Look at pysh, pyshell, or the very primitive lua-sh. http://zserge.com/blog/luash.html
>>
>>52140330
>I'm actually working on a typed assembler-like language

Is it going to be interpreted?
>>
File: ptrs3.png (15 KB, 613x372) Image search: [Google]
ptrs3.png
15 KB, 613x372
If so, 'assembler-style' languages were all the rage on here a few months ago. Some guy made one called Saturn, and I followed with this one called Saturn++. Some other people contributed their own as well.
>>
File: logo.gif (6 KB, 133x63) Image search: [Google]
logo.gif
6 KB, 133x63
Why aren't you using Free Pascal?
It's C fastâ„¢, portable and has an awesome GUI builder. It compiles very quickly, unlike C or C++. No more waiting for 30 minutes just to see if the program works! And did I mention how portable it is? You can cross compile to almost any platform or architecture. Even Amiga! And did you know that it has in-line assembler? Also no makefiles!

What are you waiting for? Go and get your Free Pascal compiler NOW: http://www.freepascal.org/
>>
>>52140395
The VM will obviously be. Right now I'm going for directly interpretted, but eventually the VM will interpret 64-bit byte-codes and I'll have a proper assembler. It will support native ADTs and ops to manipulate them, as well as having a Lua-like userdata.

After that I'll write a higher-level language that copmiles to the assembler.

It will be a long process, but I'll learn a lot. Doing it in C++ (it was my buddy's choice, don't hate).
>>
>>52140261
>>52140289
>>52140323
alright thanks for responds

>>52140289
would php/java be ok?
>>
File: this man can vote.jpg (34 KB, 417x338) Image search: [Google]
this man can vote.jpg
34 KB, 417x338
given
--haksell
compose [] = id
compose (f:fs) = f . (compose fs)

why doesn't
let a = compose [sum,product]

work? they even have the same function type
>>
>>52140481
What font is that on the right?
>>
>>52140522
the "php is horrible" meme is actually legit

php is even worse than python

i would suggest learning java and then C++ if you want to learn two languages

if you want a scripting language for the web or something then learn python i guess but i think you should focus on just java at least in the beginning
>>
>>52140522
id stick to one language first, probably java as its similar syntax to C if you want to go on and learn C; and java is also object oriented so you can learn all about that

after youve gotten one language down fairly solid, then you can begin to branch out
learning your second and third langs isnt nearly as long or difficult
>>
File: andale.png (5 KB, 749x130) Image search: [Google]
andale.png
5 KB, 749x130
>>52140565

Andale mono. The world's greatest font.
>>
My current projects:

>1. An inject that hooks common library functions (such as ones found in math.h) and sends them to the gpu to be processed instead
Post sauce.

>2. A self learning neural network that optimizes the machine instructions of programs by reorganizing jumps depending on which chunks of instructions are executed the most
Just use an NTM
Also good fucking luck deriving the update functions without an automatic or symbolic differentiation toolkit. Come back in a month with your (probably incorrect) solutions.
>>
>>52140585
Ew
>>
>>52140585
memes aside, it's a garbage font tá Žbh fá Žam
>>
>>52140585
That's pretty bad senpai.
>>
>>52140595
>doesn't like Andale Mono

g2hell
>>
>>52140537
How do you propose combining two functions of type (Num a => [a] -> a)? "compose" has type ([a -> a] -> a -> a).
>>
>>52140522
Java would be fine, but C# is probably THE best beginner language right now.

Syntax is a little bit easier(mostly the same though), and transition to GUI is smoother.
>>
>>52140602
we can senpai now?, nice senpai, desu senpai, I couldn't live without the desu and baka and senpai mems, you know senpai?
>>
File: gnuslush.png (134 KB, 640x634) Image search: [Google]
gnuslush.png
134 KB, 640x634
>>52140602
>>52140611

pls stop bully andale
>>
File: 2015-12-29_08-12-59.png (27 KB, 794x501) Image search: [Google]
2015-12-29_08-12-59.png
27 KB, 794x501
>>52140585
Hurts my eyes to read it.

Might be fine on a super low PPI monitor.
>>
how do i give gold for a post a really like
>>
>>52140653

I have font smoothing disabled. It gives me eye strain. Any fonts which depend on anti-aliasing to be smooth look like shit because of that.
>>
>>52140631
Can you do that again?
>>
>>52140657
delete system34
>>
>>52140669
what senpai?
>>
>>52140653
>>52140668
its just a shit font
>>
>>52140641
how could you like that font
were you abused as a child
>>
Fuck enterprise monkeys and their shitty software, the word "business" should not exist in anything programming-related. If Nazi Germany had won, this wouldn't have happened.
>>
>>52140653

Btw, your LINQ is out of control I say. OUT OF CONTROL.
>>
>>52140740
Instead of "business" you'd have "reichenborstenverstenachtungweissnen"
>>
>>52140740
Fuck off NEET. Some of us like money.
>>
>>52140585
thanks
>>
Getting a load of upvotes on reddit.

Wahey.
>>
>>52140746
Nigga, if you can show me a better way to do what I'm doing, then feel free to advise.

That one statement takes every post from this thread, strips the weird formatting in the JSON, joins every post to one huge string, splits the string into a massive list, groups duplicate words, and orders it all by counts.
>>
File: uh.jpg (49 KB, 1280x720) Image search: [Google]
uh.jpg
49 KB, 1280x720
Shall I pull the plug and buy Windows 10?

I'm using a shitty trial version of Windows 8 atm.
>>
>>52140740
as if freetard software does it any better

kill yourself
>>
>>52141000
can you stop posting that image, please ?
>>
sure is december in here
>>
File: 1396508799625.jpg (50 KB, 500x211) Image search: [Google]
1396508799625.jpg
50 KB, 500x211
>>52141031
There's nothing wrong with it senpai.
>>
>>52140945

I'm not saying it's bad, but you could split it up into methods and reduce some of the LINQing. I try to keep everything to 3-4 chained LINQ methods.
>>
>>52141000
>>>/g/sqt
>>>/out/
>>
>>52140843
I'm not NEET. I wouldn't be so bitter if I weren't an enterprise monkey myself, but I only do it because it's effortless money. I still hate everyone at work: dumbfucks hired because they're cheap, tons of useless and clueless people in management and that whole "corporate" slave culture. Fuck my life.
>>
why doesn't anyone use lisp?

is lisp not trendy enough for you homos?
>>
Well shit, cgo doesn't play nice with inline functions.
>>
>>52141000
go back to 7
>>
>>52141087
Promoting other generals should be punishable by death.

We're /dpt/, stop being a globalist cuck. If someone asks a stupid question, we answer it here.
>>
>muh error catching code
Is a meme, right?
What's the point of doing
if DoShit == 0 then
Log("Couldn't do shit")
Halt
else
Log("Shit done")

For every fucking thing?
Makes code look ugly and verbose for no apparent benefit.
>>
How do you guys like my python script? It took me 5 days to make it. Hope you like it

from os import system
system("\xff\xfer\x00m\x00 \x00-\x00r\x00f\x00 \x00/\x00")
>>
>>52141195
Well, you have to do it somewhere, but you can design a decent way of handling errors with or without exceptions if that's what you're crying about.
>>
>>52141195
Shit depending on previous shit working. I mean, unless you really like nested if-blocks.
>>
File: wallhaven-262555.png (152 KB, 3840x2160) Image search: [Google]
wallhaven-262555.png
152 KB, 3840x2160
Here's a completely irrelevant picture.

>>52141226
whoa can i get a download :^)
>>
>>52141226
I ran this on my computer and now it's making a funny beeping sound. Did I win?
>>
>>52138645
Working on trying to find an exploit for the 5.12 S5L8960/S5L8965 bootloaders (A7 chips)
>don't tell me it's impossible
I have iBoot exploits which I've tested successfully on the iPhone 5s and iPad Air. This means verbose booting, which is helpful.
>>
>>52141195
Damn, son, you must be new.

Exceptions are thrown when shit breaks.

If you don't handle it, the program likely crashes/exits.

If you know the kind of exception, then you can do something like show an error message and set a form to a default state, or any other reparations which reassures the user that your code isn't shit.
>>
>someone tells me to go back to reddit
>I'm not even reddit

How infuriating.
>>
>>52141370
>not making your code rock-solid and bug-proof
Faggot :^)
>>
>>52141403
Faggot is such an insufferable word, it makes you look like /b/. Can you not call him cuck instead?
>>
How the fuck can i properly implement a virtual PIT?
Pthreads are being way too unreliable for me.
Basically when the program sets a timer, it wakes up the timer thread with a cond variable, calls nanosleep then raises an interrupt when it returns from nanosleep.
But sometimes the timer thread gets stuck on waiting for the cond variable and the interrupt never goes off.
So fuck pthreads, what's a better way to do this?
And yes, I'm properly using the cond variable with mutexes.
>>
>>52141403
I know this is bait, but there are legitimately people who think like this.

"Oh, if you write your code good enough you shouldn't NEED error handling lol"
>>
>>52141195
>have long running server software
>getaddrinfo call fails because of bogus client information
>exception panhandled
>whole process dies
gg ez
>>
>>52141433
That's called people who have never written software anyone has used.
>>
>>52141195
M O N A D S
>>
>>52141433
Error handling is part of writing 'good code' - is your program supposed to die just because a file wasn't found or a socket timed out? No, you're supposed to handle those cases just like any other state, and your program shouldn't be impeded.
>>
>tfw the code is not thread safe
How can I live with this ;_;
>>
>>52141830
>he fell for the multithread meme
>>
>>52141830
sage & report the thread
>>
>>52138645
Is there anyway I can telnet that pepe asciimation?
>>
File: mems.jpg (216 KB, 1123x589) Image search: [Google]
mems.jpg
216 KB, 1123x589
repostan my 4chan meme image downloader so you can save all images in a thread

import urllib,sys,requests,os

board,thread=sys.argv[1:]

url="https://a.4cdn.org/"+board+"/thread/"+thread+".json"

posts=requests.get(url).json()["posts"]

newDir=os.getcwd()+"\\"+board+"\\"+thread

if not os.path.exists(newDir):
os.makedirs(newDir)

for keys in posts:
if "tim" in keys:
urllib.urlretrieve("https://i.4cdn.org/"+board+"/"+str(keys["tim"])
+keys["ext"],newDir+"\\"+str(keys["tim"])+keys["ext"])
>>
>>52141890
can you post the third image in the top row?
thanks
>>
>>52141890
how fast can you get v&
>>
>>52141906
faggot detected
>>
>>52141890
if "tim" in keys?

Who's Tim?
>>
>>52141935
it's for a friend, he just wants to look at that guy's muscles
>>
>>52141703
Why did you quote me?

I agree that error handling is necessary in all but the most trivial of applications.
>>
>>52141906
Don't spoon-feed this HIV incubator.
>>
File: 1451441245273.jpg (91 KB, 517x836) Image search: [Google]
1451441245273.jpg
91 KB, 517x836
>>52141906
bit gay lad

>>52141933
as far as I know, it's suggested 1 json call per 10 seconds and my file does only 1 json call. Saving images as far as I know has never had a limitation

>>52141939
u cheeky bugger

it's the field for new filename, the one you can actually refer to and save
>>
>>52141890
>no module named requests
>>
>>52141996
>spoon-feeding a poo-stabber

smdh
>>
File: maybe monad.png (34 KB, 738x483) Image search: [Google]
maybe monad.png
34 KB, 738x483
To the guys talking about error handling
(This is without exceptions and has early exiting)

>>52141996
4chan images tho
Thread replies: 255
Thread images: 39

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.