[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: 348
Thread images: 61

File: best girl.jpg (83KB, 1280x720px) Image search: [Google]
best girl.jpg
83KB, 1280x720px
What are you working on, /g/?

Previous Thread:
>>60542004
>>
File: 1495237832068.gif (127KB, 480x270px) Image search: [Google]
1495237832068.gif
127KB, 480x270px
>OOP
>>
>>60547482
No anime faggot
>>
>>60547498
There's literally nothing wrong with OOP.
>>
>>60547482
fn main() {
loop {
println!("Thank you for posting an anime image!");
}
}
>>
>>60547482
"The most powerful programming language is Lisp. If you don't know Lisp (or its variant, Scheme), you don't know what it means for a programming language to be powerful and elegant. Once you learn Lisp, you will see what is lacking in most other languages." -Richard Stallman
>>
Writing a conf file parser with lex and yacc in Python
>>
>>60547542
Kys rustfag

>>60547545
>Stallman
Ignored
>>
should i learn pascal for the lulz?
>>
File: 1478183163912.gif (1MB, 300x300px) Image search: [Google]
1478183163912.gif
1MB, 300x300px
>>60547528
>>
File: acrobat.webm (3MB, 1280x720px) Image search: [Google]
acrobat.webm
3MB, 1280x720px
/dpt/-chan, daisuki~

Ask your much beloved programming literate anything (IAMA)

>>60547545
>-Richard Stallman
Dr. Richard M. Stallman

>>60547482
Thank you for using an anime image !
>>
>>60547548
Use OCaml next time.
>>
>>60547614
But the rest of the project is written in Python
>>
>>60547605
go fuck yourself
>>
>>60547482
learning some java.
May learn some java-script in a few years and create a dub predictor.
>>
C#'s HtmlDecode is driving me crazy, I can't figure out why this is happening.

            var crumb = System.Web.HttpUtility.HtmlDecode(match.Groups[1].Value);
Console.WriteLine(match.Groups[1].Value + " " + crumb);


Result: KLtrup\u002FyZE4 KLtrup\u002FyZE4

        string asdf = "KLtrup\u002FyZE4";
Console.Write(System.Web.HttpUtility.UrlDecode(asdf));


Result: KLtrup/yZE4 (correct)

why?
>>
File: zixh85akiwwy.jpg (50KB, 714x960px) Image search: [Google]
zixh85akiwwy.jpg
50KB, 714x960px
>>60547661
>java-script
>>
>>60547644
>that meme
>telling anon to fuck off
how retarded are you exactly?
>>
>>60547690
>getting this anally annihilated over punctuation

If PHP is better i will do that.
>>
File: 1484603539239.gif (2MB, 700x394px) Image search: [Google]
1484603539239.gif
2MB, 700x394px
>>60547601
>>
>>60547679
"\u002f" means "/" assuming unicode codepoints escape sequences. I'm not huge on C# so I have no idea wtf is happening tho. Hope that helps.

Source: http://www.fileformat.info/info/unicode/char/2f/index.htm
>>
>>60547679
Solved it by using Regex.Unescape() instead. No clue why it behaves like that.
>>
>>60547679
That function does not do what you think it does.
>>
>>60547769
Where did you read that string literal use unicode codepoint escape sequence?
>>
File: Capture.png (43KB, 1455x753px) Image search: [Google]
Capture.png
43KB, 1455x753px
>>60547482

Not the best programmer, but i'm learning.
Id love any tips on how to better my code
>>
>>60547840
I fucking threw up oh my god what is that
>>
>>60547840
import shittycode
>>
>>60547858
idiomatic python
>>
File: digital clocks.png (54KB, 1278x678px) Image search: [Google]
digital clocks.png
54KB, 1278x678px
>>60547482
Torturing myself by writing plain Xlib programs.

Why? Because I want to know what happens at the bowels of programs that use higher-level toolkits. And because it produces nice and small executables :-)

The first program I finished is a port of a simple digital clock I wrote a years ago for Windows. All it does is display the current time, redrawing its own window once every second. It's about 300 lines of C.

After a few days of pain, I got it working. I must admit that the Windows API is actually far nicer to use than plain Xlib, even if they're ultimately surprisingly similar structurally.

File sizes:

Linux: 14744 bytes
Windows: 15872 bytes

The Linux version is 64-bit, while the Windows version is only 32-bit. But I don't think 32-bit Linux version would be much smaller than that.

I guess I could try XCB next.
>>
https://www.youtube.com/watch?v=o4-CwDo2zpg
Andrei is so awesome, it's such a shame he's wasted all this time on (a) D(ead) language.
>>
>>60547840
Nice. Keep up the good work, anon. Do you have a public git repository?
>>
>>60547883
Why do you even waste your time on X? It's a badly designed and extremely outdated technology soon to be replaced with Wayland.
>>
>>60547903
No, I do not. Since im not very good i prefer to keep it all in a secured container.

I want to port it to c++ though. I know some but more in python.
>>
>>60547858
So the idea is to generate a secure password that i dont know for an encrypted zipfile encrypted with gpg then I plan to import it into a password manager
>>
>>60547482
Fixing inconsistencies and races in a network synchronization algorithm.
>>
>>60547545
What's the simplest Lisp implementation out there? Wanna make my own
>>
>* programs loudly in Ocaml
>>
File: reading_sicp.webm (1MB, 1280x720px) Image search: [Google]
reading_sicp.webm
1MB, 1280x720px
>>60548141
http://www.buildyourownlisp.com/
https://github.com/kanaka/mal
https://github.com/zick?tab=repositories
>>
Thinking about making a cli instagram scrapping tool to make masturbating to my female colleagues easier
>>
Total newbie at learning programming and coding, but it seems like I can get into this. Right now I'm just messing with a small code in c++ to add, subtract, multiply and divide two number and print the results. But for some reason I can't get the divided number to print in decimal form. Like I said I'm a total newb so, here's the code. What's wrong?

int main()
{
int a,b;
cin >> a;
cin >> b;
float add,sub,mult,divd;
add=a+b;
sub=a-b;
mult=a*b;
divd=a/b;
cout << "Added: " << add <<endl;
cout << "Subtracted: " << sub <<endl;
cout << "Multiplied: " << mult <<endl;
cout << "Divided: "<< divd <<endl;
return 0;
}
>>
Why aren't you using Rust, /dpt/?
>>
>>60547482
>anime bread
best bread
>>
>>60548263
On this note, does anyone know of a more elegant way to set up CLIs than a bunch of if-then statements?
>>
File: dlang_chan.jpg (139KB, 470x545px) Image search: [Google]
dlang_chan.jpg
139KB, 470x545px
Threadly reminder that dlang-chan is not dead; she's going to have her GC tumor removed (eventually); and she's super duper cute and easy to prototype in! Say something nice about her, /dpt/!
>>
>>60548503
Ada's better designed
>>
>>60548503
https://github.com/rust-lang/rust/pull/25640
https://github.com/rust-lang/rust-buildbot/issues/2
https://github.com/rust-lang/rust/issues/28059

