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

/dpt/ - Daily Programming Thread

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

Thread replies: 316
Thread images: 26

File: PSP.jpg (31KB, 378x499px) Image search: [Google]
PSP.jpg
31KB, 378x499px
What are you working on, /g/?

Previous thread: >>58714430
>>
>>58720859
Thank you for using an anime image.
>>
>>58720886
You're welcome, senpaichan.
>>
>>58720899

var board = new Board("g");

var thread = board.Threads.Where(t => t.Subject.Contains("/dpt/")).OrderByDescending(t => t.Posts.Count()).FirstOrDefault(t => t.Posts.Count() < 300);
>>
>>58720859
Guess what
class FileSplitter(chunkSize: Int, hashAlg: String) extends GraphStage[FlowShape[ByteString, Chunk]] {
val inBytes = Inlet[ByteString]("FileSplitter.inBytes")
val outChunks = Outlet[Chunk]("FileSplitter.outChunks")
val shape = FlowShape(inBytes, outChunks)

def createLogic(inheritedAttributes: Attributes) = new GraphStageLogic(shape) {
val messageDigest = MessageDigest.getInstance(hashAlg)
var buffer = ByteString.empty

def hashBytes(bytes: ByteString): Unit = {
val size = chunkSize - buffer.length
if (size > 0) {
val array = bytes.take(size).toArray
messageDigest.update(array)
}
buffer ++= bytes
}

def emitBuffer(): Unit = {
require(buffer.nonEmpty, "Buffer is empty")
val (drop, keep) = buffer.splitAt(chunkSize)
val newChunk = Chunk(chunkSize, ByteString(messageDigest.digest()), ByteString.empty, drop)
emit(outChunks, newChunk, () ⇒ {
buffer = ByteString.empty
messageDigest.reset()
if (keep.nonEmpty) hashBytes(keep)

if (buffer.length >= chunkSize) emitBuffer()
else {
if (isClosed(inBytes)) {
if (buffer.nonEmpty) emitBuffer() else complete(outChunks)
} else {
pull(inBytes)
}
}
})
}

setHandler(inBytes, new InHandler {
def onPush() = {
val bytes = grab(inBytes)
if (bytes.nonEmpty) hashBytes(bytes)
if (buffer.length >= chunkSize) emitBuffer()
else tryPull(inBytes)
}

@scala.throws[Exception](classOf[Exception])
override def onUpstreamFinish() = {
if (buffer.isEmpty) complete(outChunks)
else emitBuffer()
}
})

setHandler(outChunks, new OutHandler {
def onPull() = {
tryPull(inBytes)
setHandler(outChunks, eagerTerminateOutput)
}
})
}
}
>>
if haskell is so great, why chome uses javascript?
>>
File: ?.gif (1002KB, 250x251px) Image search: [Google]
?.gif
1002KB, 250x251px
>>58720971
>>
SDL vs SFML, which is better?
>>
>>58720971
you can say the same about c/c++
>>
File: 1469583171814.png (350KB, 621x393px) Image search: [Google]
1469583171814.png
350KB, 621x393px
>lecturer starts introducing C
>girl in the class asks if it has double so that it can represent numbers with two decimal places
>asian asks if it has classes, lecturer says no, so asian concludes it must not be useful for complex programs
>>
>>58720939
>
t.Posts.Count() < 300

310

Better yet,
t.Posts.Count() < board.BumpLimit
.
>>
>>58721032
Why are asians so fucking stuck up? They usually aren't as smart as they think they are.
>>
>>58721032
>so asian concludes it must not be useful for complex programs
This is somewhat true, though.

No one writes anything complex in C unless it has to be that low of level. Even then, C++ is used instead for the best of both worlds.
>>
>>58721054
>complaining about asians but not the girl
>>
>>58721013
SFML is meant to be used standalone and it comes with everything you need to make a 2D game without touching OpenGL yourself.

SDL is more of a basic platform abstraction library (including a super low level audio abstraction module), but it comes with useless things like its renderers and thread/filesystem stuff that is probably in your standard library anyways. You need extension libraries to do things like higher level audio and image loading anyways.

GLFW is better than SDL if you just want a window with input and an OpenGL context. SDL is more battle-tested despite half of the library being useless for anything substantial.
>>
>>58721042
Good point, I'll add board constants
>>
What's good replacement for c++ if you don't care if it has gc or no?
thinking about chapel, d, ocaml, sml?
>>
>>58721117
If you're okay with GC you should probably just use C#, it's got much better support than D. OCaml is its own thing, no reason to use SML if you can use OCaml, and Chapel is its own thing.
>>
>>58721117
haskell
>>
>>58721129
>C#
microshit
>no reason to use SML
Standardized language with many implementations compared to lang with only one implementation
>>
File: anal beads.png (9KB, 749x117px) Image search: [Google]
anal beads.png
9KB, 749x117px
>>58721087
Just making sure, you're going to actually check the json to get the bump limit value at runtime, right?

Bump limits change, and they're different from board to board.
>>
Rate my script, /dpt/!
#!/usr/bin/perl

use v5.14;

$a = <>;
$a = reverse $a;
$a =~ s{(\d)(\d)?(\d)?([0-3])?}
{("M" x $4) .
(($3 == 9) ? "CM" :
(($3 > 4) ? ("D" . ("C" x ($3 - 5))) :
(($3 == 4) ? ("CD") : ("C" x $3)))) .

(($2 == 9) ? "XC" :
(($2 > 4) ? ("L" . ("X" x ($2 - 5))) :
(($2 == 4) ? ("XL") : ("X" x $2)))) .

(($1 == 9) ? "IX" :
(($1 > 4) ? ("V" . ("I" x ($1 - 5))) :
(($1 == 4) ? ("IV") : ("I" x $1)))) }ex;
say ($a);
>>
>>58721117
common lisp
it's better than sepples or java
has CLOS
>>
>>58721160
>microshit
DevDiv, so this isn't inherently anything against the language.

