<< 25-07-2023 >>

00:33:44FromDiscord<voidwalker> is there any android demo app that would interact with an API for basic stuff such as user reg, log in etc ?
00:33:54FromDiscord<voidwalker> (edit) "is there any ... android" added "nim"
00:34:53FromDiscord<voidwalker> or would building a real android app in Nim at this point be quite stupid ?
00:40:20FromDiscord<Elegantbeef> You'd have to use the JNI or whatever android calls it
00:40:49FromDiscord<Elegantbeef> https://lisyarus.github.io/blog/programming/2023/07/19/porting-for-android.html is a good reference, more for a sdl2/gflw based engine but same difference
00:41:05FromDiscord<Elegantbeef> I know nimx also can build to android
01:20:02FromDiscord<voidwalker> nah, I need a classic js frontend framework ui
01:20:44FromDiscord<Elegantbeef> "Look how nimx compiles" ... "no i need js"
01:20:44FromDiscord<Elegantbeef> What?
01:21:49FromDiscord<voidwalker> Well tbh, I have no idea how apps work on android, what languages can you use and how
01:22:03*rockcavera quit (Remote host closed the connection)
01:22:36FromDiscord<voidwalker> Don't think nimx is a proper way to build an ui on android
01:23:12FromDiscord<Elegantbeef> Right, but regardless of what your feelings are of GUI there's a script setup to building Nim to android
01:25:32FromDiscord<voidwalker> probably a bad idea even to consider/ask about it : P
01:25:45FromDiscord<voidwalker> I'll outsource it to someone who knows js/android stuff
01:25:56FromDiscord<Elegantbeef> Not really it's no different to using Rust, C, C++, to enable code reuse
01:26:55FromDiscord<voidwalker> well then show me a nim android app that is not an opengl spinning triangle
01:26:56FromDiscord<Elegantbeef> Why rewrite logic when you can just compile a native library and use FFI to call into it
01:29:11FromDiscord<voidwalker> not sure if backend logic and frotend logic will have anything in common
01:29:43FromDiscord<Elegantbeef> Well then your best bet is use react native or native ui tooling
01:29:56FromDiscord<Elegantbeef> Even mainstream languages like C/C++ cannot easily write Android apps
01:30:01FromDiscord<voidwalker> I'd better look for a mature app written with a mature web framework, that implements APIs, user registration, auth and regular web stuff
01:30:21FromDiscord<voidwalker> (edit) "I'd better look for a mature ... app" added "nim web"
02:03:35NimEventerNew question by Emilia Qtless: Component Constructors In HappyX, see https://stackoverflow.com/questions/76759014/component-constructors-in-happyx
02:16:38*azimut quit (Ping timeout: 240 seconds)
02:32:14*disso-peach quit (Quit: Leaving)
03:44:26FromDiscord<AkaGma (Red Bear)> https://twitter.com/ar031995/status/1683481162352558083
04:16:17*rockcavera joined #nim
04:19:47*rockcavera quit (Read error: Connection reset by peer)
04:24:54*rockcavera joined #nim
04:50:55*rockcavera quit (Read error: Connection reset by peer)
04:51:21*rockcavera joined #nim
04:57:38*junaid_ joined #nim
04:57:48*junaid_ quit (Client Quit)
04:58:58*junaid_ joined #nim
05:08:11*junaid_ quit (Remote host closed the connection)
05:59:22*rockcavera quit (Read error: Connection reset by peer)
05:59:45*rockcavera joined #nim
05:59:45*rockcavera quit (Changing host)
05:59:46*rockcavera joined #nim
06:23:13FromDiscord<shalokshalom> In reply to @jviega "Who thinks C is": https://github.com/microsoft/checkedc/commits/master↵↵Microsoft
06:24:49FromDiscord<shalokshalom> In reply to @_gumbercules "I don't think you": https://rust-gcc.github.io/
06:25:02FromDiscord<_gumbercules> that's just a frontend
06:25:13FromDiscord<shalokshalom> to llvm?
06:25:17FromDiscord<shalokshalom> ah, makes sense
06:25:57FromDiscord<_gumbercules> I guess so...
06:25:58FromDiscord<shalokshalom> no, it's a front end to GCC?
06:26:06FromDiscord<_gumbercules> yeah I have no idea - this thing is weird
06:26:27FromDiscord<shalokshalom> they want to be upstream to gcc and speak of a full alternative
06:26:38FromDiscord<shalokshalom> I guess tooling and other stuff might still depend on llvm
06:26:58FromDiscord<_gumbercules> well regardless - I don't think any mature options exist for Rust as far as compiler backends go, other than LLVM
06:27:38FromDiscord<shalokshalom> yeah
06:29:03FromDiscord<shalokshalom> there is https://github.com/thepowersgang/mrustc
06:29:12FromDiscord<shalokshalom> why anyone would do that in C++
06:31:33FromDiscord<Elegantbeef> Don't want to depend on rust
06:45:39Amun-RaI remember good old times I wanted to compile my android port using only make
06:47:55FromDiscord<Elegantbeef> It's partially understandable why we cannot, but it's a shame
06:48:27*PMunch joined #nim
06:49:26*PMunch quit (Client Quit)
06:53:30*PMunch joined #nim
07:09:33*ntat joined #nim
07:52:40Amun-RaElegantbeef: https://github.com/cnlohr/rawdrawandroid
08:10:11*jmdaemon quit (Ping timeout: 264 seconds)
08:36:57om3gaI believe android will be replaced soon with Fuchisa OS
08:37:25om3gaFuchsia*
08:38:51madpropscan't say i care about android too much
08:39:09madpropsit mainly annoys me
08:39:25madpropsespecially don't care what kernel it uses
08:39:49madpropsthough that would be zyrcon
08:40:41madpropselon musk should buy android
08:40:46om3gaI mean investing time in android development can be useless
08:41:00madpropsi made several android apps
08:41:14madpropsmost of them native java
08:41:17madpropsone of them was a webview
08:41:18om3gain eclipse ide?
08:41:25madpropseclipse then studio
08:41:51madpropsi like eclipse
08:41:58madpropsit feels sturdy
08:42:35madpropsand so does java
08:42:37ehmryI think a new Hauwei OS will happen before Fuchsia replaces Android
08:42:42om3gaeclipse is a pure form of evil. especially when it suddenly crashes
08:43:38om3gaehmry: not many people like huawei devices
08:44:00om3gawhat is Huawei os? Another fork of android?
08:44:50ehmryidk, i think they've got a few different from-scratch stuff going
08:46:18ehmryi think staying in control of android is better for business than innovating
08:46:41om3ganah, Fuchsia will outsrip huawei
08:46:48om3gait's almost complete
08:47:14ehmrysure, but it can still get killed
08:49:51om3gathat will be stupidest decision ever
08:50:45ehmrynah, sunk cost fallacy
08:52:51om3gaTravis Geiselbrecht involved into this project, Fuchsia should be decent working OS
08:54:33om3gaI tried recently Haiku, looks like it is stable already. Nim works there btw
09:02:52FromDiscord<Elegantbeef> Amun as cool as that is, that's an awful lot of hassle 😄
09:05:36madpropsi've tried haiku on vms
09:05:41madpropsi still don't get it
09:08:52om3gawell, haiku is desktop operating system with old type user interface like in 90's
09:09:59om3gaall other in it looks like unix in terminal, while ui is pretty the same as in other os-es
09:10:08madpropsi know haiku is based on BEos
09:10:18madpropsi don't know how big that was in the 90's
09:10:34om3gayeah, but was rewritten
09:11:15madpropsapart from the user interface ideas. is the internals something to write home about?
09:11:27om3gabeos was not popular at all, but had tons of functionality that other os-es lack in that days
09:12:18om3gamadprops: what you mean
09:12:54madpropssystem space
09:13:05madpropsis it very efficient
09:13:34om3gaprobably possible, I not tried yet
09:15:27om3gait should be, I see they have good documentation
09:16:21madpropsmy favorite alt os project is serenity
09:16:36madpropsafter that openbsd
09:18:14om3gaoh! I remember that, is it like reverse engineered windows, right?
09:18:26madpropsno that would be reactos
09:18:45madpropsi haven't tried that one yet
09:19:19om3gaSerenity looks attractive
09:19:27madpropsit has a lot of momentum
09:19:30madpropsan fresh ideas
09:20:43madpropsi think after some breakthrough it will explode
09:20:49madpropsmaybe an influx of linux ports idk
09:21:13om3gaand which kernel it has? own one or based on something?
09:21:24madpropseverything is made from scratch
09:21:42madpropsim guessing the kernel pales compared to linux
09:21:54madpropsalso no drivers
09:22:44om3gawow
09:23:11om3gaJim Salter of Ars Technica regarded the use of the ext2 file system as his least favorite feature of the operating system. Compared to TempleOS....
09:23:28om3gawhy should anybody compare something to TempleOs
09:23:51madpropshaha
09:24:44om3gamentioning ext2 like favorite feature, why
09:25:30madpropsi use btrfs
09:25:36madpropsand used ext3 for years
09:25:39madpropsext2 is ancient
09:25:51PMunchI've had more crashes than saves from btrfs..
09:26:02madprops:(
09:26:07PMunchAll my machines run ext4
09:26:15om3gawhat about ext4?
09:26:27PMunchWhat about it?
09:26:52om3gashould be more stable and safe (fast)
09:27:01madpropsmy root is btrfs but my partitions are ext4
09:27:27PMunchHmm, do we have any packages to convert coordinate systems in Nim?
09:28:38om3gahttps://github.com/kam3k/euler-nim
09:29:13PMunchAh, I meant like lat/lng -> UTM
09:30:00om3gaoh, no, never had such needs
09:30:30om3gamadprops: I believe btrfs more designed to work with folders with tons of files in it
09:30:51madpropsyeah im probably doing it backwards
09:31:21madpropsim planning to just btrfs everything from now on
09:31:30om3gaused to process properly metadata of files on btrfs, it was painful
09:31:54madpropsi tried to mess with the snapshots but it was confusing
09:32:08madpropsand filled the drive
09:32:15madpropsi was expecting grub entries
09:32:17madpropsat least
09:34:15NimEventerNew post on r/nim by khorgn: developing with nimble, see https://reddit.com/r/nim/comments/1593h7h/developing_with_nimble/
09:34:30om3gawhat about os-es, I'm goind to intsall different ones for testing purposes. for example haiku seems has weak protection from OOM state
09:34:37om3gait hangs
09:35:15madpropsmost impressive thing was a nested shells spawning more nested shells on linux, and it not hanging
09:35:26madpropsi had enough cpu to kill the process
09:35:52om3gaI mean if process coded properly with all error handling, until process quits Haiku will be "frosen"
09:36:02om3gain linux idk...
09:37:03om3gait behaves like dictator, if OOM killer is enabled, it just kills fat process, no matter what it does
09:38:48madpropsbetter than having an unresponsive computer
09:39:43om3gawith disabled oom killer, I believe linux will hang like Haiku
09:40:53om3gamadprops: complicated question, what if your service does something very important and should not be interrupted (may cause data corruption)
09:41:43madpropscan you tell the system something is very important?
09:41:55Amun-Rathen the app should be whitelisted
09:42:16om3gapreciously I used statically allocated (controlled) amount of ram, with dynamic memory management it can be dangerous
09:42:19Amun-Raecho -17 > /proc/pid/oom_adj
09:44:28madpropsfirst result of that in search is a chinese site
09:44:33madpropshttps://zgserver.com/linuxproc-pid-oom_adj.html
09:44:43om3gaAmun-Ra: yeah, this can solve the issue partially (in terms of what killer does) , but I don't remember what linux will do when there is absolutely no ram for other processes.
09:46:00Amun-Rahmm
09:46:44FromDiscord<Liil' Boo> Hi, where can I ask questions regarding how to install nim ?
09:46:56madpropstry chatgpt
09:47:09Amun-Rasure
09:47:35FromDiscord<demotomohiro> Which OS?
09:48:12om3gawhat about nim's mm in this case, the risk of growing ram consumption by the process persists. and I'm not sure if memory related error handling is even possible in nim
09:50:27om3gaLiil' Boo, if you have issues, just ask. On nim website published detailed instructions how to install. Try choosenim if applicable
09:50:41Amun-Rawhat if ie new_seq fails? does it return nil or does it call oom hook?
09:51:17om3gaLiil' Boo, https://github.com/dom96/choosenim
09:51:29om3gaAmun-Ra: no..
09:52:48Amun-Raom3ga: no/no? :)
09:53:01FromDiscord<demotomohiro> !eval echo newSeq[char](1024 1024 1024 32)[1]
09:53:03NimBotCompile failed: /usercode/in.nim(1, 24) Error: invalid token: (\29)
09:53:12om3gaI tried to wrap allocatros, to catch exceptions. But this won't work with sequences, it means we have to implement own add() method
09:53:39om3gaAmun-Ra: yes, exactly no/no :)
09:53:50Amun-Raom3ga: oh, thanks :)
09:54:35om3gawhen allocator fails nim programm with quit
09:54:46om3gait crashes with exception
09:55:33Amun-Rahmm, how about -d=usemalloc and injecting own malloc…
09:56:14FromDiscord<Liil' Boo> In reply to @demotomohiro "Which OS?": Linux Ubuntu (LTS version)
09:56:17om3gathe same... unfortunately nim repeats what rust folks did
09:56:40om3gaLiil' Boo: sudo apt install nim
09:58:54FromDiscord<demotomohiro> I think Ubuntu package manager installs older version.↵choose nim should be able to install latest stable.
10:02:09FromDiscord<Liil' Boo> In reply to @demotomohiro "I think Ubuntu package": I'm checking it
10:44:50FromDiscord<ieltan> @Liil' Boo use choosenim
11:29:44FromDiscord<Liil' Boo> sent a code paste, see https://play.nim-lang.org/#ix=4Bs0
11:56:28*azimut joined #nim
12:43:21FromDiscord<bung8954> how can I write different branch depends on the param is static string or not
12:48:14*lucasta joined #nim
12:48:35FromDiscord<juan_carlos> In reply to @bung8954 "how can I write": `when param is string:` ?.
12:48:58FromDiscord<bung8954> I mean static string or just string
12:50:35FromDiscord<jmgomez> `is static[string]`
12:52:08FromDiscord<jmgomez> sent a code paste, see https://play.nim-lang.org/#ix=4Bse
12:53:28FromDiscord<bung8954> wow, first time know this
12:54:58FromDiscord<jmgomez> tbh I didnt know either 😛
12:55:12FromDiscord<jmgomez> sent a code paste, see https://play.nim-lang.org/#ix=4Bsg
12:57:29FromDiscord<bung8954> pretty nice, this is second time this problem comes to my head, finally it solved, thank you!
13:06:15FromDiscord<enthus1ast> on stable the stdlibs smtp modules shadows the one from nimble, is there a way to use the nimble one over the stdlib one?
13:07:50FromDiscord<ringabout> `pkg / smtp` should work.
13:08:12FromDiscord<bung8954> yeah, documented here https://nim-lang.org/docs/manual.html#modules-pseudo-importslashinclude-paths
13:08:43FromDiscord<enthus1ast> ah nice
13:08:48FromDiscord<enthus1ast> thank you both
13:12:54*rockcavera quit (Remote host closed the connection)
14:07:47*m5zs7k quit (Ping timeout: 264 seconds)
14:08:58*m5zs7k joined #nim
14:22:57*PMunch quit (Quit: Leaving)
14:38:44madpropshttps://borgo-lang.github.io/
15:06:18FromDiscord<nervecenter> ...?
15:06:53FromDiscord<nervecenter> Does this language have a substantive "why"?
15:07:27FromDiscord<nervecenter> Go itself has a rather questionable answer to "why"
15:07:42Amun-Ranow I can a non-fan of three languages instead of only two!
15:07:52Amun-Ras/can a/can be a/
15:15:57NimEventerNew thread by sls1005: The correct behavior of procedural variable initialization, see https://forum.nim-lang.org/t/10354
15:52:57FromDiscord<turtlebasket> borgo looks pretty useful ngl
15:53:05FromDiscord<turtlebasket> Go error handling is... 🤢
15:53:51FromDiscord<turtlebasket> guess it ended up being so opinionated that someone had to make another opinionated language that transpiles to it 😑
15:58:06*junaid_ joined #nim
15:58:33*junaid_ quit (Client Quit)
15:59:47*junaid_ joined #nim
16:11:14FromDiscord<treeform> In reply to @.matrixagent "guys is it advisable": I use my websocket in production, but not at large scale. Although I am probably going to switch Mummy's websocket (which is based on mine a little bit but rewritten by Guzba). Mummy's websocket is used at huge scale: https://forum.nim-lang.org/t/10066
16:35:17*lucasta quit (Quit: Leaving)
16:36:27*zaher joined #nim
16:38:23FromDiscord<ieltan> Using `macrocache` I have a value that I need at compile time in another module of my library but Nim evaluates the expression getting the value before it can evaluate the expression that puts it inside, how can I deal with that?
16:38:37FromDiscord<ieltan> I'm already using templates and macros
16:39:29FromDiscord<ieltan> (edit) "I'm already using templates and macros ... " added "and static blocks"
16:40:53*_________ quit (Quit: leaving)
16:52:44NimEventerNew thread by ploxotnuj1: How to send a file to a telegram bot via Puppy, see https://forum.nim-lang.org/t/10355
16:55:45NimEventerNew thread by ploxotnuj1: How to send a file to a telegram bot via a request in Puppy?, see https://forum.nim-lang.org/t/10356
17:25:26FromDiscord<Phil> In reply to @turtlebasket "Go error handling is...": Isn't go error handling basically no exception and all result types?
17:26:05FromDiscord<Phil> Happy to continue that debate off topic but propper result trying returns seem nicer than exceptions
17:26:24FromDiscord<Phil> (edit) "trying" => "typing"
17:32:34*zaher_ joined #nim
17:33:49FromDiscord<vindaar> who cares? I don't know, but I had fun! 😁 https://github.com/Vindaar/llama2nim
17:34:47*zaher quit (Ping timeout: 264 seconds)
17:35:04FromDiscord<arathanis> In reply to @isofruit "Isn't go error handling": #ErrorsAreValues
17:39:21FromDiscord<Phil> I mean, I do like that, it's explicit
17:43:22FromDiscord<bostonboston> You mean you don't like `try thing catch(e) throw new e`
17:46:23FromDiscord<demotomohiro> In reply to @ieltan "Using `macrocache` I have": What I do is, put code that reads from CacheSeq/CacheTable in compile-time proc or template and call it in the main nim file.
17:48:54*zaher_ quit (Ping timeout: 260 seconds)
17:50:03FromDiscord<jaar23> hi, i'm currently trying to learn with nim multithreading and locks, but i don't find any good example to get started. Appreciate if anyone could point me out where can i find it? ↵Thank you very much 😄
17:51:14*jmdaemon joined #nim
17:51:52FromDiscord<egomind> In reply to @bostonboston "You mean you don't": Especially in a language like TypeScript where errors aren't even reflected in the type system, so you can't know if something errors without checking source code or reading docs (presuming they mention it)
17:59:42*def- quit (Quit: -)
18:01:03*def- joined #nim
18:04:02*def- quit (Client Quit)
18:04:29*def- joined #nim
18:07:24*def- quit (Client Quit)
18:09:17*def- joined #nim
18:10:03*rockcavera joined #nim
18:27:23FromDiscord<michaelb.eth> In reply to @jaar23 "hi, i'm currently trying": maybe take a look at:↵https://github.com/Araq/malebolgia↵https://github.com/nim-lang/threading
18:40:50*cedb quit (Quit: WeeChat 4.0.2)
18:56:17NimEventerNew thread by ploxotnuj1: How to get information about .lnk(link) file extension?, see https://forum.nim-lang.org/t/10357
19:28:07*ced1 joined #nim
19:32:34*zaher_ joined #nim
19:35:35*junaid_ quit (Remote host closed the connection)
19:41:41*ntat quit (Quit: leaving)
19:42:15*_________ joined #nim
20:00:53*zaher_ left #nim (Leaving Channel)
20:37:18FromDiscord<nnsee> In reply to @turtlebasket "Go error handling is...": I like Go error handling. It makes you specifically handle each potential point of failure
20:38:24FromDiscord<nnsee> it's just a lot of `if err != nil {...}`
20:39:02FromDiscord<egomind> In reply to @nnsee "it's just a lot": Yeah, and that can feel kind of annoying when it's mostly just much of the same being repeated over and over
20:39:26FromDiscord<nnsee> sure
20:39:33FromDiscord<nnsee> I don't really mind it though
20:39:35FromDiscord<egomind> I don't really use Rust, but I've seen its error handling (or rather the surrounding utilities) and I find that a lot more elegant
20:39:48FromDiscord<egomind> Yeah, it's definitely not a big issue
20:39:51FromDiscord<egomind> If an issue at all
20:40:04FromDiscord<egomind> Just mildly displeasing sometimes
21:15:43FromDiscord<michaelb.eth> In reply to @egomind "Yeah, and that can": for those who want to use an "errors as values" approach to error handling in Nim, nim-results and questionable are worth a look, if you aren't aware of them already:↵https://github.com/arnetheduck/nim-results↵https://github.com/codex-storage/questionable
21:16:43FromDiscord<jviega> Just like many languages do more to automate Option[T] in nim (options), Rust also has Result[T] which automates "result or error" and helps make it easy to get static assurance about errors being handled
21:38:34*rockcavera quit (Read error: Connection reset by peer)
21:38:54*rockcavera joined #nim
21:38:54*rockcavera quit (Changing host)
21:38:54*rockcavera joined #nim
21:50:30FromDiscord<slymilano> Hey gang, did Nim rename itself? https://nim-works.github.io/nimskull/index.html
21:50:41FromDiscord<leetnewb> That's a fork
21:50:43FromDiscord<slymilano> Should've gone back to Nimrod!
21:50:51FromDiscord<slymilano> A fork? 🤔 why?
21:51:30FromDiscord<slymilano> found a HN thread thanks
21:51:35FromDiscord<slymilano> (edit) "found a HN thread ... thanks" added "about why"
21:51:39FromDiscord<leetnewb> sure, that should explain it better than I could
21:53:45FromDiscord<egomind> In reply to @slymilano "Should've gone back to":
21:53:51FromDiscord<egomind> I also liked that name better
21:54:04FromDiscord<egomind> I was so amazed when I learned there was a language named after Nimrod
21:54:05FromDiscord<egomind> So cool
21:54:17FromDiscord<egomind> Nim is still cool, but nothing beats Nimros
21:54:20FromDiscord<egomind> (edit) "Nimros" => "Nimrod"
22:05:55FromDiscord<etra> In reply to @michaelb.eth "for those who want": woah, questionable looks really cool!
22:12:49FromDiscord<slymilano> i thought nimrod was being cheeky that it was a language for nimrods (easy to read)
22:23:03*rockcavera is now known as Guest53
22:23:03*Guest53 quit (Killed (sodium.libera.chat (Nickname regained by services)))
22:42:35*jmdaemon quit (Ping timeout: 264 seconds)
22:42:39FromDiscord<intellij_gamer> Iirc it was named after king Nimrod (https://en.m.wikipedia.org/wiki/Nimrod).↵Hence the logo being a crown
23:04:23*jmdaemon joined #nim
23:06:52FromDiscord<turtlebasket> I wonder if this kind of flexibility is a good or bad thing for Nim↵(@etra)
23:09:04FromDiscord<turtlebasket> malleability is a double-edged sword, but the ability to do things like this is quite cool
23:23:13*rockcavera joined #nim
23:25:51*ced1 is now known as cedb