[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: 318
Thread images: 23

File: 3807208431722048426.jpg (47KB, 637x579px) Image search: [Google]
3807208431722048426.jpg
47KB, 637x579px
What are you working on, /g/?

Old thread: >>58549352
>>
first for GNU emacs
>>
first for D
>>
File: Geoloc.png (23KB, 1306x310px) Image search: [Google]
Geoloc.png
23KB, 1306x310px
Trying to get a geo-location response from the website, which works quite well, but can't figure out how to format the XML output.
>>
Let's use Rust!
>>
Trying to learn python. What good books are there to accomplish that?
>>
>>58556643
Certainly not "Learn Python the hard way"
>>
>>58556652
I see. Do you recommend a book or author?
>>
>Objects are created on the heap in Java irrespective of their scope
>>
>>58556711
[bloat intensifies]
>>
>>58556690
"Learning Python" by Mark Lutz
>>
>>58556724
Thanks. Looks like a good book. A bit overwhelming, maybe.
It was released in 2013. Is it still relevant?
"Think Python" is recommended on the freenode's #python. Is it good?
Thanks again.
>>
>>58556711
If Java has built in garbage collection why is it still around?
>>
>>58556852
If you have no prior programming experience, yes.
>>
>>58556873
Tooling/libraries and an abundance of poo-in-the-loo labor.
>>
File: gnulag.jpg (482KB, 1920x1080px) Image search: [Google]
gnulag.jpg
482KB, 1920x1080px
>>58556533

Funny enough, it wasn't until I read a C++ For Dummies book that a lot of concepts in programming finally sunk in for me. I tackled C++ as my first language because I wanted to hack together mods for HL Gold engine. Miss those days.

HL3 confirmed.
>>
>>58556892
Thanks.
>>
>>58556554
ily
>>
ded
>>
does someone have a non-programming-guru image of a DPT programming challenge
>>
>Modify netvmini sample driver from Microsoft to print the contents of its network packets to the kernel debugger instead of just dropping them on the floor
>Need to test to make sure this works
>This is basically a network adapter, so it has a MAC and IP address, but isn't, strictly speaking, listening on any "ports", so I can't just throw TCP or UDP packets at it, since any call to connect() would fail.
>Need to use raw sockets
>Make a simple script with Ruby to send a raw IP packet at the thing using Socket::IPPROTO_RAW
>Get an exception back that it failed since the socket is not connected, it couldn't find out where the fuck to send it
>Wonder what the fuck happened there, since you don't use connect() with raw sockets
>Do a little more research into this shit
>Windows does not support raw sockets except in Windows 2000 and Windows XP before SP2
>WTF Microsoft?
>Fuck it, let's try some tools designed for this shit
>Download wireshark
>Can't detect the fucking adapter even though I can clearly see it in the list of network adapters as enabled, and I can see its details with ipconfig /all
>Try Ostinato, apparently designed for this purpose
>Doesn't actually send any packets after specifying a MAC address to send raw ethernet frames at, no sort of "send goddammit" button

And this is just the beginning of the mess I've got ahead of me.
>>
What's your naming convention are you using on your database tables, index, primary/foreign keys, etc?
>>
>>58557440
Primary keys start with a capital, foreign keys start with fk_, table names are plurals and that's about it.
>>
>HTML is more complicated than having to learn a new unique method of markup
>>
>>58557457
>foreign keys start with fk_
DBA here.

Kill yourself ASAP. Only the constraints themselves should get prefixed. The foreign key column should be named the same as the primary key in its native table.

Unless that's what you meant, in which case...carry on.
>>
>>58557440
Table names are singular and CamelCase, primary keys are lowercase, foreign keys are suffixed with _id, columns are snake_case.
>>
>>58557546
You also need a rope and a chair.
>>
>>58557551
Who am I tortoise shelling?
>>
>>58557546
>CamelCase
You don't know what camelCase is.

Are you thinking of PascalCase?

>>58557440
Virtually everything should be in PascalCase. There are some all lowercase exceptions.

No underscores except when prefixing supporting objects such as constraints, stored procedures, and functions.

Table names are singular.

If your primary key in one table (Penis, not Penises) is PenisId, it should also appear as PenisId in any tables where it is used as a foreign key.
>>
why would anyone prefer PascalCase over under_scores?
makes it easier, say, for annual_iteneraries instead of having AnnualIteneraries
That's just an example, anyway
>>
>>58557588

SELECT p.Sperm, v.Egg FROM Penis p JOIN Vagina v USING (PenisId)
>>
>>58557613
Switch your font to that one which distincts lowercase L and uppercase i.
>>
>>58556620

This is actually a Rust macro for "Fuck it, let's just keep using C."
>>
File: IMG_4077.jpg (75KB, 1084x796px) Image search: [Google]
IMG_4077.jpg
75KB, 1084x796px
Anybody good with Swift here?
I'm trying to understand an early passage from Apple's iBook (pic related).

Why can't I call the makeIncrementer() function directly without instanciating it in line7 first?
My explenation is that MakeIncrementer returns a function type, and not addOne (which returns an Int type), so you need to give this function you are returning a name (increment, in this case).

So, from the code, if you delete makeIncrementer, of course you can call addOne directly (addOne(7) for example). But what about if I want to nest makeIncrementer inside another bigger function (lets say makeMakeIncrementer)? How I would I write the parameters and return of this makeMakeIncrementer?

You can compile Swift online here: https://swiftlang.ng.bluemix.net/
>>
>>58556916
fugg
i remember trying to to hack together addons for gmod while not having a fucking clue of what i was doing
those were the days
>>
>>58556533
What's the coolest mathy looking language? More mathsy than haskell pls
>>
So I'm looking at a job posting at it says you will first start as a java backend developer and then go more towards UX. What does UX mean as a java developer? I thought they could mean the interface for android, but they haven't mentioned android anywhere.
>>
>>58557835
Agda
>>
>>58557835
Matlab
>>
>>58557794
Naming doesn't matter.

We could modify this code slightly as:
func makeIncrementer() -> ((Int) -> Int) {
return { (a: Int) -> Int in
return a + 1
}
}

print("\(makeIncrementer()(10))")


MakeIncrementer does return a function type, so that function must be called. It's bad to think of what you have in line 7 has instantiation -- you are capturing the function value that MakeIncrementer returns.

>How I would I write the parameters and return of this makeMakeIncrementer?
func makeIncrementer() -> ((Int) -> Int) {
return { (a: Int) -> Int in
return a + 1
}
}

func makeMakeIncrementer() -> (() -> ((Int) -> Int)) {
return makeIncrementer
}

print("\(makeMakeIncrementer()()(10))")
>>
>>58556916
The problem with C++ for Dummies is not the content, it's the tainted name. Most of their books aren't just for idiots, they're written by idiots.
>>
                operator[] operators = { "&", "|", "<<", ">>" };

foreach (var op in operators)
{
Console.WriteLine($"{op}: {zahl1 op zahl2}");
}



is there a way to make this work?
>>
>>58556533
Thank you for using an anime image!
>>
>>58557890
I like that "capturing the value". So I was right about it. You need to give a name to the function that makeIncrement returns and at the same time you capture its value.

And if you nest addOne in makeIncrement and then in makeMakeIncrement, can you then call it?
Could you show me? As you didnt nest makeMakeIncrement.
>>
>>58557905
what the fuck am I reading
>>
What anime program should I make?
>>
>>58557588
why

I use underscores in place of spaces and all lowercase.
>>
>>58558085
one that generates shit waifus
>>
File: anal beads.png (6KB, 483x129px) Image search: [Google]
anal beads.png
6KB, 483x129px
>>58557905
You're trying to convert strings to operators?

This is technically possible, but you'd be better off defining possible operators with a switch case, maybe even as an extension method:
public static int BitOperator(this string logic, int x, int y)
{
switch (logic)
{
case "&": return x & y;
case "|": return x | y;
case ">>": return x >> y;
case "<<": return x << y;
default: throw new Exception("Not a chance, mate.");
}
}


So you can do:
var operators = new List<string> { "&", "|", ">>", "<<" };
var numberOne = 42;
var numberTwo = 69;

operators
.Select(x => x.BitOperator(numberOne, numberTwo))
.ForEach(WriteLine);

Or use your array or whatever.

Also, fucking krauts have a major hardon for C#. I'm assuming its big over there?
>>
>>58558085
one that detects an anime /dpt/ OP then reports it
>>
>>58557905
Maybe you can make a mapping from string to function pointers of
operator&
operator|
etc.
>>
File: 1477860473400.jpg (547KB, 2708x1422px) Image search: [Google]
1477860473400.jpg
547KB, 2708x1422px
>>58558085
Train a neural net to classify smug anime faces and then run it on every frame of every new episode release automatically to grow your collection.
>>
>>58558120
>Also, fucking krauts have a major hardon for C#. I'm assuming its big over there?
Kraut here, we used to write everything in Visual Basic, now that that's not a thing anymore we switched to C#
>>
>>58558132
You'd need a really large initial set of images.
>>
template engine for javascript/jquery (the jquery part executes the non-jquery functions. so it can be used without jquery.) had little progress so far. it can only print variables for now.

// function that getsdatas with dot notation
function getVar(name,data) {
var name = name.split('.');
for (var i = 0; i < name.length; i++) {
var data = data[name[i]];
}
return data;
}

// converts template strings to actual content
function compileTemplate(template,data) {
compiled = template.replace(/{\$(.*?)}/g,function() { return getVar(arguments[1],data); } );
return compiled;
}

// jquery method that inserts template into dom
$.fn.loadTpl = function(template,data) {
var tpl_dir = './tpl'; // directory of where template files are stored
var tpl_path = tpl_dir + '/' + template + '.html'; // path to the template file
var tpl_file = $.ajax({
url: tpl_path,
async: false
}).responseText; // store the template file in a variable
result = compileTemplate(tpl_file,data);
this.html(result);
return this;
}
>>
>>58558142
>we used to write everything in Visual Basic
Interesting, I wonder what propagated that.

Not that I'm complaining. C# is my favorite language, and I like working with you kartoffels (kartoffeln?) because you're more straightforward culturally than other countries, who tend to beat around the bush and refuse to call a spade a spade.
>>
File: 1479181965324.webm (332KB, 640x480px) Image search: [Google]
1479181965324.webm
332KB, 640x480px
>>58558143
One day of lurking 4chan should be enough.
>>
>>58558170
No, really, you'd need a very large set.
>>
>>58558132
I'm not that evolved yet. Is that actually possible though? If so, I'll make it my long term goal.
>>
File: javaee7-theme.png (344KB, 1475x721px) Image search: [Google]
javaee7-theme.png
344KB, 1475x721px
>>58556533
why can't /g/ into java ?

the only language that can get you a job.
i was even doing kernel level programming with C, but in the real world you'll never find a job where you write kernels for a living, you only have Java EE offers.

i'm learning it now, i should finish it in 4 days.
it just werks. and pays the bills.
>>
>>58558193
yes
>>
>>58558207
i wasn't born in india, i was pretty close though.
>>
>>58558193
It should be possible but as >>58558188 said you'd need a pretty big set of images to train it on. Pretty sure that if a bunch of anons pooled their collections together it would be enough. Maybe the first step would be to train it to recognize any sort of face.
>>
>>58558188
two days then?
>>
>>58558230
I have a decent enough collection myself and I'm sure I can manually collect a lot of images.
>>
>>58558221
so you admit that you're too stupid to learn java ? that even indians are better then you ?
>>
>>58558207
Most of offers here are still C++. I got nothing against Java though, love how they created a binary file format to be essentially just a .zip file. Was Java the first to do that?

>>58558224
>>58558234
No.
>>
>>58558014
>>58557890
>>58557794
bump
>>
>>58558207
JEE is an insult to intelligence, projects in JEE could be handed down to robots if someone was actually motivated enough to program such things. But then, you'd guess the unemployment would get through the roof.
>>
>>58558250
yeah, i guess so. i'm just not into indian oop shit.
>>
File: chart (1).png (86KB, 1200x800px) Image search: [Google]
chart (1).png
86KB, 1200x800px
>>58556533

I'm writing a bitcoin bot from scratch that is market neutral to trade off of stagnation in the market, with the ability to lean bullish or bearish. Already have my first investor, but I'm not taking real shekels just yet.

Pic related, testing 5 different strategies out at once, just launched the first scaled test where I launch multiple nodes/bots that report back to my main charting instance that displays all the data.

Built over the last week, still got a ways to go.
>>
>>58556643
Automate boring stuff with Python
>>
>>58558273
What language?
>>
>>58558272
what are you into then ?
>>
>>58558303
node mostly since it's easy to quickly flesh out a full stack using it and I can quickly deploy the dashboard and bots to AWS Lambda/DynamoDB and then have a single EC2 nano controlling the Lambda functions. Using an arbitrary precision library since javashit is notoriously bad at math.
>>
>>58558255
That looks like such a useless function to write. Here's what incrementer usually does.

func makeIncrementer() -> (() -> Int) {
var value = 0

return { () -> Int in
value = value + 1
return value
}
}

let incrementer1 = makeIncrementer()
let incrementer2 = makeIncrementer()

print( incrementer1() )
print( incrementer1() )
print( incrementer1() )
print( incrementer1() )
print( incrementer2() )
print( incrementer2() )
print( incrementer1() )
print( incrementer2() )


Prints:

1
2
3
4
1
2
5
3
>>
>>58558311
a lot of stuff. pretty much anything non-indian
>>
>>58556643
Currently reading "Python for the absolute beginner (third edition)" and it's pretty good if you have no clue about anything.
>>
>>58558338
like ?
>>
>>58558358
>>58558311
>>58558250
Are you french?

Stop putting a space before your ending punctuation. It's simply incorrect when communicating in written English.
>>
>>58558386
I've seen some written French, and I don't remember them putting spaces before punctuation. In my experience, only mentally retarded do that, regardless of their language.
>>
File: anal beads.png (56KB, 713x871px) Image search: [Google]
anal beads.png
56KB, 713x871px
>>58558386
>>58558410
Fucking frogs, man.
>>
>>58558410
>>58558386
Looks like I'm wrong.

https://news.google.fr/

Spaces before question and exclamation marks.
>>
>>58558386
oui je suis français.
>>
>>58558014
Of course you can call it this way. It's really important to realize that *functions are values.* You can use them as though they were any other value.

func makeMakeIncrementer() -> (() -> ((Int) -> Int)) {

func makeIncrementer() -> ((Int) -> Int) {

func addOne(a: Int) -> Int {
return a + 1
}

return addOne
}

return makeIncrementer
}

print("\(makeMakeIncrementer()()(10))")


But again, names are unimportant. You can just as easily define this with anonymous functions:
func makeMakeIncrementer() -> (() -> ((Int) -> Int)) {

return { () -> ((Int) -> Int) in

return { (a: Int) -> Int in
return a + 1
}

}
}

print("\(makeMakeIncrementer()()(10))")


In Swift, as in other functional-esque languages, functions are values, just like Ints, Strings, etc.
>>
>>58558438
So what's with your irrational hate for Java? Did they teach it to you against your will in school?
>>
>>58558440
Ok, let me make a point about the things I needed to understand.

1) the reason why I need that line 7, is number one, to give a name to the function returned by makeIncrementer (and subsequentially capture its value). Y/N?