>>60548538
>(eventually)


>>60548541
over engineered
>>
>>60548503
I don't use Turing-complete garbage.
>>
>>60547601
dumb frogposter
>>
File: monk.jpg (7KB, 195x259px) Image search: [Google]
monk.jpg
7KB, 195x259px
Just shilling for chapel
http://chapel.cray.com/
>>
>>60548543
>Things brainlets say for 100
>>
>>60548480
Your code first does integer division and then casts it to float, you have to convert a and b to float before dividing them.
>>
>>60548543
>(eventually)
It's still enjoyable to work with :3
>>
>>60548503
But I am.
>>
>>60548597
Only if you're from India.
>>
>>60548579
have you read the conclusion of the pull request?

https://github.com/rust-lang/rust/pull/25640#issuecomment-104304643

what do you have to say, now?
>>
>>60548543
>>60548618
This is a board about technology, please stay on topic or go back to >>>/pol/ .
>>
>>60548643
You just confirmed my suspicion that you along with most of this thread are straight from reddit. He wasn't even stating a /pol/ opinion, you have to go back.
>>
With Eclipse, can I compile anonymous classes to the class file they're created in somehow? So I don't have to deal with an extra ~$1, ~$2 et.c. class-file for each anonymous class I create?
>>
>>60548618
That's not the part I was referring to.
>>
Is MEAN (or MEEN) the best web dev solution stack available now, and if not why not?

Ignoring the chances of getting a job out of it, is functional programming the 'best' programming paradigm, and if so is there a better place to learn it than Scheme and going through SICP?
>>
>>60548527
Boost program options? Still if/elses but looks more elegant I guess, my bud always uses it to quckly make cli shit
>>
is there a way to query hex dumps from any running userspace process in linux with the memory pages labeled by program? Is there a way to inject payloads into these without starting them in debugging mode?
>>
what tools do you guys use?

and should I rewrite my 7.7 kB of C++ code to make it less retarded? and should I stick to C this time around
>>
>>60548765
>what tools do you guys use?
For what?
>>
>>60548743
you could write a kernel module for that or enable the very powerful /dev/mem

http://man7.org/linux/man-pages/man4/mem.4.html
>>
>>60548242
Really nice

Is there a way to parse Lisp without dynamic memory allocation? Using just the stack.
>>
>>60548807
recursion
>>
>>60548736
>Is MEAN (or MEEN) the best web dev solution stack available now, and if not why not?
depends on the use case

>is functional programming the 'best' programming paradigm
depends on the use case

>>60548692
I suspect the specification says it's always one .class file per class period

>>60548765
a hammer and a screwdriver
>>
File: mir.jpg (410KB, 700x670px) Image search: [Google]
mir.jpg
410KB, 700x670px
>>60547482
oh god i just fucking downed a mission critical machine in chicago
>>
>>60548765

I use Common Lisp for professional application development and task automation for systems made in C and C#, also heavy use for personal research and prototyping

however I'm working on a realtime system now which requires C/C++ speeds and hardware drivers, and VHDL for hardware prototyping
>>
>>60548836
>I suspect the specification says it's always one .class file per class period
Annoying. The API I'm using prefers significant use of anonymous classes, so I end up with a lot of litter.
>>
How does modern web development work? Last thing I used was php, mysql and jquery. What is now cool?
>>
>>60548819
I can't return a pointer to stack allocated data after the function returns
>>
File: 1467311026571.jpg (143KB, 735x900px) Image search: [Google]
1467311026571.jpg
143KB, 735x900px
>>60548543
>over-engineered
>tfw Pike was right about the generation on googlers
>>
File: electronic parts chart jpg.jpg (2MB, 2160x3060px) Image search: [Google]
electronic parts chart jpg.jpg
2MB, 2160x3060px
>>60548743
>>60548790

this doesn't seem to intercept process communications, for example the current usage I need is for listening for device writes made through ALSA
>>
File: ocaml.png (148KB, 500x700px) Image search: [Google]
ocaml.png
148KB, 500x700px
>>
File: noobglers.jpg (109KB, 1200x761px) Image search: [Google]
noobglers.jpg
109KB, 1200x761px
>>60548871

>I have a 4.0 in Computer Science, a Minor in Psychology and 3 years of experience in Python
>hired!
>>
>>60547482
We all know google and others gather meta-data about you. would it be possible for someone to make an app or something that corrupts the meta-data it gives them or distorts it, like telling them you're a straight white female or like the most generic of shit so they don't get anything useful out of it?

I know nothing of programming btw. Just thought I'd share an idea.
>>
>>60548587
Awesome, I see that now that you said it. Thank you very much!
>>
>>60548807
Have the calling code pass a pointer to a memory area they want the data to go in. Pro: they can pass stack, dynamic memory, or even globals if they're crazy. Con: you must answer "what the fuck do we both do if the buffer isn't large enough" carefully.
>>
>>60548847
That's java for you. No seriously: all development environments generate some amount of intermediate files. Having separate files speeds up rebuilds during development. What you could expect eclipse to do is store it all in a separate directory that doesn't clutter your view. Eventually tho everything ends up in a jar amirite?
>>
>>60549036
Just write a makefile to store all your objects in an obj folder.
>>
>>60548993
I wanted to make a statically allocated parser for lisp that made zero system calls. It'd be used for bootstrapping the language. I want to integrate the Linux system call interface into the Lisp but it'll boot up in a state where system calls aren't available yet.

I wanted the stack because it immediately fails in a well-known way if overflown, and maximum size can be adjusted with rlimit. Ideally, the stack would be expandable; this would facillitate continuations too. However, that requires system calls, manipulation of the processor's stack registers and will probably complicate multithreading.

I like the pointer passing idea. It'd decouple the memory use from its allocation, making it configurable. I guess I could either make a gigantic static buffer or hardcode either sbrk functionality or mmap NORESERVE a terabyte of space
>>
>>60548867
>How does modern web development work? Last thing I used was php, mysql and jquery. What is now cool?
React+Redux, React+Mobx, Angular, Vue or Elm in the frontend
Spring Boot, ASP.NET MVC, Ruby on Rails, Django, Laravel, Express, Play Framework, Dropwizard or Phoenix in the backend
PostgreSQL, MySQL or MongoDB in the data access layer
>>
Looks like gatekeeper either went to bed or is in school!
>>
>>60549217
Who are you referencing?
>>
>>60549217
Yeah, it's almost certainly a Euro or Aussie. /dpt/ is absolute shit during their peak hours.

>>60547482
>What are you working on, /g/?
Comfy backend CRUD.

