7,485 karma · joined Mar 14, 2016 (10y ago) · 2,314 submissions
comment 7y ago · link · parent
Yeah, it's another bug with Desktop based Linux. The problem is that Linux "basically" treats the GUI like any other program, when things get heavy everything gets roughly evenly screwed. OSes designed to be centralized around a GUI on the other hand usually guarantee that GUI related processes get a minimum amount of time on the CPU to ensure they don't freeze.
Linux should 100% be doing this. Doing lots of hardware I/O shouldn't mean you lose the mouse or keyboard. When you lose control of input, you think the machine isn't doing something, when in actual fact it's doing tonnes, it's just not showing you. Even something like Android suffers from this under heavy load, it's really crap.
The real joke is, it's probably a difficult kernel fix. You would need some kind of watch dog timer for the kernel to make sure it's not getting too bogged down with any one particular task and then interrupt ones that are (some tasks don't like to be interrupted) [1]. You then need make sure that all of the heavy kernel calls don't make guarantees about the call being completed (i.e. blocking), which to be completely honest should be the default position to take anyway.
I'm not completely up-to-date on this, but my bet is that the issues come from everywhere. Programs can read/write arbitrarily large amounts of data (RAM, disk, network, bus, etc), when I believe you should be able to ask the kernel what size it would like you to read/write based on I/O activity and the capabilities of the device. If your program is bogging down the kernel, it should lover your recommended block read/write size. Better yet, this would be compatible with existing software, as they could choose to ignore this, possibly with it "punishing" programs that eat up lots of kernel time by making them wait longer for their next opportunity. There's a bunch of algorithms for time splicing tasks, but the most optimal appears to be max-min with very little organizing overhead [2].
> Re: playing video, for some reason I can't play South Park on either Firefox or Chrome. Videos on twitter also won't load with Firefox, though they work fine with Chrome.
Hmm, that shouldn't happen, sounds like you potentially have some system-wide badness. A few things to try:
* Disable any customization you made (extensions, add-ons, etc) - see if it is one of these interfering
* Make sure you have all updates and you're running an up-to-date version of Ubuntu (this issues have possibly been patched already)
* Make sure you have the correct drivers installed for your GPU
But... One thing I did note was that JavaScript coin miners have gotten so bad that I can't run certain sites without ad-blockers anymore (uBlock Origin is generally recommended). I remember my CPU sitting at one core maxed out just because of the JS engine. I generally run uBlock Origin + NoScript on every page and manually enable temporary scripts on pages I trust. One of the biggest offenders for crazily heavy JS was actually Facebook.
[1] https://en.wikipedia.org/wiki/Watchdog_timer
[2] https://uhra.herts.ac.uk/bitstream/handle/2299/19523/Accepte...
comment 7y ago · link · parent
Unfortunately, I don't really have a solution for this. I have an SSD as the main disk and _even now_, when I hit this too hard Linux grinds to a halt. No mouse, no keyboard, just heat, fans and disk light.
One thing that sometimes works for me is the old CTRL+ALT+FX mashing, but not always. Once you can get a shell you can type into you're okay, but of course this doesn't always work.
> I would also love to know if anybody has a solution for getting video to play properly in Firefox. I know it's not a bug per se, but it would be nice to not have to switch between browsers all the time.
What do you mean? It's been reliable for quite a long while? There were two issues I used to have, one was not having my graphics card setup (it was running from the CPU) and the other was not having flash (when that was something).
> I've been using Ubuntu for about a year now and otherwise its been a very positive experience.
Yeah, I think it makes one of the better daily drivers.
comment 7y ago · link · parent
> Creating and destroying threads in a tight loop (and blocking on their destruction, thereby reducing the point of having many) seems like a bad idea.
The purpose is that it's pretty much 100% always running a visThread (it's a neural network that takes about 100ms per image). The pre-process on the other hand runs in about 10ms, but there's no reason why it can't be run in advance (+). The neural network can't really be run on multiple cores safely, but it does have OpenMP (parallel loops).
(+) It does create some latency in the output compared to the real world, but it's not a massive deal when it comes down to it.
> Why not have visThread only get created once and process a queue of events?
This is probably the best way to do this, but this was the lazy way with not too much overhead (I think) :)
> Anyway without additional evidence you potentially flagged a bug in the c++ standard library rather than pthread_create.
Possibly, I did run it through GDB and Valgrind, it reliably seemed to die in pthread_create, but that of course could have only been the trigger. It could also be the aggressive optimization [1].
[1] https://github.com/electric-sheep-uc/black-sheep/blob/0735de...
comment 7y ago · link · parent
That said, it's still entirely possible I've made a mistake. Please see here: https://github.com/electric-sheep-uc/black-sheep/blob/master...
The idea is that you do preliminary processing of a camera frame before sending a neural network over the top.
comment 7y ago · link · parent
`pthread_create` can sometimes return back a garbage thread value or crash your program entirely without any way to catch it or detect it [1]. High speed threadding is hard enough as it is, without the kernel acting non-deterministically.
Un-killable processes after copy failure (D or S state) [2]. If the kernel is completely unable to recover from this failure, is it really best to make the process hang forever, where your only available option is to restart the machine? I ran into this with a copy onto a network drive with a spotty connection, that actual file itself really didn't matter - but there was no way to tell the kernel this.
Out Of Memory (OOM) "randomly" kills off processes without warning [3]. There doesn't appear to be a way to mark something as low-priority or high-priority and if you have a few things running, it's just "random" what you end up losing. From a software writing stand-point this is frustrating to say the least and makes recovery very difficult - who restarts who and how do you tell why the other process is down?
[1] https://linux.die.net/man/3/pthread_create
[2] https://superuser.com/questions/539920/cant-kill-a-sleeping-...
[3] https://serverfault.com/questions/84766/how-to-know-the-caus...
comment 7y ago · link · parent
> Internet hate forum 8chan [..]
Indifference to what is perceived as good or evil is not good or evil within itself. There's objectively a lot of hate in those forums, but there's also a lot of good. 4chan for example came up with a solution to an unsolved mathematics problem [1].
> [..] following the latest of at least three mass shootings linked to 8chan.
I think far many more terrorists have had social media platforms on services such as Twitter or Facebook. As I've also said before, the reason they are here is because they kicked them out of everywhere else - of course they will now concentrate on these platforms. Beforehand there may have been a chance to de-radicalize these people with exposure to everyday persons, but when you isolate them this is what you get. The fact of the matter is, these people exist whether you like it or not and they will find somewhere to talk.
> [..] when Voxility discovered the content, it cut ties with Epik almost immediately.
I remember also that Cloudflare gave 8chan 24 hours notice. Also look at how internet services have treated the people of Iran, blocking them from basic resources without warning. In some ways I am glad to see this, as I now know which providers to avoid - I don't want any service provider I use to take a political stance and give me 24 hours or less to rethink my platform strategy.
> Over the past year, Epik has raised its profile by working with far-right-friendly sites (like Gab) that have been banned by other web service companies.
Disingenuous, Gab is free-speech-friendly, not "far-right-friendly". But even if it was far-right friendly by definition, so what? People with a different political stance have a shared platform, just look at Bread Tube for the far-left [2]. Neither are evil by default and both have their share of shitheads.
comment 7y ago · link · parent
comment 7y ago · link · parent
comment 7y ago · link · parent
Thanks for sharing by the way!
comment 7y ago · link · parent
* Returning (literal) rubbish to make up the weight
* Returning the parts when they break them trying to use them
* Returning the old parts they are replacing with the new parts they purchased
* Returning parts they didn't check before purchasing and getting a full refund (including postage), by claiming the item wasn't as described
* Claiming the parcel wasn't delivered, despite the courier company having a signature showing it was (one trick they use is to make sure the parcel is delivered to a neighbour)
The worst part? There is no method to fight this. Neither eBay, the delivery companies or PayPal will take responsibility for the costs, despite claiming they do. It doesn't matter what evidence you submit (pictures, videos, third part testimony, etc), the result is the same. The "funny" part is that some items they refuse to deliver without insurance (which has to be with them) and then when you go to claim, it's not possible.
The delivery companies are also great to deal with:
* Parcels arrive broken despite adequate packaging (for example, somebody has run over the item with a fork lift)
* Parcels get lost despite purchasing tracking - you phone them up and they have zero idea where the parcel went
As somebody who gets parcels delivered, occasionally the delivery companies will deliver the item with some tape showing that it's broken. Their advice is not to accept the item, which only works when you're actually in - but then if you are, they refuse to send the item back anyway. This is because the delivery drivers only get paid for delivered items, so it's the end-courier that gets screwed.
Anyway, my point is that somebody like Amazon who mostly acts as a trading platform these days and facilitates this crap that sellers have to put up with - I really don't feel sorry for them.
comment 7y ago · link · parent
In my mind, if you're going to make assumptions such as having a valid file table, making the assumption you have some basic programs ready to be loaded is not too much of a leap?
By the way, once I've got a filesystem up and running that can load in files greater than 512 bytes, it makes sense then to build a very basic assembly compiler. There's a bunch of tricks one could pull in order to make compiling a single parse deal for relatively large files at the sacrifice of efficiency. I think I could quite easily drop support for half of the 8086 instruction set and still end up with something very usable.
> I agree that octal is less dense. But it's a lot more readable, because operand fields are isolated in a single digit (usually) and not split across digits and mixed with opcode bits.
Are you able to give a small example, I'm not sure I follow the thinking? From what I understand, for each octal character you're representing 3 bits of binary. With two characters you have 6, but you're still short 2 bits for a byte.
comment 7y ago · link · parent
I'm not concerned with lawsuits but allowing people to work with it is a good enough reason to add one.
> (While we were writing this thread, Óscar Toledo G. added a BSD license to BootOS!)
Very cool :)
> t might be more flexible to go the BootOS route of including at least some kind of hex or octal
I think that really depends on the goal of the OS, if it's to be self contained then fair enough, but it kind of limits out of the box usability for a normal user. I think most people would bork at having to type any program they want to use into the terminal each time they boot/test the system.
> …holy shit, you have a scrolling full-screen editor in one sector? This is amazing.
Thanks :) I will at some point improve upon it too, there's definitely some parts that could be better done.
> Also octal input takes less code than hexadecimal input
In terms of amount of code required, I'm not sure. Maybe there is some way to utilize AAA, AAS, DAA or DAS for converting hex to a value with minimal commands. The documentation appears to be quite crappy for these op-codes though, apparently Intel even managed to confuse themselves (which doesn't bode well for their reliable implementation) [1].
The other problem is that re-packing octal input back into raw bytes (for running) will be non-trival, the reason hex is generally used is because it represents a nibble (4 bits) and you can get away with pairs (i.e. OF 3A B7). Octal on the other hand is gonna be messy, you either have 3 octal characters per byte and lose packing density (even more) or you have cases where an octal character contains information for two neighboring bytes.
[1] https://stackoverflow.com/questions/51710279/assembly-instru...
comment 7y ago · link · parent
Another potentially massive market will be in making "legacy" cars become autonomous, but that's still unknown as to when that market will really hit off as the technology still isn't there (or approved of by law makers). Still, moving first on that could really be big.
In general I think there is a massive market in old vehicles that isn't been capitalized on. Of course you have scrap, part selling, fixing, etc - but some of these working vehicles (with little wrong) get scrapped for no reason. From a green carbon footprint stand point, a lot of the car's carbon footprint is in making the vehicle itself. When you buy a 10+ year old car I think you're doing more to save the planet, regardless of whether the emissions are higher.
comment 7y ago · link · parent
Yes, but it offers more to the programs that it loads. There's a trade-off when you go this low on disk space!
> But the filesystem supports more than one sector per file?
SaxOS supports half the disk, but each file has to be 512 bytes [1]. There are potentially work arounds for this limitation of one sector per file, but it's just hacky. (For example, you could name your files txt0, txt1, ... - or you could leave some header information in your program's file for more data.) I will fix this in a future version though, the plan is to keep loading sectors by the same name in the file table.
> Saxos is open-source, unlike BootOS, even if maybe that would be clearer if you used a widely-recognized license.
When I wrote this I had no idea about licenses :) I will look to update this, but the project is mostly just archived for now.
> I don't think BootOS tries to export its filesystem API to user programs. BootBASIC in particular doesn't seem to have a way to save and load programs.
It takes very little to extend the functionality of your kernel to your implementing programs, hopefully BootOS will do this in the future. At some point I want to write a simple self-writing documentation (using the comments structure) so that I can always produce up-to-date documentation for the OS.
> Brilliant work!
Thanks!
I was trying to build a very small low end compression algorithm for it to, but unfortunately I came hard up against entropy. The idea worked (as I envisioned it) but it had the effect of just transforming the dimension the data was stored in and adding unthinkable amounts of computational power and memory being required to get it back.
> (Apparently I heard about this before and never looked at it? Because I have a clone of it on my laptop dating from September 14th.)
Awesome! My plan for quite a while has been to write a small book and guide people through building their own very simple OS. I think people building their own 512 byte boot-able kernel is a nice intro into OSes whilst also having enough limitations that at some point you can say "this is complete". Anyway, it's what I wish had existed when I first set out may years ago!
Speaking of which, I must give a shout out to MikeOS which is where I learned about assembly and OSes [2].
[1] https://bitbucket.org/danielbarry/saxoperatingsystem/src/96c...
comment 7y ago · link · parent
I would make a recommendation to the BootOS project which is to squeeze a function table as I have done in order to allow programs to call functions in the kernel. If not, you either end up re-writing these functions for each of your programs, you have to recompile your programs any time you change your kernel or you end up trying to maintain jump positions.
For those still reading, I'm working on a large overhaul of saxos which includes very simple multi-tasking (currently working). The intention will be to have the kernel load a 512 byte GUI on top and then for the programs to have access to a terminal within the GUI. Once that's working I then want to move towards also allowing programs to draw to the Window, but that also brings its own issues.
[1] https://bitbucket.org/danielbarry/saxoperatingsystem/src/mas...
comment 7y ago · link · parent
As the PS format was designed for printing [2], my guess is that it selects a DPI value suitable for printing. I can't seem to find the source code to back this up though. (Ghostscript has the simple web front-end that doesn't lend itself very well for viewing code in browser [3].)
[1] https://www.biu.ac.il/os_site/documentation/gs/Ps2pdf.htm
comment 7y ago · link · parent
ps2pdf LARGE.pdf SMALL.pdf
I believe it compresses all of the images independently, instead of converting the entire thing to an image as I believe Imagick does (I could be wrong though). This tool doesn't appear to have any intelligent auto-deskewing though. (On a slightly different note, it's questionable whether you want to do this for archiving as it'll undoubtedly be a lossy operation.)The reason I use this: Many websites for conferences have upload limits at around 10MB, a size you can easily reach with a handful of images from a modern device in your paper.
[1] https://www.shellhacks.com/linux-compress-pdf-reduce-pdf-siz...
comment 7y ago · link · parent
I think it's literally just to keep the math circuit logic very simple, it'll be identical to MOD (just need to look at the remainder register) and |x| <= |y| will either require some hackery to convert it (with an appropriate test) or the machine having some idea of non-integer numbers.
For implementation of division, you could have the circuit equivalence of:
uint div(x, y){
uint t = x; //temporary (don't want to touch x)
uint c = 0; //counter
while(t >= y){
t = t - y;
c = c + 1;
}
return c; //remainder is in t
}
Not sure about the x == y case though.Of course there would be no checking, hence the garbage out when you misuse it. Your checking would be done manually.
comment 7y ago · link · parent
Maybe a good indication would be to check your CPU usage before and after using 5Gb/s and 10Gb/s cables. Even then it's not a great indication, many modern processors have dedicated modules on the CPU for video compression/decompression (given how large the use case is, it makes sense).
And then you have other factors that may prevent you getting full speed:
* Connection between the cable and the device on both sides (oxidization, scratches, etc)
* Manufacturing flaws or damage during delivery/use in the cable (un-shielded areas, breakages in the cable, imperfections in metals, etc)
* Temperature - if you're pulling 20W through this cable it's not entirely impossible you might start noticing some heat, especially if it wasn't designed to take the power draw (increased heat due to power pull = greater resistance = worse signal)
My pointy is, as we turn up the requirements of these cables, just making sure they deliver on their promises will become more difficult. Most people won't have an oscilloscope that can even measure these cables anymore and just the act of putting the oscilloscope on the lines increases capacitance and changes how the signal looks.
A while back I had issues with two Ethernet cables (CAT 7 I think), both straight out of the packet, one performed at half speed and the other at full. I was tearing my hair out for a while before I realized why the network was bottle necked.
comment 7y ago · link · parent
The other point here is also clearly security - one compromised client's crapware shouldn't compromise the rest.
comment 7y ago · link · parent
1. Services all going down one after another. 1 goes down - it happens. 2 go down - it happens sometimes. 3 go down - quite a rare sequence of events. But now a large number of silicon valley companies have experienced service outage over the last few weeks.
2. Russian sub that is said to be a "deep sea research vessel" somehow experiences a fire whilst in international waters [1]. It has been suspected that it could have been tapping undersea cables. Let's imagine for a moment a scenario where they were caught in the act, some NATO sub decides to put an end to it and Russia cover it up to save face.
3. Russia announces tests to ensure that it could survive if completely cut off from the internet [2]. A few months later it's like somebody is probing US services in the same way.
4. There is currently a large NATO exercise in a simulated take-over of Russia happening in Countries close to Russia [3].
Of course it's completely possible it's all unconnected, but my tin foil hat brain says there is a game of cloak and daggers going on here. I would say that Russia's incentive for probing the US/NATO is to test it's weakness after undergoing a trade-war with China and raising sanctions against Iran. After all, Russian fighter planes regularly try to fly into UK airspace just to test their rapid response crews [4], this sort of behaviour is typical of them.
[1] https://en.wikipedia.org/wiki/Russian_submarine_Losharik
[2] https://techcrunch.com/2019/02/11/russia-internet-turn-off-d...
[3] https://sofiaglobe.com/2019/05/13/6000-military-personnel-to...
[4] https://www.theguardian.com/world/2018/jan/15/raf-fighters-i...
comment 7y ago · link · parent
> who want to argue in bad faith about racism and other
> nonsense as if they have any valid scientific footing.
Are you suggesting that I'm acting in bad faith, or the commenter on Gab? I all honesty I think we're misunderstanding each other, that's always been the challenge of writing.
> Please don’t cherry pick my remarks to make like there’s
> an argument to be had here.
Please quote specifically what you think I've cherry picked, I haven't done so on purpose.
> By the way, that article is referencing a revival of a
> strategy employed much earlier on in the 20th century. It
> doesn’t hinge on “alt right” or anything else. Just bigots
> making an effort to normalize their bigotry.
Normalization of speech through sarcasm? I'm British, sarcasm/"jokes" is the language most of us speak normally anyway, it's how we laugh about our shared troubles.
> Have a good weekend. It’s a long one here as we celebrate
> Canada Day.
Have a good one.
comment 7y ago · link · parent
In the same way you don't need to donate to charity.
> And no, these kinds of people don't teach my children.
So you think some of these 1 million or so people aren't functioning members of society? How would you ever know if they hold these views privately and express them online under an alias? These are just the people who somehow collected onto this platform, I imagine many more exist (I happen to know many who are not online - and also far-right teachers (it's possible to do a job and not express politics)).
> And yes, "joke" is in quotes for a reason. It's not a new
> phenomenon:
> https://www.theguardian.com/technology/2017/may/23/alt-right...
The "alt-right" is just a fuzzy term without any real meaning [0]: "The term is ill-defined, having been used in different ways by various self-described "alt-rightists", media commentators, and academics." It's a convenient bogey-man for people to claim they know the exact cause of some poorly defined group. Helps in writing articles and publishing papers I guess.
This whole subject is quite complex and I don't know how anybody could possibly effectively police "jokes" vs jokes without implementing their own bias, especially inside jokes. "I wouldn't spend so long replying to HN comments if they all just dropped dead". Is it a death threat, sarcasm, an inside joke, me spreading my anti-HN ideology? Who knows without context.
> It's not about politics, man. I was very clear.
Wikipedia: "Fascism is a form of radical right-wing, authoritarian ultranationalism" [1]. Fascism is a political ideology. But it's really besides the point.
comment 7y ago · link · parent
> country with what he called "violent low-iq brown".
Again: "I don't find it funny or condone it". But, how do you know he isn't sarcastically echoing the point of view of a far-right person, or what other people believe his opinion should be? I think that given the right context (and/or delivery) this could be a joke to mock people for example.
> I have zero interest in talking to them. I've tried. Any
> argument I've ever encountered has been made in bad faith.
Whether you've given up or not, they exist and will continue to exist. They lay the bricks, they hold political positions and they teach your kids. These people exist everywhere in society and somehow we need to work together for the betterment (and survival) of humanity. Given how important us working together is, I feel obliged to understand them.
> It's not what you called "right wing bias" that I have a
> problem with and don't want to engage with. I thought that
> was quite clear in my comment.
I didn't suggest you did, I'm just saying that you are able to neutralize the perceived political/ideological bias of the platform with your own thoughts and ideas.