2) The correct way to write the function arguments when you call it is like this: "()()(10)" for example. One next to the other. Y/N?
>>
Okay so I've been programming for like 2 months. Iast thing I learned was how to read and write text files. If I want to work with images would it be extremely difficult to write the code myself? I want to rely as little on API as possible.
>>
https://vuejs.org/

>The Progressive JavaScript Framework

What did they mean by this? I already feel put off.
>>
File: benchmarksgame.png (74KB, 648x375px) Image search: [Google]
benchmarksgame.png
74KB, 648x375px
>>58556711
it's still one of the fastest languages. allocating on the heap in java isn't the same as calling malloc in C/C++, it's more like having a custom allocator which uses pre-allocated memory
>>
>>58558120
It says 'IEnumerable<int>' does not contain a definition for 'ForEach'. even though I'm using System.Linq.
Do I have to write an extension method for Foreach?

>Also, fucking krauts have a major hardon for C#. I'm assuming its big over there?
I'm from Switzerland, they teach it at my school. Microsoft is really big here.
>>
>>58558723
Performance is not only about CPU cycles once the caches are warmed up. What about the warm up time and memory usage?
>>
Can anyone think of any intuitive assembler mnemonic for swap base pointer and stack pointer?
>>
>>58558676
If by "by yourself" you mean writing an image decoder by hand, I'm not sure "difficult" is the right word, but it won't be fun at all unless you like reading a bunch of standards and then worrying about undocumented edge cases.

