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


Thread archived.
You cannot reply anymore.



File: 1541591286787.jpg (356 KB, 1280x720)
356 KB
356 KB JPG
What are you working on, /g/?

Last thread: >>71826466
>>
File: 1562795884627.jpg (58 KB, 456x578)
58 KB
58 KB JPG
Lisp is a reasonably strong programming language.
>>
File: 1558348540150.jpg (252 KB, 706x1000)
252 KB
252 KB JPG
first for death to all cniles
>>
>>71834212
Clojure is a joy to work with so far how come there aren't more people using it??
>>
You're so good at this, Anone! I see you learned a lot of JavaScript so far!
>>
java was a mistake, how do I get a real job
>>
>>71834227
Is it really? What does it have over CL?
>>
>>71834227
>typlets
yikes
>>
>>71834158
A program which controls a gun designed to shoot me in the foot.
>>
>>71834242
Ease of deployment thanks to the JVM.
The JVM makes it so you are way more versatile while still staying lispy.
It somewhat also enforces you to be functional most of the time which is good for concurrency systems and it lets you bypass OOP.
It also has more built-in datatypes and you don't have to do gay shit just to be able to toy with hash tables.

It's just way too fun.
>>
Given an array with n integers, check if it could become non-decreasing by modifying at most 1 element.

We define an array is non-decreasing if array[i] <= array[i + 1] holds for every i (1 <= i < n).

e.g
Input: [4,2,3]
Output: True
Explanation: You could modify the first 4 to 1 to get a non-decreasing array.


Input: [4,2,1]
Output: False
Explanation: You can't get a non-decreasing array by modify at most one element.


p.s. The n belongs to [1, 10000]
>>
File: js.png (27 KB, 1200x1200)
27 KB
27 KB PNG
>let, const
>arrow functions
>array/object restructuring
>map, filter, reduce, flatMap for arrays
>rest/spread syntax
>module system
>async/await
Is there a language with a better redemption story?
>>
>>71834303
isn't this just finding at most one local maximum?
>>
>>71834313
It's been the standard for 25 years. What's there to redeem.
>>
>>71834304
Why would I seethe? As long as you don't do it I keep winning, because unlike you I've seen the data.

If there's someone who should seethe it would be you, because you keep losing.
>>
>>71834313
>literally just patching over holes that shouldn't exist in the first place
>a feature every other language has had since forever
>decent feature but not unique to JS
>decent feature but not unique to JS
>apply except retarded
>literally every language has this
>just retarded monads
>>
Reminder that C is asm for $9/hr Pajeets
>>
>>71834359
Ooooooh, someone's mad as hack.
>>
>>71834313
>>
>>71834359
>C++ is asm for $9/hr Pajeets
ftfy
>>
>>71834377
I know JS was developed in a weekend, but why are Christians too retarded to figure out transitivity after 2000 years?
>>
>>71834303
check = go True where
go _ [_] = True
go b (x : xs) | x <= head xs = go b xs
go b (_ : xs) | otherwise = b && go False xs
>>
>>71834337
the contradiction of the negation of an existential is an existential, not a particular individual.
>>
>>71834390
C++ is written in C, so by extension it applies to C as well.
>>
>>71834420
>no data
>still winning
>>
>>71834443
>anon demands data
>anon can't into logic
>>
>>71834449
>anon has seen data
>data confirms hypothesis
>ergo anon 2's logic is flawed

¯\_(ツ)_/¯
>>
>>71834412
Unless a transitive relationship can exist between 3 hypostases that share the same essence it would presumably break the unity of God.
>>
File: 1533433146668.png (12 KB, 532x119)
12 KB
12 KB PNG
This is what happens when you let Ctards write software.
>>
>>71834470
thanks for proving you can't even babby's first order logic
not that I expected differently from a cnile
>>
File: 1562761078467.jpg (84 KB, 750x669)
84 KB
84 KB JPG
is emacs worth learning for programming?
>>
>>71834499
>literally not even trying anymore

>>71834513
>still no data
>still winning

