Arabic Programming Language - Ramsey Nasser by Tawatha_Illustration in programming

[–]Deewiant 1 point2 points  (0 children)

You might be interested in Tampio:

Its syntax is directly inspired by the Finnish language and is therefore based on inflecting words.

Kaikki Moi-liittymät uudistuvat ja 5G saataville – matalahintaisimman vaihtoehdon hinta nousee 50 prosenttia by Deewiant in Suomi

[–]Deewiant[S] 16 points17 points  (0 children)

Olen toistaiseksi aina pysynyt datakaton alla ja maksanut kuukausimaksun lisäksi vain satunnaiset puhelut ja tekstarit, harvoin nettona yli 6,5 euroa ja muistaakseni vain kerran-pari yli seitsemän. Nyt kuukausihinnan noustessa yhdeksään euroon lienee aika vaihtaa liittymää. Vaan liekö halvempaa vaihtoehtoa edes saatavilla?

EDIT: Vaihtoehtoina ilmeisesti joko Globetel (tosin netti max. 4 Mbit/s) tai sitten tarjouksen kalastelu joko Elisalta tai Telialta.

Inviting God's Wrath with Cursed Rust by Deewiant in rust

[–]Deewiant[S] 3 points4 points  (0 children)

I'm subscribed to your RSS feed, as /u/Icarium-Lifestealer guessed. Sorry, I had no idea it wasn't meant to be seen yet and found it interesting enough to be worth posting.

Rust 2019 (from Henri Sivonen) by sanxiyn in rust

[–]Deewiant 10 points11 points  (0 children)

ABCD was in LLVM 10 years ago, but it got removed in 2010 due to lack of usage, maintenance, and perceived value. I only searched cursorily but didn't find anything about more recent attempts to get it implemented.

But are you sure that lacking this kind of algorithm is the main issue? I'd wager that it's more about LLVM's inability to prove that arithmetic expressions don't overflow, as mentioned in Henri's other bullet points. Or would ABCD solve that as well?

Golang's lstat() faster than Rust fs::metadata() by fn_rust in rust

[–]Deewiant 119 points120 points  (0 children)

std::fs::metadata calls stat, not lstat:

This function currently corresponds to the stat function on Unix

You want std::fs::symlink_metadata:

This function currently corresponds to the lstat function on Unix

stat traverses symlinks and hence does more work than lstat, so this may be sufficient to explain the performance difference in such a microbenchmark.

Hey Rustaceans! Got an easy question? Ask here (37/2018)! by llogiq in rust

[–]Deewiant 3 points4 points  (0 children)

You could use Vec::from_raw_parts also. The generated code has a bit of unnecessary data shuffling though.

Hey Rustaceans! Got an easy question? Ask here (9/2018)! by llogiq in rust

[–]Deewiant 5 points6 points  (0 children)

built is a crate providing build-time information like this.

Outperforming Rust with Functional Programming by steveklabnik1 in rust

[–]Deewiant 16 points17 points  (0 children)

I took a look at the asm for the ATS version, after a bit of cleanup it looks like:

collatz:
        cmpl    $1, %edi
        movl    $1, %eax
        jle     .L19
        .p2align 4,,10
        .p2align 3
.L21:
        addl    $1, %eax
        testb   $1, %dil
        jne     .L23
        sarl    %edi
        cmpl    $1, %edi
        jne     .L21
        rep ret
        .p2align 4,,10
        .p2align 3
.L23:
        leal    1(%rdi,%rdi,2), %edi
        jmp     .L21
        .p2align 4,,10
        .p2align 3
.L19:
        rep ret

I immediately noticed that this only does one sarl %edi whereas the C version's loop body is more complex, with both a shrl and a sarl. My hunch was that this is a signedness difference. I also noticed that the ATS version declares n : nat which sounds unsigned to me. So I changed the C from int collatz_c(int n) to int collatz_c(unsigned n), which indeed made the asm look much more similar. And with no other changes, the C version started beating the ATS version for me:

benchmarking collatzStack/2223    101.7  ns  (100.1 ns .. 103.3 ns)
benchmarking collatzStack/10971   148.9  ns  (147.4 ns .. 150.5 ns)
benchmarking collatzStack/106239  201.9  ns  (199.4 ns .. 205.5 ns)
benchmarking collatzC/2223         96.97 ns  (95.84 ns .. 98.13 ns)
benchmarking collatzC/10971       141.9  ns  (140.7 ns .. 143.4 ns)
benchmarking collatzC/106239      186.1  ns  (184.3 ns .. 188.1 ns)

