<< 23-10-2017 >>

00:10:43*arecaceae quit (Remote host closed the connection)
00:11:02*arecaceae joined #nim
00:19:37*def-pri-pub left #nim (#nim)
00:24:11FromGitter<khogeland> Ok, I refactored my UI as an exercise in channels! It's all very nice looking now, IMO.
00:28:34*Snircle joined #nim
00:33:46*NimBot joined #nim
00:38:28*HoloIRCUser quit (Ping timeout: 240 seconds)
01:10:03*rosshadden quit (Read error: Connection reset by peer)
01:10:08*rauss joined #nim
01:24:10*JappleAck quit (Quit: Leaving)
01:29:27GitDisc[discord] <gooro0> @Yardanico It doesn't matter how cool the application is if we have to stick to IRC-bridge
01:30:22*SusWombat quit (Quit: Leaving)
01:30:36GitDisc[discord] <gooro0> we have either to admin that IRC won't go or to move on and left IRC behind
01:35:36*ender joined #nim
01:35:53*ender is now known as ender405
01:36:39GitDisc[discord] <gooro0> * leave
01:43:17*ender405 left #nim (#nim)
01:47:32*x86128 joined #nim
01:50:13*i64 joined #nim
01:50:21*i64 is now known as ender__
01:53:17ender__hello. just started using nim. using c2nim on a header. It defines a typedef to "unsigned __int64" when using MSVC. This fails to parse with "Error: ';' expected". How is this normally handled? Is there a uint64 type that i can use in c that works for all compilers? thanks
01:58:34*smt quit (Ping timeout: 264 seconds)
02:07:26*bkerin joined #nim
02:14:28skrylaruint64 *should* work in all compilers tho
02:21:00*ender__ quit (Ping timeout: 260 seconds)
02:23:01*patapon joined #nim
02:26:31pataponhello
02:35:50*ender__ joined #nim
02:37:20ender__k. will try it. is there a place to get a list of all such types known to c?
02:41:42ender__perhaps every type declared with magic pragma is known to c?
02:45:09skrylarthey begin with 'c'
02:45:14skrylarcstring, cint, cuint, cshort, etc
02:45:38pataponI have an issue when using the clang compiler on windows:
02:45:42skrylarthose will give you whatever the C equivalent is, while the nim types (ex. uint64) will give you that specific type
02:46:10pataponstdlib_system.o : error LNK2019: unresolved external symbol fdopen referenced in function open_GRr4dBTChSldEteMxZDsuw
02:46:38pataponand the same, in another function, for fileno
02:47:02pataponnote that it's actually the MSVC linker that is invoked here, through the clang driver
02:49:40ender__k. thx. will see if c2nim accepts typedef on uint64 instead of "unsigned __int64"
02:54:15*ender__ quit (Ping timeout: 260 seconds)
02:54:36bkerinis there a func to get the name of type as string?
02:54:48bkerinI though I saw in doc somewhere but not sure where now
03:06:38pataponalso nim should really be able to find cl.exe (the MSVC complier) without having to manually execute vcvarsall.bat
03:07:13pataponvcvarsall.bat does not work with powershell so i'm in a bind here if I want to use MSVC
03:16:56*Snircle quit (Quit: Textual IRC Client: www.textualapp.com)
03:18:29*martinium joined #nim
03:35:17FromGitter<khogeland> bkerin: https://nim-lang.org/docs/typetraits.html#name,typedesc
03:37:16*martinium quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
03:48:26bkerinkhogeland hmm that doesn't seem to work for a param e.g. 'this' in method react_to_harassment(this: Animal) {.base.} =
03:48:26bkerin echo this.type.name
03:48:47bkerino
03:49:02bkerinmaybe because its not a concrete type yet?
04:20:13skrylarhuh. for some reason i thought i had put nim-mode online somewhere
04:28:42*dddddd quit (Remote host closed the connection)
04:37:42*bkerin quit (Ping timeout: 260 seconds)
04:47:15*x86128 quit (Quit: Ex-Chat)
04:56:11*user3382 joined #nim
04:56:50user3382In the code sample on the "features" page: for person in people:
04:56:50user3382 echo("$1 is $2 years old" % [person.name, $person.age])
04:57:50user3382this doesnt really make good intuitive sense. Why not do echo(person.name + " is" + person.age "years old"); ala js
04:58:46user3382what's with the funky %[class.member , $class.member] ? why doesn't person.name have $ in front of it too
05:13:37skrylar"" %[] used to be how python did string formatting, it was probably thought to be more familiar given the frequent comparison to python
05:13:42*solitude joined #nim
05:14:00skrylari think python 3 prefers you use .format now
05:23:21*miran joined #nim
05:32:30FromGitter<x86128> @user3382 because it assumed to be a string. In Nim $ is explicit to string conversion operator.
05:35:16user3382thats the sort of trick i'd expect c to pull on me
05:35:49*Nobabs25 joined #nim
05:36:48FromGitter<x86128> you can write: echo(name & " is " & $age & " years old.")
05:37:32user3382that's a more intuitive representation, for sure.
05:38:46*Nobabs27 quit (Ping timeout: 264 seconds)
05:44:12*richboss joined #nim
05:46:38FromGitter<x86128> when you concatenating strings by hand, it can lead you to some sort of SQL-injection (for example, if you building an SQL statement), many of libraries, not only Nim, provides a same methods for constructing a string more securely by "formating" with placeholders. So this is recommended way
05:48:18user3382it's not that :P
05:49:36user3382echo as {person.name as string, " is ", " person.age as string};//how it's done in EL
05:56:13*nsf joined #nim
05:56:44skrylarthose tools are often still just string concatenators with a little rule machine though
05:57:24user3382Initiate people as {provides person as {provides name as string, age as number} is {{“John”,”Kate}{45,30}}}}; //how EL declares an array of people
05:57:46skrylarEL?
05:57:53user3382oh yes. Absolutely tru skyrlar. I do personally consider that a benefit- performance is in the hands of the coder.
05:58:00user3382Yes, the EL programming language.
05:58:33*richboss quit ()
05:59:29skrylarIn the case of SQL type formatters, a macro could be used in some cases
06:00:05skrylarthere is a side advantage to the way .net type formatters run in that its easier to outsource to a translator/config
06:00:57skrylarex. just having a toml file that lets you specify the sql format your program uses, so you could ex. swap between postgres and cockroach easy
06:01:14skrylarbut.. meh
06:01:20user3382I am more talking about the semantic structure than the underlying functionality...
06:01:38user3382semantic complexity dictates programmer efficiency
06:01:57user3382especially when you're coding at 2am, you come back a week later, and you're like.. what.. what is this??
06:02:49user3382formatting, casting, concat'ing.. it's all kind of part of the same process
06:03:15user3382after all your formatter needs the right inputs and if your cast produces garbage then it doesn't matter how you structure the data
06:07:47*miran quit (Ping timeout: 255 seconds)
06:09:00*couven92 joined #nim
06:22:27*user3382 quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client)
06:36:51FromGitter<mratsim> The "$placeholder"%[var1,var2] is what is done in C, C++, Rust, Python, it's fine
06:39:01FromGitter<mratsim> It's actually much easier to deal with specific numeric formatting (truncate after 4, choose scientific notation)
06:39:14FromGitter<mratsim> And iirc Haskell also has it
06:40:34*PMunch joined #nim
06:40:35*miran joined #nim
06:42:05*patapon quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client)
06:44:40*Nobabs25 quit (Quit: Leaving)
07:04:22*gokr joined #nim
07:05:01skrylarhmm.
07:05:09skrylarso FLIF is a thing, apparently. an image format
07:07:28miranis htere anybody in the world who uses flif? :D
07:09:22skrylari have no idea.
07:09:28skrylarsupposedly it's pretty good though
07:09:38skrylarand the advantage of game engines is you can use whatever format you actually want
07:17:49skrylarit looks like trying to load webp in native nim would be a bit of bother though
07:19:09*claudiuinberlin joined #nim
07:23:55*skrylar quit (Quit: Leaving)
07:24:12*Vladar joined #nim
07:32:55*PMunch_ joined #nim
07:33:11*PMunch quit (Disconnected by services)
07:33:19*PMunch_ is now known as PMunch
07:33:38*claudiuinberlin quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
07:33:53PMunchHow do you do floating point hex literals in Nim
07:39:11*claudiuinberlin joined #nim
07:47:04*claudiuinberlin quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
07:52:28GitDisc[discord] <gooro0> @patapon, Nim is able to find MSVC without manual running of bat-file. I also use PowerShell and build from VS Code
07:55:14GitDisc[discord] <gooro0> You have to use `vccexe` which is bundled with Nim. It invokes `vccenv` which in turn tries to find MSVC.
07:56:25GitDisc[discord] <gooro0> Doesn't work with VS2017 though. I made it work with a dirty local hack only.
07:58:21*claudiuinberlin joined #nim
08:08:07*claudiuinberlin quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
08:09:34*claudiuinberlin joined #nim
08:15:02*Arrrr joined #nim
08:15:02*Arrrr quit (Changing host)
08:15:02*Arrrr joined #nim
08:19:53PMunchWe now have a discord bot in here as well? Soon there'll be more bots than people in this channel :P
08:22:44miran"everybody is a bot except of you"
08:23:25cremDiscord bot? Is there a discord server?
08:31:54*libman quit (Quit: Connection closed for inactivity)
08:32:55GitDisc[discord] <GooRoo> Yes, there is one now https://discord.gg/pMx9KgX
08:33:28GitDisc[discord] <crem> Moo!
08:34:33cremRelay bots are much more readable when they colorize nicks btw.
08:34:46PMunchYeah
08:34:56PMunchThe gitter bot is a bit annoying though
08:35:29PMunchWhen people highlight me the message is usually in a different color, but since the gitter bot already uses colors it resets it after the nick :P
08:36:18GitDisc[discord] <crem> Whoever created that server, could you change default notification settings to "only @mentions"? They have weird default default setting to notify for all messages.
08:36:41GitDisc[discord] <crem> "default default" was not a mistype.
08:37:01GitDisc[discord] <GooRoo> Ask @Yardanico
08:38:02PMunchAnd could we get it to not write [discord] in front of every message on IRC?
08:38:11PMunchThe bot is already called GitDisc..
08:40:16cremHm, there's no real reason to connect to discrod I'm here anyway.
08:40:48GitDisc[discord] <GooRoo> BTW could you please explain why do you use IRC? What features does it give you? Or I don't know... just why? :)
08:41:53cremAlso channel categories in discord are titled "TEKCTOBbIE KAHAJlbl" and "TOJlOCOBblE KAHAJlbI", whatever it means!
08:43:04cremMessaging apps that person uses mostly determined not by features but rather by people who use that. There are some people who are only on IRC.
08:44:43GitDisc[discord] <GooRoo> Right, but those people are in the same situation: if everybody moves to another service, will they stay?
08:45:36FromGitter<x86128> @crem "text channels" and "voice chanels"
08:45:45cremЗнаю. :)
08:45:59FromGitter<x86128> UTF-8: круть
08:46:33GitDisc[discord] <GooRoo> Is here anybody who doesn't speak по-русски?
08:46:37GitDisc[discord] <crem> I'm all for dropping IRC completely and moving to discord. Even though when you have lots of channels/servers joined, it's less manageable than in some of IRC clients.
08:48:17FromGitter<x86128> @crem How about logs? Is it provides some API for searching and downloading old logs?
08:48:48GitDisc[discord] <GooRoo> Probably I'm not the target audience and do not have so many servers connected.
08:49:54AraqGooRoo plenty, stick to English please
08:49:56GitDisc[discord] <crem> Ah year, it's a pain point. You can search and browse all history in discord while you joined. But once I've been banned from one of language learned servers (for being a silent lurker!) and suddenly all logs are gone for me.
08:51:12GitDisc[discord] <GooRoo> @Araq, that was more like a joke, sorry
08:51:39*claudiuinberlin quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
08:52:22GitDisc[discord] <crem> For IRC, my setup is tmux+weechat on always-on PC, plus weechat client (client to client) on android phone, and that's good enough. But it's not that trivial so most people don't have anything similar.
08:54:17GitDisc[discord] <GooRoo> I see.
08:55:46GitDisc[discord] <GooRoo> I usually try to avoid thing that require great time investments in order to make them useful and convenient (until there are no alternatives)
08:56:18GitDisc[discord] <GooRoo> *things
08:57:55GitDisc[discord] <GooRoo> It's always possible to find something for what you can spend that time instead
09:20:35dom96Yeah, we won't leave IRC... :)
09:22:35*vlad1777d joined #nim
09:22:38dom96A bit surprised by how many people prefer to use Discord
09:24:01GitDisc[discord] <GooRoo> Not too many yet. You should also try ;)
09:24:22GitDisc[discord] <GooRoo> I mean on a regular basis
09:47:44*PMunch_ joined #nim
09:48:34*PMunch quit (Disconnected by services)
09:48:37*PMunch_ is now known as PMunch
09:52:47dave24Discord uses electron, enough reason for me not to use it.
09:53:02cremSounds like a religious reason.
09:54:06dave24It's a waste of memory for lazy developers convenience IMO
09:54:52PMunchOh dom96 you already added the block/break thing for Jester so it can use templates and stuff. I thought you had forgotten about it :P
09:55:07PMunchWas thinking of doing it for hacktober :P
09:55:13dom96I think that might have been somebody else
09:55:15FromGitter<x86128> electron uses your resources like -> https://i.imgur.com/jqsdofy.mp4
09:57:47PMunchHmm wait
09:58:08PMunchIt looks like it does it, but maybe not? The commit was 3 years ago by you
09:59:15PMunchMaybe I'll look into it when I get home
09:59:55*claudiuinberlin joined #nim
10:00:22PMunchBut I also need to figure out how to do custom widgets in genui..
10:02:55*zolk3ri joined #nim
10:06:20PMunchSo much to code, so little time :P
10:10:20*claudiuinberlin quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
10:10:43*claudiuinberlin joined #nim
10:11:08*claudiuinberlin quit (Client Quit)
10:23:34GitDisc[discord] <GooRoo> I missed the moment when RAM got too expensive to buy more and not think about Electron or whatever else
10:26:31*Vladar quit (Quit: Leaving)
10:27:17*claudiuinberlin joined #nim
10:27:36PMunchElectron is a drain on battery as well though
10:27:44PMunchWhich sucks if you're on a laptop
10:28:12cremIf discord was open source or at least published the protocol, would be much closer to being perfect.
10:29:42dom96what do you like about Discord that you prefer it over IRC?
10:31:17euantorone of the things would be that there's one client that always supports Markdown/emojis/whatever I guess. With IRC it depends on the client whether you see a message the way the author intended
10:32:52PMunchThat would be true with an open discord protocol as well though
10:33:04dom96not necessarily
10:33:38planetis[m]matrix is open source btw
10:33:57planetis[m]and offers bridges to many protocols
10:34:25planetis[m]also you can have your own instance
10:34:46*Viktor joined #nim
10:35:29PMunchWell, you can always argue that IRC clients that doesn't show Emojis or styling of various styles didn't do the implementation correct
10:38:19Viktordom96, I was watching your sdlib fixes stream on youtube. You had to use mget on an object when in an async function. Can you write a few words, why this is needed, and what does mget do exactly?
10:39:04PMunchmget just returns the values as mutable fields. Meaning that you can change them
10:39:14*dddddd joined #nim
10:39:47Viktorso you pass in something as a value, which makes a copy of it, and then you can change the value on that specific copy
10:40:28FromGitter<mratsim> no, it doesn’t copy, it gives you an implicit pointer so you directly change the memory location
10:41:35*Yardanico joined #nim
10:42:07Viktorok, got it, thank you!
10:42:36Yardanicohi people
10:43:29PMunchHi Yardanico
10:46:02Yardanicodom96, so what about discord-gitter-irc-twitch bridge?
10:46:32FromGitter<gokr> Found a place we can "push" nim btw, as a build plugin for snapcraft. It has support for Go and Rust, and it only takes a small Python script.
10:46:43FromGitter<gokr> Will see if I can whip it up
10:46:52*claudiuinberlin quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
11:02:08FromGitter<dom96> Viktor: Yeah, basically what PMunch said. I had to use a FutureVar[T] because 'var T' isn't supported in async yet.
11:02:24FromGitter<dom96> Which reminds me that I need to add support for that
11:07:44cremSo what I like about discord over IRC: way to paste code snippets directly, way to paste images (alhtough that feature is overused), way to +1 messages, easy way to chat from multiple clients, way to have informational channels (where just bunch of links hang forever).
11:08:12cremVoice channels are only useful for some networks, like language learning ones.
11:10:10FromGitter<dom96> So you could totally have that with a good IRC client
11:10:31FromGitter<dom96> In fact I'm fairly sure irccloud does it
11:10:33zolk3rilicense: proprietary freeware
11:10:34zolk3rihmmmmmm
11:15:06euantorirccloud does most of what Discord does, without the voice
11:19:13Yardanicobut if you post a code snippet from irccloud, it will be sent as a link to IRC server, so others will need to open their browser to see this code snippet
11:19:34euantoryep
11:24:44GitDisc[discord] <GooRoo> What I like in Discord is mostly the same as @crem does. But what is more important is a good user experience in general: it's just nice to see it and to use it. Features like pasting the code or using Markdown are naturally integrated in it. And it has quite good mobile client as well
11:25:55GitDisc[discord] <GooRoo> However, while Discord is good for some chattering, I prefer Slack for work due to its capabilties of integration of 3rd party services including GitHub
11:27:15GitDisc[discord] <GooRoo> It is also based on Electron though
11:27:44PMunchMarkdown is made to convert to HTML though isn't it?
11:27:54PMunchSo Electron kinda-ish makes sense there
11:28:38PMunchWould probably be a PITA to implement cross-platform native-UI markdown
11:29:44GitDisc[discord] <GooRoo> especially if it's about GFM
11:29:45Yardanicomarkdown isn't made to convert only to HTML
11:29:56Yardanicoalso to RST
11:30:47Yardanicobut honestly it's really bad that we're in 2017 and I need to go to gitter to post code snippets instead of posting them right there :/
11:30:56Yardanico*gist or gitter
11:31:04PMunchYardanico, ix.io is your friend :)
11:31:07GitDisc[discord] <GooRoo> with pandoc it's possible to convert it to whatever you like, but you are right
11:31:19flyxMarkdown initially *was* made to convert only to HTML *snippets* (i.e. parts of a web page, like a blog post) and later implementations expanded targets
11:31:42miranwho made the discord bot? can you please remove `[discord]` part of the message?
11:31:43PMunchI've set up a keybinding that does something like this: "xclip -o -selection primary | ix | xclip -i -selection clipboard
11:31:44PMunch"
11:31:56Yardanicomiran, well I can, but I initially wanted it to be gitter-discord-irc-twitch
11:32:01Yardanicoso prefix would be neccessary
11:32:11Yardanicoyeah, I'll remove this prefix for now
11:32:16miranthanks :)
11:32:20PMunchI think it's better to have multiple bots..
11:32:23flyxwhy should we care from which network the message came?
11:32:27PMunchSo that the name field can be used
11:32:27YardanicoPMunch, why?
11:32:43Yardanicowell it would be very hard to maintain
11:32:51miranso we can have another bot
11:32:54PMunchBut easier to read
11:33:08miranthe one which is used to manage all of his sub-bots
11:33:46*GitDisc quit (Remote host closed the connection)
11:33:56*GitDisc joined #nim
11:33:59Yardanicodone
11:34:10miranagreed with PMunch - readability counts
11:34:22Yardanicobut you'll need a lot of checks in the bots
11:34:35PMunchWhy?
11:34:51Yardanicoe.g. if message comes from FromGitter and you need to relay it to discord, you'll need to check if nickname is FromGitter
11:34:58Yardanicoand remove that nickname from the message sent to discord
11:35:08PMunchAh right
11:35:46PMunchWell, if all the bots were written in Nim and followed the same pattern it should be fairly easy to have just a list of names to strip away and replace
11:36:00Yardanicowell I think I can have different nicknames with this bot too
11:36:08Yardanicojust have different gateways
11:36:34PMunchHmm, can you write here without being identified on FreeNode?
11:36:49PMunchIf so you could /nick the bot to the person who spoke
11:37:00PMunchAnd append or prepend the network
11:37:15Yardanicoyes, you can write on IRC without being identified
11:37:21Yardanicobut you can't do that on gitter or discord
11:37:25Yardanicoor twitch
11:37:33GitDisc<GooRoo> BTW
11:37:44GitDisc<GooRoo> Slack has IRC gateway (as well as XMPP)
11:37:55Yardanicowell this bot supports slack too
11:37:57Yardanicoand xmpp too
11:38:06GitDisc<GooRoo> but it's different
11:38:26GitDisc<GooRoo> with the bot I see all your messages posted by the bot itself
11:38:31GitDisc<GooRoo> and it looks wierd
11:38:38Yardanicobecause it's not at server level
11:38:51GitDisc<GooRoo> right
11:39:19GitDisc<GooRoo> and in Slack you have to register first (this is the downside), but then you can connect to its server via IRC
11:39:29GitDisc<GooRoo> and it will know that it's you
11:39:35GitDisc<GooRoo> and will post your messages natively
11:39:54Yardanicoand you need to send invites via emails etc
11:39:57Yardanicothat's not good too
11:40:24GitDisc<GooRoo> yes, you need email, but is it a big problem?
11:40:40GitDisc<GooRoo> I just don't get it
11:40:47PMunchYardanico, you could still have a single bot on here though. And just /nick it to the network it's relaying from
11:40:54Yardanicodo you know how slack invites work?
11:41:04Yardanicoyou'll need some website or bot so it will send invites
11:41:08PMunchThen do random crap on the other platforms :P
11:41:08GitDisc<GooRoo> yeah, invites in slack are shitty
11:41:22GitDisc<GooRoo> but you it to register only once
11:41:34GitDisc<GooRoo> while you are using the application every day
11:41:36GitDisc<GooRoo> what is worse?
11:42:08GitDisc<GooRoo> * you have
11:42:23Yardanicoso anyway as I can see we'll do nothing with current gitter/irc chat system ;)
11:42:52GitDisc<GooRoo> and it's bad IMHO
11:42:58Yardanicoyes
11:43:02Yardanicobut we can't do nothing about it
11:43:19*claudiuinberlin joined #nim
11:44:26PMunchYou should make a bot-coordinator Yardanico. With dynamic loading of bot-interfaces and configurations
11:44:30PMunchThat would be pretty cool
11:44:41Yardanicoand hard :P
11:44:52PMunchHaha
11:45:04PMunchDynlib in Nim is actually pretty simple
11:45:19PMunchHad some fun with it over the summer
11:45:27Yardanicobut how you would use it with async?
11:45:46Yardanicoand no, I wouldn't do it with threads because I don't know how to deal with them in a system like this
11:46:13PMunchWell, the way I did it was to have a config call that registered various procedures the main program could call. Then it could call them whenever it wanted
11:46:19Yardanicoyes
11:46:24Yardanicobut you can't have async procs
11:46:33PMunchIn a dynlib?
11:46:41Yardanicoyes
11:46:42*Snircle joined #nim
11:46:58PMunchAre you sure?
11:47:13Yardanicowell async procs are iterators
11:47:25PMunchAaah
11:48:02PMunchHmm, I guess the easiest would be to run them each in their own thread..
11:48:27Yardanicobut you would have to deal with all that channel communication
11:49:38PMunchOf course
11:49:44PMunchBut that's not too hard either
11:49:56Yardanicoharder than async for sure :P
11:51:13PMunchOf course, but way cooler :P
11:53:04FromGitter<mratsim> Regarding Electron apps, I don’t know how Slack and Atom did it but they are probably the top battery wasting apps. While Gitter and VScode are much more reasonable ...
11:53:05*claudiuinberlin quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
11:54:02*arnetheduck joined #nim
11:54:48*Arrrr quit (Ping timeout: 240 seconds)
11:55:18PMunchmratsim, everything is possible if you try hard enough :P
11:55:43PMunchI should do some actual battery benchmarks with various editors
11:55:47PMunchIt would be interesting to see
11:56:48PMunchI had what felt like a noticeable increase in battery life when I switched to using Vim on my laptop. But it would be interesting to test.
12:05:32*claudiuinberlin joined #nim
12:06:01*claudiuinberlin quit (Client Quit)
12:19:20*Vladar joined #nim
12:19:45*Arrrr joined #nim
12:19:46*Arrrr quit (Changing host)
12:19:46*Arrrr joined #nim
12:24:34*claudiuinberlin joined #nim
12:24:58FromGitter<krux02> how do I realease a fork of a library in nimble?
12:25:34PMunchIs it a fork, or a continuation of a dead project?
12:26:10FromGitter<krux02> well more a continuation of a dead project
12:26:15PMunchIf it's a true fork you probably have a separate name for it, and hence no trouble adding it to Nimble.
12:26:27PMunchHmm, that's a tough one
12:26:32FromGitter<krux02> not really dead, because I continued to develop it but the original developer is not active in nim anymore
12:26:33PMunchDo we delete the old one?
12:27:00Yardanicowell usually you make a PR to packages
12:27:09Yardanicochanging the url of the package
12:27:14FromGitter<krux02> well I already got the offer to take over the project, but the question is how to do it
12:27:14Yardanicoand explain why old one is dead :)
12:27:24Yardanicojust make a PR to packages and change the package url here
12:27:25PMunchYeah, in cases like this I think it would be reasonable to "steal" the package and remove the old one.
12:27:56FromGitter<krux02> ok when that is possible, then I guess that is tho way to do it
12:28:30FromGitter<krux02> where is that packages list?
12:28:57FromGitter<krux02> np found it
12:29:08dom96just change the URL
12:29:15dom96in the packages list :)
12:29:31Yardanicoas I said :P
12:30:22dom96But please get the maintainer to sign off on it by commenting in your PR if you can
12:33:09GitDisc<crem> btw mIRC color codes are not stripped, so what FromGitter adds around nicks looks weird in discord.
12:35:42dom96Told you this Go bot was shit :P
12:36:34Yardanicomake a better one then :D
12:38:26dom96I would if I had a time machine
12:38:43mirandom96: Araq says `list` shouldn't be used in sequtils as a parameter name ;)
12:38:50Yardanicoyeah
12:40:04dom96yeah? why's that?
12:40:26YardanicoNim doesn't use 'list' for seqs.
12:40:29Yardanicohttps://github.com/nim-lang/Nim/pull/6565#issuecomment-338607829
12:40:50Araqwe have lists.nim that is about linked lists
12:41:03Araq'list: seq[T]' is confusing IMO
12:41:17dom96so what do you prefer? 'seq'?
12:41:24miranok, i can revert this - should `s` be used or some more descriptive name?
12:41:27*claudiuinberlin quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
12:41:30Yardanicodata maybe ? :)
12:41:41Araq's', 'seq', 'elements'
12:41:44miran`data` was used in couple of functions before
12:42:06dom96'data' can literally be used as a variable name for every variable
12:42:12mirans: seq[T], x: T?
12:42:28Araqyou know me, I would use 's'
12:42:43miranand the element of `s` is `x`, or some other name?
12:42:50dom96please don't use 's'
12:43:13Araqfor generics like these the names have no meaning
12:43:33dom96it doesn't hurt to be more descriptive
12:44:01Araqin this case distraction from the type does hurt
12:44:08miranok, but please don't choose `seq` :)
12:44:15Araqhaskell wouldn't even name these iirc
12:44:36Araqbut as a compromise we can go for 'elements, elem'
12:44:43*elrood joined #nim
12:45:15dom96I still vote for 'list'
12:45:21dom96a 'seq' is a list
12:45:22miranungh, `elements` doesn't sound right to me, as a name for seq
12:45:25Araqor 'elements, element' but then only a single letter is between them
12:45:42YardanicoAraq, how can I make this work without sleep(500) at line 27? https://gist.github.com/Yardanico/478b39a78fd9baa7ecb78d1dd672f2b7
12:45:43miran`x` and `xs`, like a true functional style :D
12:45:50Yardanicoor my code is wrong ? :D
12:45:52Araqa seq is not a list in my book
12:46:06Yardanicohttps://math.stackexchange.com/questions/1160813/whats-the-difference-between-list-and-sequence-as-mathematical-concepts-not-pr :D
12:46:11dom96It is in the English language
12:46:20Araqlists have a recursive structure, seqs don't
12:46:41Araqlists have 'head' and 'tail'
12:46:50Araqseqs have indexed access
12:46:51dom96You could easily implement these functions for linked lists too
12:47:07Araqdom96, then it's an iterable or enumerable
12:47:30Araqmaybe just 'container: seq[T]; item: T'
12:47:50Araqsince the 'seq[T]' here should become a Container concept anyway
12:48:50FromGitter<manterolat> How about 'term' for individual elements?
12:50:03Araqwell 'container' and 'item' make the most sense to me if you don't like single letters (boo!)
12:50:11miranok, let's have `item: T`, and for the other part - probably more discussion is still coming in :)
12:50:57Araqhttps://stackoverflow.com/questions/3917574/how-is-pythons-list-implemented
12:52:16Araqhttps://docs.python.org/3/faq/design.html#how-are-lists-implemented
12:52:27Araq"Python’s lists are really variable-length arrays, not Lisp-style linked lists."
12:52:44miranbtw, i'm ok with single letters - if they are used consistently (which will be)
12:52:45Araqit's really a misnomer causing confusion.
12:52:45dom96I don't see what that proves :)
12:53:34FromGitter<krux02> hey dom96 what do you think about stealing a package: https://github.com/nim-lang/packages/pull/600
12:53:56dom96krux02: like I said, please try to get the owner of the package to comment that they are okay with it
12:54:28FromGitter<krux02> ok
12:55:27dom96miran: just revert to single letters then
12:55:41dom96It's not a super big deal for these functions
12:55:56miranwill do, expect PR in couple of hours
12:56:07dom96Sorry for the waste of time :)
12:56:21dom96You can just click "Revert this PR" on GitHub IIRC
12:56:25miran`s` and `x` will do, or do you guys prefer something else? :D :D
12:57:04Yardanicodom96, yeah you can
12:57:12Yardanicoshould I do it ? :P
12:57:18miranno please
12:57:22AraqYardanico, what's the problem?
12:57:41Araqdon't write the sleep
12:57:45miranbecause i corrected some other styling details (space around `..`, for example)
12:58:09YardanicoAraq, without sleep a while true loop at line 28 sometimes gets "http://httpbin.org/" from channel before another thread can get it
12:58:13*claudiuinberlin joined #nim
12:58:24miranthis way i'll just replace the new names with single letters, easier to do
12:59:00AraqYardanico, use different input/output channels?
12:59:05miranbtw, changing to openarray is still a no-no?
12:59:06YardanicoAraq, ah, probably :P
12:59:53Araqmiran, huh? I thought we agreed that openarray is the way to go
13:00:26miranoh, we did? then i misunderstood what you have said :) will do this too then
13:00:30YardanicoAraq, yeah, thanks, it works
13:00:34*JappleAck joined #nim
13:00:40FromGitter<mratsim> This is a (FP) list btw: https://github.com/vegansk/nimfp/blob/master/src/fp/list.nim
13:00:49Yardanicobtw, are those "threads" and "chans" arrays allocated on a shared heap?
13:00:59Yardanicoso another thread can access them
13:01:20miranmratsim - so, `xs`, huh? :D
13:02:31FromGitter<mratsim> Not in sequtils, that would be confusing since there is no "cons" operator like x : xs
13:02:47mirantrue....
13:03:00Yardanicobut anyway it's fairly easy to use channels/threads for a simple stuff like this
13:03:30FromGitter<mratsim> I use oa in my library (for openarray)
13:04:11FromGitter<mratsim> I really wonder from @Araq dug the openarray name out :p
13:04:19FromGitter<mratsim> From where
13:04:57miranhm, i would prefer something ending in `...s` (including just `s`), to make it clearer it is "plural", containing stuff
13:05:25Yardanicobut you wouldn't write "openarrays", right?
13:05:33miranhehe, right :)
13:05:49Araqmratsim, delphi
13:06:41FromGitter<mratsim> Yep found some references in Delphi, Oberon and modula 2
13:07:11dom96krux02: hrm, maybe it would make more sense if stavenko added you as a contributor to his repo?
13:07:17FromGitter<mratsim> Use elems then
13:07:19dom96that way all issues/PRs would be preserved
13:11:07*sleepyqt joined #nim
13:16:19*patapon joined #nim
13:17:44*ipjk joined #nim
13:20:48*MyMind joined #nim
13:22:09*Sembei quit (Ping timeout: 248 seconds)
13:23:35*JappleAck quit (Ping timeout: 240 seconds)
13:28:52dom96Can somebody with knowledge surrounding this review it? https://github.com/nim-lang/x11/pull/10
13:30:05*Viktor quit (Ping timeout: 260 seconds)
13:32:52FromGitter<gogolxdong> Is karax production-ready?
13:41:20*JappleAck joined #nim
13:42:25dom96Araq: Are destructors stable enough for this? https://github.com/nim-lang/Nim/issues/4077#issuecomment-307791495
13:42:34dom96(or will they be?)
13:44:49*patapon quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client)
13:45:34*claudiuinberlin quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
13:47:17*patapon joined #nim
13:48:14*claudiuinberlin joined #nim
13:48:54patapondo you know if it's possible in nim to have something like the "with" statement in D (https://dlang.org/spec/statement.html#with-statement)?
13:49:23cremCommon answer on this channel is "you can write a macro".
13:49:41cremLet's wait for an answer... (I don't really know nim).
13:49:46pataponme neither
13:49:51flyxwell you can.
13:50:17flyxbut you need to think a bit about the semantics
13:50:36dom96patapon: https://nim-lang.org/docs/manual.html#overloading-resolution-automatic-self-insertions
13:50:38pataponthere is the {.this} pragma, but i'm not sure that it will work with methods
13:52:32pataponoooh it's all there in the docs
13:52:35pataponthanks
13:55:18*miran quit (Quit: Page closed)
13:55:45*arnetheduck quit (Ping timeout: 248 seconds)
13:56:58subsetparkHey gang ... My Nim talk from PyGotham 2017 is up on Youtube: pyvideo.org/pygotham-2017/nim-a-new-option-for-optimizing-inner-loops.html
13:57:16dom96ooh yay
13:57:50PMunchCool, trying to convert some Pythonistas?
13:57:59*arnetheduck joined #nim
13:58:14dom96subsetpark: you're a brilliant speaker :)
13:58:44subsetparkYou know that because you watched it already, or just because I'm talking about Nim??
13:58:53subsetparkPMunch: not convert; it's about using Nim for Python FFI
13:59:06dom96I'm watching it now, based on the first few minutes I can already say that :)
14:00:22PMunchsubsetpark, so no hope that they will jump ship and join us? :P
14:00:45subsetparkWell, you know what they say. The first taste is free.
14:01:28PMunchHaha :P
14:03:56PMunchIs this the proper way to do this, or is there a better way? https://pastebin.com/xMUr8Qnc https://pastebin.com/acK0dAXS
14:04:14PMunchTrying to load a dll into a project but allow it to call procedures defined within the main program
14:04:32PMunchBasically the main program contains some utility functions but I want to extend it with DLLs
14:07:50dom96Submitted you to r/programming :)
14:08:42pataponooh so it seems you can have type-safe builders kotlin in nim
14:08:48pataponwhich is pretty cool
14:11:40PMunchAnyone got any input on the dynlib thing? Is this a safe way of doing it? Will Nim unexpectedly crash doing it this way?
14:12:35*claudiuinberlin quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
14:14:31*x86128 joined #nim
14:15:52*claudiuinberlin joined #nim
14:24:07dom96subsetpark: Just watched it all. Awesome talk, great job :D
14:24:22subsetparkThank you my friend! I take it I didn't say anything grossly incorrect
14:25:16PMunchLooking forward to watching it when I get home :)
14:26:22dom96Not at all. You could have gone into some more detail with some of the questions, but you likely weren't aware of these things in such detail. For example, the JSON benchmark showing Nim's high memory usage is actually due to the way that Nim is parsing JSON (it reads the full JSON into memory, whereas the C++ parses it "on-demand")
14:29:13*PMunch quit (Quit: Leaving)
14:29:23FromGitter<data-man> @subsetpark: https://github.com/subsetpark/orcish Why your talk was not in Orcish? :)
14:30:43FromGitter<krux02> dom96 I dislike the way nim parses json that I recommend to take that library away from the standard library
14:31:35FromGitter<krux02> I don't want to dake that library away entirely, but there are better json libraries on nimble but they are not used because people tend to use the things in the standard library
14:31:52dom96Why do you dislike it so much?
14:32:25FromGitter<krux02> because it is very memory inefficient and slow
14:33:05*patapon quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client)
14:33:34*claudiuinberlin quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
14:33:57*arnetheduck quit (Remote host closed the connection)
14:35:01dom96This is only a problem when reading huge JSON files, which IMO isn't super common
14:35:20FromGitter<krux02> what do you think is huge?
14:35:23FromGitter<krux02> 200MB?
14:35:28dom96we should offer a "pull" parser though
14:35:40dom96yes
14:35:46subsetparkdata-man: :) That's actually a translation I put together of a coworker's script, written in Swift, because his version was extremely slow and he wanted to know if Nim would be faster
14:36:01GitDisc<GooRoo> Regarding naming discussion above: one more word that can be used instead of `list` is `collection`
14:36:08dom96subsetpark: was it faster? :O
14:36:17subsetparkmuch, much, much faster
14:36:20FromGitter<krux02> I wrote a converter from json to a binary dump just to cache the json parsing
14:36:27dom96subsetpark: wow :D
14:36:35*arnetheduck joined #nim
14:36:55*claudiuinberlin joined #nim
14:37:07subsetparkSwift's handling of character replacement in strings is insane. He had to constantly convert chars or char sequences into string views in order to compare them, then convert back to edit them - and I don't think it was doing anything in place at all
14:37:43dom96Interesting.
14:37:57*arnetheduck quit (Remote host closed the connection)
14:38:58subsetparkMy implementation - which is the naive approach, no buffering or anything - can process the text of the fellowship of the ring in, i think, ~10ms
14:41:09*arnetheduck joined #nim
14:41:57*gangstacat quit (Quit: Ĝis!)
14:43:32*TjYoco joined #nim
14:48:22dom96Awesome. But maybe your colleague's implementation was really inefficient.
14:49:46subsetparkAlmost certainly. I think it was perhaps idiomatic to a fault.
14:50:21subsetparkBut my understanding is that Swift is in such massive flux right now and strings / string views are the things that get continue to get changed
14:50:52*gangstacat joined #nim
14:51:25*Jesin joined #nim
14:51:27dom96yeah, I sort of admire how they did it.
14:51:46dom96It feels sorta like cheating though :)
14:51:58dom96They just release major versions rapidly
14:54:15*elrood quit (Quit: Leaving)
15:00:08*x86128 quit (Ping timeout: 255 seconds)
15:01:06*miran joined #nim
15:02:03*claudiuinberlin quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
15:08:34*claudiuinberlin joined #nim
15:14:47Araqdom96, seems so
15:15:01Araqcould use destructors for that.
15:15:14Araqwell not right now because generic destructors are being debugged
15:15:24Araqbut real soon (TM)
15:15:26dom96awesome
15:15:44Araqin fact, it's mind bogglingly difficult
15:15:56Araqnot sure why
15:20:28*unclechu_ joined #nim
15:20:54*unclechu_ quit (Remote host closed the connection)
15:24:08*JappleAck quit (Ping timeout: 240 seconds)
15:24:22FromGitter<Yardanico> crem: there's nothing bad writing a macro instead of a compiler magic
15:29:07Yardanicobecause instead of adding a lot of features to the core language you can write them as macros
15:29:16YardanicoAnd it's not bad
15:31:04*claudiuinberlin quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
15:32:34*redlegion joined #nim
15:32:59miransubsetpark: nice talk!
15:33:09*claudiuinberlin joined #nim
15:33:27miranthe only minus is - i tried to move the mouse pointer from the screen sooo many times :)
15:34:35*claudiuinberlin quit (Client Quit)
15:34:43Yardanicosubsetpark, wait, there was people who knows about nim?
15:35:10subsetparkYeah... I'd say maybe ten/fifteen folks new at least a little about it.
15:35:16Yardanicowow
15:35:43Yardanicoyeah, your talk is great, I can see that already :P (watched 1.5 mins)
15:37:47*JappleAck joined #nim
15:38:09Yardanicosubsetpark, btw, you maybe should've said that you can use "return" too :)
15:38:23Yardanicoat 11:12 :)
15:38:45subsetparktrue
15:40:41Yardanicosubsetpark, btw, did you try nim-pymod?
15:41:41subsetparkYes, but lack of sequence types made it a no-go.
15:43:01Yardanicoah, ok
15:43:07Yardanicobut you always can make a PR :P
15:43:32Yardanicooh wait
15:43:37Yardanicosubsetpark, you can use sequences
15:43:56Yardaniconim's seq would be translated to python's list
15:44:06Yardanicoah no
15:44:12Yardanicosorry, it's "in development"
15:47:57subsetparkyeah :)
15:48:26subsetparkBesides, I am much happier having vanilla python and vanilla nim with a vanilla interface than relying on macros and codegen
15:49:33Yardanicosubsetpark, btw, did you try pypy at your company ? :)
15:49:41Yardanicoit can speedup python code too
15:50:44subsetparkYeah, we've looked at it. But it would require replacing our entire runtime, and there are many libraries that are not compatible.
15:51:02Yardanicoare you using many native libraries?
15:51:16Yardanicoas python packages
15:51:35Yardanicobecause recently pypy improved compatibility with C packages a lot
15:51:40Yardanicoe.g. pandas, numpy, scipy work on pypy
15:51:50subsetparkthat's good to know - needless to say that wasn't the case when we evaluated it last
15:52:17Yardanicosubsetpark, https://morepypy.blogspot.ru/2017/10/pypy-v59-released-now-supports-pandas.html :)
15:52:23*claudiuinberlin joined #nim
15:52:44GitDisc<scriptkiddy> Cython is another thing to look into
15:54:33Yardanicoalso pypy with cffi is faster than python with ctypes (interfacing with C) :)
15:57:56miranYardanico: one question about templates - do you have to declare the result with `var result`?
15:58:09Yardanicomiran, templates are just code substitutions
15:58:21miranso, that's a "no", then?
15:58:31Yardanicoe.g. all code that you write in a template will be embedded at the place where template was called
15:58:50Yardanicowell you can have a result in a template
15:58:59Yardanicoso it would return some value
15:59:00miranhttps://github.com/nim-lang/Nim/blob/master/lib/pure/collections/sequtils.nim#L442
15:59:07Yardanicowell not return
15:59:11Yardanicoyeah
15:59:14miransee line 451
15:59:17YardanicoI know
15:59:29Yardanicosee line 456
15:59:38Yardanicobasically you don't need to do that
15:59:42miranboth not needed, right?
15:59:43Yardanicountil your template needs to return some value
15:59:49Yardanicothey are needed
15:59:52Yardanicohere
16:00:06Yardanicomiran, so can you show your code which you're trying to make work ? :)
16:00:23mirani'm just looking at this template
16:00:43miranand was wondering if it would work the same without lines 451 and 456
16:00:53miranbecause bool result is by default false
16:00:58Yardanicomiran, no it doesn't
16:01:03Yardanicobecause template doesn't have an implicit result
16:01:13Yardanicoand you don't need to have explicit types in a template
16:01:31miranahaa! i didn't know that, that's why i'm asking
16:01:50Yardanicobasically this template would evaluate to the last expression in it
16:01:55Yardanicoso last expression here is "result"
16:02:27miranthanks!
16:03:35*TjYoco quit (Ping timeout: 252 seconds)
16:05:57*dhalinar joined #nim
16:07:22*TjYoco joined #nim
16:10:00*claudiuinberlin quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
16:17:01*claudiuinberlin joined #nim
16:17:10*kafke joined #nim
16:27:06*claudiuinberlin quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
16:28:10*gooseus joined #nim
16:52:17*claudiuinberlin joined #nim
16:52:25*nsf quit (Quit: WeeChat 1.9)
16:55:31*elrood joined #nim
16:57:00*lastjedi joined #nim
17:02:50*Snircle quit (Quit: Textual IRC Client: www.textualapp.com)
17:03:29*TjYoco quit (Ping timeout: 248 seconds)
17:05:01*TjYoco joined #nim
17:06:07*dhalinar quit (Ping timeout: 248 seconds)
17:11:09*claudiuinberlin quit (Quit: Textual IRC Client: www.textualapp.com)
17:25:50*gooseus quit (Quit: Page closed)
17:25:50*Snircle joined #nim
17:29:49*Trustable joined #nim
17:30:17*solitude quit (Remote host closed the connection)
17:31:47*solitudesf joined #nim
17:41:51*miran quit (Ping timeout: 248 seconds)
17:54:03FromGitter<Bennyelg> osx probelm ? ⏎ dlopen(libssl.so, 2): image not found ⏎ could not load: libssl.so
17:55:37*miran joined #nim
18:07:17dom96Bennyelg: running what?
18:11:37*claudiuinberlin joined #nim
18:16:26FromGitter<Bennyelg> sha256 algo
18:16:34*PMunch joined #nim
18:19:48*firstjedi joined #nim
18:20:12*lastjedi quit (Ping timeout: 260 seconds)
18:34:00*gooseus joined #nim
18:41:22Yardanicoprobably the library you're using doesn't have osx dynlib name
18:42:25Yardanicodom96, is there any ETA when forum will update to the new version?
18:42:39dom96No
18:42:44*richboss joined #nim
18:42:54Yardanicoehh :(
18:43:25zolk3riso many platforms
18:45:13*nsf joined #nim
18:45:53*skrylar joined #nim
18:46:10dom96Yardanico: Deployed just for you
18:46:11skrylarzacharycarter: boop. have you done much with cube maps in your engine work
18:46:15*Yardanico_ joined #nim
18:46:15*Yardanico quit (Read error: Connection reset by peer)
18:46:23skrylardom96, you deployed so hard he died.
18:48:02dom96there should really be a loading spinner for this Run button but I guess you can't have everything
18:52:05*Viktor_ joined #nim
18:54:45Yardanico_and cursor doesn't change when you hover over a Run button :P
18:54:55skrylarbeachballs are fun though
18:55:01Yardanico_it should usually change to the normal cursor
18:57:15*Yardanico_ quit (Quit: Quit)
18:57:32*Yardanico joined #nim
18:57:52skrylari prefer the option where you tell the system the app is busy and it gives a beachball or fades the window out
18:58:04skrylarbut almost nobody does that. i think one or two graphics programs do the fade out with progress bar bit
18:58:06*smt joined #nim
18:59:11*gooseus quit (Ping timeout: 248 seconds)
19:06:20richbossHi there! I'm new here, just having discovered Nim a few days ago.
19:06:35GitDisc<GooRoo> Hi
19:07:05GitDisc<GooRoo> and welcome
19:07:12miranwelcome richboss
19:07:36Yardanicorichboss, hi
19:08:13richbossNow looking for a simple way to get a list of running processes on Windows 10.
19:08:29richbossThanks for the welcome ;-)
19:08:44Yardanicoyou would probably have to use winapi for that
19:09:24Yardanicothere's no library available for that sadly :(
19:09:27richbossWas looking into psutils, but that doesn't work on Windows right now
19:09:51Yardanicoit would be something like there https://stackoverflow.com/questions/3477097/get-full-running-process-list-visual-c
19:10:29Yardanicohttps://github.com/nim-lang/oldwinapi allows you to access whole win api
19:10:36Yardanicoe.g. "nimble install oldwinapi"
19:12:42shodan45I'm trying hard to like Kotlin... its syntax is ok, I guess, but its java "heritage" just makes me want to strangle somebody
19:13:07Yardanicoshodan45, it has a native version, which is in development
19:13:20Yardanicohttps://github.com/JetBrains/kotlin-native
19:13:29shodan45Yardanico: yeah, I compiled it a while back
19:13:42richbossThanks, Yardanico, will check it out
19:13:47Viktor_I forked the Nim repo. Can someone - maybe in priv - help me out with how to run a specific test file (tstrutil.nim)
19:14:04YardanicoViktor_, firstly compile tests/testament/tester
19:14:15shodan45but wow does java overcomplicate/over-engineer everythign
19:14:23Yardaniconim c -d:release tests/testament/tester
19:14:27Yardaniconim c -d:release tests/testament/tester
19:14:28Yardanicosorry
19:14:31Yardanicoafter that
19:15:31Yardanicorichboss, it's just a plain wrapper over WinAPI
19:15:48Yardanicoso you'll have to deal with ptr stuff
19:16:10YardanicoViktor_, after that do ./tests/testament/tester tests/stdlib/tstrutil.nim
19:16:10Viktor_Yardanico, first step is done, tester is compiled.
19:16:17Yardanicosorry
19:16:23Yardanico./tests/testament/tester r tests/stdlib/tstrutil.nim
19:16:38Yardanico"r" means "run" - run single test file
19:17:27*Sentreen quit (Ping timeout: 240 seconds)
19:18:01*tj_yoco joined #nim
19:18:11Viktor_I got this:
19:18:12Viktor_➜ nim git:(devel) ./tests/testament/tester r tests/stdlib/tstrutil.nim Error: unhandled exception: No such file or directory [OSError]
19:18:32Yardanicohm
19:18:58Viktor_I tabbed to the file, so it does exist
19:19:01Yardanicoare you in "nim" dir?
19:19:04Yardanicoah, ok
19:19:05Viktor_yes
19:19:18YardanicoIDK really, it works for me :P
19:20:50Viktor_do I need to maybe compile Nim itself before?
19:20:55Viktor_I only forked it so far.
19:21:03Yardanicoah yes
19:21:07Yardanicoyou need to do it :P
19:21:20Yardanicobecause tester calls nim binary
19:21:26*TjYoco quit (Ping timeout: 258 seconds)
19:21:41Viktor_ok, I will read the readme how to and try again. Thank you Yardanico
19:21:59YardanicoViktor_, did you make some changes to strutils so now you're testing it?
19:22:34Yardanicokrux02: what are the best json packages in nimble that are more effective than stdlib one?
19:22:53Viktor_I will add some tests, and improve two procs
19:23:12*couven92 quit (Quit: Client disconnecting)
19:23:57dom96You can just run './koch tests r ...' btw
19:24:05dom96You should compile koch first though
19:24:51Yardanicowill this work without nim binary in current nim dir ? :)
19:25:10dom96should do
19:25:19*claudiuinberlin quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
19:25:39Yardanicodom96, that would be strange
19:27:05Viktor_koch seems to be running the test indeed.
19:27:31Viktor_PASS: tstrutil.nim
19:27:35Viktor_ok, thank you
19:28:08Yardanicomaybe it compiled nim binary by itself?
19:29:06Viktor_bin dir is empty, so probably not
19:29:30Yardanicowell then tests are useless if you changed something from nim stdlib :P
19:29:41Yardanicowell IDK
19:29:47Yardanicomaybe koch modifies nim path directory
19:30:11*Sentreen joined #nim
19:30:57*gooseus joined #nim
19:32:13*claudiuinberlin joined #nim
19:33:30Viktor_it does work. I broke the removeSuffix to see if the test responds, and indeed the existing test was failing
19:34:21*gooseus quit (Client Quit)
19:35:45*Vladar quit (Quit: Leaving)
19:41:47*PMunch quit (Quit: leaving)
19:51:59*gooseus joined #nim
19:53:26*ryanhowe_ joined #nim
19:53:42*couven92 joined #nim
20:03:02Viktor_My first PR added : https://github.com/nim-lang/Nim/pull/6579
20:04:30YardanicoViktor_, nice!
20:04:48*onlyjedi joined #nim
20:06:27*gooseus quit (Ping timeout: 240 seconds)
20:07:18*lastjedi joined #nim
20:07:35miranViktor_: three more and you get a t-shirt :)
20:07:38*lastjedi quit (Max SendQ exceeded)
20:07:59*firstjedi quit (Ping timeout: 248 seconds)
20:08:10*lastjedi joined #nim
20:08:11Yardanicomiran, it's easy to make them to "fake" repos
20:08:27Viktor_thats nice :)
20:08:38mirani know, i've seen the list of the most popular repos at hacktober page
20:08:52*firstjedi joined #nim
20:09:06miranbut even 4 'real' PRs is easily done
20:10:28Yardanicomiran, well yeah
20:10:41*onlyjedi quit (Ping timeout: 248 seconds)
20:12:53*lastjedi quit (Ping timeout: 255 seconds)
20:14:23FromGitter<Bennyelg> :(
20:14:36FromGitter<Bennyelg> Ineed sha256 algorithem which works on osx
20:15:01dom96Implement one in pure Nim, can't be that hard, can it? :)
20:16:44YardanicoI found a pure-nim one
20:16:52Yardanicohttps://github.com/fmorgner/nim256
20:18:23*Arrrr quit (Read error: Connection reset by peer)
20:18:24FromGitter<Bennyelg> cheers!
20:19:26*lastjedi joined #nim
20:21:53*firstjedi quit (Ping timeout: 255 seconds)
20:24:38FromGitter<mratsim> I’m 10/4 PRs (all to my own repo): https://hacktoberfestchecker.herokuapp.com/?username=mratsim
20:25:24Yardanicomratsim: btw, you don't need that website for checking
20:25:26YardanicoIDK why it was created
20:25:32Yardanicohttps://hacktoberfest.digitalocean.com/stats/Yardanico
20:25:35*Sentreen quit (Ping timeout: 255 seconds)
20:25:37Yardanicohttps://hacktoberfest.digitalocean.com/stats/mratsim
20:26:00Yardanicomy contributions are for very different repos
20:26:10*zolk3ri quit (Ping timeout: 264 seconds)
20:26:51FromGitter<stisa> Yardanico, huh the official one doesn't work on edge, while the fanmade one does
20:27:04Yardanicoedge?!
20:27:10*Jesin quit (Quit: Leaving)
20:27:13YardanicoI don't use it, sorry :P
20:33:03*lastjedi quit (Ping timeout: 248 seconds)
20:34:06*lastjedi joined #nim
20:34:46miranmratsim - your own repo? that's cheating :P
20:38:31Yardanicomiran, it's not
20:38:41Yardanicobecause his PRs are all real :P
20:38:46miransee the smiley at the end ;)
20:38:46*Sentreen joined #nim
20:39:05Yardanicomiran, it's : and a P, hmmm
20:41:26FromGitter<ephja> what's your favorite production ready statically typed language? :p
20:41:48Yardaniconim can be considered production-ready
20:42:20Yardanicobecause there ARE products writtein in nim :P
20:44:24dom96Nim is production-ready
20:45:19Calinouhi :)
20:45:34Yardanicohi
20:45:43Calinoudom96: you might be interested in https://github.com/cart/godot3-bunnymark
20:45:45*gooseus joined #nim
20:45:47CalinouI've proposed adding a Nim benchmark :P
20:45:56CalinouI'll attempt to do it
20:46:07dom96of course, get it in there
20:48:13YardanicoCalinou, talk with https://github.com/endragor
20:48:20Yardanicohe's available from discord and email
20:48:29Yardanicohe's the author of the godot-nim package
20:48:36Yardanicoso he'll help you optimize your code :PO
20:48:37Yardanico:P
20:49:43CalinouYardanico: well, I'll just translate what has been written in other languages
20:49:46Calinou(probably)
20:49:56YardanicoCalinou, well he might still be interested in it
20:49:57*gooseus quit (Ping timeout: 240 seconds)
20:50:06Yardanicohe's available via IRC sometimes
20:50:46Calinouyeah, I talked to him last week (to get godot-nim working locally)
20:51:05Calinouthe benchmark I linked above does show C# being slower than you'd expect in some cases :(
20:51:19Calinouand the GC can be problematic, too (see the README, it talks about a slight stutter when a bunny is added)
20:51:27Calinou(that didn't happen with GDScript or C++)
20:52:11*Elronnd points, then curses at all form sof instant communication aside from irc
20:52:12*zolk3ri joined #nim
20:52:36Elronndargh sorry I was way back in the scrollback and didn't know it and ^^ was relevant there
20:52:46CalinouIRC represent
20:52:55Calinouwho needs editable messages?wq
20:53:33Elronnd:wq
20:56:27*miran quit (Ping timeout: 240 seconds)
20:58:50FromGitter<mratsim> Ooohh, run button on the forum? neat !
20:59:36Yardanico:q!
21:01:25FromGitter<mratsim> watched your whole video @subsetpark, nice stuff, GG :)
21:03:28SunDwarfC-x C-c
21:04:04*solitudesf quit (Remote host closed the connection)
21:05:19*claudiuinberlin quit (Quit: Textual IRC Client: www.textualapp.com)
21:07:38ehmrygod, glib is so ugly
21:07:43CalinouI just realized that "Nim" is one letter away from "Vim" :D
21:08:01SunDwarfi assume that one letter makes nim actually good then
21:10:04subsetparkthanks mratsim!
21:11:46*lastjedi quit (Quit: Leaving)
21:12:36FromGitter<mratsim> I’ve also wondered about the huge memory usage in kostya’s benchmarks. In my data science benchmarks, Nim always had a very low memory footprint
21:13:09Yardanicoso yeah, as krux02 said, nim parses entire JSON tree even if you don't need some fields
21:13:29Yardanicowe can add benchmarks using third-party nim packages to kostya benchmarks
21:14:21FromGitter<mratsim> Not just Json: matmul and Havlak as well
21:15:21FromGitter<mratsim> Oh, can we? just stdlib packages no? Otherwise I could add Arraymancer for matmul, we’ll probably be faster than everything ;)
21:15:21Yardaniconaive implementations aren't the best
21:15:27Yardanicomratsim: yes, we can
21:15:44Yardanicosee how C++ uses different packages for JSON
21:15:54YardanicoC++ Rapid SAX, C++ Rapid, C++ Gason
21:16:01Yardanicoor matmul:
21:16:08YardanicoD GDC, D LDC, D mir GLAS
21:16:18Yardanicomir is a third-party package too
21:16:57Yardanicoe.g. see here: https://github.com/kostya/benchmarks/blob/master/matmul/matmul_d_mir.d
21:17:51FromGitter<mratsim> Well mir is written in pure D, and is condidate for inclusion in D standard lib
21:18:07FromGitter<mratsim> GDC is D + GCC and LDC is D + LLVM
21:18:16Yardanicoyeah I know about LDC and GDC
21:18:27Yardanicoalso I'm afraid of this: https://www.reddit.com/r/programming/comments/54kg6v/numeric_age_for_d_mir_glas_is_faster_than/
21:18:32Yardanico"Numeric age for D: Mir GLAS is faster than OpenBLAS and Eigen"
21:18:50Yardanicobut still we'll be able to use third-party json packages for nim
21:18:50Yardanicofor sure
21:20:06Yardanicomratsim: why it's so fast ? :)
21:20:35Yardanicoit has the same speed as Intel MKL
21:20:37FromGitter<mratsim> My fallback matrix multiplication in pure Nim is probably faster to be honest
21:20:56Yardanicowell you can still optimize and use it
21:21:07Yardanicoe.g. add a comment # taken from arraymancer
21:21:08Yardanicomaybe
21:21:12YardanicoIDK if kostya would accept that
21:21:22FromGitter<mratsim> Basically, to reach high speed in matrix multiplication you need to ensure the data stays in cache as long as possible
21:21:55Yardanicojust make a 100 issues for nim-lang/nim about performance
21:21:58FromGitter<mratsim> If you check here: https://github.com/mratsim/Arraymancer/blob/master/src/tensor/fallback/blas_l3_gemm.nim#L41-L54
21:22:17Yardanicoso you would write a faster pure-nim arraymancer ! :P
21:22:36FromGitter<mratsim> I tried to put reasonable value so that data stays in cache. Mir GLAS can query LLVM to know register and cache sizes though :/
21:22:48FromGitter<mratsim> I will, I need it for javascript backend
21:23:00FromGitter<mratsim> I need to make OpenMP/MKL optional
21:23:02Yardanicomratsim: can you find it in theird SRC?
21:23:05Yardanico*their
21:23:09Yardanicojust want to see how they do that
21:24:19FromGitter<mratsim> There is that: https://github.com/libmir/mir-glas/blob/cf4a2b47203720932ba161955a8de9b1b415e484/source/glas/internal/gemm.d#L431-L433
21:24:29FromGitter<mratsim> and I remember seeing a huge feature request to LDC
21:24:55Yardanicowell make a nim feature request then ! :P
21:24:59Yardanicobut btw
21:25:07Yardanicodid you ever try to compile arraymancer using nlvm?
21:25:14Yardanicohttps://github.com/arnetheduck/nlvm
21:25:59FromGitter<mratsim> never tried
21:26:33Yardanicobut it has support only for linux for now
21:27:11Yardanicoit would be really good for nim I think
21:27:16FromGitter<mratsim> And there is that feature request to force LLVM to use FFMA: https://github.com/ldc-developers/ldc/issues/1438
21:27:19Yardanicosince it would push people into writing pure-nim software
21:27:32Yardanicobecause you can't importc headers if you compile to LLVM
21:27:49FromGitter<mratsim> which I’m somewhat doing by using “assume_aligned” intrinsics
21:29:22*tj_yoco quit (Quit: Leaving)
21:29:24FromGitter<mratsim> I’ll take a pause from cuda and try to get Arraymancer javascript backend running this week =)
21:29:49Yardanicoyou can try emscripten first
21:29:57Yardanicoso it can compile C code to JS
21:32:14FromGitter<mratsim> Well emscripten won’t solve the importc coming from andrea’s nimblas
21:32:34FromGitter<mratsim> unless emscripten can use C shared libraries?
21:34:00Yardanicoonly static libraries
21:34:08Yardanicostatic C libraries
21:34:11Yardanicoe.g. statically compiled SDL2
21:43:50*nsf quit (Quit: WeeChat 1.9)
21:52:13Yardanicoarnetheduck, are you around by any chance?
22:01:47*elrood quit (Quit: Leaving)
22:03:51*richboss quit (Quit: Page closed)
22:18:44*gooseus joined #nim
22:23:02*Trustable quit (Remote host closed the connection)
22:27:22*gooseus quit (Ping timeout: 264 seconds)
22:31:49*gooseus joined #nim
22:33:22*gokr quit (Ping timeout: 264 seconds)
22:39:44FromGitter<mratsim> Is the unittest module supposed to work with the JS backend? l get a lot of “foo was undefined"
22:41:28Yardanicoit worked for me last time I checked
22:41:32Yardanico(with nodejs)
22:42:30*Viktor_ quit (Ping timeout: 260 seconds)
22:44:10*ryanhowe_ quit (Quit: WeeChat 1.7)
22:47:22*gooseus quit (Ping timeout: 260 seconds)
22:47:50FromGitter<mratsim> I think iterators don’t work in JS
22:48:46Yardanicoare you sure?
22:48:52Yardanicothen how system.nim works in JS?
22:48:57Yardanico(system.nim has iterators)
22:49:58FromGitter<mratsim> mmm or my iterators don’t work in JS :P
22:51:24*gooseus joined #nim
22:55:26*ryanhowe joined #nim
22:57:16*fredrik92 joined #nim
22:58:27*gooseus quit (Ping timeout: 240 seconds)
22:58:47FromGitter<ephja> why might it not be possible to add a Nim compiler to qt creator?
22:59:45*couven92 quit (Ping timeout: 248 seconds)
23:00:23Yardanicowho said that?
23:00:25Yardanicoadd it please
23:00:33Yardanicoephja: ah
23:00:38Yardanicothere's already a qt creator plugin
23:00:50Yardanicohttps://codereview.qt-project.org/#/c/123629
23:01:12Yardanicoit's already in qt creator repo if you didn't see :)
23:03:15FromGitter<ephja> Yardanico: it's in the latest stable release, right? It's not in the language list in the compiler tab. There's a nim template section in the file creation dialog, but no templates available
23:03:30Yardanicobecause there's no support for qt stuff
23:04:03Yardanicoyou only get syntax highlighting/project creating/run&build/debugging/code styling(?)
23:04:04FromGitter<ephja> ok well the latter doesn't really matter
23:05:07FromGitter<ephja> no highlighting
23:05:13Yardanicowell IDK
23:05:15Yardaniconever used it
23:05:19Yardanicowhy would you want to use it anyway?
23:06:38FromGitter<ephja> I dunno. maybe the debugging support is nothing special. I should try some gdb or lldb extension for vs code
23:07:16Yardanicoyeah lldb works with vscode
23:21:38*Yardanico quit (Remote host closed the connection)
23:21:48*vlad1777d quit (Remote host closed the connection)
23:22:53*libman joined #nim
23:23:32*vlad1777d joined #nim
23:24:57*fredrik92 quit (Read error: Connection reset by peer)
23:25:06GitDisc<GooRoo> @ephja, are you sure that the plugin in QtCreator is turned on?
23:27:28GitDisc<GooRoo> and JFYI: a Nim support in Qt Creator is quite shitty. I would really suggest to use VS Code or something else
23:36:29FromGitter<ephja> GooRoo: yeah I'm using vs code again. found a gdb plugin that doesn't seem to support variable completion, so I will just use a frontend. found this btw https://github.com/cyrus-and/gdb-dashboard
23:42:40*ryanhowe quit (Quit: WeeChat 1.7)
23:46:24*zolk3ri quit (Remote host closed the connection)
23:58:25*JappleAck quit (Quit: Leaving)