¯\_(ツ)_/¯
>>
>>71834313
>make shit language
>everyone thinks it's confusing and annoying
>associated with babies
>fix it by trying to copy functional languages
>babies follow suit
>async function (function (){() => {}}();) {}
>we did it guys we saved JavaScript
>>
>>71834499
>web dev in C
did the website use fast cgi or something
>>
File: 19fq7c002w021.png (906 KB, 1080x1087)
906 KB
906 KB PNG
>>71834313
I used to work with javascript for gaming, ESP with three.js for 3D and phaser.io for 2D and the biggest gripe (still) is/was the lack of:
A. A core/standard language design. I'm no expert on languages but having used multiple it just felt like JS was a tiny script combined with jquery and angular and at least a dozen other stuff to do what python can do without any imports (roughly speaking)
B. No deep/comprehensive ide for JS (or web dev , in general) as apposed to PyCharm or IntelliJ.)
What are your thoughts on my points, here? This language needs a complete makeover, IMO... OR maybe we need something different, fundamentally? Do let me know about your thoughts and this is also my first post on g! :)
>>
>>71834420
x elem {y : P(y)} => exists x. P(x)
>>
>>71834527
It happens when you try to retrofit lisp into java syntax
>>
>>71834543
Just use a transpiler from a better language to JS
>>
>daily "shill your favorite programming language" thread edition n. 0081764
>>
>>71834412
I reckon the "is" there is more like the inheritance "is" than the identity "is".
>>
>>71834519
hey!!! I just looked into this. I triiied and I mean i triiied to do CLI coding with vim or emacs and let me sum it all up for you:
- If you can get all the plugins and settings set up smoothly and quickly go for it. You can probably have a very efficient coding station with waaay more features (or better done) than the best IDE out there.
- Buuuuuttttttttt if its taking you a while/you're struggling to get anything to a point where it's at least HALF as productive as coding in AT LEAST sublime text or so then you're doing yourself a big disservice. Not to sy you shouldn't try just don't make it your priority.
>>
>>71834543
We just need to forget about it and pretend it never existed. It doesn't fill any purpose.
>>
>>71834646
>let's pack a bloated language in the browser
nah JS is fine
>>
>>71834604
I tried this working with the Godot Engine and the code it produced was incredibly inefficient. Of course this isn't /exactly/ a pure C++ to JS transpiler but I just don't think you'll get good results from this approach.
>>
whats so special/good about lisp?
>>
>>71834615
is this what happens alot in these threads? lol
>>
>>71834672
well the problem is the transpiler then. I guess they don't optimize their code or give a shit about it as long it works
>>
>>71834707
Web ASM should be a huge boon for the JS community then
>>
>>71834615
>daily "shill a programming language you've never used" thread edition n. 0081764
ftfy
>>
>>71834695
if you have a lisp, people might not understand you
>>
>>71834695
The lack of syntax and how easy it is to express ideas
>>
>>71834695
Nothing. Lisptards believe that quasiquoting is only possible if your syntax looks like (((this))).
>>
>>71834216
Should be any day now.
>>
>>71834819
>quasiquoting
what did he mean by this?
>>
File: 20190711_181406.jpg (151 KB, 750x668)
151 KB
151 KB JPG
>>71834519
1000 years in MS paint
>>
>>71834697
It's just so easy to endlessly bait people into arguing whichever programming language is less retarded since most of them are full of shit designs. Not to mention programming is pretty tiring for the brain, it makes sense this thread would be mostly used for funposting during mental recovery times.
>>
>>71834870
>inb4 LIES! C++ STRONK
>>
File: lab.jpg (76 KB, 438x750)
76 KB
76 KB JPG
>>71834695
(define (exponent b n)
(if (= n 0)
1
(* b (exponent b (- n 1)))))


You have 30 seconds to write a prettier exponentiation function.
>>
>>71834895
Is this recursive? Yuck.
>>
>>71834913
Only in terms of syntax, it's tail recursive in implementation so would share the same stack frame like an iterative function would.
>>
>>71834895
exponent b 0 = 1
exponent b (n + 1) = b * exponent b n
>>
>>71834895
in python this is just
exponent = lambda b,n:b**n
>>
>>71834895
)))))))))))))))))))))))))))):
>>
>>71834942
The ** notation is kinda ugly tbqh
>>
>>71834942
in haskell this is just
exponent = (**)
>>
>>71834822
New ones are made every day. It's just how the bell curve works. Some aren't C programmers by choice. They were pushed into it because of their high intelligence.
>>
>>71834967
here you go then
exponent = lambda b,n:pow(b,n)
>>
>>71835007
>wrapping pow in a lambda is technically writing a function so it counts
*golf clap*
>>
>>71834695
It's a programmable programming language.

Also, executable code has the same form as data, so you can easily write code that generates/alters code. - very useful in AI.
>>
>>71834870
Fair. I hadn't thought of that. I thought everyone were just warriors in here.
Lord knows I don't program enough to feel inclined to language war.
>>
>>71835050
>Also, executable code has the same form as data, so you can easily write code that generates/alters code. - very useful in AI.
interesting
>>
File: 15504935650870.jpg (101 KB, 418x486)
101 KB
101 KB JPG
The most important thing when working on the long term project is to make code age well, make it modular, make it extensible, make it testable, make it readable even if it makes it slower, write a lot of tests and good documentation.

I'm learning it the hard way right now.
>>
>>71834895
>>71834933
Now in O(log n) multiplications:
square n = n * n

exponent b 0 = 1
exponent b (2n + 1) = b * square (exponent b n)
exponent b (2n + 2) = square (b * exponent b n)
>>
Im gonna read the SICP book and read that it uses Lisp(Scheme) so im probably gonna pick up lisp if the book gets me hyped enough. What are general uses of lisp, besides AI?
>>
>>71835167
fucking everything
>>
>>71835167
Lisp isn’t used much in modern AI because statistical models trash them in most real world problems.
The only practical use of Lisp is to learn Clojure and write CRUD for JVM systems without touching Java.
>>
>>71835123
Do you have any more hot air you wanna share with us, or are you done now?

Here's an actual truth: writing proper code takes brains and effort. If you ain't got both, quit.
>>
>>71835236
T. angry cnile
>>
I'm trying to write a script in bash that prints out weather conditions for use in my i3status. However, the source material shifts back and forth on what its writing.