>Standardized language with many implementations compared to lang with only one implementation
This isn't inherently good.
>>
>>58721082
I just want to do some graphics programming which probably entails getting deeper into opengl. I've been comparing all 3, I like the look of GLFW but it pissed me off because apparently there's no way to get a floating window in i3 wm, I tried using the floating window hint from the docs but it always tiles no matter what and I have to manually detach the window instead of having it start floating. This isn't an issue with either of the other 2.
>>
>>58721165
Yeah, basically I'll add it as a lazy evaluation. Once the user checks one board's bump limit (or any other constant), it'll get downloaded and cached for all other boards to use. The idea is that the bump limit won't change while the application is running.
>>
>>58721117
>What's good replacement for c++ if you don't care if it has gc or no?
C#, depending on your other goals for the language.
>>
>>58721183
If you just want a window and OpenGL context, no reason to use SFML over either of the others. Between SDL and GLFW then I guess it comes down to that.
>>
>>58720859
I'm currently on a facebook messenger bot
I'm using heroku to host and i configured the facebook's webhook with this
But is it possible to work on local with heroku ? or am i supposed to push every time i want to check if it works ?
I've seen that ngrok do this , can i do the same with heroku or bitbucket or anything similar ?
>>
>>58721060
C is used for the Linux Kernel and the majority of NASA's control software on shit that goes to space, that's pretty complex to me.

>>58721032
The asian is an idiot, but if you guys are just starting adn haven't done a course where you've covered single and double precision it's a simple wrong assumption to make.
>>
>>58721117

If you need to keep C++'s low-level characteristics (i. e. you need a language that has pointers and compiles to object code), then Object Pascal.

If a high-level language is okay, then Ruby.
>>
>>58721062
Her question was so stupid I thought it didn't even merit a comment tbqh.
>>
>>58721239
To take the course you already need two semesters in Java (or an accelerated single semester equivalent) and that kind of thing was covered very early on.
>>
>>58721239
>C is used for the Linux Kernel and the majority of NASA's control software on shit that goes to space, that's pretty complex to me.
Nice reading comprehension, dumbfuck.
>>
$ cat cpu
#!/bin/bash

CPU=`sed '/^model /!d;s/^.*: //' /proc/cpuinfo`
CPU_A=`echo "$CPU" | wc -l`
CPU_B=`echo "$CPU" | head -n 1`
CPU_C=`lscpu | sed '/^CPU M/!d;s/^.*:\s*\([0-9][0-9]*\)\..*$/\1/'`
CPU_T=`sensors | sed '/^Core 0/!d;s/^.*\s\([+|\-][0-9\.]*.C\)\s.*$/\1/'`


printf "%s x%s (%s - %s MHz)\n" "$CPU_B" "$CPU_A" "$CPU_T" "$CPU_C";
$ ./cpu
Intel(R) Celeron(R) CPU N3150 @ 1.60GHz x4 (+46.0°C - 482 MHz)


what is my script missing?
>>
>>58721239
nope, you are wrong, some faggot said that C sucks and NASA used common lisp
>>
>>58721060
>"No one writes anything complex in C"
>he wrote, on his computer whose entire software stack is written in C
>>
Are there any easy/simple ways to prevent human error in your gui application?

Stuff like inputting invalid information that would cause a crash or just regular fuckery?
>>
>>58721270
remove the human
>>
>>58721269
see
>>58721259
>>
>>58721270
Event-driven architecture.
>>
>>58721258
oh ok then, that's a red flag desu

>>58721259
>Even then, C++ is used instead for the best of both worlds.
:thinking:
>>
>>58721270
Limit human input.

Think of what they should be allowed to put in, and whitelist that, rather than thinking of what you want to prevent them from putting in.

To this end, make use of selection inputs rather than text boxes, and masked inputs for those where the user can type something in.
>>
>>58721270
You need to validate input at the source.
>>
>>58721270
do it in haskell, it's type system will do the work for you
>>
>>58721294
>:thinking:
Kill yourself.

I could have clarified with "often", but C++ is typically/often used when low-level is a requirement.

There are exceptions.
>>
>>58721280
PostgreSQL is written entirely in C, just to give you an example, you fucking idiot.
>>
>>58721282
t. Rajesh
>>
>>58721259
what kind of stupid are you?
>>
>>58721279

Stop blaming the user.

https://www.schneier.com/blog/archives/2016/10/security_design.html

>>58721320

Since when do Pajeets understand advanced software engineering concepts?
>>
>>58721335
>event-driven
>callback and mutable state hell
>advanced
>>
>>58721316
your life must be pathetic
>>
>>58721345
It's actually quite nice.
>>
>>58721344

>callback hell
Only if you use functional trash. Object orientation provides you more sophisticated mechanisms.

>mutable state hell
Have you ever heard of a finite state machine? Wasn't so hard to fix it, see? You're such a rookie.
>>
>58720971
>(you)
>>
>>58721379
FP doesn't use callbacks because they inherently require mutable state. If it's a function that you pass in, is used, and then the higher order function returns, it's not a callback.

OOP however is how you get mutable state hell.

>Have you ever heard of a finite state machine?
What does that have to do with it?

A functional programmer looks at an asynchronous system and thinks in terms of futures and continuations.
>>
File: 1458717783654.jpg (92KB, 485x594px) Image search: [Google]
1458717783654.jpg
92KB, 485x594px
>In the real world, we have enough risk that we get insurance against it and that insurance has requirements as a result of statistics e.g. 'you must have a door lock'. There isn't as yet an Internet parallel.

>Take posting on Facebook. Without some sort of operational security (read: thinking before pressing Enter), deciding whether or not to indicate that they're on holiday this next week to the entire world is pretty much up to them, as are the consequences. It's impossible to tailor software to prevent that as a threat model, so the prevention has to be punitive on the user. What's going to be more effective - trying to default posts to only trusted associates, and then trying to figure out who is trusted and prevent the user from trusting random strangers, and... or an insurance company refusing to pay out for theft when the user posted their whereabouts on public media?

>So we do train users all the time. The problem is that we currently try to train them to be computer specialists, and we should train them in managing their risks and exposure.

>Just look at the phrase 'this certificate has expired' to demonstrate that the author of that message is completely and utterly clueless about how to convey risk to a user.