Fuck you, I like it.
>>
>there is a Swift webframework called Taylor
>>
File: taylor-swift-nazi.jpg (53KB, 640x500px) Image search: [Google]
taylor-swift-nazi.jpg
53KB, 640x500px
>>60549273
And everything is right with the world
>>
>>60549240
Yep. I've noticed it's peak shit around 2-5AM (Eastern US Time)
>>
>>60548765
>and should I rewrite my 7.7 kB of C++ code to make it less retarded?
Yeah and don't be afraid to use goto if it makes your code cleaner.
>>
>>60549325
why the fuck are her eyes so high up on her head?
>>
File: вим.png (260KB, 1024x455px) Image search: [Google]
вим.png
260KB, 1024x455px
vim is meme
>>
>>60549240
10/10 comfy confirmed
>>
File: yucurry.png (34KB, 878x667px) Image search: [Google]
yucurry.png
34KB, 878x667px
>>60549354
>>
File: Art of Prolog Anime Girl.png (118KB, 363x250px) Image search: [Google]
Art of Prolog Anime Girl.png
118KB, 363x250px
Are you working on your logic programming skills, /dpt/?

Prolog has well progressed (it's more like a scripting language nowadays) and even comes as Small-talkish OO version in Logtalk.

I was wondering about getting into Mercury (a Haskellized Prolog?) but it seems only infrequently used.

"Answer Set Programming" seems kinda hot, you get to sic SAT Solvers on your logic programs.

Constraint Handling Rules is interesting but how to think in CHR rules?

Lambda Prolog is probably really the dog's bollocks when writing type-checking compilers or things like that.

Anything in the direction of Linear Logic (like Bedwyr) may well be the future but it's currently deeply academical.

Anything in the marvelous nebula of theorem provers (ACL2, Coq) I have no idea about.
>>
>>60549424
Why are her eyes so far apart?
>>
>>60549424
no i have a job
>>
>>60549441
This. I have to deliver a fucking product, I can't spend all my time on garbage like that.
>>
File: country_stuck_vim-1-2-1024x1024.png (90KB, 1024x1024px) Image search: [Google]
country_stuck_vim-1-2-1024x1024.png
90KB, 1024x1024px
>>60549359
hmmmm
>>
>>60549297
Marry me, SS Captain (Hauptsturmführer) Swift!

(Though I don't think this meshes well with the assigned role of women in a National-Socialistic Regime)
>>
>>60549078
Quite interesting. TBQH the C language is probably limiting you because it has a conservative model of the call stack. Maybe we could challenge the idea that a subroutines's stack variables disappear when it exits? Say the lisp parser can work with only registers and a buffer, you could just put the start of the buffer on the top of the stack, let the parser do its thing, and crop the buffer to the actual length it occupies so the stack continues growing just past it? Surely has drawbacks, but if you're going down the road of low-level memory management, you will have to think your implementation choices through. Maybe you could tune your data structures to allow stack copying? See http://www.agis.io/2014/03/25/contiguous-stacks-in-go.html, haters gonna hate go but at least they are trying to think past C.

>multithreading
A poor man's substitute for asynchronous operations in my eyes, but everyone can judge. isolated virtual memory processes are fine if you /share memory by communicating/.
>>
>>60549460
this actually makes her look less retarded

>>60549467
>asians, pajeets and americans have microsoft's cook furthest down their throats
isn't this common knowledge?
>>
>>60549441
TFW 1 lousy job overloads your hindu brain
>>
>>60549508
*cock
:^)
>>
File: 1479596863096.png (20KB, 640x480px) Image search: [Google]
1479596863096.png
20KB, 640x480px
>his language doesn't have the secondary stack
>>
File: yukari_laugh.gif (168KB, 342x360px) Image search: [Google]
yukari_laugh.gif
168KB, 342x360px
>>60549424
>learning logic from programming
>>
File: SICP Anime Girl.jpg (67KB, 700x700px) Image search: [Google]
SICP Anime Girl.jpg
67KB, 700x700px
>>60549499
>Say the lisp parser can work with only registers and a buffer, you could just put the start of the buffer on the top of the stack, let the parser do its thing, and crop the buffer to the actual length it occupies so the stack continues growing just

You mean as has been done in Scheme since around 1970?
>>
>>60549508
You completely misunderstood the results shown in that chart.

Would you like me to explain, or do you want to take another stab at the implications?
>>
>mfw I realize immutable languages don't actually discard the entire data structure and generate a new one when I make a small change
huh
>>
File: 57747459_p0.png (493KB, 987x781px) Image search: [Google]
57747459_p0.png
493KB, 987x781px
>>60549508
>If you're not having trouble with Vim that means you're a VScuck!
>>
>>60549569
source?
>>
>>60547883
source? looks really beautiful
Is that vector graphics?
>>
File: philologic.jpg (60KB, 631x900px) Image search: [Google]
philologic.jpg
60KB, 631x900px
>>60549559
Actually I have never met a single IT guy who knows logic. Best they can do is short-circuit operators.

Mathematicians actually have serious trouble with it too, I hear.
>>
File: 1458717783413.jpg (92KB, 485x594px) Image search: [Google]
1458717783413.jpg
92KB, 485x594px
>>60549424
>Are you working on your logic programming skills, /dpt/?
Yes. That's the only acceptable kind of programming besides assembly.
>>
>>60549359
you're not a jquery developer, are you anon?
>>
>>60549594
depends on the data structure

>singly linked list
>want to change the last element
>>
>>60549617
>Mathematicians actually have serious trouble with it too, I hear.
>>
>>60549570
>You completely misunderstood the results shown in that chart.
you did. beginner programmers from the countries at the top use gnu+linux/macos the most. those from the countries at the bottom either use windows or don't seek help on vim in english

>>60549597
on average, having trouble with vim means you're probably not using windows
>>
>>60549559
The good kind of programming is indistinguishable from logic.
>>
>>60549602
Sorry bad quoting

>Maybe we could challenge the idea that a subroutines's stack variables disappear when it exits?

https://en.wikipedia.org/wiki/Scope_(computer_science)#Lexical_scoping
>>
>>60549594
>saying "mfw" without posting an image
Retards like you really should not be on this thread at all.
>>
>>60547482
I am working through Project Euler problems in C, and my solution for problem 3 (find largest prime factor of a big number) works for smaller numbers but is still running for the large number they want me to solve. Do I basically need to program a good sieve? Kind of new to this but I did alright in my discrete mathematics class
>>
>>60549666
>mfw you actually can be this new
>>
File: smug_ran.jpg (632KB, 709x1063px) Image search: [Google]
smug_ran.jpg
632KB, 709x1063px
>>60549648
>on average, having trouble with vim means you're probably not using windows
>thinks P -> ~Q implies ~P -> Q
>>60549649
>no true scotsman
And is this why the poster I replied to failed to use any kind of logic? Thanks programmer.
>>
>>60549630
I hear Intuitionistic Natural Deduction is isomorphic to Typed Lambda Calculus via the Curry-Howard Isomorphism (but how!), so all three are God Tier.
>>
>>60549648
You're a fool.

These are only results from those hits to Vim-specific content. You're trying to mentally frame it in a way that says the larger bars means more Vim users, when the chart is showing no such information.

In fact, the page even helps the viewer with some explanation. For your convenience, I've quoted it here:
>It looks like developers in Ukraine, Turkey and Indonesia are getting stuck in Vim quite a bit: it makes up a larger portion of their Vim questions than in any other country. In contrast, in China, Korea and Japan the fraction going to this question is one-tenth as much. That might indicate that when developers in these countries enter Vim, they usually meant to do so, and they know how to get out of it.

Essentially, those countries from the bottom are likely more familiar with Vim, which is quite the opposite from what you've mistakenly concluded.
>>
>>60549534
dumb frogposter
>>
>>60549672
No, you probably have an infinite loop due to an overflow because you're stupid.
>>
>>60549666
Mfw someone working at Capita posts here
>>
>>60549499
I was just reading about the overhead of passing everything by copy. The idea doesn't work though; self-referential data structures require pointers and I can't grow a constant-size value whose size was allocated by the compiler.

I'm leaning towards static buffer or sbrk.

The way I plan to bootstrap the language is this: I'll make a really simple system-call primitive that issues Linux system calls from Lisp. Then I'll implement all system calls as Lisp code. Essential I/O functions like read will be translated to a static array of Lisp values using an external program as part of the build process. They will be hardcoded in the C code. This way the evaluator can execute it without having to parse it, but it's still Lisp. Then the bootstrap process can load other system call functions and finish bootstrapping.

Maybe I could even design a way to implement mmap in Lisp and have the evaluator execute that code, and then feed back allocated memory for the implementation to use. Convoluted, but this IS the point.

The goal is to make a Lisp interpreter with zero dependencies. Not even on libc.

>asynchronous

I believe in asynchronous programming as well. However I plan to support threads. Linux doesn't have IO completion ports and it'd be impossible to do async right otherwise. Since the full Linux syscall interface will be available, I need to account for execution contexts, signals (hell) and such. Honestly I want to build a simple CSP abstraction in the language itself.
>>
>>60549689
>And is this why the poster I replied to failed to use any kind of logic?
What are you referring to?
>Thanks pr*grammer.
Sorry, but I'm not human trash. These days "pr*grammer" isn't really any different from "w*b ""developer""".
>>
>>60549689
>>thinks P -> ~Q implies ~P -> Q
That's true if you study biology.
>>
>>60549569
Can you give a simple example in C that shows how it accomplishes this?
>>
>>60549679
>>60549718
Posters like you are the exact type of garbage that collects in these threads. You are precisely what's wrong with not only these threads, but the internet as a whole. Your predisposition to posting without lurking is exactly what kills a community. Don't ever post here again. I'm tired of seeing all you petulant newfags run amok. You want to be a mouthbreathing retard for your first few years here, do that shit in /b/, okay faggot? Just fuck off.
>>
>>60549706
Yeah I assumed only some variables needed to be longs but I just changed them all to longs and it worked thanks
>>
>>60549743
>Sorry, but I'm not human trash. [...] "pr*grammer" isn't really any different from "w*b ""developer""".
So you agree with me.
>What are you referring to?
The poster I replied in the same post I replied to you. Try learning how to read.
>>
>>60549672
>I am working through Project Euler problems
there are better ways to learn math

>>60549695
>That might indicate that when developers in these countries enter Vim, they usually meant to do so, and they know how to get out of it.
So they're not beginners. I was talking about beginners.

>>60549689
>mixing "->" and "implies" in one sentence with different meanings
bravo

>>60549768
I've been posting 4chan since 2007
>>
>>60549783
>there are better ways to learn math
nice false assumption
>>
>>60549781
>So you agree with me.
Since you seem to be human, yes.
>Try learning how to read.
I don't usually read posts made by their kind.
>>
>>60549792
so why are you doing math problems then?

>>60549783
*on 4chan
>>
>>60549783
>this fucking stupid
>thinks implication arrows don't work on statements of predicates
>obviously failed discrete math 1 and tries to give out advice on how to learn math
Pathetic.
>>60549804
I wouldn't be surprised if you two turned out to be the same person desu.
>>
>>60549783
>So they're not beginners. I was talking about beginners.
What does that have to do with anything?

You saw the chart, and immediately implied that asians, americans, and indians don't use Vim, when the reality of the chart implies quite the opposite; that asians, americans, and indians are more familiar with Vim.

Your sidetracked assertions about "beginners" have no bearing on your poor understanding of the original graphic.

This will be my last reply to you. I do hope that the mental barries you've formed to protect your apparently fragile ego will someday be replaced with more fruitful attempts to actually understand the world around you.
>>
SQL question, if i have first name and last in a column and order the query by this column, is it possible to order by just the first name? As in if you search "rose" i want all the first names with rose in it to show up first.
>>
File: guileshell.png (149KB, 1600x900px) Image search: [Google]
guileshell.png
149KB, 1600x900px
>>60549739
Doesn't need to be pass everything by copy. Depending on how you represent cons cells, you could make it so that the GC can relocate objects that are in the old stack.

This sounds interesting overall. Good luck.

What do you mean by IO Port? A sort of userspace callback triggered by the kernel? I'm lost somehow.
>>
>>60549839
>calling someone of their kind a ""person""
Thanks for your opinion, anon!
>>
>>60549839
Don't you have any other pictures of your mentor? I'm getting tired of seeing the same Yakumos.
>>
>>60549904
That's anon-sama to you.
>>60549928
Let me see if I have more smug Rans.
>>
>>60549875
ORDER BY {some expression that takes the last word in the current column value}
99% sure it's possible. It's bad database design if you merge personal name and family name in one column tho.

-> https://social.technet.microsoft.com/wiki/contents/articles/17948.t-sql-right-left-substring-and-charindex-functions.aspx
>>
File: 1493267257259.png (483KB, 507x561px) Image search: [Google]
1493267257259.png
483KB, 507x561px
>>60549693
Yes, all of them could even be considered anime languages.
>>
trying out clojure
seems pretty based
>>
>>60549359

>object body
In general, I think we should be avoiding the word object in every circumstance where a more specific term can be used (e.g. a text field in this circumstance).

Buzzword soups are gross.
>>
>>60549240
>Comfy backend CRUD.
what language my man
>>
>>60549240
>Euro
>>>/b/
>>
>>60549954

yeah unfortunately i took over this project with terribly named and structured columns, thanks
>>
>>60549991
do some cleanup and redefine the schema please
>>
File: z.png (22KB, 571x545px) Image search: [Google]
z.png
22KB, 571x545px
I need some more HIGH CONTRAST vim colors
>>
have a pretty good understanding of crypto stuff, wanna get better at certificates and security in general
any good resources?
>>
>>60549946
>Let me see if I have more smug Rans.
Thanks.

>>60549961
Kumin a best!
>>
File: 1493344523232.jpg (39KB, 533x352px) Image search: [Google]
1493344523232.jpg
39KB, 533x352px
>>60549424
>Lambda Prolog
Is that an intuitionistic Prolog?
>>
>>60549892
Good point. I can statically allocate a big Lisp cell array and then implement a simple GC on top of it. Maybe I can somehow determine a reasonable upper bound that allows the bootstrapping code to work successfully; from them on, I can probably implement the memory management in Lisp and somehow tell the implementation to switch from the static buffer to the dynamically allocated one.

Originally I wanted something similar to newLISP's memory management. I don't know how it works internally but it seems nice.

>IO

The only system call primitive will be system-call, which takes the Linux system call number and parameters.

Then I'll make Lisp functions which call things like the open, read, write, close system calls, passing them file descriptors (integers really) and buffers and symbolic options that get automatically mapped to C constants.

The point of having system calls is to make the Lisp a systems programming language. For example, it could mmap a shared object and do symbol lookups and function calls. With mmap I could implement my own JIT compiler inside Lisp, all it requires is an executable region for code and a compiler for the Lisp cells that represent functions. I could even compile the system call code
>>
I keep forgetting, is it safe to set fields in a hash ref like this in Perl? I remember there maybe being issues if its a plain hash

my $res = $self->stripe->create_customer({
description => $self->stash->{user}->{username},
email => $self->stash->{user}->{email}
metadata => {
id => $self->stash->{user}->{id}
}
});
>>
>>60549839
actually I passed both 1 and 2

>>60549851
The people that help to exit vim are beginners, so these assertions are not sidetracked, but essential.
1) I'm a beginner from country X and I'm using Windows. I don't use vim because I probably haven't even heard of it yet. Thus I don't go to "How to exit Vim" on Stack Overflow. I might switch to Linux/macOS in the future, but I will be more advanced by then and will probably be able figure out how to exit vim by myself.
And so country X gets a low % of "How to exit Vim" in the vim traffic of the country.
2) I'm a beginner programmer from country Y and I'm using Linux/macOs. There's this vim program that people keep using in tutorials targeted at my platform. Let's see what it's about. Oh shit how do I exit that? Better go to Stack Overflow.
And so Country Y gets a high % of "How to exit Vim" in the vim traffic of the country.

