What are you working on, /g/?
>Previous thread
>>52063885
First for OSGTP is mentally diseased.
>>52066446while(1) {
printf("Please don't use an anime image next times!\n");
}
DAILY PROGRAMMING THREAD CHALLENGE:
MEME SWASTIKA
Get to work, /dpt/.
>>52066446
Thanks for using an anime image
>>52066446
Thank you for keeping up with tradition and using an anime image.
>>52066493
If this is wrong, then I don't want to be right.
>>52066541
"Since the dawn of history the Negro has owned the continent of Africa – rich beyond the dream of poet’s fancy, crunching acres of diamonds beneath his bare black feet and yet he never picked one up from the dust until a white man showed to him its glittering light.
His land swarmed with powerful and docile animals, yet he never dreamed a harness, cart, or sled.
A hunter by necessity, he never made an axe, spear, or arrowhead worth preserving beyond the moment of its use. He lived as an ox, content to graze for an hour.
In a land of stone and timber he never sawed a foot of lumber, carved a block, or built a house save of broken sticks and mud.
With league on league of ocean strand and miles of inland seas, for four thousand years he watched their surface ripple under the wind, heard the thunder of the surf on his beach, the howl of the storm over his head, gazed on the dim blue horizon calling him to worlds that lie beyond, and yet he never dreamed a sail.”
— Charles Darwin
>>52066446
Thank you for not posting a trap thread.
>>52066506
What would be the best way to do this?E EMEM
E M
M E
EMEMEME
E M
M E
MEME M
>/dpt/ still can't draw a golden memeMEMEMEMEMEME
MEME MEM
EME EME
MEM M
ME EM
ME MEME EME
E EME MEM
M MEME
>>52066608
That doesn't change anything, for me. It only makes me wistful that the African dream is over.
>>52066722
Enjoy jerking off to the worst human race.
Is that the KKK HQ?
What's the point of learning languages like Rust if there's no job market for them?
Reminder that OCaml is the best language, plebeians!
>>52066608
diamonds are overrated
>>52066740
>Enjoy jerking off to the worst human race.
It's great. I love it.
>>52066750
so you can pretend with your pals on github that you're not a worthless mutilated freak
>>52066789
I bet you do burger boy. Make your parents proud.
moot should've been permabanning tripshitters from the day 1.
>>52066870
2bh trips should be salted by the thread ID so that triphomos can't actually tripgay all over the place. There will still be tirpfaggotry but it would be subverted.
>>52066894
People are always wanting to restrict features. I hate this.
We don't have visible sage anymore, we don't have email field anymore, we don't have anything anymore.
>>52066894
tripfags don't belong here. i'm yet to see a single decent tripfag and i've been here for a loooong time.
mind you, trips shouldn't be just turned off, instead people that attempt to use a trip should be instantly permabanned- as a way of sanitizing the board. you know, the way of /fur/
>>52066930
>We don't have visible sage anymore, we don't have email field anymore, we don't have anything anymore.
well yes, i miss noko too and those are shit changes. visible sage is much needed as right now 4chan basically caters to various faggotries blooming like mold.
>>52066930
There was no point in the email field as we can use the comment field to write the email. Getting rid of it freed up a non-negligible amount of resources every year.
>>52066657
here's what i came up with#!/usr/bin/octave -qf
if (size(argv())(1) < 1)
printf("Usage: swastika STRING\n");
return;
endif
function [ y ] = swastika ( x )
x = int8(x);
xx = [fliplr(x) x(2:end)];
len = length(xx);
vert = [zeros(len / 2, len); xx; zeros(len / 2, len)];
horiz = vert';
bottom = [zeros(len - 1, len); x, zeros(1, length(x) - 1)];
left = rot90(bottom);
top = rot90(left);
right = rot90(top);
sides = bottom + left + top + right;
y = char(max(32, max(sides, max(vert, horiz))));
endfunction
disp(swastika(argv(){1}));
>>52066947
I think we should all sport a trip. It would make /dpt/ more fun.
>>52066992
Only because everything is logged for the sake of delivering the data to the NSA. If that weren't the case, it wouldn't matter, but the email field was useful since it could be used for various shenenigans.
>>52067012
I agree
This is meant to reverse the words on each line of a file but it doesn't quite work#include<stdio.h>
int main(int argc, char * argv[])
{
FILE *file = fopen(argv[1],"r");
char line[1024];
while(fgets(line,1024,file))
{
int i = 0; int j = 0; int k = 0;
char words[100][100];
while(line[k])
{
if(line[k]!=' ')
{
words[i][j] = line[k];
j++;
}
else
{
i++;
j=0;
}
k++;
}
while(i>=0)
{
printf("%s ",words[i]);
i--;
}
printf("\n");
}
}
Why doesn't someone try to "fork" C++ and remove/improve the legacy nonsense(different symbol for the pointer compound type and the dereferencing operator, prettier pointer to function syntax, etc.)?
>>52067016
Is the comment field not good for those shenanigans?
>>52067039
Boost is used to improve the existing code base.
Friends it's the anon making a shit 4chan browser in terminal.
I'm going to make a little window that will stay on top and to the side of the terminal window to show images for each thread and reply.
I suppose I'm best to do this with pyqt4?
>>52067029
decompose your shit
write a "getline" function
write a "strreverse" function
test incrementally
>>52067039
Nobody cares enough to do exactly that. I'd personally look at something else like Lisp or Python. If you want something closer to C, I'd look at D, Java or Objective C.
>>52067074
I just want a sane but close-to-C language without GC.
>>52067049
Not even close. How do you pretend to sage and actually write sega in the email field?
>>52067039
That's pretty much what D is about.
But anyway, shit paradigm, use OCaml instead.
>>52066994
slight touch-uparm = [zeros(len - 1, len); x, zeros(1, length(x) - 1)];
arms = arm + rot90(arm) + rot90(arm, 2) + rot90(arm, 3);
y = char(max(32, max(arms, max(vert, horiz))));
>>52067101
Isn't D meant to be a C++ replacement?
>>52067109
Show us some example outputs senpai.
>>52067085
>pretend to sage
>writes sega so that people can see
You are the cancer that was killing 4chan.
>>52067118
pic in case the formatting is fucked$ swastika "SURE THING BUDDY"
S YDDUB GNIHT ERUS
U D
R D
E U
B
T
H G
I N
N I
G H
T
B
U E
D R
D U
YDDUB GNIHT ERUSURE THING BUDDY
U D
R D
E U
B
T
H G
I N
N I
G H
T
B
U E
D R
D U
SURE THING BUDDY S
>>52066947
Trips have a use, though. Not the way tripfags abuse them here, but still.
Tripcodes exist to be used as a temporary ID to be recognizable in a large discussion if/when it's relevant. When a discussion is done you throw your trip away.
Automatically permabanning all tripcodes would be retarded.
>>52066894
This to be honest family
>>52067138
Now rotate it 45 degrees and make a circle around it.
alright /g/ back on topic.
what's the best bits n bites?
it's obviously cheese bit cracker or toasted o.
>>52067113
Yeah, it's literally meant to be C++ without the C compatibility.
>>52067166
but then it would become a symbol of hate and oppression!
>>52067227
Sounds like a great combo. Tell me more!
>>52067124
The point is to play the
>he likes X
>SAGE GOES IN ALL FIELD
joke, you fucking inbred. Fucking redditards who've not even been there all summer trying to lecture 4chan users about how to use 4chan.
>>52067236
Did you know that D comes after C in the latin alphabet? It's true!
>>52067234
Oh no !
hello
>>52066499
Instead of checking for a truth condition after every loop, use a conditionless loop. for(;;){...} will run without the exit condition.
>>52066753
Said the hiring managers at Jane Street and LITERALLY NO ONE ELSE EVER
I want to program something that operates on a set of files (i.e. a folder?).
It should delete/move some files based on their filename and possibly their content.
What do I need for this?
Daily reminder that if your language of choice is not on this list you should probably give up and kill yourself:
- C++
- C#
- Lua
- Python
- Elixir
- Haskell
- Bash
- Clojure
- D
>>52067297
Literally any language ever.
you all pet your dogs today, /dog petting thread/?
>>52067333
The only thing I pet is your mums pussy.
Dogs are disgusting.
>>52067297
Use Python, it's probably the easiest language to do that kind of stuff
>>52067353
shitpaw detected, get offline cat, your place is in a box full of your own shit.
>>52067363
Enjoy picking up your dogs feces.
>>52067305
Ya even Javascript, with Node.js, can do this lol
>>52067387
enjoy your house smelling like shit and knowing that every surface in your house has trace amounts of shit and piss on it.
>>52067305
>>52067360
What do I need?
I don't know how I could delete a file from within a program. All I know is how to read and write to one.
>>52067418
Jokes on you, I don't have a pet.
>>52067423
System calls.
>>52067429
me neither :(
>>52067440
H-hold me anon ;_;
>>52067302
>- Lua
>- Elixir
>- Haskell
>- Clojure
>- D
>>52067466
No way, that's gay you fucking faggot.
Ask your beloved programming literate anything.
>>52065753
Kawa has a nice support for explicit typing.
for example,(define (f x y) (+ x y))compiles to
Method name:"f" public static Signature: (java.lang.Object,java.lang.Object)java.lang.Object
Attribute "Code", length:61, max_stack:3, max_locals:2, code_length:9
0: getstatic <Field gnu.kawa.functions.AddOp.$Pl gnu.kawa.functions.AddOp>
3: aload_0
4: aload_1
5: invokevirtual <Method gnu.mapping.Procedure.apply2 (java.lang.Object,java.lang.Object)java.lang.Object>
8: areturn
Attribute "LineNumberTable", length:6, count: 1
line: 6 at pc: 0
Attribute "LocalVariableTable", length:22, count: 2
slot#0: name: x, type: java.lang.Object (pc: 0 length: 8)
slot#1: name: y, type: java.lang.Object (pc: 0 length: 8)
while(define (f x::int y::int) (+ x y))compiles toMethod name:"f" public static Signature: (int,int)int
Attribute "Code", length:56, max_stack:2, max_locals:2, code_length:4
0: iload_0
1: iload_1
2: iadd
3: ireturn
Attribute "LineNumberTable", length:6, count: 1
line: 17 at pc: 0
Attribute "LocalVariableTable", length:22, count: 2
slot#0: name: x, type: int (pc: 0 length: 3)
slot#1: name: y, type: int (pc: 0 length: 3)
>>52067302
>no Ruby
naw
>>52066753
go away Dan
>>52067502
Lua is widely used as the scripting language for games since it's really fast and easy to embed. You're right about the rest though.
>>52067502
how can that guy be a real person
>>52067531
yeah, I know but it's very niche and his post did mention using it as your "primary language".
>>52067138
python implementation lads
>>52067166
i have intuited an algorithm but i'm too lazy to translate it into code
>>52067523
Well that's pretty fucking shit then, innit? It doesn't correctly infer that x and y are ints (or a generic Number class).
Reminder not to write the word "reported" in any post, because janitors will ban you for it even if you don't actually submit a report.
>>52067671
you just did
enjoy ur ban ;^)
Fuck, having done F# I can't be bothered to do my C++ assignment.
>>52067671
or saged or ignored or christmas
>>52067657
>It doesn't correctly infer that x and y are ints (or a generic Number class).
no shit sherlock, there nothing to infer since it's resolved in the dynamic environment, but the jvm's JIT compiler could fix that at run time.
>>52067630
Looks like simple bresenham circle's algorithm to draw the circle using a diameter of length - (word's length - the 3 interlapping points + 4 to keep it around the swastika) or a diameter of word's length+1. The swastika bit should be easy.
I reckon rather than printing it line by line (which might be somewhat possible). It might be easier to just store it all in an array before printing it as you'd have to calculate for both shapes at the same time
GDB actually works bretty gud with Go. Didn't expect that.
>>52067081
I just use C.
>>52067227
and with GC
top kek
>>52067302
>java not on the list
>clojure, D, elixir
>implying you can get employed with haskell
>>52067705
>what is function +
Meanwhile any decent language can perform the inference, thus kawa's type system is absolute dogshit.
>>52067817
Modern C++ uses GC or reference counting. GC is much faster than reference counting, hence D is better in that regard. Moreover, the GC can be removed temporarily when it matters.
>>52067838
>Modern C++ uses GC
OHOHOHOHOHO
>>52067838
>Reference counting
>Slow
Only if you use the C++ std::shared_ptr because it uses atomic operatons and memory barriers to be thread safe. A non-thread-safe reference counting will be faster than GC any day.
>>52067855
>>>/tumblr/
>>52067860
Top fucking kek.
>there are people who actually believe this
Even shitty GCs like boehmgc are significantly faster than reference counting.
>>52067826
you missed the point, if you ask to disassemble(define (f x y) (+ x y )), the compiler could only give you a generic version because you haven't provided any arguments (= nothing to infer). compiler infers when a function evaluation is made, like in(define (f x y) (+ x y))
(f 4 5) ; arguments type is know, can infer this
that's basic stuffs.
>>52066499
will it halt?
>>52067888
Just because you're inbred doesn't mean reality needs to become as retarded as you are.let fn x y = x + y;;
-| val fn : int -> int -> int = <fun>
>>52067882
>Giving up deterministic destruction for either multi-threading or arbitrary global blocks when the GC triggers.
Those who would give up essential Liberty, to purchase a little temporary Safety, deserve neither Liberty nor Safety
>>52067923
I laff'd, but see polyml, multimlton, F#, hasklel, etc.
>>52067967
Makes sense for those languages that were designed for GC, but not C++.
>>52067923
I think that quote would work better with the words reversed.
>Those who would give up essential Saftey, to purchase a little temporary Liberty, deserve neither Liberty nor Safety
>>52067888
Type inference should easily be able to infer a type for a generic/polymorphic function.
For example, in Haskell, the functionplus x y = x + y
is easily inferred to have the typeplus :: Num a => a -> a -> a
>>52067967
None of a functional language's safety comes from its GC. With a sufficiently strong type system, a language can be safer (I'm talking compiles? => correct) than all of those languages without any need for garbage collection.
>>52068083
Sure, if you don't mind losing cyclic data-structures.
>>52067910
nice try but + is a typed operator in ocaml while in lisp + is just a procedure like any other ones.
>>52068118
Your stupidity is mind-numbing.
>>52067819
>implying language of choice is or should be your language of employment
Java is only a language of employment. Nobody informed about anything would choose to use it for personal projects
>>52068097
With sized types, you can retain them, you just won't be able to recurse over them directly (which, of course, is how you keep safety).
>>52068118
Why can't it have a type?
>>52067166
MEMEMEMEMEMEMEM
EMEME EMEME
EMEM MEME
MEM ER MEM
ME ITL EM
EME ILH EME
M EHE E M
ME IL LIHEI EM
ME HI IH LHI EM
E TL LT TLE E
M ERE R M
E REL LE EL E
ME TIH IT TI EM
ME LIE LH HL EM
M HEI IE M
EME IEH EME
ME IHL EM
MEM ELT MEM
EMEM R MEME
EMEME EMEME
MEMEMEMEMEMEMEM
>>52068156
It's beautiful anon
Truly 10/10
>>52068156
14/88 needs a border
>>52068156
didn't get the corner H right
MEMEMEMEMEMEMEM
EMEME EMEME
EMEM MEME
MEM R MEM
ME TLE EM
EME LHI EME
M HEI H M
ME EI IEEIL EM
ME LH HL HIT EM
E IT TI LER E
M LRL M
E RE TL LT E
ME LTI HI IH EM
ME HLI IL LI EM
M EHE EH M
EME LIE EME
ME TIH EM
MEM REL MEM
EMEM MEME
EMEME EMEME
MEMEMEMEMEMEMEM
>>52068190
sure thing, hang on. what do you want the text to say? it can't have spaces yet
>>52068156
god fucking damnit, I'm jealous
now put a flag around it
>>52068156
c-can i get source?
>>52068150
in scheme, you are free to redefine + and the default one accepts all kind of objects (integers, reals (float), ...). in ocaml, + is reserved to integers while +. is reserved to reals. No question that the compiler inferslet fn x y = x + y;;because of the operator +, x and y must be integers in any case.
>>52068208
wait now it says HITLR at the center damnit
>>52068229
>free to redefine +
That's not a problem, you'd just have to redeclare its type at the same time.
>the default one accepts all kind of objects (integers, reals (float), ...)
That's what the Num type class in Haskell is for.
>>52068147
So you are telling me you can't do personal projects for Android.
So, is /dpt/ hyped for Perl6?
>>52068266
Isn't it already dead? I know I tried it out at some point and found that there were some nice things, but seriously, how could you pile up that much non-sense? Is anyone ever gonna make a quality implementation for such a mess?
>>52068264
Java is not required for Android development, you can write apps in C++ just fine.
>>52068264
Many languages support java, including the vastly superior c#(which will run up to 10 times faster on dalvik devices and the same speed +/- for ART capable devices). That costs money though but almost every respectable language can be used on android devices.
In fact java is one of the worst options for android
swastikas are done
what's next lads? how can we meme further?
>>52068300
the language is too big for there to be a quality implementation :^)
i wouldn't actually think about using it for anything but shell script-y shit
>>52068229
You can also redefine + in ocaml, that doesn't change that the type inference works perfectly fine.let (+) x y = x +. y
let f x y = x + y;;
val ( + ) : float -> float -> float = <fun>
val f : float -> float -> float = <fun>
Stop backpedalling and admit you don't have a single clue and that kawa's inference is dogshit.
By the way, even typed racket can infer this kind of type.
>>52068328
Right the word MEME out of swastikas, which are made of the word HITLER
>>52068365
dear sweet jesus
NIGGERNIGGERNIGGERNIGGERNIGGERNIGGERNIGGERNIGGERNIGGERNIGGERNIGGERNIGGR
E N
G MEMEMEMEMEMEMEM I
G EMEME EMEME G
I EMEM MEME G
N MEM LER MEM E
R ME HIT EM R
E EME EIL EME N
G M HE EHE M I
G ME IL LI ILH EM G
I ME HI IH ITL EM G
N E TL LT ER E E
R M ERE M R
E E LE EL E N
G ME REL IT TI EM I
G ME TIH LH HL EM G
I M LIEEI IE M G
N EME H IEH EME E
R ME IHL EM R
E MEM ELT MEM N
G EMEM R MEME I
G EMEME EMEME G
I MEMEMEMEMEMEMEM G
N E
RGGINREGGINREGGINREGGINREGGINREGGINREGGINREGGINREGGINREGGINREGGINREGGIN
there is some off by one error with the cropping but it werksclass Meme {
public static void main(final String[] args) {
final String textCircle = "MEME";
final String textSwastika = "HEILHITLER";
final String textBorder = "NIGGER";
final int windowSize = 72;
final int cropLeft = 1;
final int cropRight = 0;
final int cropTop = 6;
final int cropBottom = 5;
final int xSize = windowSize;
final int ySize = windowSize / 2;
final char[] strCircle = textCircle.toCharArray();
final char[] strSwastika = textSwastika.toCharArray();
final char[] strBorder = textBorder.toCharArray();
final char[][] arr = new char[ySize][xSize];
final double scale = 21.5;
double theta = 0.0;
int strIdx = 0;
for(int i = 0; i < ySize; ++i) {
for(int j = 0; j < xSize; ++j) {
arr[i][j] = ' ';
}
}
>>52068450double foo = Math.PI / 4;
arr[ySize / 2][xSize / 2] = strSwastika[strSwastika.length - 1];
for(int i = -1; i <= 1; i += 2) {
theta = 0.0;
while(true) {
final int x = (int) (scale * Math.cos(theta));
final int y = (int) (scale * Math.sin(theta)) / 2 * i;
theta += 0.0001;
if(theta > Math.PI) {
break;
}
if(arr[ySize / 2 - y][xSize / 2 + x] != ' ') {
continue;
}
arr[ySize / 2 - y][xSize / 2 + x] = strCircle[strIdx++ % strCircle.length];
}
for(int j = 0; j < 2; ++j) {
double armLength0 = 0.0;
strIdx = strSwastika.length - 1;
while(strIdx != 0) {
final int x = (int) (armLength0 * Math.cos(foo));
final int y = (int) (armLength0 * Math.sin(foo)) / 2;
armLength0 += 0.0001;
if(arr[ySize / 2 - y][xSize / 2 + x] != ' ') {
continue;
}
arr[ySize / 2 - y][xSize / 2 + x] = strSwastika[--strIdx % strSwastika.length];
}
double armLength1 = 0.0;
strIdx = 1;
while(strIdx != strSwastika.length) {
final int x = (int) (armLength0 * Math.cos(foo) + armLength1 * Math.cos(foo - Math.PI / 2));
final int y = (int) (armLength0 * Math.sin(foo) + armLength1 * Math.sin(foo - Math.PI / 2)) / 2;
armLength1 += 0.0001;
if(arr[ySize / 2 - y][xSize / 2 + x] != ' ') {
continue;
}
arr[ySize / 2 - y][xSize / 2 + x] = strSwastika[strIdx++ % strSwastika.length];
}
strIdx = 1;
foo += Math.PI / 2;
}
}
>>52068464strIdx = 0;
for(int x = cropLeft; x < xSize - cropRight; ++x) {
arr[cropTop][x] = strBorder[strIdx++ % strBorder.length];
}
for(int y = cropTop; y < ySize - cropBottom; ++y) {
arr[y][xSize - 1 - cropRight] = strBorder[strIdx++ % strBorder.length];
}
for(int x = xSize - 1 - cropRight; x >= cropLeft; --x) {
arr[ySize - 1 - cropBottom][x] = strBorder[strIdx++ % strBorder.length];
}
for(int y = ySize - 1 - cropBottom; y > cropTop; --y) {
arr[y][cropLeft] = strBorder[strIdx++ % strBorder.length];
}
int top = 0;
int bottom = 0;
for(final char[] line : arr) {
if(top++ < cropTop | bottom++ >= ySize - cropBottom) {
continue;
}
int left = 0;
int right = 0;
for(final char ch : line) {
if(left++ < cropLeft | right++ >= xSize - cropRight) {
continue;
}
System.out.print(ch);
}
System.out.println();
}
}
}
>>52068350
works fine because you are still using a typed operator (+.), that's not a generic function.
contemplating whether it'd hurt or help to show my coworkers an anon's nigger meme heilhitler swastika flag implementation
>>52068479
1/10 if trolling, 1000/10 if retarded.
>>52068621
Is there a decent fast fixed point math library for sepples?
>>52068504
it's you who are retarded. an equivalent of scheme's + in ocaml would be something liketype num = Int of int | Float of float
let add (x : num) (y : num) = x + y
you can't infer that.
>>52068641
gmp
int avg(int a, int b)
{
return b != 0 ? a / 2 + b / 2 + (a % b % 2) : a / 2;
}
>>52068677
[retardation intensifies]
>>52068703
Doesn't have fixed point. Only floating point and numerator/denominator rationals.
>>52068677
http://withouttheloop.com/articles/2014-10-21-fsharp-adhoc-polymorphism/
http://stackoverflow.com/questions/15690053/impredicative-polymorphism-in-f
Is there anything more comfy than settling in with your favourite language, with your favourite beverage, and solving problems using your ingenuity, a bit of math, and some hacks.
I admit, I'm code-monkey tier atm, but I'm perfectly happy just finding the best design principles and making sure my code is readable and maintainable.
>>52068304
You know what JNI is right? If you use C++ you have to expose functions and write a lot of boilerplate. is not just writing C++ like if it were C++/CX.
>>52068926
Skool m8
so much suffering
>>52068321
Runs at about the same speed. Post benchmarks and prove it.
>>52068215
he did it by hand, idiot.
>>52068945
Im in school too. I found a job relating to my field, well into the end of first of year. Definitely saved me, because focusing on pure school work can get tiresome. Need something related, preferably where you can earn some money, to focus your mind on, instead of the same old thing everyday.
>>52068951
>C# and java tun at the same speed
What are value types for $100 please alex.
That alone makes the JVM useless for computation.
reminder that if you're using OCaml without https://github.com/ocamllabs/ocaml-modular-implicits you're not doing it right
>>52068990
OCaml is a meme language?
Who uses it in production?
>>52068988
I don't see your benchmarks. What are you, 12?
>>52068951
http://xamarinandroid.blogspot.ie/2014/08/performance-comparison-between.html
>>52069018
>Needing benchmarks to know that using the stack for small objects is orders of magnitude faster than the heap.
M E M E
E
M
E
>>52069023
> Posts unknown nigger blog with numbers without reference.
What the fuck those numbers mean?
Are you a retard?
>>52069038
What are you afraid of? Why don't you show the reality you are defending?
>>52069038
>using unportable principles instead of benchmarks
>implying there is a stack
>implying there is a heap
>implying the stack is faster
>>52069042
It literally posts the code before it shows the results you fucking retard.
>>52069053
You've already been proven wrong you retard. You were just to busy and retarded calling people retards to read the thing you called retarded. Retard
>>52068926
I know that feel lad. I do support and software engineering (installations, upgrades) for my company since the development department is chock-filled. This holiday, there's been nothing more fun than solving adventofcode, codeeval, hacker.org challenges, etc in my favourite language with some nice bourbon on the rocks or some wine
>>52069000
a ton of people use it for MirageOS which is the most popular unikernel for Xen right now (http://www.xenproject.org/developers/teams/mirage-os.html)
Jane Street uses it for finance shit, Facebook uses it for static analyzers and compilers, INRIA uses it for Coq, etc.
also, check'd
>>52069042
read the other blog posts
they rewrote android in C# (https://github.com/xamarin/XobotOS/) a few years back and then they found that it was a whole order of magnitude faster (https://blog.xamarin.com/android-in-c-sharp/). xamarin compiled apps still run faster (http://magenic.com/Blog/Post/4/Mobile-Development-Platform-Performance) on average and there's a ton more room for improvement when you remember that there's shit like value types, manual memory management, p/invoke, and so on to help you further improve performance
>>52068939
Yes but you don't have to write in Java per se, that's the point.
I'm trying to include my C header file in C++ code, but it's not working out.
I've added theextern "C"thing, I've tried compiling the C code with both gcc and g++ just to test that it actually works, but it still only throws a bunch of "undefined reference to" during compilation.
Any ideas on how to fix it?
>>52069173
not sure if this is the way it works in c++, but did you do extern AND import?
>>52069173
You need to add "-lLIBRARY" to your g++/gcc call. Replace LIBRARY with the name of the library.
>>52069184
That's what I have, not sure what you mean by "import":extern "C"
{
#include "csll.h"
}
>>52069192
It's not a library, it's a local file. Either way, I tried it and it couldn't find anything.
>>52069173
Are the reference errors related to external library or the standard?
>>52069224
Post the linker errors here then.
You are missing a library for sure.
>>52069241
C++ code:extern "C"
{
#include "csll.h"
}
int main()
{
SLList *newl = newlist(0);
return 0;
}
csll.h:...
SLList *newlist(unsigned int data);
...
Output ofg++ -std=c++11 -fpermissive -o test csll.c test.c:/tmp/ccX9BdMH.o: In function `main':
test.cpp:(.text+0xe): undefined reference to `newlist'
collect2: error: ld returned 1 exit status
>>52069132
javadroids: rekt
>>52069311
>-fpermissive
NO. FUCK NO.
Take that out and fix the fucking error it is suppressing. In fact, replace it with -Wall -Wextra.
>>52069328
Dude, not now. I'll take it out when I get through the dumb errors and have at least something that works.
Also, that thing that it's suppressing works fine in C.
>>52069371
You are purposefully telling the compiler "fuck you, compile my shit code that you know is broken" then complaining that your code is broken.
Is anyone willing to look at almost 200 lines of messy C atmega328p code
>>52069311
Why are you passing C files to the C++ compiler.
You probably need extern "C" in your csll.c file too (or compile it with gcc to an object, then use g++ on your c++ files and C objects).
>>52068859
the generic version is inferred when a call is made. the article says// this version works!
let inline twice x = x + x
twice 2.0 |> Console.WriteLine
twice 2 |> Console.WriteLine
Each call to the inline function is replaced by inline code with its own
type inference, thus the compiler effectively converts the above to:
(fun (x:float) -> x + x)(2.0) |> Console.WriteLine
(fun (x:int) -> x + x)(2) |> Console.WriteLine
this is what i have said here >>52067888
>>52069389
It's not broken, it alone compiles fine with g++. It's not the issue, chill out.
>>52069406
Because I wrote C code and now I want to use it in C++ code with minimal changes. Now that I'm thinking about it, kinda dumb to do that. But it's 2AM, what the hell do I know.
>>52069429
thought you were talking about something else
(btw the different examples work in different ways)
>>52069443
Compile your C file into a static C library, and put#ifdef __cplusplus
extern "C" {
#endif
...
#ifdef __cpluspluc
} // extern "C"
#endif
in the header, or scrap all the extern "C" fun and make it compile as valid C++ WITHOUT FPERMISSIVE and do what you were doing.
>>52069389
You blatantly have no idea what you're talking about
This might be a retarded question, but why isn't the stack size much larger on 64bit systems?
>>52069132
Of course Xamarin is going to defend Mono. And say it's 100 times better than Java for Android. Is their product.
Here you have unbiased benchmarks.
http://benchmarksgame.alioth.debian.org/u64q/csharp.html
>>52069652
Not really needed.
Pointer size is doubled, which makes stack frames bigger, but it's incredibly rare the stack size is an issue unless you have unbounded recurstion.
>>52069803
that's on a desktop. the JVM is a lot faster than Dalvik and ART. the reason Android is so laggy is because google thought it would be a good idea to make their own shitty runtime when better ones already existed
>>52069311
> Output of
> g++ -std=c++11 -fpermissive -o test csll.c test.c
You're compiling both files as C due to the ".c" extension.
If a file contains C++ code, it needs to have a .cpp, .cxx, .cc or .c++ extension. Or you need to use "-x c++" (and then all files must be C++).
>>52069905
I changed some names, that file had .cpp.
>>52069825
yeah and they had literally one or two guys working on it... like what the fuck gjewgle
is there a program that will get rid of my post-Christmas hangover?
This might be the wrong place to ask so let me know if it is.
On the left is a book I need for class next semester. On the right is one I got back in 2005 or so. Are there any other good textbooks or resources for C++ that I should take a look at which will help me? The only other languages I know are HTML and PHP for vBulletin boards I ran as a teenager. Thanks.
>>52069990
Write C++ code, that will teach you the most.
How would I go about making a shell script that sets to a default xrandr setting once the vga is plugged in?
>>52069803
Android does not use the oracle JVM. It doesnt even use embeded java. It should, because both of those are insanely faster than dalvik, not sure about art. The oracle JVM, for all it's other faults, is actually miracle of optimization technology thanks to Hotspot
>>52069803
>unbiased
Without looking at the code it seems like java was multithreaded while C# was not.binary-trees
secs KB gz cpu cpu load
C# Mono
24.59 163,812 654 26.21 7% 0% 100% 1%
Java
5.75 354,364 583 8.17 41% 48% 37% 19%
>>52070130
dalvik is already fast enough for mobile apps. when you need high performances, you go native.
>>52069990
Get the 5th edition. A lot has changed since 2005.
>>52070230
actually, the code is mostly the same with no explicit parallelization for both.
>>52070237
>dalvik is already fast enough for mobile apps.
Except it isn't. Android has been having crippling performance issues for years and even in the last few versions they pop up more than the competing platforms. Much of it was due to their shitty VM
>>52070230
>>52070271
implementations with explicit parallelization is even doing worst but java still faster.Java #5 6.20 524,828 926 20.90 87% 91% 82% 80%
C# Mono #3 47.64 718,784 723 81.08 41% 46% 43% 38%
>>52070230
You can look a the code, it's basically identical. I suspect mono just doesnt utilize multicore cpus as well. If it were .net it would likely be a closer result,
So /dpt/, if you're doing something and you see that there's already libraries for doing it - do you use one of them or write it yourself? This is assuming you do know how to do it yourself and you won't gain anything knowledge-wise by writing it yourself
>What are you working on, /g/?
Using codeeval to teach myself python3, if i don't have a task i lose interest immediately.
dont know if this is the best way but its my current method of learning:
>Read challenge
>Concoct general attack plan
>Begin coding
>Hit snag
>Read related python method pages
>Light googling for examples of what I want
>Deconstruct example
>Build my own implementation
>Test 6000 times for syntax errors and poor typing
>Submit code
>>52070412
Write an IRC bot, they introduce you to a lot of different concepts and offer a lot of natural room for expansion if you have trouble thinking of things to do yourself.
>>52070411
There are some tasks where learning a special library is slower than writing it yourself. If the library was to use, bug-free, and had a committed maintainer, I'd use it.
>>52070246
This wouldn't be an issue if he chose a more sane language like C.
The latest edition was published 1989 and is still very relevant.
C99 and C11 can be gleaned from the wikipedia page.
>>52070442
I was thinking of trying to write scripts for HexChat, it has a python library, but it would only be simple shit like a locally maintained ban list that refreshes on channel join.
>>52070412
Please tell me it isn't your first language
>>52070513
>>52070246
I'm interested in learning C as well but this is what I learn next semester. I'll shelve that edition then and look at getting a more recent one (this copy is from 2005). Any other decent resources?
>>52070412
>begin coding
You mean programming
>>52070513
C is also a borderline dead language.
>c
>sane
C is the epitome of bad design choices that people have slowly removed from public knowledge through propaghanda
>>52070582
It's the same thing moron.
>>52070581
Learn C now.
It's a tiny language in comparison.
The standard library and all of it's quirks are small enough to commit to memory.
How big is your C++ primer book?
>>52070608
>C
>Dead
I came here to laugh at you.
>>52070608
That's great senpai, what is your compiler or interpreter for your favorite language written in?
>>52070557
Yes and no, Iv had experience with a bunch of stuff since i started dabbling in school, first language was C. This is the first time im taking learning seriously though.
>>52070582
Is there really a difference or is this just sperging
>>52070582
Programming is by definition a form of coding.
>>52070634
>machine automation has replaced humans in car manufacturing
>HAHA WHO BILLDS THE ROBOS?
>>52070614
The primer is about 800 pages, the required text for class is 900. If C is easy to get into Ill try to learn as much as I can over the next 3 weeks.
>>52070672
it's 200 pages
niggas wanna be me
but for real, just started this, it's fun as hell and challenging enough
I want to get a certificate of mastery of VB.NET!!!!
>>52070672
C fags love to be misleading. C is a small language. It is not an easy language. By the very nature of being small it's tedious and opens up huge areas of potential bugs.
That doesnt mean you shouldn't learn it. It just means keep in mind that when retards say c is easy, what they actually mean is the syntax is easy to memorize, not that using it to produce anything of value is easy. C is a necessary evil, and an excellent way to understand the computer.
>>52070686
heh
If you want to code in C, may as well go full autist and do assembly, it's much more fulfilling and you'll achieve just about as much if you're good enough imo (in my opinion) lad
>>52070758
>i have never written assembler or C before
>>52070767
weirdly enough, I have
>>52070686
there's only 6000 people on codeeval
>>52070784
please just let me have my 5 seconds of fame
>>52070784
default view is ranking from the last 6 months
there's 6000 active users in the last 6 months.
>>52070781
then you would know that C compiled using an optimizing compiler bears very little relation to assembler that you would write by hand
>>52070819
that's still not a lot
NIGGERNIGGERNIGGERNIGGERNIGGERNIGGERNIGGERNIGGERNIGGERNIGGERNIGGERNIGGERNIGGERN
R|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||I
E|||||||||||||||||||||||||||||||MEMEMEMEMEMEMEM|||||||||||||||||||||||||||||||G
G|||||||||||||||||||||||||||EMEME EMEME|||||||||||||||||||||||||||G
G||||||||||||||||||||||||EMEM ER MEME||||||||||||||||||||||||E
I||||||||||||||||||||||MEM TL MEM||||||||||||||||||||||R
N|||||||||||||||||||||ME HI EM|||||||||||||||||||||N
R|||||||||||||||||||EME IL EME|||||||||||||||||||I
E|||||||||||||||||||M HE EH M|||||||||||||||||||G
G||||||||||||||||||ME IL LI IL EM||||||||||||||||||G
G|||||||||||||||||ME HI IH HI EM|||||||||||||||||E
I|||||||||||||||||E TL LT TL E|||||||||||||||||R
N|||||||||||||||||M RE ERE ER M|||||||||||||||||N
R|||||||||||||||||E LT TL LT E|||||||||||||||||I
E|||||||||||||||||ME IH HI IH EM|||||||||||||||||G
G||||||||||||||||||ME LI IL LI EM||||||||||||||||||G
G|||||||||||||||||||M HE EH M|||||||||||||||||||E
I|||||||||||||||||||EME LI EME|||||||||||||||||||R
N|||||||||||||||||||||ME IH EM|||||||||||||||||||||N
R||||||||||||||||||||||MEM LT MEM||||||||||||||||||||||I
E||||||||||||||||||||||||EMEM RE MEME||||||||||||||||||||||||G
G|||||||||||||||||||||||||||EMEME EMEME|||||||||||||||||||||||||||G
G|||||||||||||||||||||||||||||||MEMEMEMEMEMEMEM|||||||||||||||||||||||||||||||E
I|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||R
NREGGINREGGINREGGINREGGINREGGINREGGINREGGINREGGINREGGINREGGINREGGINREGGINREGGIN
http://pastebin.com/Nc5fj4Y2
>>52070832
That has literally nothing to do with why what he said was stupid
>>52070832
Yes I thought it clear that I was talking about the learning opportunities of both
>>52070855
>two of the arms says HILHITLER
well fuck... but i'm done, at least for today
nice meme idea anon
>>52070840
This is the salty response of someone ranked 5000
>>52070886
>muh code rankings
>implying serious programmers use that shit
spent the past 8 hours trying to port the pecl dbase extension to php7, without knowing c before.
Anyone wants to try to help and compile it, and find out why it crashes when you try to call a function? I gave up while trying to install a debug php environment https://github.com/mote0230/dbase-pecl-php7
>>52070911
>muh uncompetitive nature because I'm a pussy-whipped bitch
>>52070911
No, serious programers don't even care about that shit. Your saltiness shows you care, which makes you a shit programmer
>>52070922
>>52070935
>muh "competitive coding"
>thinks he's even slightly good at programming
>doesn't even have a maths degree
>>52070935
https://www.codeeval.com/open_challenges/1/
>fizzbuzz
>failure rate 49%
it's ok anon, some people are just born to copy paste other people's working code
>>52070977
>doesn't even have a maths degree
true, but I was on tv and the guardian for my mathematical achievements when I was 11. I chose computer science instead
>>52071003
>I chose computer science instead
SAD!
>>52071021
I'm much happier with my programming/engineering job than I would be with maths tbhfwyl (to be honestly fair with you lad)
>>52070988
>goes straight into damage control when called out
Of course your an animefag too.
Anyone with VS willing to take a look at what I've got and tell me how bad I am?
I'm trying to improve but having 0 knowledge and no frame of reference means I'm really not sure how bad it really all is.
https://github.com/sirdoombox/Musick
>>52070608
>C is a collection of bad choices
I agree to some extent, but we were talking about C++ which not only kept those bad choices but made several new bad choices
>>52071064
>but made several new bad choices
not this newbie programmer meme
I just reverse-engineered microsoft's paint image stretching algorithm, without looking at the source code for any similar programs.
Do you guys think a little blogpost about it would be interesting? It's not particularly hard, but I found the "intuitive" way to think about it to be misleading.
>>52071088
Compare C++ with D fag
>>52071117
sure
>>52071124
>D
It really is meme hour
>>52071064
It's begun to rectify it at least. C is basically dead developmentally and survives as a language by necessity. C is important but only neets think it's actually 'good'.
>>52071117
Isn't it just some sort of interpolation or w/e?
I'm interested in the reverse engineering part though.
>>52071143
C is the best teaching language though
Are these the official /dpt/ meme languages?
>Go
>D
>Ada
>F#
>>52070513
>This wouldn't be an issue if he chose a more sane language like C.
C isn't sane, it's ancient and there's not much that can be done.
>>52070922
>"competitive" coding
listen you moron. there's no such thing. there's a million different ways to handle any program function and each has its pros and cons. you're just an autistic faggot who's weakling, weasel-like body figure can't handle any real competition like sports and you're too stupid to compete in any math tournaments. kill yourself you pleb
>>52071162
Said no respectable university in the last 30 years.
Those that do each c are using it to teach something else like operating systems or microcontrollers because, as has been said, a lifetime of bad choices lead to c being the only valid systems language for that kind of low level.
>>52071173
>there's no such thing
how delusional
>sports
>math tournaments
yes I'm sure these are the only ways in which people compete, fucking idiot
>>52071173
>being this butthurt
>don't like what i don't like
chillax mane
>>52071200
>being this mad that his only achievement is being in the top 10% of python "programmers" on meemeeval
kekkles
>>52071243
>thinks this is my only achievement
>something I achieved just recently through no effort, looking for something new
kekkerini
>>52071147
>Isn't it just some sort of interpolation or w/e?
It might be. I have 0 experience with numerical analysis, so I can't comment on that. But by what I'm reading on wikipedia, I don't see what they'd be interpolating exactly.
On one hand I'm really proud of this, despite it not being very hard, and want to tell people about it. On the other, I don't want to seem like an idiot who's talking about something really obvious to everyone else.
>>52071285
it is your only achievement. you've made that much clear by how invested you are in defending memeval
How hard is it to program a browser? I mean, using already existing rendering engines such as webkit. Is programming a browser for yourself something feasible?
>>52071372
Yes. Hell with c# you can literally drag and drop a browser view onto a window.
>>52069990
I used the book on the left for my first intro C++ class in community college. It's not that great, it's basically a C book with chapters on C++ features. If that's the book your teacher picked out then you should probably go into the class with skepticism.
>>52067302
C not on the list
>>52071293
It'd be neat. I've been cocking around with my own image editor, so it'd be fun to see how MS does their on-the-fly resizing.
>>52071372
> Is programming a browser for yourself something feasible?
No.
At least, not something which a) can handle most of the popular web sites and b) isn't just a shallow re-skinning of an existing browser.
Even using existing libraries for HTML, JavaScript, HTTP and SSL, there's still a ton of code needed to glue them all together.
happy holidays
I wanted to ask you guys if you can nest if statements inside if statements in javascript.
A guy on this website http://javascript.about.com/od/decisionmaking/a/des09.htm
shows how it is done. Is it correct? This is the code he wrote.var answer; if (a == b) { if (a == c) { answer = "all are equal"; } else { answer = "a and b are equal"; } } else { if (a == c) { answer = "a and c are equal"; } else { if (b == c) { answer = "b and c are equal"; } else { answer = "all are different"; } } }
>>52071517
Do you not know what a rendering engine is? Webkit takes care of all of that.
>>52071547
how did you even figure out how to post this question anon?
>>52071372
If you're not programming the web renderer but the UI to a web renderer, it's quite feasible.
>>52071552
>Do you not know what a mozilla is? Firefox taks care of all that.
>>52071630
Oh I see, you're actually retarded. He literally asked about how hard it would be while using a redering engine like webkit.
Not only that, your attempt at a sarcastic metaphor is the single most nonsensical response to any post on 4chan at this moment. You fucking moron
>>52071630
>>Do you not know what a Webkit is? Rendering engine takes care of all that.
>>52071598
Yeah, I was thinking of just programming the UI. This way I can ensure that there's really no bloat and no botnet.
>>52071565
idk, can you have an if statement inside an if statement in javascript or is that syntax wrong is what im asking.
>>52071670
Butthurt underageb& detected.
>>52071695
I know the solution.
Have you heard of "F#"?
>>52071552
HTTP, SSL, and JavaScript aren't part of an HTML renderer. Some of them may be part of a framework which also includes an HTML renderer (e.g. WebKit includes both an HTML renderer and a JavaScript interpreter, although it doesn't include the networking code).
But if you use a framework which not only includes all of those components but also integrates them, you aren't actually writing a browser, you're just embedding an existing browser, with all of the bugs, defects and limitations of the original. Which largely defeats the point.
>>52071744
F# (pronounced eff sharp) is a strongly typed, multi-paradigm programming language that encompasses functional, imperative, and object-oriented programming techniques. F# is most often used as a cross-platform CLI language, but can also be used to generate JavaScript[4] and GPU[5] code.
F# is developed by the F# Software Foundation,[6] Microsoft and open contributors. An open source, cross-platform compiler for F# is available from the F# Software Foundation.[7] F# is also a fully supported language in Visual Studio[8] and Xamarin Studio.[9] Other tools supporting F# development include Mono, MonoDevelop, SharpDevelop, MBrace and WebSharper.[10]
F# originated from ML and has been influenced by OCaml, C#, Python, Haskell,[2] Scala and Erlang.
>>52071750
>Which largely defeats the point.
The point is to get rid of bloat and botnet. How is that defeating the point?
>>52071744
Language evolution[edit]
F# uses an open development and engineering process. The language evolution process is managed by Don Syme from Microsoft Research as the BDFL for the language design in conjunction with the F# Software Foundation. Earlier versions of the F# language were designed using a closed development process by Microsoft and Microsoft Research.
F# originates from Microsoft Research, Cambridge, and the language was originally designed and implemented by Don Syme.[16] Andrew Kennedy contributed to the design of units of measure.[16] The Visual F# Tools for Visual Studio are developed by Microsoft.[16] The F# Software Foundation develop the F# open source compiler and tools incorporating the open source compiler implementation provided by the Microsoft Visual F# Tools team.[6]
>>52071787
>The point is to get rid of bloat and botnet.
Great portions of the bloat are innate to the rendering engine. Unless you want to rewrite 100 gorillion lines of code, then you aren't going to magically unfuckulate it.
>>52071784
And yet, ocaml is still a billion years better, and js_of_ocaml rapes F#'s javascript target 5 ways to sunday.
>>52071744
Asynchronous programming[edit]
F# supports asynchronous programming through asynchronous workflows.[23] An asynchronous workflow is defined as a sequence of commands inside an async{ ... }, as in
let asynctask =
async { let req = WebRequest.Create(url)
let! response = req.GetResponseAsync()
use stream = response.GetResponseStream()
use streamreader = new System.IO.StreamReader(stream)
return streamreader.ReadToEnd() }
The let! indicates that the expression on the right (getting the response) should be done asynchronously but the flow should only continue when the result is available. In other words, from the point of view of the code block, it's as if getting the response is a blocking call, whereas from the point of view of the system, the thread won't be blocked and may be used to process other flows while the result needed for this one doesn't become available.
The async block may be invoked using the Async.RunSynchronously function. Multiple async blocks can be executed in parallel using the Async.Parallel function that takes a list of async objects (in the example, asynctask is an async object) and creates another async object to run the tasks in the lists in parallel. The resultant object is invoked using Async.RunSynchronously.[23] Inversion of control in F# follows this pattern.[23]
Name 1 reason to use any other Java Web Development framework other than Spring Boot
You legitimately fucking can't
>>52071721
>be a moron
>say something stupid
>get corrected
>be upset and respond sarcastically
>get called out
>hur durr underage!!!
Sure thing kid.
>>52071750
He -literally- asked about webkit.
>HTTP, SSL, and JavaScript aren't part of an HTML renderer.
I didn't say html renderer, neither did anyone else. I said rendering engine. Which is also called a layout engine. Which absolutely covers html, css and javascript. It doesn't by necessity cover ssl or http but they usually do.
> you aren't actually writing a browser,
Yes you are.
>you're just embedding an existing browser
You're embedding the rendering/layout engine. A browser is a layout engine + a ui of some kind + additional, optional features. By that logic chrome and safari were either not browsers, or the same browser (prior to chrome forking blink). That's retarded.
If you write a program that browses the web you are clearly writing a browser. Whether you wrote the underlying engine is irrelevant. If webkit was a browser it would be offered as a browser. It isn't, because it isn't. It's an engine that powers a browser.
>>52071835
[braindrain intensifies]
>>52071825
>from the point of view of the code block
FROM MY POINT OF VIEW THE ASYNCHRONOUS WORKFLOW(TM) IS A GLORIFIED MICROSOFT BRANDED MONAD
>>52071807
>Great portions of the bloat are innate to the rendering engine
I don't believe we're talking about the same thing. I'm talking about all the useless functionalities of modern browsers.
I'd like a minimalistic browser which just does the bare minimum.
>>52071744
Object programming[edit]
F#, like other CLI languages, can use CLI types and objects through object programming.[20] F# support for object programming in expressions includes:
Dot-notation (e.g., x.Name)
Object expressions (e.g., { new obj() with member x.ToString() = "hello" })
Object construction (e.g., new Form())
Type tests (e.g. x :? string)
Type coercions (e.g., x :?> string)
named arguments (e.g., x.Method(someArgument=1))
Named setters (e.g., new Form(Text="Hello"))
Optional arguments (e.g., x.Method(OptionalArgument=1)
Support for object programming in patterns includes
Type tests (e.g., :? string as s)
Active patterns, which can be defined over object types[22]
F# object type definitions can be class, struct, interface, enum or delegate type definitions, corresponding to the definition forms found in the C#. For example, here is a class with a constructor taking a name and age, and declaring two properties.
>>52071840
You got blown the fuck out, the reasonable attitude would be graciously accepting defeat.
>>52071844
>I'm talking about all the useless functionalities of modern browsers.
Such as?
>>52071861
Why do you keep talking to yourself?
>>52071844
Look, he's an idiot trying to be contrary for contrariness sake.
Make your broswer, yes use webkit. If this is fully intended to be a toy project there are smaller, lighter, easier to use alternatives. If you want something that fits your needs and you will actually use as a browser then do try webkit. Even if you don't succeed, you've learned some stuff hopefully.
>>52071842
yeah, workflows are a nice syntax for monads+
>>52071744
Can i have an if statement inside an if statement in javascript? Or is that wrong because of syntax?
Does anybody ever use silverlight?
>>52071874
Where else did "I" talk to myself exactly?
>>52071750
The bit we call the browser is really just the UI that pulls together all these parts. If you're writing a new UI, it's a new browser, even if it uses all the same technology as (say) Chrome. Of course, if your starting point is something like Chromium, that IS just using an existing browser.
>>52071918
I've used it in the past.
>>52071862
syncing features, data tracking features off the top of my head
what is the difference between unsigned int and normal int?
>>52071886
Yeah, I guess kind of a toy project although hey if it's not too bad I might use it.
Anyways thanks for the advice.
>WebKit is an open source Web content engine for browsers and other applications.
- https://webkit.org/project/
>>52071840
>>52071750
btfo tbqh senpai
>>52067281
the compiler fixes this you cancer
From https://msdn.microsoft.com/en-us/library/dd233182.aspx
>Computation expressions in F# provide a convenient syntax for writing computations that can be sequenced and combined using control flow constructs and bindings.
>They can be used to provide a convenient syntax for monads, a functional programming feature that can be used to manage data, control, and side effects in functional programs.
>>52071954
unsigned >= 0
>>52071954
Unsigned uses all bits to express the number and as thus can only be in a positive integer range, signed uses the first bit to detrmine whether the number is negative or positive and as thus can be in negative..0..position range albeit will hold smaller values because the first bit is taken away.
>>52071963
I honestly have no idea how hard webkit is to work with, just the make that clear. Don't necessarily expect it to be easy just because you're doing the "easy part", but good luck
>>52071954
There is no 'normal' int, anon, all integers are created equally and are all beautiful.
>>52071963
>I guess kind
I guess it's kind*
>>52071978
>negative..0..position
Meant negative..0..positive
/g/ what is wrong with my code, writing a fizz buzz program in javascript<script>
for(var i=0, i<=20, i++){
if(i%3==0){
document.write("Fizz");
if(i%5==0){
document.write("Buzz") ;
} else{ document.write(i)};
}else{ document.write(i);
continue
}
if(i%5==0){ document.write("Buzz")}
else{ document.write(i)}
}
</script>
>>52071954
signed uses negative ranges, unsigned doesn't so it can hold twice as much in its range from 0 to meme.
>>52072007
it keeps giving me a SyntaxError: missing ; after for-loop initializer on line 6
New thread: >>52072027
>>52072028
Use a semicolon after the for loop initializer on line 6.
>>52072028
var i - 0; i<-20; i++
The underlying logic is wrong too but I'll let you figure that out.
>>52072007
It literally looks like cancer. How can you even code in that mess?
>>52072046
ohhhhhhh THANKX
>>52072056
Be nice/constructive anon. He's learning
>>52072082
My first programs didn't look that fucking horrible.
This isn't learning, it's neglect.
It's like a getting a puppy and feeding with a shotgun.
>>52072103
You talk like the weaboo neckbeard in one of my old classes.
He's also a much worse programmer than he thinks. I suspect you have the same disease
>>52072170
At least my bad code looks good.
>>52071978
>, signed uses the first bit to detrmine whether the number is negative or positive
do you mean - or plus? i heard about it
>"competitive" programming
AHAHAHHAHAHHAHAHHAHAHHAHAHAHAHHHAHAHAHHAHAHAHAHAHAHHHHHAHAHAHAHHAHAHAHHAHAHAHHAHAHAHHAHAHHAHAHAHAHHAHAHAHAHHAHAHAHHAHAHAHAHAHAHHAHAHH