Makes you think.
>>
>>58721410

You're so full of shit.

>passing a function and making use of it is not a callback, okay?
>OOP is to blame for mutable state hell, even though OOP solves it

Please stop, there can be no debate between us. There can be class if you want. But not discussion.
>>
anybody versed in lisp macros here?
I want to write a range macro that mimics python's range function
but I haven't reached the macro chapter yet
can somebody write it for me pls
>>
What should I seek for if I want to read about firmwares on chip and phone cards?
>>
>>58721494

Here's a breadcrumb.

https://en.wikipedia.org/wiki/MIFARE
>>
>>58721486
>passing a function and making use of it is not a callback, okay?
It's not. Nobody calls map's function parameter a callback.

>OOP solves it
This delusion. OOP restricts how you can mutate state, but it has nothing to do with when and where it is allowed which is the real problem.
>>
I hate all this "language" bullshit. Can I just use typed lambda calculus instead?
>>
>>58721689
make an interpreter for lambda calc
>>
What should I use to learn R?
>>
>>58721725
Brain
>>
>>58721689
use LL grammar to make interpreter
>>
>>58721689
>Can I just use typed lambda calculus instead?
What exactly do you mean by this?

I suspect your goals have been met by multiple modern languages.
>>
>>58721725
Just use the wikibook, man.
https://en.wikibooks.org/wiki/R_Programming
>>
>>58721707
>>58721742
What should I write it in? I'm only familiar with C and Haskell but I'm still pretty mediocre at them.
And would it be possible to rewrite it in itself later or that's just too hard for me at this point?
>>58721750
I mean exactly that, using lambda calculus instead of all the language nonsense.
>>
//This is a single-line comment!!!
/*HELLOOOOOOOOOO
*This is a delimited comment which may span multiple lines!!!
*/
/*//-->Below is different data types and their usage points!!!
int num01; //variable declaration!!!..int = no decimal places
float decimalpoint = 10.4; //decimal point number!!!
num01 = 20; //initialize variable!!!
double decimalpoint = 10.4 //float but with more precision!!!
bool trueOrFalse = true;//boolean...value/variable that could be true or false!!! --> this value same as 0's and 1's that make up computer but we just call it true or false instead!!!
string sentence = "Hello World!";*/

} //() -->whatever inside here = parameters!!!
>>
>>58721689
Try Haskell
>>
>>58721779
haskell, because its meant to write compilers or whatever
>>
>>58721822
Is that why the Haskell compiler is written in C?
>>
>>58721828

DELTE THIS
>>
>>58721828
>Haskell 82.3%
>C 10.5%
>>
>>58721828
what did he mean by this?
>>
>>58721850
Why did you need 10.5% C? The C compiler is 100% C, it doesn't have 10.5% Haskell in it.
>>
>>58721875
>Why did you need
I didn't, I didn't make GHC
>>
>>58721891
Oh I see, so you only use it? Do you use all of it or only the 82.3% Haskell part?
>>
File: 1461855737145.jpg (209KB, 600x582px) Image search: [Google]
1461855737145.jpg
209KB, 600x582px
>>58721875
>The C compiler
>>
>>58721875
GHC comes with some C headers and libraries for platform and FFI stuff.
>>
>>58721900
>Do you use all of it or only the 82.3% Haskell part?
None of it actually
>>
>>58721929
Good for you then.
>>
>>58721779
It doesn't matter, whatever you find more convenient for you. Do lexical analysis, do syntax analysis and build a parse tree. Having a parse tree, you can translate it into an asm or a bytocode for a vm or another language.
>>
can I hack tinder so I can get some matches? no one likes me ;c
>>
File: 1480379463164.png (15KB, 300x300px) Image search: [Google]
1480379463164.png
15KB, 300x300px
>>58721933
>being a plebbitor
>>
>>58721977
>somebody call me out on my faggotry!
>quick, I gotta imply he came from reddit otherwise my reputation on this anonymous Crimean Matryoshka image board will be ruined forever!
>>
>>58722023
>somebody call me out on my faggotry!
Yes, you are correct. I did call you out on your retarded faggotry since you seem to think there is such a thing as "The C compiler"
>>
>>58721117
go
>>
>>58722038
>can't refute him
>appeal to linguistic pedantism
>be a faggot on top of it by posting pictures of mongolian make-believe drawings
Your rectal shattering is showing.
>>
>>58722059
Refute what? You didn't make any claims
>>
>>58722072
So you got mad over nothing? Whoa, that can't be good for your health!
>>
>>58722107
Do you need a glass of water or something?
>>
>non-arguments
>>
>>58722146
naa
>>
>>58722146
>This is a non argument
>>
>>58721789
Is this for the tutorial you TA or some shit
>>
>>58722160
>Ceci n'est pas un argument
>>
>>58722172
je t'aim beacoup
>>
TAKE A JOG YOU DIRTY FROG
>>
>>58722107
your life must be pathetic
>>
how would i go about running an sqlite script from the command line once a day automatically?
>>
>>58722336
cron
>>
File: 1481100956747.jpg (33KB, 400x387px) Image search: [Google]
1481100956747.jpg
33KB, 400x387px
>>58720859
I'm making a game!
>>
>>58722336
systemd timers
>>
>>58720859
Who here /practical-C/ ?

Do you write easily readable code ?

Do you use comments ?

For both cases how far is too far ? I feel like the book is way too far gone in the comment case at least.
For example: The book is fine when it tries to teach you to write explicit name for variable, but then it goes on with commenting the variable declaration.
int money_bank_account; //the money i have in my bank account


Isn't this stupid ? i mean retarded ?
>>
>>58722395
Which book is this?

The comment is very retarded, don't write comments that state the obvious.
>>
File: Screenshot_2017-01-30_12-41-00.png (75KB, 853x749px) Image search: [Google]
Screenshot_2017-01-30_12-41-00.png
75KB, 853x749px
I want to give Common Lisp a bit of a try, which one should I install
>>
>>58722470
http://clisp.org/
>>
>>58722395
>Isn't this stupid ? i mean retarded ?
it's redundant unless you're doing contract systems programming where you want to be as explicit as possible because lives depend on it

