<< 20-01-2019 >>

00:08:32*quipa quit (Read error: Connection reset by peer)
00:17:28*theelous3 joined #nim
00:17:30FromGitter<irskep> Anyone got a sec to help me debug a compile-time issue? I'm getting an error from the C compiler on code that looks correct in Nim.
00:17:35FromGitter<irskep> https://github.com/irskep/raylibtest/blob/master/demo.nim
00:18:26FromGitter<irskep> I'm trying to use what looks like a half-baked C binding for a simple game dev library, but this part doesn't look problematic to me at all
00:22:51FromGitter<irskep> Don't be scared by the source link, it's short and contains (I hope) all relevant info including the error message :-)
00:23:56*theelous3 quit (Ping timeout: 250 seconds)
00:25:18FromGitter<irskep> Specifically, I don't understand why `camera.begin_mode3D()` is being compiled to `BeginMode3D((&camera_blahblah))`, since `camera` is not a reference type and shouldn't need the &
00:27:59FromDiscord_<exelotl> irskep: maybe Camera3D type definition needs the {.bycopy.} pragma?
00:29:04FromDiscord_<exelotl> I noticed that the latest c2nim always adds that to my structs
00:32:16*oculuxe joined #nim
00:34:20*oculux quit (Ping timeout: 250 seconds)
00:34:36FromGitter<irskep> @exelotl it at least compiles now! thanks! :-)
00:35:09FromDiscord_<exelotl> oh cool :D
00:37:53*oculux joined #nim
00:38:13*oculuxe quit (Ping timeout: 244 seconds)
00:43:10FromGitter<irskep> Looks like I'll be forking the wrapper library and giving it some love
00:46:02shashlickWhich library is this
00:54:31FromGitter<irskep> https://github.com/Skrylar/raylib-nim
00:54:44FromGitter<irskep> I'm working my way through these examples and porting them to nim https://www.raylib.com/examples.html
00:59:06FromDiscord_<demotomohiro> struct types are usually passed as pointer to function in C language because it is usually faster than pass by value
00:59:09FromDiscord_<demotomohiro> https://github.com/raysan5/raylib/blob/0d2cfce18edf8016b7ff865aafab25ee7a352507/src/raylib.h#L875
01:00:10FromDiscord_<demotomohiro> But raylib pass struct Camera3D by value in BeginMode function
01:03:05*cspar quit (Ping timeout: 268 seconds)
01:03:53*cspar joined #nim
01:05:25*secondchoice joined #nim
01:09:26*s3govesus quit (Ping timeout: 250 seconds)
01:11:22*theelous3 joined #nim
01:17:54rayman22201Use nimterop! it's better than c2nim!
01:25:45*cspar quit (Ping timeout: 244 seconds)
01:27:10*darithorn joined #nim
01:31:14*zachk quit (Quit: Leaving)
01:33:05shashlickWorth checking how nimterop performs with raylib
01:40:38*seni joined #nim
01:54:04*oculux quit (Ping timeout: 250 seconds)
01:56:44FromGitter<irskep> Good thought, I hadn't heard of it. I'll look at some point soon; for now more interested in how raylib works than diving into nim c bridging again :-)
02:00:14FromGitter<irskep> I also need to somehow smush the raylib and glfw packages together, because raylib vendors in glfw
02:03:20FromGitter<zacharycarter> I wonder how much zengine differs from raylib now
02:03:30FromGitter<zacharycarter> when I wrote it - there wasn't much parity b/w the two
02:03:46FromGitter<zacharycarter> but I know raylib has been continually worked on - so I'm guessing it has more features than when I stopped working on zengine
02:04:36FromGitter<zacharycarter> then again - there issues with raylib that the author wasn't even aware of
02:05:14FromGitter<zacharycarter> clued him into them when they were found in the ported code base - and then we referred to the OGL specs and found out raylib's code was incorrect
02:05:16*lritter joined #nim
02:05:32FromGitter<irskep> Honestly, I'll always opt for things that are actively maintained over things that fixed certain bugs at some point
02:05:55FromGitter<zacharycarter> but correcting it broke other things - and then shortly after I decided I wanted to not work on the project any more in favor of something more robust eventually
02:06:12FromGitter<zacharycarter> I'm not advocating you ditch raylib :P I'm just thinking out-loud :)
02:06:24FromGitter<irskep> I only want it for simple 2D stuff anyway
02:06:35FromGitter<zacharycarter> it wasn't a minor bug - it was actually quite deep in the OpenGL rendering code
02:06:57FromGitter<zetashift> Think raylib shines more in the docs/samples than most other simple frameworks like SFML or love2d
02:07:20FromGitter<zacharycarter> probably
02:07:41FromGitter<irskep> that's a pretty big factor for me, just trying to get stuff running. I've used tons of libraries like this so I just want to get past the how-to and get going.
02:07:43FromGitter<zacharycarter> I'm not much interested in 2d graphics these days - but there is no doubt a slew of options
02:07:53*oculux joined #nim
02:08:01FromGitter<zacharycarter> raylib is probably NOT the best option then - if that's your goal
02:08:09FromGitter<irskep> it's going pretty well so far...
02:08:20FromGitter<zacharycarter> I'm just saying - there are higher level libraries
02:08:32FromGitter<irskep> with good nim bindings? :-)
02:08:33FromGitter<zacharycarter> that are much better tested / more widely used - than raylib
02:08:35FromGitter<zacharycarter> sure
02:08:44FromGitter<zacharycarter> have you checked out Nimgame?
02:08:48FromGitter<zacharycarter> or Nimgame 2 I guess?
02:08:54FromGitter<zetashift> nimgame2 and godot are the only ones I can think of
02:09:02FromGitter<zetashift> and godot isn't even a library
02:09:05FromGitter<zacharycarter> well - Godot isn't simple
02:09:07FromGitter<irskep> readme: "Deprecaded since sdl2 came out. Still works and could be used for reference, though."
02:09:16FromGitter<zacharycarter> yeah - try Nimgame2
02:09:24FromGitter<irskep> deeper googling: https://vladar4.github.io/nimgame2/
02:09:30FromGitter<zetashift> https://github.com/Vladar4/nimgame2
02:09:37FromGitter<zacharycarter> https://vladar4.github.io/nimgame2/index.html
02:09:40FromGitter<zacharycarter> haha
02:10:04FromGitter<zetashift> it's all in Nim and the samples are great, I tried some stuff in it!
02:10:06FromGitter<zacharycarter> @irskep - please don't get me wrong - raylib is fantastic
02:10:09FromGitter<zacharycarter> but it is not high level
02:10:20FromGitter<irskep> I know :-) I don't actually need "high-level," I need "simple"
02:10:25FromGitter<zacharycarter> you'll end up re-implementing a lot of stuff other already existing libraries do for you
02:10:30FromGitter<irskep> so seeing this cheatsheet made me really happy https://www.raylib.com/cheatsheet/cheatsheet.html
02:10:56FromGitter<zacharycarter> well - raylib's API is akin to XNA's
02:11:02FromGitter<zacharycarter> and people loved XNA for its simplicity
02:11:09FromGitter<irskep> I'm the kind of person who wants to redo a lot of things anyway
02:11:22FromGitter<zacharycarter> maybe you should work on a game engine with me ;P
02:11:35FromGitter<irskep> nope, I have a rule: no hobby projects that come with long term commitments
02:11:38FromGitter<zacharycarter> or maybe you don't want to re-do THAT many things haha
02:11:41FromGitter<irskep> g2g, I'll be back later :-)
02:11:50FromGitter<zacharycarter> o/ cya later
02:12:54*secondchoice quit (Read error: Connection reset by peer)
02:14:17FromGitter<zacharycarter> @zetashift - I'm excited :D about to boot up my new PC
02:15:51*theelous3 quit (Ping timeout: 268 seconds)
02:29:14FromGitter<zetashift> @zacharycarter nice!! always sweet
02:32:26FromGitter<zacharycarter> I wish I had the RGB header cable(s) I need - the pictures would be better
02:32:27FromGitter<zacharycarter> doh well
02:40:06*NimBot joined #nim
02:45:50*Tyresc quit (Quit: WeeChat 2.4-dev)
03:09:02*banc quit (Ping timeout: 250 seconds)
03:11:10FromDiscord_<exelotl> irskep: wow a rule like that would have saved myself and those around me from a lot of disappointment over the years xD
03:15:54*dddddd quit (Remote host closed the connection)
03:26:22*abm quit (Ping timeout: 250 seconds)
03:26:45FromGitter<zacharycarter> https://imgur.com/a/zRK3aAg
03:37:57*lritter quit (Ping timeout: 246 seconds)
03:38:56*lritter joined #nim
03:42:57*leorize quit (Read error: Connection reset by peer)
03:46:32*leorize joined #nim
04:03:04*seni quit (Ping timeout: 272 seconds)
04:15:06*d10n joined #nim
04:15:41d10nHey, it has been a while since I did something with Nim and I noticed a forum post asking for opinions about style insensitivity
04:17:38d10nI prefer not to write a post but I have some thoughts
04:20:06d10nstyle insensitivity may make simple tools like grep harder to use. Case insensitivity can be user-friendly in some cases but I would not intuitively expect foo_bar to be the same as foobar
04:21:34leorizeI expect it to be the same as fooBar :P
04:22:22leorizeI've been spoiled by early versions of Nim :P
04:23:50d10nIf there was a way to enforce style consistency despite having style insensitivity I think that would make Nim much more appealing or easier to sell to a team
04:24:15leorize--styleCheck:error
04:24:28leorize^ that's a new flag for the compiler :)
04:25:17d10nawesome I will have to try it out
04:27:09d10nI might suggest making it default if it isn't already. Lots of languages have lots of useless noise like 'use strict', Option Strict, set -euo pipefail, use warnings
04:27:52leorizeyou can put it in the global config file
04:29:08leorizeor the project-wide config file
04:29:57d10nminimizing configuration required to get a preference most people will have is ideal. I guess the question is how much of the general population that wants a language like Nim also wants stricter defaults
04:30:13leorizewell, styleCheck enforces NEP1
04:30:50leorizeand some people might not like NEP1 identifiers
04:33:02d10nI don't know about NEP1 yet but whatever it suggests will become my preference for Nim. The fewer style debates the better
04:34:55d10nPython lets you mix tabs and spaces but if it enforced spaces then there would be less hair pulling
04:35:09leorizehttps://nim-lang.org/docs/nep1.html
04:37:54FromGitter<gogolxdong> ocasinally occurs [Warning] WS negotiation failed: the only supported sec-websocket-version is 13 ⏎ ../../usr/local/Nim/lib/system.nim(3011) sysFatal ⏎ ../../usr/local/Nim/lib/pure/asyncfutures.nim(308) read ⏎ ../../usr/local/Nim/lib/pure/asyncfutures.nim(355) :anonymous ⏎ Error: unhandled exception: /usr/local/Nim/lib/pure/ioselects/ioselectors_epoll.nim(196, 11) ` ...
04:37:54FromGitter... [https://gitter.im/nim-lang/Nim?at=5c43fb22f780a1521f3b0178]
04:41:06d10nI think a good summary of my thoughts is that I prefer to reduce bikeshedding, minimize configuration and operational overhead required for conventional projects, and facilitate integration with tooling
04:41:51d10nI'd like to read more peoples' opinions
04:42:10leorizeyou can read that thread in the forums :P
04:42:22leorizepeople are mostly asleep at this time of day
04:42:22d10nyep, short thread though :(
04:55:23rayman22201Style insensitivity has been discussed to death:
04:55:23rayman22201https://forum.nim-lang.org/t/4483
04:55:23rayman22201https://forum.nim-lang.org/t/4388
04:55:23rayman22201https://github.com/nim-lang/Nim/issues/9980
04:55:23rayman22201many other places and irc logs I'm sure....
04:58:08*nsf joined #nim
04:58:09rayman22201What ever your opinion is on the matter, the fact remains, atm, there is no chance of style insensitivity going anywhere any time soon. Araq has shown that he is firm on this point many times.
04:58:41d10nwhat's your opinion?
04:58:58rayman22201Or I should say, nobody has yet given him a convincing enough argument to change it :-P
05:02:33d10noh I was skipping right over the "load more posts" links
05:02:35rayman22201My opinion doesn't matter. As you said, "I prefer to reduce bikeshedding". I think Nim is a great language with or without style insensitivity.
05:04:00d10nbikeshedding stops once the bike shed is my favorite color though
05:04:03d10n:)
05:04:05rayman22201lol. fair enough. I could see how the load more posts link could be easily missed.
05:05:09rayman22201lol
05:44:07*darithorn quit (Quit: Leaving)
06:40:58*rockcavera joined #nim
06:46:43*vlad1777d joined #nim
06:54:38*narimiran joined #nim
07:51:19*hoijui joined #nim
07:51:31*hoijui quit (Remote host closed the connection)
07:54:41*zyklon joined #nim
08:00:00*gmpreussner quit (Quit: kthxbye)
08:04:32*gmpreussner joined #nim
08:40:43FromGitter<Bennyelg> Hey, How can I pass ⏎ seq[JsonNode] as a key to json object ⏎ ⏎ ```SUCCESS_200.add("content", parseJson(students))``` [https://gitter.im/nim-lang/Nim?at=5c44340bf780a1521f3c38cd]
08:43:45*banc joined #nim
08:48:14Araqkeys must be string.
08:49:23Araqobj["content"] = parseJson(students)
08:49:34Araqis I think what you're looking for.
08:59:53*cspar joined #nim
09:10:37*nsf quit (Quit: WeeChat 2.3)
10:10:38leorizeAraq: what do you think about this? https://github.com/nim-lang/Nim/pull/10361#issuecomment-455748732
10:16:15*vlad1777d quit (Ping timeout: 246 seconds)
10:18:54*seni joined #nim
10:25:37*aguspiza joined #nim
10:26:14*cspar_ joined #nim
10:26:47*cspar quit (Ping timeout: 240 seconds)
10:27:59Zevv!eval echo "test"
10:28:00NimBotCompile failed: <no output>
10:28:49*nsf joined #nim
10:39:03*stefanos82 joined #nim
10:52:15*cspar joined #nim
10:52:47*cspar_ quit (Ping timeout: 240 seconds)
10:56:36*cspar quit (Ping timeout: 250 seconds)
11:01:36FromGitter<Bennyelg> @Araq students is typed `var students: seq[JsonNode] = @[]` doing `let studentsContent = parseJson(students)` results `proc parseJson(buffer: string): JsonNode ⏎ proc parseJson(s: Stream; filename: string = ""): JsonNode ⏎ ⏎ expression: parseJson(students)` ⏎ should I parse it to string first ? [https://gitter.im/nim-lang/Nim?at=5c44551020b78635b65287ef]
11:02:03FromGitter<Bennyelg> this works `parseJson($students)`
11:24:07*ng0 joined #nim
11:24:29*Vladar joined #nim
11:31:23Araqseq[JsonNode] makes little sense, better is a JsonNode that is a JArray
11:32:41FromGitter<Bennyelg> How I define JArray like so
11:35:09Araqvar students = newJArray() iirc
11:35:24Araqstudents.add jsonStudent
11:35:58*enow joined #nim
11:36:41enownot sure if anyone sympathises with my HTML VNC clone, but I got mjpeg streming up and running, with a partial libjpeg binding
11:37:36FromGitter<Bennyelg> @Araq thanks! now it's make sense!
11:39:18*vonHabsi__ joined #nim
11:40:06*vonHabsi1 joined #nim
11:40:43*vonHabsi quit (Ping timeout: 246 seconds)
11:41:37*vonHabsi_ quit (Ping timeout: 244 seconds)
11:47:23FromGitter<Bennyelg> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5c445fcb95e17b45257eb4f7]
11:48:35FromGitter<Bennyelg> heterogeneous types not supported ?(means only string? )
11:49:08FromGitter<Bennyelg> oh the Datetime was doing the trouble :/
12:01:39*nsf quit (Quit: WeeChat 2.3)
12:03:48*narimiran quit (Ping timeout: 245 seconds)
12:42:05*Yardanico quit (Quit: No Ping reply in 180 seconds.)
12:43:31*Yardanico joined #nim
13:29:56*narimiran joined #nim
13:41:41*nsf joined #nim
13:50:40*zyklon_ joined #nim
13:52:08*zyklon quit (Ping timeout: 245 seconds)
13:54:26*Vladar quit (Remote host closed the connection)
14:03:48FromGitter<zacharycarter> I'll look into fixing the playground later today - need to figure out what happened first. Got an e-mail from someone saying they ran `while true: discard ⏎ fork()`
14:04:10FromGitter<zacharycarter> but now apparently, the service I had installed on the box, doesn't exist
14:04:33FromGitter<zacharycarter> by service - I mean the nim-playground.service I had created with systemd
14:05:30FromGitter<zacharycarter> I guess I'll have to disable forking of processes somehow
14:16:28FromGitter<deech> Hi, `nimble`'s `before` hook doesn't seem to be working as documented, I have: ⏎ ⏎ ```before build: ⏎ echo "before build"``` ⏎ ⏎ in my `nimble` file and doing `nimble build` doesn't seem to invoke it. [https://gitter.im/nim-lang/Nim?at=5c4482bccb47ec30007332a2]
14:18:04FromGitter<deech> This is with `nimble` built with `koch tools` so presumably from `master`.
14:19:53FromGitter<timotheecour> @zacharycarter here’s a better way to prevent fork bombs wo disbling forking of processes: https://www.cyberciti.biz/tips/linux-limiting-user-process.html
14:20:47FromGitter<timotheecour> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5c4483be83189945241cf619]
14:21:33leorizeit doesn't really work in this case imo
14:21:33*zyklon_ quit (Read error: Connection reset by peer)
14:21:43leorizebecause every process will run with that user
14:22:04leorizea fork bomb might not be able to bring down the system, but that user would still be useless
14:22:28FromGitter<zacharycarter> thanks - I can try a few things
14:22:28FromGitter<timotheecour> ok so it’s still an improvement over crashing the system
14:22:35FromGitter<timotheecour> could we use a user pool ?
14:22:43FromGitter<zacharycarter> what I'm confused by is this - why is the service no longer present on the box...
14:22:48FromGitter<zacharycarter> I didn't ssh in and delete it or anything
14:23:13leorizeor you could just put them in a cgroups
14:23:20leorizethen limit nproc there
14:23:30leorizeafter a set amount of time kill the cgroup
14:24:22FromGitter<timotheecour> btw u prob wanna limit other things too (again, see https://www.unixmen.com/fork-bomb-can-prevent-danger/)
14:28:05FromGitter<timotheecour> @zacharycarter can each user run inside a docker container? then each is isolated, and docker has a prevention against fork bombs via:
14:28:07FromGitter<zacharycarter> I was limiting some things through docker - but I'll have a look at that later this afternoon
14:28:08FromGitter<timotheecour> `But, Docker 1.11 introduced a "--pid-limits" option which limits the number of processes on the container to protect from the fork bomb**.`
14:28:14FromGitter<zacharycarter> potentially
14:28:43FromGitter<zacharycarter> somehow the nim-playground.service file got destroyed - it's no longer in /etc/systemd/system
14:29:06FromGitter<zacharycarter> so I'm going to have to re-create it and figure out what all needs to go in it
14:29:15FromGitter<zacharycarter> I'll work on it this afternoon - I don't have time this morning
14:29:34leorizeso how's the playground still running w/o that service?
14:30:00FromGitter<zacharycarter> it's not
14:30:11FromGitter<zacharycarter> it's been down since it got hit with the fork bomb
14:30:22leorize!eval echo "hello, world!"
14:30:23NimBotCompile failed: <no output>
14:30:25FromGitter<zacharycarter> guy said he did it on friday
14:30:30leorizesame for our bot :P
14:30:32FromGitter<zacharycarter> that's the Nim bot - Nim bot != nim playground
14:30:33FromGitter<zacharycarter> yeah
14:30:37FromGitter<zacharycarter> but it uses the playground
14:30:53FromGitter<timotheecour> just to clarify: currently each user didn’t run inside a docker container, correct?
14:31:20FromGitter<zacharycarter> every request ran inside of a docker container
14:31:46leorizedo you have a timeout for them?
14:31:47FromGitter<timotheecour> separate one for each user?
14:31:56FromGitter<zacharycarter> https://github.com/zacharycarter/nim-playground/blob/master/src/nim_playground.nim#L65
14:32:06FromGitter<zacharycarter> I don't know what you mean by each user
14:32:21FromGitter<zacharycarter> I'm not messing with system users in any capacity
14:32:24*dom96_ joined #nim
14:32:38FromGitter<zacharycarter> yes there is a timeout
14:32:39dom96_May want to check if your server got pwned
14:33:02FromGitter<zacharycarter> well - some files appear to still be there
14:33:06dom96_As in someone was able to reverse tunnel into your server and delete your services
14:33:11dom96_And god knows what else
14:33:13FromGitter<timotheecour> each user as in each logged in user
14:33:45leorizetimotheecour: I don't think he needs that
14:34:12leorizeeverytime you clicked "Run" a new container is spawn if I understand correctly
14:34:18dom96_Also. Are you sure docker doesn’t protect against fork bombs?
14:34:41FromGitter<zacharycarter> Off the top of my head I'm not sure
14:34:43FromGitter<timotheecour> it does, via the newish options `--pid-limits`
14:34:54FromGitter<zacharycarter> well yeah - there's that too
14:35:00FromGitter<timotheecour> so that seems like an easy thing to try
14:35:01FromGitter<zacharycarter> as @timotheecour pointed out earlier
14:35:11dom96_In any case, we’ll be loving the playground to our servers soon
14:35:31dom96_*moving
14:35:36leorizedom96_: can you fix NimBot?
14:36:17FromGitter<zacharycarter> dom96_: are you guys just building a new version or something? I spoke with PMunch a few weeks ago regarding handing it over to him
14:36:23FromGitter<zacharycarter> but we were waiting for you to be available
14:36:24FromGitter<timotheecour> > everytime you clicked "Run" a new container is spawn if I understand correctly ⏎ ⏎ why not use 1 per user instead of 1 per “run” (eg using a cookie to identify user) ; would make it more efficeint
14:36:27FromGitter<zacharycarter> but if something is already in the works....
14:36:51leorizetimotheecour: because you'd want timing out
14:37:20leorizealso containers are lightweight so there shouldn't be much problem spining them up rapidly
14:37:43FromGitter<timotheecour> well u can also do timing out, doesn’t seem hard conceptually
14:38:30leorizeit's still hard, you'd want to kill every spawned processes
14:38:36leorizeeither you do docker-in-docker
14:38:41*zyklon_ joined #nim
14:38:41*dom96__ joined #nim
14:38:44leorizeor hack up your own cgroups-based solution
14:38:55dom96__leorize: fix what?
14:39:05leorize!eval echo "hello"
14:39:05NimBotCompile failed: <no output>
14:39:09leorize^ that
14:39:23leorizesomeone on IRC ran a fork bomb here as well
14:39:38FromGitter<zacharycarter> nimbot uses the playground
14:39:44FromGitter<zacharycarter> so if pg is down - nimbot won't work
14:40:11*dom96_ quit (Ping timeout: 256 seconds)
14:42:36FromGitter<zacharycarter> looks like someone was def brute forcing the box
14:43:31FromGitter<zacharycarter> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5c448912c45b986d118f01c0]
14:43:35*dom96__ quit (Ping timeout: 256 seconds)
14:44:05leorizeI believe you used pubkey auth, yes?
14:45:26FromGitter<zacharycarter> I don't know if I ever set that up for this droplet
14:45:54FromGitter<zacharycarter> anyway - I need to go run some errands and take the dog for a walk, I'll work on re-creating the droplet this afternoon
14:51:13FromGitter<deech> So I see the reason I'm not able to add a `before` hook to `build` is because `build` is built-in and not a `task` in the same sense as `task foo, "...": ...`, so I guess my question becomes how do I wrap a `build` in my `.nimble` file?
14:53:09FromGitter<zacharycarter> DO will let me rebuild the droplet with the same IP
14:53:24FromGitter<zacharycarter> so we don't have to mess with any networking rules - I'll try to secure it better this time, and will report back with what steps I take
14:53:33FromGitter<zacharycarter> I'm not, and don't pretend to be, a sys admin
14:54:01FromGitter<zacharycarter> so help in this area will be useful once I've got something that we can secure :)
14:57:18FromGitter<deech> The hackiest way seems to be to invoke `nimble build` from the task itself but I'm hoping there's a better way.
15:02:44*Geezus42 quit (Ping timeout: 250 seconds)
15:03:11FromGitter<zacharycarter> @deech - I think that's how I've usually done it before
15:03:18FromGitter<zacharycarter> I basically make a new task and then call build from it
15:03:25FromGitter<zacharycarter> and make that my "new build task"
15:04:10*skellock joined #nim
15:04:33*Geezus42 joined #nim
15:09:12*Geezus42 quit (Ping timeout: 246 seconds)
15:21:11Calinouthere's a Nim project in /trending at the bottom! https://github.com/trending
15:21:54FromGitter<zacharycarter> \o/
15:22:01FromGitter<zacharycarter> wasn't even aware of pipelines - looks neat!
15:25:52ZevvHas anyone ever tried targeting the Nim compiler itself to JS?
15:25:53*Geezus42 joined #nim
15:26:31Zevvzacharycarter: btw, pleased to meet you. Ico here
15:26:41FromGitter<deech> @zacharycarter Thanks!
15:26:51FromGitter<zacharycarter> Likewise Zevv :D I didn't realize it was you :)
15:27:00FromGitter<zacharycarter> @deech - no problem bud!
15:27:49FromGitter<deech> How does passing a command line flag to `nimble` work? I have this in my `.nimble` file: ⏎ ⏎ ```when defined(foo): ⏎ echo "foo is defined"``` ⏎ ⏎ and I invoked `nimble` with `nimble build -d:foo` but I don't see the echo output. [https://gitter.im/nim-lang/Nim?at=5c449375f780a1521f3e8793]
15:35:40*lritter quit (Ping timeout: 268 seconds)
15:42:49*dddddd joined #nim
15:44:12dom96Disabling password auth is like the first thing you do :(
15:47:25dom96deech: hrm, IIRC `before build` should work.
15:48:47FromGitter<deech> dom96: It doesn't seem to, this is `nimble` built from `master` as of a couple of hours ago: ⏎ ⏎ ```before build: ⏎ echo "before build"``` [https://gitter.im/nim-lang/Nim?at=5c44985fdab15872cec4be25]
15:50:39FromGitter<deech> dom96: Also how do I check whether a flag has been passed in, eg. `-d:foo`? `when defined(foo): ...` does not seem to work and I can't find a function that retrieves flags in the nimscript docs. https://nim-lang.org/docs/nimscript.html
15:51:04dom96You can't do that right now I'm afraid
15:51:46dom96Looks like there is a test for `before install` but nothing for `build` https://github.com/nim-lang/nimble/blob/master/tests/nimscript/nimscript.nimble#L48
15:51:49dom96Please make an issue
15:52:43FromGitter<deech> Should I also make an issue for getting defined flags or is that out of scope for near future?
15:53:01*zyklon_ quit (Read error: Connection reset by peer)
15:56:56dom96Yeah, make an issue for that too. Could have sworn it already exists but can't find it
16:01:52*darithorn joined #nim
16:03:11FromGitter<deech> Done.
16:09:39*abm joined #nim
16:10:31*zyklon_ joined #nim
16:11:42narimiran"/home/miran/.choosenim/toolchains/nim-0.19.2/lib/pure/parseutils.nim(1, 2) Error: module names need to be unique per Nimble package; module clashes with /home/miran/Documents/programming/nim/Nim/lib/pure/parseutils.nim" !?!
16:13:56shashlickI've been looking into Linux binary builds for nightlies
16:14:20shashlickDoes anyone know how to include binaries into koch xz
16:14:44shashlickI tried updating installer.ini but it didn't work
16:15:47FromGitter<zacharycarter> Dom96: as I said, I dont maintain linux boxes or servers...
16:16:14Zevvhehe blame game on the playground hack :)
16:16:50FromGitter<zacharycarter> Its not an area Im knowledgable in
16:16:51Zevvnoone likes system administration
16:17:19dom96Digital Ocean has multiple awesome guides that explain step by step how to set up servers
16:18:15FromGitter<zacharycarter> Well I will refer to more of them this time around.
16:19:01Zevvi suggest retricting all but the required syscalls on execution.
16:19:16Zevvif it comes back up and allows networking I'll start a spambot
16:19:37*leorize quit (Quit: WeeChat 2.3)
16:19:47*leorize joined #nim
16:19:52Zevvbut i'll donate my earning to araq
16:22:44FromGitter<zacharycarter> It never allowed networking to my knowledge
16:23:45Zevvtoo bad :)
16:24:08Zevvon the serious note: if there is anything I can do to help
16:26:20FromGitter<zacharycarter> I appreciate it - once I have things set up Ill ask for some feedback
16:26:30Zevvok
16:26:54FromGitter<zacharycarter> Should be later this afternoon
16:34:43*aguspiza quit (Ping timeout: 246 seconds)
16:42:26*couven92 quit (Quit: Client disconnecting)
16:46:08shashlickIf anyone can help with niminst / installer / xz, please ping
16:47:23*vlad1777d joined #nim
16:52:08*Geezus42 quit (Ping timeout: 244 seconds)
16:54:00*Geezus42 joined #nim
16:54:01*zyklon_ quit (Read error: Connection reset by peer)
17:08:50*Geezus42 quit (Ping timeout: 250 seconds)
17:10:31*zyklon_ joined #nim
17:11:23*Geezus42 joined #nim
17:14:18*Trustable joined #nim
17:15:07*darithorn quit (Read error: Connection reset by peer)
17:28:35FromGitter<alehander42> The compiler is strongly based on files and
17:35:34*PMunch joined #nim
17:51:04FromGitter<zetashift> damn finally got godot-nim to compile on latest devel
17:51:26skellock\o/
17:51:30*PMunch quit (Excess Flood)
17:51:55*PMunch joined #nim
17:52:35PMunchzetashift, nice!
17:56:37*vlad1777d quit (Ping timeout: 246 seconds)
18:10:00FromGitter<zetashift> main bulk of errors was solved by bluenote's I just had 2 other macro errors to solve
18:22:22shashlickany linux users here? want to test out a nightly binary build of linux
18:22:56shashlickbuilt using holy build box, want to see if it works on different linux versions
18:23:54enowshashlick: yeah I'm on linux
18:24:19enowUbuntu 18.04 to be specific
18:24:51shashlickok that's what I have too 😄
18:25:11Zevvshashlick: I have access to a dozen different dists and versions I think
18:25:55Zevvmake that half a dozen, to be on the safe side
18:27:08Zevvwe have some kind of server farm thingy at my customer on site where I can spin vm boxes of all flavours
18:27:35shashlickoh nice
18:27:44shashlicki need to clean up some more stuff, will post a link shortly
18:27:53shashlickbased on 1/20 nightly build
18:28:19Zevvok, Ill try some this evening, otherwise tomorrow morgning
18:29:25FromGitter<irskep> followup from yesterday: I tried importing raylib with nimterop and it's not going very well
18:29:43shashlickwhat issues are you seeing?
18:30:17*hoijui joined #nim
18:30:17FromGitter<irskep> 1) it defines an anonymous struct that nimterop can't handle (`typedef struct MusicData *Music`)
18:30:38FromGitter<irskep> 1) it imports stdarg.h but nimterop doesn't seem to actually recurse into that header even if I ask it to, so I get an 'undeclared identifier' later on
18:31:42FromGitter<irskep> my code: https://gist.github.com/irskep/546ea1dd2525f166d0026160468f8273
18:31:48*aguspiza joined #nim
18:31:54FromGitter<irskep> the header: https://github.com/raysan5/raylib/blob/master/src/raylib.h
18:31:56shashlickcool, both are known
18:32:07shashlickso #1 is not yet supported
18:32:30shashlickhold on, it's just a typedef, let me check that
18:32:43shashlick#2 - it is intentional not to recurse into standard libraries
18:32:50shashlickwhich symbol is being missed?
18:32:54FromGitter<irskep> va_list
18:33:00FromGitter<irskep> thanks for your help btw!
18:33:10shashlickyes that is also known, i have no idea what that should translate into
18:35:37FromGitter<irskep> In the c2nim wrapper for this library, the MusicData struct ends up as `Music* {.importc, incompleteStruct.} = object`
18:35:53shashlickwell, MusicData isn't defined in the file at all
18:36:52shashlicka workaround is to add a type MusicData {.import.} = object at the top of your nim file
18:37:53FromGitter<irskep> that doesn't compile, unless I'm missing something obvious. my nim experience is still pretty small. `Error: expression expected, but found 'keyword import'`
18:38:08FromGitter<zacharycarter> `importc`
18:38:12FromGitter<zacharycarter> not `import`
18:38:23FromGitter<irskep> :-) thought of it just as I finished typing
18:38:30shashlickyep sorry 🙂
18:38:34FromGitter<zacharycarter> she's purty
18:38:34FromGitter<zacharycarter> (https://files.gitter.im/nim-lang/Nim/v2EL/3863675606325646862.jpg)
18:38:51FromGitter<irskep> Is there any way around the va_list issue?
18:38:51shashlickso MusicData is defined in raudio.c so best to put in that line
18:39:44FromGitter<zacharycarter> yes
18:39:48shashlickso only proc that uses va_list is TraceLogCallback - if you don't intend using that, you can simply do type va_list = object and call it a day
18:39:50FromGitter<zacharycarter> there is a way around the va_list stuff
18:40:13shashlick@zacharycarter - if you know how va_list translates to nim, i can implement that in nimterop
18:40:34FromGitter<zacharycarter> https://github.com/zacharycarter/bgfx.nim/blob/0cd707680a9ee17dd024e42521766832dac451f9/bgfxdotnim.nim#L15
18:40:41FromGitter<irskep> if I wnated to use TraceLogCallback I suppose I could simply write it in C :-)
18:40:41FromGitter<zacharycarter> see if that will work for you?
18:41:07FromGitter<irskep> Certainly for now! if I hit a wall later then I will have more interesting problems
18:41:09FromGitter<irskep> thanks!
18:41:20FromGitter<zacharycarter> it's worked for me in using BGFX for a while now - I think Andreas originally helped me with it
18:41:22FromGitter<zacharycarter> years ago
18:41:32FromGitter<zacharycarter> np! glad to help!
18:41:47shashlick@zacharycarter - but how do you use those procs? what's va_list - an array of cstring?
18:41:58FromGitter<zacharycarter> I can find examples
18:41:59FromGitter<zacharycarter> one sec
18:42:22FromGitter<zacharycarter> oh - you'd just cast it to a va_list
18:42:37FromGitter<zacharycarter> also - I'm guessing I should have a `bycopy` included in the pragma
18:43:08FromGitter<zacharycarter> so when calling the proc, the va_list parameter would be - `castva_list (param)`
18:43:23FromGitter<zacharycarter> and that should be fine - however please rename va_list to your liking
18:43:56shashlickwhat would param be in nim?
18:44:58shashlickit looks like va_list would only exist at compile time
18:46:14FromGitter<zacharycarter> why would it only exist at CT?
18:46:48FromGitter<zacharycarter> I see your point though regarding the Nim type
18:47:53FromGitter<zacharycarter> shashlick, @irskep : just found this - https://github.com/judofyr/bob/blob/20c6dcbf59ae41410256bdf81e1a4362d423df47/bobpreload.nim#L175-L200
18:47:58FromGitter<zacharycarter> seems like it would work, but it's fugly
18:48:00shashlickit say macro all over the place so I'm wondering what it really is at runtime
18:48:56FromGitter<zacharycarter> this is why I really hope nimterop succeeds
18:49:10FromGitter<zacharycarter> because w/ languages like Zig - these things aren't headaches
18:49:19shashlickok so as far as nimterop is concerned, all i have to do is declare that type and walk away
18:49:29FromGitter<zacharycarter> assuming the ABI is already supported - which in many cases it isn't - Zig isn't a panacea either
18:49:32FromGitter<irskep> nimterop is working OK for me so far, but if I put more code in the same nim file as the cimport, vscode doesn't see any of the imports :-(
18:49:38shashlickif you want to use va_list, you have to generate the appropriate C code
18:49:43FromGitter<zacharycarter> seems like it
18:49:50FromGitter<zacharycarter> but that isn't very ergonomic
18:50:10shashlicksuch is life, if you want C, you have to interface with it
18:50:23shashlicki'll bet zig also has to deal with this preprocessor grade stuff
18:50:26FromGitter<zacharycarter> and I suppose this is why LLVM is an increasingly more attractive option
18:50:29*abm quit (Quit: Leaving)
18:50:51FromGitter<zacharycarter> well, it does I'm sure - but with the LLVM backend it doesn't have such a large splash on userland
18:50:58FromGitter<zacharycarter> like Nim's C interop does
18:51:04shashlick@irskep: i think you'd do one of two things - simply import this file in your main code or generate a static file with toast and import that
18:51:07FromGitter<zacharycarter> then again - Zig can't touch C++ code - so I suppose there are tradeoffs
18:51:34shashlickif you want to see the generated nim code, you will have to do the latter
18:51:46FromGitter<irskep> Easy enough to wrap it in its own nim file :-)
18:52:10shashlicki believe you would rather refer to the C code headers, documentation and examples
18:52:15AraqC interop is always a headache if you seek to improve over C.
18:52:50shashlickso don't see the point in caching the nim file, but there are others who prefer that method so both are possible
18:53:06FromGitter<zacharycarter> yeah - I guess that's why Zig's approach is to try and replace C, rather than improve upon it
18:53:13shashlickhey Araq - please see my questions from earlier on koch xz
18:53:17FromGitter<zacharycarter> which in its own right, is quite ambitious
18:53:30AraqC's pointer: points to one, points to many, who knows? is it supposed to be an address on the stack, can I pass &s to char**. Nobody knows.
18:54:14ryukopostingThe problem with C interop is that pointer behavior lies in semantics
18:54:35FromGitter<zacharycarter> you forgot to do `/me appears out of thin air`
18:54:36FromGitter<zacharycarter> :P
18:54:41Araqthe problem is C's type system is absurdly underspecified
18:54:43shashlickwhat's a good place to share binary files
18:54:48FromGitter<zacharycarter> bintray?
18:55:04ryukopostingwhich means it interfaces extremely well with asm, and is very easy to translate into machine code for most architectures, but makes it very difficult to create higher level abstractions
18:55:05shashlickthat's paid right?
18:55:11shashlickneed a pastebin type service for binaries
18:55:33FromGitter<zacharycarter> I think so - not sure of non-enterprise offerings
18:55:42ryukopostingC's type system is very lacking, there are a lot of things that it could do without negating any of the language's strengths
18:55:50FromGitter<zacharycarter> I figured they had an OSS version - but I guess not :/
18:55:58*zyklon_ quit (Read error: Connection reset by peer)
18:56:04Araqoh not that again. C is NOT low level, it is not assembler like. C has a stack abstraction
18:56:06ryukoposting>zyklon_
18:56:09ryukopostingnow that's a name
18:56:35ryukopostingAraq I don't mean to say it's "low level"
18:57:43ryukopostingbut it's certainly less abstracted than most high-level languages
18:59:18*abm joined #nim
19:00:03FromGitter<irskep> I got the raylib "first person shooter" demo working! had to declare the color constants in nim, but no other hiccups. I am amazed.
19:01:04shashlickok anyone who has a linux, please try out this nim nightly build and see if it works - all binaries are already compiled so just need to run bin/nim
19:01:10shashlickhttp://www.filedropper.com/nim-0199-linuxx64tar
19:01:15ryukopostingon it
19:01:18Araqryukoposting: so what, its only merit is its good interop with the rest of the world because the rest of the world had to place nice with what the OS exposes
19:01:30Araq*play nice
19:02:31FromGitter<irskep> Is there a reason why my editor is still claiming all of the raylib symbols used in this file are undefined, even after I moved all the nimterop code to its own file? https://github.com/irskep/raylibtest/blob/master/src/raylib.nim
19:02:38*abm quit (Client Quit)
19:02:40dom96irskep: awesome, post about it on forum and/or reddit
19:03:13dom96The editor is probably failing to re-run `nim check`
19:03:16FromGitter<irskep> Soon - I want to get through more examples to find corners of the API that I'm missing
19:03:39dom96It really is a shame how bad that is, I mostly ignore it unless I'm working on a new project where it seems more reliable
19:03:45shashlick@irskep - cause none of the stuff from cimport is visible to vscode
19:03:58FromGitter<irskep> Weird, it autocompletes fine in another file
19:04:09ryukopostingit helps that its ABI is extremely simple, and that it doesn't make any sweeping assumptions about the underlying platform, e.g. heap as a userspace abstraction, architecture-defined integer widths (which do have weaknesses as well, yes)
19:04:11Araqrestart your editor, can help
19:04:28FromGitter<irskep> yep, restarting the editor worked
19:04:31Araqno no no. its ABI is not simple. Alignments are complex
19:04:44shashlickoh so even though you only have a cimport, everything is visible? that's nice!
19:04:45ryukopostingalignments are a pain in the ass, yeah
19:05:09Araqand let's not even go into its aliasing rules.
19:05:10shashlickdom96 - for OSX, if you build on travis, will the binaries work on any Mac?
19:05:29*Vladar joined #nim
19:05:55dom96Good question, I'm not too sure
19:06:02ryukopostingI guess my counterargument to both would be "find me a high-level language with a simpler ABI"
19:07:24Araqmaybe Fortran had one. Would you know?
19:07:39ryukopostingnot familiar enough with fortran to comment
19:08:19Araqwell *nowadays* Fortran has to interface with C, so it has to replicate its alignments etc etc
19:08:39Araqwhich is why the "simpler ABI" cannot exist anymore, anywhere.
19:08:52*leorize quit (Quit: WeeChat 2.3)
19:08:54ryukopostingfair enough
19:09:10*leorize joined #nim
19:09:16*nsf quit (Quit: WeeChat 2.3)
19:09:18ryukopostingwhy would fortran need to interface with C? not trying to be facetious, I'm genuinely curious
19:10:07ryukopostingsystem calls, I guess maybe
19:10:31Araqbecause people enjoy being able to call C libs from Fortran.
19:10:39AraqI don't understand your question.
19:10:58shashlickis there value in posting 32-bit binaries for linux?
19:11:00AraqC interop is part of the ISO standard.
19:11:07FromGitter<irskep> Found out why my editor keeps breaking: because the process that's supporting it can't find the header (I used a relative path)
19:12:01FromGitter<irskep> but finding the right incantation to fix it hasn't worked yet. looks like there's a magic value $projpath that the tests use, but it doesn't seem to work for me
19:13:08*zyklon_ joined #nim
19:13:20ryukopostingso ISO made a stupid decision (which is their MO honestly) or there's some kind of value in C interop that outweighs the cost of the added complexity
19:14:14Araqobviously the latter. but C is not a good language, it's ubiquitous though and that's what matters most.
19:14:49dom96shashlick: AFAIK 32 bit Linux is super rare nowadays
19:15:16ryukopostingit certainly has its flaws, I guess feel less strongly about its weaknesses than some
19:17:05ryukopostingshashlick any particular gcc version I should be using to build this?
19:18:50AraqC is just Modula 2 with a MUCH worse type system, a worse module system and a worse, objectively error prone syntax.
19:19:10shashlickDon't build
19:19:13shashlickIt is already built
19:19:15Araq"you can keep its merits" my ass, there are none.
19:19:26ryukopostingtoo late shashlick lol
19:19:54shashlickOk then it defeats the test
19:20:18shashlickWe want to check if the same binary works across distros
19:20:24ryukopostingalright then, guess I'll download again
19:22:04shashlick:)
19:22:17shashlickWhat distro do you have
19:22:43ryukopostingDevuan ascii
19:22:52ryukopostingkernel 4.9.0
19:23:28Zevvshashlick: how deep should I test? I running the nim binary enough? Or do you want a complete test suite?
19:23:49dom96Linux binaries will work across distros as long as the glibc version it was compiled against is older than the distro you're running on
19:24:19Zevvdependencies are minimal, so I don't expect too much problems
19:24:41Zevv^ what dom says
19:25:08ZevvI've tested back to ubuntu 12.04
19:25:22shashlickGood test then
19:25:26ryukopostingthat's usually the case, but regressions can sometimes cause weird stuff to pop up
19:26:06shashlickFor starters if all the binaries run
19:26:23shashlickCan run tests too if you want
19:26:24*zyklon_ quit (Read error: Connection reset by peer)
19:26:35Zevvshipping binaries with linux is mostly a PITA if you have lots of complex lib dependencies. GUI apps are always hard with all the gtk/qt versions in the field. But with only libc and libpthreads this should be fine
19:26:38shashlickBut use the pre-built binaries
19:26:43Zevvfcourse
19:26:56ZevvI'll test on 12.04, if that works you should be fine on all above
19:27:01Zevvand lets test some old centos's
19:27:21Araqyou can use docker to distribute Linux binaries
19:27:31ZevvBaaah
19:27:39ryukopostingshashlick nimble works on one of my projects, so I'm assuming the compiler is doing its job too lol
19:28:00shashlickThat's what I'm doing Araq
19:28:08dom96lolwat
19:28:12Araqgood.
19:28:18shashlickWell I'm building Nim using old glics
19:28:27shashlickGlibc
19:28:52leorizeor you could build Nim with musl then bundles the library with :P
19:29:17leorizeC interop story wouldn't be nice afterwards, but it's something :P
19:29:34Araqdunno, Linux begged for docker, so give it docker.
19:29:44dom96Are we really just making people install Docker for apps?
19:29:54ryukopostingI'd rather not
19:29:59Zevvor snap, or whatever kludge
19:30:16leorizeflatpak!
19:30:27leorizeno, that thing is terrible for CLI apps
19:31:01Zevvrecently I got some kind of "portable" single binary app. Guess what: it makes a fuse loopback mount in which there is a copy of *all* the shared libs it needs
19:31:09Zevvjust ship the world with every binary
19:31:21ryukopostingeeeww
19:31:31shashlickNo this is not a docker blob dom96
19:31:44shashlickIt's just built using holy build box which uses docker
19:31:53FromGitter<alehander42> well how else would you create a portable binary app Zevv ..
19:32:03shashlickSo you now have an xz file with the bin directory populated
19:32:16Araqshashlick: ah... your question
19:32:19Araqwhat was it?
19:33:49Zevvalehander42: you don't. portable binaries are NP hard, I heard
19:34:00ryukopostingalehander42 just go full Gentoo and distribute everything as source
19:35:30FromGitter<alehander42> or you just maintain simple binaries for the <n> most popular distros/versions of your userbase and leave the weird option for the other ones
19:35:38shashlickI was asking about koch xz and how to include Linux binaries in it
19:35:46shashlickUpdating installer.ini didn't help
19:36:07FromGitter<alehander42> it depends on the app ofc
19:37:26Araqshashlick: let me have a look
19:37:43FromDiscord_<demotomohiro> shashlick: binary nim for linux worked on my gentoo
19:38:16shashlickNice
19:38:20*vegax87 quit (Changing host)
19:38:20*vegax87 joined #nim
19:38:20*vegax87 quit (Changing host)
19:38:20*vegax87 joined #nim
19:38:49Zevvok on Ubuntu 12.04.5 LTS / Ubuntu 16.04.4 LTS / Debian GNU/Linux buster/sid / CentOS Linux release 7.2.1511
19:39:32Araqshashlick: it's a niminst problem, open niminst.nim
19:39:57Araqcheck what fcWinBin does and what fcUnixBin does NOT do.
19:40:10AraqfcUnixBin needs the same logic as fcWinBin
19:40:48Araqand then patch the [UnixBin] section in installer.ini
19:42:08ZevvRHEL6.5 also runs, although I'm not able to unpack .xz's by default :)
19:42:44FromGitter<zacharycarter> having a devil of a time getting windows installed on this box - the only other machine I have at my disposal atm is my macbook
19:43:07FromGitter<zacharycarter> bootcamp assistant is not an option - and I tried cmdline + diskutil but that didn't work
19:43:19FromGitter<zacharycarter> trying a program called UNetbootin - hopefully this works
19:44:51*zyklon_ joined #nim
19:47:05shashlickThanks araq
19:47:18shashlickThanks zevv for the tests
19:47:34shashlickI'll incorporate this into koch and nightlies
19:47:36Zevvyw
19:47:50Zevvwhy would you distrib c_sources in there btw?
19:50:01ryukopostingshashlick just ran your build with a project that uses some macros templates, whatnot. Nothing sophistigated wrt to proper testing, but it seems to work a-okay for me
19:51:47shashlickCause someone could still want to rebuild
19:51:56shashlickAnd it's not really much space in the xz
19:56:49Zevveuh say whay
19:56:58Zevvhttps://zevv.nl/div/dist.png
19:56:58*zyklon_ quit (Read error: Connection reset by peer)
19:58:11FromGitter<alehander42> album cover art is really weird in 2019
19:58:24Zevvshashlick: ow, "in the xz", true
19:59:14Zevvbut on disk it eats 435 Mb
20:04:53shashlickZevv I agree and will implement deleting it in choosenim
20:05:34shashlickBut whether it stays or not in the xz is up to Araq since it's been that way for a while and I don't have the history
20:11:02Zevvsweet, just learned about karax looking into the playground client code
20:12:39*zyklon_ joined #nim
20:14:53*Sembei joined #nim
20:16:03FromDiscord_<demotomohiro> there are online compilers that support Nim languages
20:16:34FromDiscord_<demotomohiro> https://wandbox.org
20:17:17FromDiscord_<demotomohiro> It seems it is the only online compiler that supports 0.19.2 and nightly build
20:18:21CalinouZevv: that FUSE loopback thing is probably an AppImage
20:18:23FromDiscord_<demotomohiro> other online compiler site except playgound supports only 0.18 or older
20:18:25*darithorn joined #nim
20:18:34ZevvCalinou: yes, that's it
20:18:46Calinouthey don't ship every library though, only the ones that cannot be reasonably expected to be present on a base desktop system
20:18:53Calinou(so glibc isn't bundled for instance)
20:18:55PMunchHmm, play.nim-lang.org seems to be down
20:20:15Calinou(so you'll need to build them on the oldest distribution you wish to support, unlike Flatpaks which have a base runtime)
20:21:06shashlickholy build box makes it super easy
20:23:51ZevvPMunch: zah is working on that
20:23:58PMunchAh okay, nice
20:24:15ZevvI killed it with a fork bomb friday, but it seems there was more wrong, someone got in somewho I believe
20:24:27PMunchI'm supposed to take over the playground at some point, but I would prefer it to at least be working when I start :P
20:24:35Zevvnimbot relies on the same backend, is also dead
20:24:43PMunchOuch, that's no good
20:25:03ZevvPMunch: while you're at it - would it make sense to change it to compile to js and exec in the browser?
20:25:08PMunchI remember talking about it when it first got set up, and it seemed to be pretty well sand-boxed
20:25:45PMunchHmm, well it might for the simple stuff that most people probably use it for
20:26:23ZevvI did a quick peek to see if the compiler itself could run in js, but that takes some effort
20:26:31Zevvin that case there's no need for server side
20:26:43ryukopostinganyone know why echo'ing an object of Options might cause the compiler to crash
20:27:18PMunchCause the compiler to crash?
20:28:11ryukopostingyeah, it's a bit weird. I have 3 objects of options, the types are acyclic though they do contain each other
20:28:47ryukopostingso A has Option[B], B has Option[C], and C has Option[seq[A]]
20:29:14ryukopostingI'll see what happens if I make it into refs
20:31:11PMunchYeah I think object, even in an option, is counted as illegal
20:31:18PMunchCompiler shouldn't crash though..
20:31:24PMunchDo you have a minimal example?
20:31:37ryukopostingI can slap one together really quick
20:33:41dom96all compiler crashes are bugs you should report
20:33:53FromGitter<alehander42> Zevv: the compiler uses a lot of os/system stuff which is not currently supported in the js backend
20:34:15FromGitter<alehander42> the problem is that you either need to add support for it in the nodejs target(which people wouldn't approve)
20:34:30FromGitter<alehander42> (and it doesnt makes sense for client-side code)
20:34:41FromGitter<alehander42> or to immitate that with stuff like local storage
20:35:01Zevvno I figured, I was just trying a quick hack to see how much I would need to throw out to get it to work
20:35:04FromGitter<alehander42> or to rewrite/abstract it somehow
20:35:10Zevvor stub
20:35:15FromGitter<alehander42> yeah, i wondered about that once too
20:35:41Zevvemscripten might be an option, but that's a bit of a let down if people look under the hood
20:36:10FromGitter<alehander42> but even in this case, you generate c code .. and you need to actually compile/run that
20:36:18FromGitter<alehander42> which is again tricky on the client side
20:36:38FromGitter<alehander42> another option is to actually run the compiler on the backend
20:36:42FromGitter<alehander42> but to generate JS code
20:36:47FromGitter<alehander42> and run this result on the client
20:37:07FromGitter<alehander42> however you still have macros & static code blocks
20:37:10ryukopostinghuh. the moment I make a minimal example of how these object are structured, it works fine
20:37:18FromGitter<alehander42> so you can still run random code on the server this way
20:38:06Zevvyes, but there all the nimvm restrictions apply
20:38:18Zevvso 'random' is quite limited
20:38:27FromGitter<alehander42> yeah, maybe it's easier to limit
20:38:35FromGitter<alehander42> this sounds like the easiest option to me
20:38:47FromGitter<alehander42> as most examples that you'd want to run on a playground
20:38:59PMunchryukoposting, yeah that tends to happen :P
20:39:02FromGitter<alehander42> are language stuff, not low-level specific or doing side effects (files etc)
20:39:10PMunchMeans the bug is not quite as simple as you think ;)
20:39:11FromGitter<alehander42> so they should work correctly on the js backend too
20:39:17Zevvryukoposting: I just tried to recreate here, and no problems
20:39:34Zevvalehander42: and it is a nice showcase for the JS backend
20:39:53Zevvwe could also give a peek into the generated JS code
20:40:29FromGitter<alehander42> yeah, that's true
20:41:07FromGitter<alehander42> @zacharycarter wyat
20:41:14FromGitter<alehander42> about this hypothetical idea ^
20:41:38FromGitter<alehander42> (nim playground generating JavaScript code for the examples and running it only on the client)
20:42:49Zevvthen again - nimbot will still need the remote API
20:42:54Zevvmy IRSII doesn't do JS yet
20:43:00dom96You can't use most of the stdlib in the JS backend
20:43:08rayman22201IMO, running the compiler client side is not worth it, but I do think having a the playground allow you to run js code output would be very useful.
20:43:13FromGitter<alehander42> but you dont need most of the stdlib in playground examples
20:43:44FromGitter<alehander42> but i agree, having both modes is best ofc
20:44:46FromGitter<alehander42> btw @dom96 this reminds me: is it possible to have something like a "<X> backend" view of the reference
20:44:58FromGitter<alehander42> e.g. if you want to see the JS backend to see only the available modules/funcs
20:45:05FromGitter<zacharycarter> I think ideally the Nim playground suits all backends
20:45:32FromGitter<alehander42> maybe just having some kind of simple filter / info box is enough
20:45:35FromGitter<zacharycarter> the thing is - I don't really want to extend or maintain it - others have volunteered to take on the task (PMunch), but ideally it moves off of my DO account (I guess)
20:45:40*vonHabsi1 quit (Ping timeout: 246 seconds)
20:45:50FromGitter<zacharycarter> well - it already supports / supported C and CPP
20:46:05FromGitter<alehander42> yeah, it should be on nim servers
20:46:07FromGitter<zacharycarter> when I added CPP I wanted to add JS too - but it's quite a different task right?
20:46:28*vonHabsi__ quit (Ping timeout: 268 seconds)
20:46:29FromGitter<zacharycarter> with C/CPP you run the docker image to compile the code and store the result in a text file in a tmp dir
20:46:33PMunchYeah, and mostly when using JS in a browser you would want to interact with the browser elements
20:46:37FromGitter<zacharycarter> exactly
20:46:42FromGitter<zacharycarter> with JS - that paradigm doesn't work
20:46:44FromGitter<alehander42> so like a NimFiddle
20:46:44FromGitter<alehander42> ?
20:46:45PMunchSo it would need to have a little playground frame as well
20:46:52FromGitter<alehander42> that would be an interesting thing to have
20:46:54rayman22201I think both back ends are ideal as well. C and JS have very different underlying semantics... exactly.
20:46:55*vonHabsi joined #nim
20:47:00FromGitter<zacharycarter> I really wanted to turn the playground into something like WASM studio
20:47:02*vonHabsi_ joined #nim
20:47:11FromGitter<zacharycarter> https://webassembly.studio/
20:47:17FromGitter<zacharycarter> but there was some push back against this idea
20:47:35FromGitter<alehander42> this is very cool
20:47:39FromGitter<zacharycarter> I agree
20:47:41FromGitter<alehander42> but i feel it should be a separate project
20:47:49FromGitter<alehander42> playground are like runnable paste sites
20:48:01FromGitter<alehander42> they should be very simple
20:48:08PMunchI also want to do something similar to Go's playground
20:48:15rayman22201It's cool, it's just such a big scope! It's like building a whole ide. It feels like you will have a lot of the same issues as what happened with Aporia
20:48:17FromGitter<zacharycarter> well - I don't see why you couldn't combine both experiences
20:48:31FromGitter<alehander42> you can reuse the technology/code
20:48:32PMunchAlong with allowing you to write whatever, it could also include some hand-holding tutorial
20:48:37FromGitter<zacharycarter> I don't think it's like building an entire IDE - WASM studio uses Monaco editor under the hood
20:48:40FromGitter<alehander42> but i'd still want to have them on separate url-s
20:48:46PMunchSo people can try it out before downloading Nim and setting up tools
20:48:58FromGitter<zacharycarter> and I'm sure you could implement a tutorial / lay-over somewhere that acted like a code-walkthrough similar to what GO has
20:49:07FromGitter<zacharycarter> and show / hide it via a menu option somewhere
20:49:25rayman22201Runnable examples in the docs would be cool too... /me pie in the sky wishes lol
20:49:28FromGitter<zacharycarter> but the nice thing about WASM studio is - you can look at intermediate representations
20:49:30FromGitter<zacharycarter> and the resulting wasm
20:49:31PMunchWould help people which are curious but can't be bothered to put in the effort (or are on e.g. an Android tablet or work/school machine without support for downloading programs)
20:49:31ryukopostingI took my entire project that was causing the crash, put it into one file, and now it's fine???
20:49:45FromGitter<alehander42> @zacharycarter this is more similar to compiler explorer
20:49:58FromGitter<alehander42> (to me)
20:49:58FromGitter<zacharycarter> yes - but some folks have asked for those features in the playground
20:50:03FromGitter<zacharycarter> Andreas specifically
20:50:18FromGitter<alehander42> yeah, seeing the representation is useful and can be simple in the ui
20:50:23FromGitter<zacharycarter> maybe it's a layered thing - at the core is the playground or whatever - the embedable copmiler
20:50:27FromGitter<zacharycarter> and then things build on top of it
20:50:27dom96PMunch: yeah, I would love to see a Nim tour
20:50:27FromGitter<alehander42> but i think having the whole "file/project/folder" abstraction
20:50:30FromGitter<alehander42> is too much
20:50:32rayman22201somewhat tangentially, I think it would be nice to add Nim support to godbolt compiler explorer... Pascal and Haskell have support now, so we totally should be able to :-P
20:50:34FromGitter<alehander42> i mean, it's cool to have it
20:50:40FromGitter<alehander42> but not in the simple playground
20:50:41ryukopostingooooh i think it's something in nimscript maybe?
20:50:41FromGitter<zacharycarter> I guess - but at times I also wish I had that with the playground
20:50:45PMunchdom96, I actually have all the code for it. Just have to write the actual tutorial :P
20:50:56FromGitter<zacharycarter> being able to modularize an example - and then share that with the community
20:51:05FromGitter<zacharycarter> and also being able to potentially add C files, etc
20:51:16FromGitter<zacharycarter> but I see what you're saying in that - it's more complex than what other playgrounds are
20:51:18FromGitter<zacharycarter> like Go langs
20:51:30FromGitter<zacharycarter> ideally we have both worlds maybe
20:51:41FromGitter<alehander42> @zacharycarter yes: this is useful, but my point is that the default playground + repr is ok for ~80% of the cases
20:51:42ryukopostingkotlin playground is pretty nice imo
20:51:44FromGitter<zacharycarter> I don't know - it's not something I'm too much interested in
20:52:00FromGitter<alehander42> the studio idea is very cool
20:52:04FromGitter<zacharycarter> I initially built the playground as a POC / toy project and it was useful, so it stuck around
20:52:13PMunchWould be nice to pull a nimble project as well
20:52:15FromGitter<zacharycarter> I was just copying what they did with Rust initially
20:52:35FromGitter<zacharycarter> there wasn't a lot of engineering or forethought that went into it
20:52:37*enow quit (Remote host closed the connection)
20:52:45FromGitter<alehander42> but it works well!
20:52:50FromGitter<alehander42> for a "toy"
20:52:52FromGitter<zacharycarter> until it doesn't haha :P
20:53:06rayman2220190% of the time, I use playgrounds when I'm too lazy / unable to open a proper terminal or editor. The current playground is perfect for that usecase lol. I think a lot of people have similar thoughts
20:53:33FromGitter<zacharycarter> I'm working on getting my new PC booted - having a shitty time with trying to create boot images for windows on macos
20:53:45FromGitter<zacharycarter> but as soon as I solve that - I'll set up my Nim env on my new box and start working on fixing it
20:54:17ZevvWhat's araqs main os?
20:54:23FromGitter<zacharycarter> windows
20:54:24*Trustable quit (Remote host closed the connection)
20:54:24rayman22201Windows iirc
20:54:28Zevvwow :)
20:54:31ryukopostingwould someone be willing to help me identify what might cause this error? only happens if I try to convert an object to a string https://pastebin.com/z3fYfqqJ
20:55:19ryukopostingall it makes clear is that an exception occurs while running nim c
20:55:59PMunchryukoposting, maybe try the latest Nim version?
20:56:09ryukopostingsure, one sec
20:56:10PMunchMight already be fixed
20:56:33ryukopostingaaaah new error
20:56:35ryukopostinggood call
20:56:42ZevvThe message itselfs seems to come from nimscript:exec()
20:56:43ryukoposting"generic instantiation too nested"
20:57:10ryukopostingwhich would point towards my circular types nested in Option, I suppose
20:58:11ryukopostingyeah, it says the template instantiation is coming from the echo $...
21:00:04ryukopostingi don't know the inner workings of the compiler, but with the compiler I work on at work, circular types caused problems for stringification because the template for it would just call itself forever
21:02:15ryukopostingweird thing with this case is that if I have seq[AcyclicButCircularTypeHere], compiler gives error, but if I just stringify AcyclicButCircularTypeHere it works fine
21:04:11Zevvisolate and file an issue
21:04:25ZevvI've been told that repr should be able to print anything, always
21:04:40Zevvalthough I forgot *who* told me that
21:04:42ryukopostingIt looks like it's fixed in 0.19.2, compiler isn't blowing up, just gives an error
21:04:55ryukopostingooooh alright so it is a problem
21:06:01Zevvryukoposting: https://github.com/nim-lang/Nim/issues/4766
21:06:40ryukopostingyeah, that looks exactly like what I had
21:06:49ryukopostingvery similar, at least
21:06:56Zevvfunny history
21:10:16*hoijui quit (Remote host closed the connection)
21:10:36ryukoposting>converter
21:10:42ryukopostingjesus, I have much to learn still
21:13:07PMunchHaha, not that useful in pure Nim programs. But I find them helpful when working with C libraries that works with cint or various int types
21:13:18ryukopostingmakes sense
21:14:44PMunchBut also when working with option types you might want to have a T -> Option[T] converter
21:15:36ryukopostingwith this project, I could probably benefit from an Option[T] -> T converter, really (furious haskell users screaming in the background)
21:15:46PMunchWell that would be a bad idea :P
21:16:04ryukopostingit's a breakout for the last.fm API, so it's a ton of music metadata stuff
21:16:07*narimiran quit (Ping timeout: 240 seconds)
21:16:14PMunchWell I guess using get on the option would allow it to just throw an exception
21:16:24ryukopostingIt would make life a lot easier if converting Option[Artist] to a string would just give "
21:16:35ryukoposting"Unknown Artist" if it's None
21:16:55PMunchOh yeah, that would be possible if Artist is a distinct string
21:17:09PMunchOr an object of some kind
21:17:37ryukopostingyeah, it gets hairy because artists have other properties than a nam
21:18:54Zevvspeaking of distinct strings: I was trying to "upgrade" one of my old project by using a lot of distinct string types for all kinds of things, but I was put off by the lack of hash() for those. Is there a way to inherit string hash for distinct string types without having to name them all explicitly?
21:19:30PMunchYou might also want to check out something like this: https://github.com/PMunch/Nim/commit/606544db01663ed9870e2ede26589f15c9d7dd13#diff-fdaf5ed8685e0ec96346e47f49ec2041
21:20:05PMunchZevv, some kind of template/macro
21:20:19Zevvprobably, this is Nim after all :)
21:20:21PMunchIs probably the "right" way of doing it
21:21:25Zevvlet's answer my own question: {.borrow.} !
21:22:07PMunchYeah, but for that you need to name hash for each one no?
21:22:17Zevvtrue
21:22:45PMunchLike `proc hash(x: MyString): array[32, byte] {.borrow.}`
21:23:07PMunchI was thinking of using a vararg template to create those for you :)
21:23:17Zevvindeed - but I didn't know about borrow until an hour ago, I just happend to see it in the compiler sources somewhere, and I just thought it might apply to my problem
21:23:26PMunchSo you would do something like `hashable(MyString, MyOtherString)`
21:23:45ZevvI could just make a simple template that creates the type and the hash borrow in one go
21:23:46PMunchOh yeah, borrow is definitely what you would want to use :)
21:23:56PMunchThat's true
21:25:05ryukopostingZevv I'm trying to cobble together a minimal example
21:25:14*Tyresc joined #nim
21:26:09*theelous3 joined #nim
21:27:27*aguspiza quit (Ping timeout: 240 seconds)
21:28:05ZevvPMunch: http://paste.debian.net/1061573/
21:28:25*troido joined #nim
21:28:31Zevv{.experimental defaultBorrow.} would be cool as well
21:28:43ryukopostingheeeeey I managed to get a minimal example working
21:28:49PMunchZevv, yeah that's a nice way of doing it
21:28:59PMunchWhat would defaultBorrow do though?
21:29:15Zevvremove all 'distinct' keywords from the code :)
21:29:29PMunchHaha, why even use distinct then?
21:29:43ZevvTo show my good intentions to other programmers reading my code
21:30:08Zevvoh, nevermind, I'm the only one using Nim :(
21:30:12ryukopostinguse dirty templates like the C preprocessor, that's how to be truly evil
21:30:40PMunchZevv, there are dozens of us!
21:30:42shashlickis it possible to check if nim doc is processing a file versus nim c/cpp
21:30:52shashlickwant to skip some code with when XYZ
21:30:53PMunchshashlick, yes
21:31:45PMunchThink it's something like `when not defined(nimdoc)` or similar
21:31:48ryukopostingshashlick one sec
21:32:05ryukopostinghttps://www.reddit.com/r/nim/comments/afviuw/nimble_docs_help/
21:32:31shashlickwow thanks guys
21:32:46ryukopostingonly reason I had that link is because I'm the OP lmao
21:33:38ryukopostingwho needs documentation, guys? entire manual should just be an IRC client
21:36:03PMunchHaha :P
21:36:25PMunchI was actually thinking about implementing something like the Clojure documentations comment section for procedures
21:36:42PMunchBut I think in Nim the biggest issue is finding the feature that does what you want
21:38:05Zevv^ that
21:38:37PMunchNot quite sure how to solve that though, apart from just referring to IRC :P
21:38:41Calinouthat's the price of having a large stdlib
21:38:47Zevvpeople are working hard on improving the docs
21:41:15ZevvCalinou: its not even the stdlib. The language is just packed.
21:41:39shashlicki'm pretty sure this is what you do in other languages too
21:41:47PMunchWe should make our own stdlib, with blackjack and hookers
21:41:55shashlickunless something is already answered on stack overflow
21:42:47FromGitter<irskep> The main thing I've found missing from the Nim docs, as a relative newbie, is repetition with examples
21:43:07Zevv'repetition'?
21:43:22FromGitter<irskep> I've learned a dozen-ish languages pretty well at this point, and nim's docs feel like "Just enough" docs to feel like a real usable language
21:43:49federico3who's alaviss on github?
21:43:58FromGitter<irskep> my gold standard for docs will always be python's official tutorials and guides. don't just say something once; give a zillion examples using different use cases
21:44:33FromGitter<irskep> I also find their docs just plan easier to read and navigate
21:44:36FromGitter<irskep> here's a decent example: https://docs.python.org/3/tutorial/errors.html
21:45:13FromGitter<irskep> nim docs are something I could see myself contributing to a lot in the future, having written probably 100k words of software docs over the past 10 years
21:45:33federico3examples are good, repetition is not
21:45:59FromGitter<irskep> maybe redundancy is the word I'm looking for, particularly in guides about language features
21:46:06ZevvI guess you could learn the basics of programming from the python docs, but with Nim docs there is the assumption that the reader knows what it's all about, and just wants to read how to do things in Nim specifically
21:46:14FromGitter<irskep> what I mean is, nim's docs are over-deduped
21:46:31FromGitter<irskep> I am literally in the center of that target audience and I find them too sparse
21:46:50FromGitter<irskep> I still refer to the third party 'nim by example' site all the time
21:47:23Zevvor I look in the compiler sources to find the idioms. Which is apparently a bad thing to do because whole chunks are leftovers from pascal-generated code :(
21:47:26FromGitter<irskep> I don't think anybody wants language docs to teach you programming from first principles
21:47:36shashlick@irskep - you might need to change your raylib code a bit - i'm exporting va_list now
21:47:46FromGitter<irskep> LOL yeah I'll go read the source for the compiler, that sounds really appealing
21:47:53Zevvshashlick: how will you handle va_list?
21:48:28shashlicki simply export it in cimport now
21:48:38shashlickso all C'isms will be globally available
21:48:43Zevvis there a way to actually *use* it from nim then?
21:48:59Zevvor does it simply not translate
21:49:15*skellock quit (Ping timeout: 246 seconds)
21:49:26shashlickyou can use va_list using emit i think, no idea how that works though here's the example https://github.com/judofyr/bob/blob/20c6dcbf59ae41410256bdf81e1a4362d423df47/bobpreload.nim#L175-L200
21:50:08shashlickdoing the same for time_t and more C interop stuff as we grow
21:50:28Zevvgood enough, the result now compiles anyway
21:50:46shashlickcool
21:51:10shashlickis there an automated way to post docs on http://github.io
21:51:41FromGitter<irskep> just push to the gh-pages branch and include a magic `.nojekyll` empty file
21:52:07FromGitter<irskep> I'd be happy to set it up for you, though I'll have to learn whatever nim's doc tool is
21:52:34shashlicki've added docs to cimport, you just need to run nim doc nimterop/cimport and that's it
21:52:47shashlickit generates an html file which needs to be posted somewhere
21:53:08TyrescThe new vim plugin from alaviss looks nice, someone should put it into the editor support section
21:53:39FromGitter<irskep> this is a pretty easy way to do it in a script https://github.com/davisp/ghp-import
21:53:41Zevvshashlick: would it make sense to have toast accept multiple input files and just iterate them in order?
21:54:02FromGitter<irskep> so you would use `ghp-import --no-jekyll -fp $PATH_TO_HTML_FILES`
21:56:43Zevvoh and another nice bug/feature: ./toast -np /usr/include/readline/rltypedefs.h eats my CPU but never finishes
21:57:07shashlickZevv that's doable i think
21:57:33FromGitter<irskep> How can I find the options to `nim doc`? `nim doc --help` is only giving general options
21:58:14shashlickdon't think it has any - read the code 😉
21:58:34shashlickzevv: it will just merge everything into one blob i think
21:58:42FromGitter<irskep> wish I had a year to just write docs for stuff
21:58:47Zevvshashlick: sounds good to me
21:59:03Zevvok, found the line causing the problem
21:59:06Zevvtypedef int rl_command_func_t PARAMS((int, int));
21:59:32Zevvput that in a file on its own, and toast never finishes
21:59:32shashlickok please open an issue for the multi-file thing - it needs a little bit of work to do right
21:59:53FromGitter<kaushalmodi> shashlick: look at Nim repo Travis
22:00:29FromGitter<kaushalmodi> That auto updates the Nim devel docs
22:00:46shashlicknice - will do
22:01:05FromGitter<irskep> shashlick: here's a super simple github pages script that works on your repo https://gist.github.com/irskep/a2261b6f6af92337dca3e4d617903b02
22:01:53shashlickgosh todo is exploding today 😄
22:01:55FromGitter<irskep> I guess you also want --index:on
22:03:00ryukopostingZevv I think it has to do with the double-nested generic, e.g. Option[seq[Foo]]
22:03:08ryukopostinghttps://github.com/nim-lang/Nim/issues/10396
22:03:23FromGitter<kaushalmodi> shashlick: or you can look at the travis in here on how I update docs: https://github.com/kaushalmodi/elnim
22:06:54shashlickthanks @irskep @kaushalmodi - will deploy this tonight
22:07:11FromGitter<irskep> I am astounded that nim includes an rst parser! python's is spaghetti, it's nice to have another implementation
22:07:39FromGitter<irskep> maybe time to reboot my documentation generator project
22:10:00FromGitter<irskep> rst is the worst markup language for writing docs, except for all the others
22:13:01*Vladar quit (Remote host closed the connection)
22:13:35FromGitter<kaushalmodi> @irskep Org mode is the best format for docs, blogs, anything
22:14:28shashlick@kaushalmodi - we need to update nightlies to use koch CI instead of the manual script
22:14:46shashlickalso am planning on changing tag to v0.19.9-date instead of hash since the releases page is just a mess
22:15:18FromGitter<irskep> @kaushalmodi I'd love to learn it...if anyone writes a nim parser for it :-)
22:17:46ldlework+1 to org-mode
22:17:51ldleworkso good
22:17:53shashlick@irskep, @kaushalmodi - https://genotrance.github.io/nimterop/cimport.html
22:17:56shashlickyay 🙂
22:22:48FromGitter<irskep> oof, I just tried to go through the nimgame2 tutorial and nimgame2 itself doesn't compile right now
22:25:01FromGitter<irskep> raylib it shall be
22:29:26FromGitter<kaushalmodi> @irskep I kind of made Org mode docs work for Nim docs, automated using Pandoc :)
22:29:30FromGitter<kaushalmodi> https://github.com/kaushalmodi/strfmt
22:29:59FromGitter<kaushalmodi> ^ you can see its example in above project
22:30:15FromGitter<irskep> yep, pretty nice
22:30:45FromGitter<irskep> the thing I tend to miss about sphinx (python) and scribble (racket) is the widespread direct linking of symbols to their definitions
22:31:20FromGitter<irskep> so when you say "The `format` function", `format` is a link to the `format` docs 100% of the time
22:31:48FromGitter<kaushalmodi> shashlick:I agree on both, use koch CI and release tagging
22:32:02FromGitter<kaushalmodi> I wish it sorted by last updated first
22:33:59*skellock joined #nim
22:34:12FromGitter<kaushalmodi> @irskep I'm pretty sure Nim doc has a custom markup to link to definitions @narimiran ?
22:34:35FromGitter<irskep> could be that people just aren't using it consistently yet
22:35:01FromGitter<irskep> but e.g. the Swift doc generator actually looks at all your backticked markdown strings and makes a good guess about whether it's a symbol it needs to link
22:40:06FromGitter<kaushalmodi> @irskep about your earlier comment about repetition of examples, I find that approach great for my own learning, so I take notes that way: https://scripter.co/notes/nim/
22:40:30FromGitter<kaushalmodi> But I think that such verbose examples might not fit in the official docs.
22:40:52FromGitter<kaushalmodi> (btw guess what markup I used for those notes ;-))
22:50:45FromGitter<irskep> conundrum: I want to create a fresh repo for my raylib nim binding, but there are already 3 called raylib-nim, ray.nim, and raylib-Nim
22:51:09FromGitter<irskep> `raylib_nim_best_free_frozen`
23:02:58*theelous3 quit (Ping timeout: 245 seconds)
23:04:24*PMunch quit (Remote host closed the connection)
23:08:28FromGitter<irskep> shashlick: how can I have a nim package import a header using nimterop, and have the header path be relative to the original package tree? I used $projdir but it's looking for the header in the project I've imported my module from.
23:09:26FromGitter<irskep> *$projpath
23:12:13shashlickNot sure I get it - can you post a gist perhaps?
23:12:40shashlickYou can use sourcePath
23:13:00shashlickSee tree-sitter directory inside nimterop
23:13:18FromGitter<irskep> looks like `splitPath(currentSourcePath()).head` might be what I want
23:16:41shashlickCool
23:17:16shashlickIs it something nimterop should have built in?
23:17:36FromGitter<irskep> It seems like it would be common to want to bundle the C header in a module
23:19:10FromGitter<irskep> It was super easy to figure out, but you might want to just add a how-to in the readme
23:19:42FromGitter<irskep> anyway here's my raylib binding :-D https://github.com/irskep/raynim
23:28:30shashlickNice work
23:28:58shashlickYou might want to remove the va_list declaration since nimterop now adds it
23:35:30ryukopostinganyone interested in a ladder logic macro library?
23:38:42rayman22201I have no practical need for something like that at all, but it sounds cool lol.
23:40:16ryukopostingIt's a little hacky since I declare a variable contactValue behind the user's back, but super simple
23:48:00ryukoposting(nim in PLCs... now that would be cool)
23:51:01*theelous3 joined #nim
23:52:34*stefanos82 quit (Remote host closed the connection)