« first day (1834 days earlier)      last day (1657 days later) » 

6:56 AM
@SébastienRenauld WTF
 
7:31 AM
Side note, any of you folks ever played with the UDP socket part of tokio?
Having a really, really weird issue, where UdpSocket (with UdpFramed on top) is connecting fine (I can see UDP datagram sockets on an echo server) but decides to send data to itself
 
@AaronHall So-so. I can imagine it could be useful for some (after all people learn in very different ways) but as far as I can tell by watching random snippets, it is not a thorough, in depth educational thing but a very practical approach to the language.
 
@SébastienRenauld Is that another UDP joke?
 
Nope, it's an actual problem
I tried quickly whipping out a UDP LoRa packet generator so I don't have to lug devices around - let's just say that due to this problem the "quickly" part went out the window ;-)
 
 
2 hours later…
9:31 AM
Only looked at the start (too long for during the work day) but it looks very interesting
 
@DenysSéguret yeah it's a bit on the longer side, but worth watching!
 
 
3 hours later…
1:01 PM
I have literally no clue what I'm doing wrong and it's annoying me :-(
 
The same but it's about a NoSuchMethodError in java generics and it only happens since I've rebuilt the application... I hate java generics...
 
let bind_addr = "0.0.0.0:0".parse().expect("No bindable IP");
let socket = UdpSocket::bind(&bind_addr)?;
socket.connect(&destination)?;
Somehow this creates a loopback
(bind_addr is a valid ip:port tuple from the outside world)
and yet I can see the opened udp datagram socket on the remote host
 
2:02 PM
You said you are connecting an echo server right?
 
2:13 PM
Fixed it; it was something dumb
 
2:24 PM
@SébastienRenauld share plz
 
Not worth; I was on the wrong port
For some reason the LoRa back-office I was trying to emulate traffic on used a non-standard port for the Semtech packet forwarder
spent 4 hours rummaging every component until I had the thought to go on the doc and check if it is indeed port 1700 - it wasn't
 
0
Q: How to perform a `flat_map` (or similar operation) on an iterator N times without runtime polymorphism?

QqwyI want to be able to repeat a process where a collection is altered N times. N is only known at runtime, and can be specified by the user, so we cannot hard-code it into the type. I want to be able to repeat a process where a collection that we are iterating over is altered an n number of times....

xy problem again
I don't understand what is the true question
what he want ?
 
@Stargateur negative-cost-abstraction, I think :-)
 
2:42 PM
What is it with people who think polymorphism or structs or whatever are inherently bad
first you build, then you evaluate performance and refine
that's like saying you need to build a house but you're not allowed to use any tools
 
@SébastienRenauld I kind of get it here, as this makes a linked-list of iterators
And we harp about how linked-lists are bad news
 
Gosh... I've lost 3 hours looking for an error because a colleague had copied my old utility class in another project (project already importing the first one)... with same complete name com.keods.util.CircularBuffer.... and it could only be solved by removing the java file AND the compiled classes
 
@ÖmerErden sounds like an answer to me! — Shepmaster 11 mins ago
 
> You can use it with the syntactical sugar of ..
Does my phrasing seem off? ^
"the syntax sugar of"?
@ÖmerErden do it
 
@Shepmaster i don’t know, is it worth for a future reference?
Also we are still not sure, what op realy is trying to achieve
 
2:54 PM
@ÖmerErden is it a valid question for stack overflow? yes. is it a great question? not really. however, OP really seems to be struggling, based on their slew of questions, so I think we can provide some help
my only warning is that I bet they might be a help vampire
Trying to get them to edit their question was a pain.
 
I believe there will be 3rd different question which is related by this one, but first i’ll ask for details, if he responds well i’ll write an answer with also editing question
 
@ÖmerErden note that I closed stackoverflow.com/questions/58493772/… as a dupe of this one
since they edited it to be basically the same
so that might give a hint as to what they want
 
Ok then, i’ll prepare answer, thanks 👍
 
3:16 PM
What can explain some people don't the the "hidden lifetime" warnings ? (same code, same cargo.toml, recent rustc)
 
