Soptik's recent activity

  1. Comment on Quickref is an experimental search engine for developers in ~tech

    Soptik
    Link
    Works really well with Rust! I'm surprised by how good it actually is.

    Works really well with Rust! I'm surprised by how good it actually is.

    2 votes
  2. Comment on Has DuckDuckGo recently started giving you significantly worse results? in ~tech

    Soptik
    Link Parent
    Hm, it looks like it works just fine now? I guess maybe there was some messed up a/b test. It had troubles even finding xkcds. The only thing it doesn't handle now is !i i made their lives return...

    Hm, it looks like it works just fine now? I guess maybe there was some messed up a/b test. It had troubles even finding xkcds.

    The only thing it doesn't handle now is !i i made their lives return null, which is not something I can blame them for, and it probably didn't find it even before. The search looks perfectly normal now. Thanks!

    1 vote
  3. Comment on Has DuckDuckGo recently started giving you significantly worse results? in ~tech

    Soptik
    Link
    Definitely, over the last two or three weeks, I’m simply not able to use ddg at all. I am a linux user, but the results are almost always regarding windows, no matter how many times do I repeat...

    Definitely, over the last two or three weeks, I’m simply not able to use ddg at all. I am a linux user, but the results are almost always regarding windows, no matter how many times do I repeat “linux” in the query.

    force mount as writeable used to yield actually useful results, mainly from stack overflow and friends, but lately all I get is results from microsoft documentation or various tech news sites with ad-ridden tutorial how to open flash drive on Windows 10, even if I mention linux in the query.

    And it keeps ignoring keywords in quotes as well.

    It used to be legitimately better than google, what has happened?

    6 votes
  4. Comment on Reddit introduces new "Start Chatting" feature across many subreddits, AskHistorians goes dark for 1 hour in protest to broken promises in ~tech

    Soptik
    Link Parent
    I just casually mention it and link something interesting from time to time when it's relevant to discussion. For example when I shared my program on reddit, I linked u/mironimous 's comment where...

    I just casually mention it and link something interesting from time to time when it's relevant to discussion. For example when I shared my program on reddit, I linked u/mironimous 's comment where he made something very relevant to my program. Someone asked about tildes and in few minutes I was sending invites.

    I don't really really promote it in a way where I would have prepared monologue about how great website this is. I wonder if there is someone doing some campaigns or something like that.

    4 votes
  5. Comment on Ubuntu 20.04 LTS arrives in ~tech

    Soptik
    Link Parent
    I don't use a virtual keyboard unfortunately, I trigger it with laptop keyboard, but it theoretically should work with it just fine. I just use it to rotate screen when I'm reading something long,...

    I don't use a virtual keyboard unfortunately, I trigger it with laptop keyboard, but it theoretically should work with it just fine. I just use it to rotate screen when I'm reading something long, so I can put my laptop on side and have essentially 90-degrees rotated monitor :) The experience when reading something that is tall but not wide is really much better, but I don't use it often enough to really make something like this properly.

    2 votes
  6. Comment on Ubuntu 20.04 LTS arrives in ~tech

    Soptik
    Link Parent
    Btw I have scripted a solution for screen (and touchpad!) rotation. It doesn't work automatically when I tilt laptop, but if you end up writing your own solution it might help. It took a while to...

    Btw I have scripted a solution for screen (and touchpad!) rotation. It doesn't work automatically when I tilt laptop, but if you end up writing your own solution it might help. It took a while to get touchpad rotation working.

    Script, example usage

    4 votes
  7. Comment on Ubuntu 20.04 LTS arrives in ~tech

    Soptik
    Link Parent
    Gnome is DE like anything else. It can be customized to look really good. It's the middle ground between nice and polished KDE and minimal DEs like XFCE. It is intuitive and works pretty well....

    Gnome is DE like anything else. It can be customized to look really good. It's the middle ground between nice and polished KDE and minimal DEs like XFCE. It is intuitive and works pretty well. Gnome these days isn't bad. It has all the features you would ever need and is reasonably useful out of the box.

    Note, I abandoned Ubuntu for Arch because I wanted stability - major updates always broke something. And I ditched Gnome for i3 even before because I wanted something more lightweight on my 8 year old machine. So I'm not gnome propagator. But it's not bad DE.

    6 votes
  8. Comment on Desed: a debugger for sed in ~comp

    Soptik
    Link Parent
    Yay thanks! Btw the first link is actually what prompted me to write this in the first place. I wanted to understand how does the monstrosity work. And the second one, eehhhhh. I'm kind of scared...

    Yay thanks!

    Btw the first link is actually what prompted me to write this in the first place. I wanted to understand how does the monstrosity work.
    And the second one, eehhhhh. I'm kind of scared of someone who comes up with a problem like this, let alone a solution. Outstanding work right there.

    2 votes
  9. Comment on What programming/technical projects have you been working on? in ~comp

    Soptik
    Link Parent
    Thanks! I've been using mainly awk as well, sed was just too much for me to handle. This was actually written to force myself to learn sed properly :-) Btw this tutorial actually helped me a lot....

    Thanks! I've been using mainly awk as well, sed was just too much for me to handle. This was actually written to force myself to learn sed properly :-)

    Btw this tutorial actually helped me a lot. I still don't quite understand all the newline mess, but I can now write my own divide-by-two.sed, so I'm happy :-)

    3 votes
  10. Comment on What programming/technical projects have you been working on? in ~comp

    Soptik
    Link
    I've made a debugger for sed! It's called desed (heh) and it's made in Rust. I was trying to get how this works for like fifth time and tried to mentally follow what sed does and what is in hold...

    I've made a debugger for sed! It's called desed (heh) and it's made in Rust.

    I was trying to get how this works for like fifth time and tried to mentally follow what sed does and what is in hold buffer and... I looked if there is a sed debugger out there. And it turned out there isn't (actually is, I can't search, but it's quite old). So I decided to brush up my Rust skills which have been getting quite rusty :) in the last few months.

    It turns out sed has a --debug flag which actually annotates what sed does in a nice way. But I wanted something a little bit more intuitive, so I hacked together TUI debugger in two days (and nights). It works by just parsing output of sed --debug, which is quite intuitive. Here's annotation of a simple sed program that decrements a positive number:

    decrement.sed
    SED PROGRAM:
      :decrement
      s/$/-;-90123456789/
      :decrement_inner_loop
      s/(.)-((-?.)*\\1)/\3\2/
      t decrement_inner_loop
      s/;.*//
    INPUT:   'number.txt' line 1
    PATTERN: 30
    COMMAND: :decrement
    COMMAND: s/$/-;-90123456789/
    MATCHED REGEX REGISTERS
      regex[0] = 2-2 ''
    PATTERN: 30-;-90123456789
    COMMAND: :decrement_inner_loop
    COMMAND: s/(.)-((-?.)*\\1)/\3\2/
    MATCHED REGEX REGISTERS
      regex[0] = 1-7 '0-;-90'
      regex[1] = 1-2 '0'
      regex[2] = 3-7 ';-90'
      regex[3] = 4-6 '-9'
    PATTERN: 3-9;-90123456789
    COMMAND: t decrement_inner_loop
    COMMAND: :decrement_inner_loop
    COMMAND: s/(.)-((-?.)*\\1)/\3\2/
    MATCHED REGEX REGISTERS
      regex[0] = 0-10 '3-9;-90123'
      regex[1] = 0-1 '3'
      regex[2] = 2-10 '9;-90123'
      regex[3] = 8-9 '2'
    PATTERN: 29;-90123456789
    COMMAND: t decrement_inner_loop
    COMMAND: :decrement_inner_loop
    COMMAND: s/(.)-((-?.)*\\1)/\3\2/
    PATTERN: 29;-90123456789
    COMMAND: t decrement_inner_loop
    COMMAND: s/;.*//
    MATCHED REGEX REGISTERS
      regex[0] = 2-15 ';-90123456789'
    PATTERN: 29
    END-OF-CYCLE:
    29
    

    So it turns out I can just parse it and load all states sed has ever been in into memory and then show them. This has a big advantage, besides that it's actually quite easy to do it, user can step the code both forwards and backwards. So you can setup breakpoint and then go back and see how did the code get to that breakpoint.

    The disadvantage is that sed doesn't tell me which line is it actually processing. So I had to implement a subset of sed in Rust (which wasn't without bugs, and I've only implemented like three commands), that I run in parallel while parsing the sed output, and pair each sed state with line number from source code.

    After I was done, I posted it to HN and Lobsters. I didn't expect anything, but I've actually gotten this to front page of Lobsters (which isn't any big achievement, if it isn't spam, everything makes it there) and, which I'm quite proud of, to the front page of HN! It was at the 10th place. So my git repo has over three hundred internet points. But most importantly, I've seen few people on twitter actually sharing it and they seemed to like it. It looks like I've actually made something that someone besides me will actually use sometimes. And that's the biggest achievement to me.

    11 votes
  11. Comment on Desed: a debugger for sed in ~comp

    Soptik
    (edited )
    Link
    I’ve written a debugger for sed in Rust. This was not only to learn rust, but to actually have a solid debugger for sed. I’ve started learning sed recently and decided to start writing various...

    I’ve written a debugger for sed in Rust. This was not only to learn rust, but to actually have a solid debugger for sed. I’ve started learning sed recently and decided to start writing various algorithms in it. And as sed doesn’t have numbers and can just filter/transform text, this is a challenge even for something like comparing two numbers. I’ve seen people (@mironimous actually) do amazing things with it.

    I’d be glad for any comments regarding code quality or the debugger itself.

    Edit: I've written a bit about how it was built.

    6 votes
  12. Comment on Daily coronavirus-related chat, questions, and minor updates - April 17 in ~health.coronavirus

    Soptik
    Link Parent
    Well, we didn't and still don't have. People are just making their own. Generally all masks and real medical equipment go towards hospitals, cashiers, and so on. Almost everyone here can - or...

    Well, we didn't and still don't have. People are just making their own. Generally all masks and real medical equipment go towards hospitals, cashiers, and so on.

    Almost everyone here can - or knows someone who can - sew, and it isn't that hard either. So we just banned people from entering anything without something that covers your face, and extended that to going outside as well few days later. And people made their own. Or just used a scarf or something. Even a scarf is better than nothing.

    Also the first week is kind of misleading from me, it was at the end of the first week when our government started freaking out, which was when we reached about 200 infected. Which was itself about a week and half after first positive test. I'll edit my comment to make that clear :-)

    3 votes
  13. Comment on Daily coronavirus-related chat, questions, and minor updates - April 17 in ~health.coronavirus

    Soptik
    (edited )
    Link
    It looks like we... managed to control it? Daily change of newly infected is about 1% now and is steadily decreasing. Czech republic 5152 infected, 1174 cured, 173 died We accepted pretty radical...

    It looks like we... managed to control it? Daily change of newly infected is about 1% now and is steadily decreasing.

    Czech republic 5152 infected, 1174 cured, 173 died

    We accepted pretty radical measures early on and it worked. Immediately, before there were 200 infected, we closed borders, and soon afterwards closed all shops except things like food, medical supplies and petrol, closed schools, cancelled all events and forbidden people from going anywhere expect shop, work and forest. Which is rough. But people are following the rules surprisingly well. I didn't see anyone who was breaking the rule, people even wore the masks before it was mandatory. It's especially surprising given this old saying I've heard a thousand times.

    There is a Czech, British and German following an old road. Suddenly they see a sign, "No entry". German immediately turns around and starts walking back without questioning it. British mutters something about basic human rights, but eventually turns around as well. And Czech goes forward to find out why is the sign there.

    But now, the restrictions are relaxing. More shops are being opened, some schools are slowly starting to open with some restrictions. It will keep going on for months, our government said that mandatory mask wearing (which was mandatory from the end of first week when we started putting down restrictions - which itself was about a week and half from when we recorded first infected) will last at least three or four months. But it looks like we flatten the curve surprisingly well.

    Generally I started to look at this pretty optimistically. It looks like the measures work and they are even repealing some of them. And it looks like the economical hit is way smaller than expected according to the government.

    4 votes
  14. Comment on The pandemic is giving people vivid, unusual dreams. Here’s why in ~health

    Soptik
    Link Parent
    I kind of have sine waves of dreams. For a day or two I'm absolutely alright and I don't even think about it. But then, it just hits and I keep having dreams about her for few days all the time....

    I kind of have sine waves of dreams. For a day or two I'm absolutely alright and I don't even think about it. But then, it just hits and I keep having dreams about her for few days all the time. I'm torn apart between enjoying it and just... It makes me think about her much more than I would like to at times, sometimes I just can't get away from it. Still not sure if I enjoy it or not.


    Did you ever try keeping something like a dream diary? My friend told me once that he started writing his dreams because of some class when he was studying psychology and that he started having/remembering much more dreams than before.

    4 votes
  15. Comment on The pandemic is giving people vivid, unusual dreams. Here’s why in ~health

    Soptik
    Link
    Huh. I recently started having loads of dreams, multiple per night. I never had dreams since I was young, or at least I couldn't remember that I even had a dream after waking up. However now, in...

    Huh. I recently started having loads of dreams, multiple per night. I never had dreams since I was young, or at least I couldn't remember that I even had a dream after waking up.

    However now, in the past week or two, I've started dreaming, mostly about my crush, almost every night. Sometimes I even remember multiple dreams from one night. This never happened before.

    Interesting read, thanks for sharing.

    8 votes
  16. Comment on Nim 1.2.0 released in ~comp

    Soptik
    Link Parent
    Flutter is IMO one of the best options we have right now. It's modern, I really liked working with it, the hot reload function is awesome. It was created as mobile phone GUI framework, but mac...

    Flutter is IMO one of the best options we have right now. It's modern, I really liked working with it, the hot reload function is awesome. It was created as mobile phone GUI framework, but mac support was added and while linux and windows builds are in alpha, they are there.

    Flutter requires you to build it in Dart, but it's one of the easiest languages out there to learn if you know JS/C#/Java. I learned it all in about day or two.

    The only worries is the relatively small community, which is not really a problem, but don't expect to find specialized libraries and the fact it's made by Google, so it can be killed any moment.

    2 votes
  17. Comment on rust_walker: asynchronous randomized large filesystem explorer in Rust in ~comp

    Soptik
    Link
    Nice code! It looks really tidy and understandable. I didn't even know that you can name loops in Rust. I really like this one.

    Nice code! It looks really tidy and understandable. I didn't even know that you can name loops in Rust.

    I really like this one.

    3 votes
  18. Comment on Government of Czech Republic adopted tracking of infected individuals via cellular networks in ~tech

    Soptik
    Link
    Original article (Czech): idnes.cz Original title: Technology against coronavirus. The government has adopted faster tracing of the infected. The other news; which I didn't see covered in any...

    Original article (Czech): idnes.cz

    Original title: Technology against coronavirus. The government has adopted faster tracing of the infected.

    The other news; which I didn't see covered in any media so far, but our prime minister said earlier today; was tracking people who came from Italy and other infected foreign countries. The goverment figured out, thanks to location and banking data, that 46% of quarantined people broke the quarantine.

    1 vote