This is the clearest explanation I could manage, so this will be my last reply to you :^) [insert personal invectives I would use here if I had problems with my self-esteem]
>>
>>60550118
The people that need help to exit vim*
>>
>>60550101
Yup I get that stuff, but you said you had to support multithreading because Linux didn't have "IO Ports", what's that? I think I came to the opposite conclusion a while ago so I'm dead curious. No offense but are you aware of the select system call?
>>
File: 1445705986467.jpg (31KB, 853x480px) Image search: [Google]
1445705986467.jpg
31KB, 853x480px
How do open a file in javascript?
How do connect to WiFi from a bootloader?
How do inherit from a class in SQL?
How do open the command prompt on Linux?
How do 3D print a yummy bagel?
>>
So what's the proper way?

int **x;
//vs
int** x;
//vs
int* *x;
>>
>>60550167
the first one, of course
>>
>>60550167
the last one
>>
>>60550167
The last one is the standard way. The second one is acceptable.
>>
C#.

I have a TcpClient listening in a loop. Any time I receive data, I want to raise an event that other classes can subscribe to and read the data from. The TpcClient part works, I know I receive data. I just don't understand how to make the event.

static class MyClient {
TcpClient client;

void Listen() {
// tcp client listens and receives data
Raise event somehow();
}
}

