<< 11-11-2017 >>

00:10:51*gokr quit (Ping timeout: 240 seconds)
00:12:05*SenasOzys quit (Ping timeout: 240 seconds)
00:15:31*TjYoco joined #nim
00:16:35*nsf quit (Quit: WeeChat 1.9.1)
00:24:24*elrood quit (Quit: Leaving)
00:25:29*Jesin quit (Quit: Leaving)
00:51:45*TjYoco quit (Quit: Leaving)
01:23:41*yglukhov quit (Remote host closed the connection)
01:46:43*kalkin-- joined #nim
01:50:22*kalkin--- quit (Ping timeout: 260 seconds)
02:14:34*arnetheduck joined #nim
02:18:01*skrylar joined #nim
02:18:43skrylarmaybe i'll have to do a postgres wrapper later :b
02:19:11skrylari recently learned postgres is apparently the most awesome thing that is constantly misconfigured
02:39:31*chemist69 quit (Ping timeout: 240 seconds)
02:52:18*vivus quit (Quit: Leaving)
02:53:36*chemist69 joined #nim
03:29:11*yglukhov joined #nim
03:30:39*sz0 joined #nim
03:31:42FromGitter<Varriount> skrylar: How is it misconfigured?
03:34:56FromGitter<Varriount> @mratsim You encounter some very interesting problems, developing Arraymancer. :D
03:37:35*yglukhov quit (Ping timeout: 240 seconds)
03:39:53skrylarVarriount: well i remember reading that people using red hat would evaluate postgres, then settle on mysql, because RHEL had it in low memory mode
03:40:08skrylarIt turns out when you give postgres more than 8mb RAM, its performance is just fine
03:40:50FromGitter<Varriount> skylar: We use postgres. It's pretty nice.
03:40:54skrylarWas also reading some hackernews lately, where a guy was saying he needed ex. elastic search/sphinx because postgres was too slow
03:41:04skrylarit turned out he was using expression matching instead of the full text index
03:41:10FromGitter<Varriount> Oh eew
03:41:18FromGitter<Varriount> you mean LIKE expressions?
03:41:24skrylarwhich was followed by chortling about "yea we actually use postgres instead of elastic, its faster for all but the largest cases"
03:41:31skrylaryes, he was using LIKE
03:41:35skrylarinstead of MATCH AGAINST
03:41:50skrylarFirebird however doesn't have a full text index
03:42:25*Snircle quit (Quit: Textual IRC Client: www.textualapp.com)
03:42:26skrylarIt seems to mostly exist as a means for old interbase tech to avoid upgrading,
03:43:06skrylarfrom what i can tell, if you want more than sqlite then firebird seems neat. as in it would have been a better choice for ex. firefox/chrome than sqlite, because sqlite indices are anemic
03:44:04skrylarstill. it seems to have a place, and delphi users might be more likely to switch to nim than ex. C
03:44:11skrylarfirebird is popular with the delphi's
03:46:25FromGitter<Varriount> Forgive my ignorance, but what makes firebird different than Postgres?
03:46:41skrylari've been trying to figure that out
03:47:04skrylaras far as i can tell, a big case for firebird would be embedding
03:47:31skrylarpostgres isn't really built for that
03:48:48skrylarfirebird also still targets potatos and toasters, so its good for people dealing with old old machine sites
03:49:44skrylarthat being said, this joke site approves of postgres: http://howfuckedismydatabase.com/postgres/noslony.php
03:50:28skrylarwondering if i should bother installing hydras in emacs
03:50:42FromGitter<Varriount> Hydras?
03:50:51skrylarits supposed to let you make these keystroke chains
03:51:04skrylarhttps://github.com/abo-abo/hydra
03:51:52skrylarit looks neat. although evil-mode lets you make custom states, which are basically the same thing
03:58:18skrylarits not as fast as c2nim, but it seems making macros to translate c calls to nim defs is reliable
04:02:37FromGitter<Varriount> skrylar: I've used this before http://www.muppetlabs.com/~breadbox/software/cppp.html
04:02:50FromGitter<Varriount> It's been a big help with the Windows headers
04:03:02skrylarneat.
04:03:06FromGitter<Varriount> Specifically, by following this process:
04:03:24FromGitter<Varriount> Run a find/replace command to comment out all macros you want to keep
04:03:25skrylaryeah, yak shaving is a big reason why i didn't target a more popular UI kit
04:03:49FromGitter<Varriount> run partial C preprocessor and/or the C compiler preprocessor
04:03:54FromGitter<Varriount> uncomment macros
04:03:57FromGitter<Varriount> run c2nim
04:04:04skrylarwell, we do have a partial wx implementation. does anyone actually use that?
04:04:29FromGitter<Varriount> Well, I've never been able to get it to correctly compile the Wxwidgets source code.
04:04:34skrylarballs.
04:04:38FromGitter<Varriount> It needs some of the C files, or something.
04:04:51FromGitter<Varriount> Though, I didn't try very hard
04:05:04skrylarI confirmed at least getting command buttons and a window worked in nfltk.
04:05:20skrylarevents are just through normal foo(userdata) callbacks so that should be fine
04:05:39*drs joined #nim
04:05:44FromGitter<Varriount> I don't even want to think what GUI programming using the native windows API would be like.
04:05:52skrylarIt's obnoxious
04:05:59skrylarI've done a little bit, and i hated it
04:06:28skrylarMy least favorite thing about Godot is the C++ parts. The whole rest of the engine is great
04:06:55skrylaranyway
04:07:14FromGitter<Varriount> The only GUI framework I've used was Qt with PyQt
04:07:22skrylarHaven't quite decided on when to call nfltk done and stick the fork in it. It could maybe do with some documentation and light testing
04:07:41skrylarI threw my hands up with GTK when I couldn't get a box layout to remove and insert objects
04:07:44FromGitter<Varriount> I sorta liked the GUI editor, but wiring up everything was a pain.
04:08:08skrylarqt is okay.
04:08:14FromGitter<Varriount> skrylar: Maybe the Javascript guys have the best idea - declarative models
04:08:17skrylarthey spend a lot of effort working *against* C++
04:08:41skrylarwell Cocoa just loads uis from nib files. fairly easy to deal with
04:09:07skrylarGlade and Vala are similar, you just toss event wires in glade and match them in vala with [GtkCallback] and such
04:09:17FromGitter<Varriount> I'd like to try Cocoa some time.
04:09:27skrylarIt was pleasant
04:09:28FromGitter<Varriount> Any idea how we would get Nim to interface with it?
04:09:35skrylarnim has an objective c import
04:09:44drspure Win32 is not bad. it's just not portable.
04:09:59skrylarisn't Delphi intended to have been a turbopascal version of the windows apis
04:10:11skrylarit's not bad *with an object model* but the boilerplating for C is horrid
04:11:21skrylarwould like to have the generic miglayout engine working in nim. you can make basically any weird thing customers ask for in that, pretty easy
04:11:48skrylarjust a slightly enhanced grid view
04:15:23skrylaram considering doing a bit of python work though. there's some stuff i need to do, that i don't think nim has libs for yet
04:15:29skrylarnamely scraping web pages
04:16:54FromGitter<Varriount> skylar: Do you need web crawling?
04:17:47skrylarVarriount: no
04:19:43skrylarI had a pipeline that used scapy to read news wires to get URLs to articles, handed those to a rethinkdb, where other scripts would pull orders from the document store, do something (ex. clean out the ads, return just the text content, return to the store.) and then would go down the line to auto-summarize using pythons nltk
04:20:08skrylarso once an hour it read public news wires and put 2-3 sentence summaries in a private mattermost
04:21:46skrylarits a.. brutally efficient way to deal with news. lol
04:21:51drsi once wrote a scraper in C (using libcurl and gumbo html5 parser). fun but painful
04:22:03skrylarmight have to look in to gumbo
04:22:29drsi liked gumbo because it represents the whole thing as a trer
04:22:35drstree
04:22:39FromGitter<Varriount> Bah, why can't Cloudformation be sensible and have variables.
04:22:50skrylaraside from personal use.. that kind of pipeline does make for an interesting case study on "is nim ready yet"
04:23:25FromGitter<Varriount> skrylar: The problem with getting a programming language ready is that you need people to help make it ready.
04:23:38skrylarvarriount: isn't that what i'm doing
04:23:49FromGitter<Varriount> Yeah.
04:24:02FromGitter<Varriount> I guess I was just stating the obvious.
04:24:10*jhorwitz joined #nim
04:24:14jhorwitzEvening all
04:24:18skrylarevening
04:24:19FromGitter<Varriount> Hello
04:24:42skrylarVarriount: well, AFAIK researchers seem to pick languages based around if they have a lib that does a thing they want
04:25:01skrylarit seems to be considered OK to just chain twelve scripts in to a gearman queue to avoid writing code
04:25:19jhorwitzI was curious if anyone was working on any GraphQL implementations in Nim
04:25:30skrylarhaven't heard of it
04:26:11FromGitter<Varriount> https://github.com/samdmarshall/GraphQL.nim
04:26:32skrylarneat
04:27:24FromGitter<Varriount> Though, it doesn't look complete.
04:27:37FromGitter<Varriount> The main module imports a bunch of children modules, but doesn't export anything.
04:27:48FromGitter<Varriount> And it's a wrapper around a C library
04:28:55FromGitter<Varriount> Looks like someone just ran C2Nim through a bunch of header files.
04:29:07*Jesin joined #nim
04:29:44FromGitter<Varriount> jhorwitz: So the answer seems to be, Nim has 1/2 of a library
04:29:57FromGitter<Varriount> The one I found appears to be an incomplete wrapper.
04:30:10*drs left #nim (#nim)
04:30:15skrylarpedantically, is the guy still working on it? ey asked if it was being worked on, not how many there were
04:30:36FromGitter<Varriount> Well, May 26th was the last commit date.
04:30:41skrylarhm
04:31:00FromGitter<Varriount> It's within the realm of possibility that he/she may publish a huge, multi-tiered update tomorrow. :P
04:31:32jhorwitzOnce I get more familiar with Nim I might start perhaps working on it
04:31:37*skrylar runs multiple regression on Varriount
04:32:13FromGitter<Varriount> skrylar: Don't make me run the fourier transform - https://xkcd.com/26/
04:32:30*smt joined #nim
04:32:58FromGitter<data-man> For html parsing for C there is something better. ⏎ https://github.com/lexborisov/myhtmlhttps://github.com/lexborisov/Modest
04:33:32FromGitter<Varriount> skrylar, jhorwitz: Do you have any opinions on https://forum.nim-lang.org/t/3320/1#20936 ?
04:34:55skrylari've never used those templates, so i have nothing to lose
04:35:09skrylarthe syntax read wrong though
04:35:11*smt` quit (Ping timeout: 240 seconds)
04:35:28skrylaroperator(pancakes, pancakes * 2) # wait, what is it doing to pancakes in the first argument?
04:36:09FromGitter<Varriount> I'd almost prefer some sort of dsl
04:36:14skrylari might rather see (the macro ast might be able to handle this) "for pancakes in {expression}"
04:37:46skrylari haven't tested to see if macros panic given that statement is incomplete, but untyped macro parameters allow a lot of incomplete things, and doathing(for x in x * 2) is more parsimonious in that you're used to for indicating variable names
04:38:40FromGitter<Varriount> jhorwitz: What do you think?
04:40:28jhorwitz I think a dsl could be a good idea
04:41:26jhorwitzAdmittedly, I just starting working through Nim In Action so I am not a Nim expert by any stretch of the imagination
04:41:32jhorwitzBut it definetly clicked with me
04:44:30*yglukhov joined #nim
04:47:43*dddddd quit (Remote host closed the connection)
04:48:52*yglukhov quit (Ping timeout: 260 seconds)
04:50:03skrylari should port over those instantly trained neural nets to nim
04:50:12skrylarits actually a really short script
04:50:58skrylarits basically a self organizing map, where each 'training example' is a new definition and it finds the closest example to a give input, and interpolates between those
04:52:05*jhorwitz quit (Ping timeout: 268 seconds)
04:53:31*vlad1777d quit (Remote host closed the connection)
04:54:28*vlad1777d joined #nim
04:58:41*vlad1777d quit (Ping timeout: 248 seconds)
05:06:55*soloxdead joined #nim
05:07:03*soloxdead left #nim (#nim)
05:14:18skrylarVarriount: did you ever see _why's shooooes lib
05:14:57skrylarhttp://shoesrb.com/ i think its a neat way to have handled declaring UIs
05:20:26FromGitter<mratsim> @skrylar, consider at one point to replace nltk with spaCy, nltk is super slow and single threaded with lots of stale part
05:22:38FromGitter<Varriount> @mratsim Mind linking that? I can' t seem to find it on Google.
05:22:47FromGitter<Varriount> I keep getting pictures of space
05:23:11skrylarspacy.io isn't it?
05:23:34skrylarmratsim: well, i only perform sentence extraction. i suspect it could be done with a few basic heuristics.
05:24:31skrylarThe summarization formula i stole from github was basically, break input to a frequency table, remove stopwords, break input to a sentence table, find first sentence with most 'important' word
05:25:13skrylarI modified it to include the next sentence in the line with the second most, and same for third, to add context. It's very effective at making news briefs.
05:26:25skrylarspacy is probably great if you want all the NLP tags and forms
05:32:16*yglukhov joined #nim
05:34:54skrylarAn interesting case: Asciidoc, requires keeping a backdated python, then installing a docbook toolchain, all to make paginated html. texinfo, you probably already have makeinfo and does it directly
05:35:13skrylaras an upside, asciidoc[tor]'s default theme is pretty
05:37:06*yglukhov quit (Ping timeout: 268 seconds)
05:39:41*sz0 quit (Quit: Connection closed for inactivity)
05:39:56*qih joined #nim
05:41:23qihAfternoon
05:42:19skrylarheyo.
05:42:34qihEy
05:42:45skrylarVarriount: a possibly interesting, though not really done thing, would be using firebird to store an undo cache
05:42:57qihI "found" Nim yesterday, am reading up on it, interesting
05:43:40skrylari know that people have found the idea of persistent undo to be 'neat', but it's almost never done, except maybe non-daw or the now dead Soundtrack Pro
05:43:42skrylarqih, welcome to nim
05:44:02*qih bows and says thanks
05:45:14qihI develop (cough cough) on STM32Fx MCUs using a version of Forth, I've been looking for a HLL to use as a Data Visualiation and systems language.
05:50:13FromGitter<Varriount> Forth?! Wow. Talk about a blast from the past
05:50:18FromGitter<mratsim> The data visualization tools are not there
05:50:24FromGitter<mratsim> Yet*
05:51:28qihHey thanks for the heads up, the first task is to centralise the data from the MCUs, then work out what prettyniess I *need*
05:51:46FromGitter<mratsim> Funny I was reading the "AsFastAsCee" page here yesterday which talked a lot about forth http://wiki.c2.com/?AsFastAsCee
05:52:08skrylarFactor was a neat forth
05:52:24skrylaralmost made a forth interpreter or two, got stuck understanding PARSE statements
05:53:00qihNeat. I just use it, not quite good enough to extend it yet
05:53:04skrylarmratsim: do you think we should bother importing quickdraw :)
05:53:51skrylarapparently the patents expired, so anyone can do things like quickdraws old regions
05:53:57FromGitter<mratsim> Oh fun I did not know quickdraw
05:54:21qihMecrisp-Stellaris Forth runs well on the STM32F0/3/4 etc, good tools and easy to extend words, anyway
05:54:21skrylari'm not sure if theres a real value in aping quickdraw over wrapping cairo, dunno
05:55:05qihHas anyone successfully run Nim on an low end MCUs yet? STM32Fx or RPi2/3?
05:55:34skrylarnim the compiler or nim programs
05:55:56skrylargcc runs on rpi2, and nim isn't nearly as complex
05:56:37FromGitter<mratsim> Way to go would be --gc:stack or --gc:none of GC:regions and cross-compilation, as long as there is a C compiler it should work (TM)
05:56:52qihSorry, programs ... neat
05:56:52FromGitter<mratsim> Or --gc:regions*
05:57:02qihmratsim: thanks
05:57:49FromGitter<mratsim> https://nim-lang.org/docs/nimc.html#nim-for-embedded-systems
05:59:14skrylaran rpi has 512mb memory by default, it is not that starved
05:59:36skrylarunless i'm misremembering. i thought they had 1gb split between gpu
06:00:00FromGitter<mratsim> I was reading about the STM32
06:00:07skrylarit may have been 512 in total but even 256 is a lot for a single program computer o.o
06:00:25FromGitter<mratsim> RPI is good enough to launch Kodi / Ubuntu so :p
06:00:44FromGitter<Varriount> qih: Though, without a GC, much of the standard library will be hard to use.
06:01:00FromGitter<Varriount> I'd try running with the GC before disabling.
06:01:15skrylarthe realtime gc is my choice
06:02:05skrylarGCs have never been "bad." It's just that most GC toolkits don't have deterministic collection
06:02:25skrylarSo you end up paying your gc costs in java/c# at the most random inopportune times, instead of during those 30 minutes of idle time
06:02:27qihVarriount: Thanks. One of the good things about the Forth, is thatit wil run on those STM32F0 mini-clones, which are low specced, good enough for temp sensing and transitting using RF, periodically
06:03:00skrylarforth is pretty good for that yes
06:03:15skrylarit helps when your language runtime is ~100 lines of assembly code
06:03:27qihYeah haha, indeed
06:03:58FromGitter<Varriount> qih: It's not that Nim won't run on those platforms. It's just that most of the standard library assumes that the GC is available.
06:04:11qihYes, I understand
06:04:42FromGitter<mratsim> How much ram does a STM32F0 have?
06:05:04skrylardoesn't that depend on the board
06:05:37qihDoes, but I use the STM32F0 & 3 DISCOVERY boards, the mini-ones are smaller
06:05:52FromGitter<mratsim> Never developed for embedded yet so I'm completely out of my depth.
06:05:53skrylari have only used teensys and arduinos
06:05:55qihThe MCU itself has 8Kb RAM
06:06:15FromGitter<Varriount> Ouch, that is tiny.
06:06:19skrylari think i have a pi2 and pi3, but they received little use when i found it hard to run my TV with it
06:06:20qihIs
06:07:13qihBut the Forth program for Temp sensing is about 180 Bytes I think, maybe a bit more, depends who writes it 8-)
06:07:39qihBut it'd be nice to use the same language on the devices and the central "system" so to speak
06:08:11qihI was using MicroPython boards but they are overkill for any environmental monitorin, both in specs and costs
06:08:26FromGitter<Varriount> What are you monitoring?
06:08:33skrylaryou'd probably want to write a minicompiler if you were doing that :\
06:08:39qihGreenhouse
06:08:44skrylarcan use the built in parseAst stuff
06:09:06qihProbably a bit beyond my ken, at this time but noted
06:09:38skrylarIn the case of Naughty Dog, they like using a high level (notably Lisp/Scheme) to define logic and they have their own scripts to convert the s-exps to native assembly
06:10:20qihMakes sense, I was looking at SBCL or Smalltalk but found Nim
06:11:27FromGitter<Varriount> Can smalltalk run on a system that small?
06:12:55qihVarriount: Not that I can see or have tried. The sensors would run a Forth or hopefully Nim and the collector (a RPi 2/3 or full desktop system) would run Smalltalk/SBCL etc
06:14:50FromGitter<Varriount> qih: I know people on the forum have reported running Nim on microcontrollers, so hopefully it's possible.
06:15:13qihAh haha => /home/qih/Git/Nim/bin <= Nimbin is the hippy drug capital of Australia 8-)
06:15:18FromGitter<mratsim> You probably want to read that https://hookrace.net/blog/nim-binary-size/
06:15:56qihVarriount: OK good news then, will find out
06:16:18qihmratsim: Ta
06:17:46qihmratsim: That is a very interesting article.
06:25:59skrylarthere is no inherent reason any language must take up a lot of space
06:26:10skrylarits just tradeoffs on speed vs memory vs human time
06:26:11*yglukhov joined #nim
06:26:53skrylarex. if you wanted to hand code a smalltalk parser in assembly, i'm sure it would be very small. there are maybe ten types of token, and the order of operations is fixed
06:28:12qihMy Forth using friend (Much better than I) uses ASM sometimes to make new functions or get code size down, so yeah doable
06:28:13skrylarForth is doing static dispatch though, where smalltalk tends to do it dynamically all the time. Forth absolutely could just retrieve a pointer to the word and run it every time, it would just be slow
06:28:47qihIs
06:29:09skrylari looked at forth as an interim for a compiler briefly once. i found some old weird papers on a guy optimizing forth stack operations and it looked simpler than what most compilers do
06:29:11*skrylar shrugs
06:29:51qihWell you either love or you hate it
06:30:31*yglukhov quit (Ping timeout: 240 seconds)
06:31:02skrylari would rather write st-80 than forth. but forth seems like an acceptable VM format
06:32:03qihIt seems to be, although Forth is my first "almost to metal" language so I'm not an expert at all
06:36:07skrylarblegh. eyes are glazing over
06:36:15skrylarGNU manuals are quite long
06:37:15qihYeah GNU Emacs manual is over 1000 pages, like wtf
06:37:43*Snircle joined #nim
06:38:54skrylarqih, i had someone tell me emacs wasn't documented last week
06:39:08skrylarthe face to palm collision could be heard for miles
06:41:24skrylarFive years ago I would have said nimdoc is fairly anemic compared to doxygen.
06:41:41skrylarToday I would probably say no, it's fine. there are proper tools for manuals and nimdoc is fine for reference sheets
06:42:15qihskrylar: Hahaha
06:43:10skrylarAsciidoc for instance has a TON of special edge cases
06:43:26skrylarTexinfo has ... only one syntax unit
06:43:32skrylarhmmh.
06:44:19qihAsciidoc looks cool, I have no need for it but still
06:44:55skrylarIts really pretty
06:45:26qihK
06:46:22skrylarup to the part now talking about function indexes and things
06:47:01skrylarwonder if there will ever be a "literate nim"
06:48:54qihI'm reading the free Chapter 1 from the book and working through https://nim-by-example.github.io
06:49:10qihskrylar: re literate, NFI
06:55:43*Snircle quit (Quit: Textual IRC Client: www.textualapp.com)
07:07:56*jhorwitz joined #nim
07:12:41*jhorwitz quit (Ping timeout: 268 seconds)
07:34:27*SenasOzys joined #nim
08:04:37*Arrrr joined #nim
08:04:44*Arrrr quit (Changing host)
08:04:44*Arrrr joined #nim
08:06:41*yglukhov joined #nim
08:11:16*yglukhov quit (Ping timeout: 268 seconds)
08:26:14*smt` joined #nim
08:29:27*smt quit (Ping timeout: 250 seconds)
08:30:13*jjido joined #nim
08:42:02*jhorwitz joined #nim
08:46:21*jhorwitz quit (Ping timeout: 240 seconds)
08:55:39*nsf joined #nim
09:03:30*qih quit (Quit: leaving)
09:09:55*miran joined #nim
09:13:57*yglukhov joined #nim
09:17:15*jjido quit (Ping timeout: 268 seconds)
09:18:18*jjido joined #nim
09:36:02*jhorwitz joined #nim
09:40:17*jhorwitz quit (Ping timeout: 248 seconds)
09:41:34*Hello_there joined #nim
09:42:22*Vladar joined #nim
09:42:55Hello_thereis the error beneath the password box in nim forums expected?
09:42:59Hello_therehttps://imgur.com/a/1ssH1
09:51:18*claudiuinberlin joined #nim
09:52:34*Hello_there quit (Ping timeout: 260 seconds)
10:00:34skrylarhmm. i wonder if vim can be convinced to accept nim styles for help tags.
10:01:18skrylarI remember a crafty man learned he could make his own helptags files, so he could just point at ex. a function name and hit "help" and instead of the vim manual it took him to his notes on that thing
10:10:08*xkapastel quit (Quit: Connection closed for inactivity)
10:13:42*vlad1777d joined #nim
10:20:21*yglukhov quit (Read error: Connection reset by peer)
10:20:56*yglukhov joined #nim
10:23:18*ShalokShalom joined #nim
10:26:56*ShalokShalom_ quit (Ping timeout: 268 seconds)
10:30:10*jhorwitz joined #nim
10:34:21*jhorwitz quit (Ping timeout: 240 seconds)
10:44:41*enthus1ast- quit (Ping timeout: 240 seconds)
10:56:14*yglukhov quit (Remote host closed the connection)
10:56:46*yglukhov joined #nim
11:01:28*yglukhov quit (Ping timeout: 268 seconds)
11:04:01*nsf quit (Quit: WeeChat 1.9.1)
11:07:51*dddddd joined #nim
11:15:15miranwhat is BiggestInt and how to convert it to (regular) int?
11:22:54dom96.int
11:23:03dom96It's an alias to the biggest int type.
11:23:06dom96likely int64
11:23:16miranheh, just figured it out. tried parseInt and similar stuff before :)
11:23:21miranthanks!
11:24:13*jhorwitz joined #nim
11:27:55dom96https://nim-lang.org/docs/system.html#BiggestInt
11:28:06dom96You can search for this in theindex https://nim-lang.org/docs/theindex.html
11:28:33*jhorwitz quit (Ping timeout: 248 seconds)
11:30:32miranthanks dom96
11:30:47*jjido quit (Ping timeout: 260 seconds)
11:38:19*yglukhov joined #nim
11:39:14*elrood joined #nim
11:40:19*SenasOzys quit (Ping timeout: 268 seconds)
11:51:57*SenasOzys joined #nim
12:01:20*SenasOzys quit (Remote host closed the connection)
12:05:26*SenasOzys joined #nim
12:13:22*yglukhov quit (Remote host closed the connection)
12:14:51*miran quit (Ping timeout: 268 seconds)
12:15:36*yglukhov joined #nim
12:15:46*yglukhov quit (Remote host closed the connection)
12:15:58*yglukhov joined #nim
12:16:01*yglukhov quit (Remote host closed the connection)
12:16:17*yglukhov joined #nim
12:16:49*yglukhov quit (Remote host closed the connection)
12:17:04*yglukhov joined #nim
12:17:36*yglukhov quit (Remote host closed the connection)
12:17:52*yglukhov joined #nim
12:18:24*yglukhov quit (Remote host closed the connection)
12:18:26*jhorwitz joined #nim
12:18:42*yglukhov joined #nim
12:19:11*yglukhov quit (Remote host closed the connection)
12:19:29*yglukhov joined #nim
12:19:59*yglukhov quit (Remote host closed the connection)
12:20:17*yglukhov joined #nim
12:20:47*yglukhov quit (Remote host closed the connection)
12:21:02*yglukhov joined #nim
12:21:30dom96yglukhov: fix yo internets
12:21:34*yglukhov quit (Remote host closed the connection)
12:21:52*yglukhov joined #nim
12:22:22*yglukhov quit (Remote host closed the connection)
12:22:31*jhorwitz quit (Ping timeout: 240 seconds)
12:22:40*yglukhov joined #nim
12:23:09*yglukhov quit (Remote host closed the connection)
12:23:59*vlad1777d quit (Ping timeout: 248 seconds)
12:24:24*vlad1777d joined #nim
12:25:02*yglukhov joined #nim
12:25:03*yglukhov quit (Remote host closed the connection)
12:25:21*yglukhov joined #nim
12:25:51*yglukhov quit (Remote host closed the connection)
12:26:09*yglukhov joined #nim
12:26:38*yglukhov quit (Remote host closed the connection)
12:28:23FromGitter<data-man> @dom96: parseHex can't to parse "long" hex-string on x32 platforms. ⏎ I made PR to NimData https://github.com/bluenote10/NimData/blob/master/src/nimdata/schema_parser.nim#L42 ⏎ Maybe to add these generic procs (parseBin, parseOct, parseHex) to stdlib?
12:28:37*gokr joined #nim
12:32:02*yglukhov joined #nim
12:32:03*yglukhov quit (Remote host closed the connection)
12:32:29*yglukhov joined #nim
12:32:50dom96data-man: yeah, sounds like a bug (?)
12:33:00*yglukhov quit (Remote host closed the connection)
12:33:17*yglukhov joined #nim
12:33:50*yglukhov quit (Remote host closed the connection)
12:35:56*yglukhov joined #nim
12:36:00*yglukhov quit (Remote host closed the connection)
12:36:06FromGitter<data-man> !eval int.sizeof
12:36:08NimBotCompile failed: in.nim(1, 4) Error: expression 'sizeof(int)' is of type 'int' and has to be discarded
12:36:16*yglukhov joined #nim
12:36:31FromGitter<data-man> !eval echo int.sizeof
12:36:32NimBot8
12:36:47*yglukhov quit (Remote host closed the connection)
12:37:45FromGitter<data-man> @dom96: int.sizeof on x32-platforms == 4?
12:38:45dom96!eval echo defined(amd64)
12:38:47NimBottrue
12:40:14dom96IIRC yes
12:41:46*enthus1ast- joined #nim
12:42:43FromGitter<data-man> Or to add parseBiggestIntHex
12:44:20*vlad1777d quit (Ping timeout: 258 seconds)
12:44:42*vlad1777d joined #nim
12:45:32dom96I think it's okay for parseHex to return BiggestInt
12:45:54dom96although Araq might have a different opinion
12:46:03dom96I guess in the future BiggestInt might become a BigInt
12:50:09*gokr quit (Ping timeout: 248 seconds)
12:51:31*yglukhov joined #nim
12:51:35*yglukhov quit (Remote host closed the connection)
12:51:37FromGitter<data-man> Same story with parseOct & parseOctInt
12:51:52*yglukhov joined #nim
12:52:25*yglukhov quit (Remote host closed the connection)
13:05:36*yglukhov joined #nim
13:07:25*Arrrr quit (Read error: Connection reset by peer)
13:18:35*skrylar quit (Ping timeout: 240 seconds)
13:22:53*nsf joined #nim
13:40:43*skrylar joined #nim
13:42:53*Snircle joined #nim
13:52:01*enthus1ast- quit (Ping timeout: 240 seconds)
13:53:39*enthus1ast- joined #nim
13:55:22*vlad1777d quit (Ping timeout: 268 seconds)
13:59:04*smt joined #nim
14:02:31*smt` quit (Ping timeout: 240 seconds)
14:03:36*jhorwitz joined #nim
14:04:23*Arrrr joined #nim
14:04:44*Arrrr quit (Changing host)
14:04:44*Arrrr joined #nim
14:15:42*PMunch joined #nim
14:28:32*gokr joined #nim
14:37:41*yglukhov quit (Remote host closed the connection)
14:41:00*jhorwitz quit (Ping timeout: 268 seconds)
14:42:18*yglukhov joined #nim
14:46:02*yglukhov quit (Remote host closed the connection)
14:46:14*yglukhov joined #nim
14:46:17*yglukhov quit (Remote host closed the connection)
14:46:32*yglukhov joined #nim
14:47:05*yglukhov quit (Remote host closed the connection)
14:47:21*yglukhov joined #nim
14:47:52*yglukhov quit (Remote host closed the connection)
14:51:34*yglukhov joined #nim
14:51:36*yglukhov quit (Remote host closed the connection)
14:51:52*yglukhov joined #nim
14:52:24*yglukhov quit (Remote host closed the connection)
14:52:39*yglukhov joined #nim
14:53:32*yglukhov quit (Remote host closed the connection)
14:54:07*yglukhov joined #nim
14:54:37*yglukhov quit (Remote host closed the connection)
14:54:53*yglukhov joined #nim
14:55:25*yglukhov quit (Remote host closed the connection)
14:55:39*yglukhov joined #nim
14:56:12*yglukhov quit (Remote host closed the connection)
15:01:57*gokr quit (Ping timeout: 258 seconds)
15:20:44*miran joined #nim
15:22:28*vlad1777d joined #nim
15:39:12*miran quit (Ping timeout: 248 seconds)
15:39:12*miran_ joined #nim
15:44:32*gokr joined #nim
15:56:05*Jesin quit (Ping timeout: 240 seconds)
15:59:25*smt` joined #nim
16:03:01*smt quit (Ping timeout: 268 seconds)
16:03:41*JappleAck joined #nim
16:09:23*Jesin joined #nim
16:10:12*yglukhov joined #nim
16:21:52*dddddd quit (Ping timeout: 260 seconds)
16:24:26GitDisc<treeform> Hmm so I loaded some data from a file, I would like to set seq's internal pointer to it directly and then set seq's length? Is there a way to do that?
16:25:11GitDisc<treeform> without memcpy?
16:29:09GitDisc<treeform> I guess there is thins kind of stuff ```proc rawBuffer[T](s: seq[T]): ptr T =
16:29:10GitDisc<treeform> {.emit: "result = `s`->data;".}```
16:29:19GitDisc<treeform> but maybe that is too much
16:29:51*dddddd joined #nim
16:38:52*Trustable joined #nim
16:51:38GitDisc<treeform> Mmm, maybe I should take a step back. This is what I have now: https://gist.github.com/treeform/1536cf59d94be33a6764272401282d3e I am loading timezone bin files statically, then reading them out of program memory into program memory... How would I do this better?
16:53:41GitDisc<treeform> I want to just do some thing like
16:53:53*dddddd quit (Ping timeout: 248 seconds)
16:54:29GitDisc<treeform> var timeZones seq memory to point to staticRead("timeZones.bin")
16:55:10*dddddd joined #nim
16:55:15GitDisc<treeform> const timeZones = staticReadSeq[TimeZone]("timeZones.bin") ??? maybe
16:58:46*yglukhov quit (Remote host closed the connection)
17:04:44*xkapastel joined #nim
17:07:55FromGitter<data-man> @treeform: Convert bin file to array of uint8 and to add include "timezones.nim"?
17:15:47*dddddd quit (Ping timeout: 268 seconds)
17:17:52*dddddd joined #nim
17:25:06FromGitter<data-man> That is, do not use staticRead and to use prepared array[timeZoneCount, TimeZone].
17:25:53*vlad1777d quit (Ping timeout: 248 seconds)
17:26:18*Guest42015 quit (Remote host closed the connection)
17:30:07*ftsf quit (Ping timeout: 260 seconds)
17:38:56GitDisc<crem> I again forgot everything. To create a toy nim project to play with, doing `nimble init` in empty directory and then `nimble build` to build it is a reasonable way to do that, right?
17:44:01*gokr quit (Ping timeout: 248 seconds)
17:44:50cremnimble can be used for packages that produce binaries rather than libraries, no?
17:45:00dom96yes
17:46:11dom96https://github.com/nim-lang/nimble#binary-packages
17:46:12cremfound it, indeed. Thanks.
17:47:20cremIs there a way to make it output binary to some subdirectory rather than the package root dir?
17:47:43dom96binDir
17:47:43dom96https://github.com/nim-lang/nimble#optional
17:48:05cremThanks!
17:52:33*miran_ quit (Ping timeout: 248 seconds)
18:01:08*nsf quit (Quit: WeeChat 1.9.1)
18:05:37cremthere's no analog of "go run" in nimble, is there?
18:15:40*PMunch quit (Quit: leaving)
18:17:33*smt joined #nim
18:21:21*smt` quit (Ping timeout: 248 seconds)
18:25:59FromGitter<Varriount> crem: `nim c -r` ?
18:26:20FromGitter<Varriount> Oh, you said nimble
18:33:31*yglukhov joined #nim
18:34:13dom96nimble c -r
18:34:26cremIn nimble, there's no way to add dependency from a command line, is there? I have to edit the .nimble file, right?
18:34:48*skrylar quit (Remote host closed the connection)
18:35:13cremdom96: thanks, it works. Although it seems that it only compiles a single file.
18:35:15dom96yep
18:37:09cremHow can I find the current package version (version of sdl2, in my case), so that I can add it into dependencies into .nimble file.
18:37:33GitDisc<treeform> data-man: I have tried using includes, but it makes compile times really slow. That was my first idea.
18:38:01GitDisc<treeform> I found the staticRead to be quite fast
18:38:09GitDisc<treeform> So I want to use that instead.
18:38:13dom96crem: nimble list -i
18:38:35cremThanks. Sorry for basic questions.
18:39:00dom96Be sure to give a range though, like `sdl >= 0.1.0`
18:39:20dom96we will get lock files eventually which will solidify the version
18:40:29cremI did sdl2 >= 1.1 (where 1.1 is the current version). I don't even know what other syntax is allowed, the only line in .nimble file was nim >= 0.17.2 so I guessed >= would work :)
18:41:16dom96everything is documented :) https://github.com/nim-lang/nimble#dependencies
18:41:47cremNo time to read docs, want to see black ugly SDL window asap. :)
18:47:52cremSo I did 'import sdl2' and suddenly there is 'init()' in file's scope. That feels like a polluted namespace. :-\ There's no way to make it possible only to write sdl2.init() but not init(), is there?
18:52:29dom96from sdl2 import nil
18:55:12cremThanks!
18:55:23cremHm, so I need sdl2_nim not sdl2 it seems...
18:55:53dom96Note though that Nim isn't Python
18:56:00dom96You are meant to import everything into your namespace
18:57:28*vivus joined #nim
18:57:31cremYeah, I remember that, it just feels wrong. But I guess I cannot complain before I actually have a problem because of that.
19:03:13cremHm, for some reason it cannot init graphics. No black window today then.
19:04:12cremUh, actually there's some other problem, games cannot start either.
19:05:26dom96try running some example code
19:06:39cremNo, even "import sdl2; init(INIT_VIDEO)" doesn't work, nor any SDL game. Seems like today's arch linux upgrade broke something.
19:07:51cremReboot helped.
19:16:20cremHow can I exit a program? exitnow(0)?
19:16:57cremunusual name for that..
19:18:30cremHm. "use getError() instead, GetError() is deprecated". I thought nim was case-agnostic!
19:26:54cremecho "SDL could not initialize! SDL_Error: %s\n" % [$(getError())] <- Does not replace %s. What am I doing wrong? :-\
19:29:22*SenasOzys quit (Remote host closed the connection)
19:29:24*vlad1777d joined #nim
19:32:29dom96exitnow?
19:32:32dom96where did you get that?
19:33:07dom96Use $1 instead of %s
19:34:00*Sentreen quit (Ping timeout: 246 seconds)
19:35:54cremI found that on https://nim-lang.org/docs/lib.html !
19:36:13cremThe most reasonable I could find related to exiting.
19:42:09*SenasOzys joined #nim
19:45:17dom96it's quit()
19:46:00dom96You shouldn't need to use anything in posix
19:46:41federico3why are getEnv/existsEnv/... in ospaths instead of os?
19:47:14*Sentreen joined #nim
19:48:17*jjido joined #nim
19:50:11dom96no idea
19:52:59Arrrrmaybe because os cannot be imported by nimscript
19:59:05cremSo, there is sdl2.quit() and system.quit(). When I do "import sdl2; quit()", which of those is called?
20:02:04dom96Have you tried compiling that?
20:02:18cremYes, it compiles.
20:02:30*miran_ joined #nim
20:02:40dom96what's the definition of sdl2.quit?
20:02:52cremAh, it only compiles when I pass a parameter!
20:03:04cremotherwise it's ambigous
20:03:11cremgood
20:12:26*Arrrr quit (Read error: Connection reset by peer)
20:28:29*Vladar quit (Quit: Leaving)
20:33:40*jjido quit (Read error: No route to host)
20:39:29*dddddd quit (Remote host closed the connection)
20:55:04*jjido joined #nim
20:58:59*Trustable quit (Remote host closed the connection)
20:59:54*Trustable joined #nim
21:08:16*gokr joined #nim
21:21:13*gokr quit (Ping timeout: 250 seconds)
21:23:40FromGitter<citycide> @Araq: we talked about a `cascade` macro a while back - I just put up a publish to nimble for it :)
21:24:19FromGitter<citycide> if anybody would care to review it, it's at https://github.com/citycide/cascade
21:25:49FromGitter<Varriount> @citycide Cool! @gokr might like this. He's a smalltalk fan
21:26:15FromGitter<citycide> @Varriount thanks 
21:26:40FromGitter<citycide> it's #MyFirstMacro
21:28:35*Jesin quit (Quit: Leaving)
21:28:51FromGitter<Varriount> @citycide I especially like the fact that "you can avoid declaring a var if you don't need to modify the target object after the fact, since it remains mutable within the cascade block."
21:29:26FromGitter<citycide> that was my primary use case also
21:30:08FromGitter<Varriount> How does it manage that? Does it generate a `var`, then a `let`?
21:30:31FromGitter<citycide> generates a temp var, you just can assign it to a `let`
21:31:25FromGitter<citycide> and each assignment and call expr is rewritten as a `DotExpr` on the object
21:31:41FromGitter<citycide> ( which is a `var` behind the scenes )
21:32:15FromGitter<Varriount> Hm. Wouldn't introducing a temporary variable cause a copy?
21:32:54FromGitter<citycide> it might - I'm still learning nim so I'm open to those kinds of lessons
21:33:20FromGitter<Varriount> I would try using a 'let' if the original assignment is a let, otherwise use a var
21:33:59FromGitter<Varriount> Or use a let instead of a var all the time.
21:34:19FromGitter<citycide> if you use `let` then assignments won't work
22:01:48dom96Did you know about this btw? https://nim-lang.org/docs/manual.html#overloading-resolution-automatic-self-insertions
22:03:23*miran_ quit (Quit: Konversation terminated!)
22:06:17*nsf joined #nim
22:09:35*smt quit (Ping timeout: 248 seconds)
22:10:39*smt joined #nim
22:14:00gangstacatniv, does websocket works with the current Nim version? websocket/client.nim(46, 23) Error: undeclared identifier: 'newContext'
22:20:33Araqgangstacat, compile with -d:ssl
22:21:02gangstacatthat works, thank you Araq
22:27:04FromGitter<citycide> @dom96: nope didn't know about that one. pretty cool but not very useful for arbitrary names, like if I'm creating a lot of GUI elements and such
22:28:50*smt` joined #nim
22:30:51*smt` quit (Read error: Connection reset by peer)
22:31:31*smt` joined #nim
22:31:50*smt` quit (Max SendQ exceeded)
22:32:01*smt quit (Ping timeout: 248 seconds)
22:32:23*smt` joined #nim
22:39:51*jjido quit (Read error: Connection reset by peer)
22:42:53*jjido joined #nim
22:43:41*Trustable quit (Remote host closed the connection)
22:44:21*smt joined #nim
22:44:59*smt quit (Max SendQ exceeded)
22:45:56*smt joined #nim
22:46:11*smt` quit (Ping timeout: 240 seconds)
22:49:55*NimBot joined #nim
22:51:03*jjido quit (Read error: Connection reset by peer)
22:57:13*jjido joined #nim
22:58:42*jjido quit (Read error: No route to host)
23:00:44*jjido joined #nim
23:01:35*jjido quit (Read error: Connection reset by peer)
23:01:50*jjido joined #nim
23:11:59*SunDwarf is now known as class
23:12:01*class is now known as SunDwarf
23:22:26*elrood quit (Quit: Leaving)
23:50:43*claudiuinberlin quit (Quit: Textual IRC Client: www.textualapp.com)
23:55:16*jhorwitz joined #nim