<< 18-06-2020 >>

00:00:33skrylar[m]i've been working on mud proxies and servers. not quite as glorious as discord libs. lol
00:02:29FromDiscord<Technisha Circuit> Lmao
00:02:51FromDiscord<Technisha Circuit> I was just thinking that it'd be cool if i did something useful
00:03:08Yardanicowell I'm just kinda confused what you're wandering all over the place :P
00:03:17FromDiscord<SeanOMik> Is there a way I could get a `ref` from a non-ref object?
00:03:28Yardanicoyes
00:03:40FromDiscord<SeanOMik> Like if a `proc` returns a `Player` but I need a `ref Player`
00:03:44Yardanico!eval let a = 5; var b: ref int; b[] = a
00:03:46NimBotTraceback (most recent call last)↵/usercode/in.nim(1) in↵SIGSEGV: Illegal storage access. (Attempt to read from nil?)
00:03:49Yardanicowait wrong
00:04:13Yardanico!eval var b = new(int); b[] = 5; echo b
00:04:15NimBotCompile failed: /usercode/in.nim(1, 33) Error: type mismatch: got <ref int>
00:04:24Yardanico!eval var b = new(int); b[] = 5; echo b[]
00:04:26NimBot5
00:04:37Yardanicoso yeah, basically you just do something like
00:04:48Yardanicovar mypl = new(Player); mypl[] = mynonrefplayer
00:05:51FromDiscord<SeanOMik> Uhh
00:05:51FromDiscord<SeanOMik> Okay
00:05:59FromDiscord<SeanOMik> Thanks
00:07:45*couven92 quit (Ping timeout: 272 seconds)
00:10:26*lritter quit (Ping timeout: 258 seconds)
00:11:03*lritter joined #nim
00:12:29skrylar[m]that's just copying the value in to a ref isn't it
00:14:23skrylar[m]its not quite the same logic as pointers iirc
00:14:27*adnan338 joined #nim
00:19:47*couven92 joined #nim
00:22:01FromDiscord<Technisha Circuit> Is it a good idea to recommend Nim to my friend who can't code but wants to learn?
00:22:01*couven92 quit (Read error: Connection reset by peer)
00:22:13*couven92 joined #nim
00:23:22FromDiscord<SeanOMik> I would think so
00:23:33FromDiscord<SeanOMik> Its not that complicated
00:24:47FromDiscord<Technisha Circuit> Nice
00:26:07FromDiscord<Technisha Circuit> 984 members in the discord-
00:32:30FromDiscord<impbox> \o/
00:34:04FromDiscord<Technisha Circuit> If i had a .so file that had some code written in Nim
00:35:08*lritter quit (Quit: Leaving)
00:35:10FromDiscord<Technisha Circuit> And i wanted to get a variable named `a` which was a string, how would i get it? I figured out how to use symAddr (if that's the name), but I can't figure out how to do the same for normal variables
00:35:25FromDiscord<Technisha Circuit> I need the variables to be fetched at runtime
00:37:14skrylar[m]@Technisha Circuit depends on the nature of your fren
00:37:30skrylar[m]if they need a lot of handholding, no. if they are resourceful, maybe.
00:40:10skrylar[m]i kind of miss the old gamemaker for that purpose... there's gdevelop now i guess. where you can flop around with events and triggers. or a copy of rpgmaker. renpy if you're very brave
00:44:06skrylar[m]huh. forgot about scratch. never used it
00:44:38FromDiscord<Technisha Circuit> Oh god i hatw scratch
00:44:45FromDiscord<Technisha Circuit> (edit) 'hatw' => 'hate'
00:44:53FromDiscord<Technisha Circuit> Kids say it's proper coding aswell-
00:45:26FromDiscord<Technisha Circuit> Thankfully my little sister knows that it's not proper coding because she always sees me coding-
00:45:52FromDiscord<Clyybber> it is coding tho?
00:46:44FromDiscord<Technisha Circuit> Dragging and dropping blocks is coding?
00:47:07FromDiscord<Technisha Circuit> I'd say it's more like a simple scripting language if anything
00:47:25FromDiscord<Clyybber> and *that*'s coding
00:47:25FromDiscord<Technisha Circuit> But i mostly don't think of it as coding :P
00:47:36FromDiscord<Technisha Circuit> > if anything
00:47:37FromDiscord<Technisha Circuit> :p
00:47:39FromDiscord<Clyybber> well you are creating code
00:47:52FromDiscord<Clyybber> so I'd say it's coding :p
00:48:03FromDiscord<Technisha Circuit> Good point ¯\\_(ツ)\_/¯
00:48:05FromDiscord<Technisha Circuit> Hmmmmm
00:48:12FromDiscord<Technisha Circuit> Nvmm
00:48:16FromDiscord<Technisha Circuit> (edit) 'Nvmm' => 'Nvm'
00:48:27FromDiscord<Technisha Circuit> What's a good library for making android apps in Nim?
00:48:34FromDiscord<Clyybber> jnim
00:48:47FromDiscord<Clyybber> it allows you to interface with java
00:48:50FromDiscord<Technisha Circuit> Isn't that java and nim interopt?
00:48:54FromDiscord<Clyybber> yep
00:49:08FromDiscord<Technisha Circuit> I don't wanna have to learn the pains of Java T^T
00:50:02FromDiscord<Clyybber> nimx also supporst android afaik
00:50:16FromDiscord<Technisha Circuit> Nimx?
00:51:25FromDiscord<Clyybber> ~github nimx
00:51:26disbotno footnotes for `github`. 🙁
00:51:35FromDiscord<Technisha Circuit> I found it
00:51:40FromDiscord<Clyybber> k
00:51:45FromDiscord<Technisha Circuit> How do i add a footnote anyway-
00:51:55FromDiscord<Clyybber> ~footnote is added
00:51:56disbotfootnote: 11added
00:52:00FromDiscord<Technisha Circuit> O
00:52:08FromDiscord<Technisha Circuit> ~repo nimx
00:52:09disbotno footnotes for `repo`. 🙁
00:52:13FromDiscord<Technisha Circuit> Oof
00:52:24FromDiscord<Clyybber> ~repo: nimx
00:52:25disbotno footnotes for `repo:`. 🙁
00:52:25FromDiscord<Technisha Circuit> ~footnote nimx is https://github.com/yglukhov/nimx
00:52:26disbotno matching footnotes for `footnote` with regexps `nimx, is, https://github.com/yglukhov/nimx`. 🙁
00:52:29shashlickdisruptek: proc or it didn't happen
00:52:33FromDiscord<Technisha Circuit> O
00:52:46FromDiscord<Technisha Circuit> ~nimx
00:52:47disbotno footnotes for `nimx`. 🙁
00:53:17FromDiscord<Zed> ~footnote https://github.com/yglukhov/nimx
00:53:18disbotno matching footnotes for `footnote` with regexps `https://github.com/yglukhov/nimx`. 🙁
00:53:35FromDiscord<Technisha Circuit> I'm confused-
00:53:35FromDiscord<Zed> ~footnote nimx https://github.com/yglukhov/nimx
00:53:36disbotno matching footnotes for `footnote` with regexps `nimx, https://github.com/yglukhov/nimx`. 🙁
00:53:48FromDiscord<Technisha Circuit> ~footnote is
00:53:49disbotno matching footnotes for `footnote` with regexps `is`. 🙁
00:53:55FromDiscord<Zed> ~footnote
00:53:56disbotfootnote: 11added
00:54:13FromDiscord<Zed> https://github.com/yglukhov/nimx ~footnote
00:54:13FromDiscord<Technisha Circuit> ~nimx is https://github.com/yglukhov/nimx
00:54:14disbotnimx: 11https://github.com/yglukhov/nimx
00:54:20FromDiscord<Technisha Circuit> Figured it out!
00:54:23FromDiscord<Technisha Circuit> ~nimx
00:54:24disbotnimx: 11https://github.com/yglukhov/nimx -- Technisha Circuit
00:54:27FromDiscord<Technisha Circuit> Finally!
00:54:29FromDiscord<Zed> yay
00:54:30FromDiscord<Technisha Circuit> :3
00:54:35FromDiscord<Technisha Circuit> :p
00:54:44FromDiscord<Zed> what a confusing bot
00:54:48FromDiscord<Zed> :D
00:55:30FromDiscord<Technisha Circuit> Ikr xD
00:58:43*oddp quit (Ping timeout: 260 seconds)
00:58:55skrylar[m]well scratch/logo/early gamemaker were nice at getting you to having little stuff move around the computer and maintain motivation. the classical approach of 5+ years gen.ed. and then maybe someday you start studying the theory of RAM cells so one day you might write a code was a profound failure in comparison
01:00:00skrylar[m]considering how effective multimedia fusion has been at getting designers engineering best selling games, i'd say abstracting the code until you nderstand the concepts works
01:01:21skrylar[m]they have their issues but by the time you understand what the problem is in MMF/GDevelop, you're probably ready to graduate to code
01:02:00skrylar[m]or well, Node-RED if you're doing non-game stuff.
01:02:11FromDiscord<Technisha Circuit> What's node-red?
01:02:30skrylar[m]noodle graph runtime in node
01:03:03skrylar[m]you write little modules and they appear on a graph, so you can visually plop the modules and flow together
01:03:15FromDiscord<Technisha Circuit> ~~Also, probably not the best idea to attempt to make an android game while coding on an android~~
01:03:19FromDiscord<Technisha Circuit> Oh cool
01:03:38skrylar[m]theres also fungus in unity, and there's another one in unity thats simila rand i forget the name
01:03:54*Tongir quit (Ping timeout: 240 seconds)
01:22:53*arecaceae quit (Remote host closed the connection)
01:23:27*arecaceae joined #nim
01:26:43FromDiscord<impbox> I think a combination of code + node graphs is ideal, especially if they can both call each other, and if the node graphs can compile down to optimised code
01:27:38FromDiscord<impbox> most of the time i'd rather code things, but sometimes graphs make more sense and are good for designers to tweak when they can't code but can still do logic and piece together things in interesting ways
01:40:14*Tlongir joined #nim
01:50:15*hecanjog joined #nim
01:53:13FromDiscord<Technisha Circuit> So how would i get a string from .so file in Nim?
01:53:22*fredrikhr quit (Ping timeout: 246 seconds)
01:55:52*chemist69 quit (Ping timeout: 244 seconds)
01:57:58*chemist69 joined #nim
02:18:23FromDiscord<Elegant Beef> "Hey guys can someone tell me what's wrong?" https://media.discordapp.net/attachments/371759389889003532/722998611880837150/unknown.png
02:18:43FromDiscord<SeanOMik> How could I check if a string is empty?
02:19:21FromDiscord<Elegant Beef> strutils
02:19:35FromDiscord<Elegant Beef> `isEmpty` and `isEmptyOrWhitespace`
02:19:41FromDiscord<Elegant Beef> Choose which ever you want
02:21:52FromDiscord<SeanOMik> Awesome, thanks
02:23:48*Tlongir quit (Read error: Connection reset by peer)
02:24:03*Tlongir joined #nim
02:25:30*sacredfrog quit (Quit: ZNC 1.8.1 - https://znc.in)
02:26:59*sacredfrog joined #nim
02:28:42*waleee-cl quit (Quit: Connection closed for inactivity)
02:31:32FromDiscord<SeanOMik> I get this weird error: `template/generic instantiation of 'async' from here` when I try to do this: ```nim↵proc updateUser*(user: User , modify: UserModify): User {.async.} =↵```
02:31:42FromDiscord<SeanOMik> (edit) 'UserModify):' => 'UserUpdate):'
02:32:08leorizeto understand it you'll need the full error log
02:32:27leorizethat message is actually a 'hint' and not an error
02:32:53FromDiscord<SeanOMik> `Expected return type of 'Future' got 'User'`
02:32:56FromDiscord<SeanOMik> Oh okay
02:33:02FromDiscord<SeanOMik> So I need to return a future of user then
02:33:29FromDiscord<SeanOMik> Okay yeah, changing return type to `Future[User]` worked
02:33:30FromDiscord<SeanOMik> Thanks
02:39:36*endragor joined #nim
02:44:46*sagax quit (Read error: Connection reset by peer)
02:47:11*Tlongir quit (Read error: Connection reset by peer)
02:47:44*Tlongir joined #nim
02:50:17*sagax joined #nim
02:51:33*muffindrake quit (Ping timeout: 260 seconds)
02:52:32*Tlongir quit (Read error: Connection reset by peer)
02:52:44*Tlongir joined #nim
02:53:27*muffindrake joined #nim
03:38:05skrylar[m]AMP seems okay. haven't used it on the nim side yet but was reading about it
03:38:17skrylar[m]grpc is probably not bad but the http/2 spec is horrible to read
03:45:48FromDiscord<impbox> the js dom module seems to be missing a bunch of attributes, I guess the standard changes pretty quick, noticed KeyboardEvent.repeat is missing, is there a way I can extend/add support for this without modifying the system dom module?
03:46:44FromDiscord<Rika> cant you just make a proc that accepts KeyboardEvent?
03:47:22FromDiscord<impbox> I do... but I want to check KeyboardEvent.repeat which doesn't exist
03:48:19FromDiscord<impbox> I'm wondering if there's a way I can extend the type to add `repeat` without changing the system library
03:50:31FromDiscord<Rika> when not compiles()?
03:50:47FromDiscord<Rika> or when not defined
03:52:20FromDiscord<impbox> i can do that, but if it's not defined what can I do?
03:52:32FromDiscord<Rika> you define it, no?
03:52:35FromDiscord<impbox> how?
03:52:41FromDiscord<Rika> by making the proc
03:52:50FromDiscord<impbox> which does?
03:52:54FromDiscord<Rika> what you want
03:53:06FromDiscord<impbox> how do I make my proc read a member on a type which doesn't exist?
03:53:15FromDiscord<Rika> ah i see what you're thinking now
03:53:37FromDiscord<Rika> so what i would do is make a new module `xxx_mod` or something
03:53:48FromDiscord<Rika> in that module you include the original module
03:53:57FromDiscord<Rika> then you define repeat at the bottom
03:54:11FromDiscord<Rika> then import `xxx_mod` instead of `xxx`
03:54:38FromDiscord<Elegant Beef> Well the issue is they want to add a member to an object
03:54:46FromDiscord<Rika> oh its a MEMBER?
03:54:50FromDiscord<Rika> not a proc?
03:55:07FromDiscord<Elegant Beef> I believe it's a member i could be wrong
03:55:16FromDiscord<Elegant Beef> I only briefly looked at the dom source
03:55:36FromDiscord<Rika> modify the original source and PR it :PPP
03:55:46FromDiscord<Elegant Beef> ^ only real solution
03:57:03FromDiscord<Elegant Beef> yea they want to add a bool to the the KeyboardEvent type that adds a bool called `repeat`
03:57:34FromDiscord<impbox> yes it's a member
03:58:05FromDiscord<impbox> obviously that's the ideal solution, but it means waiting for that to be accepted and merged into a new version etc
03:58:11FromDiscord<impbox> in the meantime, what can one do?
03:58:18FromDiscord<Elegant Beef> Copy the dom module and append it
03:58:29FromDiscord<Elegant Beef> Leave it in your project file
03:58:35FromDiscord<Elegant Beef> (edit) 'file' => 'folder'
03:59:08FromDiscord<impbox> mm I guess that will work, though suboptimal
03:59:12FromDiscord<Elegant Beef> Yea
04:04:33*marnix joined #nim
04:06:02*supakeen quit (Quit: WeeChat 2.8)
04:06:40*supakeen joined #nim
04:09:44*B4s1l3 joined #nim
04:09:50*B4s1l3 is now known as opDispatch
04:11:27*D_ quit (Ping timeout: 260 seconds)
04:14:41*D_ joined #nim
04:34:32FromDiscord<SeanOMik> Is there a tutorial on using VSCode to debug your nim application?
04:45:50*adnan338 quit (Ping timeout: 260 seconds)
04:48:06*nsf joined #nim
05:03:25*adnan338 joined #nim
05:28:02*solitudesf joined #nim
05:40:52*aenesidemus quit (Ping timeout: 258 seconds)
05:57:14*bung_ joined #nim
06:04:17*kenran joined #nim
06:09:03skrylar[m]hmm there was a plugin to use that debug visualizer but thats all i know of
06:14:55*endragor quit (Remote host closed the connection)
06:15:00*tdc joined #nim
06:20:42*narimiran joined #nim
06:24:37*ftsf quit (Ping timeout: 246 seconds)
06:25:19*nekits0 joined #nim
06:26:29*nekits quit (Ping timeout: 258 seconds)
06:26:29*nekits0 is now known as nekits
06:26:43*adnan338 quit (Ping timeout: 246 seconds)
06:27:39*endragor joined #nim
06:27:41*endragor quit (Read error: Connection reset by peer)
06:27:47*endragor joined #nim
06:52:00*letto quit (Quit: Konversation terminated!)
06:52:06Araqguys, if you're looking for a simple, effective task to help us speed up Nim's development
06:52:39Araqplease create PRs that replace 'func' by 'proc' in system.nim and then in other parts of Nim's stdlib
06:52:46Araqer, no
06:52:52Araqreplace 'proc' by 'func'
06:53:09FromDiscord<Rika> just ripgrep it 😄 (i kid)
06:53:12Araqso that we can tinker with https://github.com/nim-lang/RFCs/issues/234
06:53:13disbotAdd write-tracking to Nim's func ; snippet at 12https://play.nim-lang.org/#ix=2pg3
06:53:35AraqRika: I prefer nimgrep
06:53:59FromDiscord<Rika> its a joke T_T
06:56:29*letto joined #nim
06:56:39*dddddd quit (Ping timeout: 260 seconds)
06:56:45AraqI know but nimgrep is the better grep everybody is looking for because it has --confirm and --stdin
06:57:15FromDiscord<Rika> ill prolly try it some time
06:57:23FromDiscord<Rika> wonder if ng is taken
06:57:31FromDiscord<Rika> its not
06:57:32FromDiscord<Rika> nice
06:57:39FromDiscord<Rika> ill prolly symlink ng then some time
06:57:56Araqmy alias for it is 'gg'
06:58:14FromDiscord<Rika> why?
06:58:26Araqbecause it's simpler to type
06:59:01FromDiscord<Rika> makes me think "go to buffer top" because vim so ill prolly just replace rg with nimgrep
06:59:23Araqyou need to play more games, "gg" is obviously for "good game"
07:03:23FromDiscord<Rika> i dont play games where you play against each other in real time
07:09:38*PMunch joined #nim
07:35:55*fredrikhr joined #nim
07:38:39*dxd joined #nim
07:38:48*livcd_ quit (Changing host)
07:38:48*livcd_ joined #nim
07:40:48*nekits quit (Quit: Ping timeout (120 seconds))
07:41:13dxdhi guys! how can i export my nim code to a module for use in lua? i tried with the lua library but this is really poorly documented
07:41:50Araqdxd, depends on what you mean
07:42:21*nekits joined #nim
07:42:23dxdexecute my nim procs and get result
07:42:37dxdtransfer to them data from lua code by the way
07:43:20Araqhttps://www.lua.org/pil/26.2.html translate the C syntax into Nim's and it will work
07:43:33Araqbut that's "registering a Nim proc to the Lua VM"
07:43:56Araqmaybe what you're asking is "how to call a Lua function from my Nim main program"
07:44:17dxdno, call from lua
07:44:44dxdit's for in-game scripting, which is based on lua
07:44:57dxdk will try
07:45:30Araqwatch out to make your procs .cdecl
07:47:19dxdso what is analog of
07:47:24dxd static const struct luaL_reg mylib [] = { {"dir", l_dir}, {NULL, NULL} /* sentinel */ };
07:50:01Araqconst mylib = [LuaLReg(name: "dir", fn: l_dir), LuaLReg(name: nil, fn: nil)]
07:50:22Araqbut it depends on how LuaLReg was wrapped
07:50:45Araqit could also be
07:51:16Araqconst mylib = {cstring"dir": l_dir, nil: nil}
07:51:36Araqwhich is sugar for
07:51:56Araqconst mylib = {(cstring"dir", l_dir), (nil, nil)]
07:52:03Araqconst mylib = [(cstring"dir", l_dir), (nil, nil)]
07:52:09Araq(array of tuples)
07:52:16PMunchdxd, what's the issue with the nimLUA documentation?
07:52:27PMunch(haven't used it myself, so I really don't know)
07:52:34*nekits quit (Quit: Ping timeout (120 seconds))
07:52:34dxdnot nimLUA, lua
07:52:54dxdhttps://github.com/nim-lang/lua
07:53:01*nekits joined #nim
07:54:28PMunchOh, didn't know that was even a thing. Why not try nimLUA?
07:54:35PMunchIt seems a bit more complete and documented..
07:55:05dxdas I understand it, you can bind only for internal vm lua
07:55:57dxdbut i need to use nim from lua vm
07:56:45dxdAraq, what is LuaLReg, you mean Preg?
07:59:11AraqLuaLReg is Nim's spelling of 'struct luaL_reg'
07:59:30Araqbut I don't know how the wrapper wrapped it
07:59:37dxdundeclared identifier: 'LuaLReg'
07:59:55Araqwhich wrapper do you use? please give me a link to it
08:00:13dxdhttps://github.com/nim-lang/lua
08:02:59dxdhttps://github.com/nim-lang/lua/blob/ed117394cef80e1de48055b238ce251645e2e386/src/lua.nim#L473
08:03:54dxdand it also takes an instance, not an array of them
08:05:38Araqconst mylib = [Treg(name: "dir", `func`: l_dir), Treg(name: "", `func`: nil)]
08:06:10Araqopenlib(state, unsafeAddr(mylib[0]), mylib.len-1)
08:08:46*brainbomb joined #nim
08:10:17dxdError: expression has no address
08:11:59dxdhttps://pastebin.com/9iYQFJFc
08:12:42solitudesfconst -> let
08:13:25dxdk it's compiled
08:15:08dxdand lua says that lua: main.lua:1: module 'test' not found
08:20:20dxdi compiled incorrectly, i apologize
08:20:38dxdforgot about --app: lib
08:21:53dxdsomething wrong again
08:21:55dxdhttps://pastebin.com/0gQw5PbB
08:23:58PMunchdxd, do you have luaopen_test defined in your Nim file?
08:24:18PMunchIf so it should be visible with `nm -a | grep luaopen_test`
08:25:12*narimiran quit (Ping timeout: 256 seconds)
08:25:17dxdyes, i left a link to the code a few posts back
08:26:15dxdhttps://pastebin.com/GNNtSeBx
08:26:36PMunchAh, well it's not exported and not cdecl
08:26:54PMunch(not sure if it needs to be exported, but it will at least remove the "unused" warning)
08:29:58dxdadded * and the pragma {.cdecl.} to luaopen_test, nothing has changed at all
08:30:16PMunchTry this, it should work: http://ix.io/2ptJ/nim
08:30:37PMunchNot 100% if that Treg(name: "get_hello", `func`: get_hello) thing will work though
08:31:55PMunchAnd not sure if get_hello needs the extra pragmas, but it probably won't hurt
08:31:59dxdcheers, new error!
08:32:07dxdsigsegv!
08:32:09Araqthis is not how it works...
08:32:14*Araq sighs
08:32:39Araqyou don't build a DLL for Lua, you embed Lua into a host app
08:33:40AraqDLLs are a different story, for a start you need to ensure the memory management is compatible
08:34:21dxdhow can i ensure
08:34:42PMunchAraq, I think he wants to use Nim for a third party program that has lua scripting
08:34:54dxdyep
08:35:08PMunchSo he wants to call Nim stuff from Lua from a program he doesn't control.
08:35:32dxdgmod have in-game scripting in lua
08:35:42dxdso i wanna to make it in nim
08:36:29*opal quit (Remote host closed the connection)
08:36:40dxdi can't?
08:37:40dxdi saw that one guy did it in python
08:37:51*opal joined #nim
08:40:24Araqyou need something like https://www.lua.org/pil/8.2.html
08:50:37*couven92 quit (Ping timeout: 264 seconds)
08:50:49*couven92 joined #nim
08:57:16*Amun_Ra quit (Quit: Gdyby mi się chciało tak jak mi się nie chce…)
08:58:58dxdAraq, it works, but still SIGSEGV, just as simple require
08:59:08*Amun_Ra joined #nim
08:59:57PMunchdxd, possibly because NimMain isn't being called?
09:00:10PMunchThat means the GC isn't set up and will crash if you try to use it
09:00:15dxdhttps://pastebin.com/MFhVG6qy
09:00:30dxduhh maybe idk
09:00:38dxdaaand how call it?
09:01:21PMunchAh, NimMain also initialises global variables, so that test variable might be empty if it's not run.
09:01:36FromDiscord<Recruit_main707> you wrap it and run it in lua iirc
09:02:14dxdwhat is iirc
09:02:22PMunchYou compile with --noMain and then in your code do `proc NimMain() {.importc.}` and call it from luaopen_test
09:02:52PMunchIIRC is an abbreviation for If I Rememeber Correctly
09:03:12FromDiscord<Recruit_main707> doesnt need to de that i think, just call NimMain should work
09:03:28*narimiran joined #nim
09:03:36PMunchReally?
09:03:45FromDiscord<Recruit_main707> i think so
09:03:52FromDiscord<Recruit_main707> thats what i do w/ python at least
09:03:55dxdwhere should i call? :)
09:04:33dxdfirst line of luaopen_test?
09:04:38PMunchEither as I mentioned in luaopen_test as the first thing you do. Or from lua before luaopen_test is triggered (if you are able to)
09:06:24dxdlike that? https://pastebin.com/5V8mWgrc
09:06:59PMunchYes
09:07:01dxdanyway SIGSEGV
09:07:07PMunchLine?
09:07:11dxd20
09:07:18FromDiscord<Recruit_main707> oh, he is calling it from within Nim, then yes, the importc thing is probably needed :P
09:07:33dxdat state.openlib
09:07:35PMunchdxd, try to check state.isNil
09:07:38PMunchJust to make sure
09:07:53dxdfalse
09:08:48PMunchAnd you are sure that that is the correct signature for luaopen_test?
09:09:02PMunchJust trying to eliminate errors
09:09:43dxdsame as https://www.lua.org/pil/26.2.html
09:09:53FromDiscord<Recruit_main707> wrapping nim code in the actual nim side doesnt look very easy, cant lua do something like python does with ctypes?
09:09:55*couven92 quit (Read error: Connection reset by peer)
09:10:34PMunchHmm, that Treg(name: "", `func`: nil) should probably be Treg(name: nil, `func`: nil)
09:10:39PMunchTo properly work as the sentinel
09:11:17*Trustable joined #nim
09:11:26*couven92 joined #nim
09:12:13PMunchThat cint(test.len-1) should probably also be a 0
09:12:28PMunchI don't think you are using upvalues, although I'm not sure what they are..
09:12:41dxdsame SIGSEGV
09:13:14PMunchWhat does your code look like now?
09:13:40PMunchDo you have a minimal lua script that will try to load and SIGSEGVS by the way? Would make testing this easier for me
09:14:31dxdyep
09:14:43dxdnim code https://pastebin.com/aUMKxmdt
09:15:26dxdlua code https://pastebin.com/Ee8mJx1b
09:16:21*NimBot joined #nim
09:16:36FromDiscord<Clyybber> try with --gc:arc
09:16:36dxdNim Compiler Version 1.2.0 [Linux: amd64] and Lua 5.3.3
09:16:49PMunchHmm, I got this: http://ix.io/2ptP
09:17:39PMunchWith Nim 1.2.0 and Lua 5.3.5
09:17:53dxdwow
09:18:03PMunchCompiling with --app:lib and --noMain
09:18:43dxdmaybe f.get_hello()?
09:19:02PMunchYup
09:19:03PMunchThat worked
09:19:20dxdClyybber, with --gc:arc also SIGSEGV
09:19:39PMunchhttp://ix.io/2ptR
09:19:53dxduhhh what
09:26:02Araqhttps://forum.nim-lang.org/t/6445#39770 there
09:26:45PMunchdxd, Clyybber, works with --gc:arc as well
09:27:31PMunchdxd, did you manage to get it to work?
09:28:14*Tlongir quit (Ping timeout: 240 seconds)
09:28:15dxdnot yet, trying to install 5.3.5, but generally in gmod 5.1
09:29:07PMunchHmm, I doubt that it's a Lua version issue..
09:29:23dxdnope, sigsegv :)
09:29:46dxdoh my god why
09:30:08PMunchAre you using the exact same code that I'm using?
09:30:19dxdyes, copied
09:30:36PMunchHmm, system architecture?
09:30:36Araqtry with --gc:arc -d:useMalloc
09:30:47PMunchAraq, the weird thing is that it works for me
09:31:14dxdi don’t understand why either
09:32:33Araqwell it's DLLs, black magic :P
09:32:47PMunchHaha, true
09:32:59Araqis that still allowed? "black" magic? or am I racist now
09:33:09PMunchOh shit, good question
09:33:22FromDiscord<Recruit_main707> answer, dont give a fuck
09:33:37Araqmaybe we should s/black/white on Nim's repository. After all, you cannot be racist if you only care about white.
09:33:45PMunchI tried to argue that blacklist wasn't racist because black magic wasn't (because neither are actually about skin colour)
09:34:01dxdAraq, with --gc:arc -d:useMalloc nothing changes
09:34:21PMunchAraq, haha post that to Reddit/HN and grab some popcorn :P
09:35:13FromDiscord<Recruit_main707> dxd, you are compiling with the same flags as PMunch?
09:35:23FromDiscord<Recruit_main707> are you*
09:35:36PMunchHe should if he copied my luatest.nims file
09:37:07*brainbomb quit (Ping timeout: 272 seconds)
09:37:26FromDiscord<Recruit_main707> either a .nims file or compile it with:↵`nim c --app:lib --NoMain (--gc:arc optionally) luatest`
09:38:07dxdhttps://pastebin.com/FLDJL989
09:39:36FromDiscord<Recruit_main707> this is the dumbest question, but are you on windows or linux
09:39:50dxdlinux
09:40:06PMunchWell they have the Linux Nim compiler, so I would hope Linux :P
09:40:15dxdit's .so as you see
09:40:18dxdnot .dll
09:40:34PMunchAnd I assume that your "local path" thing is actually set to the correct path? :P
09:40:39FromDiscord<Recruit_main707> thats why it was a dumb question, but just to make sure :P↵i have no more ideas
09:40:56dxdyes, when the path is wrong it different error
09:41:14FromDiscord<Recruit_main707> he is getting seg fault, so it should have loaded it at least
09:41:28PMunchJust making sure you weren't pointing to an old .so you compiled and not the one generated by that Nim code.
09:41:43PMunchI've done that mistake before..
09:41:55FromDiscord<Recruit_main707> happens to the best of use yes...
09:42:00FromDiscord<Recruit_main707> us*
09:42:24PMunchWas that an edit, or did you manually type "us*"?
09:42:34PMunchJust trying to gauge how smart the new bot is :P
09:42:40FromDiscord<Recruit_main707> manually :P
09:42:44PMunchHaha, okay
09:42:57FromDiscord<Recruit_main707> this is what happens when i edot
09:43:02FromDiscord<Recruit_main707> (edit) 'edot' => 'edit'
09:43:29dxdcopied everything again to be sure, still fucking sigsegv(
09:43:36PMunchYeah I know, but we were talking about adding a "simplified" output for that scenario
09:43:47PMunchdxd, hmmm.
09:44:02dxd12falseTraceback (most recent call last)test.nim(21) luaopen_testSIGSEGV: Illegal storage access. (Attempt to read from nil?)
09:44:15dxdhttps://pastebin.com/12kN8YVF
09:44:25PMunchWhen did you install the lua library?
09:44:34dxdsudo apt install lua5.3
09:44:53PMunchAh no, the Nim library
09:45:20dxdnim code in same folder with lua
09:45:47PMunchHuh?
09:47:06*waleee-cl joined #nim
09:47:08dxdls -main.lua - test.nim - test.nims - test.so
09:47:12PMunchWhat is the output of this: find ~/.nimble/pkgs/lua-1.0 -type f \( -exec sha1sum {} \; \) | sha1sum
09:47:26dxd4d6fb74718fe6ce54d1ca6ff37ff7a787116fc88
09:47:35PMunchHmm, mine is 68e9fd441b9d43aef87a86738ed054774db5f589
09:47:52PMunchTry "nimble install lua"
09:47:52*oddp joined #nim
09:48:35PMunchAnd force overwrite
09:49:12dxdhttps://pastebin.com/pAc5mgwb
09:49:41PMunchWhat's the output now?
09:49:49dxd4d6fb74718fe6ce54d1ca6ff37ff7a787116fc88
09:49:57dxdlol what
09:49:58PMunchHuh, odd
09:50:18*brainbomb joined #nim
09:50:40PMunchWhat about: find ~/.nimble/pkgs/lua-1.0 -type f \( -exec sha1sum {} \; \)
09:51:55dxddamn
09:52:03dxd10 pastes per 24 hour
09:52:18PMunchHaha, use ix.io or something else :P
09:52:37dxdhttps://hastebin.com/rivekekawo.coffeescript
09:53:07dxdprefer hastebin)
09:53:39PMunchAh okay, it's the same
09:54:03PMunchOnly nimblemeta.json and the order is different
09:54:26PMunch(nimblemeta.json is probably different because the order of files is different)
09:54:27*chemist69 quit (Ping timeout: 260 seconds)
09:55:01dxdidk what to do with this strange nim error
09:55:13PMunchIt's weird indeed
09:55:21PMunchWhat Nim version are you using again?
09:55:25dxd1.2.0
09:55:26PMunch1.2.0 or 1.2.2
09:55:29PMunchHmm
09:55:30*chemist69 joined #nim
09:55:43PMunchI tried with both devel and 1.2.0 and both worked
09:55:57*couven92 quit (Read error: Connection reset by peer)
09:56:00dxdby the way can you try with lua5.1?
09:56:31PMunchI did try with 5.2 and got this error: http://ix.io/2pu1
09:56:40*couven92 joined #nim
09:56:49alehander92_wow
09:56:53alehander92_new github is different
09:56:54*narimiran quit (Ping timeout: 240 seconds)
09:57:08PMunchalehander92_, you're trying the redesign preview as well?
09:57:10alehander92_i enabled some kind of beta
09:57:12alehander92_yeah
09:57:29alehander92_i still remember the tomsky analysis
09:57:52PMunchTomsky analysis?
09:57:55dxduh shit
09:58:20alehander92_https://tonsky.me/blog/github-redesign/
09:58:23alehander92_tonsky*
09:58:28alehander92_i admit it might look a bit too miuch
09:58:36PMunchThe "Design updates" one is fine, not a huge fan of the round avatars but ok. But the "Repository refresh" is not great..
09:58:42alehander92_but i liked how it did put a lot of info in one place
09:58:51alehander92_without being too much
09:58:59alehander92_but of course probably they want something more minimal
09:59:07alehander92_what is the refresh thing
09:59:10alehander92_just the new main page?
09:59:55FromGitter<Vindaar> new repo page is fugly :|
10:00:16dxdok gonna try switch at windows
10:00:23*dxd quit (Remote host closed the connection)
10:00:25Araqfinal talk arrived!
10:00:30alehander92_ooh
10:00:33alehander92_is it moerm
10:00:35Araqwe can now proceed in planning NimConf 2020
10:00:55alehander92_i just want some proof assistants in my signature
10:01:22PMunchdxd, I'm on Linux as well..
10:02:12PMunchalehander92_, if you click you avatar and "Feature previews" you can toggle the different redesigns
10:02:19PMunch(really neat feature by the way)
10:02:34*literal_ is now known as literal
10:03:49Araqno, it's not moerm
10:04:15AraqI think it's "exelotl"'s talk but tbh
10:04:28AraqI'm confused with all the nicknames and real names
10:06:40PMunchHaha, yeah that confused me a lot during my first FOSDEM
10:07:21*narimiran joined #nim
10:07:26PMunchEspecially since we had a stand so it wasn't really obvious if the people there were Nim users I might know or just interested in Nim
10:09:22livcd_why is everyone linking tonsky today :|
10:12:39PMunchlivcd_, because of the new GitHub design?
10:12:50PMunchalehander92_, I'm with him up to Problem 5
10:13:07PMunchAnd Problem 7 is fine
10:17:03FromGitter<bung87> new design too bold to me
10:18:08FromGitter<bung87> maybe the word heavy
10:18:53*couven92 quit (Read error: Connection reset by peer)
10:19:11*couven92 joined #nim
10:19:23*couven92 quit (Read error: Connection reset by peer)
10:19:46*couven92 joined #nim
10:20:44*couven92 quit (Read error: Connection reset by peer)
10:21:19*couven92 joined #nim
10:21:34*fredrikhr quit (Ping timeout: 246 seconds)
10:26:25*dxd joined #nim
10:27:16dxdPMunch wtfff switched to windows and in console just 1, 2 and no errors or something
10:30:24*fredrikhr joined #nim
10:32:14*couven92 quit (Ping timeout: 240 seconds)
10:33:57*dxd quit (Remote host closed the connection)
10:37:00PMunchdxd, Windows probably hides SIGSEGVs or something
10:37:11PMunchidk, been ages since I used Windows
10:37:36FromDiscord<Recruit_main707> dll magic is even more magical on windows
10:46:20narimiran@exelotl you here?
10:56:28FromDiscord<Rika> why's `FileStreamObj` an `object of Stream` but `StringStreamObj` is `object of StreamObj`?
11:28:49krux02don't ask why.
11:29:43*Tlongir joined #nim
11:30:53*federico3_ is now known as federico3
11:31:07FromDiscord<exelotl> narimiran: yep, responded in nimconf channel
11:34:33FromDiscord<impbox> anyone know of an example of a nimble package that has a bootstrap tool that creates a new project, copying example data from the nimble package?
11:34:59FromDiscord<impbox> for nico I want to make a tool that bootstraps a new nico project and copies and example script and assets from the nimble package
11:35:06AraqRika: old code vs new code, it doesn't matter
11:35:23FromDiscord<Rika> which is the preferred one now tho?
11:35:26Araqin reality the code always inherits from the object type and never from a 'ref'
11:35:34FromDiscord<Rika> ah okay
11:36:13Araqmore idiomatic is 'of Stream' without the Obj
11:36:37FromDiscord<impbox> I guess I just need a way to find out where the nimble package is installed
11:37:50FromDiscord<impbox> basically copyDir from `$nimblePackageDir/exampleApp` to target dir
11:38:13FromDiscord<impbox> but i'm not sure how to find programattically where my nimble package is installed
11:45:27*tane joined #nim
11:48:45FromDiscord<Zed> anyone on who uses nim + emacs?
11:49:01FromDiscord<Zed> I cant seem to get nim completion working
11:49:13FromDiscord<Zed> it's really annoying
11:57:54zedeusyeah me
11:58:15zedeusit needs some configuration, one sec
11:58:32FromDiscord<Zed> im running doom emacs if that changes anything
11:58:45zedeusi use spacemacs, their nim setup is mostly the same
11:59:06FromDiscord<Zed> yeah
11:59:27zedeushttp://ix.io/2puz
11:59:59zedeusyou can remove the --threads:on line, only useful if you're working on a project that uses threads
12:02:29FromDiscord<Zed> Does autocomplete show up as you type?
12:02:41FromDiscord<Zed> or tab it like in vim?
12:03:14FromDiscord<Rika> you can make vim show autocomplete as you type tho
12:03:33*fredrikhr quit (Read error: Connection reset by peer)
12:03:48*fredrikhr joined #nim
12:04:15zedeusyeah I get autocomplete while typinf
12:04:22FromDiscord<Zed> yeah i know, but when using coc the auto complete list fills the screen
12:04:22*couven92 joined #nim
12:04:33FromDiscord<Zed> how do you turn that on?
12:04:40FromDiscord<Zed> im still trying to figure out emacs
12:05:06FromDiscord<Rika> it doesnt fill the screen for me? i use coc too, dunno what you mean by fill the screen
12:05:19zedeusidk what coc is, i use company for completion
12:05:28zedeusoh vim
12:05:32FromDiscord<Zed> yeah
12:05:43zedeuswell no reason to use vim anyway, its features are a subset of emacs :)
12:06:02*supakeen quit (Quit: WeeChat 2.8)
12:06:05FromDiscord<Rika> lol
12:06:15FromDiscord<Rika> i like having a pinky thanks
12:06:23zedeusme too, that's why i use evil-mode
12:06:29FromDiscord<Zed> lol same
12:06:35*supakeen joined #nim
12:06:38zedeusi don't use ctrl/meta bindings for anything
12:06:59FromDiscord<Zed> like this @Rika https://media.discordapp.net/attachments/371759389889003532/723146740965965844/Screen_Shot_2020-06-18_at_10.06.16_pm.png
12:07:09FromDiscord<Rika> ah, i dont mind that
12:07:13FromDiscord<Rika> i think theres a setting for it
12:07:21FromDiscord<Zed> I just want 5-10 completions i can scroll through
12:08:23*fredrikhr quit (Ping timeout: 260 seconds)
12:09:46FromDiscord<Zed> so i've got company installed
12:09:56FromDiscord<Zed> but it's still not showing up
12:10:04zedeusdoom should do all that stuff for you
12:10:50FromDiscord<Zed> that's what i thought but im still getting nothing
12:11:41zedeuswell i dunno, maybe check how spacemacs does it
12:12:11zedeushttp://ix.io/2puE
12:12:16zedeushere's my company config
12:12:52*dddddd joined #nim
12:18:33*clemens3 quit (Quit: rebot)
12:22:19*brainbomb quit (Ping timeout: 246 seconds)
12:27:14*brainbomb joined #nim
12:28:46*couven92 quit (Read error: Connection reset by peer)
12:28:55FromDiscord<Zed> hmm updating doom now..see if that does anything
12:29:06*fredrikhr joined #nim
12:29:42*couven92 joined #nim
12:31:34*brainbomb quit (Ping timeout: 240 seconds)
12:31:35krux02@Zed: I use nim and emacs
12:36:19FromDiscord<Zed> ok so fly check is working but still no autocompletion while typing
12:37:36*brainbomb joined #nim
12:39:00krux02Zed: how are you using fly check?
12:40:10krux02does it use nimsuggest?
12:40:22FromDiscord<Zed> no idea lol
12:40:30FromDiscord<Zed> nothing was working before
12:40:45FromDiscord<Zed> but i just updated doom and now flycheck is working
12:41:00krux02I worked on nim-mode and I basically redid all the syntax highlighting of nim-mode.
12:41:54krux02And I disabled flycheck by default, because it was unryable (ofting giving wrong errors because it doesn't detect the project root), eats up all system memory, and makes typing unbearably slow.
12:43:01krux02Syntax highlighting was also making it impossible to edit files with more than around 1k lines.
12:43:12krux02but that part I fixed.
12:43:29krux02I could never fix the performance issues of nimsuggest though, because I simly did not understand the code.
12:43:38FromDiscord<Zed> so i've got nim-mode, flycheck-nim and flycheck-nimsuggest installed
12:43:46zedeusi turn off flycheck often because nimsuggest is broken, but it can be useful
12:43:56FromDiscord<Zed> do you think i should remove both the flycheck ones?
12:44:02krux02yea
12:44:28krux02I recommend to use just the `compile` command from emacs instead.
12:45:03krux02There you can compile the project with just `nim c arg1 arg2 ...` like you would do on the terminal
12:45:20zedeusi have flycheck-nim installed, it works ok in most cases. i mainly get false errors from jester
12:45:30*team\andinus is now known as notandinus
12:45:44krux02but because the compile buffer is linked to your editing buffer, you can jump to the errors with M-n and M-p
12:45:48zedeuscompiling it manually from emacs works but it doesn't serve the same purpose
12:46:02krux02and if you bind `recompile` to a key, you can recompile with just a single button press
12:46:10krux02super handy, simple to use,
12:46:19krux02and 100% accurate.
12:46:31zedeusand slow if you're working with bigger projects
12:47:07krux02well it doesn't slow your editing
12:47:25krux02but yes to get feedback you have to wait for a few seconds.
12:47:32krux02I worked on the Nim compiler with this.
12:47:42zedeusthe point of flycheck is to show you errors while you're working, if you do a compile to see the errors that can take a few seconds, what's the point?
12:47:44krux02feedback was certainly fast enough
12:48:43krux02and the compiler usually provides you more than a single error to work on, so you can write your program and afterwards you fix all the problems with it.
12:48:54krux02it is not flycheck, that is true, but it is certainly productive.
12:49:18krux02And I couldn't handle the constant issues with flycheck anymore.
12:49:20zedeusi agree, but i'm not sure i would call it a replacement for what flycheck does
12:49:56krux02I think nim-mode has also integration with flymake. Maybe that is reliable like compile but with integration like flycheck.
12:50:01zedeusif you want emacs integration and a quick way to navigate errors, using `compile` is great
12:50:05krux02but I am not sure about that.
12:50:35zedeusnim-mode in general is quite unreliable for me, i often have to restart it
12:50:37krux02zedeus, yes
12:51:00krux02yea I am sorry about this unreliable part.
12:51:10krux02It was really a horrible code base I had to start with.
12:51:18krux02And I just could not fix the problems.
12:51:39krux02so convoluted complicated and full of feauters that caused more problems that it solved.
12:52:13zedeusyeah I took a look but quickly gave up
12:52:16krux02After all, only syntax highlighting is what I implemented, my knowledge of emacs wasn't high enough at that point in time to also address the other issues.
12:52:27*mfx joined #nim
12:52:36zedeusI'm glad I did the org-mode integration though, it's nice
12:52:45krux02I think the nimsuggest integration should be thrown away and written from the ground up.
12:52:56krux02There is no way to "fix" that mess.
12:53:20krux02you did the org-mode integartion? That one is really cool, I use it quite often.
12:53:31krux02well, I use it some times.
12:53:47krux02I did not have problems with it.
12:54:58krux02zedeus, btw the time I started with Nim I also started with emacs. And I spammed the original maintainer of nim-mode with pretty much humiliating issues reports and then he left.
12:55:03krux02Not very diplomatic.
12:55:32FromDiscord<Rika> how rude
12:55:47krux02But it was impossible to use.
12:56:19krux02opening some files just froze the editor and I had to disable flontlock-mode to be able to do anything.
12:56:37krux02But he came up with solutions like more options to control how many features of syntax highlighting should be enabled.
12:56:46krux02But the problem was structural.
12:57:02krux02Syntax highlighting was implemented in a way that it had to slow down the editor.
12:57:19krux02too much lisp code execution at every keystroke.
12:57:23*mfx quit (Quit: Leaving)
12:58:04krux02He probably just opened 10 line example files and tried to make them look as nice as possible, completely ignoring performance.
12:58:11*mfx joined #nim
12:58:37krux02anyway, I am way too emotional right now even though this is years ago.
13:00:38alehander92_let go man :D
13:00:43krux02I can't
13:01:24FromDiscord<Zed> *it's been so long, i dont know what a normal code base looks like, i just cant let go*
13:01:27krux02feature creep and this "being pround of super complicated fragile almost useless featueres" can really kill projects.
13:01:30alehander92_on the other hand i guess you're a good tester of nim stuff
13:01:41krux02am I?
13:01:42alehander92_yeah, i am very good at adding those
13:02:19*adnan338 joined #nim
13:02:27alehander92_well, if i give you a project and you feel its ok to use i'd probably be happy
13:02:47alehander92_btw what do you think of go's generics
13:02:51alehander92_they seem closer to reality
13:02:56krux02didn't take a look at them
13:03:05krux02I only heared about the rumors
13:03:14alehander92_they got a tool out which tests the waters
13:03:18krux02but never saw an example
13:03:29alehander92_https://blog.golang.org/generics-next-step
13:11:48FromDiscord<willyboar> too late for you GO... 😛
13:11:52FromDiscord<Rika> lmao
13:13:04*vsantana joined #nim
13:14:09*vsantana quit (Quit: leaving)
13:14:30*vsantana joined #nim
13:18:01krux02It is not too late for go to add generics.
13:18:09krux02I just skimmed over the document.
13:18:17krux02It looks reasonable at first sight.
13:18:28krux02But I am disappointed in the reflection section.
13:18:30shashlickLooking for feedback on https://github.com/nimterop/nimterop/issues/154#issuecomment-645110953
13:18:32disbotgetHeader should install binaries outside nimcache which can go away
13:20:46*skelett joined #nim
13:27:38*mfx_ joined #nim
13:35:14*clemens3 joined #nim
13:36:32*mfx_ quit (Quit: Leaving)
13:36:37*mfx quit (Quit: Leaving)
13:51:58*oddp quit (Read error: Connection reset by peer)
13:53:20*oddp joined #nim
13:59:27*oddp quit (Read error: Connection reset by peer)
14:20:40FromDiscord<impbox> yay managed to make a nico bootstrap app which installs a example code and data in a user specified directory \o/ helped me shorten my talk by about 10 minutes :3
14:25:28FromDiscord<Recruit_main707> so unroll is deprecated? :(
14:26:02*kenran quit (Ping timeout: 258 seconds)
14:27:54FromDiscord<mratsim> is it? it never worked anyway
14:28:00FromDiscord<mratsim> it was a placeholder
14:28:37FromDiscord<Recruit_main707> i know it didnt work, i just though it was a doesnt work *yet*
14:28:51FromDiscord<mratsim> for 4 years :/
14:29:36FromDiscord<Recruit_main707> it would have been useful
14:32:08AraqI can give you an unroll iterator
14:32:30Araqunrolling is useful but Nim can do it no less than 2 ways already.
14:32:41Araq1. multiple 'yield' statements in an inline iterator
14:32:46Araq2. via templates
14:33:01AraqIn fact, Nim's GC uses 2.
14:33:06*fredrikhr quit (Read error: Connection reset by peer)
14:33:45FromDiscord<Recruit_main707> id like to have a look at it
14:33:53*fredrikhr joined #nim
14:34:05FromDiscord<impbox> need a funroll iterator for more fun
14:36:08*fredrikhr quit (Read error: Connection reset by peer)
14:36:57*fredrikhr joined #nim
14:37:40*fredrikhr quit (Read error: Connection reset by peer)
14:37:58*fredrikhr joined #nim
14:38:01*lritter joined #nim
14:40:25*fredrikhr quit (Read error: Connection reset by peer)
14:40:36*fredrikhr joined #nim
14:40:44FromDiscord<Rika> and a sunroll iterator for sun?
14:41:05*kenran joined #nim
14:41:14zedeus\[T]/
14:42:59*fredrikhr quit (Read error: Connection reset by peer)
14:43:21*fredrikhr joined #nim
14:43:25*haxscramper joined #nim
14:43:46haxscramperHow can I skip dependency verification stage in `nimble test` and disable `incorrect structure` warning?
14:44:31*fredrikhr quit (Disconnected by services)
14:44:37*couven92 is now known as fredrikhr
14:44:52*couven92 joined #nim
14:45:26*kenran quit (Ping timeout: 256 seconds)
14:50:16haxscramperOr force nimble to always output colored text - there is `--noColor` option but it can only work for disabling color.
14:50:33FromDiscord<mratsim> @Recruit_main707 this is my unroll template: https://github.com/numforge/laser/blob/7b9fd9b32283fa13680ac5f7223fa31283c0d3a4/benchmarks/vector_math/bench_exp.nim#L113-L125
14:50:50FromDiscord<mratsim> And my unroll macro in my code generator: https://github.com/numforge/laser/blob/5213d6a4675d7635856bba02c290935e3d73743d/laser/lux_compiler/backend/legacy/lux_codegen_transfo.nim#L229-L292
14:51:10FromDiscord<Recruit_main707> thx
14:51:14Araqof course, allmighty mratsim does it too
14:51:16Araq:D
14:51:28FromDiscord<mratsim> lol
14:51:48FromDiscord<mratsim> I have to unroll by 4 to put them in SIMD vectors
14:54:56*aenesidemus joined #nim
14:57:09FromDiscord<Recruit_main707> now that hot code reloading was mentioned in #nimconf:↵https://play.nim-lang.org/#ix=2pvm↵can code be hot reloaded in this kind of situation?
14:57:26Araqso my HD is full because of all the NimConf talks
14:57:39AraqI can now remove from my computer
14:57:44AraqJava 8
14:57:46Araq- or -
14:57:47AraqGolang
14:57:54zedeuswhy not both?
14:57:55FromDiscord<Rika> hard choice
14:57:59Araqwhich one do you think takes up more memory?
14:58:01FromDiscord<Rika> good point
14:58:05FromDiscord<Rika> java
14:58:05FromDiscord<Recruit_main707> zedeus found the solution
14:58:08FromDiscord<nero> go
14:58:13AraqGo.
14:58:18FromDiscord<Rika> stop
14:58:51Araqperception, that's all there is
14:58:57zedeusthe only lightweight thing about Go is it's feature list
14:59:04FromDiscord<Rika> oof
14:59:04krux02Araq: buy a micro SD card, they you have at lest another 128GB free
14:59:04FromDiscord<Recruit_main707> lmao
14:59:33FromDiscord<Rika> at that point why not just buy an ssd
14:59:50krux02yea ssd hard drive anything
14:59:58krux02stores are still open
15:00:40krux02zedeus: I feel that you are not a fan of Go.
15:00:52FromDiscord<mratsim> "lol no generics"
15:00:52zedeushow could you tell?
15:00:54krux02I like go because of its lightweight feature list.
15:01:18krux02mratsim: That one is changing, I just read the proposal that is coming.
15:01:44AraqI don't see this "lightweight feature list", structs vs pointers, slices, arrays, interfaces, function pointers
15:01:52FromDiscord<mratsim> yeah more parenthesis, Go will take the best thing of Lisp and leave the cruft behind
15:02:07Araqit has more features than Java
15:02:30krux02But Java sucks.
15:03:14FromDiscord<nero> but it has a nice eco system
15:03:31krux02mratsim: you know that Go doesn't have macros, and that is the best part of lisp.
15:03:42Araqnow, I don't mind having features, but Go is all about perception
15:04:02krux02If go gets macros that are as powerfull as Nim macros, I might seriously consider going back to it. But I doubt it is possible.
15:04:04Araqthe illusion of simplicity when you never really look too closely
15:04:04FromDiscord<mratsim> Lisp has AST manipulation
15:04:17FromDiscord<mratsim> Go also has AST manipulation but it's ugly
15:04:38krux02mratsim: I have to take a look at that, I never knew about that
15:04:38AraqGo also has pragmas in source code comments
15:04:56Araqanyhow, it's #nim we can talk about Nim instead
15:05:03*unknown__ joined #nim
15:05:11FromDiscord<mratsim> Here you go: https://github.com/ConsenSys/goff/blob/master/internal/templates/element/base.go#L122-L137
15:05:19FromDiscord<mratsim> BigInt negation
15:05:32FromDiscord<mratsim> with static unroll of the for loop
15:05:51FromDiscord<mratsim> you run the go ast something on that template you get a go file that you can use
15:06:34leorize[m]reminds me of Araq's pascal preprocessor
15:06:35FromDiscord<mratsim> generated code: https://github.com/ConsenSys/goff/blob/master/examples/bn256/element.go#L143-L152
15:06:49FromDiscord<Rika> looks like c++ templates
15:07:03Araqleorize[m], how do you know about that one?
15:07:29FromDiscord<mratsim> Didn't you watch his NimCOnf talk? "Stalking the BDFL of Nim"
15:08:00AraqGo also has multiple inheritance via "struct embedding", lesson learned: features are only bad if you don't rename them
15:08:14leorize[m]i read the pascal nim code once while trying to trace a statement in the compiler to its root lol
15:09:36krux02Araq: can you elaborate on your sarcasm?
15:13:51Araqkrux02, here is an example. I think we can all agree that Go is strong about "there is one way to do it"
15:14:39Araqyet in Go I can use 'var x = 0' or 'x := 0' or I can write 'if stmt; cond { ...}' vs 'stmt; if cond { ... }'
15:15:17FromDiscord<Recruit_main707> x := 0 only works inside a function iirc
15:15:26Araqhow is that not in conflict with this "one way of doing things" design goal?
15:15:45AraqI tell you how it's not in conflict: nobody wrote a blog post about it.
15:15:46krux02yea I agree the := syntax is not best part of the language.
15:16:16krux02but the if stmt example, I don't see how that is a problem.
15:16:23Araqthat's all there is to it, perception. it's all in your head and some things are simply not talked about so they don't exist
15:16:58krux02well of course it is perception
15:17:14krux02programming languages are made for humans to instruct computers.
15:17:28*abm joined #nim
15:17:29krux02So how complex Humans pervieve tha language is very important.
15:17:53krux02Big example is GC, it is super complex, but it is percieved as simple.
15:18:03krux02not by everyone though.
15:18:23Araqno, that's just unscientific. a GC is simply to use, but hard to implement
15:18:29krux02And those where the illusion of simplicity falls apart might start looking for a new language
15:18:38Araq(roughly speaking, in fact, implementing a simple GC is well simple)
15:19:09krux02No a GC ist nat generally simple to use, because if you start to optimize for a GC you need to start learing about the implementation details of the GC
15:19:15FromDiscord<Rika> using a closure iterator emits a `RootEffect`?
15:19:17FromDiscord<Rika> why?
15:19:18krux02and that is everything but simple if the implementation isn't simple
15:19:18*couven92 quit (Read error: Connection reset by peer)
15:19:59Araqkrux02, well but not everybody has to tune the program for the GC
15:20:13krux02true
15:20:21krux02some some people have to
15:20:23Araqsometimes it's fast enough and you can care about correctness.
15:20:49krux02some people also care about optimal performance
15:21:06Araqalso
15:21:53Araqit's hard to implement a "stack" that works well for your function calls and value based datatypes
15:22:22Araqbut it works so well that nobody complains about its complexity
15:22:40Araqit's all delegates to LLVM / Intel engineers ;-)
15:22:43Araq*delegates
15:22:45FromDiscord<Rika> (oof)
15:22:47Araq*delegated
15:23:55shashlickthe quest for performance always takes you into difficult places - cannot expect to get it for free
15:24:11krux02Araq: For the use it is important to predect behavior and to have as little surprise as possible.
15:24:41krux02It doesn't matter if the implementation is hard or not. It just that usually a simple implementation is simple to predict.
15:24:59FromDiscord<Clyybber> @Rika Hmm, thats weird
15:25:55krux02Anyway, I won't put Go into the list of bad/uncool programming language, just because it has a weird variable declartion syntax
15:26:06krux02That is just not enough bad.
15:26:17FromDiscord<Rika> noticed when i tried using a closure iterator in a stream
15:26:26Araqthat's not what I said
15:29:14krux02It is the overall experience during Go development that was just smooth and almost frictionless, compared to the c++ CMake horror and nims .nimble/.nims/.nim.conf mess
15:29:30shashlickany ideas - https://github.com/nimterop/nimterop/issues/229 - freebsd compilation issue with clang / c++
15:29:32disbotBuild failure on FreeBSD ; snippet at 12https://play.nim-lang.org/#ix=2pvr
15:30:36FromDiscord<Rika> @Clyybber https://play.nim-lang.org/#ix=2pvs
15:30:52FromDiscord<Rika> or is it something else?
15:32:54Araqkrux02, I hate the config mess myself and it's all my fault
15:32:57FromDiscord<Rika> i must go now, i am sleepy, ping if i was just stupid or if you know why lol
15:33:11FromDiscord<Rika> why -> a rooteffect is being emitted
15:33:53FromDiscord<Recruit_main707> gn
15:33:55*nikita` joined #nim
15:34:57*unknown__ quit (Quit: Leaving)
15:35:23FromGitter<jason_koch_twitter> any help on this error? ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5eeb89bbe0e5673398be9027]
15:35:28FromGitter<jason_koch_twitter> it looks like the sigs match
15:35:54FromGitter<jason_koch_twitter> trying to pass a callback to a c function
15:36:27Yardanicocan you show libbpf_print_fn_t definition?
15:36:46FromGitter<jason_koch_twitter> ```libbpf_print_fn_t* = proc(level: libbpf_print_level, a1: cstring): cint {.cdecl, varargs.}```
15:36:53Yardanicowell yeah they're different
15:37:30FromGitter<jason_koch_twitter> i'm pulling the varargs wrong i assume
15:37:46FromGitter<jason_koch_twitter> that seems obvious now i'm looking at it
15:38:03Araqbut PMs and build systems are independent of programming languages
15:39:06krux02Not really.
15:39:45Araqyes, really. you can use C++ without Cmake and Nim without Nimble.
15:39:50*bung_ quit (Ping timeout: 256 seconds)
15:39:58krux02yes you can.
15:40:12krux02But you can't use Cmake with Nim or Nimble on C++
15:40:27*bung_ joined #nim
15:41:37krux02And Go was designed to not require a build system with configuration files for all pure Go projects.
15:41:38Yardanico@jason_koch_twitter not sure how to go about using C's varargs in nim - probably by using emit or importc? to use va_list
15:42:56krux02only when you need to run external tools during the build, for example code generators, The build process becomes more complicated.
15:43:12FromGitter<jason_koch_twitter> @yardanico i'm trying to call this ⏎ https://github.com/libbpf/libbpf/blob/v0.0.7/src/libbpf.h#L55-L58
15:43:22krux02With c++ you already need CMake or something similar if you want to integrate external libraries.
15:43:38Araqright. and fortunately Go isn't full of code generators now with its builtin generics and macros... hm
15:43:39FromGitter<jason_koch_twitter> library should call my fn with va_list, and i need to forward that to logger which takes a varargs[string, `$`]
15:43:40Yardanico@jason_koch_twitter oh it passes va_list explicitly
15:43:58Yardanicowell you can try to declare va_list type as
15:44:04Yardanico"type va_list {.importc, header: "<stdarg.h>".} = object" from nimterop
15:44:20krux02and nim never needs to run code generators during build, because of macros. So the build system has the potential to be just `nim c main.nim` for everything.
15:44:24krux02but it isen't.
15:44:33FromGitter<jason_koch_twitter> oh that's a good diea, then i can just pass on the va_list as an opaque object right?, don't need to understand it
15:44:53krux02or just `nim main.nim && ./main`
15:44:54Yardanicowell you'll need to deconstruct it into nim sequence or something if you want to pass it as nim's sequence or varargs
15:44:58Yardanicoproc myprint(level: libbpf_print_level, data: cstring, args: va_list): cint
15:45:05Yardanicoand then you can also import va_start, va_end from stdarg
15:46:02FromDiscord<Recruit_main707> i think thats enough go in #nim for now :P
15:47:03krux02it is
15:47:13Araqkrux02, now it's turning into a more fruitfull discussion. how can we make this happen
15:47:26euantorshashlick: I reported the FreeBSD compilation issue, just FYI. If you want anything trying out, just let me know
15:47:28Araqthere is this idea that we only really need 'import <url>'
15:47:47FromDiscord<Clyybber> it can only happen with nimble
15:48:01FromDiscord<Clyybber> nimble can have an update that makes us all use submodules
15:48:02FromDiscord<Recruit_main707> personally i dont like that (i do see it could be useful
15:48:11*tdc quit (Remote host closed the connection)
15:48:14FromDiscord<Clyybber> but thats really disruptive
15:48:27krux02well first of all I think, Nim should not know about nimble.
15:48:35FromDiscord<Clyybber> talking about disruptive, once nimph gets rid of its nimble dependency
15:49:01FromDiscord<Clyybber> we should have something like that
15:49:04krux02In other words, if you compile a file with `nim` it should now automatically put stuff from `~/.nimble` in the path
15:49:17Araqthere is an RFC for removing Nim's knowledge of Nimble from it
15:49:24shashlickThanks @euantor
15:49:55krux02that is a start.
15:50:30krux02I think if you want nimble packages on the path automatically, it should be `nimble` or one of its commands.
15:52:10krux02Then I don't like that you need to pass the backend to the `nim` command all the time.
15:52:26*haxscramper quit (Remote host closed the connection)
15:52:36krux02The should be a pragman in main.nim that defines the backend.
15:52:45krux02something like that.
15:53:18FromDiscord<Clyybber> eh; we have a backend switch now afaik
15:53:22FromDiscord<Clyybber> at least for the doc backend
15:53:30krux02Nim sees {.target: C.} and it will compile everything with C.
15:53:46FromDiscord<Clyybber> but I don't like the idea of having `nim somefile.nim` compile it
15:53:46krux02libraries should also have something like that.
15:54:00*tdc joined #nim
15:54:01FromDiscord<Clyybber> I think theres an RFC by cooldome about that
15:54:06krux02so that when you import a js wrapper in a C project, you will get an import error or something like that.
15:54:41krux02Clyybber: What is the problem with `nim somefile.nim` compile it?
15:54:56krux02that works in C++, too.
15:55:09krux02g++ main.cpp && ./a.out
15:55:19krux02I like it.
15:56:10*bung_ quit (Quit: Lost terminal)
15:56:12*bung quit (Quit: Lost terminal)
15:59:10FromDiscord<Clyybber> I don't like it because its not clear what it will do; will it compile and run it? evaluate it? docgen it?
16:00:01krux02To get dependencies from URLs go has a go get command that fetches all URLs. But a lot of people complained about the dependencies from URLs, because versions
16:00:20krux02so I think URL + tag/hash should work sufficiently.
16:00:27FromDiscord<Recruit_main707> but you cant use libraries without wifi then?
16:01:01krux02Recruit_main707: the url is only for fetching the dependency for the first time.
16:01:08krux02and to identify it.
16:01:10FromDiscord<mratsim> I'd like to be able to have specific files compile with specific target, for example CUDA
16:01:27krux02mratsim: Yes I do, too.
16:01:32krux02That is also what Go does.
16:01:35FromDiscord<Recruit_main707> krux02, but what happens if the lib gets updated
16:01:54FromDiscord<mratsim> I can mostly do that with localPassC now I have to check
16:02:04krux02Recruit_main707: nothing
16:02:33FromDiscord<Recruit_main707> then you use the outdated version? or the new one?
16:03:19krux02No autoupdating.
16:03:28krux02Automatic updates are bad.
16:03:47FromDiscord<Recruit_main707> how do you update it then?
16:03:48krux02We all know, when Java asks for an update, you say: "Not today".
16:04:17*vicfred quit (Quit: Leaving)
16:04:17krux02you just specify the new version on the import
16:04:32krux02and rerun the fetch command
16:04:46*vicfred joined #nim
16:05:02krux02The question remains though, where to put all the dependencies.
16:05:31krux02There are two options. Option 1 is put everything in a shared `/.nimpackages` directory, similar to nimble
16:06:09krux02The other one is to put the dependencies in locally into `dependencies/` subfolder that will be ignored by git.
16:06:22krux02I like the local dependencies subfolder.
16:06:39krux02But it means that you need internet to start a new project.
16:06:54krux02or add new dependencies
16:08:01FromGitter<bung87> if not a enterprise project,no need local package
16:08:38krux02There can be a local package cache as well.
16:09:20krux02Then the question is, what do you usually pass to the nim compiler if you need to do it?
16:09:35krux02These compiler flags should be removed one by one.
16:09:53FromGitter<bung87> for a company theu may need local version packages in case package author delete it from internet
16:10:18krux02bung87: good point
16:10:36*marnix quit (Remote host closed the connection)
16:10:48FromGitter<bung87> it just happens.
16:11:01krux02I mean Nim could also start to provide its own server infrastructure for packages.
16:11:09krux02for backup
16:11:22krux02something like maven maybe.
16:12:29krux02The last part is, look through project that can't be build with bare bone `nim c/cpp/js` and then try to figure out if there is a way to work around the additional required flags.
16:12:42FromGitter<bung87> yeah , other registry do so, they make package deleting more steps than publish
16:12:47krux02Last part is tests.
16:13:11krux02One thing that comes just to my mind are tests.
16:13:37krux02It is a very common pattern to declare `whenIsMainModule: test1(); tes2(); ...`
16:13:45krux02that is cool
16:13:56FromDiscord<Rika> I am still awake
16:14:14krux02but it requires to write a tool that scans through your project and runs all modules.
16:14:18*rokups joined #nim
16:14:19FromDiscord<Rika> I'm not a fan of links as imports
16:14:42krux02Rika: what is the problem?
16:14:45krux02too verbose?
16:14:50krux02too much information?
16:15:07FromDiscord<Rika> I don't exactly know how to say it
16:15:31FromDiscord<Rika> But I don't like the lack of separation between the package manager and the code
16:15:53FromGitter<bung87> not as i know ,is there language pack information including external dependencies?
16:15:55krux02I am also not the biggest fan of it, but it is certainly cool in Go. At loast to my personal experience. But maybe it is possible to extract the coolness without actually putting links as imports.
16:15:58*waleee-cl quit (Quit: Connection closed for inactivity)
16:16:57krux02An idea would be a dependencies section at the beginning of your project that declares package names and associates them with links where they can be found.
16:17:30krux02but after that initial declaration, the packages can be imported projectwide with their package name.
16:17:51Araqwell we can always fix Nimble instead of re-inventing it
16:18:05krux02well, I really want to make nimble obsolete.
16:18:22krux02that is my goal.
16:18:48krux02at least for the most part
16:19:44FromGitter<bung87> yeah , they can strictlly define what shoule be including in package info file and write in what format, but I Know most of them just describe it in readme
16:22:38krux02Araq: to make `nim main.nim` work with everything, nimble needs to be made obsolete.
16:23:00alehander92_why do people take inspiration from go and not from cargo
16:23:16krux02And that means to see what parts of nimble are actually usfull and reinvent them in the Nim compiler.
16:23:40FromDiscord<Clyybber> eh?
16:23:51krux02alehander92_: because Go in the language that I used for a long enough time to have a qualified opinion about it.
16:23:54alehander92_it seems to me that rust got its package manager story right sooner and go kept experimenting and the url things were weird (but i am absolutely a noob at package mans / cargo tho)
16:24:03FromDiscord<Rika> I don't like this
16:24:14alehander92_and people love cargo so much that many of them see it as one of the top rust's +s
16:24:23Araqalehander92_, it depends on the phase of the moon. we'll copy cargo again in 2 weeks.
16:24:39krux02I would even go so far to make `nim` work for all project, without specifying a main. Then nim compiler has to figure out on its own what the main file is.
16:25:12krux02By putting the right constrains on the project struture to make the main/entry point of the program always unique by construction.
16:25:22alehander92_Araq havent copied nix yet
16:25:36alehander92_(i know more cool words about tech i barely tried :( )
16:26:25alehander92_krux02 but how without specifying a special filename
16:26:32alehander92_like __init__.py style
16:26:43alehander92_there can be a nim.cfg main?
16:26:56FromGitter<bung87> dont like init file
16:27:12krux02alehander92_, for examples by specifying a special filename, like: The entry point shall always be main.nim
16:27:14FromGitter<bung87> py doesnot need it nowadays
16:27:24alehander92_krux02 but configurable , right?
16:27:34alehander92_bung87 huh how do they run folders
16:27:38alehander92_import*
16:27:52krux02alehander92_, the point is to eleminate the cfg file
16:28:07alehander92_but .. where would you put your flags
16:28:11krux02alehander92_, nope not configurable
16:28:13krux02fix
16:28:31krux02alehander92_, that is the point, you don't put flags
16:28:34FromGitter<bung87> dont need a dir contains a init.py , most of them just empty file
16:28:37FromDiscord<Rika> What's so bad about a configuration file
16:28:38krux02you just compile and it works
16:28:40FromDiscord<Rika> I don't get it
16:28:41FromGitter<bung87> looks silly
16:28:52alehander92_but its useful to be able to put flags somewhere
16:29:06alehander92_i know that i can run a bash file but .. then this doesnt work for windows etc
16:29:21krux02no bash
16:29:28krux02just `nim`
16:29:34alehander92_i mean, if i dont want to type all the options
16:29:40FromDiscord<Rika> And if they want to force a flag?
16:29:45krux02I said there are no options
16:29:47alehander92_do i have any other way to pass the flags
16:29:51krux02you just compile it.
16:30:00krux02no
16:30:04FromDiscord<Rika> This sounds incredibly limiting
16:30:08alehander92_yes, what i mean is do i have to always type `nim --myoptions etc`
16:30:10alehander92_well, that sucks man
16:30:15alehander92_i mean, it sounds good on theory
16:30:28alehander92_but cfg pays off imho for some scenarios
16:30:29krux02well you will still be able to pass flags, I don't want to remove that thing because so much already depends on it.
16:30:53FromGitter<bung87> I image that will be` when define install: requires ...`
16:31:45alehander92_and i am not sure why does package management need to be done by the compiler: separation of those two does seem sensible
16:31:54alehander92_it's more *minimalist* imo
16:31:55krux02But I want to make "passing flags to the compiler" superflous and deprecated
16:32:16alehander92_ah ok hm, but then how would you configure how it compiles your program
16:32:20krux02because if you "need" to pass a flag to nim, you need to look up that flag in the README to build it.
16:33:00krux02alehander92_, everything needs to be set in source
16:33:02alehander92_and if you use software, sometimes you need to read a bit of help
16:33:17alehander92_i mean, almost all cli software uses flags
16:33:25alehander92_people learned how to do this
16:33:41alehander92_krux02 but i might want to use all kinds of flags
16:33:43alehander92_with the same program
16:33:45FromGitter<bung87> maybe first step just make package structure constrain,then other pm follows
16:33:48alehander92_i did it before
16:33:55krux02and if it can't be set in source, it needs to be specified globally (true meaning of glbally, one value for the entire world)
16:33:57alehander92_i compile the same file with different flags
16:34:01alehander92_how can i set it in source
16:34:26alehander92_so, env variables?
16:34:31krux02alehander92_, no
16:34:35krux02maybe
16:34:45krux02I need to see the source file to give you an answer.
16:34:51alehander92_this doesnt make sense to me: the compiler is a function, it takes sources and it produces e.g. a binary,
16:34:57alehander92_i want to be able to pass args to it
16:35:09krux02But generally I want to take away the "pass flags to the compiler" tool.
16:35:16alehander92_instead of immitating that with some kind of i dont know what
16:35:29alehander92_krux02 ok imagine i compile the same file ui.nim
16:35:36alehander92_once to karax-based js file
16:35:45alehander92_and once to tui-cbackend-based binary
16:35:53alehander92_how do i do it in source
16:36:02krux02two projects
16:36:13FromDiscord<Rika> What
16:36:17krux02one karax-based project, one cbacked based project
16:36:31FromGitter<bung87> oh,that's weird
16:36:33krux02they can share the same tui
16:36:47alehander92_ah this makes sense
16:36:51alehander92_two files , right
16:37:12alehander92_and then if someone uses my program and needs to experiment, he plays with a third file
16:37:16Araqand never share a single file between them because then when you open this file in your editor it cannot determine the "project" anymore
16:37:19alehander92_i mean .. ok
16:37:24alehander92_but i wouldn't really use it
16:37:53krux02The current approach is, one project per folder.
16:38:04alehander92_ok, this is just burocracy
16:38:05krux02So the idea would alwas recursively search for the `main.nim`
16:38:08Araqbut we can blame Nim/Nimble about this problem and pretend it's not an intrinsic property of a hierarchical file system
16:38:41alehander92_krux02 sorry i just dont feel this is good
16:38:46krux02so another project means another folder. I am not saying this is the ultimate solution, but it would work reliable and never confuse any editor.
16:38:49alehander92_its very useful to tweak args etc on command line
16:38:55alehander92_instead of changing all in source
16:39:09krux02alehander92_, I disagree
16:39:12alehander92_but copying the same files in the other folder would be very hard
16:39:19alehander92_i mean, i dont want to copy them
16:39:20Araqit wouldn't work and it takes 1 minute to destroy the design
16:39:22alehander92_i want to reuse them
16:39:26krux02I prefear to tweak in source, because then you can commit it to VCS
16:39:38alehander92_krux02 but .. you have cfg files for that ..
16:39:40krux02you can't commit your command line flags
16:39:41alehander92_you can have both
16:39:50krux02nope no config files
16:40:00alehander92_so you take my option
16:40:02alehander92_just because
16:40:08Araqbut whatever man, keep believing in ideas that don't work if it keeps you happy
16:40:19alehander92_i mean, i am all for radical designs but i cant see how it helps me
16:40:23FromDiscord<Rika> What the heck
16:40:50FromDiscord<Rika> So the idea is to mould the config files into the source and remove flags, I don't understand what this solves
16:40:50alehander92_i understand having a separate config might seem undesirable
16:40:53alehander92_but it is useful
16:41:02FromGitter<bung87> whats the bad part of config file?
16:41:20krux02alehander92_, it is not just undesirable. It fucks up IDE support
16:41:36alehander92_well come on its much easier to somhow teach IDE-s to pick up my config
16:41:48krux02no
16:41:50krux02it's not
16:41:52alehander92_than to limit users so much
16:42:02krux02because you have to do it over and over and over and over again
16:42:02alehander92_well, all other compilers i think of take args
16:42:15krux02not all compilers
16:42:21alehander92_which one doesn't
16:43:41FromGitter<bung87> oh , sounds like a rollup.config.js file
16:43:46alehander92_i mean, its too much to need to copy your files in different folders
16:44:02alehander92_when i make a change, i need to always copy it again?
16:44:05alehander92_how does this work
16:44:33krux02Araq: I am sure it would work. It just breaks stuff.
16:44:48krux02maybe it can be made with just deprecation instead of breaking stuff
16:45:03krux02but I am 100% sure it would work.
16:45:14krux02It would fix all editor support
16:45:19krux02well not all
16:45:25alehander92_but how do all normal languages have ide support
16:45:32FromGitter<ynfle> Why is `nnkDotExpr` not in `nnkCallKinds`?
16:45:38krux02but it is always a big pain for editors to know your compilation flags.
16:45:59FromGitter<bung87> yeah thats true
16:45:59FromDiscord<Rika> I assume because not all dot expressions call a function
16:46:03alehander92_that's true, but there must be some middle ground
16:46:14krux02ynfle: because it isn't yet a call, it will be converted ito a call
16:46:30alehander92_ynfle yeah, and it might not be a call at all iirc
16:46:34alehander92_e.g. `a.field`
16:46:35FromGitter<ynfle> Thanks
16:47:07krux02but the compiler will convert it into a call
16:47:48krux02so when you have a typed macro argument, it will become a call if it actually is a function symbol.
16:47:55FromGitter<bung87> krux if it just works ,shoud it be in part of compiler ,not a build system?
16:48:30FromGitter<ynfle> Thanks
16:48:43krux02I think it should be part of the compiler
16:49:04krux02because onthere there it can reach enough people to make a differce.
16:49:43krux02alehander92_, Have you ever tried to have IDE support for languages like C++?
16:50:28FromGitter<bung87> if its just a package then user can easy give a try without breaking anything
16:51:04krux02if its just a package then it can easyly never make a difference
16:51:32alehander92_krux02 but this is ide's problem
16:51:33FromGitter<bung87> yeah, maybe people just dont try...
16:51:58alehander92_why should the user of a language be super-limited because ide-s are not perfect at config detection
16:52:18krux02alehander92_, no its a language problem when it is hard to provide ide support.
16:52:27alehander92_and it seems people still get by with most language like c#/java/typescript etc
16:52:32alehander92_ruby/python
16:53:18krux02Java and C# have very good IDE support.
16:53:23krux02Much better than Nim
16:53:26alehander92_but it *is* an ide problem
16:53:28FromGitter<bung87> no thats not same
16:53:31alehander92_if i could just easily tell the ide
16:53:37alehander92_now just use *this* config file
16:53:39FromGitter<bung87> nim is multi targets
16:53:45alehander92_or switch between all 3 in my project
16:53:45krux02In terms of IDE support I would even say that Java puts Nim to shame
16:53:48alehander92_it would be all fine
16:54:04alehander92_and i dont see how is this hard
16:54:26alehander92_its probably even an extension problem, ide-s provide the primitives probably
16:54:29krux02alehander92_, then go and fix for all Nim IDEs if it isn't hard.
16:54:48alehander92_well, what kind of argument is this
16:55:08alehander92_better than removing config + cli args all together just because of a theory
16:55:15FromGitter<bung87> well actually you can provide a status bar switch in Ide for that
16:55:15krux02Did you work on any Nim IDE support?
16:55:27alehander92_krux02 i work on an ide-like thing which supports nim
16:55:28krux02I can tell you, that I did work on nim-mode (emacs).
16:55:38krux02And I tell you, it is hard to solve generally.
16:55:59krux02If you would implement the constraints that I talked about, it wuold be trivial to support in IDEs
16:56:03alehander92_and i admit i havent experimented with the config stuff (because the focus was elsewhere mostly)
16:56:12alehander92_but i dont see whats the problem in
16:56:15krux02but you want to keep the problem hard.
16:56:32alehander92_but your solution make 5 other more important things impossible for me as an user
16:56:39alehander92_i genuinely want to like it but huh
16:56:41krux02so that every IDE implements a slightly different solution for it and it all becomes a big mess?
16:56:51alehander92_so again
16:57:01krux02what is impossileb?
16:57:31alehander92_sorry, harder,
16:57:35alehander92_i have my tui_project and browser_project
16:57:41krux02you need to adjust to new constraints that you didn't have befor. That isn't easy, true. But not impossle.
16:57:44alehander92_and they import the same 20 files
16:57:50krux02no it is not harder.
16:57:52alehander92_can i reuse those 20 files
16:57:54krux02It is just different.
16:58:27krux02yes of course you can
16:58:36alehander92_or, i write a lib which can be used with 20 combinations of flags
16:58:54alehander92_and i need to open a different project in my ide
16:58:58alehander92_for each test file
16:59:16alehander92_krux02 so how does the ide know how which config to use
16:59:23alehander92_when i edit a_imported.nim
16:59:28alehander92_the tui one or the browser one
16:59:43krux02it doesn't need to know
16:59:43alehander92_if i usually target both when writing changges
17:00:21alehander92_but it does, so it can e.g. check with the correct options
17:01:54FromDiscord<Shucks> Did anyone figured out how to debug a dll loaded by a process?
17:01:58krux02I said it already in the beginning, there is some detail working to be done.
17:02:04Yardanico@Shucks wdym?
17:02:09alehander92_but what's the whole point then
17:02:09krux02Some problems need to be solved differently
17:02:29krux02but the idea here is, everything is more autark.
17:03:25krux02alehander92_, I told you, get rid of the configuration messe.
17:03:32krux02mess
17:03:39alehander92_but you still need to solve the same problem
17:03:41alehander92_i write my ide
17:03:51alehander92_i want to semantically check a_imported.nim
17:03:52FromGitter<bung87> if it simpler and works i just wait and see
17:03:54alehander92_what do i do
17:04:00FromDiscord<Shucks> I got a program which loads my nim dll which currently causes a crash and I have no idea why. I can't get any error messages from the main program itself so I need to debug the dll itself
17:04:29FromDiscord<Shucks> if that makes sense
17:04:33Yardanicowell you can compile with --debugger:native
17:04:37Yardanicoand then use gdb to get a backtrace
17:04:40alehander92_like, you just move the cfg thing to "make a separate folder with a nim file instead of new cfg"
17:05:26alehander92_but an extension should be able to understand a simple option which says "use this cfg file / flags"
17:05:42alehander92_why is this so hard? probably i am missing something
17:05:48FromDiscord<Shucks> any other flags? Theres that much stuff like `--debuginfo` `--lineDir:on`
17:06:01krux02a_imported doesn't need to be imported to work
17:06:09FromDiscord<Shucks> and gdb just needs to be attached to the main program?
17:06:19krux02a_imported doesn't need to be imported to be checked for the compiler. You can compiler the library independently.
17:06:26alehander92_ok, but there is code inside defines there which only makes sense with some flags
17:07:20alehander92_it might even depend on having some of them e.g. when they pass consts
17:07:24krux02Shucks: Those flags are just for debugging, they would still remain compiler flags. You would never need them for IDE support or building a project for the end user.
17:08:19FromDiscord<Shucks> Um yea, I was asking how I can debug my dll
17:08:20krux02alehander92_, I would need to see the file to know.
17:08:20alehander92_and another problem is build systems might apply many env-based flags e.g. optimization etc based on external configs or CI-s
17:08:43alehander92_like : a huge thing would be to test my lib under a matrix of 5 different flag combos
17:08:50alehander92_i dont want to manually write down 25 files
17:09:13Yardanico@Shucks you just need --debugger:native
17:09:17krux02But for libraries that work for C and JS I thought about declaring that somewhere like: ``{.backends: [C, JS].}``
17:09:20Yardanicoand yes, then attach gdb to the main program
17:09:22alehander92_krux02 well, all files which do stuff like `when defined(stuff): var other = .. else: template other: etc`
17:09:25Yardanicoand what do you mean by the "crash"?
17:09:31Yardanicodoes it actually fail with SIGSEGV or something like that
17:09:36Yardanicoor just finishes with some exit code
17:09:52FromDiscord<Shucks> well yea getting sigsegv from some thread and thats it
17:09:58alehander92_krux02 but the backend command is just one example of all: e.g. `gc`, `defines` etc
17:10:10krux02that means you instantly get a compilation error for modlues that can't be compiled for that backend instead of failing somewhere else. And the module knows that it needs to be checked for errors in both C and JS.
17:10:19FromDiscord<Shucks> Cant actually browse between lines. Cant set any breakpoints on vscode aswell
17:10:39alehander92_krux02 but i want this module checked with some of my cfg options
17:10:46alehander92_because those are what i usually need anyway
17:10:50alehander92_not with some default ones
17:10:51krux02So you can get error reports on both branches of a `when` statement at the same time
17:11:06Yardanico@Shucks you can set breakpoints with gdb itself
17:11:12Yardanicoif you compile with --debugger:native
17:11:32Yardanicoand you can actually debug with gdb from vscode too :)
17:11:39Yardanicojust need a correct vscode debug task
17:11:57krux02Shucks: what is with the breakpoints on vscode?
17:12:06krux02Sorry gdb integration in vscode really sucks.
17:12:18alehander92_it kinda works, it just needs the correct setup iirc
17:12:24krux02I could not get that to work when I implemented it.
17:12:34alehander92_it does work well once one sets it up
17:12:51FromDiscord<Shucks> It works pretty good for me aswell if im compiling a binary
17:12:52alehander92_what people usually get confused is that top level variables in simple files
17:12:56FromDiscord<Shucks> but didnt got it working with a library yet
17:13:02alehander92_are not recognized as they are mangled iirc
17:13:16alehander92_but otherwise they maybe were pretty printed iirc
17:13:19krux02There are two problems, Generated Lineinfo for the nim files aren't that good. The second problem is, gdb integration into vscode isn't really good.
17:13:27alehander92_krux02 it is: it works
17:14:06alehander92_the lineinfo needs fixes tho yeah
17:14:22FromGitter<bung87> the config task can be easy as copy paste?
17:15:11FromGitter<bung87> i may copy to my extension
17:15:15krux02and if you use gc:arc, pretty printing functionality becomes worse in gdb.
17:18:06krux02my recommendation for gdb is, use the rbreak command when you want to break on function entry.
17:18:32krux02rbreak <funcname> will break on any function that has <funcname> in it.
17:18:54krux02In other words it doesn't care if there is name mangling involved.
17:19:12krux02it also works on generic functions as it will break on all generic implementations.
17:19:47krux02But I could not find any gdb terminal in vscode gdb integration.
17:20:29krux02I always use the emacs gdb integration. That integration as gdb as you can get.
17:20:44krux02it is like command line gdb, but everything is put into emacs buffers.
17:21:00FromDiscord<SeanOMik> Is there any way I could debug my Nim application?
17:21:08krux02yes
17:21:10krux02nim-gdb
17:21:10FromDiscord<Generic> echo 😛
17:21:27krux02nim c -g myprogram
17:21:42krux02nim-gdb --args ./myprogram
17:21:54FromDiscord<SeanOMik> Is there a way I could do it with VSCode?
17:21:55krux02rbreak myfunction
17:22:02krux02print arg1
17:22:24krux02SeanOMik: well there is some gdb VSCode integration. People say it kind of works
17:22:38krux02it is far from perfect though, maybe better than nothing.
17:22:38*endragor quit (Remote host closed the connection)
17:22:57FromDiscord<SeanOMik> Yeah I see that but I get an error when it tries to launch the `.exe`
17:23:05*endragor joined #nim
17:23:15FromDiscord<SeanOMik> Something like the `.exe` doesn't exist or is invalid
17:23:30krux02but last time I used vscode I could not find a gdb command line interface, I think that currently that is essential in debugging Nim.
17:23:55FromDiscord<SeanOMik> Theres a debug console
17:24:05FromDiscord<SeanOMik> But I cant type in it because I have to start a debugging session
17:24:18krux02does it allow you to write gdb commands such as `run` or `rbreak`?
17:24:24FromDiscord<SeanOMik> No
17:24:35FromDiscord<SeanOMik> I cant type in it because I cant start a debugging session
17:25:01alehander92_but otherwise it does
17:25:13alehander92_seanOMik maybe you dont pass the right path
17:25:22FromDiscord<SeanOMik> The path is correct
17:25:39FromDiscord<Shucks> you don't got gdb in path. Either setup nim/dist/mingw/bin/ to your path or edit the nim-gdb.bat in nim/bin/nim-gdb.bat
17:25:54*vikfret joined #nim
17:25:57FromDiscord<SeanOMik> I entered the path into explorer and it launches the `.exe`
17:26:00krux02SeanOMik: nim-gdb is a shell script, there is also a .bat substitution, but I did not write it, I can't guarantee that it would work.
17:26:13FromDiscord<SeanOMik> Oh I wasn't pointing to the one in the nim directory
17:26:13krux02But maybe you start with bare bone `gdb` to get started.
17:26:34krux02nim-gdb just tells gdb to load the nim pretty printers
17:26:40alehander92_hm i didnt realize nim-gdb works like that
17:26:41alehander92_cool
17:26:46alehander92_otherwise
17:26:47alehander92_http://ix.io/2pvY
17:26:52alehander92_is my vscode config
17:26:58FromDiscord<Shucks> me either. Nim-gdb makes variables and stuff more readable?
17:27:12krux02he is on windows
17:27:20krux02nim-gdb is a shell script
17:27:30krux02Shucks: yes
17:27:39alehander92_ahh
17:27:41krux02it shows seq string and enums.
17:27:47krux02But enums don't work all the time
17:27:49*endragor quit (Ping timeout: 264 seconds)
17:27:51FromDiscord<Shucks> good to know
17:27:53*dxd joined #nim
17:27:56krux02it also prints set[enum]
17:28:14alehander92_so i guess a combo of gdb path and nim-gdb in `.gdbinit` works?
17:28:20alehander92_krux02 i want to fix the case object stuff
17:28:24alehander92_for my job
17:28:48alehander92_once i tried to add some new runtime type info for branch<=>fields mapping
17:28:49krux02I wrote a test for nim-gdb but it isn't integrated into CI, so anybody could break the pretty printer at any time and no test would catch it.
17:29:11alehander92_but it never really got inside
17:29:19Yardanicowell RTTI is not the way to go anyway, maybe nim could generate some more native debugging info somehow?
17:29:22Yardanicohow C/C++ do that?
17:29:28FromDiscord<Shucks> still can't figure out how I could debug my dll. `gdb -p MainProcessPid` just tells me that no symbols are load
17:29:35krux02I didn't find `.gdbinit` useful for anything.
17:29:38alehander92_well probably dwarf, but the case<=>field stuff seems pretty nim specific
17:29:42dxdhi! can i translate this headers to nim? c2nim is throwing errors
17:29:42dxdhttps://github.com/Facepunch/gmod-module-base/tree/development/include/GarrysMod/Lua
17:29:55krux02it is constantly disabled for "security" rendering it completely useless
17:30:16FromDiscord<Recruit_main707> dxd, c2nim will require you to modify the headers
17:30:17alehander92_but we can look at e.g. rust enum gdb support
17:30:25Yardanicodxd: c2nim supports C++ but you need some manual work
17:30:27alehander92_they might be kinda similar
17:30:31krux02I don't know how to fix the case object stuff. currently it prints everything as far as I can tell.
17:30:40alehander92_yeah, i wanted to be able to just
17:30:46alehander92_detect the active branch fields
17:30:47dxdRecruit_main707, Yardanico, and what should i do?
17:30:51*oddp joined #nim
17:31:10alehander92_yardanico i am not sure whats the problem with purely debug-only rtti
17:31:16Yardanicodxd: either manually wrap it or you can just use C++'s backend to use these headers with importc/importcpp
17:31:18krux02alehander92_, that is something that only the Nim compiler knows.
17:31:30alehander92_exactly, so it needs to produce that info somewhere
17:31:38krux02yes
17:31:43alehander92_i had a PR
17:31:45alehander92_to the compiler
17:31:59FromDiscord<Recruit_main707> dxd, this is for c, maybe you can extrapolate some things https://blog.johnnovak.net/2018/07/07/creating-a-nim-wrapper-for-the-fmod/
17:32:02alehander92_that did that, but i am not sure what state i left it in
17:33:14alehander92_https://github.com/nim-lang/Nim/pull/9949
17:33:15disbotAdd data about variants in debug mode
17:34:33alehander92_it seems i forgot about it
17:37:07FromDiscord<Shucks> nim-gdb just seems to work for linux
17:37:10FromDiscord<Recruit_main707> dxd. you should check https://github.com/genotrance/nimgen↵aswell
17:39:23dxdi will try
17:42:25dxdi don’t think it is very different from c2nim, the same errors
17:45:15shashlick@euantor: you here?
17:46:10euantorshashlick: yeah, just about to eat dinner though
17:46:57shashlickdid you set gcc.linkerexe = "clang++" or clang.linkerexe = "clang++"
17:47:15shashlicki should probably just remove that when/else
17:48:04euantorAh, I did the latter. I’ll try that change once I finish eating
17:48:16*vsantana_ joined #nim
17:48:41euantorI just changed the g++ in the quotes and that’s it
17:49:34*vsantana quit (Ping timeout: 246 seconds)
17:50:04*dxd quit (Ping timeout: 245 seconds)
17:50:36shashlickya need to change both since you are using clang as your default compiler
17:51:06shashlickbest to just say - switch("gcc.linkerexe", "g++"); switch("clang.linkerexe", "clang++") without any when/else
17:51:11euantorYeah, will try it and let you know
17:51:29shashlickcool thanks
17:57:24Araqcontroversial RFC incoming, https://github.com/nim-lang/RFCs/issues/236
17:57:26disbotDeprecate the 'defer' statement from Nim ; snippet at 12https://play.nim-lang.org/#ix=2pwd
17:59:25*casaca quit (Remote host closed the connection)
18:00:55FromDiscord<mratsim> so we can't have a go syntax skin anymore?
18:01:05FromDiscord<mratsim> are you removing interface from the keywords as well?
18:01:49*vsantana_ quit (Quit: leaving)
18:02:24livcd_oh no so forward declarations and defer are going away?
18:02:34Araqhuh?
18:02:44livcd_you mentioned earlier
18:03:06Araqno, on the contrary, the need for forward decls should be removed
18:03:17livcd_ahh
18:03:40*waleee-cl joined #nim
18:03:47Araqmratsim: "inferface" is a keyword without an implementation.
18:04:08Araqit doesn't cost us development effort, I fail to see the connection.
18:04:08FromDiscord<mratsim> yeah I know 😉
18:04:18FromDiscord<mratsim> it was a joke
18:04:30Araqno, I'm not gonna remove everything from Nim that I personally don't like
18:04:32FromDiscord<mratsim> it's go day today
18:04:59Araqbut some things have a bad benefit/cost ratio
18:05:24oddpWhat are some other pain points on your list?
18:06:13oddpWhat else needs to go further down the line?
18:06:23FromDiscord<mratsim> enums with holes?
18:06:27Araq'defer', "implicit items/pairs iterators", "different scopes for iterators and procs", 2 config systems
18:06:31euantorshashlick: hooray, we have liftoff!
18:06:41euantorWill open a PR with the change
18:07:15Araqenums with holes can stay.
18:08:02FromDiscord<mratsim> party in da house!
18:08:34Araqoh and methods and converters could see some patches too.
18:09:24AraqI have an alternative for 'static T' that would make the bugs much easier to fix but @zah doesn't agree
18:09:25FromDiscord<mratsim> (vtable)
18:09:49Araqmaybe I should write the RFC anyway
18:09:57FromDiscord<Clyybber> what is the alternative?
18:09:58FromDiscord<mratsim> didn't timotheecour already propose 3 or 5 fixes to that?
18:10:54shashlick@euantor awesome! Thanks for persisting
18:10:55FromDiscord<Clyybber> you mean the aliasSym thing?
18:11:50*alehander92_ wow so many results
18:11:55AraqClyybber: in a nutshell it's "simply allow values to be passed to generic parameters"
18:11:56alehander92_huh how did i do that
18:12:27FromDiscord<Clyybber> Araq: Ah.
18:12:28euantorJust got to hope the CI doesn't complain
18:16:57FromDiscord<Shucks> What exactly does `nim-gdb` do? It seems like its joining my executable path incorrect on windows.
18:16:59FromDiscord<Shucks> `"G:\Coding\Nim\Tests/gdbtest.exe": not in executable format: File format not recognized`
18:17:45*endragor joined #nim
18:19:23YardanicoBy the way, I wonder if there's any reason not to use --opt:speed even by default in debug builds?
18:19:38YardanicoBecause all nim stacktraces and stuff will still be enabled, so are there any drawbacks?
18:20:35FromDiscord<mratsim> some bugs only happen when you don't compile with -O3
18:20:43Yardanicooh, maybe also longer compile times
18:20:47Yardanicoforgout about that
18:20:51Yardanico*forgot
18:20:54FromDiscord<willyboar> alehander92 we should organize the talk after the conf
18:21:02alehander92_ok
18:21:22Yardanicoit's just from https://forum.nim-lang.org/t/6444 again
18:21:23FromDiscord<mratsim> I'm not too worried about the compile-time on the C side
18:21:23alehander92_just setup a time guys, i am usually ok if its not on sunday
18:21:33Yardanicothat person got hit by https://github.com/nim-lang/Nim/issues/14272 :P
18:21:34disbot-d:release -d:danger don't work as expected in user configs ; snippet at 12https://play.nim-lang.org/#ix=2leZ
18:21:39FromDiscord<willyboar> until now i really totally agree w/ PMunch approach
18:22:49*endragor quit (Ping timeout: 246 seconds)
18:23:26*solitudesf- joined #nim
18:26:37*solitudesf quit (Ping timeout: 264 seconds)
18:30:55*solitudesf- quit (Remote host closed the connection)
18:31:17*solitudesf- joined #nim
18:32:09*NimBot joined #nim
18:35:06*natrys joined #nim
18:38:45*kenran joined #nim
18:40:40shashlickwhy is marshal not supported with --gc:arc
18:40:56FromDiscord<Recruit_main707> smh
18:41:11Yardanicoshashlick: because it uses typeinfo
18:41:25Yardanicowhich is module to work with nim's RTTI
18:42:09shashlickokay what's the alternative
18:42:23Yardanicohttps://github.com/status-im/nim-json-serialization/tree/master/json_serialization ?
18:42:26Yardanicohttps://github.com/status-im/nim-json-serialization
18:43:24shashlickgreat - more dependencies
18:43:30Yardanicoyou can try json.to
18:43:42Yardanicoand %
18:43:58*rokups quit (Quit: Connection closed for inactivity)
18:44:09shashlickjust when i thought I was done - ugh
18:44:33Araqsorry
18:44:48FromDiscord<Shucks> hallelujah https://media.discordapp.net/attachments/371759389889003532/723246844037300264/gdb.png
18:44:54shashlickI need to add some --gc:arc tests to nimterop
18:45:10FromDiscord<mratsim> what, how? @Shucks I've given up
18:45:17FromDiscord<mratsim> it worked for me once, 3 years ago
18:45:24Yardanico@mratsim it's easy to set up
18:45:28Yardanicowell not hard
18:45:32shashlickplease document!
18:45:34YardanicoI think we talked in the chat here too
18:45:38Yardanicoand alehander helped me
18:45:41FromDiscord<mratsim> please make a blog post
18:46:48FromDiscord<Shucks> I guess I did nothing fancy. Mostly just used the standard launch.json. Let me paste it
18:47:02FromDiscord<Shucks> https://paste.sh/IFvIbHyD#c7SA9BO2H4cmZtwbO8Ypra7U
18:47:30Yardanicoyou can paste right in discord too :)
18:47:48FromDiscord<Shucks> dont wanna flood that chat ;D
18:47:49FromDiscord<Shucks> brb
18:50:46*vikfret quit (Quit: Leaving)
18:51:53*clemens3 quit (Read error: Connection reset by peer)
18:53:05*casaca joined #nim
18:53:06*casaca quit (Excess Flood)
18:54:05*casaca joined #nim
18:54:06*casaca quit (Excess Flood)
18:55:05*casaca joined #nim
18:55:06shashlickpeace - marshal => json was seamless
18:55:06*casaca quit (Excess Flood)
19:03:12shashlickMarshal could handle nested which is why I ditched json
19:03:30shashlickBut I had removed nesting so it worked
19:03:34Yardanicowell % handles nested just fine
19:05:37*fredrikhr quit (Ping timeout: 264 seconds)
19:05:44shashlickNot nested sorry, cyclic
19:05:48Yardanicooh
19:06:27disrupteki think the problem with defer is composition and reasoning, legibility.
19:13:09FromDiscord<Recruit_main707> now that the chat is more calmed, https://play.nim-lang.org/#ix=2pwD↵can hot code reaload work in a situation like this? ^
19:13:55Yardanico@Recruit_main707 yeah sure why not
19:14:00Yardanicowhy did you use noreturn btw? :P
19:14:07YardanicoI mean it's okay but I'm just curious
19:14:14FromDiscord<Shucks> Wait? Nim can hot code reload?
19:14:21Yardanicohttps://nim-lang.org/docs/hcr.html
19:14:35Yardanico@Recruit_main707 you'll have to split into modules though
19:15:09FromDiscord<Recruit_main707> thats the thing, the main module calls the loop that would need to check wether to hot reload or not
19:15:50*kenran quit (Ping timeout: 258 seconds)
19:16:12FromDiscord<Recruit_main707> ...unlike the example in that web
19:18:54FromDiscord<Clyybber> @Recruit_main707 you mean you want to reload the body of the loop?
19:19:08FromDiscord<Clyybber> you can just extract out the contents into a proc
19:19:09FromDiscord<Clyybber> ¯\_(ツ)_/¯
19:19:55FromDiscord<Recruit_main707> not sure what you mean, i want to reload the code of the main module, but from within my library
19:20:06Yardanicoso put the while loop in the main module
19:20:19Yardanicoand make it call a proc in that loop
19:20:31Yardanicoso you can reload the other module from the main module
19:20:38Yardanicoanyway I've never used nim's hcr myself :P
19:21:00FromDiscord<Recruit_main707> no, i reload the main module from the other module
19:21:05Yardanicowat
19:22:49FromDiscord<Recruit_main707> check the code again, Nimbot.nim is the main module, that calls receive-and_respond() from the other module (RLNIM.nim), which should hot reload the code in the main module (Nimbot.nim).
19:24:00FromDiscord<Recruit_main707> (get_output is declared in the main module)
19:24:00FromDiscord<Recruit_main707> https://play.nim-lang.org/#ix=2pw
19:24:14shashlickwhy not deprecate marshal and point users to json instead
19:29:27shashlickhttps://github.com/disruptek/gittyup/pull/8
19:29:29disbotFix static test
19:29:43*Jesin quit (Quit: Leaving)
19:36:38*Jesin joined #nim
19:38:53planetis[m]do you guys want random numbers from gauss distribution in std / random?
19:39:09FromDiscord<mratsim> wasn't there a commit already that added that 2 weeks ago?
19:39:24FromDiscord<mratsim> 2 months*
19:40:38Yardanicohttps://github.com/nim-lang/nim/search?q=gauss&unscoped_q=gauss 0 results hmm
19:41:01FromDiscord<mratsim> I may misremember, it may have been in a repo i watch
19:41:11Yardanicoyeah I vaguely remember something like that too
19:41:37FromDiscord<mratsim> I think <@723185752128618619> has a gaussian based on the Ziggurat method which should be the fastest
19:41:44FromDiscord<mratsim> I have one using circles
19:42:55shashlickstill need to use marshal on Nim < 1.2.0 but there's no arc so its okay
19:43:07Yardanico986 members on the discord server btw
19:43:19FromDiscord<Recruit_main707> hype
19:43:23shashlickhttps://travis-ci.org/github/nimterop/nimterop/jobs/699839409
19:43:36Yardanicowill need to put a post in #announcement s about nimconf again
19:43:40shashlickUnable to create constructor for: nnkRefTy
19:43:44*haxscramper joined #nim
19:43:45Yardanicowhen the schedule will be out
19:44:32Yardanicoso uhh
19:44:34haxscramperHow to iterate over proc parameters? Similar to `fieldPairs` but for `proc(...)`
19:44:38planetis[m]i benchmarked ratio method from gsl and python and also polar from alea
19:44:39*drewr quit (Quit: ERC (IRC client for Emacs 26.3))
19:44:54Yardanicohaxscramper: you'd need a macro for that I think
19:45:06Yardanicoalso - we agree that we'll ping everyone on discord when nimconf will be about go start? :P
19:45:14Yardanicolast time I did that some people were upset :P
19:45:24Yardanicoand I did it with @ here (only people who are online), not @ everyone
19:45:42Yardanicowell anyway I guess if they don't want nim-related announcements they can leave the server :P
19:46:14planetis[m]frankly I saw no difference, I even counted the loops and it was the same
19:47:41haxscramperAnd second question: is there any way to get return type of the callback proc? I have callback in form of `cb: (proc(a: T): T) | (proc(a: T): Option[T])` and need to select return type of the main proc based on return type of the callback.
19:48:14planetis[m]can you try this: https://gist.github.com/b3liever/23505f9b47124bc9cc40e60d7279b067
19:50:02*drewr joined #nim
19:51:50FromDiscord<Generic> haxscramper: you can try when type(cb(T()) is Option[T]: or something like that
19:52:02shashlickg d
19:55:05planetis[m]krux02 has written it https://github.com/krux02/arnelib/blob/master/src/ziggurat_normal_dist.nim
19:55:18planetis[m]who is 723185752128618619 ?
19:58:49planetis[m]i think 3 * 128 * 8 bytes for precomputed tables is pretty bad for the stdlib
20:00:05planetis[m]if only can give me some numbers bc in my system there is alot of noice, can't get a meaningful result
20:00:20planetis[m]*can someone
20:08:00*haxscramper quit (Remote host closed the connection)
20:10:17*Jesin quit (Quit: Leaving)
20:12:38FromDiscord<mratsim> will run
20:12:52FromDiscord<mratsim> that's a lot of bytes
20:13:49planetis[m]ok bits :)
20:14:19FromDiscord<mratsim> https://gist.github.com/b3liever/23505f9b47124bc9cc40e60d7279b067#gistcomment-3346707
20:14:33FromDiscord<mratsim> 7ms is a bit low
20:14:34*Jesin joined #nim
20:14:48FromDiscord<mratsim> I'll try doing more iteration to reduce the noise
20:16:06FromDiscord<mratsim> seems like there is almost no diff
20:16:11planetis[m]thank you
20:17:33FromDiscord<willyboar> I was thinking that will have to revive awesome-nim. Curated packages are cool but difficult to find them.
20:17:56FromDiscord<mratsim> THe maintainer was looking for a new maintainer
20:19:27FromDiscord<willyboar> i think it would be best to move it into nim-lang and add some extra people to maintain it.
20:21:20*endragor joined #nim
20:24:49shashlickanyone know how to get mingw + cmake to cooperate with a visual studio lib file - https://travis-ci.org/github/genotrance/travister/jobs/699799263#L678
20:27:10*nsf quit (Quit: WeeChat 2.8)
20:27:13*endragor quit (Ping timeout: 264 seconds)
20:30:35FromDiscord<Luk> What are my benefits of nim over other languages like V or Go?
20:32:37disruptekshashlick: i merged your gittyup pr but it still doesn't work for me.
20:32:56disrupteki guess i need static-everything-else, huh?
20:33:43FromDiscord<Generic> @Luk it depends on what you're working on
20:33:59FromDiscord<Generic> for me is the portability a huge argument
20:34:16FromDiscord<Luk> Webserver, and CLI software
20:34:58FromDiscord<Generic> I'm honestly not too familiar with those stuff, so someone else might be better at arguing this
20:35:24FromGitter<Knaque> Out of sheer curiosity, is it possible to make a custom "assignment" operator? So you could have something like `var x is "Hello"`. I'm not actually gonna *use* this of course, just curious if it's possible.
20:35:46FromDiscord<Generic> but I've seen some pretty cool CLI DSL's for argument parsing
20:36:20FromDiscord<willyboar> @Luk for web there is huge potential.
20:36:44FromDiscord<Generic> yeah, the potential for DSL's doesn't stop there
20:36:47FromDiscord<Luk> I mean simple stuff too , compilation speed binary sie etc
20:37:05FromDiscord<Luk> *size
20:37:45FromDiscord<Generic> Nim binaries can be pretty small
20:37:57FromDiscord<Generic> I don't know if Go has improved in this regard
20:38:17FromDiscord<Generic> but atleast when I was using it Nim was easily beating it
20:38:25FromDiscord<Generic> that was few years ago
20:38:28disrupteki guess the thing to do now is compression and stuff.
20:38:30FromDiscord<Luk> Vlang just created a 181byte hello world
20:38:42disrupteklike, there's a whole ecosystem of tools to shrink go binaries.
20:38:46FromDiscord<Luk> Nim was some kbyte
20:38:54FromDiscord<Shucks> Is Vlang even open source now?
20:39:02FromDiscord<Luk> ?
20:39:10FromDiscord<Generic> I think it is, but it's still a bit dubious
20:39:13FromDiscord<Luk> Was it closed source?
20:39:22FromDiscord<willyboar> IMHO opinion you should try use nim to build something simple and you would never go away
20:39:45disruptekwillyboar: whaddya mean?
20:39:49FromDiscord<willyboar> (edit) removed 'opinion'
20:40:28FromDiscord<willyboar> 😛
20:41:00shashlickdisruptek: what do you mean?
20:41:10FromDiscord<willyboar> build something w/ nim == fall in love with nim
20:41:12shashlickthe libdir fix is still not released
20:41:16FromDiscord<Luk> I just want to know why nim exists still, am i missing some feature ?
20:41:43FromDiscord<Luk> I mean compared to vlang its ... Slow and big
20:41:53FromDiscord<Generic> slow?
20:41:54disruptekshashlick: i know, but i cannot statically link libgit2 on linux due to ssh2 iirc.
20:42:01FromDiscord<Generic> do you mean compile time slow?
20:42:09FromDiscord<Generic> or producing slow executables?
20:42:14FromDiscord<Luk> Compile- runtime slow
20:42:26shashlickdisruptek: that's on windows i think
20:42:26FromDiscord<Recruit_main707> lel
20:42:33FromDiscord<Generic> because both Go and V are significantly less complex afaik
20:42:34shashlickbut with the new nimgit2 it should be better
20:42:35disruptekshashlick: i'm using linux right now.
20:42:40FromDiscord<Generic> in terms of what they can do with generics
20:42:41shashlickprecompiled binaries
20:42:48FromDiscord<Generic> and macros
20:42:50shashlickproblem is that conan and jbb have old versions of nimgit2
20:42:53shashlick0.28.3 is latest
20:43:04shashlickso your 1.0+ stuff is not possible yet
20:43:06FromDiscord<Recruit_main707> Luk: first of all, Nim has macros, which means that some code is run at compile time
20:43:15disruptekyou want to distribute libgit2 binaries?
20:43:32FromDiscord<Recruit_main707> (which are already a feature that makes it better than go and v by itself imo)
20:43:57FromDiscord<Luk> Hm, noted
20:44:04shashlickstatic link is also possible
20:44:27FromDiscord<Recruit_main707> second, nim is (except a few situtations) almost as fast as c
20:44:31disrupteknimterop 0.5.9 produces: Unknown short option: "f"
20:44:49FromDiscord<Recruit_main707> you probably are not compiling it with -d:release or -d:danger
20:44:51shashlickehmm
20:45:16FromDiscord<Luk> Well, Vs New Backend makes it almost faster than c
20:45:18*natrys quit (Quit: natrys)
20:45:30shashlickdisruptek: snippet?
20:46:01FromDiscord<Luk> GCC and LLVM are bloat so v made its own Backend, compiling to smaller and faster bins
20:46:13FromDiscord<Generic> they totally aren't
20:46:30FromDiscord<Generic> they are decades of optimisations put into them
20:46:32disruptekshashlick: http://ix.io/2pxn/nim
20:46:38disruptekshashlick: cannot run `nimble test`
20:46:51FromDiscord<Luk> And still slower than nim ?
20:47:00FromDiscord<Recruit_main707> personally, i dont know v, so i cant talk about it, but as a third oint, i would say its clean and super flexible syntax is also really good
20:47:03FromDiscord<Luk> Or V
20:47:35FromDiscord<Recruit_main707> can we see those benchmarks btw?
20:47:41disruptekhas anyone written any significant software in v that anyone can evaluate?
20:47:52FromDiscord<Luk> Volt
20:47:59disruptekwhere's the source?
20:48:05FromDiscord<Luk> Github
20:48:07*bung joined #nim
20:48:17disruptekwhere?
20:48:27disruptekis this the only existant application?
20:48:37disruptekhave you ever spoken to a v programmer?
20:48:37*endragor joined #nim
20:48:54FromDiscord<Luk> But even hello world is smaller and faster
20:48:54disruptekbecause, y'know, most of us have written 10s of thousands of lines of nim.
20:48:56FromDiscord<Recruit_main707> bro disruptek, its not about attacking V
20:49:07disrupteki'm just curious about it.
20:49:16disrupteki'm surprised anyone would think it's comparable to nim.
20:49:26FromDiscord<willyboar> by the way to the web part here : https://github.com/the-benchmarker/web-frameworks
20:49:28FromDiscord<Luk> I have talked to the main Dev Alex
20:49:29FromDiscord<Recruit_main707> (ok, its just that in plain text it can sound a bit agressive :P )
20:50:00disrupteki still cannot find the source to volt. is it not under /vlang?
20:50:03disruptek!repo volt
20:50:04disbothttps://github.com/voltrb/volt -- 9volt: 11A Ruby web framework where your Ruby runs on both server and client 15 3272⭐ 205🍴 7& 29 more...
20:50:12disruptek!search volt language:vlang
20:50:13disbothttps://github.com/vlang/v/issues/4059 -- 3Comparison with zig 7& 8 more...
20:50:19disruptek!search volt language:v
20:50:20disbothttps://github.com/vlang/v/issues/4059 -- 3Comparison with zig 7& 8 more...
20:50:26FromDiscord<Shucks> Dont we had that Vlang vs Nim already here: https://forum.nim-lang.org/t/4758 ;p
20:50:50disrupteki have more nim repositories than v has vlang repositories.
20:51:38solitudesf-there was a volt repo, but it was too much of a vaporware to exist
20:51:42FromDiscord<Generic> apparently they removed the comparison with Nim from their website
20:51:45FromDiscord<willyboar> Volt is closed source
20:51:47*solitudesf- is now known as solitudesf
20:51:53FromDiscord<Shucks> still?
20:52:09FromDiscord<willyboar> https://github.com/voltapp/volt
20:52:31FromDiscord<willyboar> it would be opened in 2021
20:52:44FromDiscord<Luk> Oh lel
20:52:51FromDiscord<Luk> Sorry
20:53:31shashlickV is young, comparing with Nim is like comparing Nim with Python
20:53:46shashlickDecades of time difference
20:53:54FromDiscord<Generic> well it's not like they aren't provocating the comparison
20:54:02FromDiscord<Luk> I think nim should make a v back end
20:54:14*endragor quit (Ping timeout: 240 seconds)
20:54:18FromDiscord<Generic> for what reason?
20:54:20FromDiscord<Recruit_main707> thats a lot of work :P
20:54:21*bung quit (Ping timeout: 258 seconds)
20:54:21FromDiscord<Luk> Maybe the bins would be better
20:54:26FromDiscord<Luk> Smaller
20:54:27FromDiscord<Generic> it's an uncessary extra step
20:54:37disruptekdo you need a smaller binary?
20:54:41FromDiscord<Luk> Extra step?
20:54:52FromDiscord<Generic> as long as it compiles via C
20:55:00FromDiscord<Generic> which will be the dominant way of doing it
20:55:03FromDiscord<Luk> It doesnt
20:55:22FromDiscord<Luk> It has its own compiler
20:55:28FromDiscord<Generic> https://github.com/vlang/v#key-features-of-v
20:55:35FromDiscord<Generic> it says so right in this feature list
20:55:37FromDiscord<mratsim> Why compile to V when V compiles to C and Nim compiles to C?
20:56:00FromDiscord<Generic> and I doubt the assembler their self made compiler spits out
20:56:03FromDiscord<Luk> V does not compile to c
20:56:20FromDiscord<mratsim> so what is it using for codegen?
20:56:20FromDiscord<Luk> Its optional
20:56:34FromDiscord<Luk> It uses its own thing
20:57:05FromDiscord<Luk> Write a vlang helloworld and compile it with v hello.v -x64
20:57:21FromDiscord<Generic> their own thing will never match GCC or LLVM in terms of quality of generated code
20:57:23FromDiscord<Clyybber> gcc is miles better
20:57:29FromDiscord<Luk> Hah
20:57:36FromDiscord<Luk> Not in size
20:57:37FromDiscord<Clyybber> with miles I mean 50 times around the world
20:57:38FromDiscord<mratsim> Ah it uses GCC: https://github.com/vlang/v/blob/1d28d45c5cb662443af57f27fb41de8ee673922f/vlib/v/builder/cc.v#L185
20:57:50FromDiscord<mratsim> mystery solved
20:58:00FromDiscord<Shucks> well that was fast
20:58:01FromDiscord<Shucks> ;p
20:58:14FromDiscord<willyboar> 🍿
20:58:21FromDiscord<Luk> Bad joke
20:58:41FromDiscord<mratsim> show me the assembly code generator then
20:58:57FromDiscord<Generic> https://github.com/vlang/v/blob/master/vlib/v/gen/x64/gen.v
20:59:02FromDiscord<Generic> it seems to be WIP
20:59:06FromDiscord<mratsim> I see planly written in the source code "arguments for the C compiler": https://github.com/vlang/v/blob/1d28d45c5cb662443af57f27fb41de8ee673922f/vlib/v/builder/cc.v#L104
20:59:11FromDiscord<mratsim> plainly*
20:59:31FromDiscord<Luk> https://github.com/vlang/v/blob/1d28d45c5cb662443af57f27fb41de8ee673922f/vlib/v/builder/x64.v
20:59:48FromDiscord<Luk> It uses clang, GCC as an option
20:59:54FromDiscord<Generic> that's still super immature
20:59:56*tdc quit (Ping timeout: 256 seconds)
20:59:59FromDiscord<Generic> the backend I mean
21:00:08FromDiscord<Luk> Its faster tho
21:00:17FromDiscord<Luk> Sure its young
21:00:18FromDiscord<Generic> yes, because it doesn't optimise
21:00:41FromDiscord<Clyybber> theres simply no reason for nim to compile to V
21:00:41FromDiscord<Luk> It optimizes the size
21:00:41FromDiscord<mratsim> anyway, feel free to contribute a v backend to Nim, people added Zig a month ago
21:00:52FromDiscord<Recruit_main707> did they actually?
21:00:55FromDiscord<Generic> writing your own assembler generating compiler is a backend in 2020
21:00:56FromDiscord<mratsim> well yes
21:01:02FromDiscord<Generic> *deadend
21:01:16FromDiscord<Clyybber> well, not really. They simply used the clang zig bundles
21:01:18FromDiscord<mratsim> many are writing JIT in 2020
21:01:24FromDiscord<Generic> JIT is another story
21:01:48FromDiscord<Generic> it's a lot more domain specific
21:02:01FromDiscord<mratsim> anyway for general purposes I agree, domain specific compiler (graphics/machine learning/cryptography) are another story
21:02:11FromDiscord<mratsim> I can't believe how bad GCC is at generating bigint code
21:02:20FromDiscord<Recruit_main707> didnt we actually have some kind of nim direct compiler? but that it was not released because c++ templates wouldnt be able to be wrapped or something like that?↵i think Araq mentioned it
21:03:01FromDiscord<Recruit_main707> id need to scroll up a lot to find that conversation though :P
21:03:06FromDiscord<Clyybber> @Luk You can use tcc tho
21:03:15FromDiscord<Clyybber> its really fast
21:03:32FromDiscord<mratsim> you can serach @Recruit_main707
21:03:35FromDiscord<mratsim> search
21:03:44FromDiscord<Recruit_main707> im on it, im on it
21:06:02FromDiscord<Recruit_main707> i think i got it
21:06:27*narimiran quit (Ping timeout: 260 seconds)
21:06:58*xet7 quit (Quit: Leaving)
21:07:55FromDiscord<Recruit_main707> https://discordapp.com/channels/371759389889003530/371759389889003532/692093748670234634↵this was the conversation, not exactly mentioning the existance of a nim compiler as such, i just interpreted that as there is some kind of thing being done
21:10:46*unknown__ joined #nim
21:11:14disruptekshashlick: 0.5.6 probably needs to be de-tagged, right?
21:14:16disrupteki don't even know what i'm supposed to do to fix this.
21:15:56disrupteksomething something on devel and something something else on stable?
21:17:58FromDiscord<mratsim> That's some digging you did @Recruit_main707
21:20:15shashlickneed to check this later, will get back to you
21:20:25FromDiscord<Recruit_main707> i tend to remember some things for some reason, and i do it *forever*
21:20:58FromDiscord<mratsim> I tend to remember small technical details as well
21:21:05FromDiscord<mratsim> but don't ask me what I ate 3 days ago
21:21:21FromDiscord<Recruit_main707> exactly :)
21:21:50FromDiscord<mratsim> okay, time to try Nim 1.2.2
21:22:47*aenesidemus_ joined #nim
21:23:10*endragor joined #nim
21:24:51*willyboar joined #nim
21:25:34*aenesidemus quit (Ping timeout: 240 seconds)
21:28:05*endragor quit (Ping timeout: 258 seconds)
21:31:44*moerm joined #nim
21:31:52moermHello, everyone ;)
21:32:20*Jjp137_ quit (Quit: Leaving)
21:32:32*Jjp137 joined #nim
21:33:30FromDiscord<willyboar> Hello
21:33:49FromDiscord<willyboar> disruptek: i am ready
21:34:01disruptekare you?
21:34:22FromDiscord<willyboar> I have joined your irc channel 🙂
21:34:48disrupteki had no idea i had a channel.
21:35:08*solitudesf quit (Ping timeout: 256 seconds)
21:35:21disruptekshashlick: btw, gitnim seems to work fine on a random aws node.
21:35:24willyboarI think i saw it in a stream
21:39:43moermI once saw some ducks in a stream
21:44:03ZevvIs saturday's program up somewhere already?
21:44:53disruptekwhat?
21:45:01ZevvIs saturday's program up somewhere already?
21:45:16alehander92_moerm ducks just know streams well
21:45:18disruptekthat's what i thought you said.
21:45:24alehander92_duck typed streams
21:45:24Zevvif the time table has been published
21:45:56willyboarnot yet
21:46:46moermalehander92_, yet they are swimming *against* the stream sometimes
21:48:24alehander92_brave birds
21:49:18alehander92_good thing they keep themselves out from internet streaming then
21:51:32moermalehander92_, Do they really? Just look at duck typed streams in some "programming languages" ...
21:51:34disruptekZevv: should we meet up at nimconf? you're going, right?
21:52:33FromDiscord<exelotl> shit where is it? I lost my map
21:52:39FromDiscord<djazz> localhost
21:52:52alehander92_i knew the cool kids stay somewhere
21:54:26moermCu all ... ;)
21:54:31*moerm quit (Quit: Leaving)
21:54:58alehander92_moerm i just like ducks :P
21:55:01alehander92_see ya
22:01:03*PMunch quit (Quit: leaving)
22:02:03*tane quit (Quit: Leaving)
22:03:30*willyboar quit (Remote host closed the connection)
22:04:01*willyboar joined #nim
22:05:43*nikita` quit (Quit: leaving)
22:05:44*willyboar quit (Client Quit)
22:10:20FromGitter<ynfle> Where can I get nimconf updates?
22:10:53FromDiscord<Recruit_main707> there is no gitter channel afaik
22:11:19FromDiscord<Recruit_main707> no news yet, its this sunday, that if for now :)
22:11:23*Jjp137 quit (Read error: Connection reset by peer)
22:11:23FromDiscord<Recruit_main707> saturday***
22:11:50*disrupteq joined #nim
22:12:01*Jjp137 joined #nim
22:12:10FromDiscord<Recruit_main707> man, i make a lot of misspellings when i type standing up
22:14:55FromDiscord<willyboar> @ynfle we will spam once they post the schedule
22:21:55FromGitter<ynfle> @Willyboar, so kind of you
22:22:42*disruptek_ joined #nim
22:23:17*disruptek quit (Quit: Bye)
22:23:17*disrupteq is now known as disruptek
22:23:45*disruptek_ quit (Client Quit)
22:31:38FromDiscord<SeanOMik> What is the bitwise operator `&` (from C++) in Nim?
22:31:44disruptekand
22:31:55*willyboar joined #nim
22:32:18FromDiscord<SeanOMik> Oh
22:33:49FromDiscord<SeanOMik> Okay and if you do this: ```nim↵if (value != nil and value.num == 20)```↵and the first condition in the if statement is false it wont go to the second condition right?
22:33:56disruptekshashlick: it's kinda awesome how well git nim works.
22:34:24FromDiscord<SeanOMik> Actually, nvm
22:34:25disruptekonly thing is, i don't even have static libs on some servers. so i guess we should default to shared builds.
22:34:51disruptekie. i'll remove -static from gitnim.nim.cfg.
22:35:05FromDiscord<SeanOMik> disruptek that doesn't work
22:35:10FromDiscord<SeanOMik> I mean the bitwise operator
22:35:16FromDiscord<SeanOMik> Not the conditional operator
22:35:37disruptekyou're blowing my mind right now.
22:35:41FromDiscord<SeanOMik> In C++ the `&` bitwise operator is the `bitwise AND`
22:35:42disruptek~playground
22:35:43disbotplayground: 11an online in-the-browser IDE for simple Nim experiments at http://argentina-ni.ml/ -- disruptek
22:35:43disbotplayground: 11https://play.nim-lang.org the official Nim playground, can run Nim in the browser and share snippets
22:36:03Yardanico@SeanOMik in nim it's "and" for both bolls and bitwise
22:36:06Yardanicobools*
22:36:10disruptekshow me it failing, please.
22:37:09FromDiscord<SeanOMik> Oh it is
22:37:17FromDiscord<SeanOMik> I had to convert my enum to uint
22:37:29FromDiscord<SeanOMik> In C++ you don't have to do that so thats why it wasn't working
22:37:31FromDiscord<SeanOMik> Thanks disruptek
22:37:37FromDiscord<SeanOMik> And Yardanico
22:39:36*xet7 joined #nim
22:42:33disrupteki don't even have ops on my own channel.
22:42:38disruptekwhat a fucking loser.
23:07:01*abm quit (Read error: Connection reset by peer)
23:24:47skrylar[m]hoi
23:29:14FromGitter<hugosenari> Ola! | Hi!
23:31:28FromGitter<hugosenari> anyone knows if nim uses return type to define what proc call if another proc has same name/signature but other return type?
23:31:38Yardaniconim doesn't have return type overloading
23:31:49YardanicoI don't know of any language which does :P
23:31:55FromGitter<hugosenari> thanks :)
23:32:30PrestigeDoes anyone see a potential issue with this small template? https://play.nim-lang.org/#ix=2pyc
23:33:04PrestigeI'm getting an error with it, Error: unhandled exception: Can't obtain a value from a `none` [UnpackError]
23:33:43Yardanicoworks for me, can you show the code?
23:34:57PrestigeIt's this line: https://github.com/avahe-kellenberger/nimdow/blob/master/src/nimdowpkg/windowmanager.nim#L665
23:35:40Prestigenot a very small example though. It usually works, idk why it's failing for this one application
23:35:46Yardanicowell maybe it comes from somewhere else, not from here?
23:35:52Yardanicoor it's somehow getting modified, idk
23:35:55YardanicoI mean not from withSome code
23:36:19Prestigethat's where the execution stops, idk
23:37:17Yardanicowhat does this.display.getWindowName(client.window) return?
23:37:50Prestigehm I extraced the first argument from withSome into its own variable and it no longer crashes
23:38:33Prestigeoh templates evaluate the args more than once so that makes sense
23:38:46Yardanicooh right I missed it
23:38:48Yardanicoyeah lol
23:41:49*fredrikhr joined #nim