Last updated Jul 11, 2019 - 02:58 PM EDT / 2019.07.11 1858 UTC
Temperature: 75.0 F (23.9 C)
Relative Humidity: 87%
Wind: from the WSW (240 degrees) at 20 MPH (17 KT) gusting to 37 MPH (32 KT)
Weather: rain with thunder; mist; Cumulonimbus clouds, lightning observed
Sky conditions: overcast
Precipitation last hour: 0.06 inches


What I'm trying to do is make a hierarchy on what it should use. If the line "Weather:" exists I want it to use that. When that disappears I want it use "Sky conditions". I've tried using case statements and if elif but I can't seem to nail it down. What the is the proper way of doing this? I plan on repeating this for "Heat Index" "Wind Chill" and "Temperature" as well so I don't have to worry about shit shifting around on me.
>>
>>71835236
I'm done now. Thanks for taking time to read my post.
>>
>>71835246
I'm still waiting.
¯\_(ツ)_/¯
>>
>>71834158
I love this Yui
>>
>>71835167
read that book for the concepts, not just for lisp itself. they'll carry over to every language, you just won't learn any object-oriented stuff, but OOP is easy to pick up once you understand procedural and functional.
>>
File: ren big think.png (794 KB, 714x847)
794 KB
794 KB PNG
>>71834895
>>71834933
>>71834942
What would be the ideal syntax for this? So far I've come up with

exp(b, n) -> ((b * b) for n)
>>
>>71834216
Simple but cute.
I'd marry her.
>>
>>71835286
marry a cartoon?
>>
Lisp honestly has fuck all to do with AI.

>>71835273
Well, >>71834933 could look like
exponent b = fold 1 (b *)
and >>71835153 could look like
exponent b = fold 1 ((b *) . square) (square . (b *))
, given standard folds for unary and binary natural number data types.
>>
>>71835354
>Lisp honestly has fuck all to do with AI.
Do you think it has less to do with ai than any other language?

I have no idea, but just seems like a strange statement. It's like saying a hammer has fuck all to do with a house.
>>
>>71835367
>what the fuck is wrong with python's import system
nothing. you're just a tard
>>
what the fuck is wrong with python's import system? I want to use absolute imports to import things from files/directories above (in terms of directory structure) the current file, where the current file is a submodule of the greater project. I don't want to have to say shit like
from ....retard_project.submodule.specific_thing import cool_function

when I'd rather just say
from retard_project.submodule.specific_thing import cool_function

like every other language
>>
>>71835367
You do: “ Import foo.bar.baz “ and baz is now in the namespace. You can append an “as blah” to alias the imported module as whatever.
>>
>>71835354
>Lisp honestly has fuck all to do with AI.

https://ai.stackexchange.com/questions/2236/why-is-lisp-such-a-good-language-for-ai
>>
File: honor.jpg (94 KB, 852x461)
94 KB
94 KB JPG
>>71835354
Haskell can be pretty went it wants to but a lot of the stuff I've seen on gitbob makes it look messy with Int :: => x and sheit.
>>
>>71835388
>Do you think it has less to do with ai than any other language?
Obviously any Turing-complete language is somewhat related to any topic in computation. That goes without saying.

>>71835407
Those reasons are all valid reasons to use Lisp, but not really relevant to AI in particular over anything else.
>>
>>71835422
JS
 const exponent = (a,b) => Math.pow(a,b)
>>
>>71834158
Lisp is the most powerful programming language.
>>
I can't believe I am asking this but here I go I guess.

I promised myself I would never learn Java but since I am learning Clojure I figured it would be kinda stupid not to learn Java at the same time. Any good ressource to learn Java in depth? Thanks.
>>
>>71835407
Lisp hasn’t been relevant to ai since the 80s. It had all the thunder and dedicated hardware and still failed to produce sufficient results. Even prolog is more relevant in modern AI than Lisp.
>>
>>71835451
do you even work in the field?
>>
>>71835443
This is just a function wrapper my dude

Any language can be like my_exp(a, b) { return exp(a, b); }
>>
>>71835422
yes
F<B> foo<F,B,A>(Func<A, B> f, F<A> a)
where F : Functor

is so much readable than
foo :: Functor f => (a -> b) -> f a -> f b

and we're not even doing anything fancy here
>>
>>71835451
>It had all the thunder and dedicated hardware
lol
>>
What are some interesting/useful scripts you guys have made recently that is worth sharing with us?
I made a small script called up that takes the number of directories you want to go up so i can go up 3 instead of cd ../../../
>>
>>71835513
The second one is better though. Or is this sarcasm?
>>
File: 1433258221884.png (479 KB, 600x450)
479 KB
479 KB PNG
I have an idea for a side project/programming project, but I've never done one before and idk how to go about it, any advice?

Basically I just want to make a comfy/neat aggregation app that makes looking for apartments/rooms easier.

Can you guys give me advice on how to start/go about it?

What languages would best and where do I start?
>>
>>71835473
Yes, and Python has taken almost everything in industry, and i’m not talking about statistical AI. I’ve never seen lisp used outside of school.
>>
>>71835530
cute aspie, let me fuck your bussy
>>
>>71835527
a clock in bash

