Fork 0

9.5 KiB
Raw Permalink Blame History


44054541 - My first non-trivial Julia script

https://warosu.org/jp/thread/43998069#p44054541 To teach myself about Julia, I wrote a little script to consume the WeatherNews JSON timetable, massage the data a little, and print it in a useful way. I like the language, but I'm not totally proficient in it, and I was fumbling my way through. Maybe some of you will find this interesting.

>JSON timetable https://smtgvs.weathernews.jp/a/solive_timetable/timetable.json

>Baby Julia Code. Pls no bully. https://rentry.org/8yt7a

44055809 - An idea for a database

https://warosu.org/jp/thread/43998069#p44055809 >>44054541 I haven't tried Julia before, but the syntax and structures look similar to Python, and lately I've been studying functional programming, so I understand what your code is doing. If you want to get into databases, maybe you could have the script keep record of their schedules in sqlite. Some viewers, for example, keep record of keyword ranking quiz wins and losses in spreadsheets. You could to that with the schedules in a database, then use whatever language you want to query that database and build a front end to display information like "what shift a caster did most in a year", etc. I might try something similar in Haskell once I finish a web project for work

44055859 - Hmm, yes.

https://warosu.org/jp/thread/43998069#p44055859 >>44055809 >If you want to get into databases, maybe you could have the script keep record of their schedules in sqlite. That's not a bad idea. I'm a fan of SQLite already. Keeping a historical record of their schedule is pretty straightforward too. It's something I ought to know how to do in Julia too. If I do this, I'll publish the SQLite database for anyone who wants to play with the data.

>>44055809 >keyword ranking quiz I feel dumb for asking, but I don't get how this game works. I can see the casters trying to guess a word or phrase, but I have no idea what they're basing their guesses on.

44059003 - Minor bug fix

https://warosu.org/jp/thread/44057181#p44059003 >>44054541 I fixed a bug in my script from yesterday where if the first hour in the JSON is "00:00", the DateTimes were off by a day. The updated script is at the same URL. https://rentry.org/8yt7a

44059489 - Startup time is a bitch

https://warosu.org/jp/thread/44057181#p44059489 >>44059285 Yeah… Startup time for Julia scripts is a bitch due to all the compilation LLVM is doing under the hood. I feel like that community isn't in to shebang scripts and prefers to live and work in the REPL. That's why I made this script work both ways. You can run it as a script like you did, or you can include() it while in the REPL and then run its main() function. Once it's compiled, it's snappy as you can see in pic-related. There may be workarounds for this slow startup problem, but I'm too new to know yet.

Speaking of their REPL, it is one of the best I've experienced in any language I've used. I like how it has different modes like "?" for help mode, "]" for package mode, ";" for shell mode and backspace to go back to normal Julia mode. It's so comfy, and the language itself is so refreshing after all the years of web shit I did professionally. https://docs.julialang.org/en/v1/stdlib/REPL/

44060040 - Startup tricks

https://warosu.org/jp/thread/44057181#p44060040 >>44059285 Change the shebang line so that it looks like this: #!/usr/bin/env -S julia -O0 compile=min color=yes startup-file=no

That should help a little bit.

44060277 - algorithm-archive.org

https://warosu.org/jp/thread/44057181#p44060277 >>44060040 It did help. From 55 seconds down to 13. And it was just the initial compilation in the REPL that took time. subsequent runs of main were instantaneous. There should be some option to have julia keep a cache of compiled binaries in your home directory and run those if the source script is older. Thats what Guile scheme does and python too I think. I'll scan the docs for it. But yeah the package sub-repl and its output made installing the dependencies easy. My exposure to Julia has been from an american physicist in Japan who uses it to do matrix operations on GPUs. He streams Julia stuff on twitch sometimes, and his biggest project has been the algorithm archive https://www.algorithm-archive.org/.. Lots of that site was contributed by stream viewers and colleagues, and I think most of the pages have Julia implementations, among other languages. Lucky guy married a Japanese girl too.

Anyways, speaking of libraries…

44062735 - I want to win

https://warosu.org/jp/thread/44057181#p44062735 >>44060277 >It did help. From 55 seconds down to 13. ないすぅー

>My exposure to Julia has been from an american physicist in Japan >https://www.algorithm-archive.org/ >Lucky guy married a Japanese girl too. That guy sounds like he's winning. I, too, would like to:

  • live in Asia
  • with a cutie, and
  • work on fulfilling things.