for the rest of us, int money_bank_account; is fine
>>
>>58722395
Document critical sections of your code and document it properly. The comment you presented is scrap.
// Available amount of money in cents stored in the bank account. A negative value indicates a debt.
int money_bank_account;
>>
>>58722470
>want to give Common Lisp a bit of a try, which one should I install
haskell
>>
>>58722481
>logo is a menorah
>falling for the programming jew
>>
>>58722481
fucking no, that shit is jew
>>
>>58722481
this
>>58722500
>>58722534
jews are white and based
>>
>>58722566
Get out Chaim
>>
I chose Python as my first language and got to an intermediate level, then I decided to look at C/C++.

Managing locations in memory is really cool, it makes me feel like I'm in control.

Having said that, holy fuck C++ is ugly. Makes me appreciate Python so much more, even with its performance overhead.

Having said THAT, Python now feels like a toy language in comparison.
>>
@58722566
t. jeremiah goldberg
>>
>>58722395
Comments like that can make your code look like an unreadable mess. "money_bank_account" is documentation enough, though I'd go with "account_balance" or something. Commenting a variable declaration should be for when you're using some form of datastructure or array or the variable name isn't intuitive.
>>
>>58722596
You might also want to look at rust
>>
is there anyway to call a .bat file from the web browser?
>>
>>58722596
Now you're ready for the best of bost worlds.

Try C# or F#.
>>
>>58722596
If you want complete control, use C.
>>
>>58722445
>>58722488
>>58722490
It's from "oreilly practical c programming 3rd edition"
What i posted isn't from the book though and maybe exagerated, but it's what i think he wants me to do when i read his comments on comments.
this is from the book :
struct rectangle {
int width; /* Width of rectangle in pixels */
int height; /* Height of rectangle in pixels */
color_type color; /* Color of the rectangle */
fill_type fill; /* Fill pattern */
};


And he says to comment variable declarations which i think is wrong because they states the obvious most of the time.
>>
>>58722395
typedef int money;

>>58722470
sbcl
>>
>>58722630
Yes to the former, not so much to the latter, unless you really know what you want out of the language.
>>
>>58722627
it's pretty easy, just make a browser with haskell and a OS with haskell
>>
>>58722659
>
struct rectangle {
int width; /* Width of rectangle in pixels */
int height; /* Height of rectangle in pixels */
color_type color; /* Color of the rectangle */
fill_type fill; /* Fill pattern */
};


thats trash and not necessary at all.
>>
>>58722627
Put it back, Tyrone.

>how I hack sister
>>
>>58721170
6.4/10
>>
>>58722676
Irony is that I don't know what 'fill' is for
>>
new View.OnClickListener() {
@Override
public void onClick(View v) {
AutoTransition autoTransition = new AutoTransition();
autoTransition.addListener(new Transition.TransitionListener() {
@Override
public void onTransitionEnd(Transition transition) {
// reference View.OnClickListener
}
});
}
};


how would one construct a
this[/spoiler] statement to reference the View.OnClickListener within which the Transition.TransitionListener is contained
>>
>>58722627
Go away Mr. Hackerman.
>>
>>58722659

struct rectangle {
int width;
int height;
colour_type colour;
fill_type fill;
};
>>
>fuckin raffin
http://harmful.cat-v.org/software/c++/I_did_it_for_you_all

not sure if fake though
>>
>>58722713
Don't make the OnClickListener anonymous.
>>
>>58722690
how it fills the rect, whether solid or dashed or lerped,etc?
>>
>>58722679
>>58722715

i know it sounds retarded but its actually for work. The app i made for the staff runs in the web browser (their request) and i need to have a button or something that runs a script that imports csv data into an sqlite table. I have a .txt file with the commands which i run with a .bat file
>>
Best common lisp book?
>>
>>58722770
the jew one
>>
>>58722770
seek for /fpt/ pasta
>>
>>58722761
You're not explaining this well.

Let me get this straight:
>user has a sqlite db on their machine
>user has a csv file on their machine
>user has a batch file on their machine
>your website should activate the batch file that does things to the user's machine

Is this correct?
>>
>>58722661
Well i say F# because it has a lot of the nice things python has that C# doesn't. Namely low verbosity.
>>
>>58722747
the thing is that im defining all this in a method, and then it needs the reference to the OnClickListener final, which then announces that the reference might not have been initialized
>>
>>58722770
giganiggers practical common lisp
>>
>>58722770
Let Over Lambda
Common Lisp Object System
The Art of the Metaobject Protocol
>>
Holy shit, the .NET Core stuff is so good. I can build my lib for whatever platform I want, and customize what dependencies I need for each platform. Love it.
>>
>>58722804
>low verbosity
Not always a good thing.

You can golf most languages down to very few characters, but the shorter it is, the more difficult it is to read, regardless of your expertise with the language.

In many cases, languages like C# or Java have verbosity in places that don't make sense for a 30-line, trivial program, but some of this boilerplate becomes extremely necessary for the organization of data access when an application grows to a significant size.

What's your favorite example of F# taking advantage of less-verbose syntax?
>>
>>58722828
.NET Standard 2.0 soon, brother.
>>
>>58722797

everything is on the server, staff goes to location of the app via web browser, the app needs to use data that gets updated daily, in order for it to use the updated data every day, i need to run sqlite command that imports the newly added data from a .csv file into a table in my sqlite db which is then ultimately displayed through the app
>>
>>58722854
Python manages to achieve maximum readability with low verbosity, it's probably its greatest strength IMO
>>
>>58722329
You sound frustrated.

Captcha: ROAD NORMIE
>>
>>58722807
Something like this?
private void performClick() {
new View.OnClickListener() {
@Override
public void onClick(View v) {
AutoTransition autoTransition = new AutoTransition();
autoTransition.addListener(new Transition.TransitionListener() {
@Override
public void onTransitionEnd(Transition transition) {
performClick();
}
});
}
};
}
>>
>>58721117
Those are some hilariously different languages.
>>
>>58722862
If everything is on the server side, how is this an issue?

