[ 3 / biz / cgl / ck / diy / fa / g / ic / jp / lit / sci / tg / vr / vt ] [ index / top / reports / report a bug ] [ 4plebs / archived.moe / rbt ]

Due to resource constraints, /g/ and /tg/ will no longer be archived or available. Other archivers continue to archive these boards.Become a Patron!

/g/ - Technology

View post   

[ Toggle deleted replies ]
File: 24 KB, 468x361, 20090301053305.jpg [View same] [iqdb] [saucenao] [google] [report]
58838969 No.58838969 [Reply] [Original] [archived.moe] [rbt]

What are you working on, /g/?

Old thread: >>58832484

>> No.58838987

I really really like the op.

>> No.58839004

Okay? Where are the Java Photoshops, Java Word, Java Autocads? Java Browsers?

There's nothing using Java and nobody would be using your shitty language if Android didn't force you to.

>> No.58839033

Apache TomCat is an example of good Java code and good OOP code.

>> No.58839119

double sqrt(double n) {
double result = 0;
"fldl %1;"
"fst %0;"
: "=g" (result)
: " g" (n)
return result;

Doesn't work in g++. Says invalid instruction suffix for fld, operand type mismatch for fst. That is, if I remove the space before the second g to make it this far.


>> No.58839127
File: 69 KB, 370x396, tsukasa.jpg [View same] [iqdb] [saucenao] [google] [report]

If i were to write a static allocator, would defragmenting to fill gaps be just as bad as garbage collection in higher level languages?

>> No.58839143
File: 67 KB, 578x547, tmp_4915-1484610241418-152491598.png [View same] [iqdb] [saucenao] [google] [report]

>voulant creer personnel web parseur
>deteste memeserpent
Que faire?

>> No.58839147
File: 20 KB, 440x485, condescending-cat.jpg [View same] [iqdb] [saucenao] [google] [report]

Hi /dpt/
Why are global variables so hated?

>> No.58839154

Speak american, faggot.

>> No.58839170

Thanks to cheeto burrito soon the whole world be speaking mandarin, chump.

>> No.58839174

most people don't use them correctly
using them everywhere makes your code a fragile mess
it also lets beginners avoid having to learn scoping

>> No.58839182

>There's nothing using Java
bwahahahaha, please kid

>> No.58839198

They are similar in some major, foundational ways.

However, C# and Java look pretty damn different these days, depending on how you write.

In any case:
>Anonymous types
>LINQ (and delegates and delegate-related things in general)
>Extension methods
>'using' for resource lifetime control (although some sort of RAII implementation would be nice)
>built-in tuples
>some limited pattern matching

To bring in toolsets and frameworks:
I find that NuGet is a wonder to work with for package management, and overall I've enjoyed VS much more than IntelliJ, and especially Eclipse. Xamarin is insanely easy to use and deploy, too.

Some of the things I've listed here maybe be available in Java these days.

>> No.58839207

people that believe that p = np are dum (looking at you ruby)

>> No.58839208

because the mentally ill can't reason for themselves

>> No.58839223

any idea why the last line of code is giving me a NullReferenceException?

if (y < 3 && btn[x, y].BackColor == Color.CadetBlue)
btn[x, y].BackgroundImage = Properties.Resources.black_piece;
btn[x, y].BackgroundImageLayout = ImageLayout.Stretch;
btn[x, y].Tag = "black_piece";

if (btn[x, y].Tag.ToString() == "black_piece") { do things }

>> No.58839231

more like reverting to caveman grunts and wall paintings after WW3 happens

>> No.58839233

Depends on if it's mutable/readonly/constant and the purpose.

A globally modifiable variable is nearly always a horrible thing, because some asshat could come along and change the value, potentially causes unexpected behavior. God help you if more than one thread try to access it at the same time, if you haven't properly designed your application.

I believe the better question to ask is
>Why does this variable absolutely need to be global?

>> No.58839243

Le Canada est un pays d'Amerique.

>> No.58839261

Probably because the Tag property is null.

>> No.58839262

IDK, I think Russians would somehow find a way to survive one more world war, if not out of pure spite and primal range.

>> No.58839263

What happens if btn[x,y] or if btn[x,y].Tag is null? Then trying to access a field or invoking a method from null will result in a nullreference exception.

>> No.58839270
File: 540 KB, 1928x1048, lurka.png [View same] [iqdb] [saucenao] [google] [report]

I'm making a 4chan desktop app. Pic related.

>> No.58839272


>> No.58839285

ty fixed it

>> No.58839286

use enums
why do you assign a string and then call tostring on a string
why did you move the condition outside
why aren't you checking that it actually exists


>> No.58839292


exactly he cannot refute such good programs using Java such as >>58839033

>> No.58839322

trying to create the game of checkers with close to no knowledge of c# because the professor prefers to teach us about how processors work instead of how to program

>> No.58839329

java was ok, not good but ok.

After it was prostituted to oracle is shit.

>> No.58839339

>desktop app
That's clearly in a browser, faggot.

>> No.58839353

looks kinda cool. are you using some sort of js/ptyhon/php+webkit application builders?

>> No.58839362


Relying on the professor actually teaching how to program is a mistake. In all honesty most real world applications outside of academic bullshit will require you to teach yourself.

>> No.58839365

Asking again in the new thread.
I am learning C and ASM by translating between the two. I have no idea how I would write something using the 8 and 16 bit registers in C as I have a interpreted language background. If I have something like the following how do I manipulate bl in ebx using C

mov ebx, eax
xor bl, al

>> No.58839366

Yeah its in dev mode to make it easier to mess around with. Takes a few commands to bundle it up into a desktop app.

>> No.58839369

>>58839353 was directed to >>58839270 but somehow i managed to fuck that up

>> No.58839389

yeah thats what im trying to do here. My code is a mess but I finally got the checkers to start moving so thats progress

>> No.58839393

Why not use inline asm?

>> No.58839398

>looks kinda cool. are you using some sort of js/ptyhon/php+webkit application builders?

Yeah its in node react and electron

>> No.58839422
File: 40 KB, 480x640, sshot002.png [View same] [iqdb] [saucenao] [google] [report]

Making my old PDA into a performance monitor, it's going to pull data from MSI Afterburner in the end. I'm working on the network protocol now, so everything it displays now is just dummy data to test the controls.

>> No.58839435

as someone who never wants to learn node, i'm kinda curious how it works on desktop i used some php+webkit before for a simple application so i'm wondering if it's worth learning. what do you think?

>> No.58839439

If you look at my (other guy) question up top, that won't always work.

>> No.58839475

nth for ghc

>> No.58839498 [DELETED] 

Friendly reminder to always
Array.prototype.map = function (fn) {
var array = [];

this.forEach(function (element, index) {
array[index] = fn.call(array, element);

return array;

when using JavaScript

>> No.58839512

Saw a pretty good ad for a web dev position, good pay and close, out of the things asked on the ad I know HTML, CSS and JS, thanks to my HS I also know Object and Regular Pascal and VBA, besides having learnt Lua, C and Rust on the side, and I understand the underlying protocols fairly well, but I don't really have much web-dev related else to put on the CV, and out of the things asked there I haven't used React, Angular or PHP or SQL

How tolerant would they be to me not having any experience with those do you think?

>> No.58839536


Current happenings in the D world for you math nerds

>Mir Algorithm has its own map, retro, stride, reduce, naryFun, bitwise, to and others stuff from Phobos. But they are implemented differently, may have different API (like iota), and may boost your program and compilation speed few times.

>Ah, ndslice is based on iterators! Dlang iterators! Dlang iterators are only random access, other kinds of iterators can be replaced with D Ranges. There are strong reasons why iterators are the best for random access and multidimensional worlds. They will be described in the future this year. Do not worry, we do not need to write C++-like code, iterators are used internally by ndslices :-)

>We have full backward compatibility with Phobos Range API, so we can mix Phobos and Mir code. Iterators are useful if we want to implement custom and fast ndslices. Big collection of predefined ndslices can be found at mir.ndslice.topology .

>Mir Algorithm is already used in Tamedia's lincount (for bitwise and accelerated bit count), Mir main repository. A PR with update for the D Computer Vision library is 85% ready.

>> No.58839558

no sql is the biggest problem

>> No.58839560

Pocket PCs were unexpectedly comfy.

Maybe it was because they were neat at the time, but having "XP" on those little things was cool as hell.

>> No.58839570

Array.prototype.map = function (fn) {
var array = [];

this.forEach(function (element, index) {
array[index] = fn.call(array, element);

return array;

Function.prototype.rbind = function () {
var that = this;
var args = [].slice.call(arguments);

return function () {
return that.apply(this, [].slice.call(arguments).concat(args));

var parseHex = parseInt.rbind(16);

console.log(['10', '10', '10', '10'].map(parseHex));

>> No.58839589



>> No.58839597

if you say so

>> No.58839613
File: 1.96 MB, 265x200, crazy-shit.gif [View same] [iqdb] [saucenao] [google] [report]

For what purpose?

>> No.58839622

The actual code in the crackme is much larger. I could just pass the function in, but even if it works I feel like I didn't learn how it worked exactly. I am cheating myself out of knowledge doing that.

>> No.58839633

If you know javascript then you already know node. Theres only a few steps in between to make it click.

Also, Webkit based apps like electron have a node API that you can use to do whatever you like.

So you can essentially do frontend, backend and native with one language.

I wouldn't reccomend sticking to node though, it has its uses but isn't always the best tool for the job.

>> No.58839647

How hard is it to learn though?

Like, glancing over the wiki page, it just seems to be a text form of something like Access queries, right?

>> No.58839652

Yeah, I thought it was the coolest shit when it was new. Actually even now that I've seen it again I think their UI is quite nice. The fact that it was designed to be stylus-driven means controls don't all have to be fuckhuge so you can hit them with your thumb.

>> No.58839664

Is there a language which is just typed lambda calculus with no extra shit?

>> No.58839669

that's still not a desktop app.
That's shipping a whole fucking browser just to bundle a website with it.
Its fucking cancer and I wish node-webkit, electron, etc. would die in a fire.

>> No.58839672

>desktop apps are already being written in HTML & CSS
dpt btfo?

>> No.58839675

What's stopping you from using a language with that feature and just not using the "extra shit"?

>> No.58839682

define extra shit

>implying that's not what types are

>> No.58839688

not hard to learn

>> No.58839707


>> No.58839734

>with that feature
Which "feature"?
>just not using the "extra shit"?
Because that's usually impossible.
>define extra shit
pretty much anything that isn't typed lambda calculus.
>implying that's not what types are
read my sentence properly next time. types can't possibly be defined as "extra shit" when they are a base requirement for something to fulfill my request. whether or not they are "extra shit" in reality isn't even relevant here.
>webdev trash
really now?

>> No.58839741

yeah i know node is not the best option when it comes to too complicated stuff. i've been curious about making desktop apps using it because all i want to do is string manipulation, parsing and whatnot to mod a game so i don't see why i shouldn't use php/js to do so. thanks for you input.

>> No.58839751

You haven't actually explained what you're looking for in a sane, meaningful way.

>Is there a language which is just typed lambda calculus with no extra shit?
This question is completely unanswerable as-written.

>> No.58839782

>pretty much anything that isn't typed lambda calculus.
you need to go into more detail

are ADTs "extra shit"?

>> No.58839804

should I just F it and send an application?

>> No.58839810

>You haven't actually explained what you're looking
I believe i just did. I need something which can be defined as "typed lambda calculus". I do agree that the last bit is redundant as "typed lambda calculus" by its very definition implies "no extra shit"
>This question is completely unanswerable as-written.
it's perfectly answerable, i type checked it.
>are ADTs "extra shit"?
i'm inclined to say yes, but i'm willing to check it out if there aren't any other alternatives.

>> No.58839814

well you can always write your own
what sort of type system?

>> No.58839826

Save yourself the trouble and use the untyped lambda calculus.

>> No.58839864

>well you can always write your own
i'm sick of all the "language" bullshit though. what's a decent enough language to do this in? by decent enough I mean something which wasn't designed to piss you off.
and i need a compiler which generates relatively fast code.
>what sort of type system?
pretty much anything would be fine at this point.
assuming I agree to use literal cancer, what would be a good language?

>> No.58839886

Yes and no. For it to even be possible, you need a way of updating all the pointers. That requires e.g. another layer of indirection or crawling whatever is holding the pointers themselves. That said, you can control when this happens and to what degree, so you could only shuffle around a few allocations every once in a while, and you don't need to stop the world because it's possible for a time when this is safe to do to be well-defined.

>> No.58839911

Haskell (without extensions) is quite close to just a typed lambda calculus (System F?)

>> No.58839985
File: 80 KB, 1280x720, 1485637232234.jpg [View same] [iqdb] [saucenao] [google] [report]

this has to be a joke... right?
>(without extensions)
do beginner-tier learning resources use them? if not, you can't possibly be sane when claiming that it's somehow close to typed lambda calculus.
>System F
isn't that something haskell compiles down to? or is there another implementation?

>> No.58840033

Are you stupid? Haskell is literally a form of system F, and no, beginner resources do not use extensions.

What exactly is the "extra shit" you're worried about? At no point have you ever tried to give any detail.
Is syntax sugar "extra shit"?
Like f x y = e being syntax for f = \x -> \y -> e ?

>> No.58840098

>Are you stupid?
>beginner resources do not use extensions
then we are talking about the same code. in what way is it "quite close to just a typed lambda calculus"?
>Is syntax sugar "extra shit"?
yes. that's a really stupid question since that is literally what being syntactic sugar means

>> No.58840117

>in what way is it "quite close to just a typed lambda calculus"?
well it IS a typed lambda calculus
i'm not sure what kind of thing you're mad at it for

>> No.58840120

Any lisp.

>> No.58840141

the great debate

" " vs ' '

>> No.58840150

" for strings, ' for chars
If you disagree you are a faggot

>> No.58840174

This. Disagreements will result in banishment to Poo, India

>> No.58840181

CL-USER> (print "hello ``faggot''")

"hello ``faggot''"

>> No.58840183

language dependent

>> No.58840188

>well it IS a typed lambda calculus
you know what i mean. it's certainly very different from something you would do on paper and it has the extra "language" bullshit added on.
>i'm not sure what kind of thing you're mad at it for
having all this extra crap (syntactic sugar included) really makes me angry when i see it.
why would I be using literal garbage? I made it pretty clear that I need a typed lambda calculus.

>> No.58840203

I literally don't know what extra bullshit you mean, virtually every feature in Haskell is part of some paper or another.


>> No.58840215

>assuming I agree to use literal cancer, what would be a good language?

Anyway, use Typed Racket if you're that anal about types.

>> No.58840227

declare n as a double before the sqrt function call.

>> No.58840235

You could use GHC Core.
It's what Haskell compiles into.
It's typed lambda calculus without any bullshit

>> No.58840319

I use global vars in PHP. Its sloppy but I am already working with Hash Tables of data. Also Website session management has a ton of Global Vars. $_SERVER["IP"]

Basically an Apache call through PHP 5, to get the users IP.

>> No.58840322


>> No.58840325

What's the bullshit in Haskell?

>> No.58840326

well, syntactic sugar would be the most obvious thing. can i somehow get rid of it so it doesn't piss me off that much? at least then I can maintain the illusion.
considering it's a lisp it probably has some barely typed trash it thinks is a real """"""""type system""""""""
that looks nice if only i could somehow get rid of the syntactic sugar. at least i can just use it without even touching haskell, right?

>> No.58840344

Holy shit, you are autistic, and not in the good way.

>> No.58840346
File: 1.71 MB, 1817x845, pootown.png [View same] [iqdb] [saucenao] [google] [report]

doesn't look too bad honestly

>> No.58840356

>well, syntactic sugar would be the most obvious thing. can i somehow get rid of it so it doesn't piss me off that much? at least then I can maintain the illusion.
You really don't want that.

>no infix operators
>no top level declarations
>no case split declarations
>no do notation
>no f x y [...] = e syntax
>no list literals or comprehensions
>no pattern guards
>no infixing arbitrary functions

>> No.58840407

Why not just write in the typed lambda calculus? Don't need a computer to do that! :^)

>> No.58840418

computers are just computational sugar

>> No.58840437

why do you think that's the case?
>You really don't want that.
but i would. i can't look at it for more than 10 minutes without getting angry.
>no infix operators
fine by me.
>no top level declarations
>no case split declarations
>no do notation
the worst fucking kind of sugar.
>no f x y [...] = e syntax
>no list literals or comprehensions
>no pattern guards
a minor inconvenience at best.
>no infixing arbitrary functions
same as the first.
i don't have the brain power to type check everything i write and i kinda prefer to write on a keyboard anyway.

>> No.58840439

what does anime have to do with programming?

>> No.58840440

No, pajeet, only indians need help writing their code.

Syntax sugar is for illiterates.

>> No.58840479

anime IS programming

>> No.58840482
File: 1.36 MB, 1440x810, Pvs7w9y.png [View same] [iqdb] [saucenao] [google] [report]


>> No.58840494

This. Making a simple game. Am I doing it right?

#include <stdio.h>
#include <stdlib.h>
#include <iostream>
#include <string>
#include <cmath>
#include <time>

using mainspace std;

int main ()

string playerOne;
string playerTwo;

cout << "Balloon Pop " << endl << endl << endl;
cout << "Welcome to Balloon Pop! " << endl << endl;

cout << "Please enter the name of Player 1: ";
cin >> playerOne;
cout << endl << endl;

cout << "Please enter the name of Player 2: ";
cin >> playerTwo;
cout << endl << endl;

srand (time(NULL));

if (rand() (playerOne, playerTwo) = playerOne)
cout << playerOne << " goes first!" << endl << playerTwo << " goes second!";
cout << playerTwo << " goes first!" << end << playerOne << " goes second!";
cout << endl << endl;

return 0;

Inb4 someone whines about using mainspace std.

>> No.58840500

/r/ image of boys vs girls programming, you know the one

the quake inverse square root vs "return 5 if a > b bcuz im random lol"

>> No.58840507

i have literally proven this to be the case, so no.

>> No.58840508

You're probably SOL then. Hope that helps. :^)

>> No.58840525

Honestly just go with Haskell and don't use the features and syntactic sugar that pisses you off.

>> No.58840529


>> No.58840539

Sweet, thanks. Still messing around with getting rand to work on my own.

>> No.58840544

How should a CSCI student applying for internships tailor their resume?

I currently have a

>education section
Just basic name of school, expected graduation date, etc
>technical skills
I don't want to misrepresent my knowledge, but I don't wanna be looked over either. I have the most experience in Java, but wouldn't say I'm an expert since I look at the APIs sometimes. I've worked in PHP, HTML/JS, SQL, and C#, but I would say I am less comfortable with them. How do I differentiate? Also, how do I put my knowledge about Git in here?
What kind of projects do I put here? Most of my personal projects revolve string analysis (I have a sentiment analysis program, and am working on implementing a news-report summarizer). I don't wanna seem like I only know about string analysis, though, especially as it's not really relevant to the places I am applying.
>Work experience
No technical experience, only shit like bank teller and whatnot. I've tried to tailor these as best as I could.

>> No.58840559

Also, of course, I have a header with my name and contact info.

>> No.58840571

you need a link to a website with all your personal projects

>> No.58840576

i switched from c# to c++ to get a big performance boost, can i expect a similar performance boost switching from c++ to c or maybe even asm?

>> No.58840577

f x already pisses me off. can i just not use even this kind of basic sugar anywhere?

>> No.58840585

f x = y

f = \x -> y

>> No.58840591

just make a semicolon separated list of names of things you're good at

if you're proud of the project, put it on there. better than nothing.

>> No.58840592

tailor per job so put the relevant language first.
order your resume in order of how impressive it is, probably projects, work experience, education then technical skills

>> No.58840602

yes of course, just define your functions as:
f = (\x -> x*x)
or whatever

>> No.58840603

If I have them all on Github, but my github is a bit empty (No open source experience, something I am looking into if I don't get an Internship though) aside from 4 or so projects, is that acceptable?

>> No.58840627

post your top 3 best projects with database enterprise or database web stuff with servlets which will look very impressive to them is what they care most about is personal projects you done in class those big projects in cs classes or ones you done on your spare time. It shows you can actually do the job

>> No.58840631

Yeah it's fine for an internship. If you're looking for one with a no-name company, then you don't even really need to do that. Big 4 might want some interesting stuff.

>> No.58840635

you can just not use that stuff you know?

>> No.58840645

>If I have something like the following how do I manipulate bl in ebx using C
You can't. C is a high level language, it has no concept of direct register access and definitetly nothing x86 related.

>> No.58840652


f = do
x <- id
pure y

>> No.58840660

It's a mixture of local (Small area, ~150,000 people) software outlets + local companies w/ software departments

>> No.58840674
File: 107 KB, 640x640, IMG_20170207_160331.jpg [View same] [iqdb] [saucenao] [google] [report]

You'd probably find more job prospects if you went back to Mumbai, pajeet

>> No.58840678

He's probably going to have a heart attack and die after seeing this.

>> No.58840686

okay, i'll try it out.
i'm afraid I will have to use some of it anyway and I can't have that.
are you implying "do" isn't syntactic sugar?
are you implying the arrow isn't syntactic sugar?
how can anybody be this fucking delusional?

>> No.58840706

>are you implying "do" isn't syntactic sugar?
>are you implying the arrow isn't syntactic sugar?
>how can anybody be this fucking delusional?
with MonadComprehensions
[ y | x <- id ]

>> No.58840718

Unfortunately as white as snow :(

>> No.58840753
File: 19 KB, 251x299, 1227511458046.jpg [View same] [iqdb] [saucenao] [google] [report]

what does he mean by this?

>> No.58840791

Use global variables with dynamic scope.

>> No.58840805

Why do these threads always devolve into some degenerate Haskell circlejerking? Don't you fags have anything better to do than """pretending""" to be bad at Haskell?

>> No.58840809

In Haskell this is just the Reader/Writer/State monad.

>> No.58840819

what do you guys eat or drink when programming?

What is the best programmer's food?

>> No.58840826

read-only char array literal vs single char literal

>> No.58840830

water and hormone supplements

>> No.58840834

Green apples and plain black coffee

>> No.58840835

the nice thing about MonadReader is the (->) instance

>> No.58840844

>what do you guys eat or drink when programming?
I drink, preferably coffee or some fizzy drink (sparkling water mostly).

I never eat while typing, that's gross and unhygienic as fuck yo.

>> No.58840851
File: 615 KB, 664x720, 1485240752831.png [View same] [iqdb] [saucenao] [google] [report]

>[] is lambda calculus syntax
>[] isn't syntactic sugar
> <- isn't syntactic sugar

>> No.58840860

> butthurt grumpy old Java programmer
> likes AbstractBeanFactory

>> No.58840863


>> No.58840869

Haskell is syntactically horrendous, and equally horrendous in speed. Its laziness makes algorithms a nightmare to reason about. The Haskellers can't cope with this in the real world, so they rarely venture outside of their echo chamber.

>> No.58840870

when did i say this

>> No.58840894

it's a fake image you stupid r9k faggot

>> No.58840896

>In Haskell this is just the Reader/Writer/State monad.
>this is just

>> No.58840913
File: 258 KB, 549x560, 1423121490343.png [View same] [iqdb] [saucenao] [google] [report]

>Knuth is dumb

>> No.58840916

I program mostly in C, but nice superiority complex you have there. I guess that's typical for Haskell users.

God, I wish moot hadn't killed off the text boards. The daily programming thread (as well as /g/ in general) objectively became worse after he shut down /prog/ and all the redpilled Haskell programmers came her to shitpost about Haskell in TDPT and about jews and Trump and pooing in loos in all other threads.

>> No.58840920

coffee and coke

>> No.58840947
File: 772 KB, 957x535, 1447535529422.png [View same] [iqdb] [saucenao] [google] [report]

>/g/ hates syntactic sugar, something that makes code easier to understand

>> No.58840956

The glucose injected kind or the central nervous system stimulating kind?

>> No.58840958
File: 403 KB, 521x520, 1482335576715.png [View same] [iqdb] [saucenao] [google] [report]

i asked for no syntactic sugar.
you then typed and posted your crap.
which means you think it's somehow not syntactic sugar

>> No.58840967

Wrote my first fizzbuzz yesterday.

org 0x100
xor cx, cx
inc cx
push 0xff
push 0x0d
push 0x0a
mov ax, cx
mov bx, 5
xor dx, dx
div bx
test dx, dx
jnz @f
push 0x7a
push 0x7a
push 0x75
push 0x42
@@: mov ax, cx
mov bx, 3
xor dx, dx
div bx
test dx, dx
jnz @f
push 0x7a
push 0x7a
push 0x69
push 0x46
@@: pop dx
sub sp, 2
cmp dl, 0x0a
jne fb
mov ax, cx
@@: mov bx, 10
xor dx, dx
div bx
add dl, 0x30
push dx
test ax, ax
jnz @b
fb: mov ah, 6
@@: pop dx
cmp dl,0xff
je @f
int 0x21
jmp @b
@@: int 0x21
jz begin
mov ax, 0x4c00
int 0x21

Do I get the job, /g/?

>> No.58840971

don't karenpost you autistic freak

>> No.58840987

bbs.progrider.org/prog my friend
Also, /prog/ was full of Lispers. What are you talking about?

>> No.58840989

your post is shit but thanks for the karen image

>> No.58840997

>syntactic sugar
Like overload (which us syntactic sugar), it's an abomination.

>> No.58841012

>Also, /prog/ was full of Lispers.
Nah, it was just that one guy that programmed Racket who called everyone a mental midget and a toilet scrubber.

>> No.58841015

Java is pure.

>> No.58841019
File: 39 KB, 400x494, 1484359249123.jpg [View same] [iqdb] [saucenao] [google] [report]

Please never say that again
your post is shit too but thanks for thanking me for using a karen image

>> No.58841033
File: 250 KB, 649x616, 1459278447844.png [View same] [iqdb] [saucenao] [google] [report]


>> No.58841039

Well, then he must have shitposted a fuckton of Lisp. I don't remember seeing much Haskell.

>> No.58841054

pure garbage

>> No.58841069

>Rust the C replacement
>What programming language do lolis like the most?
>>Specially white lolis
>Is programming just entry-level occultism?
>Null pointers are the billion dollar mistake
>/prog/ramming Music
>DO you use git?
>>And do you use the CLI? How long have you been using it?
>>>Thanks. Upvoted
Oh wow, it's just /g/ 2.0

>> No.58841070

it was a joke


>thinking you can turn my image against me

>> No.58841075
File: 7 KB, 250x214, 1485951215266s.jpg [View same] [iqdb] [saucenao] [google] [report]

There is literally nothing wrong with C++

>> No.58841086

the garbage is artificially collected and only pure Java is left ;)

>> No.58841098

There was also a lot of ENTERPRISE QUALITY Java code though.

>> No.58841115

Tu veux Apache et peut-etre PHP.

>> No.58841116

>Null pointers are the billion dollar mistake
They are, though, Prakash.

>> No.58841117

And as it turns out, pure Java is slower than a Jit'd scripting language.

>> No.58841118
File: 111 KB, 420x550, 1486428981152.jpg [View same] [iqdb] [saucenao] [google] [report]

Rust is C++ done better imho

>> No.58841126

Good luck with your scripting language then :^)

>> No.58841130

world4search.readsicp.org/ then if you want to take a trip down memory lane

>> No.58841139

I don't have a vested investment in either, but that fucking syntax in rust, holy gob shite

>> No.58841140

Just use boost::optional (or implement your own kind of Maybe) desu.

I can't believe there are NEETs on this board that still have autistic fits because they managed to dereference a NULL pointer.

>> No.58841151

java has an extremely limited use case. Unis just prefer to teach it because OOP was the meme of all memes in 1976 when computer science solidified into the monolithic nonchanging unflexible hellscape it is today

>> No.58841157

And then you're wasting memory.

>> No.58841159

That's because you are only used to purely C-based syntax.

>> No.58841163

Appreciate it, thanks.

>> No.58841168
File: 650 KB, 647x363, 1484088782193.gif [View same] [iqdb] [saucenao] [google] [report]

remove yourself from this thread

>> No.58841169
File: 3 KB, 719x74, haskell_shit.png [View same] [iqdb] [saucenao] [google] [report]


>> No.58841181

>syntactic sugar for an if check
>wasting memory
Anon, you clearly don't know what a Maybe is.

>> No.58841197
File: 129 KB, 926x1024, Screen Shot 2017-02-07 at 1.28.28 PM.png [View same] [iqdb] [saucenao] [google] [report]

some things never change

>> No.58841200

You will get laughed out of any of the big real software firms today if you don't know Java and OOP

>> No.58841206

Oh, I see, you mean a Maybe that only works for pointers and just does the check for you. Well, turns out that in most languages the language is also doing the check so that it can maybe throw an exception every time you dereference a fucking pointer, and now you're wasting time.

>> No.58841208
File: 27 KB, 480x580, 16472847.jpg [View same] [iqdb] [saucenao] [google] [report]

I like it but

>"that was perl quality"
No point of shilling a dead language so bad. I mean if you are comfy with it - use it. Why do you need to rub it in my face?

>> No.58841213

Java and OOP are not synonymous, anon.

>> No.58841231
File: 818 KB, 1280x719, karen haskell.png [View same] [iqdb] [saucenao] [google] [report]

no lel

>> No.58841244

Object pascal was my first actual language back when, not that I have a vested interest in that either, but dang, Rust code is so convoluted ha.

I've kinda learned it these days, but I have to significantly rev up them grey cells to understand any syntax.

>> No.58841249

What? No. Dynamic mutable cells is the ST monad, unrelated to any of those. If you want global variables then use its global cousin IO.

>> No.58841256

>Oh, I see, you mean a Maybe that only works for pointers and just does the check for you.

>Maybe throws an exception
I repeat myself, you clearly don't know what a Maybe is.

>wasting time
Exceptions are arguably the fastest way of escaping the current path while releasing all held resources.

>> No.58841263

How/why would a universal runtime (near dead abandoned tehcnology) be faster than native?

>> No.58841275

>>Maybe throws an exception
Who are you quoting?

>Exceptions are arguably the fastest way of escaping the current path while releasing all held resources.
I wasn't talking about the exception itself, but the branch. Also I'm pretty sure that most languages implement exceptions in SJLJ style, not DWARF style.

>> No.58841288

>implying Maybe isn't isomorphic to Either ()

>> No.58841303

Nobody fucking cares. If resources mattered so much this was an issue you would be using C, Ada, or assembly.

>> No.58841317

But C uses NULL pointers...

>> No.58841325
File: 514 KB, 810x698, haskell_ruby_chans1.png [View same] [iqdb] [saucenao] [google] [report]

Lets get along!

>> No.58841329

Apparently JIT is near dead technology or what?

Otherwise it's because Java a shit

>> No.58841339

So you get neither a strict API nor good performance, brilliant design.

C doesn't check for you every time you dereference a pointer, so you can build abstractions on top of it without unnecessary overhead.

>> No.58841343

Yeah, but we were talking about C++, not embedded C code.

>> No.58841349
File: 17 KB, 317x379, 16298608.jpg [View same] [iqdb] [saucenao] [google] [report]

Try golang :^)

>Hard mode
Try being a C and Golang dev :^^)

>> No.58841350


You might want some 'extra shit', like I/O.

>> No.58841354

what does /dpt/ think about C#

>> No.58841356
File: 786 KB, 1000x1300, anime.png [View same] [iqdb] [saucenao] [google] [report]


>> No.58841363

Piece of shit

>> No.58841366

Not Turing-complete.

>> No.58841368

>C doesn't check for you every time you dereference a pointer, so you can build abstractions on top of it without unnecessary overhead.
You can do this in sepples too.

>embedded C code
Don't start this nonsense.

>> No.58841372

No sluts.

>> No.58841381


>> No.58841383

>Be M$
>Become butthurt at Java's success
>Gotta make our own brand of Java now

>> No.58841393

C# doesn't solve any problem. For real programming you need C and C++

>> No.58841400
File: 70 KB, 694x801, 1461351863311.jpg [View same] [iqdb] [saucenao] [google] [report]

Sepples is finished

>> No.58841401

thats how business works, dipshit. you gotta keep up with the times or you get left behind.

>> No.58841403

Wasn't the conversation about managed languages? C++ has non-nullable references and null pointers in C exist because C types basically just describe representation and nothing more.

>> No.58841405

>turing completeness
sounds like an extra to me

>> No.58841406

define "real programming"

>> No.58841407

>Be M$
>Actually execute it
>Actually used by developers to make useful applications
>Pictured: Bill Gates with sweaty palms

>> No.58841420

Can someone explain to me why this doesn't work?

from sys import argv

script, filename = argv

print("Reading %r........" % filename)

But this does?
from sys import argv

script, filename = argv

print("Reading %r........" % filename)
txt = open(filename)

>> No.58841423

Programming useful things.
Like Autodesk or Adobe suits

>> No.58841424

that missing period drives me mad.

>> No.58841433
File: 12 KB, 640x400, object diagram.png [View same] [iqdb] [saucenao] [google] [report]

object diagram

>> No.58841434

>C# is used for useful applications
That'd be C++

>> No.58841435
File: 137 KB, 340x340, 1478364584179.gif [View same] [iqdb] [saucenao] [google] [report]

see >>58841366
nice try

>> No.58841438

>Wasn't the conversation about managed languages?
No, it was about NULL pointers being a mistake or not. My argument was that they weren't, a simple check isn't all that hard and you can always wrap it inside some magic safe type if it's too hard.

>C++ has non-nullable references
Doesn't mean that they're never NULL though, but yeah.

>> No.58841444

Why would `open` mutate `filename` when called, Python isn't C retard

>> No.58841452

I meant in relation to Java

sepples obviously most used still

>> No.58841456

J'ai pense que PHP est plus mauvais, est-ce faux?

>> No.58841457

filename is just a string.
When you want to read from a file, you need a file handle, which the second example is doing properly.

>> No.58841466

>a simple check isn't all that hard and you can always wrap it inside some magic safe type if it's too hard.
Are you advocating defensive programming while saying using better types is too easy? Funny.

>> No.58841475

>In relation to Java
Java is used in both server side and client side (Android), so Java is still more useful

>> No.58841492

>Are you advocating defensive programming while saying using better types is too easy?
Not exactly, it's just a hyperbole. Obviously safe-types are superior, but anon complained that they wasted CPU cycles and started talking about exceptions.

>> No.58841494

>being this mean to someone for no reason
also, both versions could work in C too, so your argument makes no sense.

>> No.58841499
File: 108 KB, 480x455, suicidenow.gif [View same] [iqdb] [saucenao] [google] [report]

>being this basic

>> No.58841501
File: 12 KB, 426x382, 1478584909202.jpg [View same] [iqdb] [saucenao] [google] [report]

>Using C# over C++
>mfw .NET itself is written in C++

>> No.58841502

That's just extra shit.

>> No.58841511

Yeah that was because I mistakenly assumed we were talking in terms of managed languages. In unmanaged languages it isn't a problem for those reasons, though it would make lives a lot easier if you didn't have to account for null being representable in the first place.

>> No.58841512

>both versions could work in C too
No, it wouldn't.

>> No.58841519

Computers aren't turing complete either, so who cares?

>> No.58841523

If Java is so bad and useless why is it still used by one of the biggest software firms at Google for Android Development?

>> No.58841527
File: 333 KB, 432x713, tmp_4915-14852123735691808174200.png [View same] [iqdb] [saucenao] [google] [report]

>VM for VM language is written in some bare metal language
No shit

>> No.58841535

CPU instruction sets are Turing complete, actually having infinite memory has nothing to do with it.

>> No.58841536

>Muh unlimited memory meme

>> No.58841548

jokes on you, i can write arbitrary things into anything and treat that as anything i want in C.

>> No.58841549

>hurr durr computers don't have unlimited memory so they aren't technically turing machines

>> No.58841553

To deliberately make Android laggy and worse than iOS.

>> No.58841560

If you're not happy with the STLC, then just pick a type system somewhere between that and λΠ-calculus:

Like I say, you still might want some extra shit. Like I/O.

>> No.58841565


>> No.58841567

open(filename, "r");
read( /* where do you pass filename ??? */ );

>> No.58841570

was java already used by android when google got it?

To change stuff would be expensive.

>> No.58841580

because google assumed mobile developers would be too stupid to develop in native, and they were right

>> No.58841581

all meme reasons no actual real arguments

>> No.58841591

>you still might want some extra shit. Like I/O.
would I really though?

>> No.58841597


>implying you can't have the whole thing evaluate to a monadic value or effectful expression that the compiler lifts out and translates into machine code

>> No.58841603

I suspect so, yes.

Otherwise just do it yourself on paper.

>> No.58841604

>CPU instruction sets are Turing complete,
>actually having infinite memory has nothing to do with it.
It has everything to do with it.
There are infinitely many turing machines no computer will ever be able to simulate.
Computers (ISAs) and all programming languages are merely linear bounded automatas at best.

>> No.58841613

if only your language had a type system you'd see the problem as clear as day

>> No.58841617

Monadic I/O is still I/O.

>> No.58841621


>> No.58841628

>implying it needs to be built in

>> No.58841640

Then volunteer to feed it a spool of magnetic tape then and leave /dpt/ forever.

>> No.58841645

Um, do you think that dynamically typed languages don't have type systems?

You'll need some kind of primitive for I/O. Unless you just want a warm box, but those are a lot cheaper than computers.

>> No.58841648

While a computer is not a Turing machine, its instruction set and programming languages that run on it can still be Turing complete.

Also saying whether a language is Turing complete or not is still useful despite computers not technically being Turing machines (for all intents and purposes they are, but I'll give you the benefit of the doubt) because programs can still run in infinite time without requiring infinite space.

>> No.58841651

how will you print the result?

>> No.58841653

Without some syntactic sugar it would be worse than brainfuck. You wouldn't even have integer literals for example.

>> No.58841700

if the type system is that bad why even act pretend it exists

>> No.58841717
File: 145 KB, 500x500, 1486245487926.png [View same] [iqdb] [saucenao] [google] [report]

>Bare metal language

>> No.58841719

>Otherwise just do it yourself on paper.
i have said previously that I don't have the brain power to type check everything I write so that's not an option. and I do need the ability to have relatively fast code.
hmm... i guess I do need it after all.
>You wouldn't even have integer literals for example
so? i fail to see the problem.

>> No.58841720

>its instruction set and programming languages that run on it can still be Turing complete.
All ISAs have finite addressing spaces for example - you cannot emit an instruction to access a byte above address 2^64 on x64, and no, bigints wont help you, still no arbitrary integer address mode.

>> No.58841728

>You'll need some kind of primitive for I/O. Unless you just want a warm box, but those are a lot cheaper than computers.
not really necessary, e.g.

data IO a where
Pure :: IO a
CFFIOrSomeBullshit :: SomeShit -> FunPtrWhyNot -> IO a
Bind :: IO a -> (a -> IO b) -> IO b

then the compiler just needs to know to use those

>> No.58841743
File: 246 KB, 400x800, 1485135642832.jpg [View same] [iqdb] [saucenao] [google] [report]

>if the type system is that bad why even act pretend it exists
So... they don't have type systems, but then because they DO have type systems that are bad we 'act pretend' they exist?

Carry on.

>> No.58841757

>It has everything to do with it.
no it doesn't. the assumption of unlimited time/memory is extended to the machine in question. if the theoretical turing machine is the only one given the assumption of unlimited time/memory, then obviously no other machine would ever be turing complete and there would be no point to the term, dipshit

>> No.58841763

>you cannot emit an instruction to access a byte above address 2^64 on x64
But you can emit several instructions to read block N from a block device.

>> No.58841764

fuck off back to your subreddit, retarded newfag animal poster

>> No.58841765

>hmm... i guess I do need it after all.
My point exactly.

>> No.58841780

>then the compiler just needs to know to use those
So, built-in. What are you arguing for again?

>> No.58841805

>So, built-in. What are you arguing for again?
no, i just showed you the type defined
you just need a way to expose that to the compiler, e.g. by saying "use these patterns for this type defined here"

and again that's part of a compiler, not the language
the language itself doesn't have any real concept of IO, just the compiler

>> No.58841812

>so? i fail to see the problem.
If you don't have the brain power to typecheck things manually you're not gonna have the brain power to manually construct Church numerals for all your data.

>> No.58841819

though you could also have a compiler specific library for that

but again, that would be built into the compiler, not the language (and would expose the AST)

>> No.58841841

Block devices are mapped under the same address space.

>> No.58841853
File: 47 KB, 637x579, 3807208431722048426.jpg [View same] [iqdb] [saucenao] [google] [report]

Well, it's a flexible language which can provide both high-level abstractions and running in the native environment.
I feel like it's overloaded a bit, but it seems to be the feature of C++.

>> No.58841864

>manually construct Church numerals for all your data
that doesn't actually require much brain power. it's just manual labor which takes up more time and I'm willing to make that sacrifice.

>> No.58841877

This guy.

>> No.58841879


For NVM disks for example, you specify the actual blocks for IO requests. In theory, block specifiers could be arbitrarily long, and you could chain them onto other disks when the specifier itself exceeds system RAM size.

See section 4 for "memory structures" describing how PRP/SG lists should look.


>> No.58841880

Where does the "add()" method come from in the constructor below?
public ButtonWithListener()
super("Simple Button GUI");
Button b=new Button("Kill button");
add(b); //???

Where does it come from and what does it do?
Learning basic GUI in Java.

>> No.58841881

>no it doesn't.
Yes it does.
>then obviously no other machine would ever be turing complete and there would be no point to the term, dipshit
It is a theoretical/mathematical term you retard.
I gave you the practical term which applies to real world machines: Linear bounded automatas.

>> No.58841904
File: 726 KB, 952x1064, 1482566191639.png [View same] [iqdb] [saucenao] [google] [report]

what's the matter?

>> No.58841917

>that doesn't actually require much brain power.
It requires extreme brain power in the form of very good memory and being able to read and compare insanely long church encodings.

>> No.58841920

'I don't want integer literals in my language; Church numberals will do' -- Anon, 2017

>> No.58841948


or even better, you could simply have terms of type [Byte] and allow your REPL to output to a file

>> No.58841949

okay guys I want to solve the real problem of how to manage everyone's browser's tabs in the best organized fashion that everyone will like

What would you guys suggest?

>> No.58841951
File: 65 KB, 637x579, 1486505289738.jpg [View same] [iqdb] [saucenao] [google] [report]

Stop posting the edited version of the image.

>> No.58841955
File: 78 KB, 994x670, whatshappening.jpg [View same] [iqdb] [saucenao] [google] [report]

I'm trying to do this fucking faggot angular tutorial and it's making me realize I don't know dick about javascript or programming in general. This is too retarded to post on stackoverflow.

Look at the attached image. He says he's injecting the UserService he made in the first example into his controller in the second. This makes no sense to me. What I'm seeing is, in the second block, he defines a function called MainCtrl which takes in an argument called UserService. This is just a parameter though right? For the purpose of a function declaration we can think of it as a placeholder. It has no relationship with the UserService he created earlier, unless at some point he calls MainCtrl and passes an instance of UserService in. He never does this though, he simply adds MainCtrl to the app.

I don't understand how the controller is supposed to know anything about the actual UserService in this example. I should probably learn javascript properly first because clearly I am missing something pretty fundamental here.

>> No.58841964


>> No.58841978

>very good memory
I actually have that.
>being able to read and compare insanely long church encodings
I can't imagine it being that bad, at least it isn't some form of retardation like ugly syntactic sugar

>> No.58841980

I'd say from the same class you're constructing with super()

>> No.58841990


>> No.58841995

what is a UserService?

>> No.58842001

A function UserService is being passed into the MainCtrl function.

>> No.58842019
File: 160 KB, 373x345, 1483730818833.png [View same] [iqdb] [saucenao] [google] [report]


>> No.58842031


>> No.58842036

see >>58841764

>> No.58842057

Literally who are you quoting?

>> No.58842058

>In theory, block specifiers could be arbitrarily long,
No, they are address mapped into the same address space as everything else.
Your computer doesn't physically have bigger than a 64 bit address bus (actually even less, 50ish bits).
You can make a tradeoff in that you read from multiple devices and dedicate more instructions/data for bigger numbers, but that still doesn't get you anywhere since the instructions and data for reading the devices must themselves reside in memory.

>> No.58842070

How much money have you made from programming?

>> No.58842084

billions, if you include the people who stole my software illegally

>> No.58842095

>I actually have that.
Then you should have no problem with type checking either.
So just go with the untyped LC.

>> No.58842099

what kind of software did you make? I don't believe

>> No.58842137

I didnt realize one of my dependencies used the gpl

>> No.58842142

>Yes it does.

>> No.58842156

I'd say its probably the best bang for your buck if you just stick to c++ and see which parts of the code take the most time and optimize those, maybe using more of a C style approach or inline asm if you find that it helps

>> No.58842160

New thread:


>> No.58842165

I honestly think people do that just so people won't realise they're being quote and reply back.

>> No.58842194


>> No.58842199

Do any of you have shortcuts for thinking recursively? Like some method of figuring out a base case and moving up? I'm having a really hard time wrapping my mind around this concept and my professor isn't any help. Got an assignment due tonight and I just can't think of a solution.

>> No.58842222


>> No.58842228

I'm still confused and fairly ashamed about it. To elaborate:

From my understanding of javascript, in order to pass the previously defined UserService into his controller, he would have to do this.

var service = new UserService();

All I see him doing is specifying at declaration that MainCtrl takes in a single argument. For the purpose of the demonstration he has named this argument "UserService" but at no point does he actually pass the previously defined UserService into it.

>> No.58842234

your story sounds interesting please post so other programmers don't fall into the same trap

>> No.58842243

>No, they are address mapped into the same address space as everything else.
They're not.

>Your computer doesn't physically have bigger than a 64 bit address bus (actually even less, 50ish bits).
Buses are used to access the disk, not individual blocks anon. You submit a request to the disk. The format of the request may be arbitrary.

>> No.58842297

Nice job not linking the tutorial in question, faggot. You're lucky I felt like googling keywords.

In section 2.3:
>In AngularJS, we cleverly use the arguments of a function to declare the dependencies we want, and Angular gives them to us.
I was reluctant to believe this was actually true, but sure enough, if you RTFM:
>the injector can infer the names of the services to inject by examining the function declaration and extracting the parameter names
Sounds like a terrible idea for DI, but I guess that's Javascript ''''''''''''''''''''frameworks'''''''''''''''''''' for you.

>> No.58842360

I mostly try to think how I could solve the problem if I already had the solution for a smaller problem, and then think about the smallest possible version of the problem

>> No.58842393

It's passed as a double inside of sqrt() already

>> No.58842448


Thanks buddo.

I still feel retarded but honestly I think that's something the tutorial should have emphasized more strongly, it's extremely counter-intuitive.

>> No.58842616

just try doing it on paper. it helped me a lot

>> No.58842640

Not anyone you're talking to, but I recently got a job without any SQL experience other than just review and now that I'm in it, I have to say SQL is the dumbest language to use. There's nothing to it. I'm not sure the job description but it doesn't sound like you'll really be doing anything in depth so you're probably fine. Just understand joins and cursors if they call you back. And I guess stored procedures, but they're basically functions with different name

>> No.58842780

Rewriting my C header to pforth library as I needed to add a feature and the code was a mess... so currently having fun with parsec

>> No.58843696

when wrinting the recursive case, you must assume your function is already working and use it there

Name (leave empty)
Comment (leave empty)
Password [?]Password used for file deletion.