As for how I found Julia, it was in a roundabout way while trying to do market analysis in JavaScript and wanting something better. I eventually found Jupyter notebooks, and I used it with my existing JS code for visualization, but it still wasn't enough. Then I found Pluto+Julia, and I fell in love with what it had to offer. However, I was sad that I didn't know about it sooner. It was the right tool for the problems I was dealing with, but I had to fuck around for a long time to stumble across this ingenious language + ecosystem. I'm still slogging away in JS while admiring Julia from afar.

>Anyways, speaking of libraries… Yuki is looking very young and demure. You'd never guess how naughty she actually was.

44244787 - The database and schedule didn't match

https://warosu.org/jp/thread/44187415#p44244787 >>44244704 It looks like Ayaka was supposed to do Coffee Time. That's what my script recorded last night when it checked the JSON timetable. For whatever reason, she wasn't able to do it, so they kinda stretched out Mayu and Senna's shifts. (I might need to manually insert one new record. I didn't anticipate this schedule weirdness.)

>>44244762 >Ayaka prob stuck tending to babby. Sounds plausible.

44349916 - caster_id may be NULL

https://warosu.org/jp/thread/44297022#p44349916 Why is there no caster for Evening? https://weathernews.jp/wnl/timetable.html It was previously scheduled to be Mizuki.

44364955 - Tracking schedule.video_id and mscale

https://warosu.org/jp/thread/44297022#p44364955 The weathernews database is keeping track of YouTube video_ids and M-scale starting today. http://git.vern.cc/gg/WeatherNews.jl/issues/2

The SQLite database is available as "wn.db" here: https://gg.vern.cc/wn-data/

44365207 - Trying queries

https://warosu.org/jp/thread/44297022#p44365207 >>44364520 her 5ch thread has tons more screenshots and gifs https://medaka.5ch.net/test/read.cgi/ana/1691848316/10-110 Interesting how this was a 4.7M gif and just a simple transcode with "ffmpeg -i Zp9dAn4.gif Zp9dAn4.webm" took it down to a 215K webm with no perceptible loss of quality. It just made her shirt and skin tone brighter. >>44364955 >>44364972 cool. I'll check out the issue notes and try some queries on it. I'm thinking Mayu deserves to be the next OP again. Actual #1 hardest working caster.

44458637 - Initial site reveal

https://warosu.org/jp/thread/44375725#p44458637 >>OP >https://gg.vern.cc/wn-data/wn.db I made some CGI scripts to display the data. It's really rough, and deploying on vern was finicky. https://gg.vern.cc/wn/

The prophecy was fulfilled in time for the next thread. >>/jp/thread/43998069#p44055809

44458700 - Playing with Haskell

https://warosu.org/jp/thread/44375725#p44458700 >>44458637 this is useful. will go into the next OP. I was just starting to try out HTML generation in Haskell this afternoon but vern went down for a few hours

44458937 - Numbers

https://warosu.org/jp/thread/44375725#p44458937 Mayu is still holding the lead but Mi-chan is right behind her.

44459040 - Idea for a ranking page

https://warosu.org/jp/thread/44375725#p44459040 >>44458937 you should add a ranking page like this

44500927 - au PAY video discovery research

https://warosu.org/jp/thread/44465230#p44500927 >>44495035 woah wth. how did you find this? I see that the "10213" directory is the same as the id in the original stream page link >>44478318 I wonder how long they keep these vods. If we knew the stream ids of the other AU pay streams, we could easily watch them in 1080p too. Oh shit. I just decremented the "10213" in your link and it gave me some random lady's stream. Decremented it one more time to "10211" and I got Ayaka's last AU Pay stream. I think we should add the links to these past streams to the vern schedule site as we find them.

44501949 - au PAY continued

https://warosu.org/jp/thread/44465230#p44501949 >>44500927 >woah wth. how did you find this?

>I think we should add the links to these past streams to the vern schedule site as we find them. Let's continue that discussion here: http://git.vern.cc/gg/WeatherNews.jl/issues/5

44519527 - Do the Nips know?

https://warosu.org/jp/thread/44465230#p44519527 >>44519466 I hope a Nip has been following this development and the vern site and has shared the knowledge with 5ch.


Google Spreadsheet by @smile_hakumai

This is a similar effort that predates WeatherNews.jl.

Local Variables