<< 06-09-2016 >>

00:01:14*fastrom quit (Ping timeout: 265 seconds)
00:15:49*krux02 quit (Remote host closed the connection)
00:17:23*krux02 joined #nim
00:19:22*krux02 quit (Client Quit)
00:30:05*PMunch quit (Quit: leaving)
00:31:22*chemist69 quit (Ping timeout: 255 seconds)
00:33:49*fredrik92 quit (Quit: Leaving.)
00:34:24*chemist69 joined #nim
00:36:01*ftsf_ joined #nim
00:45:25ftsf_hmm writing to SDL's audio buffer causes random crashes (seems like it's overwriting random bits of code) when --threads:on is not specified, adding it fixes it.
00:47:17ftsf_any idea why that would happen?
00:54:26mccIn order to run with SDL audio, I have to run with --threads:on --tlsEmulation:off and I also have to run setupForeignThreadGc() on the SDL audio thread once.
00:54:36ftsf_hmm interesting
00:54:52mccI don't remember why this is, I came in here with-- I think actually it was a crash, when I first started using SDL, and that was what they told me to do in here
00:55:16mccI assume that unless you turn on the threads stuff, Nim will not know to do the per-thread GCs properly
00:55:27ftsf_*nods* kinda makes sense
00:55:29mccand possibly something is happening like your main thread triggering a GC and it doing stuff to the audio thread's memory
01:00:09ftsf_yeah that would explain it
01:09:34*brson quit (Ping timeout: 252 seconds)
01:12:51*chemist69 quit (Ping timeout: 265 seconds)
01:25:53*chemist69 joined #nim
01:27:50*bjz joined #nim
01:38:15*bungoman quit (Read error: Connection reset by peer)
01:38:47*bungoman joined #nim
01:57:20*kulelu88 quit (Quit: Leaving)
02:12:37*onionhammer quit (Quit: WeeChat 1.0.1)
02:13:07*girvo joined #nim
02:15:56*girvo waves
02:15:58girvoHey everyone
02:16:11ftsf_hey girvo
02:20:35girvohows it going ftsf_
02:20:51ftsf_hmm very sleepy ~__~ accidentally was up till 4am writing a synth in nim
02:27:43*Snircle quit (Quit: Textual IRC Client: www.textualapp.com)
02:28:44*okami quit (Ping timeout: 265 seconds)
02:35:12*cryptotoad joined #nim
02:35:24cryptotoado/
02:35:51cryptotoadI was curious if there were any plans to add Union types to Nim?
02:36:01ftsf_cryptotoad, there's already unions {.union.}
02:36:06cryptotoadOh.
02:36:14ftsf_not the prettiest though
02:37:12cryptotoadWell I didn't find that but now I know, thanks :)
02:37:21cryptotoadgoogle still hates nim :(
02:37:45ftsf_=( yeah
02:38:46*brson joined #nim
02:41:49*okami joined #nim
02:58:11*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
03:13:53*dddddd quit (Ping timeout: 250 seconds)
03:14:17*chemist69 quit (Ping timeout: 264 seconds)
03:18:29*chemist69 joined #nim
03:57:52*Sentreen quit (Ping timeout: 240 seconds)
04:09:24*Sentreen joined #nim
04:14:16*brechtm quit (Read error: Connection reset by peer)
04:14:22*brechtm_ joined #nim
04:15:21*kjrose joined #nim
04:21:16*bjz joined #nim
04:22:21federico3ftsf_: best type of accidents. Was it an audio synth?
04:40:43ftsf_federico3, yeah =)
04:40:58ftsf_a couple of simple oscillators, filter, envelope, delay and distortion
04:40:58federico3can we have samples? :D
04:41:24ftsf_http://static.impbox.net/synth.mp4 a recording from last night
04:43:33federico3oh, and with a UI as well!
04:44:32ftsf_yeah =)
04:44:37ftsf_easier to test that way
04:45:57federico3very nice, two more VCOs, reverb, midi input and it would be usable for real music
04:46:03ftsf_reusing the graphics code from a game i'm making
04:46:21ftsf_yeah, i'm looking into adding JACK support for midi and better audio out
04:46:39ftsf_but c2nim doesn't wrap it cleanly, so needs a bit of manual work
04:47:45federico3it would be nice to be able to use it without a mouse; I found point and click ui to perform poorly on synths
04:48:13ftsf_mmm, i'd like to make a tracker style sequencer for it
04:48:35ftsf_controlling synth parameters in realtime without a mouse is a bit of pain though (unless you can map midi to it)
04:48:42federico3that's a lot of work
04:48:49ftsf_yep
04:49:18ftsf_but got all that done last night, so it's going pretty quick
04:49:24ftsf_working in nim is a breeze
04:49:42federico3to record the parameters in real time maybe a trackpad would be ideal
04:49:52federico3very nice work ftsf_
04:50:56ftsf_ideally i'd like a subtractive synth, FM synth and sampler and a sequencer for them to have a cute little music making studio
04:51:32federico3(yet I usually find drawing bezier or linear curves to be better than recording midi controllers)
04:51:45ftsf_oh currently it's only monophonic, so need to add support for multiple voices
04:52:11ftsf_yeah that should be doable, i already have bezier code in my utility kit
04:52:28federico3or just linear interpolation
04:55:22ftsf_i hate having to reboot into windows to make music, so figured i should just make something to suit my needs on linux
04:55:44ftsf_most of the linux audio software just doesn't seem to do what I want it to do
05:02:49federico3most of it does very little
05:13:08*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
05:20:11*Bilbo joined #nim
05:24:22*Demon_Fox quit (Remote host closed the connection)
05:26:02*gokr1 quit (Ping timeout: 265 seconds)
05:31:38*Bilbo quit (Ping timeout: 264 seconds)
05:31:50*brson quit (Ping timeout: 250 seconds)
06:13:44*mcc quit (Quit: Connection closed for inactivity)
06:23:24*yglukhov joined #nim
06:28:18ftsf_oh cool, https://github.com/Senketsu/nshout/ could use this to stream my synth's output directly to the internets :3
07:03:32*Trustable joined #nim
07:05:21*gokr joined #nim
07:12:45*miere joined #nim
07:12:58*nairobi joined #nim
07:13:48*Arrrr joined #nim
07:13:48*Arrrr quit (Changing host)
07:13:48*Arrrr joined #nim
07:13:59*gokr quit (Quit: Leaving.)
07:14:04*gokr1 joined #nim
07:20:13*brechtm_ quit (Remote host closed the connection)
07:20:25*girvo quit (Ping timeout: 255 seconds)
07:20:29*brechtm joined #nim
07:20:35ftsf_ahh can't compile for OSX because lack of threadlocal storage D:
07:20:41ftsf_anyone managed to find a way around that?
07:21:39ftsf_(can compile with --threads:off but that causes my app to crash due to the SDL audio issue)
07:23:04*Andris_zbx joined #nim
07:29:46ArrrrI thought the option was off by default
07:30:02*Polynomials joined #nim
07:30:14PolynomialsHow many architectures are supported by Nim compiler?
07:30:20ftsf_Arrrr, it is, but if it's off then SDL audio crashes because it seems to garbage collect stuff in the audio thread
07:30:40ftsf_Polynomials: C, C++, ObjectiveC, Javascript
07:31:11ArrrrMmm, i use sfml for audio without touching anything related to thread
07:31:14Arrrrs
07:31:34Polynomialsftst_, I meant the computer architectures (x86, PowerPC, ARM etc...)
07:31:35ftsf_SDL you have to set a callback which runs in another thread
07:31:57ftsf_Polynomials, i know, but whatever is supported by the C(or other) compiler or Javascript interpreter
07:32:11ftsf_nim doesn't compile to native code
07:32:22ftsf_(directly)
07:33:26ArrrrIt seems that sdml does the same, but it frees you from caring about that
07:34:04Arrrr*sfml
07:34:09ftsf_Arrrr, so it works fine with --threads:off ?
07:34:12PolynomialsBut why in the Nim GitHub page, it says these hardware architectures and OSes are currently supported.... so is that means that Nm compiler is system and architecture dependent?????
07:35:46ftsf_"The compiler currently supports the following platform and architecture combinations:" probably the architectures the compiler is tested on
07:35:52ftsf_if that's what you're referring to
07:36:03ArrrrRight, you don't have to turn on threads
07:36:20ftsf_you can compile for to a lot more than that (because C compilers can target a lot more than that)
07:36:32ftsf_Arrrr, interesting
07:36:35PolynomialsSo is that means that I can run it on MIPS, ARM, MicroBlaze and other uncommon ISA?
07:36:58ftsf_Polynomials, run what? the Nim compiler? or generate code to run on those architectures?
07:38:29ftsf_You can definitely compile code to run on ARM (tested Android code), haven't tried anything more obscure, but if you C compiler supports it then probably
07:42:35PolynomialsBut what if a Nim features might not be supported by a computer architecture?
07:43:08ftsf_then don't use that feature if you're targeting that architecture
07:50:01*bjz joined #nim
08:05:02*dddddd joined #nim
08:08:55*planhths joined #nim
08:16:05hohlerdeproc showNumber(num: int | float) = echo(num)
08:16:15hohlerdeis that a shortcut for generics?
08:16:53hohlerdeone could also write: proc showNumber[T: int | float](num: T) = echo(num)
08:17:20*girvo joined #nim
08:17:21hohlerdeoh, brackets are missing
08:17:22ftsf_hohlerde, yes i believe so
08:21:35*ftsf_ quit (Quit: :q!)
08:22:18*girvo quit (Ping timeout: 276 seconds)
08:28:53flyxhohlerde: yes
08:35:14*Polynomials quit (Ping timeout: 264 seconds)
08:35:16*ThisIsZenified joined #nim
08:39:31*nicanaca0 joined #nim
09:12:08ThisIsZenifiedwhy is nim significantly falling down while Crystal is conquering the world
09:12:54ThisIsZenifiedhttps://www.techempower.com/benchmarks/#section=data-r12
09:12:59ThisIsZenifiedI don't like this :(
09:13:14ThisIsZenifiedPython's performance is damn dead, C++ being the fastest
09:14:05ThisIsZenifiedI atleast did hope someone is alive here
09:15:30Araqyou don't like that? then do something about it.
09:15:38euantorI believe the upcoming async stuff is significantly better isn't it?
09:16:00euantorDoesn't cheatfate (or somebody?) have a test project that's significantly faster at serving HTTP?
09:16:01ThisIsZenifiedI don't know much about Nim codebase
09:16:11ThisIsZenifiedI only know about C++ and C and Python
09:16:13Arrrr"significantly falling down" citation needed
09:16:22ThisIsZenifiedalready given
09:16:29ArrrrI dont see anything
09:16:32ThisIsZenifiedArrrr: read context
09:16:53ThisIsZenifiedand all major Nim web frameworks are already dead as I see
09:16:53ThisIsZenifiedhttps://www.techempower.com/benchmarks/#section=data-r12
09:17:00ArrrrYes, you dropped a link, but i dont see nim there. Where it is?
09:17:17*GangstaCat joined #nim
09:17:25ThisIsZenifiedhttp://forum.nim-lang.org/t/1152
09:17:28*themagician joined #nim
09:17:35ThisIsZenifiedFor hw=EC2, Nim only appears for type=JSON, with Jester scoring 13.6% of the top C++ framework's performance being 100%. (Other observations from that data set: Crystal's at 55.4%, ahead of most Go results, but just below LuaJIT and even Ruby inside Nginx. Some functional language frameworks show promise here: Haskell/Wai tops out at 98.3%, Ur/Web at 96.1%, and Scala at 95.2%.)
09:17:52ThisIsZenifiedbut how did Go slow down and go down
09:18:11ThisIsZenifiedCrystal and Ruby (Ruby being dynamic and interpreted (!)) got ahead
09:18:46euantorThe big list at the top has two Crystal entries, both of which say "Did not complete" - am I looking at the wrong thing?
09:19:02cheatfateeuantor, upcoming is not significantly better, its better like 5-20%
09:19:04ThisIsZenifiedthat forum post talked about Round 11
09:19:22cheatfateeuantor, wanted is significantly better but it needs more improvements to become framework
09:19:26euantorAh, 5-20% is still an improvement cheatfate!
09:19:27ThisIsZenifiedfor now, I'll keep writing C++ webapps xD
09:19:30ThisIsZenifiedand waste a lot of time
09:20:15ThisIsZenifiedbut, C C++ and Java conquer the world
09:20:47ThisIsZenifiedbut go-prefork and fasthttp also conquer the world
09:20:54ThisIsZenifiedNim being such a awesome language, falls down
09:21:10Arrrrwhich c lib is there?
09:21:33Araqwe have very good C++ interop though
09:21:43Araqwrite a wrapper and "conquer the world"
09:22:26ThisIsZenifiedAraq: would that even speed Nim?
09:22:43ThisIsZenifiedbut PyPy is so fast
09:23:00ThisIsZenifiedFalcon CPython got ahead of Falcon PyPy
09:23:03ThisIsZenifiedthis is weird
09:23:23ThisIsZenifiedin Falcon's tests, PyPy was 10x faster than CPython
09:23:27ThisIsZenifiedthis is fishy
09:26:08ThisIsZenifiedwell, I'll await while Nim gets faster and faster
09:27:48ThisIsZenifiedand jester didn't even complete in R11
09:28:57ThisIsZenifiedthe benchmarker is a noob lol
09:28:57ThisIsZenifiedhttp://tfb-logs.techempower.com/round-11/peak/linux/2015-09-11-final/latest/logs/jester/out.txt
09:29:19ThisIsZenified>Setup jester: INFO Jester is making jokes at http://localhost:9001
09:29:27ThisIsZenified>Accessing URL http://10.0.3.2:8080/json
09:29:27ThisIsZenifiedResponse:
09:29:28ThisIsZenifiedlol
09:29:32ThisIsZenifiednot worth it
09:29:34euantorDo they provide source code for their tests?
09:29:49Arrrris rosencrantz included? https://github.com/andreaferretti/rosencrantz
09:30:00euantorALso, that's an old version of Nim, version 0.11.2
09:30:07euantorNew versions usually improve
09:30:17ThisIsZenifiedwat is rosencrantz
09:30:49ThisIsZenifiedwow that explicitness and documentation
09:30:56ThisIsZenifiedjester had about 10 lines of docs
09:32:03ThisIsZenifiedit's cryptic
09:35:53cheatfateArrrr, rozencratz dont give you any speed because it based on asynchttpserver.
09:36:46*kunev quit (Ping timeout: 255 seconds)
09:37:27ArrrrI suppose every nim lib for websites use the same tricks under the hood
09:37:29ThisIsZenifiednawak scored 24%
09:38:35*xet7_ joined #nim
09:38:38ThisIsZenifiedhttps://www.techempower.com/benchmarks/previews/round13/#section=data-r13&hw=azu&test=json&l=8ucni7
09:38:48*kunev joined #nim
09:38:54ThisIsZenifiedwell, go is ahead by nim by significant advantage, while in R11, it was behind nim
09:38:58ThisIsZenifiedthat improvement though
09:39:12ThisIsZenifiedwait
09:39:15cheatfateThisIsZenified, and we already know that Nim's web frameworks not very fast
09:39:17ThisIsZenifiednawak scored a lot
09:39:23ThisIsZenifiedhttps://www.techempower.com/benchmarks/previews/round13/#section=data-r13&hw=azu&test=query&l=8ucni7
09:39:31ThisIsZenifiednawak scored 98^
09:39:34ThisIsZenifiednawak scored 98%(
09:39:34ThisIsZenifiednawak scored 98%*
09:40:19ThisIsZenifiednawak is very fast
09:40:20ThisIsZenifiedit seems
09:41:00*planhths quit (Ping timeout: 244 seconds)
09:41:16*dddddd quit (Ping timeout: 264 seconds)
09:41:46*dddddd joined #nim
09:41:58ThisIsZenifiedrosencraftz is so cryptic that I can't even understand it
09:42:25ThisIsZenifiedare there ORMs for Nim?
09:42:44euantorNone that I know of
09:43:21euantorI was thinking about writing a query builder (not exactly an ORM, but could lead to one), just haven't got around to it
09:43:41ThisIsZenifiedI want insert builder lol
09:43:53ThisIsZenifiedit's easy to write SQL
09:43:54euantorThat's what the query builder would do
09:44:26euantorEasy to write SQL, but not always easy to translate it between DB engines (MySQL, Postgres, SQLite)
09:44:59euantorI was going to write it for my DB migration tool that I wrote for work rather than using raw SQL files
09:45:19euantorThe idea was that the migrations could be written in NimScript
09:46:05ThisIsZenifiedyeah
09:46:19ThisIsZenifiedWhen I write, I usually target a single DB
09:47:05euantorUnfortunately we don't always have that luxury at work
09:53:38ThisIsZenifieda DAL could be useful regardless
09:57:28*gokr1 quit (Ping timeout: 264 seconds)
10:01:31*nairobi quit (Remote host closed the connection)
10:10:50ThisIsZenifiedeverything is overkill, I'll use asynchttpserver by-hand
10:16:54*nairobi joined #nim
10:18:09*girvo joined #nim
10:22:29*girvo quit (Ping timeout: 244 seconds)
10:23:08*planhths joined #nim
10:23:37*cryptotoad quit (Quit: Page closed)
10:28:10*arnetheduck joined #nim
10:28:56Arrrrfrom "nim is dying" to "i'll use asynchttpserver". Given enough time, you will love jester
10:35:58*miere quit (Read error: Connection reset by peer)
10:37:49ThisIsZenifiedI never said nim is dying
10:37:52ThisIsZenifiedI absolutely love nim
10:38:03ThisIsZenifiedand possibly the asynchttpserver is not for me
10:38:20ThisIsZenifiedI'll use the famous C HTTP server and FFI :DDDD
10:40:06*coffeepot joined #nim
10:41:19ArrrrWhich one?
10:44:06ThisIsZenifiedlwan
10:44:12ThisIsZenifiedThe fastest C webserver
10:44:20ThisIsZenifiedif I really needed speed, I'd use asm
10:44:48ThisIsZenifiedwriting web servers isn't too hard if you want to be minimal
10:45:56Arrrrnim asm backend when?
10:46:05coffeepothey guys, got a question: var s = r"helloxAthere"; echo s converts xA into 0A character? Is this an artifact of echo?
10:46:39ThisIsZenifiedxA ?
10:46:47ThisIsZenifiedI see
10:46:52ThisIsZenifiedbut why would it do that
10:47:01coffeepotyeah the output is "hello" /r "there" :/
10:47:11coffeepoti dun want no returns
10:47:28ThisIsZenified"hello" /r "there"?
10:47:28ThisIsZenifiedwat
10:48:04coffeepotxA seems to translate to a return in a string, even if you prefix with r for rawstring
10:48:17coffeepot"xa" is fine though!
10:49:06ThisIsZenifiedoh
10:50:22coffeepotit might just be echo, if you: for c in s: echo c, " ", ord(c), you get all the chars as expected
10:50:41*pafmaf joined #nim
11:01:34*BratwurstMitSenf joined #nim
11:01:37*BratwurstMitSenf quit (Client Quit)
11:02:03*Snircle joined #nim
11:02:16*BratwurstMitSenf joined #nim
11:03:28*BratwurstMitSenf left #nim (#nim)
11:03:58*gokr joined #nim
11:06:49*brechtm_ joined #nim
11:10:15*brechtm quit (Ping timeout: 265 seconds)
11:20:58*nairobi quit (Remote host closed the connection)
11:21:13*nairobi joined #nim
11:24:15coffeepotanother question: With threads, what's the best way of relinquishing control for X milliseconds?
11:24:50coffeepotI usually use events, which seem to be equivilent to nim's Cond type?
11:25:17coffeepotthere's a wait(lock, cond) but no timeout parameter
11:26:01coffeepotcorrection: wait(cond, lock)
11:26:05*okami left #nim ("1.5")
11:26:20*okami joined #nim
11:26:49coffeepotor do i have to use sleep?
11:28:11ThisIsZenifiedthere's asyncio
11:28:17ThisIsZenifiedwait, I'm dead
11:28:42*Sentreen quit (Quit: WeeChat 1.4)
11:29:12*Sentreen joined #nim
11:29:24coffeepotyou can't be dead if you're typing, unless there's irc in the afterlife. Will check out asyncio
11:30:44*okami quit (Quit: okami)
11:30:58coffeepotah sleep works, it'll do lol
11:31:37coffeepotnext question: Is there a simple way of sending a ping?
11:31:49coffeepotI'm using jester if there's anything in that but couldn't see anything
11:33:35ThisIsZenifiedI'm getting annoyed and EVEN MORE ANNOYED while using FFI for lwan
11:34:26*brechtm_ quit (Remote host closed the connection)
11:34:39coffeepotIwan web server?
11:34:45euantor@coffeepot If you mean an ICMP echo request there's no way that I know of, and no libraries
11:34:57*miere joined #nim
11:35:02*brechtm joined #nim
11:35:09Arrrruse osprocs + ping
11:35:12ThisIsZenifiedyes
11:35:32Arrrryou can read the output of a command
11:35:36ThisIsZenifiedjester is retarded
11:35:43coffeepot@euantor: Yes, ICMP ping, and that makes me sad, but @Arrr you give me hope!
11:36:46coffeepot@ThisIsZenified I don't know a great deal about web servers, why is jester special needs?
11:36:51*aziz joined #nim
11:37:30coffeepotArrr, it's a shame we don't have anything 'native', feels kinda dirty running the ping command
11:39:25Arrrruse ffi for this c lib http://stackoverflow.com/a/17827849
11:40:01coffeepothey at least Iwan is in C, I tried to use bullet once and just had no idea how to use ffi with C++ as it uses some fancy stuff and I'm but a noob
11:40:41FromGitter<endragor> coffeepot: apps running under non-root privileges are not allowed to send ICMP packets afaik. default `ping` utility has setuid-bit set to run with elevated privileges.
11:41:02*miere quit (Read error: Connection reset by peer)
11:41:30coffeepot@FromGitter hey that's handy info. So maybe not so dirty!
11:41:31FromGittercoffeepot, I'm a bot, *bleep, bloop*. I relay messages between here and https://gitter.im/nim-lang/Nim
11:42:02Arrrr*bleep bloop* lol
11:42:16*miere joined #nim
11:42:20*miere quit (Read error: Connection reset by peer)
11:42:33coffeepotArrrr I think all bots are required to make that sound by law
11:43:00ThisIsZenifiedhow to access those structs that were exported
11:43:04ThisIsZenifiedfrom Nim
11:43:14ThisIsZenifiedI men lwan
11:43:46coffeepotstructs from nim to c?
11:43:54ThisIsZenifiedvice versa
11:44:13coffeepotif you've run c2nim on them it should do that for you, more or less
11:44:19ArrrrIf they are pointers, simply use ptr object
11:44:43ThisIsZenifiedpointers aren't the problem atm
11:45:20*Sentreen quit (Quit: WeeChat 1.4)
11:45:57*aziz quit (Quit: Ex-Chat)
11:46:17Arrrrhttps://github.com/BlaXpirit/nim-chipmunk/blob/master/src/chipmunk.nim#L60
11:46:20Arrrrhttps://chipmunk-physics.net/release/Chipmunk-5.x/Chipmunk-5.3.1-Docs/#cpVect
11:47:54*Sentreen joined #nim
11:50:57ThisIsZenifiedlet me see
11:51:01ThisIsZenifiedthere are problems with imports
11:51:02yglukhovto someone proficient with nims asyncio. are named pipes supported?
11:52:09ThisIsZenifiedso I have to predeclare the structs used by lwn?
11:53:41ArrrrYou can also do what coffeepot said, using that c2nim tool
11:54:00ThisIsZenifiedwell, let me see
11:54:39ThisIsZenifiedIt's going to be alot of work, but I have faith it'd work
11:56:07ThisIsZenifiedfor now, I'll malloc into some 4k pointers to blast my computer
11:58:16*Arrrr quit (Quit: WeeChat 1.5)
11:59:51cheatfateendragor: my archlinux ping dont have any setuid/setgid attributes
12:01:15*gokr1 joined #nim
12:01:33*gokr quit (Quit: Leaving.)
12:01:59FromGitter<endragor> cheatfate: on recent versions of Linux the file has CAP_NET_RAW capability that allows it to send ICMP packets
12:02:56ThisIsZenified'k, I'm using c2nim
12:02:58ThisIsZenifiedbut how do I use it
12:03:14ThisIsZenified./c2nim --header /usr/local/include/lwan/lwan.h
12:03:14ThisIsZenifiedusr/local/include/lwan/lwan.h(23, 11) Error: identifier expected, but found 'C'
12:05:28cheatfateendragor: have you see my latest PR?
12:07:18*jeffc joined #nim
12:07:18*jeffc_ quit (Read error: Connection reset by peer)
12:09:27ThisIsZenifiedOk, I just quit
12:09:42ThisIsZenifiedc2nim doesn't work lwan.h
12:12:47ThisIsZenifiedmay nimrod is good for my sidekickers
12:12:57ThisIsZenifiedmaybe*
12:13:06coffeepotsidekickers?
12:13:30ThisIsZenifiedyeah
12:14:08ThisIsZenifiedI have a hybrid webapp, which needs to run some schedule cleanups and schedule programs that process input from web
12:14:23ThisIsZenifiedand some other applications that run the actual applications, webapp is just the frontend
12:14:55ThisIsZenifiedI currently use Django and varnish
12:14:59ThisIsZenifiedit's pretty fast
12:16:57ThisIsZenifiedI think Nim is not yet featureful for me...
12:16:57ThisIsZenifiedgotta stick to Django -.-
12:18:54*girvo joined #nim
12:19:07coffeepotah, thats a shame. If you could get a c2nim of the Iwan header working it would probably be fairly easy to use in nim. Also wouldnt hurt to have that accessible for the nim community
12:20:15coffeepotbut i must say I can't help with that myself, only used the result of c2nim not actually generated a header with it
12:20:47FromGitter<endragor> cheatfate: looking at it. I think you need to borrow `==` for `AsyncEvent`. It broke my code that compares event variable with `nil`.
12:23:38*girvo quit (Ping timeout: 265 seconds)
12:25:30FromGitter<endragor> cheatfate: everything else if fine, my tests now pass with Nim’s `devel`. thank you.
12:25:43ThisIsZenifiedI see
12:25:45ThisIsZenifiedNimrod is good enough for my sidekickers and the actual application that I use
12:25:45ThisIsZenifiedand go is OK for the web side
12:25:45ThisIsZenifiedand JS for client-side
12:25:45ThisIsZenifiedI hope it goes well :D
12:26:27cheatfateendragor: i will add `borrow` in next PR with new tasynciossl.nim
12:26:33FromGitter<vegansk> @Araq, @dom96! PLEASE do something with this PR! https://github.com/nim-lang/Nim/pull/4683. Am I the one who needs jester to handle post requests without crashes?
12:27:12cheatfatevegansk: i dont think it will be accepted until new type (pointer, size) will be introduced
12:27:56FromGitter<vegansk> There are two more PRs and I already think that it will take a month for that. How can I use it in production?
12:28:23FromGitter<vegansk> @cheatfate, https://github.com/nim-lang/Nim/pull/4683#issuecomment-244756751
12:30:15cheatfatevegansk: some people just hate pair of (pointer, size)...
12:34:14FromGitter<vendethiel> it's pretty dangerous, so yes :)
12:35:09*nairobi quit (Ping timeout: 276 seconds)
12:37:18*nairobi joined #nim
12:46:07FromGitter<Araq> @vegansk I'm giving dom time until tonight and then I'll merge it, ok?
12:46:31FromGitter<Araq> and no, new type (pointer, size) is not required for this PR to be accepted
12:47:16*brechtm quit (Remote host closed the connection)
12:47:56FromGitter<vegansk> @Araq, thanks!\
12:48:39*brechtm joined #nim
12:51:59yglukhovcheatfate: are named pipes supported by ayncdispatch?
12:52:53cheatfateyglukhov, https://github.com/cheatfate/wanted/blob/master/asyncpipes.nim
12:54:55cheatfateyglukhov, and you even don't need to give them names :)
12:55:39yglukhovcheatfate: awesome! are you gonna push it to nim? and i want to give them names. otherwise how can i open the same pipe from different processes?
12:56:23cheatfateyglukhov, but unix dont have named pipes, how you want to port it to posix systems?
12:56:38yglukhovwith named sockets for example?
12:56:54cheatfateyglukhov, you mean unix domain sockets?
12:57:07yglukhovyep. or fifos
12:57:55cheatfateyglukhov, then i think i need to add it to asyncpipes i think and only then i will push it
12:58:45yglukhovcool. can't wait! ;)
12:59:26coffeepot+1 for asych pipes. I don't need it now, but can see it being very useful for servers
13:00:16coffeepotas in, server applications
13:01:43yglukhovsure, and not only servers. its a nice ipc abstraction in general, useful for lots of ipc things.
13:03:42coffeepotdefinitely. Just need a windows service wrapper and I think I have almost everything I need in Nim
13:03:47euantorYeah, I was looking for FIFO support in the past
13:14:52*gokr1 quit (Ping timeout: 264 seconds)
13:43:36*planhths quit (Quit: Konversation terminated!)
13:44:16coffeepotnew question! Running a thread, using databases (my own odbc lib). Long story short, compiler is saying I can't call a proc because "is not GC-safe as it performs an indirect call here [GcUnsafe2]". The offending part is calling a proc(msg: string). Why is that illegal for threaded gc?
13:44:48coffeepotwouldn't the proc(msg: string) that is stored there be called in the same thread context?
13:46:21Araqcoffeepot: make the type proc(msg: string) {.gcsafe.}
13:46:50coffeepotwheee thanks Araq :)
13:49:46*nairobi quit (Read error: Connection reset by peer)
13:52:08arnetheduckAraq, want a patch that drops endb? read somewhere it's dead..
13:55:02*libman joined #nim
14:04:51Araqarnetheduck: no, endb still has the best watchpoint feature
14:05:14Araqonly usable by me apparently, but *shrug*
14:08:49*arnetheduck quit (Ping timeout: 244 seconds)
14:14:08*bungoman quit (Read error: Connection reset by peer)
14:14:35*bungoman joined #nim
14:16:41*arnetheduck joined #nim
14:17:27*xet7_ quit (Ping timeout: 250 seconds)
14:17:29arnetheduckok, how's it different from the gdb one?
14:19:00Araqit computes hashes of the full datastructure being watched and pauses if the hash changes.
14:19:30*nairobi joined #nim
14:19:30*libman quit (Read error: Connection reset by peer)
14:19:37Araqgdb can only do it for memory addresses or stupid shit like that, it doesn't know what "full datastructure" means
14:19:48*girvo joined #nim
14:22:28coffeepotSorry guys, another question. I have set up a thread and am accessing a global which i thought was wrapped with a lock, but compiler says differently. Mocked up roughly what I'm doing here: https://gist.github.com/coffeepots/c2f18ee3639e98699d1520648f775a35
14:22:33coffeepotany ideas what I'm doing wrong?
14:24:03*girvo quit (Ping timeout: 240 seconds)
14:24:30cheatfategitterers do you have dom96 there?
14:28:21Araqcoffeepot: use a shared table
14:28:33coffeepot:-o
14:28:49*arnetheduck quit (Ping timeout: 265 seconds)
14:29:02coffeepotdont think they were about when i first wrote this, will investigate
14:31:36*Satyajit quit (Quit: https://fnordserver.eu)
14:32:31*arnetheduck joined #nim
14:33:12arnetheduckah. guess gdb can be taught that trick with a py script since it can watch expressions, though it'd be some work
14:33:21arnetheduckjust looking for opportunities to simplify compiler ;) easier to read one working solution than two partial ones ;) so what's broken with endb? does it use hardware watchpoints?
14:33:43arnetheduckoh, and one more q - looking at threads - how come mparallel/mspawn are transformed in c generator and not earlier, somewhere in sem?
14:35:31FromGitter<xxlabaza> In such cases I am using something like pgbouncer (it is from PostgreSQL world). It is man in the middle, like proxy. All my clients don’t connect to Postgres directly, but throught pgbouncer and this program handle connections pools for all users, it allows me to not implement thread pools in my Nim programs or scripts, in code it looks like I’m opening connection on all requests, but it not
14:36:04Araqthe idea was that it is trivial to eval 'parallel + spawn' at compiletime when we don't touch it until codegen
14:36:36Araqsince you can by definition just ignore parallel+spawn annotations and get the same semantics
14:36:59*libman joined #nim
14:42:54*krux02 joined #nim
14:44:20arnetheduckok. I'll just replicate that in nlvm then
14:49:15*arnetheduck quit (Quit: Leaving)
14:49:26*arnetheduck joined #nim
14:49:36*libman quit (Read error: Connection reset by peer)
14:54:53coffeepotAraq, where are the shared tables? Can't see them in tables.nim, thought it might be a pragma but no luck there either
14:56:11*onionhammer joined #nim
14:56:56*arnetheduck quit (Ping timeout: 265 seconds)
14:58:32*themagician quit (Ping timeout: 240 seconds)
15:00:54*pregressive joined #nim
15:01:05cheatfatedo we have SSL guru here?
15:02:25Araqimport sharedtables
15:02:38*arnetheduck joined #nim
15:03:17*arnetheduck quit (Client Quit)
15:03:30*arnetheduck joined #nim
15:04:10*pregressive quit (Remote host closed the connection)
15:04:10coffeepotaraq cheers again :)
15:07:00*pregressive joined #nim
15:08:07*libman joined #nim
15:10:52*mtj_ quit (Ping timeout: 265 seconds)
15:10:54*planhths joined #nim
15:19:14*libman left #nim (#nim)
15:21:19*pregressive quit (Read error: Connection reset by peer)
15:21:22*pregress_ joined #nim
15:26:14*Satyajit joined #nim
15:28:42*arnetheduck quit (Ping timeout: 276 seconds)
15:32:03*M-Quora quit (Read error: Connection reset by peer)
15:32:04*TheManiac quit (Read error: Connection reset by peer)
15:32:04*hohlerde quit (Remote host closed the connection)
15:36:20*literal quit (Quit: leaving)
15:36:36*literal joined #nim
15:41:50*brson joined #nim
15:51:19*hohlerde joined #nim
15:51:43*arnetheduck joined #nim
15:53:53*mtj_ joined #nim
15:56:11*PMunch joined #nim
15:58:04*arnetheduck quit (Ping timeout: 264 seconds)
16:00:28*pafmaf quit (Ping timeout: 264 seconds)
16:11:32*Andris_zbx quit (Remote host closed the connection)
16:13:51*nairobi quit (Ping timeout: 244 seconds)
16:14:31*gokr joined #nim
16:16:50*nairobi joined #nim
16:19:07dom96@vegansk: I don't understand why this code is so critical. You can easily use your own Nim fork while we review it
16:19:55cheatfatedom96, i've got a trouble with SSL, server doesn't handle client connection drop
16:20:06cheatfatei mean asyncssl
16:20:41*girvo joined #nim
16:21:18dom96cheatfate: I don't think I can help much there, SSL is a pain in the ass and I spent many days figuring out what the hell its problem was.
16:21:46dom96but feel free to gist what you have and I can take a look
16:21:55krux02BlaXpirit: why don't you contribute your random number module to the standard library?
16:22:32cheatfatedom96, https://gist.github.com/cheatfate/a704c520d48c0c56eb0c920e06b61b38
16:22:47cheatfatei'm trying to make test which uses asyncdispatch, not old `asyncio`
16:22:50federico3(please always prefer OS sprng over user-space ones if possible and warn the users about the risks)
16:23:13cheatfateand server could not handle client disconnection...
16:23:29cheatfatethis https://gist.github.com/cheatfate/a704c520d48c0c56eb0c920e06b61b38#file-tasyncssl-nim-L43 never happens
16:23:34dom96cheatfate: ahh, so you're trying to port the SSL asyncio test to async await?
16:23:40cheatfateyep
16:23:57cheatfatebut i'm not porting i'm replacing :)
16:24:23*nairobi quit (Remote host closed the connection)
16:24:28dom96have you tried connecting just one client to get a better idea of what's going on?
16:24:36cheatfateit doing good connect/read/write but looks like asyncnet could not handle disconnection
16:24:40dom96oh, I see you do that
16:25:00dom96is line 36 executed?
16:25:36cheatfatedom96, yep
16:25:41cheatfatei think problem is here
16:25:42cheatfatehttps://github.com/nim-lang/Nim/blob/devel/lib/pure/asyncnet.nim#L165
16:25:49cheatfatesomewhere around
16:25:54*girvo quit (Ping timeout: 276 seconds)
16:26:05dom96hrm, https://gist.github.com/cheatfate/a704c520d48c0c56eb0c920e06b61b38#file-tasyncssl-nim-L65
16:26:09dom96I don't think that's necessary
16:26:16dom96'accept' should wrap the socket
16:26:19dom96if the server is SSL
16:26:44*yglukhov quit (Ping timeout: 244 seconds)
16:27:32cheatfatedom96, asyncnet.accept dont anything with ssl :(
16:27:56dom96IIRC net.accept does
16:27:59dom96so asyncnet should too
16:28:19dom96but yeah... I never needed an SSL server so this wasn't tested at all
16:29:36cheatfatealso question, do we support windows iocp and sll?
16:29:41cheatfatessl*?
16:30:29dom96Not sure
16:31:08cheatfatethen nevermind this was just a question
16:31:22*gokr quit (Ping timeout: 252 seconds)
16:34:59BlaXpiritkrux02, in the past when the situation in standard library was dire, i had a strong position on the topic. some time after that I stopped using Nim. nobody reached out to me about including the library (though it was almost considered) and i don't insist. maybe it has too many small parts to be included. and in the end, i'm not even confident that the library is implemented correctly.
16:36:38krux02BlaXpirit: Don't worry too much about being correct, at least you have put some thoughts into the API, the standard library is pretty bad in that respect
16:37:09krux02I just opened an issue with it's problems: https://github.com/nim-lang/Nim/issues/4726#issuecomment-245004365
16:37:22*coffeepot quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client)
16:38:17BlaXpiritkrux02, this may be a fun read https://github.com/nim-lang/Nim/issues/1506
16:38:28BlaXpiritthat's the "situation in standard library was dire" part
16:38:34*brechtm_ joined #nim
16:39:45*Demos joined #nim
16:40:52BlaXpiritcouldn't believe that was 2 years ago. damn i'm old :p
16:42:19*brechtm quit (Ping timeout: 260 seconds)
16:42:50dom96"Anybody willing to volunteer their time to move @BlaXpirit's library into the stdlib?" -- Me desperately asking for help
16:42:55dom96But help never came...
16:44:24krux02At that time I did not know anything about Nim
16:44:59BlaXpiritoh, stdlib is still seeded based on time :(
16:45:28*jackv quit (Ping timeout: 264 seconds)
16:45:31krux02yes it is
16:46:10krux02closing the old issue was a mistake considering that it had some good information in it.
16:46:23BlaXpiritinformation is still there
16:46:59krux02yes but it is not visible anymore, because it is tagged as resolved
16:47:07krux02or closed
16:47:33krux02I am volunteering to help with the random module
16:47:52federico3what's the use case for this random module?
16:48:38krux02federico3: witch random module stdlib or BlaXpirit?
16:49:17BlaXpiritlicensing may also be a pain
16:49:23*GustavoLapasta joined #nim
16:49:58*jackv joined #nim
16:49:58krux02generally, encryption and particle effects
16:50:24federico3both.
16:51:03krux02if you mean generally, random is used for encryption and particle effects.
16:51:22krux02You wouldn't want your shotgun in games to always shoot the same pattern
16:52:10krux02BlaXpirit: I think writing an e-mail can solve most problems
16:54:13krux02"Dear Mr(s) X, we would like to ask you if it is ok to port part Y out of your library into our programming language and release it under license Z, are you okay with that? Sincerely the Nim community.
16:54:22Demosinterestingly in many fps games (tf2 and cs) shotguns DO always shoot the same pattern
16:54:30Demoswell for tf2 it's a setting
16:54:33Demos"competitive mode"
16:55:02krux02competitive players don't like randomness
16:55:13Demosanyway, c++ has a pretty good random library (despite some c++ syntax strangeness), and I think c++17 has an "easy" version
16:55:28BlaXpiritthe library is HUGE
16:55:37Demos<random>
16:55:39Demos?
16:55:54krux02horribly overdesigned and too hard to use in my opinion
16:56:02federico3krux02: let's not confuse encryption and other use cases. Many user-space SPRNG are not fit for encryption
16:56:07Demosyeah, there's a "easy" version.
16:56:17krux02it's not bad, but try to "just get a random integer"
16:56:29Demosbut like I do want the ability to have a seperate PRNG per thread (and no lock) even for the easy rand() case
16:56:31Demosyeah
16:57:00krux02I just wanted to give some very different examples for use cases
16:58:08Demoshttp://en.cppreference.com/w/cpp/experimental/lib_extensions_2
16:58:23Demosbelow the erase_functions and the stupid observer_pointer stuff
16:58:51Demosbut yeah, I use <random> in my c++ code but it is hella verbose
17:01:19dom96So what exactly do you guys need out of the random module?
17:01:28krux02I like the easy interface
17:01:36dom96My experience so far has been "yeah, I need a random number, okay i'll just call this function"
17:02:42dom96Then I thought "hrm, it would be nice to get as much entropy as possible for this card game I am making. Meh, i'll just use /dev/urandom manually or use the random.org API"
17:03:44*nairobi joined #nim
17:03:44BlaXpiritso how exactly did you use /dev/urandom
17:03:53Demosyeah, I think you need both an in depth random API and a simple function
17:03:53*nairobi quit (Read error: Connection reset by peer)
17:04:03Demosbut that function should probably not just call c's rand()
17:04:13*elrood joined #nim
17:04:18Demosbecause the PRNG sucks and I'm pretty sure it involves acquiring a mutex
17:04:29*nairobi joined #nim
17:05:01dom96BlaXpirit: just read from it
17:05:04krux02lib_extension_2 api from c++ is pretty nice
17:05:34BlaXpiritdom96, well then your game doesnt work from windows, and you still haven't explained how you get random numbers by "reading from it"
17:06:14BlaXpiritrandom bytes - i get it, yes, but then?
17:06:33krux02I would suggest that on linux the default RNG initializes from /dev/urandom and on Windows an the windows version from it (I am just guessiong there is one)
17:07:20BlaXpiritkrux02, so like in my lib
17:07:35krux02yes
17:08:23dom96BlaXpirit: honestly cannot remember.
17:08:38dom96Hrm, guess I removed it https://github.com/dom96/c4hbot/blob/master/cahbot.nim#L235
17:08:49*StarBrilliant quit (Quit: ZNC - http://znc.in)
17:09:17krux02BlaXpirit, how do you generate a uniform distributed number in the range 1..X when x is not a power of two?
17:09:29krux02I mean 0..X
17:09:31ThisIsZenifiedjust open dev urandom for BSD or Linux
17:09:39ThisIsZenifiedand in Windows use CryptGenRandom
17:10:03krux02do you generate from 0 to the next power of two -1 and then trow away when above X?
17:10:31BlaXpiritkrux02, well i discard numbers until it's within modulo ugh how to even explain that
17:10:41krux02ok I got it
17:10:52federico3discarding is ok, don't do modulo
17:11:00BlaXpiritsay i have a random number 0..7, and i want random number 0..2, so i discard numbers until it's 0..5
17:11:05*nsf quit (Quit: WeeChat 1.5)
17:11:09krux02I know that method for random points within a circle
17:12:06BlaXpiritbut that's the sketchiest part of my lib, i think i'm unnecessarily wasteful when it comes to big numbers
17:12:59krux02what do you mean wasteful?
17:13:11krux02don't you always go to the next power of two?
17:13:29BlaXpiriti mean some random numbers are discarded although they don't have to be
17:14:19krux02Ok that I don't understand, where is the complexity in the `<` operator?
17:15:22krux02I know, no matter how big the number are, when you have to throw a lot of bit's away, you can't simply say "who cares, I only generate the last X bits new"
17:15:28krux02that would destroy randomness
17:16:22AraqI just do modulo :P
17:16:48*brechtm_ quit (Remote host closed the connection)
17:17:06krux02ouch
17:17:27*brechtm joined #nim
17:17:52krux02I mean for rolling dice, it doesn't matter, but I think I don't need to explain that it is wrong
17:20:14AraqI guess my random.nim should use
17:20:17Araqint x;
17:20:17Araqdo {
17:20:17Araq x = rand();
17:20:19Araq} while (x >= (RAND_MAX - RAND_MAX % n));
17:20:21Araqx %= n;
17:20:23Araqinstead
17:20:49FromGitter<vegansk> @dom96 , I have 3 applications used in productions and written in Nim, not counting developer tools and other internal services. All of them are in continuous development. For one project I need to fork Nim, apply this PR, then add asyncstreams, then fix asynchttpserver via asyncstreams, then fork and add streams to the jester API. Then I need to write package.json with my custom jester. I'm not the only one who writes in Nim in our
17:20:49FromGitter... company. So I must deploy my fork and all stuff on developer machines and fix CI scripts. Sometimes we, like the others, find the bugs that are showstopper for us. So, we need to merge our fork with upsteram/devel. I would like to avoid it if possible
17:23:28krux02Araq, that method is now to me I first need to understand it
17:24:46BlaXpiriti get the idea but the comparison is not right
17:25:02*Demon_Fox joined #nim
17:25:27BlaXpiritactually it might be right
17:25:45ThisIsZenifiedif you want true randomness, you should probably use random.org public API
17:27:24krux02int x;
17:27:24krux02do {
17:27:24krux02 x = rand() & nextPowerOfTwo(n)-1;
17:27:24krux02 } while (x < n);
17:27:46krux02that's the only one I understand :-P
17:27:58dom96@vegansk: I know, I'm sorry about the delay. I will merge it once I eat. It seems like you need other PRs merged as well though, and there will be further delays with those.
17:28:35dom96@vegansk: I also don't think you need to keep reapplying your PR. Just keep a fork of Nim which contains all your patches and pull from upstream every once in a while.
17:29:20krux02@vegansk: https://help.github.com/articles/syncing-a-fork/
17:29:50krux02I hope that was the issue
17:29:56krux02I was just guessing
17:30:37*csoriano joined #nim
17:31:05ThisIsZenifieddom96: any ideas why nawak is faster than Jester
17:31:31dom96ThisIsZenified: nope, never had the time to investigate.
17:32:09krux02ok I got it, it could be right
17:33:48krux02I would not make the standard library depend on having internet
17:34:47FromGitter<vegansk> @dom96, thanks. What do you think if I merge asyncstreams module and asynchttpserver changes in one PR to speed up the process?
17:35:58dom96@vegansk: I don't think that will have much of an effect on speeding up the process. Just keep it separate
17:37:18*krux02 quit (Quit: Verlassend)
17:38:44euantorKeeping it separate also makes the git history more obvious
17:48:43kierdom96: have you seen my reply to https://github.com/nim-lang/irc/pull/7 ?
17:49:53*xet7_ joined #nim
17:51:16dom96kier: sorry, replied
17:52:01kierdom96: cool. thanks for clarifying, will get on it
17:52:29dom96thanks
17:59:17FromGitter<vegansk> @dom96, ok. asyncstreams PR is ready to be publicated when you merge previous PR, asynchttpserver will be then publicated in 8-9 hours, it's 1am here :-)
18:00:13dom96@vegansk: where are you from? :)
18:00:59Demosif I want to make a nimscript task to compile some tools for my project should I just setCommand "" and then exec "nim c ...." ?
18:02:06FromGitter<vegansk> @dom96, Novosibirsk, Western Siberia, Russia
18:02:24*kulelu88 joined #nim
18:02:30dom96@vegansk: cool!
18:04:53FromGitter<vegansk> @dom96, yes, and I guess I'm not the only one here from Novosibirsk :-)
18:10:29*yglukhov joined #nim
18:11:43dom96@vegansk: why did you remove this code? https://github.com/nim-lang/Nim/pull/4683/files#diff-e7d29941cb2ca6bf4e0f5c627239bc7bL787
18:16:23FromGitter<vegansk> @dom96, buf]0https://github.com/nim-lang/Nim/pull/4683/files#diff-e7d29941cb2ca6bf4e0f5c627239bc7bR774
18:16:45FromGitter<vegansk> Oops, buf[0] = '\0' is commented
18:18:22dom96IIRC the winapi returns it sometimes, that might just be testing code
18:18:24dom96I will restore it
18:19:24kulelu88@vegansk: testing. do you see this on gitter?
18:20:28dom96why wouldn't he?
18:20:51kulelu88does it ping him? dom96
18:20:55BlaXpirityes
18:21:00BlaXpiritpro tip: on IRC you don't have to write out the '@' at the start of the message
18:21:10kulelu88I know that BlaXpirit .
18:21:26kulelu88just seeing how the gitter/irc gateway works
18:21:31BlaXpiriti mean also when addressing gitter users
18:21:37*girvo joined #nim
18:21:50kulelu88where is the code for the bridge between gitter and irc?
18:22:08FromGitter<vegansk> @dom96, got it.
18:22:22BlaXpiritkulelu88, private message the bot to get a link
18:22:40FromGitter<vegansk> @kulelu88, yes
18:25:07kulelu88nice. nice bot BlaXpirit
18:25:23BlaXpiritthx
18:26:04*girvo quit (Ping timeout: 240 seconds)
18:31:33*gunn joined #nim
18:35:15*gunn_ quit (Ping timeout: 276 seconds)
18:36:36kulelu88BlaXpirit: should I ask questions about critter here or in #critterbot ?
18:37:13dom96vegansk: merged
18:39:34*Demos quit (Ping timeout: 240 seconds)
18:41:33FromGitter<vegansk> @dom96, thanks. Please look at https://github.com/nim-lang/Nim/pull/4727 when you can.
18:43:17*nairobi quit (Read error: Connection reset by peer)
18:46:13*nairobi joined #nim
18:47:43dom96vegansk: Why do you want this in the standard library?
18:48:02dom96I would rather let it mature in a nimble package
18:49:37FromGitter<vegansk> @dom96, because asynchttpserver is in stdlib and I want to add request's body stream to Request object. The problem is that I can't receive big posts, the applications crashes due to the out of memory
18:50:13*Demos joined #nim
18:50:16dom96I'm sure there is a simpler way
18:50:32*xet7_ quit (Ping timeout: 240 seconds)
18:50:33dom96Can't you just fix asynchttpserver instead of making it use another module?
18:50:43dom96hrm
18:50:59dom96I think I see the problem.
18:51:42FromGitter<vegansk> Yep. body is string
18:52:24FromGitter<vegansk> So we need some sort of streaming.
18:52:36FromGitter<vegansk> Better async then sync
18:53:03dom96okay, I think a better solution is to give access to the client socket in the request callback
18:55:16FromGitter<vegansk> And what if I send multipart message? Handle it manually?
18:55:57euantorYeah, I'd rather have a scalable non-crashing solution in the stdlib
18:56:21euantorOtherwise everybody from any other language using the HTTP server will just think "WTF" when they try to use Nim's
18:56:37dom96vegansk: you would need to anyway wouldn't you?
18:56:49dom96I don't see how your asyncstream module helps with that
18:57:08dom96it just offers an abstraction over what an AsyncSocket already provides
18:57:14FromGitter<vegansk> I want to suggest to read the body as a string, map of strings with form data parameters, stream, map of streams with form data parameters
18:58:27*gokr joined #nim
18:59:13*Ven_ joined #nim
18:59:40FromGitter<vegansk> Hm, yes, I can do it with AsyncSocket.
19:01:29FromGitter<vegansk> @dom96, but if we have streams in stdlib, why we can't have async version there? :-)
19:01:57dom96vegansk: We can
19:02:02dom96But maybe later
19:02:15FromGitter<vegansk> And, no, I can't do it with AsyncSocket. AsyncSocket doesn't know about the end of multipart portion, so I need to check it manually
19:02:58dom96again, you would need to do the same with asyncstream
19:03:39*M-Quora joined #nim
19:03:47*TheManiac joined #nim
19:05:10FromGitter<vegansk> Yes, I'll write AsyncStream implementation for multipart, and will use AsyncSocketStream for entire body.
19:05:41FromGitter<vegansk> And both of them will have the same interface.
19:05:56dom96write an implementation for asyncsocket instead?
19:07:13*Ven_ quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
19:08:40Demoslexbase: it has a js version that I'd like to use during compile time
19:08:43Demosany way to do this
19:08:56DemosI tried when nimvm but since one of the symbol types differs it does not work
19:12:16*brson quit (Quit: leaving)
19:25:21*dddddd quit (Ping timeout: 244 seconds)
19:27:02*GustavoLapasta quit (Quit: Leaving)
19:30:13Demoswelp found a vm bug
19:31:02*nairobi quit (Remote host closed the connection)
19:34:26*xet7 joined #nim
19:50:30*nsf joined #nim
20:03:52*allan0 quit (Ping timeout: 240 seconds)
20:04:12*ryu0 joined #nim
20:04:17*ryu0 left #nim ("WeeChat 1.4")
20:11:25*allan0 joined #nim
20:12:47*bungoman quit (Ping timeout: 250 seconds)
20:13:57*brson joined #nim
20:22:23*girvo joined #nim
20:26:46*girvo quit (Ping timeout: 252 seconds)
20:34:12*_stowa joined #nim
20:42:16*_stowa quit (K-Lined)
20:49:26*fredrik92 joined #nim
20:51:59*nairobi joined #nim
20:53:17*Snircle quit (Quit: Textual IRC Client: www.textualapp.com)
20:59:34*elrood quit (Remote host closed the connection)
21:05:58*yglukhov quit (Remote host closed the connection)
21:10:29*Snircle joined #nim
21:19:29*Matthias247 joined #nim
21:19:59*fredrik92 quit (Quit: Leaving.)
21:20:52*fredrik92 joined #nim
21:22:55*xet7 quit (Remote host closed the connection)
21:23:47*xet7 joined #nim
21:24:51*antranigv joined #nim
21:38:43*planhths quit (Quit: Konversation terminated!)
21:39:35*fredrik92 quit (Quit: Leaving.)
21:43:58*chemist69 quit (Ping timeout: 255 seconds)
21:46:13*Jesin quit (Quit: Leaving)
21:46:56*chemist69 joined #nim
21:57:59*Trustable quit (Remote host closed the connection)
21:59:25*csoriano quit (Quit: csoriano)
22:00:30*lenstr quit (Ping timeout: 244 seconds)
22:01:46*LeNsTR joined #nim
22:07:31*nairobi quit (Read error: Connection reset by peer)
22:08:28*nairobi joined #nim
22:12:00*pregress_ quit (Remote host closed the connection)
22:21:23*Jesin joined #nim
22:23:13*girvo joined #nim
22:27:57*girvo quit (Ping timeout: 276 seconds)
22:28:50*nairobi quit (Remote host closed the connection)
22:49:57*gokr quit (Ping timeout: 244 seconds)
22:52:04*allplayersdd joined #nim
22:52:12allplayersddi dont like the syntax of nim, julia is better imo
22:58:20*krux02 joined #nim
23:01:27*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
23:17:51ldleworkallplayersdd: good to know
23:21:38*bjz joined #nim
23:22:23*Matthias247 quit (Read error: Connection reset by peer)
23:28:04antranigvi don't like apples, tomatos are yummier imho
23:28:28PMunchantranigv: good to know
23:28:38antranigvI really like Nim, very Wirthian, also Pythonic
23:28:57antranigvcan I read about the history?
23:29:08antranigvI was not able to navigate in the website
23:29:29antranigvI mean, maybe I missed it, that's why I'm asking here :)
23:30:30PMunchHmm, not sure if there is that much written history of Nim
23:31:00PMunchen.wikipedia.org/wiki/Nim_(programming_language)
23:31:07PMunchThere's one line of history there
23:32:15*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
23:33:39antranigvhell the export marker from oberon is the best thing ever
23:33:51antranigvwhy do people do all that private/public stuff?? hehe
23:39:26antranigvI wish there never was any need for the keyword object
23:39:38antranigvin Oberon-2 you can have OOP without OOP-ish words :))
23:45:02*PMunch quit (Quit: leaving)
23:51:11*chemist69 quit (Ping timeout: 250 seconds)
23:51:28allplayersddantranigv, please explain the export marker from oberon
23:51:43allplayersddand OOP in oberon
23:54:16*chemist69 joined #nim