https://pastebin.com/FXKAec9J
>>
>>71835247
Are you using the regex match =~ operator in your if statements?
If you're reading all these lines at once, this seems like a use case for awk.
>>
>>71835538
>any advice?
Move fast and break things
>>
File: what.png (46 KB, 603x538)
46 KB
46 KB PNG
>>71835401
like this?
>>
File: 1562847928605.jpg (617 KB, 750x925)
617 KB
617 KB JPG
>>71835527
Some cd hax for you big guy

$ cd    # goes $home
$ cd - # goes to previous directory
$ shopt -s autocd # just type the directory, no cd required
>>
>>71835578
>python has type hints
>but doesn't enforce it

def lol(a: str, b: str):
return a*b
>>
>>71835606
If you use mypy you can make your editor enforce them.
>>
File: gtfo.png (404 KB, 439x588)
404 KB
404 KB PNG
I want to make a program that essentially makes algorithmic/"synthetic" music. I'm trying to find out how you "write" an audio file (.wav or .mp3 or something like that), but its kind of hard to search this shit on google since the results all assume you're trying to burn a cd or stuff like that.

Anyone have any resources/tips for doing this?
>>
File: mad.png (172 KB, 500x375)
172 KB
172 KB PNG
>>71835560
Are you bullying me?
>>
>>71835405
>>71835578
I want to have a file structure like:
foo/
f_src.py
__init__.py
bar/
g_src.py
__init__.py

where f_src.py is something like
def f(x):
return x

and g_src.py is something like
from foo.f_src import f

def g(x):
return f(x) * x

as a totally contrived example. The important part is I want to have a submodule that can talk about it's parent/sibling modules in absolute paths instead of relying on a relative imports which look all fucked up when you get fairly deep in a hierarchy.
>>
>>71835624
your autism is cute anon
>>
>>71835623
What you want is to be looking up how audio file formats are defined.
>>
>>71835644
Avoid doing that. Structure your project on dependencies and then features to avoid these kinds of headaches. If it is unavoidable, then you will need to manipulate the python paths at runtime. There is no way around this.
>>
>>71835623
https://tools.ietf.org/html/rfc2361
have fun lol
>>
>>71835623
https://en.wikipedia.org/wiki/Pulse-code_modulation

You are just sampling a wave with x granularity.
>>
>>71835606
CL-USER> (defun lol (a b)
(declare (type string a b))
(* a b))
; in: DEFUN LOL
; (* A B)
;
; caught WARNING:
; Derived type of A is
; (VALUES STRING &OPTIONAL),
; conflicting with its asserted type
; NUMBER.
; See also:
; The SBCL Manual, Node "Handling of Types"
;
; compilation unit finished
; caught 1 WARNING condition
LOL
CL-USER> (lol 2 3)
; Evaluation aborted on #<TYPE-ERROR expected-type: STRING datum: 2>.
CL-USER> (lol "hello" "world")
; Evaluation aborted on #<SIMPLE-TYPE-ERROR expected-type: NUMBER datum: "hello">.
>>
>>71835706
damn
>>
>>71834237
Learn JavaScript.
>>
File: commodore amiga.jpg (37 KB, 438x350)
37 KB
37 KB JPG
>>71835676
Sorry, I'm just here to talk about programming.
>>
>>71835697
That's disappointing.
>Structure your project on dependencies and then features
If you'd like to elaborate on this, that would be cool.
>>
>>71835702
>>71835700
>>71835678
thanks a lot, boys, guess i got some reading to do
>>
>>71835606
isn't that an environment thing though. they arent intended to be forced originally.
>>
>>71835751
there probably exists some libraries for you language that do the low-level formatting, you don't have to reinvent everything
>>
I'm feeling like doing something extremely lazy and just setting up a ZeroDivisionError exception handler because I can't be bothered with someone trying to calculate a zero out of zero ratio.
>>
>>71835771
>you don't have to reinvent everything
This is /dpt/.
>>
>>71835825
CL-USER> (/ 1 0)
; Evaluation aborted on #<DIVISION-BY-ZERO {1004B8FE63}>.
>>
redpill me on WASM
>>
>>71835828
oh, my excuses, I'll take my leave right away

>>71835861
it will save systems programming
>>
>>71835861
neds DOM support. why not just assign DOM objects some constant type id you fucking webshitters?
>>
>>71835883
I dont know anything about webdev that's why im interested in what wasm actually is and/or will enable me to do as a streetshitter who doesnt know js
>>
>>71835745
If A depends of B, keep A in a super directory. If B also depends on A keep them in the same directory. If you can’t do either of these for whatever reason, then you have to manipulate the path upon loading the module.
>>
Why use recursion over loops? Is it simply a time analysis thing?
>>
File: 1561957657024.jpg (109 KB, 630x900)
109 KB
109 KB JPG
is xanax helpful for programming?