class MySubscriber {
void GetData() { // call this somehow when MyClient raises an event
// process data
}
}
>>
>>60550167
int* 
*x
>>
>>60550167
second one
>>
im trying to make a python program that updates every 5 seconds and shows the price of BitCoin in real time. I have the .json http://api.coindesk.com/v1/bpi/currentprice.json, but can't figure this shit out. i installed requests and everything.
>>
>>60550157
Sorry I misunderstood you.

I/O completion ports are a feature of Windows kernel. You ask for an I/O operation to be done on a buffer, you can periodically check whether it's been done. Epoll lets you know if an operation is ready to begin; great for sockets, useless for local files which are always ready. Asynchronous file I/O in Linux uses threads in the background. It's a mess really.

I wish the kernel would simply manage the I/O for me. I have no idea why it doesn't do this. I want to be able to ask it to read data from a buffer and receive a number that identifies the operation and lets me query status. The kernel is much better equipped to deal with it. The hardware is asynchronous and this design doesn't force the program to pretend it's synchronous.
>>
>>60550329
>I/O
Stopped reading right there.
>>
>>60550366
?
>>
>>60550411
Sorry?
>>
>>60550415
What?
>>
just got a http server working in clojure
i like this language.
>>
How much slower are Lisp (and its various dialects) programs compared to programs written in other programming languages?
>>
>>60550319
download the file, read the file, parse it, print the shit you want to see
>>
>>60550415
What is the problem with what I said

https://en.wikipedia.org/wiki/Input/output_completion_port
>>
>>60550424
Excuse me?
>>
Kotlin
>>
is
>>
shite.
>>
ahahahaha brainwashing anon, your SJW propaganda is literally BACKFIRING and having the opposite effect than you intended

http://businessinsider.com/surprising-way-to-change-political-opinions-2016-6
>>
>>60550435
Idiomatic lisp is quite slow. You can use Common Lisp to write C-style imperative code with explicit typing and it would be only 3-10 times slower than C, but in this case, you'd be better off with C/C++.
>>
Any people here working with Perl? What are your setups like? What text editor are you using? I'm wondering if there are things I can do to be more efficient and safe
>>
>>60550435
>>60550499

There's this, however, it's still being developed on, going through a full rewrite;