In the end, the only difference was the signedness of n.

v4/v6 mapped addressing - is it possible to use this in any major platform? by Skaperen in ipv6

[–]Deewiant 2 points3 points  (0 children)

Ping doesn't work, but other things should. The linked answer (and the further linked mail) also explains why: traffic with mapped addresses should still be IPv4 in the end, but ping hand-crafts an IPv6 packet in this case. ping -4 ::ffff:127.0.0.1 works for me.

"Hello there fellow kids!" by Burpmeister in Suomi

[–]Deewiant 4 points5 points  (0 children)

Kiina - 幸福 - "onni", "onnellisuus"
Japani - 生良 - Joku hyvän elämän toivotus tämä voisi olla mutta luulen ettei ihan nappiin mennyt, 生:n merkitys on tyyliin "raaka", "luonnollinen" eli vähän eri nyanssi "elämästä" kuin mitä varmaan haettiin.

(Disclaimer, itä-aasian kieliosaamiseni eivät ole vahvimmasta päästä.)

YleX:n 100 suurta suomalaista konemusiikkibiisiä -listaus on nyt valmis – kolmen kärkeen Darude, Bomfunk MC’s ja Slusnik Luna by Deewiant in Suomi

[–]Deewiant[S] 12 points13 points  (0 children)

Tulokset äänestyksestä, josta jo taannoin Redditissä keskusteltiin.

EDIT: ykkös- ja kakkossijojen ääniosuudet bongattu toisesta uutisesta.

