00:01:57shashlickya getting vim to work in a sensible way takes a while of tweaking, besides getting used to the modal workflow in general
00:11:27GitDisc<ZarsBranchkin> Loved modal nature of vim, but felt too much friction when it came to modifying it or using it for bigger scale projects. So i found emacs and stuck with it
00:38:35*couven92 quit (Ping timeout: 240 seconds)
00:41:18*MJCaley joined #nim
00:51:01*couven92 joined #nim
00:51:09*couven92 quit (Client Quit)
00:56:41*smt` quit (Ping timeout: 256 seconds)
01:08:48*MJCaley quit (Quit: MJCaley)
01:11:47*user11101 quit (Quit: user11101)
01:13:25*user11101 joined #nim
01:22:01*MJCaley joined #nim
01:28:39*fredrik92 quit (Ping timeout: 260 seconds)
01:46:53libman_Improved cellular latency and mosh is giving me new appreciation for working directly on the server with vim. This is especially beneficial for Nim due to compile time.
01:47:17FromGitter<Varriount> Mosh?
01:49:36libman_So I can jump on any computer (Windows library computer, Android tablet, etc) and securely access my full development environment in 10 seconds.
01:50:15SitiSchuHow would I go about denoting multiple types in a table ? pseudocode: newTable[string, Union[string, bool]]()
02:03:01*S1tiSchu joined #nim
02:05:05*SenasOzys quit (Ping timeout: 240 seconds)
02:06:58*SitiSchu quit (Ping timeout: 264 seconds)
02:07:32*user11101 quit (Quit: user11101)
02:07:45*user11101 joined #nim
02:08:16*S1tiSchu is now known as SitiSchu
02:12:41*fredrik92 joined #nim
02:13:57*vlad1777d quit (Ping timeout: 256 seconds)
02:28:54*MJCaley quit (Quit: MJCaley)
02:51:43GitDisc<treeform> SitiSchu, I would question you need to do that.
02:52:04GitDisc<treeform> But you can use case type for this.
02:53:21SitiSchutreeform, maybe I'm doing it wrong...I'm creating something that parses CLI arguments...and so an argument can have a value (--long=val) or no value (--long) so in the first case it would be a string and in the second case a bool..would there be a better way to do this ?
02:53:31SitiSchuI'll look into the case type, thanks
02:54:30GitDisc<treeform> could you use the built in one?
02:54:33GitDisc<treeform> https://nim-lang.org/docs/parseopt2.html
02:55:23GitDisc<treeform> https://github.com/nim-lang/Nim/blob/master/lib/pure/json.nim#L607
02:55:28GitDisc<treeform> here is how you would use a case type
02:55:31GitDisc<treeform> JsonNode uses it
02:56:50SitiSchuI looked at the different parsers and I didnt like something about parseopt, not sure what it was since that was a while ago (could be the way it does short arguments with values)
03:11:55*user11101 quit (Remote host closed the connection)
03:13:34*user11101 joined #nim
03:44:29*Senketsu quit (Read error: Connection reset by peer)
03:45:54*Senketsu joined #nim
03:51:35*dddddd quit (Remote host closed the connection)
03:57:29*endragor joined #nim
04:00:46*user11101 quit (Quit: user11101)
04:01:00*user11101 joined #nim
04:30:57*fredrik92 quit (Ping timeout: 248 seconds)
04:36:02*rockcavera joined #nim
04:50:46FromGitter<2vg> parseopt2 is deprecatedsince 0.18.0 , so you had better use parseopt :)
05:01:43*Snircle quit (Quit: Textual IRC Client: www.textualapp.com)
05:47:25*Vladar joined #nim
06:12:13FromGitter<gogolxdong> How to use nim extension in vscode for multiuser?
06:14:40FromGitter<gogolxdong> I have installed them separately for different users.
06:15:00*nsf joined #nim
06:27:03*ketralni` joined #nim
06:27:41*xkapastel_ joined #nim
06:28:43*user11101_ joined #nim
06:30:24*enthus1ast joined #nim
06:32:43FromGitter<gogolxdong> It hints the syntax ,automatically format but no jump to definition and auto-completion.
06:34:45*user11101 quit (*.net *.split)
06:34:45*xkapastel quit (*.net *.split)
06:34:45*ketralnis quit (*.net *.split)
06:34:45*Syneh__ quit (*.net *.split)
06:34:45*Tanger quit (*.net *.split)
06:34:45*planetis[m] quit (*.net *.split)
06:34:45*byteflame quit (*.net *.split)
06:34:46*enthus1a1t quit (*.net *.split)
06:34:46*mwbrown quit (*.net *.split)
06:34:47*xkapastel_ is now known as xkapastel
06:35:00*mwbrown joined #nim
06:35:20*SenasOzys joined #nim
06:38:49FromGitter<gogolxdong> go extension works well.
06:41:06*byteflame joined #nim
06:41:10*planetis[m] joined #nim
06:41:11*Tanger joined #nim
06:43:13*Syneh__ joined #nim
06:52:31*r3d9u11 joined #nim
07:33:21*gokr joined #nim
07:41:43*xkapastel quit (Quit: Connection closed for inactivity)
07:49:31*rokups joined #nim
07:54:47*livcd joined #nim
07:56:55*xet7 joined #nim
07:57:16*couven92 joined #nim
07:59:29FromGitter<narimiran> @gogolxdong yeah, some things are missing from the nim vscode extension, and it is not on the same level as extensions for some other languages....
08:01:01FromGitter<gogolxdong> using en_US.UTF-8 locale for multiuser, what should I do?
08:04:17*xet7 quit (Ping timeout: 248 seconds)
08:08:54*jaco60 joined #nim
08:16:07*xet7 joined #nim
08:43:12*SenasOzys quit (Read error: Connection reset by peer)
08:43:27*SenasOzys joined #nim
08:44:11*floppydh joined #nim
09:02:04*yglukhov joined #nim
09:04:46*PMunch joined #nim
09:06:16*yglukhov quit (Read error: Connection reset by peer)
09:06:48*yglukhov joined #nim
09:30:44*SenasOzys quit (Ping timeout: 255 seconds)
09:36:30*yglukhov quit (Remote host closed the connection)
09:38:43*sendell joined #nim
09:38:44*r3d9u11 quit (Read error: Connection reset by peer)
09:39:38*yglukhov joined #nim
09:48:16FromGitter<mratsim> @Araq was there an issue or commit following this forum bug report?: https://forum.nim-lang.org/t/3619
09:55:01*r3d9u11 joined #nim
10:12:31*SenasOzys joined #nim
11:04:58*Temperance[m] is now known as Abnegation
11:30:24user11101_Does gintro have a documentation page?
11:37:20*vlad1777d joined #nim
11:38:36*Snircle joined #nim
11:42:38*dddddd joined #nim
11:43:33*gokr quit (Ping timeout: 264 seconds)
11:43:57PMunchuser11101_, not more than what's in the README I think: https://github.com/StefanSalewski/gintro
11:46:22PMunchIf you're just looking to create Gtk3 GUIs more easily though I would suggest https://github.com/PMunch/gtk3genui
11:53:02*salewski joined #nim
11:53:39salewskiuser, what do you expect?
11:54:01salewskiWhen you know GTK3, it is easy to use gintro.
11:54:23salewskiIf you do know nothing about GTK3, it is very hard.
11:54:53salewskiAnd I can not write a full GTK3 book.
11:55:44salewskiA gintro doc page would somehow copy and reformat the C docs.
11:56:22salewskiSome bindings for other languages do that -- I regard that not as very helpfull.
11:58:09*gokr joined #nim
11:58:56PMunchIt's always a bit awkward to read documentation for one language and use it in another though. But rewriting everything isn't a very good alternative..
11:59:50FromGitter<survivorm> best has switchable examples for any language lib is applyable
12:00:12FromGitter<survivorm> like example in c/python/lua
12:00:45FromGitter<survivorm> But you need to be in close touch with docs mainteiner to do that
12:08:59*salewski quit (Quit: WeeChat 1.9.1)
12:11:18*Chiel joined #nim
12:11:23r3d9u11I have a little question: Is it possible to use AsyncSocket to parallel reading and writing data?
12:13:18*SenasOzys quit (Remote host closed the connection)
12:13:30*SenasOzys joined #nim
12:14:13r3d9u11something like a: thread 1 will create socket, thread 2 wait for incoming data, thread 3 wait for data to send
12:14:46ChielHello. I am trying to understand what happens under the hood using async code. I noticed that this code causes a 100% cpu busy loop, although I'd expect a poll() system call:
12:14:49ChielwaitFor sleepAsync(5000)
12:15:18ChielWhat is my error?
12:23:54*Vladar quit (Quit: Leaving)
12:27:45r3d9u11gmm, checked this line of code. Works fine for me. 0.17.2, Linux Mint 18.3
12:33:58*vlad1777d quit (Ping timeout: 264 seconds)
12:37:22user11101_salewki. Hmm, I'm guessing you haven't kept the names from the original gtk+ API. If someone knows gtk, or trying to cross-read/match devhelp with your API, it doesn't probably help. On top of that the gtk/C-idiom is pretty different than Nim idom. But hey, I understand the pain of documenting massive APIs.
12:38:24PMunchr3d9u11, having a lock around the socket and just passing it to both threads should work
12:42:34*athenot joined #nim
12:42:41r3d9u11PMunch, thx for notice, yes, it works. But if i tried to send data from stdin from thread 2, than socket.recvLine() don't receive data in thread 3 O_o
12:43:56r3d9u11PMunch, for example it works fine: https://pastebin.com/QNLfdv5E
12:46:20r3d9u11PMunch, but here https://pastebin.com/HNyXxvKz function readServer doesn't receive any data
12:54:37PMunchProbably because you are busy-loop sending the message
12:54:45PMunchSo it never get's time to receive anything
12:56:08r3d9u11ok, problem was solved. just needed pause before data sending https://forum.nim-lang.org/t/3634/1#22659
12:58:24r3d9u11no, I have a to separated threads for data seding and data receiving. problem solved via pause, but I don't understand why. Little bit strange behavior of async/await or of AsyncSocket
12:58:30r3d9u11*have a two
13:01:05*salewski joined #nim
13:01:31salewskiuser11101_, the gintro proc names are straight forward.
13:02:29salewskiIt is generall ywithout the gtk prefix, and Nim's for newButton() intead gtk_button_new().
13:03:06salewskiWhen we have a C example, we generally can convert it to Nim easily.
13:03:58salewskiGTK3 with gintro is for example much easier than it was with Ruby.
13:04:44salewskiOne advantage is, that we have C original fonction names in the Nim modules.
13:05:11salewskiSo if we can not guess the Nim proc name, a grep helps us.
13:06:07salewskiAnd Nim modules are not mud mixed, so all that belongs to each other is at the same location.
13:07:19salewskiThe main problem of gintro is, that there is a few percent of GTK stuff that is not yet well converted to Nim.
13:08:33salewskiFor example C functions with cStringArrays or GLists. Automatic conversion is not that easy.
13:09:02salewskiHave to go now, bye.
13:09:09*salewski quit (Quit: WeeChat 1.9.1)
13:09:44AbnegationWell, I liked several features of nim but I think I'll pass for now, and wait perhaps for a 1.0 version, to see where it went and what you did with it, and how the project and community looks at that stage.
13:09:45AbnegationThanks for the help everybody, sorry for being annoying for some days.
13:10:21PMunchAbnegation, sorry to hear you go. And don't worry about being annoying :P
13:10:55PMunchNim is pretty stable for a language that hasn't hit 1.0 though, and it would be interesting to hear what you feel you are missing
13:12:57Abnegationwell, it will sound cliche but it more of a "it's not you, it's me" issue. I have tested it for some days, read the documentation, seen some tests. It looks powerful and interesting.
13:14:07AbnegationHowever, the level of friction it supposes for me, given how many things have different names (at least from where I'm coming from) is too high for me to risk giving this heavy use. I'm beginning to be a little bit old to be learning new names, and well, we're far far away from an 1.0
13:15:04FromGitter<survivorm> By what standard are we far from 1.0?
13:16:09FromGitter<survivorm> That's a little confusing. Most opinions defer than speaking about 1.0 language kit.
13:16:45FromGitter<survivorm> But I think most people care about stability
13:16:53Abnegationwell, I don't know, now that you say it I don't know how far away 0.18 means.
13:17:13FromGitter<survivorm> Stable work, stable API - yes, already
13:17:35FromGitter<survivorm> Well, in most cases, AFAIK
13:18:10FromGitter<survivorm> It may be extended - well, yes, but it would be back-compatible
13:18:53FromGitter<survivorm> You even have repository with infor on packages ststing if they pass automatic build :)
13:19:06FromGitter<survivorm> Do many languages can boast it?
13:19:12PMunchAbnegation, interesting. What languages are you coming from?
13:19:41AbnegationC-like c++
13:20:04AbnegationI'm not saying that by no means NIM is bad, or wrong.
13:20:09jaco60For the public, a version number of 0.99 would be less far far away from a distant 1.0 Galaxy than a 0.18...
13:20:11FromGitter<survivorm> Well, yeah. Nim is supposed to be higher level
13:21:09FromGitter<survivorm> But comparing to python (which I come from) - learning nim is smooth
13:21:33FromGitter<survivorm> but tastes differ, of cause
13:22:06FromGitter<survivorm> and language preferances doesn't make you better (or opposite) person
13:22:35*SenasOzys quit (Ping timeout: 240 seconds)
13:23:27PMunchAbnegation, hmm. I came from mostly C (but with a mix of many different kinds) and I found Nim fairly easy to learn
13:23:37*Chiel quit (Quit: Lost terminal)
13:23:40PMunchMight've been my work with Python though
13:25:06PMunchBut knowing C makes many of the things going on in Nim make more sense than from someone who only knows Python I think
13:35:27*endragor quit (Remote host closed the connection)
13:39:11AbnegationI worked with python too. In fact my initial objective was to replace python with nim.
13:39:38Abnegationthat might end up happening anyway. I'm a little bit tired of python.
13:42:11PMunchOh really? Hmm, strange that you didn't find Nim to your liking then
13:43:46AbnegationI like it, the problem wasn't that I didn't like it.
13:45:05PMunchOh right, the friction of learning it, or taking it into use
13:45:44AbnegationIt's more of a "how many months of learning this would I need to code the same kind of stuff I need to code but faster".
13:46:13AbnegationFor many tasks It's actually faster for me to write something in C rather than in python.
13:46:31AbnegationEven in tasks were I don't need performance.
13:47:35PMunchAh right, the classic return on investment issue
13:49:33*gokr quit (Ping timeout: 264 seconds)
13:51:40FromGitter<Lite5h4dow> i keep getting unknown IO Error on windows, anyone know the fix?
13:51:43AbnegationIt's kinda sad because I kinda liked a lot what I saw. I'll definetely try again to on my next vacations to fiddle a little bit more with the language.
13:52:16AbnegationI got several like those, don't know what they were, but If I recompiled sometimes they went away.
13:53:03FromGitter<Lite5h4dow> yeah
13:53:08FromGitter<Lite5h4dow> but i get them often
13:53:14FromGitter<Lite5h4dow> sometimes i cant compile
13:53:21FromGitter<Lite5h4dow> i have to try like 30 times to compile once
13:55:12Abnegationfor me was 4 or five times, but my little test project was smaller.
13:55:57FromGitter<Lite5h4dow> im just trying to compile the nimx example code, but that wont even work when it does compile xDDD
13:56:03FromGitter<Lite5h4dow> says its missing a dll
13:56:12FromGitter<Lite5h4dow> -_-
13:57:20*xkapastel joined #nim
13:57:45PMunchLite5h4dow, is it this?
13:58:34dom96Abnegation: That's a shame. Maybe I missed you here, but I haven't seen you say anything apart from that you're leaving Nim
13:59:08*endragor joined #nim
13:59:14dom96Can you elaborate on what you think we could focus on to bring you back or even better make you stay? :)
13:59:21AbnegationChanged username, I was Temperance.
13:59:27AbnegationI was only asking questions for a week.
13:59:36dom96Ahh, that makes more sense
13:59:42PMunchOh, you're Temperance
13:59:46PMunchSad to see you leave :(
13:59:58AbnegationI'll probably come back in some months, It's not nim's fault as I said.
14:00:12FromGitter<krux02> and you do not have the [] postfix
14:00:15PMunchLooking forward to have you back then if you return :)
14:00:18FromGitter<Lite5h4dow> @pmunch, Yup
14:00:19FromGitter<krux02> are you now on irc directly¿
14:00:58Abnegationif you change your name the matrix interface removes the []
14:01:00AbnegationI think
14:01:22AbnegationI had to change names since Temperance was already registered, and I needed to enter some register only channels
14:01:40FromGitter<krux02> ok
14:01:43*luck_luc joined #nim
14:01:51FromGitter<krux02> can I link to a name that I already own?
14:02:54FromGitter<Lite5h4dow> but it prints the same error
14:03:35*endragor quit (Ping timeout: 240 seconds)
14:03:40Abnegationyes, you can
14:04:14PMunchLite5h4dow, what error?
14:04:43FromGitter<Lite5h4dow> `HError: unhandled exception: Unknown IO Error [IOError]`
14:06:21PMunchHow are you compiling?
14:06:37PMunchThrough VSCode or in a terminal
14:08:50FromGitter<Lite5h4dow> powershell terminal
14:11:29PMunchMaybe comment on that issue?
14:12:37FromGitter<Lite5h4dow> what do you mean?
14:13:27Abnegationhe means to talk about your problem on the related issue on the github page
14:13:29AbnegationI think
14:14:00PMunchI'm not on Windows so it's a bit hard for me to figure out what's wrong :P
14:15:26*athenot quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
14:20:59*pydsigner quit (Ping timeout: 255 seconds)
14:21:10*pydsigner joined #nim
14:22:50FromGitter<Lite5h4dow> oh ok :D
14:25:11*athenot joined #nim
14:25:49*SenasOzys joined #nim
14:34:04FromGitter<Jalbo> I8
14:42:39user11101_I'll never leave Nim :D If I get good at it maybe I'll do something with Nim <-> Qt -> cpp
14:43:08*gokr joined #nim
14:44:58FromGitter<Lite5h4dow> idk
14:45:08FromGitter<Lite5h4dow> nim is great but it feels unfinished
14:45:32*luck_luc quit (Remote host closed the connection)
14:45:41dom96how so?
14:46:36FromGitter<Lite5h4dow> there are multiple different UI libraries, and Nim still doesnt have an official one
14:46:43FromGitter<Lite5h4dow> there are bugs everywhere
14:47:13FromGitter<zacharycarter> what language has an official UI library? besides maybe Java? and we all know how swing worked out...
14:47:33FromGitter<Lite5h4dow> Java, python and the others us Qt bindings
14:47:44FromGitter<zacharycarter> that hardly makes Qt an official UI library
14:47:47FromGitter<Lite5h4dow> and they have UI Builders
14:48:01FromGitter<zacharycarter> every language has bugs in it
14:48:22FromGitter<Lite5h4dow> true, but lets just take my most reent example
14:48:32FromGitter<Lite5h4dow> i cant even compile my code
14:48:49AbnegationI know its unrelated, but imgui and the likes are excellent for building UI's that are both fast and easy to implement.
14:49:01FromGitter<mratsim> Java and Python are over 20 years old. Similar language to Nim: Rust, D, Crystal do not have an UI library either
14:49:30AbnegationI tried the Nuklear-Nim and it looked quite nice.
14:49:34FromGitter<zacharycarter> Abnegation: we already have bindings to both imgui and nuklear I believe
14:50:06FromGitter<Lite5h4dow> i love how Nuklear looks, i just dont understand it yet
14:50:08FromGitter<zacharycarter> well... I've used imgui with bgfx - not sure any bindings exist for it solely
14:50:24FromGitter<zacharycarter> keep in mind - imgui and nuklear are immediate, not retained mode, GUI solution
14:50:29FromGitter<zacharycarter> Qt is a retained mode GUI solution
14:50:53FromGitter<Lite5h4dow> i know
14:51:05FromGitter<Lite5h4dow> but nuklear is fap worthy levels of pretty
14:51:15FromGitter<zacharycarter> if you skin it
14:52:00Abnegationafter trying immediate guis I've not been able to even contemplate retained mode ones.
14:52:51FromGitter<zacharycarter> when your application / gui gets complex, retained mode solutions tend to shine
14:54:22user11101_Isn't libui Nim's official UI library?
14:56:11FromGitter<zacharycarter> I don't think that a language having an official UI library is a good idea
14:56:45FromGitter<HonzsSedlomn> Well, Python has it
14:56:54FromGitter<Lite5h4dow> i dont think it is
14:57:18FromGitter<Lite5h4dow> but having a ui library woul help alot of newcommers out
14:57:19FromGitter<zacharycarter> Just because a language has done it in the past - doesn't mean it's a good idea in the future for language design
14:57:32FromGitter<zacharycarter> there are already several UI libraries newcomers can use
14:57:34FromGitter<Lite5h4dow> i think thats why python and java both did so well among noobs
14:57:42FromGitter<survivorm> Same. Which is the Python's "oficcial" library, and where's a statement on it?
14:57:58FromGitter<Lite5h4dow> well, im just going off my experience
14:58:14FromGitter<Lite5h4dow> but going though all these ui libraries to find the right one has been a pain
14:58:23FromGitter<HonzsSedlomn> Tkinter is Python's official library, isn't it?
14:58:24FromGitter<Lite5h4dow> because i dont know what all of them can and cant do
14:58:33FromGitter<Lite5h4dow> yeah @HonzsSedlomn
14:58:40jaco60I don't know if its "official" but Python is distributed with TkInter, yes
14:58:55FromGitter<Lite5h4dow> it is the official one for python
14:58:59jaco60The Idle tool is written with TkInter
14:59:02FromGitter<survivorm> @HonzsSedlomn is it?
14:59:06FromGitter<Lite5h4dow> yh
14:59:14FromGitter<mratsim> tkinter is super broken?
14:59:22FromGitter<Lite5h4dow> no, its just limited
14:59:23FromGitter<survivorm> ok, time to go
14:59:26FromGitter<HonzsSedlomn> @survivorm I'm not sure
14:59:27jaco60it is super awful, too :)
14:59:27FromGitter<survivorm> bye all
14:59:45FromGitter<HonzsSedlomn> Unless u use Tkinter styles :)
14:59:56FromGitter<mratsim> I remember the times building tkinter and python mega widgets, not fun times ...
15:00:10jaco60pyqt is so simple...
15:00:24FromGitter<Lite5h4dow> @jaco are you ok?
15:01:01jaco60what ?
15:02:36FromGitter<Lite5h4dow> i couldnt get my head round pyqt
15:04:12jaco60I use it only for little apps so, yes, pyqt is enough for me and, with the help of QtDesigner and pyuic, it's all good
15:05:20FromGitter<HonzsSedlomn> I don't think that framework, which is being developed for 20 years is easy
15:05:45FromGitter<Lite5h4dow> yh
15:07:52*sendell quit (Remote host closed the connection)
15:08:56rokupswhats so complicated about pyqt?
15:09:53FromGitter<HonzsSedlomn> Basic things can be easy, but it's a huge framework.
15:13:09FromGitter<Lite5h4dow> idk how to use it
15:18:10rokupsso the problem is not in pyqt
15:20:36*qleda joined #nim
15:30:15*floppydh quit (Remote host closed the connection)
15:31:08*floppydh joined #nim
15:36:12*sendell joined #nim
15:37:39*r3d9u11 quit (Remote host closed the connection)
15:39:06FromGitter<krux02> I just read something about the data section in a binary and that you can link arbitrary data to it. https://balau82.wordpress.com/2012/02/19/linking-a-binary-blob-with-gcc/
15:39:20FromGitter<krux02> is there a nim equivalent that also works on windows?
15:40:10FromGitter<krux02> I would guess that there isn't.
15:43:56*nsf quit (Quit: WeeChat 2.0.1)
15:50:10qledaI have a C library that I'm trying to wrap with Nim, and have some questions:
15:50:58shashlickinteresting conversations today so far
15:51:08qleda1. What are the advantages/disadvantages of using a shared library vs c2nim on the headers? This is a small library that I don't expect to be installed on the user's system, so I'm guessing c2nim is preferable
15:53:00qleda2. I got it to work nicely with the shared library, but I'm having trouble with c2nim. I get a lot of "implementation expected" errors in imports, and I can't figure out the best way to use C source files without headers.
15:53:03FromGitter<mratsim> @qleda, is it a header only library?
15:53:23shashlickpersonally I prefer compiling in the code into the binary if it isn't too big
15:53:36shashlickand it's feasible
15:53:50FromGitter<brentp> is it possible to have a sig like this: ` proc tag*T: string|int|float64 (r:Record, tag:string): Option[T] = ... ` ?
15:54:04shashlicksome libs are very complex and require elaborate cmake/make and are better off shared/dynamically loaded
15:54:19shashlickwhich lib are you wrapping
15:54:31FromGitter<mratsim> @brentp you will have issue because both your proc and your variable are called tag I think
15:54:37qleda@shashlick: it's really small and definitely feasible, @mratsim it's just 4 C source files and 3 header files
15:55:13FromGitter<mratsim> @qleda, use c2nim on the header but only for the interface
15:55:21qledashashlick: libBigWig, https://github.com/dpryan79/libBigWig
15:55:22FromGitter<mratsim> specify the dynlib to use
15:56:14FromGitter<mratsim> this should be very easy to wrap
15:56:28FromGitter<brentp> @mratsim I renamed the variable, but when I use `var v = rec.tagint ("SM") `, I get: `auxtest.nim(31, 18) Error: type mismatch: got (Record) ⏎ but expected one of: ⏎ proc tagT: string | int | float64 (r: Record; itag: string): Option[T] ⏎ ` [https://gitter.im/nim-lang/Nim?at=5aa6a32c458cbde557265fdf]
15:56:50Yardanicoqleda, you can just compile C files into your nim project
15:56:51shashlicki've written nimgen to make it easier to wrap libs with c2nim, let me see if it's easy to do this
15:57:01FromGitter<brentp> @qleda, you wrapping libBigWig? That would be great!
15:57:09FromGitter<mratsim> @brentp: `var v = rec.tagint (rec, "SM”)`
15:57:49FromGitter<brentp> @mratsim, same error
15:57:49qleda@mratsim I already managed to get it to work with the dynamic library, did exactly that, I'm only having trouble with the c2nim/nimgen option of compiling it in. Thanks though
15:57:58FromGitter<mratsim> @shashlick, lovely work on Nimgen, I think it’s even easier to wrap that with nimgen as it needs the gcc preprocesor for some define
15:58:17qleda@brentp oh hey! I was looking at your Go wrapper for libBigWig earlier
15:58:19FromGitter<mratsim> @brentp sorry var v = tagint (rec, "SM")
15:58:34shashlickthanks @mratsim
15:58:46shashlickqleda: am trying this out, give me a few minutes
15:58:47FromGitter<mratsim> don’t use method call syntax with generics
15:58:52qledaYardanico, how would I go about doing that?
15:59:33FromGitter<mratsim> {.compile: “bwRead.c.} and then just use importc with proc of the same name
15:59:35qledashashlick: awesome, thanks! I played around with nimgen but seemed a bit intimidating to start with, seems like it would be nice for automating c2nim once it works
15:59:39FromGitter<brentp> @qleda, also check out: https://github.com/brentp/hts-nim/
15:59:54FromGitter<mratsim> {.compile: “bwRead.c”.} sorry
16:01:22qleda@brentp wow this is really nice, thanks for the heads up!
16:01:29shashlick@mratsim: we don't need the other .c files compiled in?
16:01:46FromGitter<mratsim> that’s just one example ;)
16:05:16FromGitter<brentp> @qleda, would love to get more contributors. :)
16:05:52FromGitter<brentp> @mratsim , thanks, that gets me further. is there a way to switch on the type, e.g. given T:string|int|float, how to determine the type inside.
16:06:20shashlickqleda: what OS/compiler
16:09:53qledashashlick: Nim Compiler Version 0.18.0 [Linux: amd64]
16:10:52shashlickokay so gcc
16:12:25qledayup, and I can build the library just fine with make
16:24:00shashlickqleda: is it common to need curl support?
16:24:42qledano, you can get rid of that (been removing it, but I tried using the libcurl wrapper too)
16:25:18*couven92 quit (Quit: Client disconnecting)
16:26:29FromGitter<krux02> @brentp generally in a generic you can check on a type with `when T is MyType: ...`
16:31:15*MJCaley joined #nim
16:35:25shashlickc2nim converts "void var" into var = nil but nim doesn't like that - any ideas?
16:37:30*user11101_ quit (Remote host closed the connection)
16:37:45*jxy quit (Quit: leaving)
16:37:53*user11101 joined #nim
16:38:25shashlickok, it should do var = void in the type declaration, will submit a bug
16:41:10*jxy joined #nim
16:43:31FromGitter<brentp> @krux02 perfect. thanks.
16:50:58*douglascorrea quit (Quit: Textual IRC Client: www.textualapp.com)
16:52:13*Trustable joined #nim
16:59:27*gokr quit (Ping timeout: 240 seconds)
17:05:36*sendell quit (Remote host closed the connection)
17:06:20*PMunch quit (Quit: Leaving)
17:13:23FromGitter<mratsim> Why are people using NIM in uppercase? This is so bugging me: https://github.com/mjfh/nim-crypto
17:17:49FromGitter<ZarsBranchkin> haha, this reminds of whole Lua vs LUA thing
17:18:49*c0ntribut0r joined #nim
17:18:59FromGitter<HonzsSedlomn> Guys? I wanna contribute to nim community with some small packacge, do u have any idea?
17:19:26c0ntribut0rHi, there's list of required nm packages somewhere
17:19:26FromGitter<ZarsBranchkin> I think there was a whole repository of packages that Nim should get
17:19:45FromGitter<ZarsBranchkin> https://github.com/nim-lang/needed-libraries
17:20:03FromGitter<HonzsSedlomn> Oh, thanks!
17:30:33YardanicoBut really you can do anything you want
17:30:43Yardanicoit will be surely useful for someone in the future ;)
17:39:25FromGitter<tim-st> is there a nim sorting lib that can sort unicode like https://ssl.icu-project.org/icu-bin/collation.html ?
18:02:38*jjido joined #nim
18:03:00*Vladar joined #nim
18:03:32jjidoLooks like the Genode project likes nim?
18:04:09ehmryjjido: yea, but so far I'm really the only one using it
18:04:38ehmryfor now
18:06:31jjidoYou work on Genode? How is the full OS project going ?
18:06:56*nsf joined #nim
18:08:11*PMunch joined #nim
18:08:23ehmrypretty good, its my daily driver. I think the only nim thing I'm running now is part of my window manager
18:11:51ehmrybut I have virtual file-system driver thing in nim I use sometimes
18:12:14*Vladar quit (Quit: Leaving)
18:13:19*jjido quit (Ping timeout: 256 seconds)
18:14:02ehmrywe need to start doing more GUI work, which would be nice to do in nim
18:14:41FromGitter<krux02> GUI is still an unsolved problen in generally every programming language
18:15:41ehmryspeaking of which, I was looking at cairo, which made me start looking at glib, and glib is fucking awful
18:16:00ehmrynim probably does everything glib does, but safer
18:17:01ehmryand less code
18:17:58*ketralni` is now known as ketralnis
18:25:19*arecacea1 quit (Remote host closed the connection)
18:25:38*arecacea1 joined #nim
18:25:53*ehmry left #nim ("User left")
18:34:25PMunchkrux02, let's fix it!
18:36:03*MJCaley quit (Quit: MJCaley)
18:39:01FromGitter<krux02> well yea,
18:39:16FromGitter<krux02> would be nice, but it will probably still be a problem in 20 years
18:39:25FromGitter<krux02> like utf8 support
18:50:24*PMunch quit (Quit: leaving)
18:51:14*MJCaley joined #nim
18:55:36*gokr joined #nim
18:58:50*r3d9u11 joined #nim
19:04:15FromGitter<data-man> @mratsim
19:08:35FromGitter<data-man> > Rust, D, Crystal do not have an UI library either ⏎ ⏎ D has DlangUI and Dlang IDE
19:12:59*miran joined #nim
19:15:31*MJCaley quit (Quit: MJCaley)
19:19:37*MJCaley joined #nim
19:33:18*SenasOzys quit (Remote host closed the connection)
19:33:27FromGitter<krux02> yay I got my transform feedback working, that was really messing with my brain.
19:33:42FromGitter<krux02> transform feedback is super unintuitive in Opengl and badly documented
19:34:13FromGitter<HonzsSedlomn> That's hell true :D
19:43:41*cspar_ joined #nim
19:43:59*kunev quit (Ping timeout: 252 seconds)
19:44:34*kunev joined #nim
19:46:21*enthus1a1t joined #nim
19:46:30*cspar quit (Ping timeout: 256 seconds)
19:47:16*enthus1ast quit (Ping timeout: 268 seconds)
19:49:11FromGitter<krux02> I am still missing compile time information of object offsets otherwise I could integrate this better in my library
19:49:39*cspar_ quit (Ping timeout: 256 seconds)
19:49:51FromGitter<krux02> I want a rendering system that lets you do anything you want, render any data and stuff like you would use raw opengl, but at the same time it is super easy to write
19:50:41*cspar joined #nim
19:50:54FromGitter<krux02> Since transformfeedback works now (a thing that was for a long time on hold) I am now working again on compiling nim code to GLSL
19:51:36FromGitter<krux02> meaning in the future writing a shader won't look much different than writing a for loop, just with the difference that it iterates over vertices and writes out a color
19:51:41FromGitter<krux02> or two
19:59:02*MJCaley quit (Quit: MJCaley)
19:59:06*r3d9u11 quit (Remote host closed the connection)
20:09:39*Vladar joined #nim
20:09:56*cspar_ joined #nim
20:10:29*rokups quit (Quit: Connection closed for inactivity)
20:12:19*cspar quit (Ping timeout: 256 seconds)
20:16:13*athenot quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
20:20:33*gokr left #nim (#nim)
20:20:56FromGitter<ZarsBranchkin> Oh neat, that's a pretty cool idea
20:23:53FromGitter<krux02> I am surprised that nobody else had that idea.
20:24:06FromGitter<krux02> maybe people had that idea, but were not able to implement it.
20:24:09FromGitter<krux02> I can
20:24:17FromGitter<krux02> ok good night
20:25:12Yardanicohmm https://github.com/AndreiRegiani/INim
20:25:44thor77huh, nice
20:25:52Yardanicoit uses usual `nim c`, but checks for errors
20:26:10Yardanicogif example is very cool
20:26:12thor77was just seeing that
20:26:42thor77now it doesn't look nearly as cool as it did before looking at the code to me :D
20:26:57FromGitter<ZarsBranchkin> I wonder how it compares to the secret built in Nim repl
20:27:04thor77thought it would do some cool magic think, but it doesn't :(
20:27:08Yardaniconim secret uses VM
20:27:17miranisn't >>> python's thing?
20:27:18Yardaniconim VM (same one used for compiletime stuff)
20:27:24thor77miran: yep
20:27:25FromGitter<ZarsBranchkin> yeah, makes sense
20:27:28dom96wow, seems to be pretty fast
20:27:31FromGitter<ZarsBranchkin> Same as NimScript
20:27:46Yardanicodom96, it's a little hacky, but it checks for output lines you haven't yet seen
20:27:59Yardanicoso if you do `echo 1` and then `echo 2` it won't print 1 twice
20:28:47FromGitter<ZarsBranchkin> sounds bit unstable, runs the previous code every time
20:29:11thor77huh, how can one run that integrated repl?
20:29:21thor77can't find the switch in the help-message
20:29:21Yardanicothor77, are you about nim secret?
20:29:24Yardanicoit's hidden
20:29:25*c0ntribut0r quit (Read error: Connection reset by peer)
20:29:26*Trustable quit (Remote host closed the connection)
20:29:27Yardanicobecause it's unstable
20:29:28FromGitter<ZarsBranchkin> `nim secret` heh
20:29:32Yardanicothat's why it's nim secret
20:29:39thor77heh, thanks :)
20:29:43*c0ntribut0r joined #nim
20:30:08FromGitter<ZarsBranchkin> great, can't `C-C` or `C-D` out of it
20:30:24YardanicoCtrl+C works
20:30:29Yardanicoah, you mean switch
20:30:30thor77not for me
20:30:39YardanicoZarsBranchkin: at least it checks if last line has thrown an error
20:30:48Yardanicoand if it did, this inim reverts this line
20:30:48thor77eh, i can't get out without killing the process, i guess :D
20:30:52FromGitter<ZarsBranchkin> no, Ctrl+C is what I meant for `nim secret`
20:31:03FromGitter<ZarsBranchkin> yeah, i had to open new tab and close that one
20:31:04thor77ctrl+c does nothing for me in "nim secret"
20:31:12Yardanicoyou should type quit()
20:31:16Yardanicolike in usual nim apps :P
20:31:22thor77doesn't work as well
20:31:30Yardanicothor77, are you sure? it works in nim secret
20:31:34thor77huh, the second time it worked
20:31:48FromGitter<ZarsBranchkin> Previously i tried with exit() and then stopped guessing
20:32:19Yardanicobtw, for instant repl you can use tcc (tiny c compiler)
20:32:36Yardanicoit doesn't produce fast code, but it's compilation times are FAST
20:32:45Yardanico(because it's much simpler to compile without optimizations)
20:35:53Yardanico(I'm just browsing through recently updated Nim repos on github)
20:36:35*endragor joined #nim
20:36:55YardanicoI'm happy to see there's more nim projects every day ;)
20:37:33Yardanicoand github search shows 2k repositories with nimlang for me
20:38:26thor77good thing you can't find mine :D
20:38:33Yardanicothor77, hmmm
20:38:34*miran quit (Quit: Konversation terminated!)
20:38:41thor77Yardanico: it's set to private ;D
20:38:53Yardanicothor77, oh
20:39:01Yardanicooh, I see "5 contributions in private repositories"
20:39:48*rauss quit (Read error: Connection reset by peer)
20:40:34thor77not sure what the search counts
20:41:09*endragor quit (Ping timeout: 264 seconds)
20:41:29*rauss joined #nim
20:41:48*rauss quit (Client Quit)
20:42:00*rauss joined #nim
20:43:01*user11101 quit (Quit: user11101)
20:43:56Yardanicothor77, repositories on github with nim language as a main one
20:44:41thor77ah, hm
20:45:05thor77then my repository is certainly among them if "recent activity" includes commits from february
20:46:46thor77didn't know even private repositories are listed on searches like that
20:48:07*salewski joined #nim
20:49:13salewskiYardanico, is the 2k repositories with all the forked onces?
20:49:28*Vladar quit (Remote host closed the connection)
20:50:09Yardanicosalewski, it seems that without them (show forked repos is disabled in advanced settings)
20:50:25Yardanicobut there's some repos which are forks of others but without fork status
20:50:33Yardanicofor example: https://github.com/search?utf8=%E2%9C%93&q=nim-sandbox&type=Repositories
20:50:42Yardanicooh, sorry, wrong one
20:52:26salewski2k is indeed a lot. But I have seen a few nimble packages with nearly no real code.
20:53:55salewskiI never heard of the DlangUI mentioned above before. That one is interesting, only 200k lines of code as openhub tells us.
20:54:34salewskiBut I think no one is really using DlangUI.
20:59:44*cspar joined #nim
21:02:19*cspar_ quit (Ping timeout: 260 seconds)
21:10:19*SenasOzys joined #nim
21:12:42*salewski quit (Quit: WeeChat 1.9.1)
21:15:41FromGitter<data-man> https://code.dlang.org/?sort=updated&category=library.gui&skip=0&limit=100 - 46 packages
21:23:06dom9613 packages
21:23:07dom96not bad
21:28:32*nsf quit (Quit: WeeChat 2.0.1)
21:30:21FromGitter<zacharycarter> dom96: I think the whole discussion started this morning, and the point was raised - Nim has no official GUI implementation - I don't think it needs one...
21:32:32FromGitter<zacharycarter> dom96: I think that what Nim really needs to make it mainstream is libraries / sdks for the enterprise
21:33:17FromGitter<zacharycarter> so support for AWS, GraphQL, React/Redux (for the JS implementation)
21:33:35FromGitter<zacharycarter> more database support
21:33:47FromGitter<zacharycarter> ORMs
21:34:01FromGitter<zacharycarter> a more improved / enterprise grade Jester
21:35:34FromGitter<zacharycarter> these are the main blockers to me being able to use Nim at work
21:35:42shashlickjust wrapped libbigWig with nimgen, will post on github soon
21:35:46FromGitter<data-man> Users need a GUI. Therefore, Delphi was so popular.
21:36:10FromGitter<zacharycarter> Wasn't delphi windows only?
21:36:23shashlicki spent some time on wrapping graphqlparser but ran into issues, if anyone can help, will be great
21:36:33FromGitter<jaco60> Well, Go is popular and Go has no GUI
21:36:48FromGitter<jaco60> Depends of the target of the language, imho
21:36:52FromGitter<zacharycarter> shashlick: I've already wrapped it - but I'm working on a full graphql implementation
21:37:03FromGitter<zacharycarter> not using libgraphqlparser
21:37:33*qleda quit (Ping timeout: 264 seconds)
21:37:35shashlickcan you share?
21:37:44FromGitter<zacharycarter> which?
21:37:47FromGitter<data-man> Currently Delphi supports Windows, macOS, iOS, Android and Linux.
21:38:26shashlicki guess if you are working on native then that's fine, I don't have any personal need for it
21:38:35FromGitter<zacharycarter> okay
21:38:54*noonien joined #nim
21:39:04FromGitter<zacharycarter> @data-man what cross platform GUI implementation (besides Qt) can you point to that you'd use in an app if you were building?
21:39:10shashlickis there any advantage to native instead of wrapping existing code with nim'ish api
21:40:05FromGitter<data-man> @zacharycarter: On which language?
21:40:12FromGitter<zacharycarter> any
21:40:22FromGitter<data-man> For FreePascal - Lazarus
21:40:35dom96The only way these libraries will be written is if people that need them write them :)
21:41:07FromGitter<zacharycarter> ^
21:41:08shashlicki prefer wrapping since you don't see the value in spending time on reimplemention, bug fixes, maintenance
21:41:11dom96The core devs of Nim developing these packages to hopefully make Nim succeed is a bad idea I think
21:41:36shashlicki'd much rather see existing C libs wrapped and layered with nice Nim callers
21:41:39FromGitter<zacharycarter> shashlick: parsing graphql queries is a very small subset of what a graphql implementation needs
21:41:55FromGitter<zacharycarter> and it's the only C/C++ library that the graphql team has published
21:42:09FromGitter<zacharycarter> most implementations of graphql in other languages don't use it
21:42:29shashlickmakes sense in that case
21:42:34FromGitter<zacharycarter> I'm going to write a library similar to - https://github.com/vektah/gqlgen
21:43:11shashlicki'm just averse to redoing stuff, guess i'm getting old :)
21:43:55FromGitter<zacharycarter> I use a lot of C libraries in my projects, but I don't think this one is a good fit - if we want our library to be used with modern graphql apps, we're going to need codegen
21:44:44FromGitter<zacharycarter> not that you couldn't generate code using the C graphql parser but... I don't see any implementations in any language using it
21:44:51FromGitter<zacharycarter> even though wrappers for those languages exist
21:50:09*dddddd quit (Ping timeout: 260 seconds)
21:50:09*Lord_Nightmare quit (Ping timeout: 260 seconds)
21:54:08*dddddd joined #nim
21:54:22*Lord_Nightmare joined #nim
21:55:35FromGitter<data-man> For Delphi, I used components from DevExpress for many years. I do not know another better library for any language. Such UI is loved by non-programmers. :)
22:05:13*EastByte quit (Read error: Connection reset by peer)
22:05:22*EastByte joined #nim
22:10:32*cspar_ joined #nim
22:10:34*cspar quit (Ping timeout: 264 seconds)
22:13:30*cspar__ joined #nim
22:15:05*cspar_ quit (Ping timeout: 256 seconds)
22:21:02FromGitter<data-man> @zacharycarter: Have you tried NanoVG?
22:23:35FromGitter<zacharycarter> mmhmm
22:28:16FromGitter<zacharycarter> are there any good libraries for writing a parser in Nim - or does anyone have any suggestions on what core libraries to use?
22:28:23FromGitter<zacharycarter> module rather
22:28:43FromGitter<data-man> https://github.com/bkaradzic/bgfx/blob/master/examples/20-nanovg/blendish.h :)
22:29:11FromGitter<zacharycarter> should I just use strscans?
22:30:29FromGitter<honewatson> @zacharycarter according to this survey GraphQL is not even mainstream in the JS community
22:30:34FromGitter<honewatson> https://stateofjs.com/2017/state-management/results
22:30:59FromGitter<data-man> strscans is very good. And must be extended.
22:31:00*MJCaley joined #nim
22:33:29FromGitter<zacharycarter> @honewatson well it's already easy enough to build a RESTful API with Nim... and I think GraphQL is a trending technology that will eventually become mainstream.
22:35:09FromGitter<zacharycarter> that chart is also kind of silly
22:39:21FromGitter<data-man> https://github.com/onqtam/rcrl - interactive C++ compiler
22:40:14FromGitter<zacharycarter> there's quite a few projects out there like that
22:40:21FromGitter<zacharycarter> you could do the same thing with Nim if you wanted to
22:40:43FromGitter<honewatson> It is trending but I'm not convinced it will be become mainstream at this point. I've evaluated it as an option and passed it over it this point. Even though its language agnostic its kind of part of the JS community where things can hype up and die down pretty quickly. For example have you ever heard of Hyperapp? It has quite a few more stars than GraphQL project yet most people would never have heard of it.
22:41:13FromGitter<honewatson> It may well become mainstream but the jury is out
22:41:22FromGitter<zacharycarter> yes I've heard of hyperapp - graphql is a much more established technology
22:41:35FromGitter<zacharycarter> not to mention most of the graphql implementation takes place server side
22:42:01FromGitter<zacharycarter> I'd say it's large enough to have all of these implementations - http://graphql.org/code/
22:43:24FromGitter<zacharycarter> I'm not even sure you know what graphql is if you're comparing it to hyperapp
22:43:33FromGitter<honewatson> We use React at work but I'm personally not a big fan of it though it does have a lot of tooling. It does funny things with the stacktrace and was built before a bunch of new features came out in 2015 for JS.
22:43:46FromGitter<zacharycarter> react has nothing to do with graphql
22:43:52FromGitter<honewatson> Yes I know that
22:44:05FromGitter<honewatson> they are completely different technologies for different purposes
22:45:39FromGitter<data-man> I dream about video where Araq talks about using the Nim VM as script engine. :)
22:45:58FromGitter<honewatson> I'm comparing the popularity of projects in Github and whether you can reliably use that to make predictions about future technology popularity
22:46:06*MJCaley quit (Quit: MJCaley)
22:47:15FromGitter<zacharycarter> I'm using the VM for config in my game engine I'm writing - I want to figure out how to pass objects back and forth. I've read a sentence describing how to do it - but I haven't tried it yet.
22:48:42*jaco60 quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
22:50:48*cspar joined #nim
22:50:52FromGitter<data-man> In VM, I do not have enough casting. :(
22:51:34FromGitter<data-man> And addr
22:52:34*cspar__ quit (Ping timeout: 260 seconds)
22:57:58*MJCaley joined #nim
22:58:47*vlad1777d joined #nim
23:08:38*cspar_ joined #nim
23:10:27*cspar quit (Ping timeout: 246 seconds)
23:13:00FromGitter<zacharycarter> well the VM doesn't support the entire stdlib - so I don't think it's really useful in its current state as a full scripting language
23:13:46FromGitter<zacharycarter> not to say you couldn't implement what's missing yourself
23:14:14FromGitter<zacharycarter> and obviously other scripting languages have been written w/ nim
23:15:08*vlad1777d quit (Remote host closed the connection)
23:16:56*vlad1777d joined #nim
23:29:53FromGitter<data-man> @zacharycarter: https://github.com/nim-lang/Nim/pull/6740#issuecomment-344260275
23:37:40FromGitter<krux02> @data-man wouldn't it be better to have a branching implementation with `when nimvm:`?
23:37:53FromGitter<krux02> I know it sucks this branching, but it works
23:37:55FromGitter<krux02> kind of
23:45:47FromGitter<data-man> @krux02: Yesterday t1ha 2.0 was released. I'll experiment with Nim-port . Maybe the Pearson hashing will be better. So many ways! :)
23:53:39*nohusuro quit (Quit: leaving)