@DenysSéguret You mean that suggests adding <'_>?
-
 
You know, I experienced that recently too!
 
The crossterm maintainers see no warning and I don't understand why
 
I was in the playground, which would be Rust 1.38
You said "recent" versions
could there have been a regression?
maybe 1.37 reports it where 1.38 doesnt?
 
3:21 PM
I've been on 1.38 too
 
3:37 PM
That depends on a lint
You maybe have activated a lint about the 2018 idioms
 
we have the same cargo.toml, it's the same code, we run cargo test in the lib
 
@FrenchBoiethios I was under the impression that the lint switched to default on
but I'm wondering if rust 1.38 turned it back off
 
@Shepmaster Really?
 
@Shepmaster I'd understand because this lint is quite brutal. You can have dozens of warning popping
 
3:41 PM
We had dozens (of hundreds) of warnings... and we fixed most of them, didn't we ? It's a little late...
And anyway I'm on rustc 1.38 like the other devs
 
@DenysSéguret probably want to include the "same compiler versions, same cargo.toml, same ..."
 
Also, you didn't set an environment variable did you? ;-)
Oh, that response is a swing and a miss
 
I don't get the answer
Could it be some .cargo/config file somewhere ?
 
Second response is also a miss
Where's my downvote button
@DenysSéguret and your env | grep RUST is clear, yeah?
 
3:48 PM
oh shit
RUSTFLAGS= -W rust_2018_idioms
 
;-)
/me rubs hands
 
who modified my computer when I was looking elsewhere?!
 
@DenysSéguret Same for me: every morning when I come back to work, I see that a dumbass has written some horrible code in my projects.
10
 
I'm downvoting your answer: no code in pictures :-p
 
@Shepmaster I've already written it as text too (for vision impaired people)
 
3:54 PM
@DenysSéguret ah, a ninja edit even
 
Just out of curiosity: do you all have the same env setting configured ?
 
@DenysSéguret I do not.
 
4:11 PM
The only cool job openings that I see are for Go. Guess I just have to unlearn Rust.
 
@DenysSéguret In my head, no ADT = shitty language. Yes, I'm a bigot.
 
Are there any cargo extensions for automatically incrementing version numbers?
 
@PeterHall Any time I thought about it it looked not so convenient after all
What are you after exactly ? Modifying the CHANGELOG, publishing to crates.io, making a release on github, ?
 
@DenysSéguret It's internal. We may actually decide to keep all crates at 0.1.0, and just go from git tags
There may not be a very compelling case for incrementing the version at all, if the crates are never made public
I just find it "odd" that the version is 0.1.0 everywhere...
 
I increment all my versions according to semver, tbh
I reckon you could actually write a cargo package to do the version change @DenysSéguret
wrap toml-rs and semver together, provide 3 commands, say, cargo major, cargo minor, cargo bugfix and libgit to do the tagging
although most people do it at the end of the CI/CD pipeline
 
4:38 PM
@SébastienRenauld ah is that how it's done.. I couldn't find any info on that creating cargo components
 
If your problem is discovery, alternate cargo registry
it's literally a git repo
can get your CI/CD to push to that np
 
@Shepmaster You mean env | rg RUST, no?
 
The "| grep" habit is so deeply written it won't die fast
 
4:54 PM
^ that
but I use rg for finding on the filesystem
Not sure why that's different
 
same
rg is good because of its speed, its default filtering, and the facility to specify file types. None of this matter in the "| grep" use case
 
5:08 PM
I use it in the pipe case because I have such ingrained muscle memory about grep that I have to make sure I don't forget to use it when it counts
Also, if there are any options to pass to it (which are often different from grep) I benefit from the practice
 
 
2 hours later…
7:09 PM
There's lots of bad post habits I can understand, but having a post that just looks like crap is one I never will
Like, do people just type in the box, submit, and not even look at it?
I don't mean rustfmt or correctly getting the syntax highlighting.
@PeterHall "cargo fix --clippy" nice!
 
@Shepmaster I only remembered about that question because someone chose today to downvote my answer :P
 