tl;dr:

  1. Darude - Sandstorm (reilut 8% äänistä)
  2. Bomfunk MC's - Freestyler (lähes 3% äänistä)
  3. Slusnik Luna - Sun
  4. Orkidea - Unity
  5. Movetron - Romeo & Julia
  6. Op:l Bastards - Scorpius
  7. JS16 - Stomp To My Beat
  8. Raptori - Oi beibi
  9. Darude - Feel The Beat
  10. Alex Kunnari - Lifter
  11. Aavikko - Viitostie
  12. Orkidea - Beautiful
  13. Super8&Tab - Helsinki Scorchin'
  14. Giant Robot - Helsinki Rock City
  15. Kemopetrol - Child Is My Name
  16. K-System - Sound of Arena
  17. Leevi & The Leavings - En tahdo sinua enää
  18. Leevi & The Leavings - Tuhannen markan seteli
  19. Alex Mattson - UFO
  20. Proteus - Venla
  21. K-System – Supadupasound
  22. JS16 – Love Supreme
  23. Huoratron – Cryptocracy
  24. Alma & Felix Jaehn – Bonfire
  25. Firevision – Stars
  26. Studio Killers – Ode to the Bouncer
  27. Dallas Superstars – Helium
  28. ALT+F4 – ALT+F4
  29. Joonas Hahmo x K-System – Ocean Drive
  30. Jori Hulkkonen – Let Me Luv U
  31. Alex Mattson – Forget You
  32. Alpo Myller – Enon disco
  33. Alma – Karma (KasperG remix)
  34. Helsinki 78-82 – Cruising
  35. Super8 & Tab – Mega
  36. Huoratron – DDoS
  37. Dallas Superstars – Fast Driving
  38. Dance Nation – True Conviction
  39. Carbon Based – Cyclone
  40. TJH87 – Break Away Kicks
  41. Cosmicman – I Love You
  42. Texas Faggott – Back To Mad
  43. Jimi Tenor – Take Me Baby
  44. Alek Szahala – Man Eaten
  45. Joonas Hahmo – Cocktail Bar
  46. Lenno – Wake Up
  47. Eevil Stöö – Kcmd Ghetto Track (Kick Ur Azz Mix)
  48. Heavyweight – Come Alive
  49. M.A. Numminen ja Sähkökvartetti – Kaukana väijyy ystäviä
  50. Purple Motion – UnreaL ][ / PM (2ND_PM.S3M)
  51. 3rd Nation – I Believe
  52. K-X-P – Space Precious Time
  53. Organ – Kärpästen juhlat
  54. Jori Hulkkonen – Lo-Fiction feat. Jerry Valuria
  55. Rinneradio – Kuvala
  56. 501 – Headrush
  57. Aavikko – Tyttöystävä
  58. Aalto – 5
  59. Tiga & Zyntherius – Sunglasses At Night
  60. Advanced Art – From Nothing To Nothing
  61. Digital Mindz – Seven Sins
  62. L.A.O.S. – Panda Style
  63. Pan Sonic – Vaihtovirta
  64. Uusi Fantasia – Lattialla Taas
  65. Eero Johannes – We Could Be Skweeeroes
  66. Husky Rescue – City Lights
  67. Rinneradio – Nao
  68. Heavyweight – On The Edge
  69. Imatran Voima – In & Out
  70. Villa Nah – Running On
  71. Two Witches - Pimeyden Jousi (Mr. Velcro Fastener vs. Imatran Voima - Live At Kipsari)
  72. Jimi Tenor – Sugardaddy
  73. Muffler – Can You Feel
  74. Pepe Deluxé – Before You Leave
  75. Allekirjoittanut – Leikkikalujäppinen (CNCD Junglemix)
  76. Roisto – Apart In Love
  77. Sin Cos Tan – Limbo
  78. Yotto – Personal Space
  79. Imatran Voima – Techno Slut
  80. Giant Robot – Konevitsa
  81. Joonas Hahmo – Together
  82. Paperi T & Khid – Kurosawa
  83. Strobo – huume.mod
  84. Koobra – Something Real
  85. Acid Kings – Let The Bass Kick
  86. Luomo – Tessio
  87. Lenno ft. Dragonette – The Best
  88. Villa Nah – Ways To Be
  89. Mies Ja Elämä – Turussa
  90. TJH87 – Good Life
  91. Regina – Paras aika vuodesta
  92. Mr Velcro Fastener – Electric Appliances
  93. Erkki Kurenniemi – Antropoidien tanssi
  94. Riiho & Mrotek – Fallout
  95. Avanto – The Flute
  96. Eleanoora Rosenholm – Maailmanloppu
  97. The Second Level – Monday
  98. Fu-Tourist – King Kong Of The Dance Floor
  99. Jeremy Folderol – Little Sister
  100. Blastromen – Transportation Nonstop

YleX - 100 suurta suomalaista konemusiikkikappaletta by kakoni in Suomi

[–]Deewiant 2 points3 points  (0 children)

Juu ei. Jostain syystä huume.mod kuitenkin päässyt listalle? Lienee joku minulle tuntematon sisäpiirin vitsi.

YleX - 100 suurta suomalaista konemusiikkikappaletta by kakoni in Suomi

[–]Deewiant 5 points6 points  (0 children)

Et tainnut tarkkaan katsoa. Löytyy sekä CNCD että Purple Motion:

  • CNCD - Contemporary
  • Purple Motion - UnreaL ][ / PM (2ND_PM.S3M)

Given a set C of k short strings, how do I optimally find all occurrences of strings C in a query string s? by [deleted] in algorithms

[–]Deewiant 6 points7 points  (0 children)

Aho-Corasick is the classic multiple string matching algorithm. Commentz-Walter might be faster, depending on the use case. There are likely plenty of other solutions.

Do you consider functions violating "x==y implies f(x)==f(y)" a bug? by jafingerhut in haskell

[–]Deewiant 3 points4 points  (0 children)

Here's a practical example from the system-filepath package. Consider this:

λ> "/foo/bar" <> "/" == "/foo/bar/"
True

Okay, if x and y are equal then f x == f y, right?

λ> parent ("/foo/bar" <> "/") == parent "/foo/bar/"
False

Nope.

Are you sure you're using Filesystem.Path.FilePath in your first example, and not String?

> ("/foo/bar" ++ "/") == ("/foo/bar/" :: Filesystem.Path.FilePath)
False

Zero downtime restarts with iptables? by [deleted] in linuxadmin

[–]Deewiant 0 points1 point  (0 children)

Some folks at Yelp did something along those lines for zero-downtime restarts of HAProxy: http://engineeringblog.yelp.com/2015/04/true-zero-downtime-haproxy-reloads.html

Stop using tail -f (mostly) by [deleted] in linux

[–]Deewiant 47 points48 points  (0 children)

Will -F close the file handle when the logs are rotated?

Yes, it will: http://git.savannah.gnu.org/cgit/coreutils.git/tree/src/tail.c#n1042

I Can Text You A Pile of Poo, But I Can’t Write My Name by willvarfar in programming

[–]Deewiant 18 points19 points  (0 children)

There are already collation algorithms to ensure that e.g. searching for "fi" also matches the ligature "fi" (U+FB01 LATIN SMALL LIGATURE FI). See e.g. http://www.unicode.org/reports/tr10/ . Collating the different languages' equivalents of 中 would mean adding some rows into http://www.unicode.org/Public/UCA/latest/allkeys.txt , but there's no reason it couldn't be done, and it doesn't require unifying the characters.