Of course, you could easily make or work with a simple image format (like a simple bitmap) if you really wanted to with relative ease, but it won't have fancy compression or anything.
>>
>>58558757
>warm up time
the benchmarks are quick run-once programs

>memory usage
fair point, but for most applications it's not critical to have minimal memory usage. even embedded systems can run java or some form of java

https://en.wikipedia.org/wiki/Java_Card
>>
>>58558783
If it can run Java, it's not really embedded.
>>
>>58558762
swbs
>>
>>58558804
how so?
>>
>>58558148
bumping this. any ideas how i can implement if/else logics into it without using eval?
>>
>>58558859
I suppose you'll get more help in /wdg/
>>
File: IMG_4079.png (152KB, 1242x2208px) Image search: [Google]
IMG_4079.png
152KB, 1242x2208px
>>58558440
>>58558658
Ok, final boss: Why in the first picure I only need 2 "()(10)" to call the method but in the second picture I need 3 "()()(10)".

Pic 1/2
>>
>>58558867
thanks anon
>>
>>58558731
>It says 'IEnumerable<int>' does not contain a definition for 'ForEach'. even though I'm using System.Linq.
>Do I have to write an extension method for Foreach?
Yeah, I made an extension method to allow ForEach on enumerables. I carry it around in a personal NuGet package, along with many other things. You can use your array with foreach just like you were doing before if you want.

Assumed you were a kartoffel from the "zahl".

Here's the extension method if you want it:
public static void ForEach<T>(this IEnumerable<T> source, Action<T> action)
{
foreach (T element in source) action(element);
}
>>
File: IMG_4080.png (146KB, 1242x2208px) Image search: [Google]
IMG_4080.png
146KB, 1242x2208px
>>58558889
Pic 2/2
>>
>>58558723
>benchmark game

Yeah, most of those are benchmarking libraries more than anything else. If you do the regex one, the languages that have mature regex libraries are way up there. PHP is in first place, ffs. You can't tell me it's a faster language than C.
>>
>>58558767
I want to write a program that compares images and deletes duplicates
>>
I'm trying to learn MVC (implemented through PHP), but can't figure out one thing.

Let's say I have the list BookListView, which generates an HTML table. I found this (although I've modified it) online.
// BookListView.php

...

public function render()
{
$html = '<table><hr>Title</hr>
foreach ($this->model->findAll() as $book) $html .= '<td>' . $user->name . '</td>';
$html .= '</table>';
return $html;
}

How do I place this on a page? Is the view responsible for creating the entire page, or is that responsibility of the front controller, i.e.
// mvc.php
require 'BookListController.php'
require 'BookListModel.php'
require 'BookListView.php'

$m = new BookListModel();
$c = new BookListController($m);
$v = new BookListView($m);
// controller logic is skipped

include 'header.php'; // echoes some header shit
echo $v->render();
}

What's the responsibility of the view? What part creates the full HTML? Can I, from the front controller, call several methods of the view to create a full page (i.e. a list here, latest book here, top rated books here, etc), or does that go againt the purpose of MVC?
>>
>>58558901
thank you :)
>>
>>58558917
The problem with regex-dna, is that the rules are stupid. You can not replace regex with the much faster literal matching, but if your regex library does literal matching under the hood or JIT compiles regex down to literal matching, it's perfectly fine.
>>
>>58558946
That's pretty straight forward, if you mean exact copies. If fact, your program shouldn't care about the data inside at all, so it should work on all files.

Otherwise you'll have to implement some kind of perceptual hashing algorithm (or ya know, use a library)
>>
>>58558953
This reminds me of an assignment I had to do in college
>>
>>58558946
if you only care about exact duplicates, you don't even need to treat it as an image, just compute a hash and compare

