old thread >>54216976
What are you working on /dpt/?
Thank you for waiting for the bump limit
>months later find a heap corruption issue in my code
got
damn
it
>>54225689
>code is 100% bug free
>implement a fairly complex change
>randomly get a segfault
>can't reproduce or find anything wrong
>>54225660
I can now that the trapfag is banned
>>54225723
or actually nvm it was when i wasn't done with the change and it was probably in the shader code
Made a site to promote vegetarianism, opinions? eolas.xyz/vegetarian/animals.html
>>54225807
Fuck off to /wdg/
>>54225832
srry my bad
>>54225619
nobody holds a cigarette like that
>>54225880
Some people bite their cigarettes, but more softly.
>>54225880
Revy don't give a fuck
>>54225880
yeah but anime artists can't draw for shit
How do I understand Monads?
Need them for a Coursework.
>>54225949
Try to understand some basic examples.
debating whether or not to use InitializeCriticalSectionAndSpinCount instead of the regular InitializeCriticalSection for browser #113.
>>54225807
It's shit
>>54225986
Got any decent ones? Preferably state Monads desu
>>54225989
what's the point, what are you trying to achieve with this? why not develop an app instead?
>>54225807
fuck off hippie
>>54225989
Horrible ui
>>54226020
The Error monad is my favorite
data a = Success a | Error String
return x = Success x
Success x >>= f = f x
Error s >>= _ = Error s
map f (Success x) = Success (f x)
map _ (Error s) = Error s
It's the exception monad, and you have it in almost every language (except C and ASM).
Do you dig it?
>>54226058
>why not develop an app instead?
what? it IS an application.
what I'm trying to achieve is more performant execution.
>>54226112
if i was going to make something like that i would make somesort of machine learning thing, where it watched me as i browsed 4chan and after awhile tried to recommend me things based on threads i've been in and what i posted
>>54226143
what i mean by "things" is recommend me threads across the site, not actual things
>>54226166
>actual things
that's not a bad idea. it could automatically order things from amazon, based on your 4chan browsing habits. think of what wonderous things will be on your doorstep tomorrow!
>>54226206
i'd get dragondildos, guns, waifus, and some chinese chink that is going to drive me over in his chink car
>>54225807
What are you a retard KEK
Nice thread guys...
>>54226307
>Directory listing on a site with only static files makes me a hacker
Hahaha
Will we ever be able to program meat?
Does pic related apply outside of classes?
Is it bad practice if I do the following:for (int foo = 0; foo < bar; foo++) {
for (int foo = 0; foo < foobar.size(); ++foo)
// ....
}
Knowing that I won't ever use the foo of the first loop inside the second loop.
>>54225619
>dumb makiposter
>>54226549
>maki
Try again
>>54226514
You're redefining foo in the second for loop. Any compiler will throw an error there.
anyone else can't stand underscores in code? It looks absolutely horrible to me.
>>54226586
they're way nicer to look at than semicolons and braces.
>>54226586
Underscores look pretty cool if used for macros
>>54226604
THIS_TBQH_FAMALAM
>>54225880
Nobody cares, either.
>>54226584
>Any compiler will throw an error there
Compiles without errors on my machine.
>>54226586
Would you prefer variable names like:whatTheFuckDidYouJustFuckingSay
I mean shit, there's probably a plugin out there for whatever editor to make underscores appear in light grey or whatever so they almost blend in with the background and look like spaces instead.
>>54226664
I guess it does, huh.... Well in any case it's bad form and not the easiest to read. Just use another letter.
>>54226716poopFooBar
poopBazQux
is by far better thanpoop_foo_bar
poop_baz_qux
Hi friends, good luck with all of your endeavors. I'm doing gamedev in Unity (C#) and trying to wrap my head around enumerators (IEnumerators?). I sort of get what C# is doing in that they're pretty much always abstracted away, but it seems like Unity uses them in a weird way. Lots of fun.
>>54226735
Also it disallows using the first variable in the second scope
>>54226740
i personally prefer underscores
doesnt fuck with my dyslexia as much
>>54226740
true. I still like to use a g_ prefix for globals though.
>>54225619
im decypering the giberish in the enter the gungeon c#dll still. got all the tools to work and have been changing things and doing test runs
so far i would say that chest quality chance to spawn is not chest chance to spawn. room drop quality seems to be average room dificulty. 4 lead maidens in a row(room after room) with it set to S more common than D
rainbow chance on room clear doesnt seem to make rainbow chest spawn on room clear. if i had to guess it seems more boss quality
the devs used a obfuscator . half the shit is called stuff like /u00002333323. i wouldnt doubt they mislabeled things
>>54226807
>Just accept responsibility for something you don't personally believe is even happening :^)
>>54226776
Guys guys, asides from all of this, you have to admit the design's pretty sexy
>>54226740
nope
depends on the application
snake case for anything low level
camelcase for anything else
>>54226857
no it's gay as shit kill yourself fag
>>54226870
>snake case for anything low level
so you can feel like le epin haxor programming in ansi C in your loonix consolel
I'm a total beginner in programming so the question is real: can I make a desktop application with Python or is this language just used for web dev?
>>54226903
exactly
>>54226904
you "can" make something that resembles a desktop """"""""app""""""""
hey /dpt/ how do i take the next step and start refactoring my code?
i have a project that's several thousand lines across a dozen or so source files written in python (ik, sorry).
there's room to deduplicate some of it by rewriting more general code or object-orientify things, but i'm not sure what the point is
any tutorials or books you could recommend would be much appreciated, thnx.
>>54226549
Revy
>>54226586
As in,int this_function_here();?
Or do you mean something like(define-syntax hash-ref*
(syntax-rules ()
[(_ hsh k0 ...)
(values (hash-ref hsh k0) ...)]))
>>54227134
What about shit like __int128_t
>>54227139
The exhaustive list is much longer.
>>54227134
I'd say one thing C got wrong was allowing underscores as the start of an identifier.
It should treat underscores like digits: allowed, but just not as the first character.
>>54227150
>Leading double underscore
C defines any identifier that starts with either two underscores or an underscore and a capital letter to be reserved by the standard and the implementation. So an implementation pretty much as to do that.
>>54225742
>I'm not a real programmer
anon...
>>54225619
How and where do I get started with programming? I just want the feeling of creating the something I would actually have use for.
anybody got more of these?
>>54227524
I started on codecademy learning Ruby.
Python is also an okay place to start, but has a lot of weird fucking quirks that are idiosyncratic to it.
Learn the basics of whatever you feel comfortable using, and then IMMEDIATELY stop using that and go to something like C#, Java, C, C++
>>54227524
What would you have a use for?
need some books on developing android apps, are there any worth reading?
Apparently we actually have to talk about programming here. Who'd have known?
>>54226964
Look at your code and think of ways to make it more efficient.
Is there frequently used snippets of code to do the same thing? Factor that out into it's own method.
Are there really long script files full of spaghetti code? Rename some variables and consolidate them into separate files more organized.
> no career goals
Where do I go after being in a programming position for a long period of time?
>>54227608
a better paid role doing the same thing.
or management.
probably.
>>54227620
>Ex-ruby programmer.png
>search for ways to implement something in C++
>stackoverflow with someone asking the same question
>specifically says he doesn't want anything to do with boost
>every answer is about boost
>every answer in every thread pertaining to the question is about boost
Every fucking time.
>>54227651
Have you tried using boost?
>>54227634
no anon ruby devs only use two spaces for indent to make them believe that their shitty nested code is actually good
node js syndrome
>>54227651
What do you want to implement?
inb4: use boost
>>54227480
Well, I'd like to give you a reply, but apparently I've been given a warning for off topic discussion.
>>54227608
You stay a programmer, and maybe work on more interesting projects. Why would you become a programmer if programming for the rest of your career wasn't what you wanted to do?
I saw so much greyed out content, I thought the whole thread has been deleted.
>>54227684
>Why would you become a programmer if programming for the rest of your career wasn't what you wanted to do?
$$$
>>54227566
there's some harvard seminars on youtube:
Sleek Android Design, by Jordan Jozwiak
Android 101 by Fred Widjaja
>>54227724
I stepped out for a moment--why was everything deleted?
>>54227608
make your own company? back end? i heard a lot of ux companies are hiring right now.
>>54227751
the vegetarian communist fag kept talking shit
>>54227684
>>54227736
https://www.youtube.com/watch?v=PBwAxmrE194
>>54227751
Because sandy-vag janny didn't realise we were talking about the Vegemite's website, and educating him about how to properly cite ```sources```.
>>54227559
>>54227558
Idk what the ups and downs of each programming language is, but I learned the basics of c++ in school, up to classes etc. Endgame-dream is to make games though.
I'm working on:public class Test {
public static void main(String[] args) {
System.out.println("Hello /dpt/!");
}
}
>>54227796
You could keep using C++ for games. Or learn something easier to use like C#, and then use monogame or unity to make games with it.
>>54227807
>System.out.println
Why can't a simple println suffice
>>54227724
Nah, janitor just doesn't like off topic content. I can kind of agree with that, but that doesn't mean I'm not going to be easily baited by certain types of off topic posts.
>>54227736
But there are so many other jobs that also pay shit tons. Programming really should be something you do because you enjoy it. Personally, I'm considering getting a job at Microsoft after I have my master's, and if they ask what I'd like to be doing in 10-20 years, I'm just going to give them something like "lead developer of the Windows Kernel." Because I'd legitimately find something like that pretty damn fun. Fuck management.
>>54227531
>Public String setDefinition() {
> return definition;
>}
>>54227823
Because you might want to print to an input stream, silly :^)
>>54227829
>Programming really should be something you do because you enjoy it.
Programming is awful. I would never do it in my free time for fun. That's gay.
i want a C function to return a character, but also advance the string passed to it to the next word in the string.
i can't into the pointers for this. how do i increment the char* passed to the function?
Would anyone with a Twitter mind helping me beta test my little book downloader bot?
Pic related, those are zeroes and not o's
>>54227790
>Because sandy-vag janny didn't realise we were talking about the Vegemite's website, and educating him about how to properly cite ```sources```.
tfw my on-topic post got caught in the shitstorm
>>54227823
>why doesn't everything pollute every namespace
because java is not a shitter lang
>>54227849
It must be a char **, not just a char *.
>>54227829
Good luck getting that. Working on the windows kernel sounds pretty demoralising. There's been some internal chatter that no one gives a fuck about the NT kernel so long as it works. Not a lot of interest in fixing bugs or improving performance when there's a chance something might break.
That's what I've heard at least.
>>54227796
And I'm currently taking a course in C# on udemy, but it's super centered on making games, so. I'm looking for somewhere to learn C# or C++ which isn't focused on making games and such.
>>54227849
What do you mean by "advance the string passed .. to the next word in the string"?
Do you want the function to remove a word from the string?
>>54227870
>java
>not a shitter lang
>>54227823
Because it doesn't work like that, mate.
>>54227850
Do I just tweet a book name at it?
>>54227870
I dunno, seems like every other language got along just fine
>>54227911
yeah, in quotes
thanks bro
>>54227907
He's right though. Java programmers prefer designated shitting streets.
>>54227922
actually nevermind seems like twitter banned my old account lol
>>54227928
RIP thanks anyway
>>54227917
C++ has std::cout
C# has Console.WriteLine
C is shit but you still have to explicitly include stdio.h and then shit like printf and puts are understood to be "reserved"
>>54227823
Java doesn't believe in top level functions. In any case, it's not too difficult to understand the components behind it.
>System
A class acting as a namespace for the standard i/o objects.
>out
An object representing the standard output file.
>println
A method that prints to whatever file is being held by the object it's called on.
So you can also do..System.err.println(stuff);
>>54227881
I've heard some horror stories as well. But hey, I like low level shit, so why not give it a shot?
>>54227901
i want this function:
1. take a string
2. find first alphabetical char
3. offset the start of the string to point to the first whitespace after the first alphabetical char
4. return the first alphabetical char
essentially, return the first letter in the string, but also "cut off" the word that the first letter was a part of. I wanted to do it this way so i could keep calling the function to get the first letter of each word in a string.
>>54227949
you can even do things likePrintStream myOut = System.out;
myOut = System.err;
>>54227949
>so why not give it a shot?
I say go for it. But I would have imagined there would be better jobs out there.. Why not Apple for example? They seem to care more about their kernel. Or red hat or some shit. I'm sure Google have some linux kernel guys too.
>>54227944
All of those are shorter than what Java has. And other langugaes are even less verbose. Those are all C style langugaes.
>>54225807
>Strawman arguments: the website
Wow this is going to change a lot of minds. You forgot to counter the argument "we're not required to be perfectly moral creatures, therefore, I don't have to maximize the morality of all my life choices, including diet."
>make something
>work hard
>pour more hours into it than you should have
>show people
>nobody cares
>they don't even call it shit
>they just ignore it
>>54228014
as if it even matters, and if you're so concerned you can use out.println or o.println
who the hell even makes console applications, and if it's too "verbose" for your stupid little scripts then don't use java, fucking fag
>>54228038
>as if it even matters
yes
>>54228028
I'm proud of you anon. Keep it up.
>>54228053
no it fucking doesn't, maintainability is what matters, not the time taken to write out the code, and you can write System.out.println in no time, especially with auto complete
and most serious applications don't print to stdout for fuck's sake
stupid codemonkey
>>54228017
Jesus fucking christ, sandyjan didn't even delete the fucking post that started it all.
Hiroshimoot what have you done?
>>54228028
It's okay anon, I think it's absolute shit :3
>>54227944
printf and puts aren't reserved, they're just a part of the standard library. But you're not required to use the standard library, and can indeed implement those functions yourself in C, especially if you want to implement the standard library yourself.
>>54227973
Why not simply return a pointer to the first alphabetic character in the string?
>>54227993
>Apple
Apple is the kind of company that takes months to fix a critical security vulnerability, and manages to fuck it up anyways. Also, they'd probably have a problem with me bringing in an Android phone to work every day.
Red Hat is a company I'd consider working for, as is Google. I've also considered Cyanogen Inc.
>>54228074
this, it's fucking babby's first webshit, it doesn't belong in a programming thread
>>54228069
You're right, most serious applications don't print to stdout.
They don't use Java either.
>>54228028
You showed people on here? Or in real life?
>>54228069
>maintainability is what matters
brevity improves readability. Readability improves maintainability.
Playing with automatic type differentiationtype 'a seq =
| Empty
| Cons of 'a * 'a seq
;;
(* automatic type differentiation *)
type 'a dseq =
| Cons_head of unit * 'a seq
| Cons_tail of 'a * 'a dseq
;;
let rec move_up = function
| Cons_head _ -> failwith "can't move up"
| Cons_tail (x, Cons_head ((), seq)) -> Cons_head ((), Cons (x, seq))
| Cons_tail (x, dseq) ->
let dxs = move_up dseq in
Cons_tail (x, dxs)
;;
let rec move_down = function
| Cons_head ((), Empty) -> failwith "can't move down"
| Cons_head ((), Cons (x, xs)) -> Cons_tail (x, Cons_head ((), xs))
| Cons_tail (x, dseq) ->
let dseq = move_down dseq in
Cons_tail (x, dseq)
;;
let rec print_seq pp_a ppf = function
| Empty -> Printf.fprintf ppf "\r\n"
| Cons (x, xs) ->
Printf.fprintf ppf "%a %a" pp_a x (print_seq pp_a) xs
;;
let rec print_dseq pp_a ppf = function
| Cons_head ((), seq) -> Printf.fprintf ppf "|%a" (print_seq pp_a) seq
| Cons_tail (x, dseq) ->
Printf.fprintf ppf "%a %a" pp_a x (print_dseq pp_a) dseq
;;
let print_int ppf n = Printf.fprintf ppf "%d" n;;
let print dseq = print_dseq print_int stdout dseq;;
type command =
| Move_up
| Move_down
;;
let rec read_command dseq =
print dseq;
let line = read_line () in
match line with
| "<" -> Move_up
| ">" -> Move_down
| _ -> read_command dseq
;;
let op_of_command dseq = function
| Move_up -> move_up dseq
| Move_down -> move_down dseq
;;
let main () =
let l = [3; 4; 6; 13; 6; 2; 5; 54] in
let seq = List.fold_left (fun accu x -> Cons (x, accu)) Empty l in
let dseq = Cons_head ((), seq) in
let rec loop dseq =
let command = read_command dseq in
let dseq =
try
op_of_command dseq command
with
| Failure s ->
Printf.eprintf "failure: %s" s;
prerr_newline ();
dseq in
loop dseq in
loop dseq
;;
let () = main ();;
>>54228101
kill yourself
>>54228108
kill yourself RETARD KIL: L YOURSELF SERIOUSLY FUCKING RETARDED SHITTER
>>54228069
>most serious applications don't print to stdout for fuck's sake
Plenty of them do.
>>54228094
>Apple is the kind of company that takes months to fix a critical security vulnerability, and manages to fuck it up anyways.
We're comparing them to MS here you know.
>100 pruned replies
nice.
>>54228121
even if they do, it's usually with some logging framework, not with System.out.println
>>54227973
What you are trying to do is very difficult, if not impossible, without the possibility of serious memory issues.
A better solution would be for the function to take in two parameters: a string and a pointer to the char you want to start your search at. Then have your function return a pointer to the next alphabetical char, which you then feed back into the function.
>>54228028
well maybe it was just shit but they wanted to spare you
>>54228119
>kill yourself RETARD KIL: L
Why do some programmers not want to be good /dpt/?
>>54228165
have fun maintaining your codegolfed babby python shit lmfao kill yourself delusional tard
>>54227829
Why didn't he delete the post that started all the hub-bub?
>>54228094
i'm an idiot, and i haven't written C in 4 years.
jesus fucking christ why didn't i think of that.
>>54228177
No anon, not Python
>>54228177
I don't like python.
>>54228188
D isn't particularly terse compared to java
>>54227776
Don't call me communist faggot.
>>54228221
kill yourself fag
>>54228129
MS isn't THAT terrible about responding to security vulnerabilities. At least not these days.
>>54228184
We all have our derp moments when we're rusty.
Stupid question here,
Does anyone know if C's strcmp destroys arrays?
>>54228254
They purposefully hold back critical updates until patch Tuesday, because publishing them any earlier would be "inconvenient".
Sounds like a pretty shitty place to work to me.
>>54228297
No. Just read the man page anon.
>>54228297
destroys the string*
>>54228297
strcmp does not modify the inputs in any way.
>>54228297
how the fuck would it, it only reads from the addresses you give it, doesn't write shit apart from the return value.
>>54228328
>>54228316
fuck if I know, but I'm trying something and when I call strcmp my inputs are destroyed, so figured I was missing something.
>>54228340
are you sure you're not calling strjew
>>54228340
Yeah, it's probably something else.
>>54228340
In sepples at least, the passed strings are defined as const so they cant be modified at all.
Gonna need to see some context if you actually want help with this.
>>54228312
I think the main reason for that is that they customers don't want to deal with updates all the time, and less so much that it's inconvenient for them. In any case, 2 weeks to a month is a much better response time than 6 months, and I can imagine with a bad enough bug, they might release earlier.
syso ctrl+space -> System.out.println();
and you're truly awful at programming if you think this is even a valid concern in the first place
>>54228404
mind checking? the only difference between it working and not working is the strcmp.int i;
char * arr[10];
...
i=1;
arr[0] = strtok(buf," ");
while(arr[i]!=NULL){
arr[i] = strtok(NULL," ");
if(strcmp(arr[i],"thing")==0)
//do thing
i++;
}
//printing arr as a general check
if I comment out the strcmp is works fine, if I leave it in the print is actually getting ignored, as well as the following code.
which in retrospect wouldn't indicate a deletion but something else and I'm just being an idiot.
>>54228475
It's not the time it takes to type it anon.
>>54228574
as for readability, it's syntax highlighted, so it's as "readable" as if it had been just println, but you have the additional visual cues of System.out so that you immediately know what it's doing
so mcfucking kill yourself retard
>>54228500
I guess I should point out that the "do thing" is just some simple assignments and prints unrelated to the array. may as well be z = 1+1;
>>54228589
Nothing you said makes any sense though.
also i'm going to bed so don't think you're right just because you have the last say
fuck you
>>54228500
>i=1;
>while(arr[i]!=NULL){
Every time you're making that comparison, arr[i] is uninitialised.
Also, use a for loop instead of a while loop.
>>54228610
because you're a retarded Cshart that thinks Console.WriteLine is infinitely better than System.out.println lmfao kill yourself delusional fag
>>54228624
Console.WriteLine is even longer. You're not the sharpest knife in the drawer are you?
>>54228638
No it isn't, it's 1 character shorter.
>>54228638
it's not, you fucking retard, and even if it had been, my point would still be valid because you're a Cshart and you wrote >>54228014
kill yourself newfag tripfag Orb i'm not wasting more time on your inane wankery about the best syntax for printing to console like a tip top code monkey pleb
i'm off to bed now fuck you
>mfw writeln
D wins again
>>54228656
Console.WriteLine vs out.println? out.println does appear to be shorter.
>>54228692
java wins again
>>54228683
sleep well anon. Thanks for the bants
>>54228624
>Cshart
here we go again.
>>54228712
love you too hun
>>54228692using static System.Console;
...
WriteLine("Hello World!");
Daily reminder that testing is for code monkeys. True coders prove their code.Axiom mif : forall (T : Type) (P : Prop), (P -> T) -> (~ P -> T) -> T.
Arguments mif {_} _ _ _.
Axiom mif_true :
forall (T : Type) (P : Prop) (t : P -> T) (f : ~ P -> T) (H : P),
mif P t f = t H.
Arguments mif_true {_} _ _ _ _.
Axiom mif_false :
forall (T : Type) (P : Prop) (t : P -> T) (f : ~ P -> T) (H : ~ P),
mif P t f = f H.
Arguments mif_false {_} _ _ _ _.
Theorem absurd : forall A : Prop, A \/ ~ A.
intro A.
apply mif with (P := A).
auto.
auto.
Qed.
Definition total_order : forall T : Type, (T -> T -> Prop) -> Prop :=
fun T leq =>
(forall x : T, leq x x)
/\ (forall x y : T, leq x y -> leq y x -> x = y)
/\ (forall x y z : T, leq x y -> leq y z -> leq x z)
/\ (forall x y : T, leq x y \/ leq y x).
Arguments total_order {_} _.
Definition max : forall T : Type, (T -> T -> Prop) -> T -> T -> T :=
fun _ leq x y => mif (leq x y) (fun _ => y) (fun _ => x).
Arguments max {_} _ _ _.
Theorem max_is_max :
forall (T : Type) (leq : T -> T -> Prop) (x y : T)
(H : total_order leq),
let m := max leq x y in
(m = x \/ m = y) /\ leq x m /\ leq y m.
intros T leq x y Horder m.
assert (leq x y \/ ~ leq x y).
apply absurd.
case H.
intro H0.
assert (m = y).
unfold m.
unfold max.
apply mif_true with (P := leq x y) (t := fun _ : leq x y => y).
auto.
split.
auto.
rewrite H1.
split.
auto.
apply Horder.
intro H0.
assert (m = x).
unfold m.
unfold max.
apply mif_false with (P := leq x y) (f := fun _ : ~ leq x y => x).
auto.
split.
auto.
rewrite H1.
split.
apply Horder.
assert (leq x y \/ leq y x).
apply Horder.
case H2.
intro H3.
exfalso.
apply H0.
auto.
intro H3.
auto.
Qed.
I never test my max function. Please can you find bugs in it?
>>54228759
Ah yes, just give me a second to read through your perfectly readable language
>>54228738
Yeah. C# is awesome. But trying to compare like with like here. Wasn't even comparing Java with C# in the first place. I think it's the only other language Prajeets know though.
>>54228784
Usually I ignore the fact that some use trip, but I start to understand why they can be annoying. Have you an attention complex anon?
>>54228821
What do you find annoying about a trip?
>>54228830
You want attention.
>>54228849
How so?
Half of the thread got deleted.
How did this happen?
>>54228874
that doesn't really answer my question though. What makes you think i want attention? I get attention when i post anonymously too.
>>54228871
A vegetarian and a communist walk into /dpt/...
>>54228613
actually wasn't the problem.
using strcmp(NULL, x) is a segmentation fault. and since the while loop was going to NULL and doing the cmp regardless it resulted in weird shit.
just incase anyone was wondering.
I need to specialize my programming. I'm pretty much a shitty jack-of-all-trades, master-of-none and i'd like to focus my attention on what gets you hired.
so do you guys know what industry needs the most programmers?
>>54228929
>just incase anyone was wondering.
Be reassured, nobody was wondering.
>>54228940
well considering nobody pointing out the glaring null usage in strcmp causing an error, its probably good for you to know.
https://ideone.com/Sr25NY
Why does it display 2 characters rather than 16?
>>54227807
By extension,import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.layout.StackPane;
import javafx.scene.text.Text;
import javafx.stage.Stage;
public class TestFX extends Application {
public static void main(String[] args) {
launch(args);
}
@Override
public void start(Stage primaryStage) {
StackPane pane = new StackPane();
Text text = new Text("Hello /dpt!/");
pane.getChildren().add(text);
Scene scene = new Scene(pane, 250, 250);
primaryStage.setScene(scene);
primaryStage.show();
}
}
>>54225989
>debating whether or not to use InitializeCriticalSectionAndSpinCount instead of the regular InitializeCriticalSection
Why would you want to use the AndSpinCount variant?
In 20 years of Windows programming, I've never once called that function. Correct is more important than performance optimized, when it comes to multithreaded programming.
I'd suggest that you only look at dicking with the spin count once you have the software working completely and correctly.
>>54228931
learn to be a web programmer
it's easy as shit and you will be hired by clueless idiots to make lots of money
>>54228940
*be assured
>>54228956
Nobody cared. Don't insist anon.
>>54228975
Thank you.
>>54226358
You said that. Not him
Just started SICP and I can't understand why I'm getting an error for calling my iterate function with only one argument when I clearly call it with two in mit-scheme:(define (iterate x y)
(/ (+ (/ x (* y y)) (* y 2)) 3))
(define (stopitr y)
(< (abs (- (iterate y) y)) 0.001))
(define (cubeassist x y)
(if (stopitr y)
y
(cubeassist trgt (iterate x y))))
Manually calling increment works, but the function doesn't when given a target and a guess.
>>54229046
Also, replace "trgt" in there with "x", forgot to include that correction in the copypasta.
>>54226777
>dyslexic
>a programmer
How's that working outdo{
tin myVra=1;
}wheli();
If you had to develop an nime image blocker for 4chan, how would you implement one?
>>54228971
>working completely and correctly.
It already is, as far as I can tell. there's no major bugs and the code's execution seems solid enough.
but it'd be great if I could make it more performant with a few simple tweaks. switching over to InitializeCriticalSectionAndSpinCount takes like 5 seconds of effort. I can't tell yet, but I don't think it actually improves anything. I need to test out more spin values.
>>54229070
hash based is easiest to do, but also the easiest to get around. (such as when /r9k/ enforced unique images)
>>54229046
>>54229057
HURR DURR just found it nevermind
>>54229075
adding to that, browser #113 might not be a large enough program to benefit from the spin count. it only has like 10-20 threads, and there isn't usually a whole lot going on at any given time.
Is K&R bad for an absolute beginner to programming?
>>54229075
>switching over to InitializeCriticalSectionAndSpinCount takes like 5 seconds of effort. I can't tell yet, but I don't think it actually improves anything. I need to test out more spin values.
It doesn't take five seconds of effort. It takes a few months of effort to actually construct software that can demonstrate a benefit from such changes, and from particular selections for the spin count.
Sounds like you just want to make random changes and see what happens. Fine, but don't kid yourself: you don't know anything about why you should use that API nor what spin count would be a good idea for your particular software.
>>54227973
By now, I'm sure your requirements have completely changed and this will be useless to you. However, I wrote the function you described for fun.bool isAlphaChar(char ch) {
return (ch>='a'&&ch<='z')||(ch>='A'&&ch<='Z');
}
char firstWhitespaceAfterAlphachar(char **string) {
char *str=*string;
char firstAlphaChar=0;
while(*(str)) {
if(!firstAlphaChar) {
if(isAlphaChar(*str)) firstAlphaChar=*str;
} else {
if(*str==' ') {
*string=str;
return firstAlphaChar;
}
}
str++;
}
*string=NULL;
return firstAlphaChar;
}
Test:char string[] = "Hello, /g/. Testing, testing.";
char *str=string;
while(str) {
cout<<"FirstWhitespaceAfterAlphachar is '"<<firstWhitespaceAfterAlphachar(&str)<<"'\n";
if(str) cout<<"new string is \""<<str<<"\"\n";
}
Output:Return value is 'H'
new string is " /g/. Testing, testing."
Return value is 'g'
new string is " Testing, testing."
Return value is 'T'
new string is " testing."
Return value is 't'
So you can print the first letter of each word withwhile(str) cout<<firstWhitespaceAfterAlphachar(&str);
>>54229147
Yes, it's not good for beginners
C Programming: A Modern Approach is top notch
>>54229147
Yes. It's very dense. It is a guide to the C language for people who are already programmers.
If you're a newb, learn Python. Then C for fundamentals. Then C# or Java for employment. Then whatever else you want (functional, JavaScript etc.).
K&R is a beautifully example of efficient writing. It's also a gold standard by which book printing should be judged (i.e. extremely high quality paper and printing). But it's not a good intro to general programming.
>>54229194
I'd just like to interject for a moment and recommend C++ for a first language instead.
>>54229177
>you don't know anything
well I do have SOME idea of what I'm doing. I know enough to be aware of user vs kernel cpu time, and that using a spin count is probably only useful for massively multi-threaded apps that are quickly manipulating the same target.
but you're right -- I'm trying out random things, just for fun.
>>54229251
Without any reason?
I can think of quite a few reason that one shouldn't learn C++ first.
>>54229251
>recommend C++
Disgusting
>>54229267
I can think of quite a few reasons that one shouldn't learn Python first.
>>54229251
I'd just like to interject for a moment. What you're referring to C++ is really C with classes, or as I've recently taken to calling it, C plus classes.
Many programmers write in a modified version of the C language everyday, without realizing it.
Through a peculiar turn of events, the version of C which is widely used today is often called “C++”, and many of its users are not aware that it is basically the C language, developed Dennis Ritchie.
>>54229251
LOL, good one.
I actually went to college when C++ was hot. It was ridiculous watching CS101 types being told to just ignore all the magic behind, "cout << "Hello, world" << endl;"
That same college refused to acknowledge my AP exam scores (4/5 and 5/5) because we used Pascal... Until I met with the head of the CS department and he went, "uh, yeah, who cares what language it was in?".
>>54229326
I am recommending it because it touches on all facets of programming, and it determines whether or not you're a good programmer and can think programmatically. What other language does that?
>>54229350
>What other language does that?
Pretty much any of them.
C++ is just a clusterfuck of random features, which somehow are supposed to make the language "better".
>>54229369
To be fair, C++'s random clusterfuck often makes it easier to get work done than simpler languages (C, Pascal).
I still wouldn't learn it as a first language, though.
>>54229283
Me too. I find that there are things that make Python not ideal for learning, but I find that they aren't nearly as bad as C++, a language completely unsuited for beginning programmers.
I personally think learning a Lisp (e.g. Racket) is a great idea, however a lot of people disagree because "the industry!!" So I think that if you have an open mind you can move past some of the inefficiencies of Python. However, C++ is a complete monster of a language, with numerous features all suited for experienced programmers who are trying to write efficient code (e.g., NOT A BEGINNER). I say this from the perspective of someone who writes a lot of C++ code and actually enjoys it.
I think that implicit behavior is the worst thing a programming language can offer to beginning students. C++ is ripe with implicit behavior in nearly every feature it has built upon C.
>>54229350
>I am recommending it because it touches on all facets of programming
You have to be kidding. C++ offers nothing.
* Shitty OOP
* Shitty fundamentals in modern C++
* Shitty everything
Like I said before, Python, then C, then C#/Java, then others.
C++ just demonstrates that you can wrangle a ridiculous language with ungodly foot-shooting potential. I lived through the template-heavy curiously-recurring-template-pattern Win32 programming years. Never again.
>>54229369
And python isn't? In fact that's literally what Python is, a clusterfuck of random features.
>>54229409
I'm not advocating memesnake though.
>>54229394
>C++'s random clusterfuck often makes it easier to get work done than simpler languages (C, Pascal).
Huh? You spend more time writing boilerplate bullshit than you do actually solving problems.
Not to mention the ridiculous verbosity that you hit as soon as you start using STL and actual modern C++. People criticized Java for being so verbose, meanwhile I'm over here writing std::map<ID_NUMBER, std::list<TRANSACTION_RECORD> transactions;" looking bullshit all the time.
>>54229422
ah so that's why it's the chosen language of most competitive programmers?
Has anybody here actually read SCIP?
Do you recommend it?
How should I follow it?
I know Python and Javascript, but Scheme looks quite weird desu.
is it okay if i use nested for loops?
max im gonna need is 3
Jesus, this Trump markov chain is genius.i order thousands of you im very good.
i cant be allowed to tell me oh well.
>>54229434
>ah so that's why it's the chosen language of most competitive programmers?
>competitive programmers
>competitive
>>54229455
https://www.quora.com/What-is-the-best-language-for-Competitive-Programming
>>54229422
That's the price you pay for templates and nice data structures being part of the standard. You don't get map OR list in C.
>>54229451
Why wouldn't it be ok? Nest away!
>>54229434
>it's the chosen language of most competitive programmers?
LOLWUT.
>https://www.quora.com/What-is-the-best-language-for-Competitive-Programming
So... You're basing your recommendation on what is the best for contrived *competitions*? Am I understanding you correctly?
You're not looking at suitability to learning. You're not looking at suitability to industry. You're not looking at efficiency at various program sizes. You're literally basing your recommendation entirely on what you think is a good language for academic programming competitions? And ultimately on a single Quora answer?
>>54228931
>what industry needs the most programmers
The one I'm currently working in.
>>54229422
I'm not going to say that C++ ISN'T verbose, but what can help is if you:
>use 'auto' as often as possible
>redeclare types with the 'using' syntax to make things shorter and more clear
>specifically, I declare nearly all of my std::shared_ptr<>/std::unique_ptr<>'s with 'using' (DESU i wish those fucking smart pointers weren't so goddamn verbose)
>put things in a struct to be even more precise on what is going on
>>54229451
Don't listen to the conformists who tell you to over-refactor.
If it's clear what your code is doing in all of those loops, then do it. Make sure it's not likefor (int i = 0; i < s.length; ++i) {
int k = 0;
for (int c = 0; c < i + k; c++) {
for (int j = i; j < s.length; j++) {
if (s[i] == s[j] + c)
k = 1;
else
j--, c++;
}
}
}
>>54229507
No, I was answering your rebuttal retard. You said you spend most of the time on boilerplate. If that was true then why would competitive programmers use it?
>>54229480
>That's the price you pay for templates and nice data structures being part of the standard.
No, that's the price you pay for a shitty parsing system and a standards committee that moves at a glacial pace.
C++ would have been much more tolerable if the auto type keyword had existed 15 years ago, but it didn't. And ranged for loops. Instead, we had mind-numbingly repetitive code in which substantial bugs could easily hide.
>You don't get map OR list in C.
Which is why you use Java and C# for real work.
C++ is C that tried to be better for larger projects. It became a nightmare. C# and Java are far superior for large projects, and C is superior for small, tight projects.
>>54229535
>Which is why you use Java and C# for real work.
You should prefer memes like D, Go, and Nim for real work.
>>54229544
>nim
>real work
excuse me?
>>54229520
> >>use 'auto' as often as possible
Uh, fucking NO. auto is for very specific circumstances. It should only be used when the return type can be easily inferred from the following code.
>>redeclare types with the 'using' syntax to make things shorter and more clear
Ah, yes, more overloading of existing keywords because the retarded committee favors unreadable code over ever possibly breaking anyone's compile, ever, by introducing a new keyword.
>>54229552
You objected to Nim from that list?
>>54229544
No, as I've said repeatedly, C# and Java.
D will never be a thing. Go might be in 25 years, when people are trying to maintain shit written by current startup hipsters.
C and Java will be here for eternity.
>>54229570
Not saying I agree with the C++ committee, just tryna help you.
>>54229574
I was going to say D but I know that mentioning that language gets dpt riled up. However I'm willing to admit that some "real work" actually gets done in Go, even if I personally don't like the language.
>>54229580
>C and Java will be here for eternity.
Don't remind me. :(
I've been using this for a while to encode strings to URL for a while in bash, but I recently had an issue with a special character "" causing it to error, any ideas?rawurlencode() {
local string="${1}"
local strlen=${#string}
local encoded=""
local pos c o
for (( pos=0 ; pos<strlen ; pos++ )); do
c=${string:$pos:1}
case "$c" in
[-_.~a-zA-Z0-9] ) o="${c}" ;;
* ) printf -v o '%%%02x' "'$c"
esac
encoded+="${o}"
done
echo "${encoded}" # You can either set a return variable (FASTER)
REPLY="${encoded}" #+or echo the result (EASIER)... or both... :p
}
Made a bot doe the SEC
How long before my door gets kicked in?
>>54229645
Okay, so 4chan refused to send it but its the unicode character for a star
>>54225619
In your opinion, in any programming language of your choice, what's the "most correct" way of writing:
>if logged in and the correct user, [do a thing]
>>54229580
>C and Java will be here for eternity
C: yes.
Java: no. There will come a point when the maintainers will get so tired of exception stack traces they're just rewrite entire codebases (or wrap them in such a way that they don't need internal changes) to not have to deal with it any more.
C on the other hand really is here forever. People always complain that C is unsafe, but even if that is true, things are nowhere near as bad as they are going to become.
Just imagine what's going to happen when everything is handed over to the kids who only learned python in college, and picked up C later as an afterthought. That is when shit is really going to get ugly.
>>54229703
I can't wait, because everyone I know in college have no idea what they're doing. More job security for me.
>>54229645
>>54229670
Nevermind I found another way around
>>54229690
syscalls
>>54229703
C, by itself, is fairly straightforward. There are some pitfalls that need to be committed to memory, but it's not that bad.
The real problem is going to be with all the absurd 'idioms' and techniques which will have contended with.
>>54225619
How do I change this sorting algorithm so that it sorts this array alphabetically by the names of the students? This is what I have so far.
intput:string marks[10][9] = {{ "Catherine", "50", "60", "70", "80", "90", "350", "70", "C"},
{ "Jane", "51", "61", "71", "81", "91", "355", "71", "C+"},
{ "Ian", "52", "62", "72", "82", "92", "360", "72", "C+"},
{ "Henry", "53", "63", "73", "83", "93", "365", "73", "C+"},
{ "George", "54", "64", "74", "84", "94", "370", "74", "C+"},
{ "Fred", "55", "65", "75", "85", "95", "375", "75", "C+"},
{ "Emily", "56", "66", "76", "86", "96", "380", "76", "C+"},
{ "Diane", "57", "67", "77", "87", "97", "385", "77", "C+"},
{ "Brenda", "58", "68", "78", "88", "98", "390", "78", "C+"},
{ "Amy", "59", "69", "79", "89", "99", "395", "79", "C+"}
};
sorting code:qsort(marks, 10, sizeof(*marks),
[](const void *arg1, const void *arg2)->int
{
int const *lhs = static_cast<int const*>(arg1);
int const *rhs = static_cast<int const*>(arg2);
return (lhs[0] < rhs[0]) ? -1
: ((rhs[0] < lhs[0]) ? 1
: (lhs[1] < rhs[1] ? -1
: ((rhs[1] < lhs[1] ? 1 : 0))));
});
output:Displaying marks alphabetically by name:
Henry 53 63 73 83 93 365 73 C+
George 54 64 74 84 94 370 74 C+
Fred 55 65 75 85 95 375 75 C+
Emily 56 66 76 86 96 380 76 C+
Diane 57 67 77 87 97 385 77 C+
Brenda 58 68 78 88 98 390 78 C+
Jane 51 61 71 81 91 355 71 C+
Ian 52 62 72 82 92 360 72 C+
Catherine 50 60 70 80 90 350 70 C
Amy 59 69 79 89 99 395 79 C+
It's sorting them, but it's using more than just the first letter of the first element so the output isn't alphabetical.
>>54230021
Make a lexicographical compare functionint compare_string (const string& a, const string& b) {
for (size_t i = 0; ; ++i) {
if (i >= a.length() && i >= b.length())
return 0;
if (i >= a.length())
return -1;
if (i >= b.length())
return 1;
if (a[i] < b[i])
return -1;
if (a[i] > b[i])
return 1;
}
}
In C, if I need to wanna keep track of short time durations, is there a way to trim the excess and fit a 4 byte clock_t into a 1 byte char?
I just need to track a few second durations between events.
>>54230107
Shit, it's not .length() but you get the gist
>>54230021
I may be mistaken, but it seems like you're casting to ints, which are 4 or 8 bytes. Chars are just a single byte each. If you cast to char, it should work.
>>54230130
I changed all the ints to chars and got an error.||=== Build: Debug in Module 4 Question 1 (compiler: GNU GCC Compiler) ===|
Module4Question1.cpp||In function 'int main()':|
Module4Question1.cpp|40|error: invalid user-defined conversion from 'main()::<lambda(const void*, const void*)>' to 'int (*)(const void*, const void*)' [-fpermissive]|
Module4Question1.cpp|32|note: candidate is: main()::<lambda(const void*, const void*)>::operator char (*)(const void*, const void*)() const <near match>|
Module4Question1.cpp|32|note: no known conversion from 'char (*)(const void*, const void*)' to 'int (*)(const void*, const void*)'|
||=== Build failed: 1 error(s), 0 warning(s) (0 minute(s), 0 second(s)) ===|
Was I only supposed to change the -> part?
>>54230228
The -> part was supposed to be left alone...
Do you know what you're doing?
The lambda you pass in compares the two strings, returning and 'int' to tell the sorting algo which string comes first. negative nums means the lhs comes first, positive means rhs and 0 means they are identical strings.
Try this?qsort(marks, 10, sizeof(*marks),
[](const void *arg1, const void *arg2)->int
{
char const *lhs = static_cast<char const*>(arg1);
char const *rhs = static_cast<char const*>(arg2);
return (lhs[0] < rhs[0]) ? -1
: ((rhs[0] < lhs[0]) ? 1
: (lhs[1] < rhs[1] ? -1
: ((rhs[1] < lhs[1] ? 1 : 0))));
});
>>54230265
I have no idea what I'm doing. C++ is like alienese to me.
>>54230109
If that byte isn't wedged inbetween other bytes, it probably isn't worth it. Even then, it probably isn't worth it.
Most architectures do a thing called "alignment" where they keep all of your data fixed to 4-byte segments; it actually helps performance. So e.g. in a function like:int foo () {
char x = 'a';
}
the 'x' variable is actually going to be receiving an entire word (4 bytes) of space on the stack, in order to preserve alignment.
Coercing the time duration into a single byte is going to cause you hell when you have overflow errors.
>>54230293
That gives this output.Displaying marks alphabetically by name:
Ian 52 62 72 82 92 360 72 C+
Amy 59 69 79 89 99 395 79 C+
Catherine 50 60 70 80 90 350 70 C
Henry 53 63 73 83 93 365 73 C+
George 54 64 74 84 94 370 74 C+
Jane 51 61 71 81 91 355 71 C+
Fred 55 65 75 85 95 375 75 C+
Emily 56 66 76 86 96 380 76 C+
Diane 57 67 77 87 97 385 77 C+
Brenda 58 68 78 88 98 390 78 C+
Not alphabetical.
>>54230301
>If that byte isn't wedged inbetween other bytes
It is, it'll be a huge char array which is why I wanna keep it small because I'm doing CUDA and I only have 4gigs.
>>54230335
Oh, sorry, I didn't notice before you were using a C++ string.
Tryqsort(marks, 10, sizeof(*marks),
[](const void *arg1, const void *arg2)->int
{
string const *lhs = static_cast<string const*>(arg1);
string const *rhs = static_cast<string const*>(arg2);
return (lhs[0] < rhs[0]) ? -1
: ((rhs[0] < lhs[0]) ? 1
: (lhs[1] < rhs[1] ? -1
: ((rhs[1] < lhs[1] ? 1 : 0))));
});
>>54230293
Ew. FUCKING EW. C should have never been invented. Fuck this language.
>>54230433
That's it. The instructions say to use an array of characters, which is retarded, because they are strings.Displaying marks alphabetically by name:
Amy 59 69 79 89 99 395 79 C+
Brenda 58 68 78 88 98 390 78 C+
Catherine 50 60 70 80 90 350 70 C
Diane 57 67 77 87 97 385 77 C+
Emily 56 66 76 86 96 380 76 C+
Fred 55 65 75 85 95 375 75 C+
George 54 64 74 84 94 370 74 C+
Henry 53 63 73 83 93 365 73 C+
Ian 52 62 72 82 92 360 72 C+
Jane 51 61 71 81 91 355 71 C+
Process returned 0 (0x0) execution time : 0.023 s
Press any key to continue.
Thanks guys. I was really stuck on that.
>>54230505
Uh... maybe I'm misunderstanding you, but if the instructions for your assignment say to use a char array (the standard way of representing strings pre-C++,) then you should probably use them, rather than strings.
>>54230542
Why would you use a character array to store names in C++?
>>54230596
He's using C
>>54230632
I'm >>54230021 and I'm using C++.
>>54230440
It's simpler than a string. Technically, it uses slightly less memory.
I use them in my C++ programming because I prefer to use a C-like subset of C++ features, and I enjoy working with them more.
There's something satisfying about working with a simple, raw array of ascii bytes.
char names[3][MAX_NAME_LENGTH]={"Amy", "Brenda", "Emily"}; is hardly a strange way to do it.
>>54225619
Homeworkboy back for more answers. Anyone care to help me with this one? I am just going to Bing it anyway. I have to make the answer at least 250 words, which sucks.
>Q2. What are the advantages of using arrays? How static arrays and dynamic arrays differ? State one real life example where static arrays may be used.
>>54230662
That's easier thanstd::vector<std::string> names = {"Amy", "Brenda", "Emily"};
?
>>54228142
>needing a logging framework
Your generic stdlib logger is fine for 99% of cases.
>>54230754
Easier? Neither option presents any difficulty, really.
It is simpler, however. And it could have better performance characteristics.
In fact in your example, you are using a dynamically sized object (string) inside another dynamically sized object (vector), when a much simpler fixed-size char array will suit your requirements perfectly.
The differences won't matter for a simple homework assignment, but if you were instructed to use char arrays (a perfectly reasonable decision, and in some ways, a superior one,) then you probably should.
>>54230662
>char names[3][MAX_NAME_LENGTH]={"Amy", "Brenda", "Emily"}; is hardly a strange way to do it.
That uses unnecessary memory.
In C++ where the hell should you put your constants? Should they be in the cpp or the header?
>>54226904
You can make desktop apps with Python, but they'll require a Python interpreter to run, the same way Java requires a Java VM, plus, your code won't be a fucking eyesore
>>54230932
I think you can put them in either. I just put them in the cpp file usually.
>>54230968
There are tools that convert python code to binary so the user doesn't need an interpreter.
>>54230890
That's true. However, std::strings have more memory overhead.std::string sNames[2] = {"Amy", "Brenda"};
char charNames[2][16] = {"Amy", "Brenda"};
cout<<"Strings: "<<sizeof(sNames)<<"\n";
cout<<"Chars: "<<sizeof(charNames)<<"\n";
Strings: 64
Chars: 32
So for this application, using my fixed-size array will be half the memory of the std::string method.
>>54229194
>k&r meme c
>code is half a century old from a much more simplistic time
>standard for 2016
kek
>>54230932
Compile time constants (using constexpr or #define) can be put in either the source file or header file, depending on where they are needed.
Constants that use const should not be placed in the header unless given explicit external linkage, as they are default static. Otherwise you're duplicating data in the generated binary.
>>54231018
Yeah but you're using MAX_NAME_LENGTH (which isn't portable btw)
>>54231101
That's intended as a user-defined constant. In this case, I'm setting it to equal 16. We can even bump it up to a generous 32 and still be as good as the std::string in memory usage, and with the benefit of a much simpler, easy-to-debug data structure.
It's true that this is less general than using resizable strings, but if we have prior knowledge of the dataset, it's not unreasonable to use such a constant, especially when performance is a consideration.
>>54231134
Okay I see. I agree but in most cases where I'm not obsessing over shaving off bytes I'm gonna use string because of the useful member functions it provides.
I wanted to be able to download from Bandcamp without paying, so I wrote a shitty program to do it for me.https://github.com/ltnublet/BandcampDownloader1/blob/master/BandcampDownloader/Program.cs
It's so bad that I don't even know why I'm posting it, but it works so I don't care enough to do it properly.
>>54231018
Bear in mind that you're not even seeing all of the memory used by the std::string. You're seeing 32 bytes per string, but that's only the stack memory, which should contain a pointer, a length field, a capacity field, and something else. Then you've got some heap memory for the string, probably 8 bytes for each of those strings, plus another 8 bytes to tell how long the heap allocation is. So in reality, target than using 64 bytes for 2 strings, it's more like 96.
But what you sacrifice in memory usage you gain in convenience.
>>54231272
Ah, good point. I wasn't sure whether small std::strings used heap memory - I thought I recalled some kind of clever overloading of stack data for small strings.
>>54231264
What kind of bitrate are you getting?
Do any of you guys do freelancing? Is it retarded?
>>54231349
The essential question that will determine whether his script is moderately useful, or trash.
>>54231349
128, it parses the album page to find the paths to the mp3s for their web player thing. I'm assuming that the path isn't the same for the load balancer for stuff like flac (I tried naively changing the encoding flag from mp3-128 to flac, but it gives an error about how the download failed).
>>54231406
>128
I'm no music snob, but even I have a hard minimum of 192.
>>54231416
Such is the price of free
>>54231325
That would be one way of implementing them. But having to constantly check with every method whether the bytes are heap out stack allocated would introduce some serious runtime overhead. In general, I'd say speed > space.
>>54231425
It seems like the quality is based on a token. Changing the enc parameter returns a server error
>>54231556
I noticed that too, but those poppler links seem like they're some sort of load balancer, and they don't play well with changed the encoding flag (which is probably intentional, I'm sure that I'm not the first person to try to download the sonds without paying).
>>54231093
Thanks for the info m8, appreciate it.
>>54231416
It's about the point where psychoacoustic measure start to show. It's not too bad though.
new satan >>54231666
Why are all Java jobs web dev?
Seriously, why? Why isn't it used for anything else?
>>54231692
Who in their right mind would use it for anything else?
>>54228759
I actually think this is quite beautiful. It's not really tuned for human beings though. If everyone had to program like this we would probably not even have compilers yet.
>>54231796
but if we did they would've had very few bugs!
>>54228871
I didn't learn that until recently. Now I use structs with member functions all the time.
>>54231949
Me neither. I was quite surprised.