Just call the batch file with whatever language you're using.

System.Diagnostics.Process.Start(@"c:\muhwebapp\muhbatchfile.bat");
>>
>>58722796
>/fpt/
What happened to it by the way?
>>
>>58722481
> i i i i i i i ooooo o ooooooo ooooo ooooo
> I I I I I I I 8 8 8 8 8 o 8 8
> I \ `+' / I 8 8 8 8 8 8
> \ `-+-' / 8 8 8 ooooo 8oooo
> `-__|__-' 8 8 8 8 8
> | 8 o 8 8 o 8 8
> ------+------ ooooo 8oooooo ooo8ooo ooooo 8

fuckyou
>>
>>58722869
I don't disagree, but I was more wondering about this in relation to F#.
>>
>>58722903
Functional programming is dead
>>
>>58722903
not enough jobs kek
>>
>>58722884
no, more something like
private void setupButton {
final View.OnClickListener buttonListener = new View.OnClickListener() {
@Override
public void onClick(View v) {
AutoTransition autoTransition = new AutoTransition();
autoTransition.addListener(new Transition.TransitionListener() {
@Override
public void onTransitionEnd(Transition transition) {
// transition removed the original button
getNewButton().setOnClickListener(buttonListener);
// this wont compile, because buttonListener might not have been initialized
}
});
}
};
}
>>
>>58722903
It was forced.

FP-friends still posted in /dpt/ anyway, because 90% of their posts are comparing their 5 lines to another languages 7 lines and feeling smug.
>>
>>58722739
fake and gay
>>
>>58722902

k thanks
>>
>>58722854
>Not always a good thing.
no, it's always a good thing.

>What's your favorite example of F# taking advantage of less-verbose syntax?
here's C#

Lots of examples. here's a small one.
class Point {
float X {get; private set}
float Y {get; private set}

public Point(float _x, float _y) {
X = _x;
Y = _y;
}
}

class MuhApp {
public static void main(string[] args) {
var point = new Point(0, 0);
}
}


F#:
type Point = {
X : float
Y : float
}

let point = {X = 0.0, Y = 0.0}


inb4
>but that's just cherrypicking an example
yes, but there's tonnes of stuff like this in F#. C# codebases regularly become 3-10 times smaller when ported to F# depending on the program.
>>
>>58722931
Oh, like that. You cannot do that in Java. The best way to deal with that is to make the View.OnClickListener a private final field.
>>
>>58722903
It was during the holidays
>>
>>58722961
im trying to dodge solving it like that because i will have lots of buttons like that
>>
Post feminine code in your favorite language. I'll start:

use std::mem::transmute as crossdress;

struct Boy;
struct Girl;

fn main() {
let Hime: Girl = unsafe { crossdress(Boy) };
}
>>
>>58722959
You're literally proving my point with this post.
>>
>>58722998
explain
>>
File: strong typing haskell.png (33KB, 552x328px) Image search: [Google]
strong typing haskell.png
33KB, 552x328px
>>58722995
doesn't work
>>
File: 1480181234246.png (311KB, 652x669px) Image search: [Google]
1480181234246.png
311KB, 652x669px
>>58722995
>>
>>58722972
class SomeActivity extends Activity {

private View.OnClickListener getButtonListener() {
return new View.OnClickListener() {
@Override
public void onClick(View v) {
AutoTransition autoTransition = new AutoTransition();
autoTransition.addListener(new Transition.TransitionListener() {
getNewButton().setOnClickListener(getButtonListener());
});
}
};
}
}
>>
>>58722650
Yeah because Python already taught me about OOP, I think I'm skipping cpp and sticking with C to better understand architecture level stuff. I'm reading through

>Computer Systems: A Programmer's Perspective (3rd Edition)

Has anyone else read this? I'm liking it so far
>>
>>58723033
i've decided to fix it properly but if i fail ill fall back to this
thank you my dude
>>
>>58720859
Game engine/library

Current depends on the following:
sqlite3
glfw3
sdl2 (alt frontend)
curses
openal
llvm (JIT compiler for AI and music)
chibi-scheme

The JIT compiler is needed for AI since a genetic algorithm is in use to configure AI over time instead of having set difficulty and the music/sound effects generator which runs the same expression over and over (why it needs to be compiled to native).
The engine is now being changed to be modular with libraries loaded at runtime allowing for more than on video, audio, ect... library to be used.

All is being written in C with support for both compiled and interpreted (by chibi-scheme) mods. The use of Scheme might change at later stages
>>
>>58722902

do you know if this is possible on IIS? i tried googling and only found people wondering the same thing
>>
>>58723000
>In many cases, languages like C# or Java have verbosity in places that don't make sense for a 30-line, trivial program, but some of this boilerplate becomes extremely necessary for the organization of data access when an application grows to a significant size.

Excluding the boilerplate, considering we're talking about the creation and assignment of an instance of a class to a variable:
class Point
{
public float X { get; set; }
public float Y { get; set; }
}

var point = new Point { X = 0, Y = 0 };


I'm not trying to golf this. Pointing at these two examples and saying NO MINE'S SHORTER is just silly. There are keywords in the C# code that have meaning that is not explicit in the F# code.

Also, consider that the class/Main method structure is already created for you when you start a C# project. The constructor is not necessary for the manner in which you're creating the instance, either.

Also, this I'm not sure about: in your F# code, what if there's another visible type that has the same properties, like just X and Y? Does your program still compile and assume one, or is there an ambiguity error?
>>
File: unfeminine code.png (40KB, 1627x335px) Image search: [Google]
unfeminine code.png
40KB, 1627x335px
>>58723010
>>
>>58723090
Couldn't that class be written as just
class Point
{
public float X;
public float Y;
}
>>
I'm working on the pro/g/ramming challenge 1.3 and my password generator segfaults for seemingly no reason.
This is driving me insane.
string getPass(int length, bool symbols, bool numbers, bool lower, bool upper){

cout << "test1"<<endl;
string caseUpper[26] = {"A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"};
string caseLower[26] = {"a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"};
string number[10] = {"1","2","3","4","5","6","7","8","9","0"};
string symbol[16] = {"!","@","#","$","^","&","*","(",")","-","_","+","=","<",">","?"};
cout << "test2 " << endl;
string password = "";

srand(time(0));
bool change = true;
int r = rand();
int cadence = r%2;
for (int i=0;i<length;i++){cout << "test3" << endl;
if (cadence < 2){cout << "test4" << endl;
cadence+=3;
if (symbols){cout << "test5" << endl;
password+=symbol[(((r/47)+cadence-i)%16)];cout << "segfault here??" << endl;
}
else if (numbers && !symbols){cout << "test6" << endl;
password+=number[((r/47)+cadence+i)%10];
}
else if (!numbers && !symbols){cout << "test7" << endl;
if (cadence%2==0){cout << "test8" << endl;
password+=caseLower[((r/47)+cadence+i)%26];
}
else{cout << "test9" << endl;
password+=caseUpper[((r/47)+i)%26];
}
}
}
else{cout << "test 10" << endl;
cadence--;cout << "or here?"<< endl;
if (upper && change){cout << "test11"<<endl;
password+=caseUpper[((r/(i+1))%26)];
change = !change;
}
else if (!upper && lower && change){cout << "test 12" << endl;
password+=caseLower[((r/(i+1))%26)];
change = !change;
}
else if (upper && !change){cout << "test 13 "<< endl;
password+=caseUpper[((r/(i+1))%26)];
change = !change;
}
}
}
}
>>
File: C vs OOP.png (12KB, 767x360px) Image search: [Google]
C vs OOP.png
12KB, 767x360px
>>58723158
>>
>>58723090
>but some of this boilerplate becomes extremely necessary for the organization of data access when an application grows to a significant size.
like what? you can do all the same stuff in F# as you can do in C#. Just in F# there's also lots of things that can be much much simpler.

You're code is not equivalent to what I wrote, the F# and C# examples are immutable. That should have been pretty obvious.

>all that other shit you said
yeah. All i said was you can write shorter and equally clear shit in C#, if not cleaner. I was responding to your point that F# is harder to read. You seem to be saying it doesn't matter that's it's shorter or something. Whatever. I prefer things to be shorter when it doesn't make them less readable.

>Does your program still compile and assume one, or is there an ambiguity error?
I forget. Ambiguity error I think... You might need to specify which record you're trying to create in that case. Similar to type ambiguity in C#.
>>
>>58723161
I've found the error: you're using a shit language.
>>
>>58723158
not immutable.
>>
>>58723163
A C struct is not the same as a class.

Also, there are structs in C# that can be created with the exact same syntax as that C code.

Is this a bait image? Because I took the bait, in hopes that you maybe didn't know.
>>
>>58723161
for a project that simple just use Python. That code looks like a hot mess
>>
>>58723183
>c++
>shit language
have fun using java, pajeet

>>58723208
you're probably right. i'll just scrap it
the thing is though if I can't do this simple thing in c++ how would I ever be able to do more complicated things?
>>
>>58723242
I wouldn't scrap it, you should see it through especially when you've already written that much. Try stackoverflow if /g/ isn't helpful
>>
>>58723242
Java being objectively terrible doesn't stop c++ from also being terrible.
>>
>>58723242
>if you don't like C++, you must like Java

The fuck are these mental gymnastics?
>>
>>58723291
tbf Javafags do the same thing with Haskell
>>
>>58723161
>using a literal string to test for ascii characters
they have integer ranges.... all you need to do is check if it's lower or greater which is (c > value below '0' && c < value above '9')
>>
>>58723291
I was memeing. This is what you people like: to make fun of Indians in tech who work with java.
>>
>>58723322
>>>/reddit/
>>
>>58723322
>I was """""memeing"""""
This is blatantly impossible.
also see >>58723352
>>
>>58722995

void Main()
{
Boy michael = new Boy();
Girl michelle = ((object) michael) as Girl; // Objectified
}

class Boy {}
class Girl {}


alternatively

void Main()
{
Boy michael = new Boy();
michael.penisLength = 2;
Girl michelle = crossdress(michael);

Console.WriteLine(michelle.penisLength); // Result: 0
}
struct Boy {
public int penisLength { get; set; }
}
struct Girl {
public int penisLength => 0;
}

unsafe Girl crossdress(Boy boy)
{
return *((Girl*)(&boy));
}
>>
>>58721117
If you want C-like syntax, C# maybe? If not, then Racket.
>>
>>58721875
>the C compiler is 100% C
which one?
>>
>>58723367
>penisLength = 0
how is this possible?
>>
>>58721261
better variable names
>>
>>58723399
it's a feminine penis
>>
>>58721487
(in-range from to step)
>>
In closures vs classes aren't closures terribly inefficent or can compilers do some magic...
Sounds like bad idea to create closure when you just need something like c struct.
>>
>>58722336
cron.daily
>>
>>58723472
>>
>>58723505
>classes
stopped reading right there
>>
File: subway.jpg (53KB, 800x603px) Image search: [Google]
subway.jpg
53KB, 800x603px
Hello.
I am having some trouble finding the right resources for my android development.

I want to make an app for my city subway system.
I want to show a map like this and catch when they click on one of the subway stations to give options etc.
How do I catch the click on the correct spot/station? If I just use a image then as far as I know this far, I would only be able to know if they clicked on the picture, but not where they clicked. Should I use some sort of LayerDrawable?
I have trouble asking google as I dont know the question to ask.
Anyone here who can help me?
>>
>>58723367
{-# LANGUAGE DeriveDataTypeable #-}
module Smuggle where
import Control.Exception
import Data.Typeable
import System.IO.Unsafe

newtype Smuggle a = Smuggle a deriving Typeable

instance Show (Smuggle a) where
show _ = "Smuggle"

instance Typeable a => Exception (Smuggle a)

smuggle :: Typeable a => a -> b
smuggle x = throw (Smuggle x)

recover :: Typeable a => b -> a
recover x = unsafePerformIO $ do
val <- try (evaluate x)
case val of
Left (Smuggle x) -> return x
Right _ -> undefined

data Girl = Girl deriving (Show, Typeable)
data Boy = Boy deriving (Show, Typeable)

girlsWashroom :: Girl -> Girl
girlsWashroom x = x

main :: IO ()
main = let
trap :: Boy
trap = recover (girlsWashroom (smuggle Boy))
in putStrLn (show trap)
>>
>>58723505
Depends on the language, as always.
>>
>>58722470
sbcl
>>
>>58723524
say common lisp but any "functional" language implementation with no low level struct.
>>
>>58723161
omg i'm such an idiot.
it was segfaulting because I never returned the string. fuck me there goes an hour of my life down the toilet.
>>
>>58723561
there are worse ways to race toward the grave anon
>>
>>58723520
Capture the touches.
>>
>>58723545
Then there's likely no difference. Closures are generally implemented the same as objects, just anonymous with only one method. In languages with proper values, stack allocation, etc. there's a significant difference between a struct with private fields and a closure.
>>
>>58723545
>>58723593
>In languages with proper values, stack allocation, etc. there's a significant difference between a struct with private fields and a closure.
I should add: just like there's a significant difference between a struct that's POD and a class with virtual methods.
>>
>>58723522
>System.IO.Unsafe

not haskell
>>
Rate my shellsort implementation!

void shell_sort(unsigned *arr, unsigned n)
{
unsigned i, j, h, v;
for (h = 1; h <= n / 9; h = 3 * h + 1);
for (; h > 0; h /= 3)
{
for (i = h + 1; i <= n; i++)
{
v = arr[i];
for (j = i; j > h && arr[j - h] > v; j -= h)
arr[j] = arr[j - h];
arr[j] = v;
}
}
}
>>
>>58723579
Thanks.
Seems like this is what I was looking for.
>>
Anyone know of a good BSD licensed voip library?
BSD so I can keep the entire project under ICS/BSD/MIT licences
>>
File: 2017-01-30-120622_360x53_scrot.png (1KB, 360x53px) Image search: [Google]
2017-01-30-120622_360x53_scrot.png
1KB, 360x53px
>>58723512
>>
>>58723628
>for (h = 1; h <= n / 9; h = 3 * h + 1);
>>
>>58723628
Who gives a fuck?

Go do something useful with it.
>>
>>58721264
>NASA used common lisp

0/10

NASA primarily uses C, and previously relied on Ada which is and was popular among military aerospace where the original NASA engineers came from.

t. former JPL intern
>>
>>58723512
common lisp is a lisp-2
reference functions using FUNCTION
expand macros using MACROEXPAND
>>
reminder that if your language hasnt been used for space travel then its shit
>>
>>58723695
>t. my daddy works at NASA
>>
>>58723718
No, but I do.
>>
File: 979838884967452991.jpg (40KB, 350x347px) Image search: [Google]
979838884967452991.jpg
40KB, 350x347px
>>58723733
Why do americans lie about the moon landing?
>>
File: where are the proofs.gif (73KB, 100x100px) Image search: [Google]
where are the proofs.gif
73KB, 100x100px
>>58723733
>>
>>58723749
Sorry, that's classified information.
>>58723752
I'm smart and my father used to work there.
>>
Working on implementing multithreading manually using signals.

https://gitlab.com/sstewartgallus/async/blob/master/src/pthread.c
>>
File: 112987.jpg (31KB, 456x465px) Image search: [Google]
112987.jpg
31KB, 456x465px
>>58723777
Holy shit trips of truth
>>
Has anyone here implemented regular expressions using .FA before?

Bonus question: did anyone here have an intuitive dislike of the imperative flavour of PCRE before learning the theory behind why they're inferior to truly regular expressions?
>>
> look at other people's sandpiles
> All choke on trivial 240000 grains of sand
This is the power of sepples?
>>
>>58723785
why
>>
>>58723717
it makes all languages aside fortran irrelevant
>>
>>58723817
context?
>>
>>58723839
There's no context, I'm just pretending to be retarded.
>>
File: metaru.jpg (500KB, 1080x1080px) Image search: [Google]
metaru.jpg
500KB, 1080x1080px
fuck math
>>
>>58723839
Making sandpiles fractals got popular recently and almost all of them run like dog. Most are Java and c++
>>
Trying out recursion in Racket
#lang racket

(define (contains words word)
(cond [(empty? words) #f]
[(symbol=? (first words) word) #t]
[else (contains (rest words) word)]))

(define (sum x)
(define line (read-line (current-input-port) 'any))
(define y (string->number line))
(cond [(= y 0) x]
[else (sum (+ x y))]))
>>
>>58721487
This shouldn't be a macro. You can accomplish this very easily:
(defun range (base top &key (step 1))
(loop for i from base below top by step
collecting i))
>>
I'm coding a challenge as part of the recruitment process for a company.

They want me to build a multi-threaded grep that can recursively parse files in search of a pattern, and for each match to output the filename, byte offset, and a few character around the match.

And there are some other requirements: to not consume too much memory (even when being fed 4GB files), no leaks, proper error handling etc.
>>
>>58721689
have you met Mr Haskell
>>
>>58724046
You realize they're gonna take your code, use it in production and then reject you, right?
>>
>>58724076
Wow, they stole 40 minutes worth of work.

Tops.
>>
IS rust
>>
>>58724088
Why are you posting this here then?
>>
>>58724108
>implying i posted the original question
>>
>>58724124
Why are you being retarded then?
>>
>>58724090
Yes, rust is.
>>
>>58724076
It's a *very* large company. No way they're going to copy a fucking basic thread pool + std::future + some string matching functions hacked together in a few hours.
>>
>>58723016

datatype nat = Zero | Succ nat

fun mult :: "nat => nat => nat" where
"mult Zero n = Zero" |
"mult (Succ n1) n2 = Succ (addition n1 n2)"

>>
>>58720859
So I got put on anti psychotics and one of the side effects is almost complete loss of focus, I've been offered adderall to counteract it - will adderall effect my programming? if so how?
>>
why is the java logo a cup of tea? wtf?
>>
>>58724168
it's a cup of coffee
>>
>>58724189

so it stands for endless work hours?
>>
File: 1416085965090.png (249KB, 520x486px) Image search: [Google]
1416085965090.png
249KB, 520x486px
>>58724155
>""
>>
>>58724168
>>58724203
because the creator's ancestors were javanese pirates who used to smuggle coffee beans for the english empire.
>>
>>58724206
cute
>>
File: 1411494506898.gif (237KB, 500x281px) Image search: [Google]
1411494506898.gif
237KB, 500x281px
>>58724221
>>
>>58724206
in the proof assistant I'm using that's how HOL statements are written
>>
>>58724213
You could also call them FactoryAbstarctJavaBeanFactory
>>
>>58724131
Why are you being so confrontational in an anonymous image board?
>>
>>58723935
>[(symbol=? (first words) word) #t]
You can omit the #t in this case.
>>
>>58724245
Isabelle?
>>
>>58722770
http://landoflisp.com/
>>
>>58724280

Jack?
>>
>>58724155

>I fucked up

datatype nat = Zero | Succ nat

fun addition :: "nat => nat => nat" where
addition Zero n = n
addition (Succ n1) n2 = Succ (addition n1 n2)

fun mult :: "nat => nat => nat" where
mult Zero n = Zero
mult (Succ n1) n2 = addition (mult n1 n2) n2
>>
>>58724280
yes

>>58724309
could have used primrec since it always terminates
>>
can an interface type hold a reference to some class object that implements that interface even though the class has more methods than the interface
>>
>>58724420
Yes.
>>
>>58724134
What the fuck
>>
>>58724293
All of those books are great to learn Lisp.

I also have to throw in "Common Lisp Recipes" -- it contains a lot of information that is tricky to find, and it's a great reference. Not designed for newcomers, though.
>>
>>58724056
How is Haskell not a language? Also your reading comprehension is pretty shit
>>
>>58724420
What specific use-case do you have for this? It seems that this might not be the best approach.
>>
>>58724572

I dont have a use for it.

I'm studying Java at the moment.
>>
>>58724570
Haskell isn't a language it's a way of life
>>
>>58724572
I'm quite sure he's asking if a reference of an interface type can point to an object of an implementor of that type even if the object has other methods as well. Which is yes, of course.
>>
>>58724599
That would be LC, Haskell is still a language
>>
>>58724598
>I'm studying Java
I'm sorry.
>>
>>58724611
Ah, I interpreted the question a completely different way.
>>
Haskell is cute!
>>
File: 1483623719550.png (514KB, 810x698px) Image search: [Google]
1483623719550.png
514KB, 810x698px
>>58724778
>>
>>58724778
this is the conclusion i have reached as well
>>
I want to write a program that allows user registration upon first start.
The catch is that it has to be in console.
>>
>>58723695
remote agent motherfucker

the only fully automated spacecraft, maybe there's another now, but at the time that was unprecedented
>>
SICP is too easy.

Is there a version for people who already know how to program?
>>
>>58724813
user registration for what?
>>
>Decide to start programming 1 year ago
>Buy Head First C#
>"This books gay I'm just going to practice stuff in console apps"
>For a year don't really do anything beyond making trivial applications and gimmicky pseudo UI's for the console.
>Open up book again
>The first project has you making windows forms apps, connecting SQL database data to windows forms object controls, and setting up a deployable installer.

Guys I'm a retard. I'm going to go back and actually read through this stuff in this book because it actually seems fucking awesome.
>>
>>58721410
> FP doesn't use callbacks because they inherently require mutable state. If it's a function that you pass in, is used, and then the higher order function returns, it's not a callback.


i mean, technically it's all continuations and you don't need mutable state for those, but they're not exactly functions if they're undelimited (i.e. they don't return, versus a callback that returns to it's caller), but i don't think callback necessarily means something that has mutable state
>>
what is wrong with reference counting?
>>
>>58724865
leaks circular references
>>
>>58724850
That's the book I read.Really good, would recommend.
>>
>>58724828
Doesn't matter. Just that you have to register as admin upon running it one time, the rest you can register only as user.
No databases allowed
>>
>>58724901
What platform are you going to run it on?
>>
>>58724865
poor for performance poor for actual memory management because of pitfalls.
>>
>>58721410
wrong, and all callbacks are functional
mutability isn't anti functional in any way, and just because you're mutating function pointers doesn't mean you aren't doing FP
>>
File: ljV5jok.jpg (3MB, 6000x4000px) Image search: [Google]
ljV5jok.jpg
3MB, 6000x4000px
>>58723161
>string caseUpper[26] = {"A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"};
> string caseLower[26] = {"a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"};
> string number[10] = {"1","2","3","4","5","6","7","8","9","0"};
> string symbol[16] = {"!","@","#","$","^","&","*","(",")","-","_","+","=","<",">","?"};
>>
File: 41bBGPKITaL.jpg (21KB, 500x333px) Image search: [Google]
41bBGPKITaL.jpg
21KB, 500x333px
not sure if this is /diy/ or /dpt/ or /csg/ but I'm looking for some cheap RGB light bulbs that have blue tooth and some sort of API. Would be great if I could have every bulb in my house controlled by a RaspberyPi but I don't wanna pay $30 per bulb. Anyone know a cheaper option?
>>
>>58724917
Why does this matter?
>>
>>58724995
seems it would be better to have the circuits controlled by bluetooth instead of the lightbulbs
>>
How do I learn x86 assembly? Please respond.
>>
>>58725115
sorry, I forgot to mention RGB lights. Controlling the circuits wouldn't control the color.
>>
>>58725127
Read a book nigger.
>>
>>58725202
>n-word
Stop
>>
>>58725202
are you me? wanted to say the exact same thing with the exact same wording (without a comma too)
>>
New thread:

>>58725221
>>58725221
>>58725221
>>
New thread:
>>58725218
>>58725218
>>58725218
>>
>>58725202
Which book? :[
>>
>>58725241
>>58725237
Great
>>
>>58725228
I even thought about putting in a command, but decided against it.
Thread posts: 316
Thread images: 26


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

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


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