[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

/dpt/ - Daily Programming Thread

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 316
Thread images: 36

File: not_enough_work.png (36KB, 702x228px) Image search: [Google]
not_enough_work.png
36KB, 702x228px
What are you working on, /g/?

Previous thread: >>58295854
>>
>>58303825
hmmmm

https://blog.xinhong.me/post/sublime-text-vs-vscode-vs-atom-performance-dec-2016/
>>
FP > OOP
>>
>>58303843
multi paradigm is best
>>
>>58303881
>multi-culturalism is best
no
>>
>>58303881

Look mommy, I can write this for-each in 2 lines instead of 3!
>>
>>58303899
>>58303967
how does it feel to be unemployed?
>>
>>58304016
pretty good

how does it feel to be employed?
>>
File: tfwfellforthesocksmeme.jpg (3MB, 3120x4160px) Image search: [Google]
tfwfellforthesocksmeme.jpg
3MB, 3120x4160px
Fell for the socks meme, I don't feel like a better programmer
>>
>>58304036
Pretty rich.
>>
>>58303710

>>58303742
>>58303779

>>58303814

>>58303876

Moved here so anon will find it...
>>
I want to place a cool programming related tattoo on my chest. I don't know what though, do you guys have any ideas? I want girls to be interested in it when I take off my shirt before I shag them or when I'm just at the beach/pool? I thought about the Java symbol but I'm not too sure. Pls help
>>
>>58304070
https://archive.rebeccablacktech.com/g/thread/S58009006#p58009536
>>
>>58304054
Don't be gay, anon.
>>
File: bst-bingo.png (483KB, 1000x1000px) Image search: [Google]
bst-bingo.png
483KB, 1000x1000px
>>58304054
>>
>>58304054
Imagine needing to fit in on an anonymous imageboard this badly
>>
Detecting URLs in text. Is there a better way than this?
private boolean isLink(String copiedText) {
try {
URL url = new URL(copiedText);
} catch (MalformedURLException e) {
return false;
}
return true;
}
>>
>>58304106
The symbol you are looking for is lambda.
>>
>>58304123
>Implying Multi monitor doesn't actually increase productivity

Poorfag detected.
>>
File: browser #113.webm (3MB, 1920x1080px) Image search: [Google]
browser #113.webm
3MB, 1920x1080px
testing out ActivePresenter some more. webms are so easy to make now.
>>
>>58304137
>not λπω
>>
Trying to learn OpenGL for like the fifth time this week. I got everything up and running and am following this tutorial -> http://www.learnopengl.com/#!Getting-started/Hello-Window

I'm about a third into the actual code, but when I run it, I get this monstrosity of an error message...
[General] ERROR: Setting <GLFWContentView: 0x10022a550> as the first responder for window <GLFWWindow: 0x100515090>, but it is in a different window ((null))! This would eventually crash when the view is freed. The first responder will be set to nil.
(
0 AppKit 0x00007fffbde95114 -[NSWindow _validateFirstResponder:] + 566
1 AppKit 0x00007fffbd6117ff -[NSWindow _setFirstResponder:] + 31
2 AppKit 0x00007fffbd6b9a22 -[NSWindow _realMakeFirstResponder:] + 406
3 AppKit 0x00007fffbd6b9838 -[NSWindow makeFirstResponder:] + 123
4 libglfw3.3.dylib 0x00000001001118c0 _glfwPlatformCreateWindow + 631
5 libglfw3.3.dylib 0x000000010010d474 glfwCreateWindow + 487
6 OpenGL_Practice 0x0000000100001033 main + 179
7 libdyld.dylib 0x00007fffd5025255 start + 1
8 ??? 0x0000000000000001 0x0 + 1
)


I have no idea what it means, nor how I can avoid this... Any ideas?
>>
>>58304107
OCaml does it better.
>>
>>58304106
>>
>>58304106
maki tattoo
>>
>>58304139
If you use operating systems that are terrible at window management like, ironically, Windows.
>>
>>58304179
I have a multi monitor setup and use i3 bitch.
>>
>>58304160
no

the better encoding is to just have pop/push/swap/etc as functions, then compose with (.)
>>
>>58304123
Mechanical keyboard, free, multi monitor, no Apple products.

No Apple for me.
>>
>>58304158
it's right there in the error message m8.
>>
>>58304179
What's wrong with Windows' window management?
>>
>>58304158
Get rid of the forward compat hint, it won't work on Apple macOS (tm).
>>
>>58304179
literally whats wrong with WWM?
>>
>>58304214
>needing (.)
http://alecb.me/blog/stack-language-ocaml
>>
>>58304226
>>58304247
>what's wrong with windows management?
>windows
>>
>>58304267
I have no idea what you're trying to convey with this post.
>>
>>58304267
>it's another blanket "it's bad because it's windows" post

sasuga
>>
>>58304263
>let start k = k []
>let push stack x k = k (x :: stack)
>let pop (_ :: stack') k = k stack'
>let add (a :: b :: stack') k = k (a + b :: stack')
>let stop (x :: _) = x

in Haskell this is just

start k = k []
push stack x k = k (x : stack)
pop (_ : stack') k = k stack'
add (a : b : stack') k = k (a + b : stack')
stop = head
>>
>>58304303
Almost the same. OCaml doesn't generate gigabytes of data per second.
>>
>>58304359
>>>OCaml does it better
>it's not THAT much worse
>>
      bits = shift_in();
uint8_t tmp_bits = bits;
uint8_t tmp_mask = bits & ~curr_offset;
tmp_mask >>= curr_offset;
tmp_bits <<= curr_offset;
tmp_bits |= tmp_mask;


Where is my mistake? offset goes from 0 to 7.
Please don't laff. :(
>>
>>58304267
>I have no argument, I'm just a linux fag.
>>
File: 1458275444652.jpg (68KB, 700x700px) Image search: [Google]
1458275444652.jpg
68KB, 700x700px
>>58304388
Delete this.
>>
>>58303825
got pretty much all the logic for the poker hand rank done.


for i in range(10000):
cards = deck()
p1 = []
board = []

for i in range(2):
deal(p1, cards)

for i in range(5):
deal(board, cards)

sflush(p1, board)

['Qc', '7d']
['Kc', '10c', 'Ac', 'Ah', 'Jc']
royal flush
['9h', 'Qd']
['5h', '7h', '6d', '6h', '8h']
straight flush


i think the math is about right. i simulated 30,000 hands ealirer. it took about 6 seconds and found quite a few straight flushes and a few royal flushes. i'll have to actually look at poker odds and test my engine to see if it aligns.
>>
File: maxresdefault.jpg (45KB, 1280x720px) Image search: [Google]
maxresdefault.jpg
45KB, 1280x720px
>>58304388
Keeping sucking bill gates' tiny dick, at least linus' is big
>>
>>58304430
>A swede who's getting cucked at home by a somali has a bigger dick than an American magnate

KEK
>>
>>58304377
How typical of a code monkey to prioritize code prettiness over efficiency.
>>
>>58304430
>Fuck you for not having any problems with Windows, fuck you for not wanting to do everything through consoles!!!!
>>
>>58304445
he's finnish
>>
>>58304458
>>>the ocaml version is better!
>>why?
>*anger*
>>
>>58304466
>implying you have to do everything through console

classic winbaby banter
>>
>>58304420
for i in xrange(10000):                                                                                          
cards = deck()
p1,board = [],[]

for _ in range(2):
deal(p1, cards)

for _ in range(5):
deal(board, cards)

sflush(p1, board)
>>
>>58304481
>fuck windows because I use linux

classic linfux banter
>>
I need to remove duplicates from several lists that I'm filling with data from a SQL database in C#. Google search/MSDN says I can instantiate a new empty list and just fill it with the old one using
.Distinct().ToList();
, but where can I read about novice algorithms for this kind of thing? Would it be time to break open CLRS or Sedgwick? I don't want to use it without being able to do at least a version of it myself.
>>
>>58304490
>being autistic
>>
>>58304475
It's better because it's more efficient and essentially the same code if you're not autistic.

There's simply no benefit to using Haskell.
>>
>>58304502
>being autistic
>>
Yo people, I'm working a checkers game for a school project, and right now i'm stuck at trying to import and image with JavaFX.
 public void titleView(Pane pane)
{
Image img = new Image("file:test.png");

ImageView title = new ImageView(img);
title.setImage(img);
title.setLayoutX(569);
title.setLayoutY(146);
title.fitHeightProperty().add(100);
title.fitWidthProperty().add(100);
title.setVisible(true);

pane.getChildren().add(title);

System.out.println("success!!!");
}

What i'm looking to do, is being able to package the test.png with the jar files when i make it a runnable program, all the variations of filenames/filepaths leads to me getting a null pointer exception. I can't for the life of me figure out where to put the image and how to refer to it in order to use it. Anyone got experience doing that?
>>
>>58304493
>being autistic
>>
>>58304502
>>58304510
>>58304518
Here are your (You)'s.
>>
>>58304504
>confusing a language with its implementation
>>
>>58304490
if i'm initializing multiple variables should i always do like that?

python is only language i know so i really don't understand best code practices.
>>
>>58304070
https://github.com/baklava151/VirtMachine
I'd have more done, but Mount and Blade Warband sucked me in
>>
>>58304526
>>58302541
>>
>>58304538
not really, but its faster IMO

also, if using python2, you should use xrange in big for loops, because its faster
>>
File: im_with_her_2x.png (113KB, 1480x1265px) Image search: [Google]
im_with_her_2x.png
113KB, 1480x1265px
>>
File: VOXKbD1.png (7KB, 299x97px) Image search: [Google]
VOXKbD1.png
7KB, 299x97px
>>58304525
here's (You)rs
>>
>>58304577
i blame him for what's happened
>>
>>58304565
only started coding once python3 was already out.

when i was 'trying' to build my bit torrent client i ran into a few problems but most of it was just syntax stuff. also some other stuff i coded they changed a lot of libraries for instace like urllib.quote.parse or something to that effect used to just be urrlib.parse so it's like naming of things or something?
>>
>>58304565
>its faster

what makes you think so?
>>
>>58304615
well, in the first case i meant *faster to write,

in the second one , xrange is faster than range
>>
>>58304495
https://www.google.com/search?q=make+a+unique+algorithm&ie=utf-8&oe=utf-8#q=make+a+unique+algorithm+c%23

distinct() and the algorithm in question in general is about 4 lines long and in O(n)

if you want to waste time memorizing and poorly re-implementing algorithms maybe for interviews stick to sorts, those are the real boring ones
>>
>>58304632
>well, in the first case i meant *faster to write,
oh ok
>>
>>58298761
I'm running Linux so I guess that. What libraries should I start getting familiar with?
>>
>>58304633
>if you want to waste time memorizing and poorly re-implementing algorithms maybe for interviews stick to sorts, those are the real boring ones
Cool. I didn't want to go full pajeet and just blindly use distinct() because SO/the internet said so but I'll just use it and deal.

>distinct() and the algorithm in question in general is about 4 lines long and in O(n)
Is it really a linear search?
>>
>>58304504
yes there is. after 5 lines of code you start to see real differences. you're generalizing over something less complex than hello world
>>
>>58304495
Use a Set, they guarantee no duplicates (as long as you don't care about order)

There's no need to use lower-level logic to do inefficiently what data structures can do for you efficiently.
>>
>>58304903
C# has a HashSet, which is the closest it comes to Python's set (which I think is what you're referencing). Like I said, I'm just using distinct() and dealing with it since it does the job and I'm not hitting numbers of items that would require putting things into a HashSet yet.
>>
How do I match a list using guards in Haskell?

Say I have a function multAll that needs to multiply all numbers in the list.
Using pattern matching it would be

multAll [] = 1
multAll (h:t) = h * multAll t

but I have no idea how to write it using guards.
>>
This thread is pathetic. It is not about programming. It's just a bunch of computers illiterates and first semesters memeing about whatever they just learned.

A quick search shows that most arguments used here are not original and have been copied from some trendy tech blog or other shit site.

The only real programming questions I have seen so far are from beginners(it's fine to be a beginner btw).

This entire site is shit and I don't know why anyone would regularly come here.
>>
File: eijf.webm (103KB, 640x480px) Image search: [Google]
eijf.webm
103KB, 640x480px
A shitty zombie game desu.
>>
>>58304245
If I get rid of the Forward_Copmat thing, then the window won't show up at all... Here's the error message:

[General] ERROR: Setting <GLFWContentView: 0x10070d9c0> as the first responder for window
<GLFWWindow: 0x1003006f0>, but it is in a different window ((null))! This would
eventually crash when the view is freed. The first responder will be set to nil.
(
0 AppKit 0x00007fffbde95114 -[NSWindow _validateFirstResponder:] + 566
1 AppKit 0x00007fffbd6117ff -[NSWindow _setFirstResponder:] + 31
2 AppKit 0x00007fffbd6b9a22 -[NSWindow _realMakeFirstResponder:] + 406
3 AppKit 0x00007fffbd6b9838 -[NSWindow makeFirstResponder:] + 123
4 libglfw3.3.dylib 0x00000001001118c0 _glfwPlatformCreateWindow + 631
5 libglfw3.3.dylib 0x000000010010d474 glfwCreateWindow + 487
6 OpenGL_Practice 0x0000000100001034 main + 164
7 libdyld.dylib 0x00007fffd5025255 start + 1
8 ??? 0x0000000000000001 0x0 + 1
)
Failed to create GLFW Window
>>
>>58305012
What did you write this in? I'm looking to get started on writing graphical programs and this looks like something fun to try.
>>
>>58305012
It's cropped weirdly, desu desu.
>>
>>58304968
null, or (==[]), as well as head and tail
>>
is there a standard function that takes a printf string that converts it but does not print it?
>>
>>58305116
sprintf
>>
>>58305118
thanks
>>
>>58305091
JavaScript using the HTML5 canvas, pls no bully.
>>
>>58305091
Haskell
>>
>>58305012
>>58305091
>>58305110

https://jsfiddle.net/mzt2w4z2/
>>
what's wrong with comparing strings?
>>
>>58305113
Got it to compile but doesn't work properly, says the pattern is non-exhaustive. Does it not match on empty list or what?
multAll (h:t)
| (h:t) == [] = 1
| otherwise = h * multAll t
>>
>>58305212
cause niggers
>>
>>58305212
muh string pool
>>
>>58305124
What are some good Javascript tutorials? I barely remember any Java.
>>
>>58305204
>250 lines just for that
>>
>>58305212
all strings are equal

>>58305227
(h:t) doesn't match an empty list
>>
File: 3214.png (37KB, 784x426px) Image search: [Google]
3214.png
37KB, 784x426px
>>58305204
>https://jsfiddle.net/mzt2w4z2/

Kek.
>>
>>58305227
multAll xs | null xs = 1
| otherwise = head xs * multAll (tail xs)
>>
>>58305277
how would you do it?
>>
>>58305212
linear complexity
>>
>>58303838
>takes me less than 2 seconds to open 10m-cpp in vim

why do people insist on shitty editors? :/
>>
>>58305247
https://www.youtube.com/user/codingmath

This guy is pretty comfy, it's more about programming in general but he uses JavaScript.

https://www.youtube.com/user/shiffman

Daniel Shiffman is aright too, I guess, but he's a bit autistic for my liking.
>>
>>58303825
Almost done with my web-app.

I hate JS so much. Why can't they have sane and understandable scoping rules?

Also, I have done things overly complicated ways so many times before realizing the simple way of doing it. That shit hurts my ego.
>>
>>58305346
Daniel is so gay man, it's quite painful to watch sometimes. His code is also ugly
>>
File: download.png (135KB, 864x608px) Image search: [Google]
download.png
135KB, 864x608px
Testing new items.
>>
>>58305357
let and const are block scoped senpai and if you're using ES5 for backwards compatibility var function scoping isn't hard to understand either desu.
>>
File: Lambda_lc.svg.png (59KB, 2000x2000px) Image search: [Google]
Lambda_lc.svg.png
59KB, 2000x2000px
>>58304106
In that case get something timeless and decent.
A lambda might work, as >>58304137 suggested, since it's not a brand, but an idea.

It also looks cool. That one sturdy line, and that sleek elegant curve. It's just a pleasant looking letter.
>>
Does anyone know why the first and second Python code block produce different output?

word = "Germany.[13]"
print(word)
word = word.strip("[")
word = word.strip("]")
print(word)

This prints:
Germany.[13]
Germany.[13

word = "abcde"
print(word)
word = word.strip("a")
word = word.strip("e")
print(word)

This prints:
abcde
bcd

I don't get what the difference is between them.
>>
https://github.com/RefugeRestrooms/refugerestrooms

Yes, this is real guys...
>>
>>58305389
Yeah, I don't like how he refuses to use forEach and he always uses new and 'this' instead of just making factory functions, but he explains concepts pretty good.
>>
>>58305423

Oh anon, you like Half-Life too? Haha, when is Valve releasing HL3 ecksdee
>>
>>58305423
see >>58304152
>>
>>58305423
that sounds like a good idea, do you think the chest is a good place to put it?
>>
>>58305437
The first doesn't begin with "["
>>
>>58305437
>word strip a character
absolutely disgusting
>>
>>58305400
What are you using for this?
>>
>>58305437
strip only works on beginning and ending of a string
https://www.tutorialspoint.com/python/string_strip.htm
>>
>>58305050
Okay. I think I'm closer to the error. Apparently, my glfw is a bit out of date...
My glfw is
 3.2.1 Cocoa NSGL chdir menubar retina dynamic

and according to https://github.com/glfw/glfw/issues/908,
the new one is 3.3, but I can't seem to find it
>>
>>58305400
is that tibia graphics
>>
>>58305463
>>58304152
what is the point of stacking three greek letters that have no meaning together?
>>
>>58304054
>copy-pastes literally the first program example in the book
>immediately goes on to dress like a little faggot and photograph his accomplishment
Kek you'll give up 3 chapters in and go back to editing Xresources.
>>
>>58305512
yes
>>
>>58305508
Yeah I figured that out like seconds after posting. Sorry, I'm retarded.
>>
>>58304123
Why is mechanical keyboard and multiple monitors in """sarcastic"""" quotes?

Your fingers are much less tired after typing on mechanical keyboards, and you are more productive with multiple monitors. Especially if you have one you can rotate. That way Outlook's design finally makes some kind of sense (I mean, the whole thing is an unusable mess, but still.), and web pages and other documentation becomes wonderful to read.

Having that to one side and your other stuff to another is great.

>>58304132
Yeah, don't use URL. It's a shit class, and it's been deprecated for about a decade.

Use URI instead.
https://docs.oracle.com/javase/8/docs/api/java/net/URI.html#toURL--

I realize that it seems weird that you're using URI and checking with toURL, but it's a good habit to get into.

Now of course, if you're not just doing homework, then there is indeed a much better way.
Use Apache Commons' solution.
http://commons.apache.org/proper/commons-validator/apidocs/org/apache/commons/validator/routines/UrlValidator.html

Here's the dependency spec for your build-tools:
https://mvnrepository.com/artifact/commons-validator/commons-validator/1.5.1
>>
>>58305514
http://pastebin.com/raw/nAN8UZ7f
>>
>>58305304
Handle speed and direction in separate functions

Also have some sort of dunction that just returns the shortest direction between player and given zombie or whatever

Then call those
>>
>>58304976
I come because it feels good to help newbiews with their problems.

It's also great fun to banter a bit with the boys, even if they're girlsock wearing faggots.
>>
>>58305532
Because the tool doesn't fix your inherit lazy and piece of shit nature.
And multiple monitors for a person who already can't go four seconds without shitposting will only be worse off.
I should know.

Or it could be just poorfag rationalization, who knows.
>>
>>58305458
Which means that you get to bone le geeky chick XD gaymer grrls.
Don't really see the downside here.
>>
>>58305500
It's in the browser, I'm using WebSockets and PeerJS.
>>
>>58305580
>replying to copypasta

kek
>>
>>58305601
You have to leave the house?
>>
>>58305581
It helps with wearing out your fingers. If you're a lazy shit, that wouldn't be an issue.

And they're not that expensive. I used to wear out two keyboards a year before I got my mechanical one, that's lasted for three years already. It wasn't 6 times as expensive, so I've saved money on the whole.

And I don't shitpost at work. (I do keep tabs open at the DPT and WDG threads though. Those threads sometimes have relevant information.)
>>
>>58305624
Yeah, but think about the good boy points you earn. That will give you a lot of chicken tendies.
>>
>>58305639
>used to wear out two keyboards a year
stop nutting on the keyboard dumb fuck!
>>
File: gnerd plu waifu.jpg (42KB, 477x255px) Image search: [Google]
gnerd plu waifu.jpg
42KB, 477x255px
suppose you are creating a dating app for gnerds to find waifus.

gonna be using firebase for real time db and BaaS.

how would you go about letting the users search a zip code>get list of stub info (low res pic, age, orientation, has kids boolean) which they can see for free, but having her details behind a paywall (kik, snapchat, fb, twitter, phone number, name, etc...) would like to useing the google/android in-app purchases scheme for all transactions.
>>
>>58304976
I come here for the fresh memes. Are you too intelligent for this? *insert picture of a big brained feel guy, his brain forms an elephant, the brain-elephants legs are in incubators that monitor brain activity and power 4 legged walking machines*
>>
>>58305729
>suppose you are creating a dating app for gnerds to find waifus.
>gonna be using firebase for real time db and BaaS.
Don't make sense. I wouldn't be using Firebase.
>>
>>58305964
>Don't make sense. I wouldn't be using Firebase.
why pray tell would that be?
>>
What can be considered as basic knowledge of C? For example to be accepted as junior programmer. How do I evaluate my skills?
>>
I am trying to use the terminal to run C++ programs now, so I wrote a simple one implementing a menu as a switch function. However, it's only allowing me to choose once from the menu instead of continuously as I remember it doing before. Here's the relevant snippet of code:

cin >> choice;
switch(choice) {
case 1:
p1.draw(d);
break;
case 2:
p2.draw(d);
break;
case 3:
d.check_remaining();
}
cin.get();

Any ideas?
>>
>>58306047
Forgot to write the break for case 3, but that wasn't it.
>>
>>58305995
Average two ints.
>>
What's a good emacs video tutorial series?
>>
What's a good vim video tutorial series?
>>
What's a good sublime text video tutorial series?
>>
What's a good word video tutorial series?
>>
What's a good video tutorial text-based tutorial series?
>>
>text editors
>>
What's a good gedit video tutorial series?
>>
What's a good emacs video tutorial series?
>>
What's a good Ed video tutorial series?
>>
What's a good joe's editor video tutorial series?
>>
What's a good nano video tutorial series?
>>
What's good in the hood tutorial series?
>>
What's a good pickup line tutorial series?
>>
What's a good Microsoft (c) Windows (c) Active (c) Cloud (c) Computing (c) Internet of Things (c) tutorial?
>>
>>58306096
>>58306109
>>58306113
>>58306134
>>58306152
>>58306164
>>58306168
>>58306169
>>58306189
>>58306215
>>58306233
>>58306249
>>58306261
FINALLY! After two whole weeks on this website, I have created my very own meme!!!

>mfw ^__________^

*glomps you all*
>>
@58306080
@58306096
@58306109
@58306113
@58306134
@58306164
@58306168
@58306169
@58306189
@58306215
@58306233
@58306249
@58306261
(You)
>>
>>58306047
Loop it? The hell, what question is this
>>
What are good sniper tips?
>>
>>58306276
It's not a meme, nobody will ever repeat it.
>>
>>58306301
What's a good meme creation video tutorial series?
>>
vim/emacs
>terminal-based, with shitty x windows ports
>need months of practice to be productive

sublime text
>neat x windows app and nice terminal version
>need minutes to be productive
>truly cross-platform


why would anyone start learning vim or emacs today?
>>
>>58306276
What's a good suicide video tutorial series?
>>
>>58306331
Why would anyone learn vim indeed. But emacs is a universal language interpreter and compiler.
>>
File: 1483184268193.gif (1MB, 553x600px) Image search: [Google]
1483184268193.gif
1MB, 553x600px
>>58306315
that was pretty good
>>
>>58306331
>cross platform as a selling point
>>
>>58305517
>implying I wasn't dressed as a faggot from the start
>>
>>58306389
Cross-dressing doesn't make you a faggot, sucking cock does
>>
>>58306281
>tfw edited extension to give me my proper (You)s even if people @ me
>>
%58306407
I have plenty of characters left.
>>
>>58306370
yes?

cross platform = more users
>>
File: 1477172406211.png (8KB, 398x293px) Image search: [Google]
1477172406211.png
8KB, 398x293px
>>58305277
>===
>>
>>58306370
if you're NEET closed in your basement with your arch 24/7 maybe it's nothing to you, but for me it's nice to have same editor on windows at work, on linux at my home desktop and on my mac book
>>
File: 1417342417650s.jpg (3KB, 125x93px) Image search: [Google]
1417342417650s.jpg
3KB, 125x93px
I`m a NEET who wants to learn programming or any other skill that would help me by earning moneys from home

Do you know any guides for a total and complete beginner NEET like me?
>>
Which functional language has the easiest c interface mlton, ocaml, haskell, ...?
>>
>>58306605
>/stupidquestionsthread/
>>
any language with interfacing is a mistake.
>>
>>58306628
prove it.
>>
File: 1405797490511.gif (124KB, 680x846px) Image search: [Google]
1405797490511.gif
124KB, 680x846px
>>58306619
Thanks anon
>>
>>58306628
What did he mean by this?
>>
>>58306662
kek that image
>>
File: doggopath.png (3KB, 400x400px) Image search: [Google]
doggopath.png
3KB, 400x400px
GPS tracking my dog
>>
>>58306702

What scale is that at
>>
File: 1406919587281.gif (44KB, 784x811px) Image search: [Google]
1406919587281.gif
44KB, 784x811px
>>58306685
I felt like it was adequate for my post
>>
File: 1483137077381.jpg (17KB, 389x341px) Image search: [Google]
1483137077381.jpg
17KB, 389x341px
>>58306702
why does it appear to me to be moving when its a png?
>>
File: how-to-be-programmer.jpg (57KB, 642x322px) Image search: [Google]
how-to-be-programmer.jpg
57KB, 642x322px
>>
>>58306628
What's the point of implementing an interface? A class is better.
>>
>>58306363
>universal interpreter and compiler
any editor can be this """universal"""
>>
>>58306959
for the thing you've probably never done once in your life: testing
>>
>>58305337

Would this be the same open time if it had enough extensions to make it feature compatible with Sublime?

>>58306331

>truly cross-platform
You really shouldn't use this as a point against Vim or Emacs. Sublime supports Windows, Mac OS X, and x86 Linux. Vim and Emacs work everywhere.

Also, to my knowledge, there is no terminal version of Sublime, which has me using Vim for developing over SSH and commit messages.
>>
File: snakes.png (430KB, 1024x768px) Image search: [Google]
snakes.png
430KB, 1024x768px
>>58306748
here's another for you viewing pleasure
>>
>>58307118
kys
>>
>>58307087
I don't get it.
>>
>>58306748
You should probably go see someone about that.
>>
>>58306609
I don't know which is the best but Haskell's is nice, you just do

foreign import ccall "exp" c_exp :: Double -> Double

and give the C library to ghc
and if it's impure then you should really return IO
>>
>>58307092
>Vim and Emacs work everywhere
>if it's linux terminal
>>
>>58306628
why?
>>
File: Untitled.webm (2MB, 960x1040px) Image search: [Google]
Untitled.webm
2MB, 960x1040px
think I'm nearing the end of my latest coding cycle. going to need a break soon.
>>
>>58307395
hi this is very ugly,

sincerely,
anon
>>
>>58307417
2nded
>>
>>58307417
>>58307426

has 4chan ever not been ugly?
>>
ok, let's check something

http://www.strawpoll.me/12023125
>>
>>58307449
>Atom: 1

dude, why are you using web broswer to edit text?
>>
>>58307449
IntelliJ
>>
>>58303899
Excuse me but did he say multi culuture? no. He said multi paradigm.
Please learn English properly.
>>
>>58307533
intelliJ is an full blown IDE, it doesn't really fit here
>>
>>58307449
where's gedit faggot
>>
>>58307552 (You)
>>
>>58307174

>Implying a dependency on Linux
They work on every *nix system under the sun (not just Linux) on every single instruction set (Sublime ONLY does x86), and also work on Windows. There are also ports to more obscure and/or defunct non-Unix OSes like Amiga OS 4 and OS/2 Warp. There are no editors with better portability than Vim or Emacs, period.

There is a point to be made about Sublime having a lower learning curve and a lot more features out of the box. But don't pretend it's something it's not.
>>
>>58307624
i tried a few different vim and emacs versions on windows and experience was terrible (inb4 >windows)

i agree that it's worth to know vi(m) in case u do edit shit over ssh or on non-x86 machines, but for everyday editing i'd still choose sublime
>>
File: dinner donald.png (460KB, 1024x686px) Image search: [Google]
dinner donald.png
460KB, 1024x686px
Let me get this straight:

I only need to free data I've malloc'd myself, right?

But if I want a function to return something like a struct back to its parent, I have to use malloc, or else that struct memory will automatically be free'd when the function terminates?
>>
>>58307731

>and experience was terrible
A port is still a port, even if it runs like ass. Although the version of Vim that comes with MSYS seems fine to me.

And for what it's worth, I also tend to prefer Sublime. I'm just correcting a terrible claim about Sublime's portability.
>>
>>58307763
If you're returning a reference to a struct you allocated to the heap, I gather the code that called your function is responsible for freeing it.
>>
>>58304558

>>58303044
>>
in eclipse when I hit ctrl + space all the possible methods/ members etc are listed. is there something similar in visual studio?
>>
>>58307818
>muh rojava
>muh catalonia

Sick of libcoms desu. Never mind that the Spanish anarchists got buttdestroyed by Franco because they were completely and utterly lacking in discipline, or that ISIS essentially did the same thing to the Kurds until the Americans started bombing on their behalf

They peddle these failures all while slandering Lenin and Stalin, who have done more to advance humanity than their squatting and drum circles ever will.
>>
>>58306609
chicken scheme, if you count lisps.
>>
>>58307449

Notepad++fags, what's your preferred Linux alternative? I find Gedit is pretty good.
>>
Hey guys, I'm looking for a single-file virtual file system format.. like a zip file or something. But I want to be able to edit, delete and extend files in it, but do so with the least amount of read.writes. I might be dealing with gigabyte files, and i might only want to extend a single 5mb file inside. I don't want to have to write an entire new file to the end of the zip file etc.

Can't seem to find what I'm looking for though... Anyone have any ideas?
>>
>>58307900
If Chicken had pthreads it would be the GOAT language of all time.

I understand that the underlying compiler method makes this very difficult though.
>>
>>58307449
>no love for emacs

Why even use a computer?
>>
>>58307763

>I only need to free data I've malloc'd myself, right?
Any data allocated via malloc must be freed before the pointer voes out of scope, or you will leak memory. This is true whether or not you malloc it or a library function does it. That said, if the library has a custom deallocator function, you should always use that.

>But if I want a function to return something like a struct back to its parent, I have to use malloc, or else that struct memory will automatically be free'd when the function terminates?
No. There are a few ways to deal with returning structs.

1. Return pointer to struct as you suggest. This is how things are typically done with opaque structs.
2. Return struct by value. This is well-defined behavior, and is not equivalent to returning pointers to stack objects (which is always a bad idea).
3. Don't return it, but instead, pass a pointer to the struct as an argument, and have it initialized in the function. This should be the preferred method of dealing with struct initialization, as it allows the caller to choose between stack and heap allocation depending on which is appropriate for the situation.
>>
>>58307943
I agree, if you truly need concurrency you are forced to use fork syscall, which is horrible.

I think with schemes you can chose two out of three: concurrent, fast, elegant.

>>58307952
there are at least two of us, brother.
>>
>>58307942

I know fuck all about databases but I think that might be what you want.
>>
>>58307965
nope, databases are not really for large files. Which is what i'll be storing here. 1-5mb on average probably.
>>
>>58308005
http://www.nydailynews.com/news/politics/trump-couriers-replace-email-no-computer-safe-article-1.2930075
>>
>>58307953
I think I understand what you are saying in point 3, but could you demonstrate in a short code blurb?
>>
File: 1482987716684.png (12KB, 871x144px) Image search: [Google]
1482987716684.png
12KB, 871x144px
>>58308030
>>
I've just won a bet with my boss/advisor (I'm a full-time researcher and part-time PhD student).

Just before Christmas he rewrote an analysis pipeline made by a postdoc and cut down its run-time from 10 hours to 1.5 hours. I told him it could be done in real-time and he bet me I couldn't do it.

I have it down to 2300 ms as of this moment.

Now that I think about it that might have been a trick on his part to make me do extra work during my holidays.
>>
>>58308048
I don't get it.
>>
>>58308030
Drumphf is secretly redpilled on security

Any idiot millenial laughing at him for mentioning couriers is going to eat shit sooner rather than later due to mishandling of their digital info
>>
>>58308068
What do you win from the bet?
>>
>>58308068
how fast is real-time?
>>
>>58308030
Seems smart no?

Is there any truly secure way to send top secret information over the internet?
>>
>>58308005
TogetHER.
ForevHER.

>>58303825
Yet another CHIP-8 interpreter in C, but this time, it's distributed and using standard file handles for communication.
>>
who thought that '->' is better than the '.' of java. java all the way
>>
>>58308081
>>58308103
>implying human couriers are actually more secure than every electronic way of communication

pls tell me you're trolling

disclaimer: im not by any means "with her", nor am i american, but trump is a moron
>>
>>58308154
>>implying human couriers are actually more secure than every electronic way of communication
Of course I am. Some electronic forms of communication are not secure at all.
>>
>>58308133
>he thinks -> and . are the same and that a language designer thought one was better
>he thinks his opinion is meaningful
>>
>>58308154
With computers now backdoored on the chip level, there's some information that you simply don't want to encode digitally in the first place.
>>
>>58308084
Lunch.

>>58308088
In our case - fast enough to essentially be a back-end of a web application. Several seconds is fine.

We're bioinfomaticians and biologists in our group often needed a certain type of analysis from us. We used to get the request from them, run the pipeline (took several hours), then send them the results/put them on our server.

With this they can run their own damn analysis from a web interface (yet to be created - I might try to push that on someone else...) and fiddle with the parameters on their own.
>>
File: 1479764958854.gif (1019KB, 500x245px) Image search: [Google]
1479764958854.gif
1019KB, 500x245px
Been working on a web crawler in python. Any advice on how to contract and expand the stack height after the program visits a url or adds one? Im still kinda new to the data structure of it, im dumb please advise!
>>
>>58308168
Fallout New Vegas?
>>
>>58308168
even if you have 100% trust in your courier, is it easier to hijack/steal from/hit/kill a courier or to read encrypted e-mail?
>>
>>58308186
What kind of information?
>>
File: snmp.webm (1MB, 598x1080px) Image search: [Google]
snmp.webm
1MB, 598x1080px
Rate my SNMP network grapher.
It shows 60mbps in 3 scales:
1-60mbit
0-1mbit
0-10k
That way I can see high-level and low-level traffic at the same time.
>>
>>58308133
. in java has the usecase of -> in c
>>
lol you need 2 files for 1 class in c++. who thought that a good idea? java doesnt have such idiotic things.
>>
>>58308201
>is it easier to hijack/steal from/hit/kill a courier or to read encrypted e-mail?
That very much depends. if you're the CIA or someone equally powerful and have a good unknown vulnerability in the encryption used for email, then the latter. Not to mention there's other ways to access emails besides intercepting the actual sending.
>>
>>58308220
You can write c++ without classes. Too bad sepples fags are too retarded for that.
>>
>>58308220
you know you can just put the implementation in the header if you want?
>>
>>58307942
help
>>
>>58308255
>You can write c++ without classes
Why would you want to?
>>
>>58308084
More work over Christmas.... and he gets to be right.

>>58308088
If he's in HEP, it depends on his luminosity. If he's in astro, it depends on the parallelism in the sensors. (CMOS vs. CCD)
>>
>>58308133
What are you talking about ? C/C++ operators vs Java ?
a->b is just a shortcut for (*a).b.
Java don't need -> since it uses a garbage collector, so you don't need to manipulate pointers.
>>
>>58308042
int foo_init(struct foo *param)
{
//init struct and optionally return statuscode
}
struct foo bar;
foo_init(&bar);
//do stuff with bar
foo_cleanup(&bar);
>>
>>58308204
Anything you don't want being transmitted to a Chinese server, I reckon.

The President of the United States is most likely privy to lots of such information.
>>
>>58308042

struct int_vector {
size_t len;
size_t cap;
int *data;
};

void int_vector_init(struct int_vector *vec)
{
static const size_t INITIAL_CAP = 8;
vec->len = 0;
vec->cap = INITIAL_CAP;
vec->data = malloc(sizeof(int) * INITIAL_CAP);
}

void int_vector_deinit(struct int_vector *vec)
{
free(vec->data);
}

void example_usage(void)
{
struct int_vector vec;
int_vector_init(&vec);
/* Do stuff */
int_vector_deinit(&vec);
}
>>
>>58308278
>since it uses a garbage collector
That has nothing to do with it.
It's just that all objects in Java are actually references.
>>
c++ needs such faggy things like namespace and "scope operator", duuuuh. that's why everyone rather uses java.
>>
File: WRON.gif (1MB, 480x287px) Image search: [Google]
WRON.gif
1MB, 480x287px
>>58308237
in boths methods weak spot is human factor
using courier you add another weak spot


this is just absurd
>>
>>58308308
what about value types?
>>
>>58308220
Classes were a mistake.
>>
File: 1473170992225.gif (170KB, 250x188px) Image search: [Google]
1473170992225.gif
170KB, 250x188px
>fast code locked up on one platform
>slow code working everywhere
Choose your poison.
>>
>>58308324
I don't think primitives are.
>>
File: hmhmhehm.gif (575KB, 140x173px) Image search: [Google]
hmhmhehm.gif
575KB, 140x173px
>>58308296
and for sure all that data can be transfered without encrypting it digitally enywhere

sure, makes sense
>>
>>58308349
>fast code
I mean, duh.
>>
File: JvmSpec7.png (28KB, 1152x698px) Image search: [Google]
JvmSpec7.png
28KB, 1152x698px
Any quick guides to JVM?
>>
>>58308349
It's not that hard to cross compile these days.
>>
>>58308381
Don't use it.
>>
>>58308381
JVM Quick Guide:
it's shit
>>
>>58308395
not an argument, pal.
>>
>>58308389
>>58308395
But it's universal.
And I'm not talking about Java itself.
>>
>>58308349
>fast code locked up on one platform
using native APIs and C or assembly

>slow code working everywhere
using GTK+ or Qt and Java
>>
>>58308408
I'm just saying.

>>58308411
Neither am I. Lots of things are universal.
>>
>>58308411
>But it's universal.
Don't fall for the Oracle memes.
>>
Has anyone here looked into Jürgen Schmidhuber's research

Is he the real deal or a nut?
>>
>>58308428
>>58308432
I've understood you don't know any source.
Thanks for try.
>>
File: 1482270626483.jpg (586KB, 900x719px) Image search: [Google]
1482270626483.jpg
586KB, 900x719px
>>58303825
Working on a reverse engineering tool that has a debugger, code injector, tracer, memory editor, memory scanner etc.
https://github.com/korcankaraokcu/PINCE

I've already shown this here before but I guess it's about the time I speak about it again. Because it's been a while and there really are some good developments with the project recently. For instance, I've finally finished the debugging part of the project! libPINCE is finally fixed and it can be used without the GUI itself. I don't want to make this post very long, just check the features part of README file to see what's been implemented so far

I'll come again to talk about the project when the code injection phase finishes

/g/odspeed /g/entlemans...
>>
>>58308362
>Backdoors don't exist! :^)
>>
>>58308460
I'm the source.
>>
>>58308290
>>58308306
Thanks. The inherent statefulness of C is still something I need to get used to. I understand that it's ultimately faster, but it's hard to keep track of what's happening to my data when.
>>
File: 1479953707100.jpg (60KB, 465x720px) Image search: [Google]
1479953707100.jpg
60KB, 465x720px
>>58308154
>>
>>58308030
The way Trump will bring jobs back to America is by outlawing automation and doing things the old-fashioned way. It'll be great!
>>
>>58308505
has he said that?
>>
>>58308491
>black woman gives out to white person for offering his condolences to families of people killed in a tragic accident.
>>
>>58308505
>outlowing automation
why would anyone do that?
>>
>>58308349
>locked up on one platform
The only platform that matters is Windows, anon.
>>
>>58308513
No, he said the opposite actually.
>>
>>58308525
This
>>
>>58308513
No, but how else will he do it? INB4 "the Chinese took our jerbs!" or "the hispanics took our jerbs!", no, they didn't. American manufacturing just doesn't work, it's not viable. The corporate tax rate here is too high and nothing Trump can do will change that.
>>
>>58308518
Black women are fucking terrible.

Black (bad)
+
Woman (bad)

= What do you expect?
>>
>>58308475
>The inherent statefulness of C
Of all imperative languages.
>it's hard to keep track of what's happening to my data when
Other languages, especially OOP languages like Java, are much worse.
>>
>>58308541
>The corporate tax rate here is too high and nothing Trump can do will change that.
What about lowering the corporate tax rate?
>>
>>58308541
>The corporate tax rate here is too high and nothing Trump can do will change that.
So, you're saying he can't abolish taxes on corporations?
>>
File: jvm.png (29KB, 1152x698px) Image search: [Google]
jvm.png
29KB, 1152x698px
>>58308381
Fixed that for you.
>>
>>58308560
Yeah I'm coming from mainly using Scheme though. I imagine I'd have similar difficulty with an OOP language,.
>>
>>58308529

Well, his Secretary of Labor seems to like robots...

http://www.marketwatch.com/story/trump-labor-secretary-pick-andy-puzder-talked-about-replacing-workers-with-robots-2016-12-08
>>
>>58305995
When you have read and successfully completed all of the exercises in Knuth's The Art of Computer Programming.
>>
>>58308669
>Uh have you seen his cabinet? About 50% billionaires.
Yes.. all of whom would benefit wildly from lowered corporate tax. Did you think about what typed said before you posted it?
>>
>>58306702
bru
>>
>>58308270
STL? Templates? Lambda functions?

I know the STL is too bloated, templates are ugly meta-programming and slow down compilation. But standard C still doesn't have anonymous functions and these are invaluable for those who use them smartly, especially with generic lambdas (from C++14 on). Basically, you could replace every template with a lambda and get both compile-time and run-time benefits from them. And conciseness in code too.
>>
>>58308475
>it's hard to keep track of what's happening to my data when
it's not that hard if you write clean code and you're not a moron
>>
>>58308474
Incompetent one, though.
>>
>>58308770

>the STL is too bloated
Keep in mind that what you don't use, doesn't get included in your program. That is the nature of templates.

>templates are ugly meta-programming and slow down compilation.
Would you rather spend more time writing code or compiling code? When your computer is compiling, you can at least spend your time doing other things.

>Basically, you could replace every template with a lambda and get both compile-time and run-time benefits from them. And conciseness in code too.
Templates and lambdas solve completely different classes of problems.
>>
>>58309017
>muh parametricity
>muh anonymous functions
>>>/haskell/
>>
New thread:

>>58309051
>>58309051
>>58309051
>>
>>58307891
Yes.
>>
>>58306702
pretty cool
>>
>>58308465
Very interesting anon. I'm working on a somewhat similar project, a programming language for malware development. It's based on racket and not very different. The main features I implemented so far are payload encryption, polymorphic code and some functions on the standard lib that make process hiding easier and abstracts the OS.
I don't think it's ready to be published yet.
>>
what does a java developer do
>>
>>58310448
They write boilerplate all day
Thread posts: 316
Thread images: 36


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
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.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.