@PeterHall that's the notification I use to review most of my answers, but luckily it's usually positive...
 
7:44 PM
@Shepmaster You want a good one?
I may have landed on one of the weirdest unit tests I've seen in my career
 
/me rubs hands
 
generator.writeToFile(testPath.toString(), "some file contents");
long createTime = testPath.lastModified();
try {
    Thread.sleep(100);
} catch (InterruptedException ex) {
}
generator.writeToFile(testPath.toString(), "some file contents");
//Assert.assertEquals(createTime, testPath.lastModified());
The commented line is what was causing the test to fail
and it's because I was running this on docker as a mounted volume from NTFS
what could possibly go wrong, yeah?
I'm not even sure what it aims to test
 
haha
I've had this problem
 
From what I'm gathering it tests if filemtime changed when the file didn't, which is testing a feature of the filesystem, not the code
 
The playground, specifically
maybe not exact, but yeah, Docker + FS times are tricky
without knowing generator, I could see it being part of the code. if writeToFile read the existing file / computed a hash or something
and didn't write if it was unchanged
 
7:50 PM
Not the case
 
The playgrounds case is extra special. While a docker layer is running, it has one timestamp granularity. When it's a previous layer, that granularity is reduced.
 
aufs, coming right back at ya to bite you where it hurts
 
so we'd say "I built this at 12345" and the FS agreed, then later on we'd look at the FS and it'd say "12000"
 
Yup, I've encountered this in a different instance
building RW tmpfs unions on embedded devices and having timestamps going into the future or the past is fun
Oh wow, both shippable and drone seem to have interconnectivity issues
 
8:58 PM
posted on October 19, 2019 by Kyle Lacy

Emulators are cool! They help preserve games, improve games, and help make games more accessible. On top of that, making an emulator is a cathartic and satisfying technical challenge! So, I took this challenge myself and came out the other end with a pretty limited NES emulator, which I call Lochnes. It’s not very good at actually emulating most games, but I’m pretty happy with the guts of the

posted on October 19, 2019 by Michal 'vorner' Vaner

This post can serve as a step by step migration guide from spirit 0.3 to spirit 0.4. If you already have an application using the crate, read on. If you haven’t heard about the spirit library yet, it is a library to help you manage your configuration in an application and have it reloaded at runtime. It allows you to have the changes applied automatically and also to manage lifetime of the app

posted on October 20, 2019 by Andy Grove

I have been running benchmarks of aggregate queries against the NYC taxi data set, using Apache Spark (JVM-based) as the baseline, since it is currently a popular tool for distributed compute, and a tool I am familiar with.

posted on October 20, 2019 by Michael-F-Bryan

Once you get past the growing pains of the Borrow Checker and realise Rust gives you the power to do things which would be unheard of (or just plain dangerous) in other languages, the temptation to Rewrite it in Rust can be quite strong. However at best, the temptation to RiiR is unproductive (unnecessary duplication of effort), and at worst it can promote the creation of buggy software (why wo

posted on October 21, 2019 by Jesse Lawson

My name is Jesse, and this is an introductory Rust tutorial for developers who like learning by doing. The purpose of this tutorial is to develop intuition about toolbuilding in Rust–specifically, to learn how to think and build in Rust. Our goal is to produce a very basic command line compiler that will turn a basic Markdown document containing headings and paragraphs into an html file. To do

posted on October 22, 2019 by Niko Matsakis

Today I'm announcing a new experiment in the compiler team, the LLVM ICE-breaker group. If you're familiar with LLVM and would like to contribute to rustc -- but without taking on a large commitment -- then the LLVM ICE-breaker group might well be for you!

posted on October 22, 2019 by Simon Heath

So a couple weeks ago I was a little stung by the quote from This Week In Rust: “Rust compilation is so slow that I can fix the bugs while it still compiles the crates”. On the one hand, I have unfond memories of waiting for a Typescript project to compile, pack (aka link), minify (aka optimize), and so on, over and over, on every change. At least if it had been Rust I’d have been able to fix t

 

« first day (1834 days earlier)      last day (1657 days later) »