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



Thread archived.
You cannot reply anymore.




File: Y U N O.png (472 KB, 800x600)
472 KB
472 KB PNG
What are you working on, /g/?
Last thread: >>69304301
>>
>>69317719
learning java
>>
>>69317719
nth for Nim!
>>
Have you fellas got any recommendations for projects to be working on with JavaScript? I'm applying for front-end developer jobs and want to sharpen my skills a little, maybe buffing out my portfolio a little in the process.

Has anyone got any recommendations?
>>
File: 1517326802938.png (105 KB, 500x282)
105 KB
105 KB PNG
So I decided to quit evil-mode for a while and force myself to learn emacs properly
It's fucking hell. Like it's not just the keybindings, but nothing behaves like I want it to.
I don't think I'll last another day.
>>
>>69317816
just install nvim
emacs is for dweebs
>>
>>69317792
I recommend /wdg/
>>
i have one, potentially two questions.

First of all, where the hell can i find a forum/community that is good for just general programming questions?

all the ones i've found so far are so straightforward. As a beginner, i need somewhere i can ask general questions about code instead of questions specifically realted to a language.

second question:
does anyone know where i can find open source samsung watch apps? i want to reverse engineer ANY watch app in tizen studio but as far as i can tell there are literally none.
>>
>>69317816
emacs is overrated. its neat that you can bind and program with it but aint no one got time for that shit
>>
learning multithreading in Rust, this was my first try on getting
>one thread for updating time
>one thread for updating weather
>one thread for putting these together into a string and print it
https://pastebin.com/jU7DEXK8

then I realized I can just use Arc directly to share data between fucntions/threads and skip using channels kek, well at least I know how to make a pseudo scheduler now.

final
use std::sync::{Mutex, Arc};
use std::{thread, time};

fn main() {
let time = Arc::new(Mutex::new(String::new()));
let timecpy = time.clone();

let child = thread::spawn(move || {
get_time(timecpy);
});

child.join().expect("");

println!("{:?}", time);
}

fn get_time(t: Arc<Mutex<String>>) {
let mut t = t.lock().unwrap();
t.clear();
t.push_str("11:11");
thread::sleep(time::Duration::from_secs(1));
}
>>
>>69317842
shove it witch
>>
>>69317842
>>69317879
I've been using emacs for more than a year.
I don't like nvim. You won't change my mind about emacs...
>>
>>69317879
at the place I work one guy uses vim, everyone else uses emacs
>>
>>69317856
>general community for programming
I think you'll find this difficult because of paradigm divides. Try your languages IRC channel. They tend to answer most questions
>>
If you inherit someones computer that contains unlicensed source code, is it still copyrighted?
>>
>another anon
>>69317222
>https://nim-lang.org/docs/tut2.html#object-oriented-programming
>Nim avoids these problems by not assigning methods to a class. All methods in Nim are multi-methods.

You lost me there...

I still like how set is manipulated in nim.
>>
Took up a challenge from Tim Corey (palindrome checker). Implemented overloaded methods for both string and integer but the bonus challenge is a bit of a headscratcher.
>>
>>69317856
Stackoverflow?
>>
>>69317963
Thats a forum that specifically rejected my question about watch apps
>>
>>69317856
>First of all, where the hell can i find a forum/community that is good for just general programming questions?
>posted in /dpt/
>>
>>69317908
yes
>>69317816
emacs is a bloated operating system masquerading as a text editor, don't use that shit.
>>
>>69318008
yes obviously i considered this but i find there's a bit too many snarky cunts here for it to be worth the effort
>>
File: 1526186054686.png (406 KB, 1024x768)
406 KB
406 KB PNG
>>69318016
use ed
kill all bloat
>>
File: javascript rocks.png (134 KB, 1000x494)
134 KB
134 KB PNG
JavaScript rocks!
>>
File: js_rocks.png (473 KB, 1433x779)
473 KB
473 KB PNG
JavaScript rocks!
>>
File: bloat.png (124 KB, 292x760)
124 KB
124 KB PNG
>>69318086
kill this bloat
>>
>>69317996
wierd, maybe they thought you had malice intent. Try qoura. ( i think they will answer both question for you)
>>
>>69318161
thank youuuu
>>
File: 1542751504891.gif (205 KB, 333x396)
205 KB
205 KB GIF
Is there a tool to trim js source code and remove functions and all the stuff which was not called during the callback?
>>
>>69318093
Can you stop spamming this?
Atleast other one had loli
>>
>>69318180
term you're looking for is "dead-code".
>>
>>69318241
Not exactly.
>>
>>69318259
what would it be then?
>>
>>69318182
kys pedophile
>>
I think I am going to be laid off soon. Wish me luck.
>>
>>69318273
Im not pedo or into loli, i just don't like ugly pic
>>
>>69318290
Good luck
>>
>>69318180
>the callback
Any specific callback? Because it sounds like a pretty easy problem to solve but it also sounds like something you'd never wanna do.
Just do a program trace out of your callback and then have a tool that deletes all functions which weren't collected from your trace.
>>
File: function.jpg (9 KB, 479x130)
9 KB
9 KB JPG
this is std::iota
say something nice about it
>>
>>69318290
more like no cents lmao
>>
I learned about RSA in my math degree and I would like to implement it in scheme. Which standard should I implement?
Is this good https://tools.ietf.org/html/rfc8017 ?
I want to learn to read formal documents.
>>
>>69318295
>Im not pedo or into loli
kys code monkey pajeet
>>
Trying one more time.

Anyone has experience with self-hosting version management and ancillary stuff? There's rather few user reports on this kind of thing.

I'm looking into self-hosting a Mercurial server in Wangblows, plus the basics like a bug tracker, forum, automated builds etc for if/when I start a team or make it public.

JetBrains seems to have a trio of softwares which integrate with each other,which are free to small teams, and which seem to cover almost everything, except an actual Mercurial server. I'm particularly interested in its code-aware navigation.
>>
>>69318331
I've gotten some savings. I hate IT and mathematics with passion and should have gone for the brainlet positions instead.
>>
>>69318321
void fill_arr(int *start, int *end, int sval) {
for (int i = 0; start+i != end; ++i)
start[i] = sval+i;
}