if you want to delete near duplicates that's a much harder computer vision-type problem and you'd likely get false positives and/or false negatives
>>
>>58558889
>>58558904
bump
>>
>>58559063
>just compute a hash and compare

SLOW

You should only hash if multiple files are the exact same size. If they aren't the same size, they obviously aren't the same. Hashing requires you to walk the entire file.
>>
I'm working on a little AR project, people are supposed to find an object wich is basicly a usb key, when the key is plug in a computer it launch a windows form (full screen, no alt-tab or alt-f4 possible) that is done.
now what I'm looking for is to encrypt the files on the drive so we can't access them by exploring the drive in the explorer.But if we manage to answer the question in the form the files become accessible/visible any advices/idea how I should go about this ?
>>
File: 1484621174496.jpg (436KB, 1280x720px) Image search: [Google]
1484621174496.jpg
436KB, 1280x720px
What's the best OCaml book?
>>
Java AES encryption decryption class

import java.nio.file.Files;
import java.nio.file.Paths;
import javax.crypto.*;

public class Main {

public static void main(String[] args) throws Exception {
//String FileName = "encryptedtext.txt";
//String FileName2 = "decryptedtext.txt";

KeyGenerator KeyGen = KeyGenerator.getInstance("AES");
KeyGen.init(128);

SecretKey SecKey = KeyGen.generateKey();

Cipher AesCipher = Cipher.getInstance("AES");


byte[] byteText = "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.".getBytes();

AesCipher.init(Cipher.ENCRYPT_MODE, SecKey);
byte[] byteCipherText = AesCipher.doFinal(byteText);
//Files.write(Paths.get(FileName), byteCipherText);
String ciphtx = new String(byteCipherText);
System.out.println("byteCipherText:" + ciphtx + "\n");


//byte[] cipherText = Files.readAllBytes(Paths.get(FileName));

AesCipher.init(Cipher.DECRYPT_MODE, SecKey);
byte[] bytePlainText = AesCipher.doFinal(byteCipherText);
//Files.write(Paths.get(FileName2), bytePlainText);
String ctx = new String(bytePlainText);
System.out.println("bytePlainText" + ctx + "\n");
}
}
>>
>>58559265
can't be done unless the answer to the question was the encryption key
>>
>>58559548
>not catching exceptions
disgusting
>>
>>58556533
Guys I learned how to use arrays in C#

now I need an exercise so I can remember this shit, please give me one.
>>
>>58560120
BuzzFizz
>>
>>58559449
why is she so sweaty? did she just do some cardio?
>>
>>58556711
Escape analysis will cause it to do stack allocation whenever it can
>>
>>58560120
learn how to sort them and shit
>>
>>58560120
Blackjack game.
>>
>>58556873
It's still collecting
>>
I have an alright grasp of C++ and some knowledge of data structures

What can I learn that will make the idea of creating software less intimidating?
I feel like while I know the language, there's little I can actually do
>>
>>58560255
>I feel like while I know the language, there's little I can actually do
try some dude weed lmao
>>
>>58560120
That doesn't make sense.

If you understand how to use a hammer, that's great, but there's not much else you can do at that point other than put nails into things.

Now learn how to use a saw, a measuring tape, and a paintbrush, and you can make a doghouse or a picnic table. In other words, continue learning more of the language so you can see how arrays work with the other tools at your disposal.
>>
>>58560255
meth
>>
>Android app
>Works fine on Tablets
>Looks shit on phones (but users seemingly want this)
>Only a few views need to change
>The rest can be shared
>res/layout & res/layout-large seems to do the job

How do I avoid duplicating the bits that can be shared? I have about 30 views and only 4 need re-designing, the rest can be the same.
>>
>>58558889
because its a function that returns a function that returns a function? isn't it obvious? (maybe not if you've never gotten to use first-class functions)
>>
>>58558917
That's the point of the benchmarks though...
>>
>>58560255
>how can I become more creative

drugs
>>
>>58556620
Rust has been THOROUGHLY debunked. It has no future.
>>
>>58557428
thanks for blogging your babbys first network driver experience
>>
>>58560380
unions
global variables
>>
>>58559105
what if the image A has metadata associated with it that image B doesn't? their disk sizes are different (assuming ADS -- or similar isn't in effect) in this scenario.

what if the images are losslessly compressed at different rates? the images are the size, but their file sizes differ.
>>
>>58560413
Rust having been debunked has been debunked.
>>
>>58560444
esr says go > rust
>>
>>58560444
"Rust having been debunked has been debunked" has been debunked.
>>
>>58560444
https://blog.ntpsec.org/2017/01/18/rust-vs-go.html
Rust simply isn't usable for real development
>>
>>58560454
>esr