https://github.com/carp-lang/Carp
>>
I'm learning F# because I'm interested in learning what all the fuss is about with functional. If I like F# enough, I'll learn haskell, but since I'm already an experienced C# dev, I'll stick to F#.
>>
>>60550535
> I'm wondering if there are things I can do to be more efficient and safe
You can stop using outdated language.
>>
We should stop using everything outdated!!
Like TCP/IP
>>
>>60550583
Wouldn't that be nice?
>>
>>60550567
What about it is outdated?
>>
>>60550546
>https://github.com/carp-lang/Carp
There's also dale
https://github.com/tomhrr/dale
also bigloo scheme can compile quite fast C code if you enable optimizations
>>
File: 1451492957431.jpg (101KB, 1024x904px) Image search: [Google]
1451492957431.jpg
101KB, 1024x904px
>>60550535
>Perl
>>
>>60550546
> A statically typed lisp, without a GC
So this is just weird C without syntax, why would anyone use it?
>>60550593
It's so outdated its author started a complete rewrite 17 years ago.
>>60550583
Actually yes, it's time we switched to TCP/IPv6.
>>
>>60550567
you can stop using an english website
>>
>>60550603
dumb frogposter
>>
>>60550619
Fair enough
>>
>>60550559
F# is complete trash though. Just start with a better language. Haskell is pretty bad, but certainly a lot better than F#.
>>
>>60550319
>python
>every 5 seconds
found problem
>>
File: 245.jpg (80KB, 1333x900px) Image search: [Google]
245.jpg
80KB, 1333x900px
>>60550657
>dumb frogposter
>>
>>60550712

>Hates Haskell and F#
Tell me, what functional languages do you use?
>>
Why is a subhuman responding to me?
>>
>>60550712
Good for you, F# is pretty comfy and actually useful if you're a .net programmer.
>>
File: 1441648599925.jpg (606KB, 1395x858px) Image search: [Google]
1441648599925.jpg
606KB, 1395x858px
>>60550738
>>60550603
DUMB FROGS OUT

OUT
U
T
>>
>>60550712
since he's already an "experienced C# dev" (microsoft evangelist/shill) i'm sure F# will be right up his alley
>>
>>60550758
t. microsoft shill

F# never really took off and for good reason, at most it's a niche language
>>
>>60550764
you have my permission to kill them
>>
>>60550758
>F# is pretty comfy
In what way does this contradict my statements? You being comfortable with shit languages due to your low standards doesn't make them better.
>>60550772
Yeah, I can see.
>>
>>60550788

>F# never really took off
Which is why you can write F# programs in .NET Core, and not VB.NET programs.
>>
File: 1493967347358.png (140KB, 420x420px) Image search: [Google]
1493967347358.png
140KB, 420x420px
>>60550764
>>
>>60550764
>he thinks frogposters are dumb
>he doesn't know the indisputable scientific fact that frogposters are not dumb
>being this much of a brainlet
>>
frog poster >>> anime poster
t. not a frog poster
>>
>>60550265
https://docs.microsoft.com/en-us/dotnet/articles/csharp/programming-guide/delegates/
>>
File: 從這地球上消滅掉這meme.jpg (290KB, 512x502px) Image search: [Google]
從這地球上消滅掉這meme.jpg
290KB, 512x502px
>>60550873
OUT
>>
>>60550809
>.NET Core
>>>/g/wdg

plenty of web hosts don't even support .NET Core
>>
>>60550898
https://www.youtube.com/watch?v=A7fA2T0biEc
>>
------
>ribbit the reddit frog
>>>/r/abbit/

------
>frog poster >>> anime poster
The redditors seem to be out in force at the moment. Your kind is not welcome here.
>>>/r/abbit/
>>
>>60550329
<aio.h>... had forgotten about it. I read the part where it says it's not kernelled right now, don't worry. I'll have to make my tests on pipes vs disk files vs sockets. Thanks for the reminder, good night, and happy hacking !
>>
File: intelligence-by-language.png (86KB, 1024x1024px) Image search: [Google]
intelligence-by-language.png
86KB, 1024x1024px
>>
>>60547840
what's the point in setting now to the time, then setting static to now only to use now instead of time when setting the value of name?

overall: it's a fucking mess.
>>
>>60550913

I'm going to be honest, I've been looking to .NET Core for its potential future desktop applications. I don't give a rat's ass about ASP.NET Core.