imagine importing an entire header to avoid writing these 4 lines
>>
>>69318441
>C++ has a standard utility function
C++ is bad because you can write it yourself
>C++ does not have a standard utility function
C++ is bad because you have to write boilerplate
>>
>>69318522
>C++ doesn't provide the right abstractions
-
>>
File: 1503200562241.gif (900 KB, 500x333)
900 KB
900 KB GIF
>>69317719
I have two interviews coming up. One for a Junior Software Dev position (Java) and another for a tester position.

Where can I go and what should I use to help prepare myself for the interviews. I was already thinking of using codingbat to brush up on java syntax and then watching some videos on SDL and testing lifecycle on youtube.

Any reccomondations?
>>
>>69318522
man, you reallly showed this guy
>>
File: strawman.jpg (34 KB, 300x300)
34 KB
34 KB JPG
>>69318522
>>
>>69318522
The responses you're getting show me that you hit a sore spot. People really will complain about C++ no matter what...
>>
>>69318441
you understand the concept of generic my negro

template <class _ForwardIterator, class _Tp>
inline _LIBCPP_INLINE_VISIBILITY
void
iota(_ForwardIterator __first, _ForwardIterator __last, _Tp __value_)
{
for (; __first != __last; ++__first, (void) ++__value_)
*__first = __value_;
}
>>
>spend 4 days setting different options for a VISA TCP/IP connected instrument
>fucking around with register flags
>fucking around with stop bytes
>fucking around with every other autist VISA option
>"set_termination=None"
I was literally defeated simply by endline characters /dpg/, I am literally the most subhuman programmer in existence.
>>
>>69318662
It's ok tbqh. Various endline shits are like a kryptonite
>>
>>69318555
>codebyter, codewar

Just try to chill. Begin level headed is important
>>
>>69318780
Being*
>>
>>69317792
Unironically build a robust todo list. Start simple. I want it to be able to add, edit, mark as complete (strikethrough) and delete todos. Also, I want each todo to have a description field. You have a week.
>>
Is there a way I can get my threads to pull urls in order in the list? List is, by default, sorted. Not sure if the answer is imap, intellisense doesn't seem to suggest so.

Language is Python 3.

...
session = requests.Session()
login(session)
print('Login Successful.')
print('Input the URL of list of files to download from archive.org.')
listURL = input('archive.org URL: ')
print('Parsing download links...')
downloadLinks = parseDownloadLinks(listURL, session)
print('Parsing complete')
print('Input the directory where the downloaded files will be stored.')
directory = input('ROM directory: ')
entries = []

for dLink in downloadLinks:
entries.append([session, directory, len(downloadLinks), dLink, downloadLinks.index(dLink)])

ThreadPool(8).map(downloadFile, entries)
print('Finished downloading.')
>>
#include <stdio.h>
#include <stdlib.h>

typedef struct list { struct list* next; int value; } list_t;

short unsigned traverse(list_t* list) {
list_t* pointer = list;
for (; pointer; pointer = pointer->next)
printf("%d\n", pointer->value);
return EXIT_SUCCESS;
}

int main() {
list_t l;
l.value = 1;
l.next->value = 2;
l.next->next->value = 4;
l.next->next->next->value = 6;
traverse(&l);
return 0;
}