Literally too dumb to concatenate strings.
Also nice argument by authority.
>>
>>58560444
Every rust thread ends with it being BTFO with genuine issues that can't be defended.
>>
What is this retarded shit? Runtime complains that access to COM3 has been denied (typically something else is using that port, which isn't true)

Source Code: http://pastebin.com/ApJQL0Ar
>>
>>58560454
Rust and Go are not really comparable. Rust aims to be a systems language, but Go targets the middle ground between C/C++ and Java.

t. Gofag
>>
>>58560504
Rust is too slow (slower than Go) for writing drivers, and the standard library lacks the concurrency primitives needed to write system services.

Go was billed as a systems language from day 1. You can work with raw pointers and disable the GC in critical sections, which is all you need for most system software, including kernels.
>>
>>58560439
Why are you replying to me? I was responding to the assumptions the other anon made.

If the file size is different then them sharing a hash is only because of a collision.
>>
>>58560555
>Rust is too slow (slower than Go)
[citation needed]

>lacks the concurrency primitives needed to write system services.

This is just straight wrong.
>>
>>58560495
its likely because of a race condition. you can only open the COM port once, but
Dim buffer As String = SerialLogger() 

multiple calls like that will throw an exception. you need to either make the
Dim COM3 As Ports.SerialPort 

static, or find another way to share it (or, close the port -- but wrapping it in a static factory, or similar would be a good choice)
>>
what's a good, complete python book? i already know how to use python and i've done it for a few years now, but what should i read if i wanted to know the ins and outs?
>>
>>58560639
and forgot to mention: you can Close / Dispose it but theres a quark with how the SerialPort object works:
>The best practice for any application is to wait for some amount of time after calling the Close method before attempting to call the Open method, as the port may not be closed instantly.
>>
>>58560555
>including kernels.
I'm a gofag myself but I think this is intellectually dishonest.
Regardless of what their marketing team has to say, go always seemed like a soft-realtime language to me. However anything with a GC is automatically excluded from many realtime problem domains.
>>
>>58560711
>soft-realtime
which basically means nothing
>>
>>58560711
Kernels are not a hard realtime problem domain unless they're specifically for a hard realtime OS, and those are always written in assembly.
>>
>>58560735
It means things like high-concurrency web servers, but not flight control systems on space shuttles.
>>
>>58560555
What did they do for writing system services before Go was created? Atomics can work and the std::sync package can build CSP-like structures and methods. It provides atomics along with a "Multi-producer, single-consumer FIFO queue communication primitives." and higher level primiatives like mutexes, semaphores and barriers.

As for concurrency, with the aforementioned libraries you can use std::thread and its contained spawn/park/unpark and TLS to implement goroutines (green threads, and m:n scheduling).

Sure its a lot more work, than just setting GOMAXPROCS and freely using 'go' and channels. But having deterministic control over memory usage, and resource usage in general is a price you have to pay for.

(a bit rantly, but tl;dr relying on memory usages/layout isn't guaranteed in Go releases, still. Nor is the determinism of the scheduler, still. But its well defined for each release..) But do you remember in the like r63 days of how the scheduler in Go worked? or how slow it was up until like 1.5? or how the split stack reimplementations and the memory bloat matched the binary size bloat that was happening since 1.1? (changing the split stacks from 2kib to 4 to 8 and then redoing the whole stack layout for goroutines w/ the concurrent gc, and the new changes with the SSA backend..)

(Not that I like Rust. I heavily prefer Go but saying Rust can't do things is rather ignorant.)
>>
when I watch a youtube video, can I track the incoming packets with wireshark?
>>
>>58560922
of course, but that quest belongs in /sqt/
what makes you think it'd not work?
>>
>>58560891
Rust lets you spawn threads, but concurrency fundamentally isn't a priority so actually working with them is anemic, error-prone, and non-portable. They expect the community to fix this by making third-party libraries ("crates").

>But do you remember in the like r63 days of how the scheduler in Go worked?
I wasn't using it back then. because I am not a language hipster who jumps on every fad before it's had years of point releases to prove itself.
>>
>>58560555
>having to lie to promote your shitty language on /g/
top kek
>>
>>58557850
swing, awt, javafx?
>>
>>58561034
>swing, awt

How often do people start new, large, projects using these?
>>
>working with .pgm file formats
>I convert .pgm to .txt
>values in the .pgm are 0 or 255 (black or white); but my algorithm can construe them as 0 or 1 instead (I only care about a binary difference)

This isn't so much a programming question as it is a C++ I/O question. My program takes a long time with larger pgms. I'm talking 6-7min for a 7000x7000 B+W image. But the .pgms contain values 0 and 255.

1) does C++ I/O store an opened file in memory after it has been closed? I can understand my program taking a while to open a 150mb file, but after it has been closed I'm only iterating through a 7000x7000 2D vector of ints. I'm wondering if there's some memory issues as even when I close the file the program doesn't speed up.

2) say you had a .txt file with 49000000 "255"s in it. In the below format:

255 255 255 255 ...
255 255 255 255 ...
255 255 255 255 ...
255 255 255 255 ...
... ... ... ... ...


How much would the filesize be reduced to if it were changed to 49000000 "1"s?

1 1 1 1 ...
1 1 1 1 ...
1 1 1 1 ...
1 1 1 1 ...
... ... ...
>>
>>58560998
>but concurrency fundamentally isn't a priority so actually working with them is anemic, error-prone, and non-portable.

The fuck are you even on about? What exactly is it "missing"?
>>
>>58557835
Ada SPARK or the Isabelle/HOL formulation of Arm assembly used for SeL4.

>>58560711
Erlang has a pretty neat strategy of strict isolation between processes meaning that GC pauses only affect one thread at a time.
>>
>>58561069
1) you're probably doing it wrong, how do you read the file?
2) yes, about the 1/3rd of the size since 255 is 3 characters and 1 is one (the text file treats each character as a byte, even though 255 could be stored as one byte, I guess that's what pgm does in contrast)
>>
>>58561069
>2)
1/3 of the original size.
If you really want to save space you could store the 1s and 0s as raw binary. You could even define your own file format and only write "blocks" of [N](1|0) where N is the number of repeated 1s or 0s in a row.
Or just lzma that shit.
>>
>>58561114

I open the file, transfer it into a 2D int vector (typedef'd "pixelData" here), then close the file.
>>
>>58561114
>>58561124
> yes, about the 1/3rd of the size
How about 1/2nd?
For every "255" you have a space character, which makes to 4 bytes per "255".
For every "1" you have a space character too, which makes to 2 bytes per "1".
It implies you have only '\n' in the end of line after '1'.
>>
>>58561069
>My program takes a long time with larger pgms. I'm talking 6-7min for a 7000x7000 B+W image. But the .pgms contain values 0 and 255.
Then you fucked up something.

>1) does C++ I/O store an opened file in memory after it has been closed?
No. This is on your end.

>How much would the filesize be reduced to if it were changed to 49000000 "1"s?
About half. You replace four bytes ("255 ") with two ("1 ").
>>
>>58561144
you're readying the file byte by byte, try reading the entire file into a buffer then fill pixelData?
>>
>>58558658
1. Yes, but let me stress that you do not __need__ number 7.

2. Think about this:
f()

parenthesis following a symbol can be considered a function-call operator. If you have a function that number, then you could write something like:
var a = f() + 10


If the function returns another function, then that value is similarly immediately accessible for use, i.e.
var a = f()(10)


>>58558889
Consider what I said about () being a function-call operator. If I call a function that returns a function that returns another function, then we need something like:
f(/*parent function*/)(/*first returned function*/)(/*last returned function*/)
>>
>>58561097
Erlangs' model is novel because you don't need a state of the art GC to handle it.

But its nothing new, nor unique. HotSpot provides a parallel, incremental concurrent GC that can pause one thread (and for specific heaps..) while letting the others continue on. J9 / JRockit and Azul take this even further with some pretty interesting properties (and use cases: e.g. many-many gigabyte hemispheric heaps, etc)
>>
>>58561156
Oh yeah, I'm retarded.
>>
>>58560555
>You can work with raw pointers and disable the GC in critical sections, which is all you need for most system software, including kernels.
Well, C# can do this too.

You don't see people scrambling to make a kernel in C#.
>>
>>58561071
OS threads are the finest-grained tool available. There's no green thread support anywhere in the language. This isn't something a library can add, either.
>>
I need to write a program that does this to a string:

aaabbccaa -> aaaaaccaa -> aaaaaaaaa

or

aabbcc -> aacccc -> cccccc

anyone know the solution/know the name of the problem?
>>
>>58561207
C# is even more established than Go. Rust is still in the experimental stage, and the experiment has failed.
>>
>>58561069

If you're only doing black/white, you can just pack pixels into bytes. That ought to be fairly trivial, and you can cut filesize way down.
>>
File: clip+(2017-01-19+at+05.59.42).png (8KB, 437x239px) Image search: [Google]
clip+(2017-01-19+at+05.59.42).png
8KB, 437x239px
Why doesn't this work?