Also, who cares what web hosts support? Host your website on your own machine!
>>
>>60551045
do you know what asymmetric dsl is
>>
>>60550319
in haskell this is just
{-# LANGUAGE OverloadedStrings #-}

import Control.Concurrent (threadDelay)
import Control.Monad (forever)
import Network.HTTP (simpleHTTP, getRequest, getResponseBody)
import Data.Aeson (decode, Value (Object, String))

import qualified Data.ByteString.Lazy.Char8 as BS (pack)
import qualified Data.HashMap.Lazy as Map (lookup)
import qualified Data.Text as Text (unpack)

main :: IO ()
main = do
forever $ do
str <- (simpleHTTP (getRequest "http://api.coindesk.com/v1/bpi/currentprice.json")) >>= getResponseBody
let Just price = parsePrice str
putStrLn ("Bitcoin value: $" ++ price)
threadDelay (5 * 60 * 1000000)

parsePrice :: String -> Maybe String
parsePrice str = do
Object a <- decode $ BS.pack str
Object b <- Map.lookup "bpi" a
Object c <- Map.lookup "USD" b
String d <- Map.lookup "rate" c
return (Text.unpack d)
>>
File: googlewoman.png (375KB, 601x404px) Image search: [Google]
googlewoman.png
375KB, 601x404px
So what's your take on Kotlin and WebAssembly my good lads. Seemed like two hot topics on the last google i/o
>>
any idea what am I doing wrong here?
I have no idea how to do this.
Basically, I have some values in CSV format, in a table of 2 columns and 512 rows, and I need them as floats, but this piece of code just gives me them as strings again, as if the float() function did nothing.
>>
>>60551234
>Kotlin
Good language for Indians.
>>
>>60551248
>any idea what am I doing wrong here?
Yes, you seem to be using a shitlang.
>>
>>60551294
well I noticed that too, but it's just a small project for the uni, and Pyhton has that cool plotting library
>>
>>60551248
look into map(float, data)
>>
File: 9vklLXJ.jpg (24KB, 400x386px) Image search: [Google]
9vklLXJ.jpg
24KB, 400x386px
>>60550909
>"out" is literally the only word he knows
>probably also fetishizes FP
>kek
>>
>>60551231
>threadDelay (5 * 60 * 1000000)
it would get out of sync
>>
>>60551248
>zeros_like
>ones_like
I mean, like, python is pretty, like, neat language, you know like. Have you like tried like printing datalist variable before the loop to actually like be sure you loaded your data like correctly, you know?
>>
>>60550947
Do you mean it's gonna become part of the kernel someday? Is this being worked on?
>>
Why haven't you started programming in dotnet core yet, /dpt/? You can run it on a real OS and put it behind a real server.
>>
File: idris.png (69KB, 957x855px) Image search: [Google]
idris.png
69KB, 957x855px
Wew, this is deep.
>>
>>60551355
for what purpose
>>
>>60551355
>You can run it on a real OS and put it behind a real server.
Oh, you mean like C software on Linux (literally the only real OS)?
>>
>>60551248
try
datalist = [[float(sl[0]), float(sl[1]) for sl in stringlist]

instead
>>
>>60551369
>C
I'd like to actually ship code.

>Linux
That's the OS I was talking about.
>>
>interesting lisp discussion
>anons leave, it dies
>only shitposters remain

bad feel
>>
File: flat,800x800,075,f.jpg (18KB, 248x189px) Image search: [Google]
flat,800x800,075,f.jpg
18KB, 248x189px
>>60551397
>I'd like to actually ship code.
Oh, you mean like you can do with C?
>>
=> 60551320
=> 60551411
>ribbit the reddit frog
>>>/r/abbit/
>>
File: images (1).png (7KB, 225x225px) Image search: [Google]
images (1).png
7KB, 225x225px
>>60551400
>interesting lisp discussion
>mfw there is no such thing
>>
>>60551411
Sure, but you can ship something with more features in half the time in literally any other language for the majority of projects.
>>
>>60551385
thanks, it worked

>>60551343
Yeah, I'll need to look into maps, it gave me "argument must be a string or a number, not 'list'" error message

>>60551343
sure I did
>>
File: 1486790116968.png (249KB, 500x687px) Image search: [Google]
1486790116968.png
249KB, 500x687px
>>60551361
This one is cute.
>>
>>60550712
Oh lord

So Haskell and F# are bad languages, which functional language is better?
>>
>>60551441
>""ship""
Not programming related. Fuck off to some other thread.
>>
>>60551490
avoid for loops
avoid indices
you're not writing c
watch https://www.youtube.com/watch?v=OSGv2VnC0go
>>
>>60551355

I can run any good language on Linux. I don't particularly have a reason to use C# or F#, though I try to keep tabs on them, and occasionally use them for fun programs.
>>
>>60551516
Let the actual programmers talk, not the uni dropouts living in their parent's basement.
>>
>>60551501
>So Haskell and F# are bad languages
No. I said F# was "complete trash" and Haskell was "pretty bad". I didn't say just "bad".
>which functional language is better
Define "functional language".
>>
>>60551574

>Define "functional language"
Presumably, this would be a programming language designed around the principles of Functional Programming.
>>
Why does some subhuman keep responding to my posts?
>>
>>60551574
Note not all are necessarily functional;
Higher order functions, currying by default, partial application, algebraic data types, pattern matching, immutability by default (but can allow mutable data), first class tuple support, monads, composition, and as a nicety, meaningful whitespace
>>
>>60551609
Ruby, do you have a gf
>>
>>60551526
Ruby what is your opinion on >>60549739? Think it's doable?
>>
>>60551633
So just buzzwords with no real decision algorithm? Try harder next time. I can think of at least a few languages which don't fit all of this, but even you would admit that they're functional.
>>
Noob here, deciding to learn to code. What language should I start with?

>inb4 HTML
>>
>>60551522
for i in d is more readable
>>
>>60551681

Can you stop being so pedantic and just have an adult conversation?
>>
>>60551697
haskell!
>>
>>60551724
if you're not used to python
>>
>>60551725
I'm trying to. I just need a suitable definition of "functional". An algorithm for deciding the "functionality" of a language will do.
>>
>>60551697

I usually recommend Python to beginners. Don't do javascript, it's a shit language.
>>
>>60551632
Is someone triggering you?
>>
>>60551760
Js is much better than Python though my man
>>
>>60551760
>>60551820
>javascript
Fuck off to >>>/g/wdg/
>>
>>60551754

I'm not necessarily after a "functional" language, just a good language that has those features and that allows me to hopefully learn more about advanced programming language features.

I say this because an algorithm for defining "functionality" would be too broad, and in effect, pretty much most modern languages could be written "functionally". I consider a functional language to be one where functions and expressions are the main method of computation while avoiding side effects as much as possible, thus creating "pure" functions with referential transparency. But again, many languages fulfill this; take C# for example; you can get HOF and Monads, pattern matching, all that jazz.You can create pure functions in various ways and while enforcing immutability is tedious, it's definitely possible.
>>
>>60551834
Oh hi, how was your school/sleep?
>>
>>60551820

What are you basing that comment on? JS doesn't even have that much better of an ecosystem.
>>
File: idris.png (88KB, 802x841px) Image search: [Google]
idris.png
88KB, 802x841px
>>60551361
>I can actually apply fancy DT functions to user input
So, this is the power of dependent types.. woah...
>>
>>60551320
dumb frogposter
>>
>>60551441
only if you're a blub programmer who's only proficient in microshart technologies
>>
>>60551897
Why would you not be able to?
>>
>>60551632
because you're on /g/, duh

>>60551355
because it's not production-ready and doesn't support Kotlin
>>
>>60551632
>subhuman
>>>/pol/
>>
>>60551949
no, that's where THEY go
>>
>>60551949
>Complaining about /pol/
You just confirmed my suspicion that you along with most of this thread are straight from reddit. I wasn't even stating a /pol/ opinion, you have to go back.
>>
>>60551671

Hrm... I had to read several posts back to get an idea of what you're trying to do...

You want to make your own Lisp, you want stack allocation for everything possible, and you want to be able to do system calls from within Lisp.

>The goal is to make a Lisp interpreter with zero dependencies. Not even on libc.

In throwing libc out of the equation, you just broke portability, because you have to write a different interpreter for every operating system (syscall codes vary from OS to OS, invoking a syscall instruction on any version of Windows is UB, etc...).
>>
>>60551970
>implying nu/pol/ isn't 90% newfriends
>>
>>60551845
>I'm not necessarily after a "functional" language, just a good language
Well, Haskell is a pretty bad language, but it's certainly better than anything you have listed so far.
>learn more about advanced programming language features
If you want to do it purely for educational purposes, then start with something that at least had the potential to be non-shit. Something like Idris would fit this.

>I say this because an algorithm for defining "functionality" would be too broad
Not when you're the one defining it. It being too broad just shows that your notion of a language being "functional" is probably flawed in some way.
>>
>>60551975
>you want stack allocation for everything possible
Sounds like a great way to smash the stack. Why not do what Haskell does and not use a stack at all?
>>
>>60552012
My post doesn't imply that. I wouldn't be visiting a leftist board such as /pol/ anyway.
>>
I don't understand the Kotlin hype, it's a bad language, even worse than Scala.
>>
Gimme good java book
>>
>using a namespace in a header uses it in the file that includes the header
Why is this still a thing in 2017?
>>
>>60552089
Android devs are happy because it's better than Android Java clusterfuck
>>
>>60552089
>Kotlin hype
On your home subreddit? How about you fuck off to that shithole?
>>
>>60552111
I don't use a "subreddit".

>>60552109
Android devs are very easily pleased, then.
>>
>>60552054

>not use a stack at all
That's just as bad. The stack and the heap both have their advantages. You have two registers dedicated to a section of memory that gets manipulated with every call and ret instruction. It might as well be at least used for local variables, lest those registers be wasted and some other register have to point to all of those variables.
>>
>>60552089
there no hype at all
>>
>>60551361
could your syntax highlighting be any tackier
>>
>>60552236
Are you joking? It's being plastered everywhere. People proclaiming the death of all other JVM languages.
>>
(defun rooms (&optional (dim 1))
(mapcar #'funcall
(make-list dim :initial-element
#'(lambda () (make-list dim :initial-element nil)))))
(defun mesh (&rest lists)
(apply #'mapcar (cons #'list lists)))
(funcall #'funcall #'funcall #'funcall #'funcall #'funcall #'funcall
#'funcall #'funcall #'funcall #'funcall #'mesh (rooms) (mesh (rooms)))
;; SNAKE! SNAAAAAAAKE!
;; OHHHH IT'S A SNAAAAAAAAAAAAAKE
>>
include gmsl

JPI = 4
JPJ = 2

JPIJ = $(call plus,$(JPI),$(JPJ))


why does this work in my makefile without the include gmsl part? is the plus thing standard? how do i even begin to comprehend how my make stuff is configured?
>>
>>60552089
hipsters use it to feel good about themselves for not using java without having to learn a proper language like C++
>>
>>60552275
define "everywhere"
>>
>>60552275
i heard that for scala, i heard that for clojure, i heard that for groovy. i heard that for ceylon. i heard that for... there are now too many programming languages that are well installed for one to take the lead like C did in the 80's or java did in the 90's

Google is trying to push it for Android development but people continue to massively use Java or C++
>>
>>60552421
this
>>
>>60552436
Lisp is the easiest language to parse.
>>
File: 4b6.jpg (13KB, 600x515px) Image search: [Google]
4b6.jpg
13KB, 600x515px
>>60552312
>yfw this is what tears
retarded lispfags do with their time
>>
>>60551975
I only want to target Linux. The system calls are stable within architectures and they do a great job at keeping them binary compatible. I don't really mind lack of portability, I think it's overrated. I want to be as close to Linux and the machine as possible, hence system calls.

So I'd like to implement Lisp in a somewhat backwards manner. Usually everything starts with the REPL, but I plan to implement eval with a system call primitive first. The I/O functions read and write will be hardcoded into the interpreter as Lisp cells which can be fed into the evaluator. From then on the bootstrapping code can open and read other files that implement other built-in functions.

I think the best plan is to allocate a big static array of Lisp cells and implement a simple mark and sweep garbage collector to manage it. Hopefully it will be enough to bootstrap the language and execute the early code. Then once mmap is available I can map in new memory and have the GC manage it too.

Does this make sense or am I retarded
>>
File: VQSucsH.png (228KB, 858x725px) Image search: [Google]
VQSucsH.png
228KB, 858x725px
>>60551910
>yfw you realize no matter how many times you dumb frogpost me ill keep coming back
>>
>>60550319

import time
import json
from urllib import request

def rate():
url = request.urlopen("http://api.coindesk.com/v1/bpi/currentprice.json")

if (url.getcode() == 200):
data = json.loads(url.read().decode("ascii"))
print("Queried", url.info().get("Date"))
print('$' + data["bpi"]["USD"]["rate"], "at", data["time"]["updated"])
else:
print("Http request failed.")

while True:
rate()
time.sleep(90.0 - (time.time() % 60.0))


the price for bitcoin thru this api is only updated every minute between 0 and 30 seconds so this updates every XX:XX:30

sorry if its shitty this is literally my 2nd day of learning python
>>
>>60552369
>make
>comprehensible

Don't. I tried making my own library thing before giving up. I didn't know about gmsl either. Make is a turing tarpit. None of the important things you gotta do is easy. Checking if a path is a directory means checking if it contains a . file.
>>
>>60552436
just let's take a look at what we got these last years

Redhat -> Ceylon
Jetbrains -> Kotlin
Google -> Go, Dart
Apple -> CoffeeScript, Swift
Cray -> Chapel
Microsoft -> TypeScript, C#, F#
Mozilla -> Rust
GNU -> Vala
IBM -> x10
Facebook -> Hack

then you also have Babel, Crystal, Elixir, Julia, Golo, Sapphire, Nim, Haxe, Gosu, Scala, ..,

Now, since 7-8 years, everyone is making his own programming language which is now a lot easier to do.
>>
>Send project to professor for grading
>Realize that you called the window being created "Bollocks"
>>
>>60552312
What the fuck is that last form.
>>
>>60552583
loooooooooooooooool
>>
>>60552618
>>>/reddit/
>>
>>60552583
xD good shit
>>
>>60552581
At least 50% of those languages are shit
>>
>>60552688
>At least
Senpai...
>>
Kotlin is just Google's answer to Swift
>>
>>60552715
Pajeet...
>>
test
>>
>>60552731
My son
>>
>>60552716
more like the google answer to oracle lawsuit

kotlin is trash, it even has a keyword for tail recursion.
>>
>>60552745 i might have overdone it with the autism
>>
>>60552802
What's the matter? Failed your recursive algorithms class? Upset because recursion is generally cleaner than iteration?
>>
What language should I learn to impress cs qts
>>
>>60552944
erlang
>>
Idris is a shitlang.
>>
>>60552975
t. mad that nobody will give him a free copy of the book
>>
>>60552944
idris
>>
File: desktop.webm (2MB, 1280x1024px) Image search: [Google]
desktop.webm
2MB, 1280x1024px
>>60552845
>>
>>60552992
>no one wants to buy the book
>has to give them out for free
you know who gives out free books? religious cults.
>>
>>60552992
What?
idris is still a shitlang.
>>
>>60552581
>Apple -> CoffeeScript
Apple had nothing to do with CoffeeScript
>>
>>60553026
Insinuating that Idris is a religious cult? You really are devastated by its existence, aren't you? Want some cream for that ream?
>>
Idris is "interesting", but it's not at all practical. Point me to a large project written in 100% pure Idris.
>>
>>60553288
Idri-
oh wait, it's written in haskell
>>
What should I learn, Gtk or QT?

I've tried QT a bit and I have mixed feelings about it.
>>
>>60553549
They're both shit.
>>
New thread:

>>60553458
>>60553458
>>60553458
>>
>>60553555
So what do you suggest? I'd rather kill myself than use the 500 MB Electron shit.
>>
>>60553577
ncurses
>>
>>60553577
wxwidgets!

qt might earn you a record in your cv though, a few jobs around me are always looking for qtfags
>>
>>60553577
Doubling time for flash memory is 18 months and 1 TB micro sd cards already exist. In a decade or so every laptop will probably have 10 TB SSD's and binary size won't be a concern.
>>
>>60553288
"practical" for whom? How can a language be in general "practical"?
>>
Trying to get docker to run on aarch64. Not exactly programming but equally as frustrating
Thread posts: 348
Thread images: 61


[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.