Why SIGSEGV, anons?
>>
>>69318901
You're dereferencing garbage pointers, dummy.
>>
>>69318780
Thanks anon.
>>
>>69318901
l.next->value =2; //you never added to the list, so this pointer is uninitialized
//you need functions to add to the list or remove from the list, right now its an incomplete list class
int* append(list* l){ //exercise for the reader }
>>
>>69318638
>post strawman
>people point it out
>pretend like people are completely stunned by your post
Silly.
>>
https://blog.salaryproject.com/netflix-software-engineers-earn-a-salary-of-more-than-300000/

fucking jesus

new rule: you can't call yourself an engineer if you make less than 300k/y
>>
>>69318999
300k is reserved for math phds dummy
>>
>>69319040
>implying phds who spent their prime time in academia are anywhere near dudes who were actually working at the time
>>
>>69318999
Such numbers are irrelevant if you don't put them into context (e.g. how much is the cost of living?).
>>
>>69319060
its a /sci/ meme gramps
dont get bent over it
>>
>>69318999
now subtract the commiefornia CoL tax.
>>
>>69319068
It's a shitton of money in any case desu.
Rent in SF is like 4-5k? So hwat
>>
>>69318648
My eyes, my fucking eyes
>>
>>69319093
a easy rule of thumb is subtracting $40k from any SF salary. unless you already live in NY or some shit
>>
>>69318999
>NEEDING to work to have money

Lower class scum, please.
>>
>>69319152
>tfw no sugarmommy to feed and fuck you while you work on your chip-8 emulator in lisp dialect
>>
>>69318522
the c++ standard library just needs to be better organized
instead of
#include <numeric>
to get a whole bunch of shit you dont need
it would be better as
#include <numeric/iota.hpp>
to get exactly what you want,
and if you really want everything then just
#include <numeric.hpp>
>>
>>69318843
do you want them to finish in order?
>>
>>69319197
Modules will fix this.
>>
>>69319209
Yeah! So, if I have 8 threads there, like so, then it would pull 1...8, and the next thread would finish 9, then 10, and so on.

If it's inefficient, in that I'd need to lock something or somewhat, I'm fine with leaving it as is.
>>
>>69319213
Do we know if the committee will adopt modules in the standard library?
Will that not break existing code?
Or will there be module versions for everything.

Can you declare a subset of the exported symbols in a module to import?
>>
File: blaze.jpg (46 KB, 600x539)
46 KB
46 KB JPG
Fuck man this is really dumb. I need to read two inputs, 11001101 and 01010111, and then do a XOR between them. But how do I actually get them into a byte form from the string. Using Convert.ToByte naturally just converts each number and then the value is something totally different. I feel like I'm overlooking something very simple
>>
>>69319302
Maybe you are supposed to perform the XOR yourself, without converting and using the built in.
>>
>>69319298
No idea. But a sane compiler will define a binary interface unit format that means the compiler won't have to parse what it doesn't need so I expect that even dumping all of ::std in a single module will perform better than the current system.
>>
>>69319302
When you are using Convert.ToByte, it is reading the string value and trying to turn that into a byte, rather than the representation.

Parse the string yourself.
>>
>>69319440
>>69319302
WAIT!

        string s1 = "11001010";
string s2 = "10010110";

byte b1 = Convert.ToByte(s1, 2);
byte b2 = Convert.ToByte(s2, 2);

Console.WriteLine((b1 ^ b2));


Probably forgot the base encoding.
>>
What in your opinion should be in the portfolio of a person who wants to get an internship or a junior Java developer job for them to have a reasonable chance at getting it?
>>
>>69319498
Projects. Fuck GPAs, if the write good code, and they are determined, they'll learn.
>>
File: 1546903415367.png (802 KB, 720x720)
802 KB
802 KB PNG
>>69319477
Naturally. Thanks
>>
>>69318901
This >>69318983
And are you sure that last pointer will point to Null?
Sometimes it may point to random address
>>
>>69319104
Dumb retarded niggermonkey. Do you even understand why it has to be that ugly?
>>
>>69319623
Modules can't come soon enough.
>>
>>69318347
It looks current to me based on the hash functions (SHA2, ie not yet successfully exploited) and date. (Nov 2016) My stack of choice is OpenPGP however (RFC4880) which might interest you as well because it has data compression and a hip historical significance. Pick either as you wish.
>>
>>69319547
the answer to questions like this is usually "this behavior may be undefined in the standard and could vary by compiler so just do it the right way and don't worry about what would happen"
and iirc my function should return list* instead of int*
>>
>>69315011
Crash course for using git as a tool for syncing projects between machines:
1: go to the directory where your code is
2:
anon@dpt ~/your/project $ git init

3:
anon@dpt ~/your/project $ git add -v your.c files/here.c wildcards/work/too/*.h

4: go to gitlab or github. Register an account.
5: make a new project. You'll give it a name that's all lowercase letters. Remember it- you'll need it for the next step.
6:
anon@dpt ~/your/project $ git remote add origin http://gitlab.com/your_username/your_repo_name.git

7:
anon@dpt ~/your/project $ git commit -m "hello world!"

8:
anon@dpt ~/your/project $ git push origin master


To get your code onto another computer:
1: go to the directory you want to put your project in.
2:
anon@dpt ~/your/project $ git init

3:
anon@dpt ~/your/project $ git remote add origin http://gitlab.com/your_username/your_repo_name.git

4:
anon@dpt ~/your/project $ git pull origin master


From then on out, use 'git add' to add new files to the project. 'git add -uv' will add all changed files to your next commit. Pull and push to update the local and remote repositories.
>>
>>69319237
If you want to keep the order without adding waits, just modify the thread code so it receives the index and returns it along with the download result. Fairly dull way to go but it's the smartest imho.
>>
>>69319187
I would actually like that. Rich older woman femdomming the shit out of me.
>>
>>69319298
It will not break if you do little change

If you want all:
 #include <numeric> 


If you want specific :
#include <numeric/iota>

Python is good example on changes that broke a language.
>>
>>69319197
What would be the point tho? Is there anything wrong with importing names and not using most of them?
>>
>>69319817
I was thinking in the context of modules.
Not includes.
I don't think they will break it up like this.
>>
>>69319861
Pollutes your symbol table but whatever you still have namespaces.
>>
>>69319799
>femdomming
Reality is different than your dream.

Good luck on not being able to even control what you wear or eat.
>>
>>69319817
A shame, really. Python 3 really is superior in every way.
>>
>>69319647
Thank you, OpenPGP looks interesting but more complicated to implement, it seems it has more features and is a more "high-level" implementation with things I don't know yet (streams for example). I will stick to PKCS 1.
>>
>>69319890
I don't mind either of those.
>>
>>69319890
you're underestimating my submissive nature
>>
>>69320017
Why does nobody understand us, fellow malesub? It's so tiring, living as a man. This responsibility.
>>
>>69320017
>forces you to write java
>>
>>69320206
I'd write in anything for my goddess. If it pleases her, I will write code using a hex editor.
>>
>>69318441
>
int *start, int *end

>non-ranged for loop
Cnile spotted. Your opinion is irrelevant.
>>
>>69320417
What about this?
>>69318648
>>
>>69318990
What he said is true though. People will find anything and everything to complain about C++.
>>
>>69320440
Maybe think for a minute and answer >>69319623 for yourself
>>
>>69320440
Better but the naming and macro use a trash, but unavoidable in libcpp.
Here's a cleaned up version:
template <typename FI, typename T>
inline void iota(FI a, FI b, T v) {
for (; a != b; ++a, ++v)
*a = v;
}
>>
I think I may have crashed a 4chan server. Oops?

There's no 4chan bug bounty program, is there?
>>
>>69320602
I'll give you a lewd pic of mai waifu
>>
>>69320619
Shit, I'll take it.
>>
>>69320619
Given that you're on /g/dpt/ your waifu is probably shit and ugly.
>>
File: moot.jpg (78 KB, 461x615)
78 KB
78 KB JPG
>>69320646
You take that back.
>>
>>69320521
>>69320542
I just thought it weird to criticise someone for implementing iota without a ranged for when not even a standard library does it.
>>
File: who.jpg (86 KB, 610x660)
86 KB
86 KB JPG
>>69320693
>>
>>69320759
Still too soon.
>>
>>69320521
I gave it a while and I still don't see why a ranged for would be necessary. Please answer.
>>
>>69320693
Prove she isn't then. Post the image.
>>
>>69317719
>What are you working on, /g/?
A video game that will make me $1,000,000
>>
File: Queen.png (696 KB, 1611x847)
696 KB
696 KB PNG
>>69320797
But this is mai waifu. She is the little girl.
>>
>>69320821
what the fuck
>>
File: hiro.jpg (485 KB, 1280x720)
485 KB
485 KB JPG
>>69320821
hiro is our little girl now, loser.
>>
File: 1466623274983.jpg (59 KB, 600x760)
59 KB
59 KB JPG
(define p (cons 0 0))
(set-car! p p)
(car p)
>>
File: 100%mootnojoke.jpg (100 KB, 500x667)
100 KB
100 KB JPG
>>69320884
Can your hiroshima rock a cosplay like this?
>>
>>69317879
>>69318016
>too many features for brainlet
>need hand held
kek
>>
File: 1521083742411.jpg (110 KB, 1280x720)
110 KB
110 KB JPG
Employed LISP programmer reporting in
>>
>>69320888
scheme@(guile-user)> (define p (cons 0 0))
scheme@(guile-user)> (set-car! p p)
scheme@(guile-user)> p
$1 = (#0# . 0)
scheme@(guile-user)> (car p)
$2 = (#0# . 0)


What did guile mean by #0#?
>>
File: animu.png (58 KB, 149x148)
58 KB
58 KB PNG
Employed Ada programmer reporting in
>>
File: 1547247989311.jpg (397 KB, 956x720)
397 KB
397 KB JPG
learning java
I'm doing hangman, then i'm probably gonna do something warhammer related.

watching pajeets to absorb their java energy
https://www.youtube.com/watch?v=g5jtSRlN3Bc
>>
File: cat++.png (34 KB, 200x209)
34 KB
34 KB PNG
>>69320918
It's "features" are worthless bloat that I don't want or need. You sounds like a Sepples programmer.
>>
What is the point of Java?
>>
>>69320945
It just seems to be the way how guile show self-reference.
In mit-scheme this is not supported and we get a stack overflow when trying to display it.
>>
>>69321013
And you sounds like a "center of the world" retard, what's your point?
>>
I'm using python and I'm reading in 2 small text files for some parsing. I want these 2 files to auto update in the background. Should I use threading for this?
>>
>>69321024
To get a job.
To be an ENTERPRISE programmer at a big corporation where you're almost guaranteed to have a job for life unless you're retarded or they go under.
>>
>>69321029
>>69320945
here's chicken. It handles it fine, I guess.

#;4> (car p)
(((((((((((((((((((((((...
>>
File: .jpg (92 KB, 500x375)
92 KB
92 KB JPG
>>69321076
>>69321029
>>69320945
>>69320943
>>69320888
Consider not being a LispWeenie and be normal for once in your life.
>>
>>69321076
>>69320945
>infinite data structures in a strict language
be careful
>>
>>69321024
A C syntax language with bad OOP and slow performance. Unfortunately, it is widely taught and easy to hire for.
>>
>>69321107
Is it at least good as a teaching language?
>>
>>69320945
>>69321029
>>69321076
and racket

> (require rnrs/mutable-pairs-6)
> (define p (cons 0 0))
> (set-car! p p)
; set-mcar!: contract violation
; expected: mpair?
; given: '(0 . 0)
; argument position: 1st
; [,bt for context]
>>
>>69321107
>>69321024
It's actually B syntax, thank you. The original purpose was Java was embedded devices. The fact that people turned around and tried to push it for Web and other non-embedded shit is beyond me. The vast majority of Java code is still in embedded devices.
>>
stop shitposting
>>
>>69321128
Oops, that's wrong. It uses the same notation as guile.

> (define p (mcons 0 0))
> (set-car! p p)
> p
#0=(mcons #0# 0)
>>
>>69320988
what anime is that it looks interesting
>>
File: 8nRqoXW.jpg.png (48 KB, 800x729)
48 KB
48 KB PNG
What IDEs do you guys use and for what languages?
>>
>>69321160
GNU/Linux is my development environment. Emacs is my editor.
>>
>>69321127
No, it's one of the worst language as a first language.
>>
>>69321160
VS code for Python & JS
>>
>>69321160
vim for everything
>>
>>69321049
I forgot to mention the program reading these two files in has a 60 second wait time while it waits for packets so I want it to keep looking for packets while these files update
>>
>>69321182
If it's so terrible then why is it so widely used?
>>
>>69321155
It's been a while, but the stile kinda reminds of Slayers. I might be way off base though.
>>
>>69321049
You want your script to update the text files or you want your program to detect when they update?
>>
>>69321160
mousepad for all programming/scripting/text editing really
>>
>>69321160
tmux/vim/shell/repl
>>
>>69320978
How does McDonalds make their fries so much better than other fast food places?
>>
>>69321160
emacs
lisp
>>
>>69321208
I want my program to know whether they've been recently updated
>>
>>69321198
Because universities are pressured to teach students "industrial grade skill" as soon as possible in most universities.
C/assembly/scheme is way more valuable as first languages to understand the core of computer science.
>>
>>69321160
atom for c++
>>
>>69321198
It is terrible because it is widely used - /g/dpt
>>
>>69321160
CLion for C++ at work
Intellij for Java
GPS for Ada, thinking of going to Emacs though.
Emacs for everything else.

JetBrain products are pretty nice for the languages they officially support, but cost too much for anyone that doesn't get them through work. unofficial plugins are mostly hot garbage. Emacs has a high quality system for adding support.
>>
>>69321253
CLion is so fucking awful that the word "garbage" was created to describe it
>>
>>69321234
American education is pretty much dead anyway.
>>
>>69321225
If it is imperative that the program starts parsing the files asap, yes thread it and use something like
os.stat(filename).st_mtime

which returns the last modified time. Just monitor for changes and set a flag to tell the other thread/s to run your parsing.
>>
>>69321253
>JetBrain products cost too much
You can have endless trial mode.
>>
>>69321317
Do you just keep making trial accounts or deleting some registry key?
>>
software is getting slower more rapidly than hardware becomes faster. how do we fix this?
>>
>>69321160
iar ewarm for C at work.
gvim + visual studio (only the debugger) at home.
>>
>>69321356
remove pajeets from the industry
stop using pajeet software
>>
>>69321356
By using old and well tested softwares.
>>
>>69321343
>deleting some registry key
>>
>>69321364
>iar ewarm
Tell us about this proprietary software.
>>
>>69321356
haskell
>>
>>69321155
reverse image search
>>
File: 1521946625068.png (375 KB, 467x534)
375 KB
375 KB PNG
>>69321394
>Best guess for this image: 4chan anime scuba
>>
/agdg/, /wdg/ - people who make things
/dpt/ - hs/college students who circlejerk and pretend to make things
>>
>>69321356
single core performance has barely grown these last years, most of performance gain are actually done at the software level (concurrent computing).
>>
>>69321456
bubblegum crisis you retard
>>
File: wtf.png (29 KB, 1254x678)
29 KB
29 KB PNG
Why does this only add 1 checkbox and 1 label?
>>
File: 1543016946969.jpg (76 KB, 500x496)
76 KB
76 KB JPG
>>69321618
>VB.NET in 2019
>>
>>69321127
No. It's awful in all courses
>introductory programming
>object oriented programming
>data structures and algorithms
but the usual competitor is C++ so it's a draw.
>>
>>69321013
Can you provide some kind of minimal set of features you actually need? (I bet you can't because you are just retarded brainlet but shhhhhh). Do it, and you'll see this list is not sufficient for others.
That's why Emacs is superior: it allows you to customize it, it allows you to make missing features on your own and modify existing ones. It also allows you to program itself on fly.
You are like gopher, you enjoy having no features, you are proud of it. Shame on you.
>>
>>69321618
Ewww...you are going to have problems getting input from those text boxes anyways.
Use an array.
>>
Why didn't C# take off like Java? Microsoft userbase is much bigger and .NET comes with every version of windows. Microsoft also has billions to throw at the language, whereas Sun literally went out of business.
>>
>>69321713
Doesn't explain why they're not drawing.
>>
>>69321747
You're using VS. Use the debugger and step through it.
>>
>>69321029
R7RS requires that 'write' uses labels in circular lists.
>>
>>69321761
I am, they're all getting added but they're just not showing.
>>
>>69321726
Because Java has well-formed (in terms of Java) codebase, shitton of legacy code is written in Java. Plus C# has no decent opensource implementation, C# has poor *nix support.
>>
>>69321038
>qI was quoted and accused of "needing my hand held"
>sperg when I talk about myself
>>69321698
1. Edit text quickly
2. syntax highlighting
3.allow you to bind commands to keyboard shortcuts so you can use bash instead of another operating system
All of these things happen to be provided by vim.
If you spend you're time messing with your editor instead of working I doubt you get much done.
>>
>>69321726
Java -> Android (billions of cheap devices and an equal number of pajeets)
Swift -> iOS and OSX
MS -> missed the smartphone deal and has shit OS
Just wait for fucksya to replace the android mess and Java will mostly be old embedded and webshit work
>>
hi so a few years ago i was really into programming and was pretty comfortable in multiple languages but i kind of fell apart and just stopped developing anything altogether. i miss it though but i think i've probably forgotten everything i learned.
how fucked am i? do i have any chance to get back to where i was? it all seems so daunting now...
help me lads
>>
does anybody have that pic where you roll for a project to work on?
>>
>>69321849
If you were ever truly skilled then you can get back into it in a day.
>>
>>69321777
did you ensure the coords are actually where you think they are?
>>
>>69321886
Yes but I won't post it, fuck roll shit.
>>
>>69321813
>All of these things happen to be provided by vim.
All of them happen to be in base emacs too.
>If you spend you're time messing with your editor instead of working I doubt you get much done.
If your have a poor working environment you're definitely not getting anything done or being productive about it.
>>
File: top.jpg (55 KB, 1078x958)
55 KB
55 KB JPG
>>69321160
sam
>>
File: programming challenges.png (302 KB, 1920x1080)
302 KB
302 KB PNG
>>69321891
maybe, but i feel real stupid because i have to google basic functions and shit. i just dont know how to get myself back into it
>>69321886
here
>>
Idris 2: linear types too?
>>
>>69321925
>4chan thread downloader
how i do dis
>>
>>69321925
Keep it up, you'll get there.
>>
>>69321925
>how to get myself back into it
First identify your goals.
>>
>>69322074
It can be done in a single wget call, too lazy to find it or read the wget manual right now.
>>
>>69321925
Everyone needs to look things up in references. That's why references exist.
>>
>>69322116
wget -nd -rH -D i.4cdn.org -A png,gif,jpg,webm -R'*s.jpg' <thread>
>>
>>69321813
>Edit text quickly
Imagine using <insert mode> to actually edit text. Emacs have same editing capabilities as vim, plus far more flexible scripting language allows you to write more smart macros.
>Syntax highlighting
Are you kidding me?
Highlighting for the most common languages is enabled out-of-box, for others there are ELPA repository (also package manager is available out-of-box too).
>Allow you to bind commands to keyboard shortcuts
`(global-set-key (kbd "<f2>") 'bs-show)`
>vim
>trying to remember ddcnivntinidmffms shit instead of actual commands
>trying to "customize" editor with retarded vimscripts
>pretending to look like cool haxor by editing text in terminal
>>
>>69322333
I never said that emacs did not have those things, I said that anything more is superfluous bloat. try to read and follow conversation before you jump into them.
>trying to remember ddcnivntinidmffms shit instead of actual commands
it becomes muscle memory and you don't have to consciously remember anything. typing out full commands is slow and stupid.
>>
>>69322333
it becomes muscle memory, there's no thinking involved.
i work alone so there's no one to impress dummy
>>
>>69322387
>_optional_ ability to customize your editor just to your liking to be productive is superfluous bloat
Minimalist fags never cease to amaze me. Hell, you're not even a minimalist considering you use vim. Quite the hypocrite in actuality.
>>
>>69320017
>>69320184

> go to Eastern Europe for vacation (former iron curtain country)
> call up an escort, pay $200 for a whole night
> chick comes into my hotel room, starts getting naked
> woah Svetlana, let’s take it slowly first, cuddle a little bit...
> refuses, tells me to get on the bed
> no, keep your panties on...
> get on the bed!
> gets naked and starts blowing me
> I stay soft (I’m really into foreplay first, let’s just say), she won’t let me kiss her
> she gets frustrated and starts riding me, switches to missionary because I’m not getting hard fast enough
> rail her a little bit (the little whimpers she makes as I suck her tits get to me) then flop again because she’s not letting me get passionate
> she gets frustrated, grabbing her face asking what’s wrong as I chill laying down, muttering things in her language
> Asks why I’m not getting up, I get frustrated
> Smack me then Svetlana, choke me if I can’t kiss you! Dominate me, I can feel your anger! Take your shitty life out on me!
> she literally doesn’t understand femdom shit, too little English to explain
> she gives up and flops down on the bed, we open up about our homosexual urges and how much we hate life’s boredom
> says her friend needs her, gets up and dresses to leave
> she kisses me deeply on the mouth twice for some reason, stares for a second, then leaves

No one understands us cuz, happens when you have an older sister and all your families personalities are domineering. Subspace felt fuckin weird too
>>
>>69322580
I haven't finished my unbloated replacement for vim yet.
>>
>>69322642
Yeah. I've come to terms with the fact that women simply can't love a man the way we want to be loved. Even normal men start to relax as time passes and that's when they lose their woman. The seduction, the lying, the initiative, it just never ends. You can never relax with women. They're always testing, always seeing if you're still there. It's always up to you to not fuck it up.
>>
>>69322840

Preach it, same thing that’s happening to my friend with his enstranged gf too, the kid makes it more complicated. The way she and her family use his shit and look for every place he’ll cave into them sickens me. I’m unironically attracted to traps for this reason among others, and my fantasies go 50/50 straight/trap now.
>>
>>69322840
One of my greatest fears. Is there a solution to this?
>>
>>69322670
You mean vi?
>>
So I wrote this multiple operation program
numb1 = eval(input('Please enter a number: '))
numb2 = eval(input('Please enter another number(Dont enter 0 because it crashes): '))
print('sum = ', numb1 + numb2)
print('res = ', numb1 - numb2)
print('mul = ', numb1 * numb2)
print('div = ', numb1 / numb2)
>>
>>69322840
>complaining that a prostitute doesn't love you
>>
>>69323046
Don't be the kind of person who needs to lie and pretend to be better than they are to get a woman
>>
We were discussing programming, isn't there somewhere else you could be discussing this weird shit?

>>69322642
>>69322840
>>69323033
>>69323046

This is why nobody likes you weirdos.
>>
Java question. How do I check if a letter is within a string?

if (this.word.contains(this.word.charAt(i))/code]
>>
What is the best language/ framework for backend web development. Please respond.
>>
>>69323232
>>>/g/wdg
>>
File: IMG_20190111_185740.jpg (20 KB, 202x275)
20 KB
20 KB JPG
>>69322100
thanks ;-;
>>69322107
i guess my problem is i dont know what my goals are, you know? thats kinda what prompted me to give up in the first place, like i wasnt doing anything meaningful and i just got stuck on "what do i want to do with this".
i guess my goals would be something like making rpgs, but thats also probably pretty gay.
>>
>>69323085
>eval
use int
>>
>>69323033
It's just power games. They're testing his presence. They want to see whether he'll be man enough to stop them. It's tiresome.

>>69323046
No. You will be constantly challenged, demeaned and tested just to see how you deal with it. Fail these tests and you get no respect from anyone.

>>69323116
Yeah, it's sad. Like I said I don't expect women to love men the way we all want to be loved.
>>
>Modern C - Jens Gustedt
this is the best book to learn C, right? which one should I read after? I don't want to be a great C programmer I just want to understand well the basics/fundamentals
>>
>>69323432
if you want to be loved try not paying for sex
>>
>>69323332
I suggest you make something you need. Do a written question-and-answer session (or sessions) with yourself until you know what that is.
>>
File: 1511875449746.png (147 KB, 473x606)
147 KB
147 KB PNG
How do fellow brainlets that visit these threads, trying to learn to program, calm down after being frustrated? What do you do when you're stuck on a problem?
>>
File deleted.
>>69323635
take a shower, watch anime and think about the problem. Or abandon my attempt and start from an entirely new angle.
I've learned that trying to solve a problem after being up for ~12-16 hours usually is bad because I'll hack it or brute-force it if i can though..
Then the next day i solve it in 5 minutes elegantly and question how.
>>
File: 1525576550210.gif (48 KB, 800x762)
48 KB
48 KB GIF
>trying to understand redis internals
>>
>>69323156
if(word.charAt(i) == letter)


>>69323635
Leave your keyboard and try again when you feel better.
>>
>>69318607
Nice selfie.
>>
>>69323889
Sorry, I meant.
How do I take a character from a string, and then compare it to another string to see if they have the same character?
>>
>>69323635
Go on walk, then sleep if that didn't help.
>>
Building a mesh network.
>>
Someone posts a lightweight UI library from github the other day. Does anyone remember it?
>>
>>69324185
IMGUI?
>>
>>69324313
Thank fren
>>
>>69324328
There's also Nuklear which is the same idea as Dear IMGUI. IMGUI is the umbrella term.
>>
>>69324344
Nuklear does the same thing where it gives you the buffers and such for you to pick how to render it? Interesting. Nuklear is native C right while this Dear IMGUI is just a third party binding for C and original is C++? Are both just as good for C or does Nuklear do better?
>>
>>69324365
I imagine the biggest difference is the visual output. I would choose based on that more than anything else. I haven't used either, I just know about them.
>>
>>69324391
I'd imagine they're both very customization as far as appearance goes. I'll have to do some tests and see which I like better api wise.
>>
>>69323556
I don't.
>>
>>69324172
That looks pretty interesting, might look into this stuff at some point.
>>
File: kid.jpg (38 KB, 362x346)
38 KB
38 KB JPG
>>69324425
>>69324391
>>69324365
>>69324344
>>69324328
>>69324313
>>69324185
can either of you explain what IMGUI is? i read the wiki page and still don't get it.
>>
>>69324469
imgui does 3d graphics guis. 3D graphics is a beast in of itself. a for example "vertex buffer" is a complicated concept if you don't already know what it is.
so instead of using openGL directly you use imgui's library that uses something like GL under the hood.
i don't know if other Gui frameworks use 3d graphics or not
>>
Is there anything inherently wrong with constructor overloading?
>>
>>69324684
no
>>
>>69324469
In most GUI systems you create, say, a button by constructing an object, passing it a callback to execute when it's clicked, and forwarding it off to a framework (probably as a child widget of one or more other GUI objects). This is called retained mode GUI (RMGUI).

In contrast, in immediate mode GUI (IMGUI), you call a function which renders a button for a frame and returns whether it was clicked in the previous frame. There's no spaghetti mess of dependencies or callbacks.
>>
File: 1463696945268.png (25 KB, 396x400)
25 KB
25 KB PNG
>>69324846
So you're moving where the logic is done from say a potential async callback into the render thread?
>>
>>69324873
dumb frogposter
>>
>>69324893
hes right though
>>
>>69324893
thanks pal
>>
>>69324908
don't care
>>
>>69324846
Wait, so where is this state stored? If I create two save buttons for 2 separate frames, how does it link their states so that the function can return whether it was pressed or not? What if two buttons have the same label? How are they identified?
>>
>>69324921
I think you're supposed to store the state yourself
whole thing seems pretty stupid and pointless
>>
>>69324942
My point is how can the functions that create UI elements in the current frame return the state of the past frame?
>>
>>69324873
Of course, you can still do the "business logic" outside of the UI thread.

>>69324921
I say "last frame" because the input has to be recorded before the UI function is called. You would pass the input corresponding to the last frame into the function, or it could be stored in a kind of context object where the function is now a method (same thing, maybe less verbose).

>>69324942
It seems to come down to personal preference. I prefer a procedural style to an object oriented style. RMGUI can be simpler for a more static GUI while IMGUI is easier to change around (just pass different parameters to the function or don't call it at all).
>>
>>69324963
if a UI element requires state then it's something you create/keep track of and pass into the function
>>
File: file.png (23 KB, 640x186)
23 KB
23 KB PNG
>>69324963
You and me buddy.
ImGui::Text("Hello, world %d", 123);
if (ImGui::Button("Save"))
{
// do stuff
}
ImGui::InputText("string", buf, IM_ARRAYSIZE(buf));
ImGui::SliderFloat("float", &f, 0.0f, 1.0f);


I'm perplexed how this creates the frame and triggers the if for past occurrences of you pressing it.
>>
>>69325001
In this particular case, it seems the library uses global state to store the input. Not what I would do, but it works.
>>
>>69325001
maybe it's saving state based on the text titles you're giving it
>>
>>69325001
Just checks it every frame?
>>
>>69325001
> do stuff
You know, Zuckerburg also made comments like that.
>>
>>69317719
Lisp is the most powerful programming language.
>>
>>69325001
>>69325015
Also notice how the text box and slider take a mutable pointer to the data. It reads it, renders based on that, then writes it if there was relevant input. The same could be done for a checkbox or set of radio buttons, for instance.
>>
Casey Muratori made a good (IIRC) video about IMGUI and state.
https://caseymuratori.com/blog_0001
>>
>>69325015
IMGUI keeps its state internal. If you were to change that button name the next frame you would lose the state. I think this is nice stuff for things you know ahead of time, but if you ever try to make dynamic widgets on the fly it's a mess.
>>
File: yuno.gif (587 KB, 450x478)
587 KB
587 KB GIF
Just use ncurses you nerds.
>>
to make any intermediate mode GUI that's as feature rich as a retained mode GUI the code is going to be just as complex, if not more
The only difference is whether you want to define your GUI by function calls or creating objects
>>
>>69324684
Yes. There should be no constructors except fabric-like ones. You may overload them if you wish, but only if it doesn't change logic behind.
>>
File: DwmK2W_UUAAf8nD.jpg (29 KB, 450x321)
29 KB
29 KB JPG
>>69325143
ncurse you
>>
>>69325143
ncurses works nice, but its API is a mess.
>>
>>69325056
that's why your OS is written in Lisp instead of C
>>
>>69325172
It is.
>>
>>69325172
There is nothing wrong with Mezzano. Made by Lispers for Lispers to Lisp.
>>
>>69317719
that's a nice drawing
>>
>>69325180
well shit, i learned something today
>>
>>69325132
Really? That seems unnecessary. Again, I've never used it, but from that code example it doesn't look like it stores any per widget state. If it really does that, I will not recommend it in the future.

It's certainly not something that IMGUI in general requires.

On a side note I really hate the developers of the library for naming it in such a confusing way.
>>
>>69325224
most GUI objects require state
even a button
>>
>>69325195
I drew that yuno and no it's not. I have no idea why but somebody made 2 /dpt/s with that shitty image.
>>
>>69325275
it is a nice drawing
>>
>>69325224
There are some things that definitely aren't held privately like >>69325076 mentioned, but there is a lot of private state behind the scenes as well for things that aren't defined like that. It's really the only way buttons, for example, would work in the context of how most IMGUI libraries are setup. All of the components in IMGUI have an internal ID based off what you initialize it with and that's how it ties stuff together frame to frame.
It's a nice concept because it very nicely ties into X,Y,Z rendering engines by translating IMGUI command lists to your backend renderer way of doing things, but realistically you can do that with OO based GUIs too.
It really is just shifting around where things are done.
>>
>>69325242
What state? Conceptually an IMGUI button takes the mouse position and button state as parameters (along with its position, size, text, etc.) and returns whether it was clicked (and maybe also hovered over).

The input is the same for every widget, and the other stuff is exactly what is needed to describe the widget and associate behaviour with it. The library does not need to store anything per widget if it is not poorly designed.

>>69325293
Well that's retarded. I will definitely steer people away from Dear IMGUI.
>>
>>69325325
Unfortunately that's not how Nuklear or Dear ImGui works when it comes to input. In both case you feed the context input and it does the magic behind the scenes as to internal state of components. Then when you go to render (and initialize the GUI again) you find out whether an action was done or not in that frame. I'd imagine it has to do with performance reasons it's setup like this, but I don't know why exactly. What you describe could technically work if you wanted an entirely stateless GUI that was truly recreated each frame, but I bet the performance would be an issue.

By maintaining a state behind the scene it can basically reuse most of its draw commands and buffers under the assumption that most UI isn't changing rapidly except for key components. I'm sure it's all complex and setup like this purely for performance reasons.
>>
File: 1544652915768.png (198 KB, 1694x2000)
198 KB
198 KB PNG
>>69325284
thanks, I guess
>>
>>69325424
Basically every 2D game in the last decade or more is rendered by spitting a bunch of vertices (4 per image) into a buffer every frame, uploading it to the GPU, and then drawing it. This would be done a times if you need to switch textures. IMGUI would work the same way. I don't think performance would be an issue.
>>
>>69325275
I think it's cute. You're being too self-critical.
>>
>>69325498
I meant more specifically that these IMGUI implementations aren't remaking their buffers every time you create the widgets. Since it keeps its previous state if it sees that nothing has changed then it can reuse everything. Without that previous state it would have to recreate everything. That's my only point. I think the key market for IMGUI is really prototyping when you can setup things quick without thinking of it. Fully fledged GUI libraries are still better at the end of the day, especially for customization which is lacking in most IMGUIs.
>>
>>69325325
>What state? Conceptually an IMGUI button takes the mouse position and button state as parameters
you just mentioned the button state in your own sentence
it needs to know if it's hovered/held by the mouse
you could store that state as a global state for the mouse seeing you can only be clicking one GUI at a time, but what if you want a button that has some animation effect or something?
intermediate mode just seems kind of pointless, you're doing all the hard work and tracking all the state just to call one simple function
>>
>>69325590
Agreed.
>>
>>69325550
>I meant more specifically that these IMGUI implementations aren't remaking their buffers every time you create the widgets.
I understand that, I just don't think it's necessary.

>>69325590
>it needs to know if it's hovered/held by the mouse
Dude, that's just a simple point in rectangle test. It doesn't need to store it since it could change from frame to frame.

>what if you want a button that has some animation effect or something?
Actually I was just thinking about that and it could be done by keeping around the last N frames of input as long as the animations don't exceed N frames. For instance if you wanted a button to be highlighted when moused over but you wanted the highlight to fade in or out over a few frames, you check against the last few frames of input and base the highlight intensity on that (i.e. the fraction of those frames that the button was hovered over).
>>
>>69325590
>>69325677
I meant the mouse button state, FYI.
>>
>>69325677
If you want to do anything complex you're going to realize RMGUI makes it a lot easier. It's not worth the trouble.
>>
>>69325677
>Dude, that's just a simple point in rectangle test. It doesn't need to store it since it could change from frame to frame.
try clicking and holding a button in your OS
the button stays depressed even if you move the mouse away while holding it
that's state that needs to be stored
I guess it can all be stored in just one cursor state with a delay buffer like you said, but it seems quite restrictive
>>
>>69325728
That is true, but honestly I do not see that as a feature worth replicating.
>>
>>69325756
For you it might not be, but others may think otherwise which is a problem with a restrictive library design. If it's just for you that's fine tho.
>>
>>69325143
based yuno poster, this GUI shit is uninteresting as fuck.
>>
>>69325756
well take an edit box as another example
that needs the line of text, the cursor position, selection if it has any
>>
Should there be a third general? /gapg/ - GUI Application Programming General.
>>
>>69325808
No. The last thing /g/ needs are more fucking generals.
>>
>>69325791
You're already passing and getting back (or passing a mutable reference to) a buffer for the text. Just add that stuff too.

I think the goal should be to use stateless stuff as much as possible so that the application need only manage the little state that can't be worked around. In any case the library shouldn't manage state behind your back in such a way that it limits how you can change the GUI from frame to frame without breaking it (which is a problem with RMGUI e.g. dangling references to deleted widgets in callbacks) that IMGUI is supposed to avoid). Trying to make everything stateless is restrictive, but throwing it all out for RMGUI on the other extreme is silly.
>>
>>69325808
Under absolutely no circumstances should you do this
>>
File: scmus.png (17 KB, 484x292)
17 KB
17 KB PNG
>>69325143
I am, but it isn't pleasant.
>>
>>69325808
Just give us a /prog/ board.
>>
>>69323691
I hope it was you who deleted that image and not the mods. Otherwise the mods are fucking idiots.
>>
>>69325848
there's tons of state for any reasonable GUI though, that's the problem. The point is even the most basic widgets have state, you're doing all the hard work by having to track it all, for what gain? I'm not sure what the problem with RM GUI is in the first place
>>
File: 1499152160676.png (181 KB, 2048x2103)
181 KB
181 KB PNG
I'm going to start introducing Ada code into my company's overarching codebase. I feel so happy that I can finally start to use a language I like at work rather than slug through the typical boring stuff.
>>
>>69325808
Talking about a practical topic is better than the usual language cheerleading that goes on in this thread
>>
>>69325881
>>69325881
>>69325881
>>
>>69325848
>(which is a problem with RMGUI e.g. dangling references to deleted widgets in callbacks)
That's ultimately an issue of the programmer doing bad things.

>>69325866
We used to have a /prog/ board. Moot killed it.
>>
>>69325890
>We used to have a /prog/ board. Moot killed it.
I know, I want it back.
>>
>>69325001
>
IM_ARRAYSIZE(buf)

This is absolutely fucking disgusting and I hate any library that does this kind of shit or even has macros in their API at all.
>>
>>69325901
same, too bad /prog/rider never took off as big as /prog/.
>>
>>69325756
>>69325770
Actually, now that I think about it a bit, it's fairly simple if you separate mouse input into drag gestures and move gestures. The drag gesture holds the mouse start position and current position. Buttons can be held down like this by checking against the start position. This also works for interacting with things that need to be dragged like sliders or windows or whatever.
>>
>>69325882
/gapg/ will mostly be filled with GUI framework cheerleading/wars and you know it.
>>
>>69325913
That's right, it should be a function template.



Delete Post: [File Only] Style:
[Disable Mobile View / Use Desktop Site]

[Enable Mobile View / Use Mobile Site]

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.