I just found out about super() function today, please no bully.
>>
>>58561207
What about Midori / Singularity? (at different points they were written in C#, then Sing#)
>>
>>58561124
>Or just lzma that shit.
This. Makes it human readable (if you care), at the cost of only slightly higher file size.
>>
>>58561232
you're missing the self argument in all of your functions
it needs to be explicitly written out
>>
>>58561232
The first argument to init is always self. See the warning on "name" in the parent class.
>>
>>58561208
Remember when Rust did have green threads? (ontop of an event loop provided by libuv)
Those were the good days before the Ruby and SJW infection spread.
>>
>>58561208
>There's no green thread support anywhere in the language.

There used to be M/N threads. In fact, it originally was designed around it. It got scrapped because it didn't actually add much in practice and added a big runtime overhead in the stdlib. But I knew this was gonna be "muh green threads" bullshit.

>This isn't something a library can add, either.

Okay, you're legit retarded.
>>
>>58561254
It doesn't have to be self, its only a convention. Its recommended by PEP8, but "self" not required by the language. Any name binding works.
>>
>>58561266
Rust also had GC back then
>>
>>58556533
/dpt/ desperately needs to be renamed to /dlc/ - Daily Language Circlejerk
>>
>>58561249
>>58561254
Oh alright, thanks.
Didn't realize you had to do that because it used to just work without self before.
>>
>>58561224
You need to fill the string with the leftmost or rightmost character?
>>
>>58561288
Rust still has a library-based GC if you consider Rc / Arc as a GC (hint: technically they are.)
>>
>>58561208
>This isn't something a library can add, either.

Wrong.

https://en.wikipedia.org/wiki/Green_threads#Green_threads_in_other_languages

>Rust support for green-threads is possible using mioco library
>>
>>58561308
I'm pretty sure that the @ smart pointer was basically just Rc anyway. My memory is a little fuzzy, though.
>>
>>58561303
No, sorry the problem is more complex. You need to fill the string with any character, but can only fill entire sections at the time. One fill of a section counts as one 'turn' and you need to find the smallest amount of turns to fill it completely.
>>
>>58561316
>wiki
Let's see you using it and proving it works. If you can't manage to do that, it's vaporware.
>>
Java is pure.
>>
>>58561356
pure trash
>>
>>58561340
You're moving goalposts now. You claimed that green threading can't be done via a library, I proved that a library exists that implements green threads: https://docs.rs/mioco
>>
>>58561418
The burden of proof is on you.
>>
>>58561340
lol no generics
>>
>>58561340
How do you think call/cc and coroutines work? In languages that use them, they aren't some magic in the compiler/runtime (well, technically with call/cc the reader does some CPS magic..).

Would you say Lua does or does not have green threads? What about different Schemes? What about D? Fibers in D are implemeneted as a library, as part of the vibe.d web framework. Do you consider fibers to be green threads? What about C#'s TPL and Microsofts PPL for C++ or Intels TBB? They provide green threads and aren't reliant on the language, but rather using thread pools (and atomic primatives) to implement schedulers and concurrent models (async/await, futures, coroutines, continuations, etc) to implement green threads.
>>
Hey guys, I've thought a lot about it and I think you could be the most helpful.
Because of my health problems i've decided that programming is pretty much the only job for me. I've always been good with tiny shit like bash or html years ago, but never went deeper than that. I have some programming friends, but they're young like me and don't have much experience.
Anyways, I like to think I have technical mind and all that, should I start with C or C++ and make my way from that?
Also, I was recommended Scala. Could I learn it without prior experience, and is it any good?
>>
>>58561459
if you want to learn Scala, learn Haskell
>>
>>58561339
One section is a group of the same characters placed one after another?
>>
>>58561469
Yeah.
>>
>>58561227
>>58561233
I was just pointing out that the qualities of disabling GC and working with pointers does not a systems language make.
>>
I love Java
>>
File: 1484622985684.png (356KB, 599x510px) Image search: [Google]
1484622985684.png
356KB, 599x510px
>>58561489
>>
>>58561492
what would I except from haskell girl
>>
Finally finished my shitty shell buildscript for GCC cross-compilers. It needs some touchups, any recs?

http://pastebin.com/TdnXmuKk
>>
>>58561485
Neither does not having a GC.

A systems language needs direct access to the hardware. Rust can't give you that because you need to be kept "safe."
>>
>>58561467
You mean before, or instead?
>>
>>58561489
I bet you do love dick
>>
Reading Realm of Racket.
>>
>>58561501
>Rust can't give you that because you need to be kept "safe."

That's literally wrong. You don't know what the fuck you're talking about.
>>
>>58561513
instead
>>
>>58561547
Any reasons I could understand?
>>
>>58561459
You can start out with Scala. Knowing a bit of Java will be helpful for when you're using Java libraries, but just being able to navigate and read Javadoc should be enough.

This guys recommendation can be viewed as accurate >>58561467 although..
Learning Haskell to learn Scala means you're going off to the operator overload land and relying too much on typelevel libraries like cats, scalaz, algebra, shapeless, etc. Which, imho, shoudn't apply to the real world and is a blight on productivity. Parts of cats, and yes, even parts of shapeless can be very useful but it encourages the operator overload cancer of <2.10 to flourish and code-golfing while trying to be the most clever.
>>
>>58561536
And you're here to correct the record?
>>
File: 1348764844816.png (2KB, 244x226px) Image search: [Google]
1348764844816.png
2KB, 244x226px
>>58561501
>Rust can't give you that because you need to be kept "safe."

You've never used Rust to any real degree if you believe that. You can literally write boot code with it (I have before).

>in b4 "I was just trolling" backpedaling
>>
>>58561553
Scala is garbage.
From the start it was basically trying to turn OCaml and Haskell into Java OOP nonsense.

Either learn Haskell or OCaml (or both), but definitely don't bother with Scala.
>>
File: clip+(2017-01-19+at+06.20.30).png (38KB, 1159x839px) Image search: [Google]
clip+(2017-01-19+at+06.20.30).png
38KB, 1159x839px
How do I make each "tiger" a separate instance, so when I use the deal_damage function it only hurts one of the tigers on the list?

I'd like to avoid lists, because at one point there will be around 20-30 different values for each enemy and I don't want it to turn into a mess.
>>
>>58561569
If you couldn't have direct access to the hardware, how would you even be able to write Kernels? E.g. https://www.redox-os.org/

This has nothing to do with correcting the record and everything with you being retarded.
>>
>>58561583
enemies = [Tiger(), Tiger(), Tiger()]
you need to read up on referencing / pointers anon.
>>
>>58561583
enemies = [Tiger(), Tiger(), Tiger()]

The Tiger() call creates an object. You need to invoke that once for each distinct object you want to have. Your current code puts multiple references to the same Tiger object in the list instead.
>>
>Rust
>systems programming
>only proper support for x86
AHAHAHAHAHA
http://lists.alioth.debian.org/pipermail/pkg-rust-maintainers/Week-of-Mon-20161226/000758.html
>>
File: smug.jpg (19KB, 250x250px) Image search: [Google]
smug.jpg
19KB, 250x250px
>>58561569
>anyone who calls me out for being retarded is a shill

Man, your ego is pretty fragile.
>>
>>58561553
Scala takes about 10 different programing styles and layers them one language, it is very difficult to learn and use properly
>>
>>58561615
>most of the test failures have been trivial and the fix was to ignore them
S A F E T Y
A
F
E
T
Y
>>
>>58561615
everything except x86-64 is deprecated
>>
>>58561479
It may sound dumb, but filling the string must take n-m turns, where n is the number of all sections in the string and m is the number of sections where you have sections filled with the filling character.
>>
>>58561612
>>58561609

Alright thank you and I'll try to.
I only learned about classes a few weeks ago, my code used to look like an alphagetti soup before then.
>>
>>58560639
Thanks for the advice, I apppreciate it. I don't know how to make the serial ports static and/or make them shared, but I'll look into it. I could avoid this problem by using subs, but I need to have data returned, so I can't avoid it.

>>58560680
I don't need to close Serial Ports, if anything I need the ports open all the time as I'm constantly listening for data - this is paired with an Arduino, by the way.
>>
>>58561555
>>58561581
>>58561629
Ok, thanks very much.
So all this talk about starting with C can be safely ignored?
I'd like to be versatile. I don't really care about writing great or innovative code, just being able to get money to live. Is one of those languages you recomend particulary "safer" than the rest?
>>
>>58561648
x86 is only used because of legacy reasons
>>
>>58561734
fuck legacy systems
>>
>>58561649
lmao fuck me, thanks
>>
>>58561734
and?
>>
>>58561770
the nigger implied that anything but x86 is deprecated
>>
>>58557835
APL
>>
>>58561713
There'll likely always be Java jobs.. but you'll have to deal with Java (Java, the language on Android, and Java (security model, virtual machine, language) for "enterprise")

C and C++ will always be in demand, and has been in for the last 30-40 years. But it requires skill and drive to succeed with them.

Doing web dev is a safe bet, but you'd get no love from the /dpt/. So learning javascript/html/css (and/or typescript, or flow, or whatever is the flavor of the month) + learning popular frontend frameworks (react, vuejs, ember, backbone) and the concepts of "isomorphic" (gag) code bases. Isomorphic Javascript is a buzzword that just means Javascript on the frontend and on the backend.

Depending on your job preference, country and education level. Microsoft languages are a cozy/safe job (C#.. and towards the webdev side of ASP.NET MVC).

>>58561703
I still don't know VB.net (I'm one of the C# people from yesterday)..
You could try (this just an example):
Module whatever    
Sub New()
' this is a static constructor for _whatever_
' assign stuff to static fields
End Sub
End Module
' or
Module whatever
' this is created once (note, I don't know how const and readonly work in VB, nor if you can reassign statics..)
Static comPort as Ports.SerialPort = My.Computer.Ports.OpenSerialPort("COM3")

Public Function Work()
' comPort is usable here
End Function
End Module
>>
>>58561793
There was nothing implied; he explicitly said it. Learn English, you illiterate fuck.
>>
>>58561500
Fixed an error with the linking in of the GCC dependencies
"ln -sf $SOURCE_DIR/mpc-$MPC_VER mpc" -> "ln -sf $SOURCE_DIR/mpc-$MPC_VER gcc-$GCC_VER/mpc"
And I also put the config options into their own variables.
Also, to make the newlib build work you need to have the compiler's path set. So I added an export to the binutils build. This should also be set after finishing the build so you can use it by name instead having to specify the full path.

I'm too lazy to comment. That's up to you.

http://pastebin.com/n3c3Bpum
>>
>>58561853
Finally, something I didn't fix... the whole "build successful" thing is broken. make can complete and still return non-zero. No idea what to do there.
>>
>>58560891
>only mpsc

meh
>>
File: red.jpg (124KB, 598x755px) Image search: [Google]
red.jpg
124KB, 598x755px
Java runs very slow on ubuntu. Is this normal because its laggy as fuck once you try to make a gui.
>>
>>58561828
>Doing web dev is a safe bet
did you learn nothing from the dotcom bubble? web dev is something every tom, dick and harry and pajeet can do. if you want job security you should do programming instead.
>>
>>58561943
define slow
>>
>>58561501

A proper systems language should be usable to create software at a kernel level, or on embedded systems where the standard library may not apply. That is to say, it should be usable in a "freestanding" environment. This is wholely incompatible with a language that manages memory for the user by design. Rust is capable of operating with a small fraction of its standard library, called libcore, which does not have any dependencies on a memory allocator. C and C++ can also do this, although the new and delete keywords in C++ will be unusable without the user writing a function for them. Also capable of this task are Ada, and D if the garbage collector is turned off.

Unsafe Rust functions are pretty trivial.

>>58561615

Considering all of the native code generation is handled by LLVM, they don't really need to pay much attention to architecture specific details.
>>
>>58561943
it's not normal. either the program is doing something retarded or it's just linux being shit
>>
>>58561889
what does go provide?
a slice that you wrap in a (rw)mutex?
something from the container pkg, also wrapped in a struct with a mutex?
bounded channels? ..well, we're now a limited mpsc
struct backed by an array with sync/atomics? (we're not at C levels of reinventing the wheel, except interface{} is shittier than void*)

>>58561943
likely pebkac. also have you configured the jvm? it has approximately a million knobs and levers to finely tune the performance.
>>
>>58561943
Every java program I've ever used was an unresponsive mess (across many computers and several operating systems). It's okay for server software, but I really have my doubts about using it for application code.
>>
>>58561979
Simple rectangle graphics moving at 15 fps.
>>58562004
How do I configure the jvm?
>>
>>58562032
>Simple rectangle graphics moving at 15 fps.
post code
>>
>>58561985
>Considering all of the native code generation is handled by LLVM, they don't really need to pay much attention to architecture specific details.
But how did they manage mess it up if they basically get cross platform for free?
>>
>>58561249
python sucks
>>
>>58562094
thank you for your opinion
>>
>>58562099
s/opinion/fact/
>>
>>58562004
>>58562026
Just tried the same program on windows 7 and it runs fine no lag so its either java or linux being shit but java is the first language that's making me feel uneasy using it. What languages do you recommend for general purpose?
>>
>>58562069
It looks like a big chunk of them are system call tests that just needed to be disabled because they were platform specific.

The debian guy is just complain about the extra maintenance work that it caused.
>>
>>58562069

I haven't a goddamn clue.
>>
>>58562069
What's your preferred way of editing multiple files in vim?
http://www.strawpoll.me/12148016
>>
>>58562148
oh and another one was jemalloc fucking up. So seems like the bugs are in LLVM, jemalloc or in the tests themselves.
>>
How would one going about separating a string by sentence? At first glance, separation by !?. sound fine, but what about cases like Mr., B.A., etc?
>>
>>58562201
Tests represent the spec. They don't contain bugs.
>>
>>58562190
Seriously, how many polls are you running?
>>
>>58562069
the problem is they have too many targets:
musl, glibc, libstd++, libc++, gnu (g++), msvc, armv6, armv7, aarch64, x86, amd64, android, linux, mac
with every configuration of each (basically)

llvm gives you a lot, but you still have to put in legwork with what you do ontop of it
>>
>>58562208
That requires a semantic-aware parser. glhf.
>>
>>58562032
LIBGL_ALWAYS_SOFTWARE=0 <your java command>
>>
>>58562214
This is my first in over three months. I'm curious as to what other people use. I stick to multiple windows.
>>
>>58562209
This is easily the dumbest shit I've ever read.
>>
OK so I learned Haskell from A to Z.
Where do I collect my well-paid job?
>>
>>58562248
I usually go with a combination of tabs and splits.
>>
>>58562271
You need to do the latin and greek alphabets too
>>
>>58562209
>if a test was written incorrectly the software must implement that broken feature
>>
>>58562272
Combination? Like split for each project, project files in tabs? Or more ad-hoc. And why do you do it that way?
>>
>>58562271
you need to get tenured first.

>>58562228
while for contrast go has two variables for the builds, GOOS and GOARCH:
linux, windows, macos, openbsd, dragonfly, freebsd, nacl, solaris
and
x86, arm (armv5, armv6, armv7), arm64 (armv8-a), ppc64 (big endian), ppc64le (little endian), mips64 (BE), mips64le (LE), s390x, mips (BE) and mipsle (LE)

gccgo has different targets available too

no need for adding in a third level of c-library changes and abi changes (musl, libstd++, libc++, msvcrt <-> g++, clang++ and msvc) like rust
>>
>>58562228

Mate, LLVM targets a lot more than that...

rubyist@Overmind:~/scratch$ llc --version
LLVM (http://llvm.org/):
LLVM version 3.8.0

Optimized build.
Built Jul 9 2016 (11:22:59).
Default target: x86_64-pc-linux-gnu
Host CPU: skylake

Registered Targets:
aarch64 - AArch64 (little endian)
aarch64_be - AArch64 (big endian)
amdgcn - AMD GCN GPUs
arm - ARM
arm64 - ARM64 (little endian)
armeb - ARM (big endian)
bpf - BPF (host endian)
bpfeb - BPF (big endian)
bpfel - BPF (little endian)
cpp - C++ backend
hexagon - Hexagon
mips - Mips
mips64 - Mips64 [experimental]
mips64el - Mips64el [experimental]
mipsel - Mipsel
msp430 - MSP430 [experimental]
nvptx - NVIDIA PTX 32-bit
nvptx64 - NVIDIA PTX 64-bit
ppc32 - PowerPC 32
ppc64 - PowerPC 64
ppc64le - PowerPC 64 LE
r600 - AMD GPUs HD2XXX-HD6XXX
sparc - Sparc
sparcel - Sparc LE
sparcv9 - Sparc V9
systemz - SystemZ
thumb - Thumb
thumbeb - Thumb (big endian)
x86 - 32-bit X86: Pentium-Pro and above
x86-64 - 64-bit X86: EM64T and AMD64
xcore - XCore


Anything LLVM can target, Rust can target.
>>
Can you do neural networks with Scheme?
>>
>>58562372
Yeah. But why would you?
>>
>>58562368
x86-64 is the only thing that matters

if you develop for a different architecture then you're part of the problem
>>
>>58562394
Namefag please, so I can block you.
>>
File: 1439479847313.png (507KB, 566x433px) Image search: [Google]
1439479847313.png
507KB, 566x433px
>>58562394
RISC-V should be the only correct answer
>>
>>58562321
It really depends on what I'm doing.
I usually use tabs for different sections of the code base and split for files within that section if that makes sense. I sometimes use splits to compare files between different projects.
>>
>>58562368
Platform support doesn't just mean llvm supports it, but also whether the std library supports the platform. The os module, for example, is very platform specific: https://github.com/rust-lang/rust/tree/master/src/libstd/os

Platform support is tiered: https://forge.rust-lang.org/platform-support.html
>>
>>58562403
I see you're not using the special /g/ interface that shows thread IDs for anonymous posters.
>>
>>58562133
>What languages do you recommend for general purpose?
C#
>>
>>58562394
i wonder who could be behind this post
>>
>>58562474
4chan Gold?
>>
>>58562506
No, this one actually exists. Ask Ruby. He uses it.
>>
Have to make some sort of program that reads 2D arrays as a maze and tries to walk through them using "stay right". Just got this project an hour ago.
>>
>>58562527
I can confirm this. I actually switched over to it to make this post and it's funny how unintelligible the thread is this way
>>
File: gundam.jpg (29KB, 576x432px) Image search: [Google]
gundam.jpg
29KB, 576x432px
>>58562411
>rip off perfectly good MIPS and make it a meme-ISA
>>
>>58562542
this image is actually from eva, retard.
>>
>>58562533
Sounds like one switch statement in a loop.
>>
>>58562527
I want to ask you
>>
>>58562556
yeah where's guts then???
>>
>>58562564
Haven't thought much into it yet. I just need to be able to apply it without any infinity errors
>>
>>58562542
Who are you quoting?
>>
New thread: >>58562610
>New thread: >>58562610

New thread: >>58562610
>New thread: >>58562610
New thread: >>58562610
>New thread: >>58562610
>>
>>58562616
Retard
>>
>>58562622
This post is hate speech.
>>
>>58562426
Ahh I see. You use splits to see references between files, like a header in one split and the source in another. That's a good idea. I'm trying to find a better workflow, tabbing though many windows can be tedious.
>>
>>58562598
I think "go forward until you can turn right" and "turn right, when you hit a wall" are the only two rules you need.
>>
>>58562394

One should at least target ARM and AArch64 as well, since they're used in the majority of phones.
>>
>>58562603
The guy who said RISC-V was anything but trash.
>>
>>58562556
>Eva is the new RX-78-2
>RISC-V is the new MIPS

What you did there, I see it.
>>
>>58562652
>phones
into the trash
>>
>>58562644
For example, on the left side the class that I'm writing and on the right side the file that uses the class.
>>
New thread: >>58562697
New thread: >>58562697
New thread: >>58562697
>>
>>58562652
Personally I think it's garbo if it doesn't run on common embedded architectures as well. MIPS, AVR, and PIC32. But that's just the opinion of an embedded systems engineer.
>>
>>58562647
you need to turn left when you hit a wall and you can't turn right
>>
>>58562647
and you're supposed to turn right whenever you can, not go forward whenever you can
>>
test post ignore
>>
>>58564211
I saw it anyway
>>
What is google app engine? Is it to deploy websites? Why does the sample use Java then, its retarded.
Thread posts: 318
Thread images: 23


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