asking for a friend...
>>
File: hmm.png (541 KB, 1920x1080)
541 KB
541 KB PNG
>>71835847
[(defun hmm (x y) (if (= x 0) x y))
(hmm 0 (/ 1 0))


Will the parameter y be evaluated?
>>
File: HuaWei_PM_2.5_Pro.jpg (40 KB, 504x680)
40 KB
40 KB JPG
>>71834158
What are some good resources for learning vulkan? Or more specifically, resources that use the c++ header because I want the abstractions.
All of the tutorials I can find that are well developed are all using the c library which is just a mess of 8word long enums constantly.
>>
>>71836012
recursive solutions are usually easier to figure out, especially for recursive problems
though if you don't have tail call optimization you're fugged
>>
>>71836041
https://github.com/KhronosGroup/Vulkan-Hpp
https://github.com/jherico/vulkan
the C++ header maps pretty well to the C API, you honestly don't really need examples specifically for C++
>which is just a mess of 8word long enums constantly.
that is also the C++ library but the enums are scoped
>>
>>71835861
Think of webgl.
Think of how much it's used.
Now imagine a quantity of use less than that.
It's hard i know.
>>
>>71834234
I want to fuck your dollpussy so hard its just unbearable!
>>
comfiest IDE?
>>
>>71836034
ya
>>
>>71836171
VisualStudio or Emacs
>>
>>71834158
I want to hug Yui
>>
>>71836241
*fug
>>
What languages let me do modular arithmetic easily?
For example, I'm doing a program that takes two heights (feet and inches) and tells you the average of the heights.
I need to be able to add the heights and divide a height by 2 (or in general, some number n)
but heights do clock arithmetic in that they wrap around 12
i.e. 4'11 + 1 = 5'0
So how could I do what I want?
>>
>>71836325
Best way is to just convert from feet+inches to just inches and then convert back to feet+inches when you finish your calculations.
>>
>>71836249
I meant what I said
>>
>>71836325
Convert to meters (fuck imperial). Do your work. Print in meters.
Then chide the user for inputting in imperial units. Consider malware.
>>
>>71836325
In C++ you can define your own type for representing this and overload the arithmetic operators to do what you need.
>>
>>71836325
>feet and inches
nigger.
>>
File: Untitled.png (5 KB, 492x98)
5 KB
5 KB PNG
Hey, I was trying to compile a c++ program, however, it was asking for a library called jdbc, is there any place to find it?
>>
Do you guys do other stuff besides programming?
>>
>>71836410
literally any sane modern language lets you do that
>>
>>71836597
idols, animu, and vidya
>>
>>71835566
The text comes from a file I update every 15min via cron. I cat it out and run it through head for 10 lines.
>>
>>71836035
Just read SICP, literally 90% of programming concepts asked here are explained in this bible.
>>
What are your million dollar program ideas.
Asking for a friend.
>>
>>71835447
clojureanon here. I learned Java too long ago in college and can't make a personal recommendation but I found a book list for you:
https://en.wikibooks.org/wiki/Clojure_Programming/Further_Reading#Books_3
I hope that helps.
>>
>>71836035
it is strict by default, so yes. just write it in a lazy way.
>>
>>71836629
asynchronous dabbing machine
>>
>>71836588
try the Internet.
>>
>>71836597
3D modelling and printing.
I pretend to workout.
I do some forestry but I've been slacking. It's a bad summer to be slacking too.
I'm also building a house.
Wagecucks/bound men don't have time for this stuff.
>>
>>71834258
C++
>>
File: 1516257291213.png (1.02 MB, 1920x1080)
1.02 MB
1.02 MB PNG
>>71834313
I unironically think ES6 is super comfy to program with. It's only bad if you don't know anything about type safety.
>>
>>71836675
>forestry
you mean gardening?
>>
>>71834695
It can be pretty damn fast and super efficient for back end data manipulation.
>>
How do you put folders in .dir files anon?
>>
File: 1529358034076.jpg (154 KB, 743x729)
154 KB
154 KB JPG
>>71834158
>Always hear stories about how people spent their internships barely having to do anything
>Start my internship
>Have to build a wrapper for and deploy a bug tracking tool (using a 3rd party tool luckily) that will be used internally and by clients
>>
>>71836731
I own a forest. I take care of it. I hire people to clear parts of it for the lumber. I put new saplings down. I clear birch that competes with the spruce. I sometimes spray them to keep wildlife from eating them.
Forestry. It's not a large enough forest to be a full time job.
>>
>>71836741
I don't understand the question.
>>
>>71836609
you can't overload in Scheme and Haskell
>>
>>71835123
this is only true if you're in a cuck enterprise shop or your team is full of shit programmers who barely passed their B.S.

good programmers write for efficiency & can read complex code
>>
>>71836773
is it well paid at least?
>>
File: dir.png (7 KB, 902x74)
7 KB
7 KB PNG
>>71836804
>>
File: file.png (4 KB, 285x77)
4 KB
4 KB PNG
>>71836811
idk about scheme but in haskell it's just the matter of defining an Integral instance for your wrapper type - you can even get by with defining just rem
>>
>>71836812
>good programmers write for efficiency & can read complex code
AND write maintainable and as easily understood as possible code.
>>
>>71836817
It's breddy good, it's a bit on the lower end of the average but I live in a low COL area and I was in retail before this so it's great for me.

I honestly shouldn't complain, it's really forcing me to learn a lot and will be available when I get real work. I hear stories of people leaving internships having learned or done nothing.
>>
>>71836824
mkdir checkpoints
cd checkpoints
wget *.lib from the web
>>
>>71836861
will be valuable*
>>
>>71836861
just write a working version that'll be re wrote by the time you leave the internship
>>
>>71836867
thanks anon
>>
>>71836824
"dir", short for directory, aka folders as brainlets call them
>>
File: srsly.jpg (114 KB, 450x438)
114 KB
114 KB JPG
>>71834527
be thankful Javascript got to market before VBScript
>>
>>71836857
>easily understood as possible code.
thats only ome factor to consider amongst many, not the most important one
>>
>>71836891
you need to create a folder checkpoints and put all the *lib files in there
>>
>>71836884
Pretty much, my main goal is to build and demo it before I leave. Everything is peer reviewed and they're sticklers so the end product may not be terrible.
>>
File: 1562875064373.png (3.48 MB, 1536x2048)
3.48 MB
3.48 MB PNG
>>71837007
if it's good enough they might offer you a position
>>
>>71834433
Python is written in C
>>
>>71836907
for unemployed neets perhaps. For everyone with a job readable code is more important. You write for readability first, then optimize the hot paths AFTER evaluating performance.
>>
>>71837089
being easy to understand has to be weighed up against performance and consistency in any project
>>
>>71836609
Java and JS don't.
>>
>>71836035
>>71836653
The following is heresy, but this is one way.
CL-USER> (defmacro hmm (x y)
(if (= x 0)
x
y))
HMM
CL-USER> (hmm 0 (/ 1 0))
0
CL-USER> (hmm 1 (/ 1 0))
; Evaluation aborted on #<DIVISION-BY-ZERO {1002911353}>.
>>
>>71837127
keyword sane
>>
>>71834895

[pre]
def exponent(b, n),
do: b * exponent(b, n-1)
def exponent(b, 0),
do: 0
[/pre]
>>
>>71837171
use [ code ], friendo.
>>
File: 1433781850864.jpg (133 KB, 780x818)
133 KB
133 KB JPG
>spend hours on code
>it finally compiles with no errors and everything works as intended
>>
>>71837268
>wasting time
>>
>>71837268
good job anon.
did you thoroughly test it?
>>
>>71837268
>wrote it in 5 minutes in haskell
>type a could invariants into quick check to automatically generate my testing.
>works first time every time
just take the functional pill
>>
i love C (cocks)
>>
File: ♥.gif (179 KB, 298x248)
179 KB
179 KB GIF
>>71837579
no thanks, i like money.
>>
>>71837579
Nice.
>>71837726
QuickCheck has been ported to other languages and anons should check it out, especially if you like money.
https://en.wikipedia.org/wiki/QuickCheck
>>
File: sip.jpg (31 KB, 280x280)
31 KB
31 KB JPG
>>71837877
oh hey, my initial remark was facetious but this is actually pretty neat!
>>
>>71836171
depends on language and your needs
>>
>>71838000
lol yw
>>
File: WA.png (2 KB, 65x62)
2 KB
2 KB PNG
>>71834158
>A linux distro with a c++ compiler included.
It blew up my last computer. I still like working on it.
>>
File: asasasas.png (437 KB, 580x724)
437 KB
437 KB PNG
is this a good book? I want a more in depth look at data structures, you guys have any recomendations?
>>
>>71838372
CLRS
>>
i feel like college is a waste of time and money but i feel like there are no other options
what do?
>>
>>71838441
become a plumber
>>
>>71838423
is there really no alternative, everybody says that's the book you should read for this kinda stuff but i'm just scared i won't be able to understand it
>>
>>71838469
it is a little dry. try the algorithm design manual
>>
File: epi.jpg (29 KB, 333x499)
29 KB
29 KB JPG
>>71838372
CLRS, if you want practice then pic related is good for prep.

>>71838441
You only get as much out as you put in.
>>
File: sedgewick.jpg (50 KB, 521x648)
50 KB
50 KB JPG
>>71838469
CLRS assumes a basic background in discrete math. If you don't have that, then sedgewick might serve you better.
>>
>>71837877
>quickcheck
That looks really neat. Thanks.
>>
>>71837877
should've quickchecked those digits
>>
>>71836812
>good programmers write for efficiency & can read complex code

Where it matters, yeah, but there's a reason Python has caught on for so many enterprise applications and we're not all writing C anymore.

Like if you only need 8 booleans, you technically save space by using bitwise operations on a single 8 bit char every time you need to change state, but that's not readable or maintainable.
>>
hello fellow code designers!
how are you all doing
>>
>>71838644
Learn Lisp.
>>
>>71838508
>>71838520
>Reading CLRS from page 1 to N
Do people actually do this?
I always thought of it as more of a reference book, once you have a general idea of a problem you're trying to solve.
>>
File: IMG_20190711_131316.jpg (3.1 MB, 2304x4608)
3.1 MB
3.1 MB JPG
Do you have a programming buddy, anon?
>>
>>71838698
>his dog can code
smart dog
>>
>>71838698
Cute doggo.
>>
>>71838681
You are expected to have read it cover to cover before interviewing at amazun.
>>
>>71838644
Dilate and C
>>
>>71838731
citation please
>>
>>71834895
erlang:
exp(A, 0) -> 1;
exp(A,B) when B > 0 -> B * exp(A, B-1);
exp(A,B) -> error.
>>
>>71834868
How true is 'a language by geniuses for geniuses' about haskell? what makes it so inaccessible?
>>
>>71838787
The CLRS recommendation comes in the email with your interview appointment.
https://www.amazon.jobs/en-gb/landing_pages/software-development-topics
>>
>>71838817
They use the math names for things which intimidates people, and insist on soundness over convenience.
>>
>>71838817
it isn't inaccessible
have you tried it?
>>
>>71838817
It was built by academics to study functional programming.
Their needs do not always match the needs of industry.
The people at https://eta-lang.org/ are trying to make an industry-friendly Haskell that runs on the JVM.
I don't know if they will succeed, but it will be interesting to see what they can achieve.
>>
>>71838817
>what makes it so inaccessible?
there is very little return/reward in getting deep with haskell when you could get close enough with Scala/Lisp/F#/Erlang/Elixir/Typescript/etc.

functional programming without an OCD type system, readily available in many other languages
>>
>>71838824
Interesting, thanks.
>>
studying web development to become hacker
>>
>>71838845
When I tried it a few years ago, I was directed to an academic white paper to understand arrows. This is not what most people think of as accessible. Have things changed?
>>
How bad of a practice is it to make something that works first and then optimize it after it's finished / near finished?
>>
>>71838873
that's kind of a weird place to start. try the haskell wikibook. that being said, i don't prefer the language.
>>
>>71838859
underage
>>
>>71838887
it is not bad at all.
>>
>>71838887
that's the correct way to do things, don't listen to cniles that tell you otherwise
>>
>>71838892
I read a haskell book before that
>>
File: yc0ru6y230831.jpg (13 KB, 320x320)
13 KB
13 KB JPG
>>71838913
But I'm writing everything in C!

>>71838905
What about refactoring? What about optimizing after committing? I don't want to look like a newb if I get a job doing this stuff!
>>
>>71838705
german shepherds are very skilled
>>
>>71838824
>You do not need to learn algorithms by heart for your interview. However, having a good understanding of the most common algorithms will probably make solving some of the questions a lot easier. Consider revising common algorithms such as traversals, divide and conquer, breadth-first search vs. depth-first search and make sure you understand the trade-offs for each. Knowing the runtimes, theoretical limitations and basic implementation strategies of different classes of algorithms is more important than memorising the specific details of any given algorithm.
So, basically, you don't need to have spent countless hours reading CLRS from cover to cover.
>>
        int a[1] = {3};
void **b = (void*)a;

printf("%d", *b);


why am I allowed to do this..?
>>
File: plankton2.png (270 KB, 367x371)
270 KB
270 KB PNG
>>71838899
>>
>>71838933
refactoring is good, and optimizing after the fact is fine as well. no one is going to give a shit if you're new. just get comfortable in your work environment. then once you start providing value and helping your coworkers, you will gain a lot more respect.
>>
>>71838947
because C is weak
>>
>>71838947
A compiler would warn about that, if you actually bothered to use -Wall.
>>
File: bad?.png (1 KB, 194x119)
1 KB
1 KB PNG
>>71838953
Okay.
Is stuff like this curly brace pyramid bad or unwanted? The entire function basically runs in a loop with another loop inside it.
>>
>>71838933
Commit to your local repository as often as you find helpful.
When committing publicly, try to make it readable first.
>I don't want to look like a newb
If you could do it perfectly in one commit then you wouldn't need a version control system.
>>
>>71838947
c doesn't give a fuck about safety.
if you want to do stupid shit, C will not get in your way.
>>
>>71838986
>is it bad?
compared to what?
>>
>>71838947
0x3 is potentially a valid address
>>
>>71838986
If you have more than 3 levels of indentation, you fucked up somewhere
>>
 System.out.println("why you guys hate java? :( ")
>>
>>71839051
>arbitrary numbers
kill yourself.
>>
>>71839051
Why 3?
>>
>>71839082
Because dealing with functions nested deeper than that tend to be a major pain in the ass and can almost always be broken down into smaller components. Obviously it's just a rule of thumb, but it works well.
>>
>>71839128
>Create class
>Create method
>Create for condition
>Create if condition
>Oops, I fucked up.
>>
j>>71836597
Drink beer, drop acid at raves, study, have girlfriend
>>
>>71839066
It's great but there may be even better things depending on your use case.
>>
>>71839066
use scala instead
>>
File: enjoyable_syntax.png (14 KB, 623x365)
14 KB
14 KB PNG
>>71839066
the syntax and community
>>
>>71839331

this code is 10000% safe to run on compoot.
>>
>>71839066
Because the layers of complexity that are added to the language itself have exceeded the complexity of C++ a long time ago, and for what purpose? To allow people doing stuff that they could've done a lot easier in C.

Example: what the fuck are life cycle contexts?
>>
>>71839066
object-oriented design, poor ability to compose functions, verbose, not functional.
I actually think that since java 8 and forwards, java has been going in a good direction. The problem is that the core that java 8+ builds on is so poor that the end result is still an ugly hack.
>>
>>71839370
How much experience do you have in each language?
>>
>>71839398
Been programming C for six years, C++ for three years, and looked for a afternoon at Java.
>>
>>71839331
reading tiny bitmap fonts is absolute eye cancer after getting used to nice, anti-aliased ones
>>
File: 1515531269535.png (14 KB, 207x243)
14 KB
14 KB PNG
I don't know anything about webdev/backend/caching but I'm curious how would caching work between a server and an S3 bucket?

For example say you have 1TB of images on the S3 bucket. Would you have two levels of caches: maybe a 10GB local storage cache where images would be stored on the file system rather than needing to query the S3 bucket again, and a smaller 1GB cache which stores the images in memory so you don't even have to look at the file system? Then when finding an imaeg you look at the memory cache and file cache before quering the S3 bucket?
>>
>>71839418
Yeah, I can't believe some people actually like those types of fonts.
Must be autism.
>>
>>71839413
With all due respect to your C/C++ experience, I don't think you can adequately assess Java without spending some time programming in it.
>>
>>71839441
>caching 10GiB of data in a webapp
nigger what the fuck are you doing?
>>
what are you listening dpt ?
https://soundcloud.com/prettyoverpowered/satisfaction-guaranteed
>>
>>71839458
With all due respect: why should I subject myself to a language that has to introduce concepts in order to fix previous fuckups? Complexity is the enemy, not a feature.
>>
>>71839470
I'm just throwing out numbers. I just want to know if that's how it works.

Wouldn't a 10GB file system cache for images be not that much though assuming they're uncompressed or something?
>>
>>71839487
Here's how it works:
>network is slower than HDDs
>HDDs are slower than SSDs
>SSDs are slower than Optane
>Optane is slower than DRAM
>DRAM is slower than SRAM
>SRAM is slower than the registers on your CPU.
>>
>tfw you are top 100 contributor of a relatively large open source project

smiling_lotr_hero_jpg.mpeg
>>
>>71839536
Doesn't mean jack shit.
In my line of work I've seen Asians who would randomly contribute to a couple open-source projects, but with no actual impact whatsoever (like merely changing a warning message to another message that didn't serve any purpose, had Engrish all over the place, and was actually untrue). My best guess is that they want to get some of that open-source cred so that during job interviews they can say that they've been contributing to various projects with a straight face.

Quality is more important than quantity.
>>
>>71839066
I believe the simple task of "reading files" is a microcosm example of the jank in Java
BufferedReader file = new BufferedReader(new FileReader(new File(f)));
>>
>>71839561
i won't argue that my contributions aren't as big as implementing new features and stuff but its not as bad as renaming craps
its mostly just bug like texts not showing, redundant checks, formatting errors and small features (undo stuff).
>>
>>71839574
I dunno about C++, but in C you'd simply call mmap/CreateFileMapping and get a zero-copy image of the file in memory. What good are x64 processors if we don't start using some of that additional virtual address space we got?
>>
>>71839066
Oracle are cunts who want to destroy programming.
It would be best if they, their products, and all their employees committed ritualistic suicide.
>>
File: 1523077216346.jpg (23 KB, 300x300)
23 KB
23 KB JPG
Zero Cost Abstractions
>>71839618
>>
>>71839644
>big
>300x300
>>
>>71839644
I'm afraid I don't follow.
>>
>>71839675
whats not to get about buzzword and anime tiddies?
>>
>>71839682
>buzzwords
Zero copy isn't a buzzword, however.
>https://en.wikipedia.org/wiki/Zero-copy
>>
>>71838940
You go through two hours of online questions about discrete math and problem solving, a few coding questions, a choose your adventure scenario about a day at amazon, and then you get a few rounds of in person interviews with graph and optimization questions.
>>
File: 1543952407305.png (14 KB, 419x164)
14 KB
14 KB PNG
I want to learn Flask and Flask accessories. Is the documentation on their homepage enough?
>>
>>71839700
>a choose your adventure scenario about a day at amazon
what
>>
>>71839715
documentation is usually enough for anything that isn't core language features.
>>
>>71839715
Isn't it on top of werkzueg?
>>
>>71839715
https://www.quora.com/What-are-best-resources-to-learn-Flask
>>
File: 1545001235645.jpg (117 KB, 1280x720)
117 KB
117 KB JPG
>>71839833
>>71839841
Thanks very much. On top of the official docs, that Miguel's blog looks pretty informative.

>>71839835
Guess so
>>
>>71839820
They have a bunch of recorded skits which you have a few answers to that branch off into other skits and emails.
>>
>>71839897
do they have a virtual wagie cage simulator?
>>
>>71839897
is a pop-up book version available?
>>
>>71839700
That's fucked.
>>
I plan to specialize in electronics soldering, namely PCB/chips/mofset/reball/VRM/mosfet/capacitors diagnostic and service, kind of technician to start doing what I like.
Which certificates should I aim for in EU? Does it require CS degree? BIOS/UEFI service would probably require EPROM management/pre-booting?
>>
>>71838887
Only, if the initial higher level architecture is sound. If not, you will have to rewrite most of it to optimize.
>>
>>71839947
CS has nothing to do with that. That is closer to an EE degree, but I don't even know if that line of work even requires a degree.
>>
>>71839947
can't you just do an apprenticeship (Ausbildung, or your country's equivalent) for that?
>>
make a new thread reeeee
>>
New thread:
>>71840086
>>71840086
>>71840086
>>
>>71840040
I found 2 companies in my area that (allegedly) make a course and give certificate.
80hrs of 40hr theory, 40h practice but I haven't talked with them yet
>>71840036
good, I didn't finish my studies so I plan to go around it like that (and maybe get studies later)
>>
>>71838850
>Haskell's type system is a bad thing
That's one of the best parts of the language.



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

[Enable Mobile View / Use Mobile Site]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.